jello_pudding has quit [Ping timeout: 246 seconds]
emacsomancer has quit [Read error: Connection reset by peer]
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
oxum has quit [Read error: Connection reset by peer]
emacsomancer has joined #lisp
oxum has joined #lisp
Lord_of_Life has quit [Ping timeout: 265 seconds]
Lord_of_Life has joined #lisp
jackdaniel has quit [Remote host closed the connection]
jackdaniel has joined #lisp
jackdaniel has quit [Remote host closed the connection]
Bike has joined #lisp
jackdaniel has joined #lisp
nikkal has quit [Ping timeout: 258 seconds]
jello_pudding has joined #lisp
kaftejiman has joined #lisp
roman555 has left #lisp [#lisp]
rgherdt_ is now known as rgherdt
xrash has joined #lisp
mingus has quit [Ping timeout: 260 seconds]
makomo has joined #lisp
SpaceIgor2075 has quit [Quit: Leaving]
SpaceIgor2075 has joined #lisp
frgo has quit [Read error: Connection reset by peer]
frgo has joined #lisp
orivej_ has quit [Ping timeout: 260 seconds]
orivej has joined #lisp
Necktwi has joined #lisp
cosimone has quit [Read error: Connection reset by peer]
cosimone has joined #lisp
ck__ is now known as ck_
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
cosimone has quit [Ping timeout: 260 seconds]
cosimone has joined #lisp
Lord_Nightmare has quit [Remote host closed the connection]
jesse1010 has joined #lisp
Lord_Nightmare has joined #lisp
dale has quit [Quit: My computer has gone to sleep]
v3ga has joined #lisp
cosimone has quit [Quit: Quit.]
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
<lukego>
I'd like to drive Blender from Lisp. Any ideas? Just now it seems like the simplest would be to output Python code that calls the blender API and have that executed somehow.
v88m has quit [Ping timeout: 240 seconds]
shangul has quit [Ping timeout: 240 seconds]
<phoe>
burgled-batteries?
<phoe>
there was some code to integrate python with cl
dyelar has joined #lisp
<heisig>
There is cl4py and py4cl for piping data between Lisp and Python. The former is for using Lisp from Python, the latter is for using Python from Lisp.
shangul has joined #lisp
shangul has quit [Remote host closed the connection]
shangul has joined #lisp
<lukego>
py4cl looks really relevant, thanks for the tip
theseb_ has joined #lisp
holycow has quit [Quit: Lost terminal]
kinope has joined #lisp
makomo has quit [Quit: WeeChat 2.8]
gxt_ has quit [Remote host closed the connection]
gxt_ has joined #lisp
wxie has joined #lisp
<lukego>
to start with I think I'll just use format strings to write python code
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #lisp
wxie has quit [Quit: wxie]
wxie has joined #lisp
wsinatra has joined #lisp
Christ0pher has quit [Ping timeout: 260 seconds]
Christ0pher has joined #lisp
epony has quit [Ping timeout: 258 seconds]
Harag has joined #lisp
orivej has quit [Ping timeout: 264 seconds]
<Harag>
if I want to create a method implementation for any type of class can I specialize on standard-object or should it be standard-class.. the method that has no specialization is already doing other stuff for standard lisp types so cant use that
<Harag>
or would that end up catching lisp types as well?
<phoe>
"for any type of class"?
<phoe>
what do you mean?
<phoe>
do you mean (defmethod foo ((object class) ...) ...)?
<Harag>
yeah something like that
<phoe>
this will only accept class objects then
<phoe>
types in CL are second-class citizens, you can't write methods for type specifiers
<jackdaniel>
Harag: specialize on standard-object
<phoe>
they can be symbols, conses, or classes
EvW has joined #lisp
<jackdaniel>
specializing on class will work only for objects returned i.e by (class-of my-object)
<phoe>
yes, and I hope that's the idea Harag wanted
<phoe>
if I mis-interpreted, then this won't work
<Harag>
yes I think that is what I want :)
<jackdaniel>
uhm, OK then, sorry for the noise
<phoe>
that wasn't a crystal-clear question for me to interpret, so noise is both okay and expected I guess
<Harag>
yeah I am not clear on the difference between class and standard-object
<beach>
Harag: You question is till vague because classes are standard Common Lisp types as well.
<beach>
Harag: It might help if you gave an example.
<Harag>
beach I want a specializer that will only catch user defined classes ie defclass
scymtym has quit [Ping timeout: 260 seconds]
<Harag>
I dont want it to catch hash-table and the likes
<jackdaniel>
you are still vague
<beach>
Harag: That can be very tricky.
<phoe>
standard-class is not enough then; an implementation is free to implement a hash table as a standard class
<jackdaniel>
when you have (defclass foo () ()) and (defvar *foo* (make-instance 'foo))
<jackdaniel>
do you want it to catch *foo*, or (find-class 'foo) ?
<beach>
Harag: Because the standard doesn't say how the standard classes are implemented. They may be standard classes, or built-in classes.
<beach>
Harag: For example, in SICL, classes such as SYMBOL, PACKAGE, HASH-TABLE are all standard classes, and instances of them are all standard objects.
<beach>
I should have said, the standard doesn't say how "system classes" are implemented.
<beach>
Harag: And, yes, it is still not clear whether you are talking about the class metaobjects, or instances of them.
<Harag>
instances
<phoe>
I mean, the standard specifies the list of all system classes; you can just specialize on all of them if you are patient enough
<beach>
I think that's the only thing that will work.
<beach>
There is no standardized way of distinguishing between an instance of a system class and an instance of a standard class.
<beach>
... simply because a system class can very well be a standard class.
<Harag>
beach: I really only need to deal with the ones that do are data structures and I wanted to give a defualt for stuff that have slots that would come from user defined classes
tich has joined #lisp
<Harag>
I guess I will have to leave the user defined classes to the user to specialize on what they need
<phoe>
which problem are you solving?
<Harag>
its a get that undestands plists,hashtables etc so the user can swap between the underlying data structure without having to change calls to get data
<beach>
Harag: Both instances of standard classes and many instances of system classes are "data structures".
<Harag>
so let me as it this way will slot-value work on all of those beach?
<beach>
Harag: So why not just specialize to LIST, HASH-TABLE, etc.?
<jackdaniel>
s/list/cons/
<jackdaniel>
and null
<beach>
Harag: In SICL, (slot-value 'hello 'sicl-symbol::%name) will return "HELLO".
<beach>
jackdaniel: Why?
<Harag>
beach: I could do that but I wanted t be nice and give someting that would deal with slot-value
<phoe>
jackdaniel: LIST is a system class, not just a type
<Harag>
if slot-value wont crash any of them then I can live with it, and in 9 out of 10 cases it would do the right thing from a user's perspective
<phoe>
(and yes, I had to double-check it with the spec)
dale_ has joined #lisp
<jackdaniel>
beach: phoe: my bad
<beach>
Harag: SLOT-VALUE will very likely not work on a CONS.
dale_ is now known as dale
wxie has quit [Ping timeout: 256 seconds]
<beach>
It may work on a hash table.
<beach>
But what slot would you be looking for?
<phoe>
so basically you want (dwim-get some-data-structure :foo) ;=> :bar
<Harag>
beach: I dont know, so some responsibility can be letf to the user to not expect miricles
<phoe>
(if I understand you correctly)
<phoe>
where SOME-DATA-STRUCTURE can be an alist, or a plist, or a hash table, or a standard object, or ..., or ...
<phoe>
something like that?
<Harag>
phoe: yes
<phoe>
if yes, you should be able to write one method for LIST that covers alists and plists, another for hash tables, and yet another for standard objects, and let users write methods for their own data structures
<phoe>
if you (defgeneric dwim-get (some-data-structure &rest keys)) then things should mostly work
<Harag>
phoe: that exactly what I wanted to do , but then I got lost between standard-object, standard-class and the rest
<phoe>
AFAIK some lisp projects have achieved something like that in the past
bsd4me has joined #lisp
<Harag>
phoe: I also do a dig which relies on the get so wanted control over what I was doing
<beach>
Harag: I can't figure out what you would do in a method that specialized to "any object on which SLOT-VALUE will work".
grewal has quit [Remote host closed the connection]
<beach>
I mean, to do something useful in such a method, you would at least need to know the name of a slot.
<Harag>
beach: it means the user does not have to write there own method specialization for their class instance if it will look exactly the same any way
<Harag>
the user is passing the name
SpaceIgor2075 has quit [Ping timeout: 258 seconds]
<beach>
Oh, dear! Slots are internal things and should never be used for access.
<phoe>
note that I in no way whatsoever endorse cl21
<phoe>
also what beach said, if I name my slot MY-PACKAGE::%FOO then I don't want it to be accessed via SLOT-VALUE
<phoe>
accessors and accessor protocols exist for a reason
<Harag>
can you pass the accessor like you would pass a function?
<beach>
Harag: One thing I learned from reading the CLIM spec was that classes are specified in terms of their initargs and their accessors.
<phoe>
Harag: yes
<beach>
Harag: An accessor is just a pair of functions, a reader and a writer.
<phoe>
for standard objects, accessors are functions
<beach>
Harag: Typically #'name and #'(setf name). Often, just the reader is defined.
<jackdaniel>
semi-relevant: https://github.com/scymtym/traits (concept of traits, helps to decide whether the class implements a specified protocol)
<beach>
Harag: So whereas (slot-value 'hello 'sicl-symbol::%name) will work in SICL but not in other implementations, the accessor #'SYMBOL-NAME will work everywhere.
toorevitimirp has joined #lisp
<phoe>
jackdaniel: interesting, I'll read that in-depth later
<beach>
Harag: Less LOOP and more slots doesn't seem to me a good path to more lispy code.
<Harag>
lol
SpaceIgor2075 has joined #lisp
<beach>
phoe: Do you still remember the link to that chapter on protocols? Or did you improve on it?
<beach>
phoe: We should share it with Harag.
<Harag>
beach I have a naive object db package that uses plist as its basic data object just wanted to be able to switch between data structures simply ... so dont worry about the optimal structure you can change it later... get something up and running and then optimize
<beach>
yeah, but didn't you improve on it at some point?
<jackdaniel>
optimization is not a feature, it is the implementation trait!
<beach>
Harag: If the representation shows in functions all over the system, then it is time to abstract away the representation and use a well-defined protocol for it.
<beach>
Harag: There should be exactly one place in the system that uses the fact that it is a plist.
<beach>
Harag: A plist is what I call a "concrete data type" to distinguish it form an "abstract data type". Concrete data types are used for implementing abstract data types, but should never be exposed in the protocol.
<beach>
There are just too many quirks with concrete data types.
<beach>
Harag: For example, (SETF GETF) takes a place and not an object. Such a thing should never be in a protocol specification.
<Harag>
beach: its not my library that causes the issues its using the data structures in the user's code that causes issues the get a value for plist its getf for hash-table its get-hash for objects the accessor method, that is where you code yourself into a corner with the underlying data structure, so I wanted to do getx to get round that for those that wanted the flexibility to change
renzhi has joined #lisp
<beach>
And how do you propose to do that for SETX?
katco has quit [Quit: killed]
unl0ckd has quit [Quit: killed]
infra_red[m] has quit [Quit: killed]
userself has quit [Quit: killed]
even4void[m] has quit [Quit: killed]
camlriot42 has quit [Quit: killed]
sammich has quit [Quit: killed]
MrtnDk[m] has quit [Quit: killed]
fountainpen[m] has quit [Quit: killed]
cairn has quit [Quit: killed]
Gnuxie[m] has quit [Quit: killed]
liamz[m] has quit [Quit: killed]
<phoe>
you want a layer of abstraction between your concrete data types and the code that uses it
<phoe>
that's where the protocol part comes in
<beach>
It looks like something happened to matrix.org.
<Harag>
beach: the setx is just a (setf getx)
<beach>
Oh yeah?
<Harag>
for what I have so far it works
thecoffemaker has quit [Ping timeout: 254 seconds]
<phoe>
there's a few edge cases where #'(setf getx) won't work, keep that in mind
<beach>
Try (setf (getf '() :hello) 234).
<Harag>
it even works for the hierarchical getx ie digx
notzmv has quit [Ping timeout: 246 seconds]
akkad has quit [Ping timeout: 264 seconds]
<beach>
Or even (let ((x '())) (setf (getf x :hello) 234) x)
<phoe>
and beach just mentioned one
<beach>
Well, I guess that one work.s
<beach>
Try this one instead...
chipolux has quit [Ping timeout: 258 seconds]
<phoe>
this one works because SETF GETF does not expand into a function
<beach>
Harag: Compare that to the same thing when x and y are hash tables.
stepnem_ has quit [Ping timeout: 256 seconds]
stepnem has joined #lisp
<phoe>
Harag: basically, (let ((plist '())) (put-in-plist plist :foo :bar)) always fails if PUT-IN-PLIST is a function, not a macro.
<Harag>
beach: I sped read the protocol thingy need to spend more time on it, but are you saying that a protocal would work where getx wont or that getx is a protocal with limitations?
<phoe>
I think neither
<Harag>
lol
<beach>
Harag: Or this one (defun add-stuff (container) (setf (getf :container new) 234)) and then (defparameter *container* '())) and then (add-stuff *container*).
<beach>
Harag: I am saying that you lose if you use plists as you would use an abstract data type.
<beach>
And you can never uniformize a protocol (or interface, or whatever you call it) so that it works both for plists and hash tables.
<beach>
Because a plist is a concrete data type and a hash table is an abstract data type.
* Harag
... trying to compute the difference between concrete and abstract data structure
chipolux has joined #lisp
<beach>
An abstract data type is defined by the operations you are allowed on it. And assignment of an instance of an abstract data type preserves identity.
<Harag>
beach: but I can treat a hashtable as a concrete data type?
<beach>
Sure, you can do that. But the thing is that when you deal with concrete data types, you can't necessarily uniformize the operations on them.
<beach>
SETX or (SETF GETX) is an example as I showed you.
<beach>
Because with the hash table, adding an element preserves the identity of the hash table.
<beach>
But adding an element to a plist is not guaranteed to do that.
<beach>
My two examples with LET* and DEFUN both show that.
<phoe>
note: if you wrap your data type in some sort of object that is an ADT, you are able to uniformize these operations
<beach>
Indeed, even if one of them is just a standard-object with a plist inside it.
<Harag>
is it the difference between destructive and non destructive?
<phoe>
not necessarily
<phoe>
NIL is the edge case
<beach>
Harag: If they don't ALL do it, you don't have an abstract data type.
<phoe>
you cannot modify NIL
<beach>
Harag: No, (setf gethash) is destructive.
<beach>
Harag: One way of understanding the difference between a concrete and an abstract data type, other than the fact that the latter preserves identity across operations, is that for the latter, you don't need to know how it is represented in order to understand the effect of the operations, but for the former, you do.
<Harag>
ok
<beach>
Harag: This is really basic stuff. Is Common Lisp your first programming language?
<beach>
Harag: This stuff is needed by anybody writing code in any programming language, when the code is just a bit larger than FizzBuzz.
<Harag>
no beach but I have no formal education in programming so my bad
fountainpen[m] has joined #lisp
<beach>
Harag: Formal training is not a requirement. But you do need to learn about this stuff to be able to write basically anything.
choegusung has joined #lisp
<Harag>
beach: I dont know about that, you are saying I have not written anything significant in the last 20 years...ouch
<Harag>
beach: I have difficulty with the language describing programming promblems but have learned by trial and error to do enough to come by
<Harag>
but I always want to improve
<phoe>
that's the part where "formal education" can come in handy
<Harag>
so any direction is welcome as is your attempts to teach here.
<phoe>
and it doesn't really have to be formal as in degrees and such
<phoe>
self-development is possible and encouraged, especially in the world of programming
<beach>
Harag: If you don't know this stuff, it is very likely that you have written only programs that do not require any significant data types, or else that your code is very hard to maintain.
<Harag>
beach: have have written business stuff mostly, and used standard databases, so digging into data structures on a lower level is a new venture for me, something I hack away at in my free time...
<beach>
Yeah, that would explain it.
nicktick has joined #lisp
jonatack has quit [Ping timeout: 260 seconds]
yonkunas has joined #lisp
dddddd has joined #lisp
<Harag>
for instance I have implemented a hash-table based on random access lists to try and improve my little db's indexing
<phoe>
the lower-level world is full of quirks and edge cases like that
orivej has joined #lisp
nicktick has quit [Ping timeout: 246 seconds]
<Harag>
beach is that "Introduction to Computer Science"?
<Harag>
will add it to my reading list thanx
<beach>
No, the title is "Concrete and Abstract Data Types with Algorithms".
<Harag>
ok
<beach>
And it is unpublished.
<Harag>
eish
knuckles has quit [Ping timeout: 256 seconds]
<Harag>
ok well add me to the first customer list please ;)
<beach>
I'll try to remember.
knuckles has joined #lisp
jw4 has quit [Read error: Connection reset by peer]
<theseb_>
I implemented for loop and while loop macros....Any advice on how implement break and continue? (break = exists the looping function)...(continue = leaves the current loop only)
<theseb_>
Also how implement a "return" to exist functions at interior points?
chipolux has quit [Ping timeout: 240 seconds]
<theseb_>
I've noticed all these questions have to do with altering flow of execution
<beach>
Expand your loop constructs to TAGBODY and make the break and the continue a GO.
<jackdaniel>
implement tagbody and go, that should suffice
<jackdaniel>
second again :)
<beach>
Sorry. :)
jw4 has joined #lisp
<jackdaniel>
no need, if we are wrong, then the one eaten by the mob will be you ,)
<beach>
Good point. And I can probably handle being eaten better than you can. :)
<kinope>
You guys ever have seemingly crazy illogical bugs that you can't explain. I have a spot in a function, where if I don't put a copy-list in when creating a let binding, I can't create an instance of a certain class without its one slot-value which is meant to be an instance of a class, getting initialised as #<unknown pointer object, lowtag=#x3
<kinope>
{10015505F3}>. Like, that function I was talking about isn't even being called, I'm just creating a fresh instance of the class at the repl, but if I don't load the code for that function with the copy-list there, then I get that wacky result. I don't know how I would event go about creating a reduced test case, and I don't want to dump the code on
<kinope>
you like I did the other night. It works for now, I'm just wondering if you have stories of weird bugs like this that you never solved.
oxum has quit [Remote host closed the connection]
junkicide has quit [Remote host closed the connection]
<phoe>
either you invoked UB in some place or you found an obscure implementation bug
<phoe>
what is the list? is it getting mutated anywhere?
<phoe>
is it supposed to be mutated?
nicktick has joined #lisp
<Bike>
needing copy-list suggests the list might be constant or dynamic-extent or something.
<phoe>
^
oxum has joined #lisp
<kinope>
well, it's a list returned from (c2mop:class-precedence-list (class-of /class-instance/)) to be specific. I just don't see how it should affect creating an instance of a class at a totally unrelated time.
choegusung has quit [Quit: leaving]
<kinope>
I am doing an nreverse on that returned list
<phoe>
you must not do that
<beach>
You nreverse the class precedence list?
<kinope>
yes
<beach>
That would be very bad.
<phoe>
well then, you're destroying the implementation's internal data structures
<kinope>
oh
<phoe>
to quote a part of SBCL source code, "Congratulations!"
<kinope>
i was wondering if that was the issue
<phoe>
*never* mutate lists that are not fresh.
<phoe>
if you wonder if a list is fresh, assume it's not.
<kinope>
I am aware of the weird things that can happen when mutating lists, but I didn't know this wasn't a fresh list.
<kinope>
it makes sense now
<beach>
It seems very clear that this function returns whatever is stored in the class, without copying it.
edgar-rft has quit [Quit: Leaving]
sjl_ has joined #lisp
kinope has quit [Remote host closed the connection]
kinope has joined #lisp
chipolux has joined #lisp
kinope14 has joined #lisp
<kinope14>
okay so if it doesn't explicitly mention that it returns a copy, then it doesn't. got it.
orivej has quit [Ping timeout: 244 seconds]
camlriot42 has joined #lisp
unl0ckd has joined #lisp
sammich has joined #lisp
Gnuxie[m] has joined #lisp
katco has joined #lisp
cairn has joined #lisp
deselby has joined #lisp
userself has joined #lisp
MrtnDk[m] has joined #lisp
LdBeth has joined #lisp
infra_red[m] has joined #lisp
even4void[m] has joined #lisp
liamz[m] has joined #lisp
sputny[m] has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
bitmapper has joined #lisp
kinope14 has quit [Remote host closed the connection]
kinope78 has joined #lisp
orivej has joined #lisp
<theseb_>
jackdaniel: wow...go looks interesting...a literal goto in lisp....i guess that makes the evaluator that much more complicated since it must label various positions and then be able to move the "instruction pointer" to it
<phoe>
better to copy one time too much than not enough
<phoe>
kinope:
kinope has quit [Client Quit]
kinope78 has quit [Remote host closed the connection]
kinope has joined #lisp
<kinope>
phoe: I'll keep that in mind.
<Bike>
theseb_: if you're writing a classic sort of evaluator you can use the tagbody forms themselves as "locations" by associating each tag with the list of subsequent forms. it is kind of complicated but not that complicated.
Christ0pher has quit [Ping timeout: 240 seconds]
bsd4me has quit [Ping timeout: 256 seconds]
Christ0pher has joined #lisp
<kinope>
I wanted to speed up that function by using nreverse instead of reverse. I'll just have to compute a bunch of my own fresh precedence-lists when I create the classes instead.
<beach>
The precedence list is not computed when the class is created.
<theseb_>
Bike: thanks ...good idea..i'm kind of bummed however that implementing a go (goto) requires evaluator tweaks...it removes from the elegance of the lisp core
<Bike>
i think i told you not to worry about elegance before
<Bike>
in any case, declaration processing will fuck you up as well
rgherdt has quit [Quit: Leaving]
<phoe>
Bike: they fuck people up only if one decides to implement them all, right?
<Bike>
no, it's annoying anyway
<phoe>
only SPECIAL is really mandatory for an implementation
<Bike>
like for let* you need to match special declarations to the variables for use in the nested lets or whatever you do
<phoe>
oooh, like that - yes, I see
<beach>
But I take it this is not going to be a Common Lisp implementation anyway, right?
Cymew has quit [Ping timeout: 256 seconds]
<theseb_>
Bike: i'm translating imperative code to lisp in case you hadn't guessed....just for fun i'm wondering if there is a way to implement a goto instead with lots of "if" statement....What I'm imagining is using if statements to "detect" goto requests and react properly
<Bike>
that sounds really inefficient.
<phoe>
theseb_: what sort of imperative code?
<theseb_>
Bike: in principle it "smells" right....because "if" itself is all about altering program flow!
<Bike>
if you want to do tagbody in the "elegant" way, rewrite it as tail calls.
tich has quit [Remote host closed the connection]
<theseb_>
phoe: for and while loops
epony has joined #lisp
<phoe>
and these use GOTO?
<theseb_>
phoe: i have the for and while macros...not i'm making code to allow breaking out of loops
<beach>
theseb_: But you are not translating it to Common Lisp are you?
<Josh_2>
afternoon
<theseb_>
phoe: break and continue will be *implemented* in lisp with some kind of goto hack
<beach>
Hello Josh_2.
<Josh_2>
How is everyone?
nicktick has quit [Remote host closed the connection]
<kinope>
Hi
<theseb_>
beach: i'm translating it to my little mini common-lisp-ish implementation i created
<phoe>
theseb_: you can implement C-like BREAK and CONTINUE with returning from Lisp blocks
<phoe>
if you have BLOCK and RETURN-FROM, that is
<beach>
theseb_: Yeah, that's what I though.
<beach>
thought
<beach>
theseb_: It is hard to give you advice since we don't know what the language is that your Lisp system implements.
<phoe>
(block break (loop ... do (block continue ...)))
<theseb_>
What is beautiful is that "if" (or "cond" if you prefer) is really the core fundamental flow control construct in lisp....seems cool to build off that if possible as a challenge
<phoe>
and then (return-from continue) or (return-from break)
<theseb_>
i'll have to think about it
<theseb_>
beach: thanks...i think i got enough already to go beat my head against the wall about this some more ;)
<phoe>
theseb_: it's the fundamental block of control everywhere, I don't think it's all that different in C or Java
nicktick has joined #lisp
<theseb_>
beach: Bike was the first to open my mind to the possibilities...he's helpful
<phoe>
except C/Java don't implement their iteration constructs as macros, so you can't see the nitty gritty details like you can by macroexpanding DO or DOLIST or LOOP
<theseb_>
well everyone is too of course
<theseb_>
love this channel
sjl_ has quit [Quit: WeeChat 2.3-dev]
sjl has joined #lisp
<theseb_>
phoe: you are right i don't know how C implements loops...however...i'm compiling to lisp so it wouldn't matter how they did it for my purposes
<phoe>
theseb_: and you aren't supposed to know
<theseb_>
phoe: actually i do know how they do it roughly speaking...C is compiled to assembly and assembly has jump instructions
<phoe>
"how C implements loops" is already compiler knowledge
<kinope>
Do common lisp's hash tables scale well, up to say 10 factorial number of elements?
<theseb_>
phoe: jump = goto
<theseb_>
boom
<phoe>
kinope: that's 3.7 million elements... I guess? try to benchmark and see for yourself
<beach>
kinope: As usual, it depends on the implementation. But with a reasonable implementation there hsould be no problem.
<phoe>
theseb_: Lisp's GOTO is much better, thankfully
<kinope>
never mind I just realised I don't need a brute force approach
<kinope>
okay thanks anyway
<phoe>
kinope: that's the real efficiency booster :D
stoneglass has joined #lisp
<phoe>
theseb_: the C GOTO doesn't unwind the stack, Lisp's GO does - that makes it more useful
<phoe>
in addition, C doesn't support non-local GOTO whereas Lisp does - that makes it even more useful
nicktick has quit [Ping timeout: 246 seconds]
<phoe>
that's the basis e.g. for the existence of the Lisp condition system
<beach>
Josh_2: How we are is pretty much off topic. But I can tell you that I worked part of the day on part 2 of my presentations for the online Lisp meeting entitled "Creating a Common Lisp implementation". And I am making progress on thinking these things through. Much of the stuff has been intuition on my part without any formal description.
<Josh_2>
There is a lisp meeting?
<theseb_>
phoe: lisp does things The Right Way
<phoe>
theseb_: this thing, yes, is very much The Right Way to do flow control
zigpaw has quit [Read error: Connection reset by peer]
<phoe>
there's other parts that are debatable, but I consider Lisp's GO/RETURN-FROM/THROW to be really really nice
zigpaw has joined #lisp
<phoe>
Josh_2: a cyclic Online Lisp Meeting, yes
<Josh_2>
a talk on creating a common lisp implementation sounds very interesting
<beach>
Josh_2: Part 1 has not been streamed yet.
<beach>
In a week, I think?
<phoe>
yes, on Monday
<easye>
Yes, such sustained talk is always interesting.
orivej has quit [Quit: No Ping reply in 180 seconds.]
<theseb_>
Ever heard of Hy? it is a lisp on top of the python VM just like clojure sits on top of the JVM....My first thought was "why?"....then i remembered lots of machine learning is done with python libraries....if all those people can do that with lisp-ish code...well looks to me like Hy just found its meal ticket to riches
<phoe>
it's Lisp-Flavored Python from what I've read
<beach>
theseb_: That sounds like it would win a prize for the slowest Lisp implementation around.
<phoe>
just like LFE is Lisp-Flavored Erlang
orivej has joined #lisp
<phoe>
so it wraps the underlying language in parentheses, that's all
<kinope>
goodnight
<beach>
'night kinope.
<beach>
theseb_: As I understand it, whenever you need performance in Python, you use modules written in C. Are you sure that it would not be better to take those modules and use them from Common Lisp directly?
ahungry has joined #lisp
<theseb_>
beach: well...
<theseb_>
beach: yes if *every* machine learning python library has C componenets you can use
<beach>
Debugging an application using 2 languages is bad enough. I can't imagine what it would be to debug one that uses 3 languages.
<theseb_>
beach: my guess is pandas, tensorflow, etc. may be written in C but only expose the python wrapper around it
<theseb_>
beach: well this fantasy only works if pandas, tensorflow etc.. are already mature and bulletproof in pythong
<theseb_>
beach: if zillions of people are doing machine learning those libraries should already be pretty battle hardened
kinope has quit [Remote host closed the connection]
<phoe>
seems like pandas contains non-trivial amount of Python code, so it's not that easy.
rippa has joined #lisp
<phoe>
like, plugging a foreign module using CFFI isn't enough.
<theseb_>
beach: Hy is useful as yet-another-language-layer only if lisp macros add dramatically more wonderfulness to machine language work
<theseb_>
phoe: yea...it probably only works if Hy's data structures are literally Python data structures...otherwise all those conversions will be error prone
<theseb_>
phoe: if that's what you're referring to
<p_l>
beach: unfortunately, some of the most popular ML libs are only really accessible through Python, or through *very* convoluted means through C++
<p_l>
Hy feels to me like much less Lisp than LFE, but I will have to see
<theseb_>
p l: what is LFE?
<phoe>
Lisp Flavored Erlang
<p_l>
Lisp-Flavoured Erlang. A Lisp on BEAM/OTP
<theseb_>
ah
notzmv has joined #lisp
EvW2 has joined #lisp
jonatack has joined #lisp
EvW has quit [Ping timeout: 244 seconds]
EvW2 is now known as EvW
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #lisp
jeosol has quit [Remote host closed the connection]
OpenZen has joined #lisp
heisig has quit [Ping timeout: 256 seconds]
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
rumbler31 has joined #lisp
deselby has quit [Quit: Idle for 30+ days]
theseb_ has quit [Quit: Leaving]
rumbler31 has quit [Ping timeout: 264 seconds]
v88m has joined #lisp
EvW has quit [Ping timeout: 240 seconds]
Aurora_v_kosmose has quit [Remote host closed the connection]
fountainpen[m] has quit [Quit: Idle for 30+ days]
Aurora_v_kosmose has joined #lisp
orivej has quit [Ping timeout: 258 seconds]
SebastianM has joined #lisp
orivej has joined #lisp
gaqwas has joined #lisp
gaqwas has joined #lisp
gaqwas has quit [Changing host]
SebastianM has quit [Quit: leaving]
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
efm has quit [Remote host closed the connection]
efm has joined #lisp
<dim>
one of the founders of Erlang is a fan of Lisp (Robert Virding), another one was a fan of Prolog (Joe Armstrong) and the main language got its syntax inspiration from Prolog, but then much later Robert did LFE anyway (he's now also doing luerl, a port of lua in Erlang)
ebrasca has joined #lisp
rgherdt has joined #lisp
knuckles has quit [Ping timeout: 244 seconds]
<p_l>
dim: early Erlang was essentially customized Prolog
<bitmapper>
i mean, it got the syntax
<bitmapper>
but not really anything else
<phoe>
early early Erlang was built on top of prolog; modern Erlang only has prologish syntax
<phoe>
and that, in turn, is solved by Elixir and LFE ;)
<p_l>
BEAM is still WAM-derived
<bitmapper>
i HIGHLY doubt that
<p_l>
bitmapper: derived, not a WAM implementation. But the jump between WAM and BEAM isn't that big. Big chunks of code are unrelated to bytecode execution and thus WAM-derived parts
contrapunctus has left #lisp ["Disconnected: closed"]
<bitmapper>
it's missing all the stuff for unification, no?
* phoe
slooooowly opens the door to #lispcafe
ebrasca has quit [Remote host closed the connection]
<p_l>
ahhh, WAM was mostly the old JAM
ebrasca has joined #lisp
gigetoo has quit [Ping timeout: 258 seconds]
joast has quit [Read error: Connection reset by peer]
orivej has quit [Quit: No Ping reply in 180 seconds.]
<bitmapper>
p_l: ?
cosimone has joined #lisp
<p_l>
bitmapper: pre-BEAM there was JAM
<p_l>
which was based on WAM
* p_l
mixed up few things
<p_l>
though BEAM internals still work on "reductions" :)
<phoe>
p_l: bitmapper: there's free pizza in #lispcafe for everyone who discusses Erlang and Prolog abstract machines!
<bitmapper>
:p
<p_l>
we both know there isn't
oxum has quit [Remote host closed the connection]
* p_l
got old :|
<bitmapper>
god i'd love some free pizza rn
orivej has joined #lisp
<phoe>
p_l: you need to believe
<p_l>
phoe: I just caught myself going "in the good old days"
<p_l>
where the old days are something I actually participated in
<phoe>
p_l: congratulations, you have officially become a Lisp wizard
<p_l>
it's time to be taken behind the barn and get put to pasture
vhost- has joined #lisp
vhost- has joined #lisp
vhost- has quit [Changing host]
EvW has joined #lisp
gigetoo has joined #lisp
Christ0pher has quit [Ping timeout: 260 seconds]
<Krystof>
that sounds restful
Christ0pher has joined #lisp
funnel has quit [Ping timeout: 258 seconds]
funnel has joined #lisp
nikkal has joined #lisp
heisig has joined #lisp
heisig has quit [Client Quit]
<p_l>
when you hear "your vacation request might be handled in October", the response "it will be spent 6 feet under" is not fully sarcastic
rpg has joined #lisp
oxum has joined #lisp
EvW1 has joined #lisp
EvW has quit [Ping timeout: 260 seconds]
EvW1 is now known as EvW
shangul has quit [Ping timeout: 264 seconds]
kaftejiman has quit [Remote host closed the connection]
xrash has quit [Read error: Connection reset by peer]
xrash has joined #lisp
EvW has quit [Quit: EvW]
toorevitimirp has quit [Ping timeout: 240 seconds]
renzhi has quit [Ping timeout: 258 seconds]
joast has joined #lisp
toorevitimirp has joined #lisp
knuckles has joined #lisp
X-Scale` has joined #lisp
X-Scale has quit [Ping timeout: 240 seconds]
X-Scale` is now known as X-Scale
dominic34 has quit [Ping timeout: 240 seconds]
Lycurgus has joined #lisp
hhdave has quit [Quit: hhdave]
orivej has quit [Quit: No Ping reply in 180 seconds.]
oxum has quit [Remote host closed the connection]
orivej has joined #lisp
Lycurgus has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 246 seconds]
LdBeth has quit [Quit: Idle for 30+ days]
orivej has joined #lisp
sputny[m] has left #lisp ["Kicked by @appservice-irc:matrix.org : Idle for 30+ days"]
Sauvin has quit [Remote host closed the connection]
madage has quit [Remote host closed the connection]
cosimone has quit [Quit: Quit.]
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
madage has joined #lisp
Christ0pher has quit [Ping timeout: 240 seconds]
Christ0pher has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
even4void has joined #lisp
even4void has quit [Remote host closed the connection]
gaqwas has quit [Remote host closed the connection]
vhost- has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 256 seconds]
vhost- has joined #lisp
vhost- has quit [Changing host]
vhost- has joined #lisp
orivej has joined #lisp
nikkal has quit [Ping timeout: 256 seconds]
rumbler31 has joined #lisp
userone has joined #lisp
EvW has joined #lisp
oxum has joined #lisp
dmiles has quit [Ping timeout: 240 seconds]
cosimone has joined #lisp
v3ga has quit [Ping timeout: 260 seconds]
efm has quit [Ping timeout: 240 seconds]
v3ga has joined #lisp
rumbler31 has quit [Remote host closed the connection]
dmiles has joined #lisp
rumbler31 has joined #lisp
rumbler31 has quit [Remote host closed the connection]
wsinatra has quit [Quit: WeeChat 2.8]
oxum has quit [Ping timeout: 265 seconds]
hhdave has joined #lisp
<sveit>
hello, i was wondering if anybody knew whether there was a way to treat a pointer to memory as an array in SBCL? the inverse (array as pointer) is possible CFFI-SYS:WITH-POINTER-TO-VECTOR-DATA (which internally calls sb-sys:with-pinned-objects)
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #lisp
<phoe>
sveit: AFAIK it's impossible.
<phoe>
AFAOL otmostly since Lisp arrays are required to have headers and must follow some memory alignment rules
<phoe>
AFAIK it's mostly because*
<phoe>
but #sbcl might provide more information
karayan has quit [Remote host closed the connection]
<sveit>
phoe: thanks, i'll try there. why would memory alignment be an issue, I guess you mean relative to the header?
h11 has quit [Read error: Connection reset by peer]
h11 has joined #lisp
Christ0pher has quit [Ping timeout: 246 seconds]
Christ0pher has joined #lisp
<Harag>
out of curiosity has anybody ever written a program to scan all the code in quicklisp to see how much of the build in stuff in lisp is really used?
<Xach>
the built-in stuff like what?
<Xach>
(nobody has done that, that i know of)
<Harag>
then 250 odd operators/functions/or whatever they are called
<Xach>
???
<Xach>
I don't get it, sorry.
shka_ has quit [Ping timeout: 260 seconds]
<Harag>
cons,conc,format etc
<phoe>
I assume you could download all of the sources, read them, and count all of the CL symbols that are used in there
<phoe>
Eclector could possibly be bent to do that; I saw someone post some related code not too long ago
<Harag>
any bets on the % usage?
<phoe>
I can bet $2 that for CL:STANDARD it's LEAST-POSITIVE-SINGLE-FLOAT percent
<phoe>
other than that, dunno, IF and PROGN and COND and what not are going to score high for obvious reasons
<phoe>
there'll be a fair share of DEFUN and DEFMACRO and DEFVAR, fewer than IFs though; a single DEFUN can contain multiple IFs and CONDs and such
<Harag>
I am more interested in how much of it is used and not what is used most
<phoe>
100% of it is used
<phoe>
there are certainly systems that, in some way, utilize all of the standard CL symbols.
<phoe>
which in turn implies that there's no CL symbol that remains unused
jdz has quit [Ping timeout: 260 seconds]
jdz has joined #lisp
ggole has quit [Quit: Leaving]
cosimone has quit [Remote host closed the connection]
<Harag>
would quicklisp repository be representative of enough of such use?
cosimone has joined #lisp
<phoe>
what do you mean, "representative" and "enough"?
<phoe>
you can define some percentages, perform your own measurements, and check if the results are "enough" for your definition of "representative"
<Xach>
Harag: quicklisp is a portion of the CL code in use
shka_ has joined #lisp
<Xach>
There is a lot of code that is not public for various reasons. There is a lot of public code that is not part of Quicklisp for various reasons.
<Xach>
How much of each is very hard to say with any certainty
<Xach>
Something that irritates me is when a project changes in a breaking way and then minimizes the impact by saying something like "i sent patches to every project in Quicklisp", as though those are the only ones that matter
Christ0pher has quit [Ping timeout: 264 seconds]
<phoe>
Xach: these are the only ones that are publicly accessible though, unless you somehow get a list of non-public projects that list their dependencies
Christ0pher has joined #lisp
<phoe>
you can't try to fix something you aren't aware of
<phoe>
but anyway, the original question was about QL, so I can certainly say that the Quicklisp repository will be representative of the Quicklisp repository
<Xach>
phoe: For rationalizing a breaking change, paying attention to only Quicklisp is irritating to me.
<phoe>
oh, for *rationalizing*
<phoe>
yes, I understand that
oxum has joined #lisp
cosimone has quit [Quit: Quit.]
<Xach>
The same actions put in proper context are not as irritating to me
<phoe>
we need to get some implementation to extend the standard, so (rationalize "remove a few random public accessors from the API package") ;=> "I updated all the Quicklisp projects though!!1"