gxt__ has quit [Remote host closed the connection]
azimut has quit [Remote host closed the connection]
anticomputer has quit [Remote host closed the connection]
azimut has joined #commonlisp
gxt__ has joined #commonlisp
anticomputer has joined #commonlisp
tankrim has quit [Remote host closed the connection]
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
jeosol has joined #commonlisp
jeosol has quit [Quit: Client closed]
Roy has joined #commonlisp
<Roy>
I was over on #programming and discussing what we on #programming talk about and said how I hate OO, but like CLOS and multi-dispatch.
Brucio-61 has quit [Ping timeout: 244 seconds]
bilegeek has joined #commonlisp
<pjb>
Roy: seems reasonable.
_paul0 has quit [Quit: Leaving]
<Roy>
they don't get how single-dispatch limits you
waleee has quit [Ping timeout: 240 seconds]
cjb has joined #commonlisp
livoreno has joined #commonlisp
<nij->
People have also been arguing that trigonometry doesn't help when you buy groceries, therefore it's useless.
tyson2 has quit [Remote host closed the connection]
saura has joined #commonlisp
saura has quit [Ping timeout: 256 seconds]
atgreen has quit [Ping timeout: 276 seconds]
cjb has quit [Quit: rcirc on GNU Emacs 29.0.50]
atgreen has joined #commonlisp
azimut has quit [Ping timeout: 268 seconds]
<nij->
beach > Is it true that any language that has throw/catch + dynamic variables can implement a conditions system as powerful as Lisp's?
<nij->
(easily)
<beach>
And macros for the abstractions.
<beach>
Then yes.
<Bike>
you'd also need first class functions.
<beach>
Ah, yes, maybe so.
<Bike>
at least to implement it in the normal lisp way.
<nij->
Why do we need first class functions?
<Bike>
the way the condition system works, handlers are executed during signaling, but signal can just return normally.
<beach>
nij-: The power of the condition system is not due to any complicated implementation technique. It comes from implementing the right abstractions. Otherwise, the condition system is quite simple.
<Bike>
so you need to be able to run code in its original context, like its lexical environment.
<Bike>
this is really annoying to do without something like closures.
<Bike>
it is possible, sorta. i think the windows C++ exception handling do... something like it. "funclets". i haven't looked into it much.
<Bike>
but it pretty much amounts to closures. though you only need dynamic extent for em
<Bike>
the resumptive quality is critical to how lisp conditions work and it's not common in other languages. if you don't allow handlers to resume, your implementation can just unconditionally jump up the stack frames and there ya go.
gxt__ has quit [Remote host closed the connection]
gxt__ has joined #commonlisp
<beach>
nij-: Does that answer your question?
<nij->
Your did. Bike's answer was too hard.. to understand.
<nij->
But Bike was answering "nij- > Why do we need first class functions?" which might be hard to answer though..
<beach>
I had to read it several times myself. :)
<nij->
For noobs sometimes it's better of narrowing down the question.
<nij->
But I'm aware it's not always an easy task.. I often found it hard to explain something I know well too :(
atgreen has quit [Ping timeout: 276 seconds]
<beach>
The point, though, is that when you design a language, you should include the low-level primitives that allow you to build powerful, yet simple, high-level mechanisms.
<beach>
Unfortunately, most language designers don't seem to do that.
<beach>
Then, I suspect most languages are designed by people with insufficient knowledge.
gxt__ has quit [Remote host closed the connection]
gxt__ has joined #commonlisp
<Bike>
the basic nature of exceptions or conditions or whatever is that you have a function F call a function G, and G transfers control to F in some way other than returning normally.
<Bike>
in most languages that's one way: G does an abnormal exit and you're back in a "handler" in F. but in lisp the handler can decide G is actually doing fine, and control can resume in G somewhere.
<Bike>
because of this, it has to be possible for the handler code to run without permanently exiting G.
<Bike>
the simple way to do this, which implementations generally do, is to have the handler be a first class function that the signaling code in G just calls normally.
<Bike>
lisp implementations*
<Bike>
dunno if that makes any more sense. i'm going to sleep now. gnight.
<nij->
It makes more sense! Thank you, Bike. However, why can't the handler be a non-first class function? After all, the signaling code G can call a non-first-class function.
<hayley>
In what sense would the handler not be a first-class function?
<beach>
nij-: If it is not a first-class function, it would have to be invoked by name, like (handler ...), but the name is not known statically.
<beach>
nij-: The handler must be looked up in the dynamic environment, i.e., the call stack. And then, it must be possible to manipulated like any other value, like (funcall (find-handler ...) ...) which requires a first-class function.
<beach>
nij-: Maybe you don't know what "first-class" means?
<beach>
nij-: An entity that is first class is one that can be the value of a variable, can be passed as the argument to a function, and can be returned as the value of a function call.
igemnace has joined #commonlisp
<nij->
That's what I understand. Ah I see.. otherwise you need to refer by name which is not so convenient.
<nij->
foo should be add3.. and I'm not sure if 'store-value is correct too.
jack_rabbit has joined #commonlisp
knusbaum has quit [Ping timeout: 244 seconds]
hineios8 has joined #commonlisp
hineios has quit [Ping timeout: 244 seconds]
hineios8 is now known as hineios
bilegeek has quit [Quit: Leaving]
knusbaum has joined #commonlisp
jack_rabbit has quit [Ping timeout: 244 seconds]
<beach>
nij-: The examples have several problems. They are not normative, so I suspect they were not as well scrutinized as the normative parts.
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
jeosol has joined #commonlisp
yauhsien has quit [Ping timeout: 276 seconds]
yauhsien has joined #commonlisp
igemnace has quit [Quit: WeeChat 3.5]
livoreno has quit [Remote host closed the connection]
livoreno has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
knusbaum has quit [Ping timeout: 244 seconds]
knusbaum has joined #commonlisp
irc_user has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
MajorBiscuit has joined #commonlisp
shka has joined #commonlisp
jack_rabbit has joined #commonlisp
son0p has quit [Ping timeout: 276 seconds]
knusbaum has quit [Ping timeout: 244 seconds]
theothornhill has quit [Ping timeout: 255 seconds]
jasom has quit [Ping timeout: 255 seconds]
srhm has quit [Read error: Connection reset by peer]
Schnouki has quit [Read error: Connection reset by peer]
ggb_ has quit [Read error: Connection reset by peer]
mcoll has quit [Read error: Connection reset by peer]
alethkit has quit [Read error: Connection reset by peer]
nytpu has quit [Read error: Connection reset by peer]
whereiseveryone_ has quit [Read error: Connection reset by peer]
chiheisen has quit [Write error: Connection reset by peer]
sm2n has quit [Read error: Connection reset by peer]
axvr has quit [Read error: Connection reset by peer]
\f has quit [Read error: Connection reset by peer]
jasom has joined #commonlisp
Schnouki has joined #commonlisp
whereiseveryone has joined #commonlisp
ggb has joined #commonlisp
srhm has joined #commonlisp
theothornhill has joined #commonlisp
mcoll has joined #commonlisp
axvr has joined #commonlisp
nytpu has joined #commonlisp
chiheisen has joined #commonlisp
sm2n has joined #commonlisp
\f has joined #commonlisp
alethkit has joined #commonlisp
payphone has quit [Ping timeout: 255 seconds]
payphone has joined #commonlisp
ttree has quit [Ping timeout: 244 seconds]
Cymew has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 255 seconds]
mon_aaraj has joined #commonlisp
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 240 seconds]
pranavats has joined #commonlisp
jmercouris has quit [Read error: Connection reset by peer]
griffinmb has quit [Read error: Connection reset by peer]
iisi has quit [Ping timeout: 244 seconds]
jmercouris has joined #commonlisp
griffinmb has joined #commonlisp
iisi has joined #commonlisp
drmeister has quit [Read error: Connection reset by peer]
conjunctive_ has quit [Read error: Connection reset by peer]
splittist has quit [Read error: Connection reset by peer]
drmeister has joined #commonlisp
alanz has quit [Read error: Connection reset by peer]
iquites has quit [Read error: Connection reset by peer]
conjunctive_ has joined #commonlisp
splittist has joined #commonlisp
victor has quit [Read error: Connection reset by peer]
iquites has joined #commonlisp
alanz has joined #commonlisp
victor has joined #commonlisp
mon_aaraj has quit [Ping timeout: 256 seconds]
attila_lendvai has joined #commonlisp
MajorBiscuit has joined #commonlisp
mon_aaraj has joined #commonlisp
rodicm has joined #commonlisp
Brucio-61 has joined #commonlisp
mrcom has quit [Remote host closed the connection]
irc_user has quit [Quit: Connection closed for inactivity]
mrcom has joined #commonlisp
<Shinmera>
jackdaniel: Does ECL have any functions to convert floats to/from their bit/integer versions? Asking since float-features lacks support for those conversion functions under ECL at the moment.
pve has joined #commonlisp
son0p has joined #commonlisp
scymtym has joined #commonlisp
mon_aaraj has quit [Ping timeout: 264 seconds]
<rendar>
i'm creating a little lisp interpreter in python, which supports coroutines and async computation. I was thinking, if i have a function which needs the results of 2 websites, e.g. `(my_fn (get_url a.com) (get_url b.com))` i could run those 2 get_urls function concurrently, in the underlying python.. is this concurrently running a thing in modern lisp?
mon_aaraj has joined #commonlisp
<hayley>
Something quite similar is Dijkstra's PARBEGIN construct.
<rendar>
so its just some academic/theoretical thing
White_Flame has quit [Remote host closed the connection]
<hayley>
The lparallel library would let you do something like (parallel-let ((x (get-url "a.com")) (y (get-url "b.com"))) (use x y)) which is longer, but makes explicit what runs concurrently. _Could_ you run get-url concurrently in your language semantics?
<rendar>
yes, i could, and that's what i want to do
White_Flame has joined #commonlisp
<rendar>
now, i think i have to explicitly differentiate the function that can return immediately, and the functions that must be awaited, such as get_url
<hayley>
What happens with shared state?
<rendar>
hayley, no shared state at all
<rendar>
every get_url invocation will get a new Environment
<hayley>
Perhaps not for get-url specifically, but can't arguments to a function be mutable, and you'd thus have shared state if I did e.g. (let ((x (make-something))) (concurrently (f x) (f x)))?
<rendar>
hm that's possible yes
<rendar>
but consider that async code will always run in one single thread
<hayley>
I/O would also be state, but state that resides outside your implementation.
<hayley>
Is your async code concurrent or not?
<rendar>
it is concurrent, but not parallel
<rendar>
it will fire 2 http requests, and will process one when one finished, but that's all happening into one thread, those are coroutines..
<hayley>
I use Leslie Lamport's definition of "concurrency", where two things happen "concurrently" if one does not strictly occur before or after the other. If one is only processed when the other finished, those tasks do not appear concurrent.
<rendar>
you should differentiate concurrency with parallel
<hayley>
Why?
<rendar>
because that's how coroutines work..!
<rendar>
they are NOT threads, there is no parallelism
<rendar>
just work is fired concurrently, and results are grasped concurrently, but everything is happening into 1 single thread
<hayley>
The issue with shared state is one involving concurrency, not if the tasks actually run in parallel or not.
<hayley>
(The latter, still, is useful on multi-core computers i.e. most of them, but this is an interpreter written in Python, so, yeah.)
<rendar>
hayley, well, that 'x' in your example of before could be read/write before/after of one of the get_url() depending on the website time response, for instance
<rendar>
so you don't know which get_url() will read/write 'x' before or after
<rendar>
independently of the threads/parallelism
<rendar>
i think you mean this..
<hayley>
Right.
<hayley>
I'd prefer to make introducing concurrency an explicit operation, because someone reading a program needs to be quite careful about how they reason about it.
<rendar>
yeah, i see
<rendar>
hayley, so you would like more something like this (my_fn (concur (get_url a) (get_url b)))
<hayley>
The example with parallel-let I gave before would work, but is quite verbose. In the general case of "retrieving multiple pages concurrently", which I've done before, a parallel mapping function i.e. (parallel-map #'get-url urls) is common.
<jackdaniel>
(this won't work with bytecodes compiler; we could probably incorporate it into the core though - what are function names in sbcl and ccl? [for compatibility])
<jackdaniel>
foo-float-bits it is
<Shinmera>
and the reverse of bits-foo-float
mon_aaraj has quit [Ping timeout: 244 seconds]
mon_aaraj has joined #commonlisp
<jackdaniel>
hm, this is somewhat troublesome, but is there no portable C integer type to hold long double? :)
<Shinmera>
you mean a quad float, or?
atgreen has joined #commonlisp
<jackdaniel>
long double has at least 64 bits, but may have more
<jackdaniel>
usually it has 80bits I think
<Shinmera>
right.
<hayley>
I can't think of one. On x87 you're asking for a 80-bit int.
rodicm has quit [Ping timeout: 264 seconds]
<Shinmera>
gonna have to shift and manually unpack into separate regs.
mon_aaraj has quit [Remote host closed the connection]
rodicm has joined #commonlisp
mon_aaraj has joined #commonlisp
mon_aaraj has quit [Ping timeout: 276 seconds]
mon_aaraj has joined #commonlisp
notzmv has quit [Ping timeout: 276 seconds]
random-nick has joined #commonlisp
<jackdaniel>
first you need to know how many bits there is, otherwise you will add garbage to the result
<jackdaniel>
in principle this could be done the same as with the constant si:cl-fixnum-bits (that is - fill it when ecl is built); oh well, I'll add single and double and signal an error for long float for now (but api-wise it will be covered!)
rodicm has quit [Ping timeout: 244 seconds]
<Shinmera>
Sounds good to me! :)
<jackdaniel>
btw, what's the deal in the code you linked with short float?
<jackdaniel>
shouldn't they be handled the same as single float? (I don't think that there is an implementation implementing them as half-precision)
<Shinmera>
I'm not sure, I don't think I implemented it.
<Shinmera>
Looks like |3b| did that part.
lisp123 has joined #commonlisp
waleee has joined #commonlisp
Th30n has joined #commonlisp
rodicm has joined #commonlisp
<rendar>
can we say that everything in CL is represented (in C, for instance) by `struct Cons { elem * car; elem * cdr; };` ?
<jackdaniel>
absolutely not
<rendar>
ok
<hayley>
Not everything is a cons cell.
<rendar>
the book i'm reading speaks about the LIST function which fills the car pointers and the cdr pointers, so i have imagined something like that
<jackdaniel>
rendar: how will you represent a number 42 as struct Cons { elem * car; elem * cdr; }; ?
<hayley>
A cons cell can be represented like your description, but not everything is a cons cell.
<rendar>
jackdaniel, well, that is the "elem" the Cons struct points to, so 42 is an elem, and (42) is cons.car->42,cdr->nil
<jackdaniel>
but you said, that everything is represented as that struct; is it that integer does not fall in the category "everything"?
<rendar>
yeah, well, let me rephrase: every list
<jackdaniel>
a list may be represented as either a cons cell or nil
lisp123 has quit [Remote host closed the connection]
<Shinmera>
jackdaniel: very nice. now the only question left is: how do I make the library not completely break on older ECL versions
<jackdaniel>
(when (find-symbol "BITS-SINGLE-FLOAT" "SYSTEM") (push 'float-features::ecl-can-do-this *features*)) ;comes to mind
<Shinmera>
I really wish LispWorks' version reader macro was standard
<jackdaniel>
eventually (when (ignore-errors (si:single-float-bits 3.14)) (push …))
<jackdaniel>
there is also ext:+ecl-version-number+ for checking (a monotonic version number)
<_death>
rendar: as an optimization some objects (say fixnums or characters) may be stored in place of the pointer.. also, while lisp has a cons/atom dichotomy, the atoms may be aggregates (think arrays)
Oddity has quit [Ping timeout: 255 seconds]
<_death>
jackdaniel: no docs? :)
atgreen has quit [Ping timeout: 260 seconds]
atgreen has joined #commonlisp
<jackdaniel>
_death: internal interfaces are not documented ,)
<jackdaniel>
(and there are not hard guarantees that they won't change)
tyson2 has joined #commonlisp
mon_aaraj has quit [Ping timeout: 244 seconds]
mon_aaraj has joined #commonlisp
MajorBiscuit has quit [Quit: WeeChat 3.5]
MajorBiscuit has joined #commonlisp
<Shinmera>
jackdaniel: float-features has been updated :)
<yitzi>
Shinmera: do you know where the LispWorks version reader macro is documented? Please don't look if you don't, I can find if you don't know right off of the top of your head.
<Shinmera>
I don't
Glaucon has joined #commonlisp
<Shinmera>
But I remember seeing it in library code and missing it on other implementations ever since
Glaucon has quit [Client Quit]
<yitzi>
Is is different then the ACL one? That one does this `(version>= 9)`
<Shinmera>
I don't remember
<Shinmera>
On account of not using either :)
<yitzi>
Ok, no worries. Just curious.
Glaucon has joined #commonlisp
lisp123 has joined #commonlisp
<jackdaniel>
banzai! ,)
notzmv has joined #commonlisp
lisp123 has quit [Quit: Leaving...]
cage has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
<Nilby>
Nice that the ECL maintainer is so amenable and quick to add useful features. :)
waleee has quit [Ping timeout: 244 seconds]
azimut has joined #commonlisp
mon_aaraj has quit [Ping timeout: 240 seconds]
mon_aaraj has joined #commonlisp
<Shinmera>
Indeed. It isn't the first time for me, either :)
<Shinmera>
Ooh. Just got an automated quicklisp issue ticket. Maybe a new dist release is going to appear soon :)
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
igemnace has joined #commonlisp
Roy has quit [Quit: Leaving]
jeosol has quit [Quit: Client closed]
epolanski has joined #commonlisp
overclucker has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
overclucker has joined #commonlisp
<jackdaniel>
I'm blushing ;p
theBlackDragon has quit [Ping timeout: 244 seconds]
theBlackDragon has joined #commonlisp
rodicm has quit [Ping timeout: 240 seconds]
Th30n has quit [Ping timeout: 276 seconds]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
Th30n has joined #commonlisp
Th30n has quit [Client Quit]
mon_aaraj has quit [Ping timeout: 240 seconds]
snits has quit [Ping timeout: 255 seconds]
mon_aaraj has joined #commonlisp
fitzsim has quit [Remote host closed the connection]
rodicm has joined #commonlisp
sander has quit [Quit: So long! :)]
sander has joined #commonlisp
igemnace has quit [Remote host closed the connection]
attila_lendvai has quit [Quit: Leaving]
nij- has joined #commonlisp
mon_aaraj has quit [Ping timeout: 244 seconds]
nij- has left #commonlisp [#commonlisp]
irc_user has joined #commonlisp
mon_aaraj has joined #commonlisp
jeosol has joined #commonlisp
X-Scale` has joined #commonlisp
X-Scale has quit [Ping timeout: 276 seconds]
X-Scale` is now known as X-Scale
z4kz has quit [Quit: WeeChat 3.5]
tankrim has joined #commonlisp
zak1 has joined #commonlisp
Cymew has quit [Ping timeout: 276 seconds]
ttree has joined #commonlisp
pranavats has joined #commonlisp
epolanski has quit [Quit: Connection closed for inactivity]
notzmv has quit [Ping timeout: 240 seconds]
pranavats has left #commonlisp [Error from remote client]
notzmv has joined #commonlisp
pranavats has joined #commonlisp
gxt__ has quit [Remote host closed the connection]
azimut has quit [Remote host closed the connection]
gxt__ has joined #commonlisp
azimut has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 255 seconds]
Glaucon has quit [Ping timeout: 264 seconds]
snits has joined #commonlisp
frgo has quit [Ping timeout: 240 seconds]
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 240 seconds]
frgo has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
saura has joined #commonlisp
saura has quit [Ping timeout: 276 seconds]
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
tankrim has quit [Ping timeout: 255 seconds]
rodicm has quit [Ping timeout: 240 seconds]
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 244 seconds]
saura has joined #commonlisp
saura has quit [Ping timeout: 256 seconds]
tyson2 has quit [Remote host closed the connection]
Dynom_ has joined #commonlisp
Dynom_ is now known as Guest9321
orestarod has joined #commonlisp
ns12 has quit [Quit: bye]
ns12 has joined #commonlisp
tyson2 has joined #commonlisp
hexology- is now known as hexology
manykwh has joined #commonlisp
cage has joined #commonlisp
tankrim has joined #commonlisp
akoana has joined #commonlisp
hexology has quit [Quit: brb]
hexology has joined #commonlisp
fitzsim has joined #commonlisp
jmpeax has quit [Ping timeout: 255 seconds]
livoreno has quit [Ping timeout: 240 seconds]
treflip has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
Oddity has joined #commonlisp
tyson2 has joined #commonlisp
jmdaemon has joined #commonlisp
tyson2` has joined #commonlisp
tyson2 has quit [Ping timeout: 276 seconds]
treflip has quit [Quit: i slep]
<contrapunctus>
Is there any Emacs package to automatically display Common Lisp docstrings for the symbol at point? I've searched and searched, but to no avail :\