<mpi>
i was just looking at github and i couldn’t find much
<jackdaniel>
mpi: I have a suspiction that if you had measured percentage of finished vs unfinished projects in common lisp vs <some other programming language>, then it would be just fine
<jackdaniel>
there are many useful libraries, there is awesome-cl list that gives some highlight
<jackdaniel>
there are less common lisp programmers than (say) python programmers, so the ecosystem is proportionally smaller I guess
<jackdaniel>
but there is plenty of available things to play with
<jackdaniel>
s/is/are/
<mpi>
damn there’s heaps there
mpi has quit [Remote host closed the connection]
mpi has joined #commonlisp
<mpi>
i was looking at lisp os but that had no executable
<jackdaniel>
lisp os?
<mpi>
yeah it’s some operating system
mpi has quit [Quit: Leaving]
<jackdaniel>
from things that may be started on the computer there are OpenGenera and Mezzano;
nij_ has joined #commonlisp
nij_ is now known as nij-
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ has joined #commonlisp
nij- has joined #commonlisp
<nij_>
Hi! I'm rewriting my python code in CL just as an exercise. But what I got is not optimal.. wonder if someone can provide some advice. https://bpa.st/O3MA
<nij_>
As you can see, my lisp code is: + Slot accessing is less concise. + 2x lines in lisp. + Dictionary creation is verbose.
<Josh_2>
oof
<nij_>
Could there be ways that are more native in lisp, which fixes the problem?
<jackdaniel>
what this code is meant to do?
<Shinmera>
instead of dotimes setf and let, use loop for x0 = ... and a finally clause.
<Josh_2>
You could write a macrolet for accessing your hash tables
<nij->
content(frame) gets the content from "frame", which is a py dictionary.
<nij->
and I want to extract some slots out (whose keys are "x0" "y0"..)
<Josh_2>
You could use an object instead of a hash table
<nij->
Josh_2 you mean I can defstruct or defclass before hand, making the slot accessor shorter?
<Josh_2>
Well you can use a macro to make accessing whatever "shorter"
<jackdaniel>
you seem to bind the same thing to x0 and x1 (etc)
tyson2 has joined #commonlisp
<nij->
Shinmera could you say a bit more?
<Josh_2>
jackdaniel: x0 and x1 are pointi and pointf respectively.
<Shinmera>
saying more would be writing the code for you
<jackdaniel>
Josh_2: right you are, thanks
<nij->
Shinmera: oh no no need.. lemme think a bit more.
aartaka has quit [Ping timeout: 268 seconds]
aartaka has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
mon_aaraj has joined #commonlisp
Harag has joined #commonlisp
jmdaemon has quit [Ping timeout: 244 seconds]
taiju has joined #commonlisp
<Harag>
Would any of you lispers be able and willing to speak to a non lisper about your experience writing commercial software in lisp (for an hour). We are more than willing to pay for your time. A potential investor of ours wants to hear other peoples opinions not just mine and they dont have anybody in their networks to speak to.
<Shinmera>
Depends a little on how much of an idea about programming in general this investor has.
<Shinmera>
I'm not interested in trying to navigate the maze of explaining to managers why tech is good
<Harag>
No this is a techie, but in the non lisp world.
<jackdaniel>
Harag: sure, you may drop me a line with details
<Shinmera>
Ok. In that case, sure, why not.
<Shinmera>
email me at shinmera@tymoon.eu
<Harag>
Thank you very much. Will contact you both and sort out the details the more people he can speak to the better.
<jeosol>
@jackdaniel and Shinmera are good reps. While there may not be many running CL say compared to Python, there are those that use it in production and the numbers are increasing
<Harag>
jeosol: I know that, you know that but the world does not. He has seen what we have accomplished over 10 years and he is amazed but still hesitant because he cant verify it with his personal network.
<pjb>
siscog software is for transport management, with a part about crew management (scheduling, management of staff).
<jeosol>
Harag: For a varied type of application of CL to projecs. I used it to develop a computational intensive application (3D fluid simulation, large-scale optimization, and some small ML - app, clustering, ..) using SBCL.
<jeosol>
I think the projects and application are varied. I am sure there is a web-page somewhere that groups the projects and the categories. There are good links provided by pjb already.
<jeosol>
Harag: Franz, site already provided by pjb above is a vendor in the USA. I know of a company that worked with them building projects for US defense and other related industries
<Josh_2>
nij-: did you figure it out?
<pjb>
Harag: Here is a short list of youtube video about lisp enterprises: https://termbin.com/1imb (there is a lot more video about technical aspects, than enterprise ones).
<pjb>
A Conversation with Paul Graham (some mention of Viaweb).
avocadoist has joined #commonlisp
notzmv has joined #commonlisp
treflip has joined #commonlisp
<flip214>
Does anyone know whether the site for ELS23 is already determined, as proposed at ELS22?
livoreno has joined #commonlisp
contrapunctus has joined #commonlisp
<Harag>
Thank you again everbody and have a great afternoon.
szkl has quit [Quit: Connection closed for inactivity]
Harag has quit [Ping timeout: 276 seconds]
deadmarshal has quit [Remote host closed the connection]
dirtcastle has quit [Remote host closed the connection]
mon_aaraj has quit [Ping timeout: 268 seconds]
mon_aaraj has joined #commonlisp
Th30n has quit [Quit: WeeChat 3.5]
thuna` has joined #commonlisp
didi has joined #commonlisp
<didi>
I know (eq 42 42) can be false, but can (let ((x 42)) (eq x x)) be false? Or maybe can (let ((x 42) (h (make-hash-table))) (setf (getf x h) x) (eq (getf x h) x)) be false?
<jackdaniel>
1) indeed can be false, 2) this will neve be false, 3) this may be false (putting aside that you've confused plist with a hash table)
<didi>
jackdaniel: oops
<didi>
Thank you, jackdaniel.
nij_ has left #commonlisp [Using Circe, the loveliest of all IRC clients]
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
<pjb>
(let ((x 42)) (eq x x)) can be false!
treflip has quit [Quit: Quit]
<pjb>
and the others too, of course.
<didi>
Ugh. Oh, well.
<pjb>
check clhs eq ; there are examples.
<didi>
Indeed. But only with 5. I'm good with 42.
<didi>
Thank you, pjb.
<pjb>
The point is that since numbers and characters are immutable, the implementation is allowed to copy them at any time, such as when passing them as parameter. Then even (eq #1=42 #1#) will get two copies of 42, and say that they don't have the same address.
<pjb>
eg. in bocl, you will find that (eq 255 255) -> t but (eq 256 256) -> nil
deadmarshal has joined #commonlisp
<didi>
I can understand with (eq 42 42), but (let ((x 42)) (eq x x)) is surprising to me.
deadmarshal has quit [Remote host closed the connection]
<beach>
Did you mean GETF?
<beach>
Oh, sorry, remarked on already.
* Josh_2
rereads the clhs on EQ
<Josh_2>
lots of => true OR => false
<beach>
didi: I can't think of an implementation in which that last example returns false, because it would be a very strange implementation decision then. But that's beside the point. The standard allows for it to return false.
<jackdaniel>
beach: if x is an immediate object, then it would be cheaper to store it directly in the car instead of boxing it - do I miss something?
cage has joined #commonlisp
<beach>
jackdaniel: I am lost: "in the car"? I was referring to (eq x x).
<jackdaniel>
well, that was the second example, the last example was third
<jackdaniel>
but now I see what you've meant
<beach>
jackdaniel: The last thing didi wrote was: I can understand with (eq 42 42), but (let ((x 42)) (eq x x)) is surprising to me.
<beach>
But even so, as pjb said, the implementation is allowed to copy the object when it becomes a function argument, such as to GETF or GETHASH.
<jackdaniel>
the original question had three examples, and these two were among them. either way I understand what you've meant
<beach>
OK, good.
taiju has joined #commonlisp
yauhsien has joined #commonlisp
mon_aaraj has quit [Read error: Connection reset by peer]
morganw has joined #commonlisp
mon_aaraj has joined #commonlisp
yauhsien has quit [Ping timeout: 268 seconds]
<Shinmera>
flip214: Nothing on the mailing list so far.
<Shinmera>
and I can't do it for Zürich. I'm super busy in exactly the months that would be critical for the organisation for it.
<Shinmera>
So best I can do for ELS/Zürich would be 2024.
<beach>
There were three volunteers, two of which are reasonable. So it should just be a matter of making a choice.
<Shinmera>
What made one unreasonable?
<beach>
It is outside Europe.
<Shinmera>
ah
<Shinmera>
Time to revive the ILC? :)
<beach>
Heh!
deadmarshal has joined #commonlisp
azimut has joined #commonlisp
dirtcastle has joined #commonlisp
mon_aaraj has quit [Ping timeout: 264 seconds]
<pjb>
ELS could become Earth Lisp Symposium. Soon there may be a MLS!
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
szkl has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 264 seconds]
jack_rabbit has joined #commonlisp
knusbaum has quit [Ping timeout: 244 seconds]
nij- has joined #commonlisp
<didi>
Heh, #'eq be crazy. (let ((x 42)) (eq x x)) might be false as (eq "foo" "foo"), but (let ((x "foo")) (eq x x)) is true.
<nij->
Weird.. I happen to have entered a mild infinite loop, which seems to "detach" from the repl. Now I can see it spitting out messages into my emacs buffer, but I can also do something else. What's a nice way to kill it?
<nij->
(I'm using sbcl and sly in emacs.)
<didi>
I don't think I have enough of a grasp of #'eq to use it with 100% certainty.
<White_Flame>
(eq x x) will never be false in a working CL
<morganw>
nij-: if you press the , key in the repl buffer you'll get restart and quit options for the lisp process
<White_Flame>
oh wait, 42, eql, rgiht
<White_Flame>
oh wait again, no I'm right :)
<nij->
morganw I have my own keybind. Do you know what's the emacs function it calls?
<didi>
White_Flame: I wonder if there is a devil's implementation out there where it will, tho I pretty much write to SBCL.
<White_Flame>
it wouldn't conform
<didi>
White_Flame: The hyperspec says it may.
<nij->
morganw Ah I see. I've restarted lisp. But that blows away the stack :(
<White_Flame>
didi: where?
<beach>
didi: I was seriously thinking of making my version of BOCL so that it exploits all weird things the standard allows.
<didi>
White_Flame: EQ's page.
<White_Flame>
(eq 42 42) might be false, but (eq x x) will never be
<didi>
White_Flame: The examples say otherwise.
<jackdaniel>
White_Flame: if x is a lexical variable, it may be first replaced with constants
<jackdaniel>
then it boils down to (eq 42 42)
* didi
shuns beach
<morganw>
nij-: I think C-c C-c in the reply will generate a break and then you could return to the top level from there, but I've not experimented with that much myself
<morganw>
*in the repl
<White_Flame>
hmm, yeah I see it now
<nij->
That did terminate the later infinite loop I had.
<White_Flame>
that's pretty wacky
<nij->
But the "stale" infinite loop was an old one that has kept running, CcCc didn't kill it :(
<jackdaniel>
it is called infinite for a reason, it doesn't stop!
<nij->
jackdaniel that's why i want to kill it manually :D
<jackdaniel>
watch out for nasal demons ,)
<didi>
Specially at EQ's cave.
<didi>
jackdaniel: Is it only on lexical variables? Say, can (let ((h (make-hash-table))) (setf (gethash 42 h) 42) (eq (gethash 42 h) (gethash 42 h))) be false?
<White_Flame>
you'd need (make-hash-table :test #'eq)
<didi>
White_Flame: I don't think so.
<White_Flame>
default test is EQL
<didi>
White_Flame: Indeed.
<White_Flame>
so the 2 different 42s will be tested with EQL, which should numerically compare true
<jackdaniel>
didi: no, what I mean is that lexical variables may be eliminated by the compiler
<didi>
White_Flame: Indeed. I'm interested in the value of the key.
<White_Flame>
and the EQL-compatible hashing should has those to the same bucket
<jackdaniel>
(it is called constant propagation)
<didi>
jackdaniel: oic
<didi>
White_Flame: I'm wondering if the 42 can be changed somehow before calling eq.
<White_Flame>
not in any standard way afaik
<didi>
White_Flame: ic
<White_Flame>
but also EQ is not being called in the (make-hash-table) default case
<jackdaniel>
(setf 42 43) sounds like a brilliant idea
<jackdaniel>
we need to revise the standard, quick
<White_Flame>
take it easy, fortran
<drakonis>
new spec when
orestarod has joined #commonlisp
<didi>
Eventually, (eq (gethash 42 h) (gethash 42 h)) will be (eq 42 42) if I think using the substitution model.
jeosol has quit [Quit: Client closed]
<White_Flame>
*constant* substitution
<White_Flame>
however, what's the value for the key 42?
<didi>
42.
<pjb>
didi: count the 42s!!!
<White_Flame>
I seriously doubt that would qualify for constant propagation
<didi>
White_Flame: *shrug*
<White_Flame>
but yes,if the value behidn the key is a number, there's still no guarantee that it will be EQ
<didi>
Than we are back.
<didi>
Then*
<White_Flame>
not because of constant propagation, but because the implementation is free to make copies
<pjb>
Assuming (setf (gethash 42 h) 42), you already have 4 42s here, and internally gethash will probably make at least 2 more copies. so 6 42s.
<didi>
pjb: oic
<pjb>
Then (gethash 42 h) -> 42 will produce at least 3 more copies.
<didi>
You are getting me anxiety.
<pjb>
twice. Then eq will get two copies more. so 6+6+2 = 14 copies minimum.
<didi>
!
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
<pjb>
(there's a reason it's not the go-to implementation strategy).
<pjb>
But assume eg. an implementation on JVM. It could easily make such copies: int value=42; new Integer(value);
<Bike>
the rules are pretty simple. eq on numbers is never guaranteed to be true. whether they're in lexical variables or hash tables or whatever doesn't matter. practically speaking, an implementation is probably never going to copy fixnums, or at least do its damnedest to avoid wasting time by doing so, but to you the programmer that's probably not relevant. just don't use eq on numbers.
<didi>
Bike: Thank you.
<Bike>
your implementation is hopefully smart enough to reduce eql on numbers to faster operations if sensible in the context of that implementation, which can know its own finicky rules
<White_Flame>
copied fixnums in modern implementations are EQ anyway
<White_Flame>
since they're not boxed
jeosol has joined #commonlisp
<didi>
I naively though once I got hold of a value, I could toss it around and it would always be EQ. TIL
<White_Flame>
one of those things that will work until it doesn't
* didi
nods
<White_Flame>
(and was never guaranteed in the first place)
kaskal has joined #commonlisp
<Bike>
should always be eql, though.
<didi>
Hum. Interesting.
<didi>
Very good lessons today. Thank you.
<Bike>
practically speaking, eq is like this for the same of bignums and doubles and stuff. your implementation probably boxes double floats, i.e. puts them in a heap structure. but when you store doubles in a specialized array there's no need for that, and the doubles are stored unboxed. Then when you take a double out with aref the implementation may box it up again - giving you a _new_, non-eq heap object
<Bike>
for the same double.
<Bike>
kind of hard to grasp these things without looking into implementation guts some, probably
<didi>
Bike: Nice explanation.
<pjb>
This is why you should ignore CL:EQ and always use at least CL:EQL. Only CL:GET, CL:GETF, CL:GET-PROPERTIES use CL:EQ. This is why you cannot use numbers or characters as indicator in the p-lists.
taiju has quit [Quit: I'll]
<didi>
pjb: Understood.
* didi
uses keywords in p-lists by the way
<pjb>
The best choice.
<pjb>
or interned symbols for symbol-plist
<White_Flame>
or use = instead of EQL for numbers, depending if you want 0 and 0.0 to be equal
cage has quit [Ping timeout: 272 seconds]
rogersm has joined #commonlisp
aartaka has quit [Ping timeout: 272 seconds]
aartaka has joined #commonlisp
mon_aaraj has joined #commonlisp
pve has joined #commonlisp
triffid has quit [Ping timeout: 268 seconds]
jolby has joined #commonlisp
triffid has joined #commonlisp
molson has joined #commonlisp
waleee has quit [Ping timeout: 255 seconds]
mon_aaraj has quit [Read error: Connection reset by peer]
rainthree has joined #commonlisp
Dynom has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
rainthree has quit [Quit: Leaving]
grumpybear has quit [Quit: Konversation terminated!]
cage has joined #commonlisp
tyson2 has joined #commonlisp
didi has quit [Remote host closed the connection]
tyson2 has quit [Ping timeout: 240 seconds]
akoana has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
molson has quit [Remote host closed the connection]
jmdaemon has joined #commonlisp
tyson2 has joined #commonlisp
jolby has quit [Quit: Client closed]
even4void[m] has joined #commonlisp
shka has quit [Ping timeout: 244 seconds]
Dynom has quit [Quit: WeeChat 3.5]
jolby has joined #commonlisp
causal has joined #commonlisp
pve has quit [Quit: leaving]
even4void[m] has left #commonlisp [#commonlisp]
jeosol has quit [Quit: Client closed]
Inline has quit [Remote host closed the connection]
<jcowan>
White_Flame: Are you sure about that? I think (eq x x) can be false
<jcowan>
if x is a number
<jcowan>
An implementation is permitted to make ``copies'' of characters and numbers at any time. The effect is that Common Lisp makes no guarantee that eq is true even when both its arguments are ``the same thing'' if that thing is a character or number.
<jcowan>
In Scheme, (let ((x car)) (eq? x x)) can definitely be false if each "x" is expanded to "" "(lambda (y) (#primittive#car y))" by the compiler
<jcowan>
I see, yes. Moral: eql is the identity predicate, eq is an implementation hack which you should only use if you can prove that eql is too slow
Oladon has joined #commonlisp
kaskal has joined #commonlisp
orestarod has quit [Ping timeout: 260 seconds]
contrapunctus has left #commonlisp [#commonlisp]
X-Scale` has joined #commonlisp
X-Scale has quit [Ping timeout: 268 seconds]
jolby has quit [Quit: Client closed]
X-Scale` is now known as X-Scale
morganw has quit [Remote host closed the connection]