<aeth> It looks like this also has mmap. https://github.com/osicat/osicat
Zhivago has quit [Ping timeout: 258 seconds]
orivej has quit [Ping timeout: 276 seconds]
hydan has joined #lisp
mejja has joined #lisp
turkja has joined #lisp
<aeth> whoman: Thanks, your suggestion set me off in the right direction. I now store all the old values of the slot names in gensyms, and aref those gensyms instead of using the name directly.
smurfrobot has joined #lisp
<whoman> https://ptpb.pw/4UUX kekeke
<aeth> whoman: Are you doing something with (safety 0) somewhere?
<whoman> aeth: ah cool! gensym leaves a taste in my mouth. i had been conditioned to feel that hygiene is a good thing (??) but suddenly i see that capturing variables is something i will really enjoy the taste of
<whoman> aeth: nope, just SDL2/threads
<whoman> some time last night i had two sdl2 bindings going, very unconventionally, so i am sure that was it =)
<aeth> C is (safety -1) all the time
<whoman> there she is =) --> (defmacro alambda (parms &body body) `(labels ((self ,parms ,@body)) #'self))
<dmiles> Devon: you should invesigate CYC
<whoman> aeth: heh!
dirb has quit [Remote host closed the connection]
gigetoo has quit [Ping timeout: 260 seconds]
_cosmonaut_ has joined #lisp
gigetoo has joined #lisp
* dmiles is developing new Lisp to make integration of such programs Semantic Inference Engines easier with other Engine tools writtne in Prolog
<dmiles> eaiser = less FFI thinking between objects
<dmiles> thunking*
<aeth> call it Epilog
<dmiles> hehe yes perfect name Epilog
<whoman> o-O
<dmiles> ugh never google Prolog and Epilog together
<dmiles> oh Epilog is coded in lisp
akr has joined #lisp
josemanuel has quit [Quit: leaving]
* dmiles assumed aeth was teasing
<whoman> it better be emacs lisp
zachk has quit [Quit: night]
smurfrobot has quit [Remote host closed the connection]
<dmiles> why is that?
* dmiles has sorta thought of implementing emacs lisp then use 'emacs-cl' to get to CL
<dmiles> but i cant tell if emacs lisp is actualyl smaller or not
<dmiles> also is there a library in CL to make ones lisp act like emacs lisp?
<whoman> yes
<whoman> also an impl. in guile =P
<whoman> also cl-lib from emacs side could help
JenElizabeth has quit [Remote host closed the connection]
JenElizabeth has joined #lisp
<whoman> elisp is actually quite nice..
EvW has quit [Ping timeout: 255 seconds]
<aeth> dmiles: I think CL is small enough if you ignore CLOS and loop and use someone else's versions of those. Maybe a few other painful parts.
<dmiles> i have two two versions one is cl-lib and the otehr https://github.com/larsbrinkhoff/emacs-cl
SuperJen has joined #lisp
<dmiles> not sure which si better of the two
<dmiles> aeth: yeah that is what i been finding (that it isnt that biug.. actualyl even clos as far as i can tell in not even as big as Epilog KM or any other lisp applicaiton
mson has joined #lisp
<whoman> emacs-cl is definately older, cl-lib is official builtin
* dmiles alwasy feels worse in #lisp when he unballances ()s
JenElizabeth has quit [Ping timeout: 240 seconds]
<aeth> it's fine, as long as you escape it first. #\(
<whoman> (=
<dmiles> hah
<pjb> or even
<pjb> \(
<pjb> (car '(\()) --> \(
* dmiles adds (symbol-name '\() to sanity-tests
Jach[m] has joined #lisp
happy_gnu[m] has joined #lisp
dirb has joined #lisp
kammd[m] has joined #lisp
Guest72603 has joined #lisp
astronavt[m] has joined #lisp
thorondor[m] has joined #lisp
l04m33[m] has joined #lisp
CharlieBrown has joined #lisp
Guest49954 has joined #lisp
dahs81[m] has joined #lisp
Sovereign_Bleak has joined #lisp
plll[m] has joined #lisp
hiq[m] has joined #lisp
cryptomarauder[m has joined #lisp
RichardPaulBck[m has joined #lisp
hdurer[m] has joined #lisp
equalunique[m] has joined #lisp
trigt[m] has joined #lisp
mhitchman[m] has joined #lisp
ArthurAGleckler[ has joined #lisp
<dmiles> oh and (symbol-name :\()
<dmiles> clhs get-setf-method-inverse
<specbot> Couldn't find anything for get-setf-method-inverse.
<dmiles> ok good
momofarm has joined #lisp
<Bike> i think sbcl uses that to get cheap expansions from short defsetf.
<dmiles> yeah i saw it in sbcl, xcl and abcl made me wonder
red-dot has joined #lisp
<dmiles> if it was standard
<dmiles> xcl extracted much of sbcl sources is why
jibanes has quit [Ping timeout: 252 seconds]
<dmiles> it apears /me leaves of the last few words
papachan has quit [Quit: WeeChat 2.0]
<stylewarning> my lisp & quantum computing talk is online https://www.youtube.com/watch?v=f9vRcSAneiw
<dmiles> of every sentence /me was actually paid once to write a neurolinguistic personal auditing program to detect souls whom do this
jibanes has joined #lisp
<dmiles> since they may often be the most likely to do reprisal attacks against previous employers
whoman has quit [Remote host closed the connection]
whoman has joined #lisp
jack_rabbit has quit [Ping timeout: 248 seconds]
* dmiles should starts charging for Ashkenazi genetic profiling
<dmiles> oh, it was only the person doing introductions
<whoman> oy
k-stz has quit [Remote host closed the connection]
<dmiles> vey
<Bike> ...ashenkazi...?
whoman has quit [Remote host closed the connection]
hexfour has quit [Quit: WeeChat 1.9.1]
whoman has joined #lisp
whoman has quit [Remote host closed the connection]
whoman has joined #lisp
<dmiles> ashkenazi are a group of less 350 jews whom decendended from some italian women whom are now over 2 million people.. but prabably quite more.. since most do not know they came from this group
whoman` has joined #lisp
whoman` has quit [Remote host closed the connection]
<dmiles> (or have any jewish people in their family anymore)
Kundry_Wag has quit [Remote host closed the connection]
jack_rabbit has joined #lisp
Kundry_W` has joined #lisp
whoman` has joined #lisp
<drmeister> Hey - does anyone use dtrace? I'm trying to use it on clasp and it's not cooperating.
<Devon> I use it all the time.
<Devon> MacOSX hacked it to not work on most of their stuff.
<Devon> I generally use this bash command at http://jovi.net/dtrace
whoman` is now known as hooman
sjl has joined #lisp
fikka has quit [Ping timeout: 250 seconds]
sjl has quit [Ping timeout: 240 seconds]
nullman has quit [Ping timeout: 260 seconds]
damke has joined #lisp
jack_rabbit has quit [Ping timeout: 248 seconds]
Devon has quit [Ping timeout: 248 seconds]
nullman has joined #lisp
lrvy has joined #lisp
raphaelss has joined #lisp
Xal has joined #lisp
circ-user-jCPZY has joined #lisp
jack_rabbit has joined #lisp
lrvy has quit [Quit: Textual IRC Client: www.textualapp.com]
lrvy has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
<drmeister> Devon: Thank you.
<drmeister> I figured out my problem. I'm profiling our own code (Clasp Common Lisp) and I needed to start and stop profiling for a particular function.
jack_rabbit has quit [Ping timeout: 248 seconds]
<drmeister> I think I should buy the dtrace book.
<drmeister> This is what I ended up doing.
<drmeister> That generated this:
<drmeister> That says that 86% of the time is being spent in LLVM.
<drmeister> It's pretty clear that I have been undercounting the amount of time that Clasp spends running LLVM
philosaur has joined #lisp
d4ryus1 has joined #lisp
__rumbler31 has joined #lisp
d4ryus has quit [Ping timeout: 248 seconds]
__rumbler31 has quit [Ping timeout: 248 seconds]
mejja has quit [Quit: mejja]
<Bike> how did that happen?
jack_rabbit has joined #lisp
<dmiles> stylewarning: btw, great pros/cons on languages
damke has quit [Ping timeout: 252 seconds]
damke has joined #lisp
Karl_Dscc has joined #lisp
vir` has joined #lisp
shenghi has quit [Remote host closed the connection]
shenghi has joined #lisp
smurfrobot has joined #lisp
vir` has quit [Remote host closed the connection]
vir` has joined #lisp
Devon has joined #lisp
vir` has quit [Client Quit]
smurfrobot has quit [Ping timeout: 248 seconds]
nowhere_man has quit [Ping timeout: 255 seconds]
nowhere_man has joined #lisp
damke_ has joined #lisp
<hooman> ,clhs defvar
damke has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
<stylewarning> dmiles: ty
circ-user-jCPZY has quit [Ping timeout: 240 seconds]
Kundry_W` has quit [Ping timeout: 260 seconds]
dieggsy has joined #lisp
<Bike> clhs defvar
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
karswell_ has joined #lisp
pjb has quit [Ping timeout: 240 seconds]
hydan has quit [Quit: Connection closed for inactivity]
karswell has quit [Ping timeout: 255 seconds]
dddddd has quit [Remote host closed the connection]
test1600 has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
<hooman> thanks Bike ! it just bit my ankle that (defvar x) leaves 'x unbound ^_^/
* hooman was trying to save 4 bytes
sjl has joined #lisp
sjl has quit [Ping timeout: 248 seconds]
igemnace has quit [Quit: WeeChat 2.0]
igemnace has joined #lisp
pjb has joined #lisp
red-dot has joined #lisp
jack_rabbit has quit [Read error: Connection reset by peer]
lrvy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shka has joined #lisp
fikka has joined #lisp
lrvy has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
Kundry_W` has joined #lisp
jack_rabbit has joined #lisp
<hooman> clim-debugger is great, shows down to the cons (!), available on quicklisp.
Kundry_W` has quit [Ping timeout: 240 seconds]
<loke> hooman: The SLIME debugger does that too, and more.
<loke> hooman: The neat things about CLIM is its ability to mix graphical representations of objects with text.
omilu has joined #lisp
<hooman> loke: ah really? i was just clicking, because ive never debugged lisp before, and i was clicking into cons cells and arrows were pointing at stuff etc
<loke> Yes. Are you not using SLIME?
<hooman> i am using slime yes
cromachina has joined #lisp
<hooman> but i am also having the issue with graphics , from common lisp to the screen, it is not a good time with SDL =)
<loke> hooman: Then type an expression that returns a value, say (list 1 2 (cons 3 4) 5)) press RET and you should see the resulting list in red in the REPL. Then move the cursor to the result and press C-c C-v TAB
<hooman> i will try to play around with clim-listener as well and see if it could animate some things
<loke> that opens the SLIME inspector for that value.
<hooman> loke: ah cool!
schoppenhauer has quit [Ping timeout: 240 seconds]
Bike has quit [Quit: Lost terminal]
eli has quit [Ping timeout: 255 seconds]
schoppenhauer has joined #lisp
pierpa has quit [Quit: Page closed]
whoman has quit [Remote host closed the connection]
hooman has quit [Remote host closed the connection]
whoman has joined #lisp
<beach> Good morning everyone!
<whoman> good morning
test1600_ has joined #lisp
test1600 has quit [Ping timeout: 260 seconds]
<shka> beach: good morning
parjanya has joined #lisp
<parjanya> hi! how can "print" a standard-char as a simple string? like (print #\a) returning just "a"?
<shka> parjanya: i would use format
<shka> (format nil "~a" #\a)
karswell_ has quit [Read error: No route to host]
<parjanya> shka: ah, thank you! :) weird, I tried something similar and it didn’t work
vertigo has quit [Ping timeout: 240 seconds]
SlowJimm` has joined #lisp
dieggsy has quit [Ping timeout: 255 seconds]
SlowJimmy has quit [Ping timeout: 248 seconds]
vertigo has joined #lisp
<stylewarning> parjanya: (string #\a)
<myrkraverk> What is the simplest way to print carriage-return in Lisp? To make an auto-updating status in a terminal, thing.
SaganMan has joined #lisp
<beach> (princ #\Return) I would think. No?
<myrkraverk> Probably.
<SaganMan> Morning everyone
<beach> Hello SaganMan.
fikka has joined #lisp
pjb has quit [Ping timeout: 250 seconds]
fikka has quit [Ping timeout: 240 seconds]
damke_ has quit [Read error: Connection reset by peer]
damke_ has joined #lisp
circ-user-jCPZY has joined #lisp
circ-user-jCPZY has quit [Remote host closed the connection]
safe has quit [Quit: Leaving]
zmt00 has quit [Quit: Leaving]
nowhere_man has quit [Ping timeout: 248 seconds]
nowhere_man has joined #lisp
LocaMocha has joined #lisp
drcode has quit [Ping timeout: 248 seconds]
hvxgr has quit [Ping timeout: 255 seconds]
mishoo has joined #lisp
zooey has quit [Ping timeout: 248 seconds]
hvxgr has joined #lisp
drcode has joined #lisp
antismap has quit [Ping timeout: 248 seconds]
zooey has joined #lisp
oleo has quit [Quit: Leaving]
BitPuffin|osx has joined #lisp
fikka has joined #lisp
neoncontrails has quit [Remote host closed the connection]
neoncontrails has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
neoncontrails has quit [Ping timeout: 240 seconds]
greaser|q has quit [Changing host]
greaser|q has joined #lisp
greaser|q is now known as GreaseMonkey
dec0n has joined #lisp
Lord_of_Life has quit [Ping timeout: 246 seconds]
drmeister has quit [Ping timeout: 246 seconds]
marusich has quit [Quit: Leaving]
lonjil has quit [Quit: No Ping reply in 180 seconds.]
drmeister has joined #lisp
birk has joined #lisp
dim has quit [Ping timeout: 246 seconds]
itruslove has quit [Ping timeout: 246 seconds]
MerinoBailon has quit [Ping timeout: 246 seconds]
abbe has quit [Ping timeout: 246 seconds]
sveit has quit [Ping timeout: 246 seconds]
SlowJimm` has quit [Read error: Connection reset by peer]
hdurer[m] has quit [Ping timeout: 246 seconds]
GGMethos has quit [Ping timeout: 246 seconds]
Sovereign_Bleak has quit [Ping timeout: 246 seconds]
gko has quit [Ping timeout: 246 seconds]
happy_gnu[m] has quit [Ping timeout: 246 seconds]
pchrist has quit [Ping timeout: 246 seconds]
vlatkoB has joined #lisp
GGMethos has joined #lisp
Guest24518 has quit [Ping timeout: 276 seconds]
abbe has joined #lisp
pchrist has joined #lisp
smurfrobot has joined #lisp
bailon has joined #lisp
sveit has joined #lisp
sjl has joined #lisp
gko has joined #lisp
itruslove has joined #lisp
Lord_of_Life has joined #lisp
dim has joined #lisp
neoncontrails has joined #lisp
plll[m] has quit [Ping timeout: 250 seconds]
astronavt[m] has quit [Ping timeout: 250 seconds]
Guest49954 has quit [Ping timeout: 255 seconds]
RichardPaulBck[m has quit [Ping timeout: 240 seconds]
Guest72603 has quit [Ping timeout: 240 seconds]
dahs81[m] has quit [Ping timeout: 252 seconds]
mhitchman[m] has quit [Ping timeout: 255 seconds]
ArthurAGleckler[ has quit [Ping timeout: 240 seconds]
thorondor[m] has quit [Ping timeout: 250 seconds]
akr has quit [Ping timeout: 255 seconds]
trigt[m] has quit [Ping timeout: 240 seconds]
kammd[m] has quit [Ping timeout: 255 seconds]
equalunique[m] has quit [Ping timeout: 255 seconds]
hiq[m] has quit [Ping timeout: 250 seconds]
l04m33[m] has quit [Ping timeout: 264 seconds]
dirb has quit [Ping timeout: 252 seconds]
Jach[m] has quit [Ping timeout: 255 seconds]
cryptomarauder[m has quit [Ping timeout: 255 seconds]
CharlieBrown has quit [Ping timeout: 255 seconds]
smurfrobot has quit [Ping timeout: 240 seconds]
sjl has quit [Ping timeout: 240 seconds]
whoman has quit [Read error: Connection reset by peer]
sz0 has joined #lisp
jameser has joined #lisp
flamebeard has joined #lisp
itruslove has quit [Remote host closed the connection]
giraffe has quit [Remote host closed the connection]
<Shinmera> Ugh, looks like ASDF 3.3.1 breaks yet another one of my projects in a subtle way
scymtym has quit [Ping timeout: 240 seconds]
raphaelss has quit [Remote host closed the connection]
whoman has joined #lisp
itruslove has joined #lisp
orivej has joined #lisp
nowhere_man has quit [Ping timeout: 260 seconds]
nowhere_man has joined #lisp
giraffe has joined #lisp
dtornabene has joined #lisp
earl-ducaine has quit [Read error: Connection reset by peer]
smurfrobot has joined #lisp
Cymew has joined #lisp
varjag has joined #lisp
pjb has joined #lisp
smurfrobot has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
rjid has joined #lisp
knobo has joined #lisp
hajovonta has joined #lisp
<hajovonta> good morning!
dddddd has joined #lisp
smurfrobot has joined #lisp
nika_ has joined #lisp
quazimodo has quit [Ping timeout: 246 seconds]
rjid has quit [Ping timeout: 260 seconds]
smurfrobot has quit [Ping timeout: 276 seconds]
hajovonta has quit [Remote host closed the connection]
hajovonta1 has joined #lisp
smurfrobot has joined #lisp
hajovonta1 is now known as hajovonta
shrdlu68 has joined #lisp
neoncontrails has quit [Ping timeout: 240 seconds]
<beach> Hello hajovonta.
kark has joined #lisp
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
resttime has joined #lisp
Jen has joined #lisp
Jen is now known as Guest74955
murii has joined #lisp
smurfrobot has quit [Remote host closed the connection]
jameser has quit [Quit: Textual IRC Client: www.textualapp.com]
SuperJen has quit [Ping timeout: 240 seconds]
smurfrobot has joined #lisp
scymtym has joined #lisp
Guest74955 has quit [Remote host closed the connection]
Guest74955 has joined #lisp
<shrdlu68> I'm using a ramfs file system as an octet vector and the speeds seem to be slow.
knobo has quit [Ping timeout: 246 seconds]
<shrdlu68> I'm using #'file-position to go to :start and :end.
knobo has joined #lisp
<shrdlu68> I need a really huge octet vector and using sbcl with --dynamic-space-size seems to use swap and gobble up so much memory the system becomes unresponsive.
itruslove has quit [Ping timeout: 246 seconds]
<|3b|> how huge / how much ram is available?
<|3b|> and do you need to be able to use normal CL vector ops on it? (guessing not if you can replace it with file ops)
itruslove has joined #lisp
<shrdlu68> The system has 8GB of RAM.
<shrdlu68> |3b|: I need 309319296 x 40 bits, which I think should use around 1.5GB.
<schweers> that sounds like --dynamic-space-size and a regular vector or array should do the job
<schweers> how much ram is in use?
<|3b|> by N x 40 bits you mean you need that many values with at least that many bits? or a n*40 bitvector?
mson has quit [Quit: Connection closed for inactivity]
<shrdlu68> 40 bits n times.
<shrdlu68> Perhaps the mistake I made was to create an n-size array of elements each an array of 40bits (5 octets) rather than just one octet vector.
raphaelss has joined #lisp
<|3b|> yeah, that sounds like a bad idea
<|3b|> a 5 octet vector probably adds more overhead than contents
<|3b|> (on 64 bit lisp, the pointer pointing to it is probably 8 bytes by itself, not including the actual array headers etc)
<shrdlu68> Yikes, explains why it just kept gobbling up memory and not stoping.
smurfrobot has quit [Remote host closed the connection]
* |3b| would be surprised if the headers for each array were less than 16 bytes
<|3b|> and not surprised by 2-3x that much
<|3b|> also, you are using types arrays for the octets, right? :element-type '(unsigned-byte 8)
<shrdlu68> Yes.
schweers has quit [Read error: Connection reset by peer]
<shrdlu68> Let me try with this new insight.
schweers has joined #lisp
<|3b|> yeah, single flat vector of octets should fit in 8GB
smurfrobot has joined #lisp
lrvy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lrvy has joined #lisp
akr has joined #lisp
sz0 has quit [Quit: Connection closed for inactivity]
nirved has joined #lisp
hydan has joined #lisp
<|3b|> yeah, 309319296 x 5-element octet vectors uses ~12GB, (* 5 309319296) element octet vector uses ~1.6GB
<dmiles> do some lisps set a symbol that reflects what flags are on for eval-when macro ?
<dmiles> i am abvout to for my lisp but i dislike making up names for this special var
<beach> I set *COMPILER* to be either EVAL, COMPILE, or COMPILE-FILE. But I am not sure that's the best solution.
<dmiles> is it set :execute the rest of the time?
<dmiles> oops n/m :EVAL the rest of them?
<beach> I guess so.
<|3b|> for first case, looks like ~2.4GB is the 8-byte pointers in the big array, 9.9GB is the 5-element arrays, so about 32 bytes per 5-octet array (i'm guessing 24 bytes of header + 3 bytes of padding to round data up to a whole word of space)
birk is now known as lonjil
wooden has quit [Ping timeout: 260 seconds]
<dmiles> would (eval-when (:load-toplevel :compile-toplevel :execute) .. ) ever be untrue?
* dmiles assumes these are ORed
Guest55636 has joined #lisp
Guest3886 has joined #lisp
happy_gnu[m] has joined #lisp
Jach[m] has joined #lisp
thorondor[m] has joined #lisp
dirb has joined #lisp
Sovereign_Bleak has joined #lisp
l04m33[m] has joined #lisp
kammd[m] has joined #lisp
cryptomarauder[m has joined #lisp
hdurer[m] has joined #lisp
hiq[m] has joined #lisp
equalunique[m] has joined #lisp
astronavt[m] has joined #lisp
CharlieBrown has joined #lisp
dahs81[m] has joined #lisp
RichardPaulBck[m has joined #lisp
ArthurAGleckler[ has joined #lisp
plll[m] has joined #lisp
trigt[m] has joined #lisp
mhitchman[m] has joined #lisp
<beach> dmiles: It is not a Boolean expression. It has to do with calling or not calling EVAL at compile-time, and generating or not generating code to be run at load time.
shrdlu68 has quit [Read error: No route to host]
shrdlu68 has joined #lisp
<dmiles> it does mean though if :eval :compile or :compile-file in your case are found in *COMPILER* then to treat the code as there
<dmiles> +?
<beach> clhs 3.2.3.1
<specbot> Processing of Top Level Forms: http://www.lispworks.com/reference/HyperSpec/Body/03_bca.htm
<beach> That ↑ is what I do.
<dmiles> perfect
<beach> dmiles: When implementing a Common Lisp system, if you have a choice between doing it according to the Common Lisp HyperSpec and not doing it according to the Common Lisp HyperSpec, the first choice is always the best.
<shrdlu68> |3b|: Didn't work, it was still gobling up memory for some reason, I've switched to CCL.
<dmiles> i was reading eval-when and wasnt completely sure.. most of the time i match the examples
<dmiles> (from the clhs)
<beach> The Common Lisp HyperSpec examples are not normative, though, and they sometimes contain errors.
<|3b|> shrdlu68: sounds like a reasonable workaround if it works :)
damke_ has quit [Ping timeout: 240 seconds]
<dmiles> like/link
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
damke_ has joined #lisp
<pjb> shrdlu68: syscalls are way slower than function calls, which themselves are slower than inline native instructions to index an array.
kark has quit [Quit: Lost terminal]
<dmiles> yep works for me to.. i was complaining that the eval-when page has great usefull links but everywhere but that page :P .. to have gotten there I would have had to stop at the top-level-forms glossary page first.. which then links to that page
shenghi has quit [Remote host closed the connection]
shenghi has joined #lisp
<schweers> dmiles: you’re implementing your own common lisp? for fun and education, or do you think you can do better than those implementations that are already out there?
<pjb> schweers: he can do different, not necessarily better.
<pjb> We want different implementations.
quazimodo has joined #lisp
<hajovonta> diversity is king
<dmiles> i mostly hope i can do as good as the top 40%.. i am writting it in Prolog for a few reasons.. one is to prove prolog is a general purpose programming language that makes things like creating lisp impls ultra easy. we already know it makes lisp interpretors in less lines than any other language.. but what i am interested in if it can do "as well"
<pjb> If they were just better, we'd just use the best and be done with it.
<schweers> ok, better in some respect ;)
<schweers> dmiles: sounds cool :)
* schweers has to admit to never having gotten around to learn prolog
<shrdlu68> sounds like fun.
Jesin has quit [Ping timeout: 240 seconds]
<schweers> dmiles: do you generate native code?
sjl has joined #lisp
<dmiles> i generate protable prolog source code (liek a transpiler)
<shrdlu68> dmiles: Is the code public yet?
<dmiles> so the prolog sources can at the repl be evaluated or if its done in compile-file it can be compiled
momofarm has quit [Ping timeout: 260 seconds]
<schweers> are there (somewhat) good prolog native code compilers?
smurfrobot has quit [Remote host closed the connection]
<dmiles> there are good and less developed prolog compilers for differnt platforms .. in several langauges
<schweers> out of curiosity: which implementation(s) do you use?
knobo has quit [Ping timeout: 255 seconds]
<dmiles> SWI-Prolog, Sicstus, Yap
<dmiles> (oh of prolgo compiler interpretors)
eSVG has quit [Ping timeout: 276 seconds]
knobo has joined #lisp
sjl has quit [Ping timeout: 248 seconds]
raphaelss has quit [Remote host closed the connection]
<dmiles> the lisp_compile_to_prolog(pkg,..) is there more informationally like: https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/sanity-test.lisp.trans.pl#L44-L59
<dmiles> to gert the symbols interned
Tobbi_ has joined #lisp
<dmiles> and to get the symbols interned ( packaged ) so the prolog code at https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/sanity-test.lisp.trans.pl#L74-L88 can be understood
Sigyn has quit [Quit: NO HEARTBEAT, NO SERVICE.]
Sigyn has joined #lisp
<dmiles> to give an example of *normal* implementing of lisp in prolog, it looks like this: https://www.metalevel.at/lisprolog/lisprolog.pl
Arcaelyx has quit [Ping timeout: 252 seconds]
<dmiles> (thats a reader and evaluator both)
shrdlu68 has quit [Ping timeout: 268 seconds]
shrdlu68 has joined #lisp
Arcaelyx has joined #lisp
<dmiles> so bonuses of the prolog system is it already has a decompiler, exe/dll maker, image load/save
<dmiles> the drawbacks is the number developer that think implementing object systems on prolog as to be easy
<schweers> how so?
<dmiles> developers* maybe 10 worldwide would call such a thing easy
<schweers> ah
<dmiles> though 10,000 probalby have no problem if they bothered to try
<schweers> I have no idea how many people can read and write prolog code
<dmiles> everyone that gets to or past phD level in computer science is forced into at least 2 miserable weeks of leanring proliog
<schweers> sorry if this sounds really stupid (I don’t have a PhD), but ... why?
rann has quit []
<jackdaniel> we had prolog course on second year at uni
<dmiles> they come away as much mythology as people would with lisp unfortiantly
<jackdaniel> very cool language
<jackdaniel> which broads programming perspectives
rann has joined #lisp
<schweers> I mean, why do people aspiring to this level /have/ to learn prolog?
<schweers> jackdaniel: I imagine that to be the case, which is why I can see myself learning the language some day
<jackdaniel> I suppose they are required to know at least some important programming paradigms
<dmiles> jackdaniel: did they require lisp at some points to?
<schweers> along with a few other languages
shrdlu68 has quit [Ping timeout: 248 seconds]
<jackdaniel> they did not
<jackdaniel> but I've made AI scientific club and introduced Lisp there
lrvy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Tobbi_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<schweers> dmiles, jackdaniel: do you think free prolog implementations of today are usable or real world applications? Or is the language as it is today “only” useful to broaden the mind? Which would be totally fine if you ask me, that is still a very good reason to learn a language.
<dmiles> definately very good for todays applications.. i think even more for future applications.. I have two applications that i would not even immagine using anthing other than prolog
<schweers> on the other hand: if it were not, I guess you wouldn’t be writing a lisp implementation in it ;)
<schweers> oh, including lisp?
<dmiles> other then making a prolog-in-lisp (as most people end up) in my case
<jackdaniel> I didn't use prolog outside this uni course
<jackdaniel> I did like the easter egg though
<dmiles> so i immagine 95% of the world would use lisp for such apps and make a prolog interpretor but leverage the inteire lisp ecosystem
<jackdaniel> X=Y was that I think
<dmiles> easter egg? https://pastebin.com/xkfKHEyT
<jackdaniel> right, this one
<dmiles> those applicaitons: a general purpose problem solver/simulator that can learn and be taught
smurfrobot has joined #lisp
dtornabene has quit [Remote host closed the connection]
<dmiles> and can make further applications for running on computers that are based on what it learns from the previous
<jackdaniel> hm, interesting perspective
<dmiles> if one knew exactly how that was supposed to work.. lisp and prolog would be most natrual choices at that point
smurfrobot has quit [Ping timeout: 248 seconds]
<dmiles> neitehr languages are going to have what you need built.. what they offer is one the ability to design top down
<dmiles> (well that they make *extreme* abstraction simple)
smurfrobot has joined #lisp
<varjag> the original problem with prolog was it doesn't scale up to real world problems
<varjag> combinatorial explosion
<varjag> so they introduced pruning
<varjag> which detracts a lot from the original point of the language
test1600_ has quit [Quit: Leaving]
fikka has quit [Ping timeout: 250 seconds]
Devon has quit [Ping timeout: 268 seconds]
<dmiles> a huge project CYC made a prolog-like-system-in-lisp ... writting in their language has shown me incredicable ammounts of untility that prolog as a language is afraid to adopt
<dmiles> utility*
<otwieracz> Hi!
shrdlu68 has joined #lisp
<jackdaniel> hello o/
<otwieracz> I've got some weird pthreads/bordeaux-threads/maybe-lparallel related issue https://gist.github.com/otwieracz/d88dfc0d8b726f2610dda310e2b1e406
<otwieracz> Oh, hi jackdaniel.
<otwieracz> Seems like you're going to work today. ;)
<dmiles> i suppose one would come to the same place with OntologyWorks or PowerLOOM
<jackdaniel> otwieracz: yes, on threads- but in ECL
<jackdaniel> but I keep fingers crossed for you :)
<otwieracz> TL;DR - I've got a case where binary build with both CCL and SBCL lacks mutex fairness on certain machines.
<otwieracz> Like, CentOS 7 in Google Cloud Platform. But not Ubuntu on GCP or CentOS on proxmox on bare metal.
<otwieracz> And I have no idea where to report it. To BT, lparallel, SBCL or CCL? :)
<jackdaniel> lparallel and bt seem like a bad fit, since they build abstraction on top of threads provided by the implementation
<jackdaniel> since problem bites both sbcl and ccl it is not these implementations problem either (most probably)
<otwieracz> But from the other hand, both CCL and SBCL are affected.
<jackdaniel> so it is either something in pthread implementation on the machine, or Linux + Virtualization
<otwieracz> That was my (and still is) my best guess.
<otwieracz> Something weird happends and falls into uncommon case where due to virtualization CPU sharing something is being, maybe, optimized.
<otwieracz> But I am totally guessing.
<otwieracz> Still, I don't believe such bug will remain undetected if it won't be lisp-specific.
<jackdaniel> so I don't think you should report it to any of these four projects
<jackdaniel> bugs are undetected until someone detects them ;)
<otwieracz> I should delete this gist and sit silent? :)
<jackdaniel> nope, I would try to escalate to GCP
<otwieracz> How? Hi, I've got a lisp program and it has mutex issues.
knobo has quit [Ping timeout: 240 seconds]
<otwieracz> I am afraid I first have to prove that problem is on their side before I blame them.
* jackdaniel doesn't know google procedures for reporting bugs in their virtualization platforms
<otwieracz> I'll try it on AWS.
knobo has joined #lisp
<dmiles> schweers, so as varjag was saying (i think) is most out of the box supposed features people learn to do on a small scale (niave brute force search and inference) do not work on a large scale. but is very enjoyable on a toy levels. Though if a person uses prolog as a macro programming language instead of a structured query language it scales to every level - no problem
smurfrobot has quit [Remote host closed the connection]
<pjb> otwieracz: I don't see any problem: other thread is correctly printed after a unlocking message.
Cymew has quit [Remote host closed the connection]
<schweers> sounds a bit like the situation with lisp: yes, lists are kinda cool for some algorithms (espectially to transform code) but shouldn’t be used in the large
<pjb> otwieracz: I would just add finish-output after each format to ensure more reliable output.
<jackdaniel> pjb: there is no mutex fairness
<pjb> None was guaranted in the first place.
<jackdaniel> so one thread is starved despite tryting to get the lock
<schweers> I’m off for lunch, bbl
<pjb> Yes, it may happen.
<dmiles> schweers, cheers
<otwieracz> 12.4
<otwieracz> „Mutexes are used for controlling access to a shared resource. One thread is allowed to hold the mutex, others which attempt to take it will be made to wait until it's free. Threads are woken in the order that they go to sleep. ”
<jackdaniel> unfair mutexes are not overly useful
damke has joined #lisp
rawste has joined #lisp
<otwieracz> pjb: *other thread* goes to sleep second or third, let's say. At most.
fikka has joined #lisp
vertigo has quit [Ping timeout: 248 seconds]
<otwieracz> pjb: Is woken up at the very end on some platforms.
<otwieracz> pjb: On others, correctly, just after thread started before it unlocked the lock.
yaewa has joined #lisp
<pjb> otwieracz: obviously, in sbcl, the other thread went to sleep first.
<pjb> Try to make them go to sleep in a different order!
vertigo has joined #lisp
<otwieracz> I mean, wait.
<pjb> eg. add (sleep 1) in do-in-loop.
damke_ has quit [Ping timeout: 240 seconds]
<pjb> or 0.01
<otwieracz> let me add one finish-output
moei has quit [Ping timeout: 268 seconds]
<otwieracz> But:
<otwieracz> „locking” message is printed just before any of looping threads goes to sleep. Correct?
<pjb> without a finish-output, no, not necessarily.
<otwieracz> OK, I will add finish-outputs, of course.
<pjb> format only fills the buffer.
<otwieracz> I am just testing it, give me a second
terpri` has quit [Ping timeout: 250 seconds]
dddddd has quit [Remote host closed the connection]
Cymew has joined #lisp
<pjb> look good
<otwieracz> …it doesn't?
<otwieracz> On one machine it looks good, right. On the other still acts wrong.
<otwieracz> finish-output changed nothing.
Cymew has quit [Ping timeout: 268 seconds]
fikka has quit [Read error: Connection reset by peer]
Cymew has joined #lisp
nika_ has quit [Remote host closed the connection]
nika_ has joined #lisp
quazimodo has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
<otwieracz> jackdaniel: it's not GCP issue, same issue on Amazon Linux in EC2.
Cymew has quit [Ping timeout: 248 seconds]
<jackdaniel> maybe they use the same virtualization software?
nika_ has quit [Ping timeout: 240 seconds]
<otwieracz> No idea.
<jackdaniel> if centos7 allows you to change kernel version, try newer Linux, that could narrow it even further
<otwieracz> it doesn't.
<otwieracz> IIRC
smurfrobot has joined #lisp
<phoe> How can I force ASDF dependencies to be loaded in a given order?
<jackdaniel> add depends-on clause
<phoe> jackdaniel: thanks.
<pjb> otwieracz: you still did nothing to ensure the threads go lock in the order you want.
Karl_Dscc has joined #lisp
karswell_ has joined #lisp
<otwieracz> Why do you think so?
<otwieracz> You see when each thread is started, when is starts waiting on lock and when it acquires it.
sz0 has joined #lisp
smurfrobot has quit [Remote host closed the connection]
Cthulhux has quit [Ping timeout: 255 seconds]
Cthulhux has joined #lisp
<otwieracz> There is no way for any of the looping threads to sleep on lock before outputting „locking”.
quazimodo has joined #lisp
Cymew has joined #lisp
<phoe> How can I sort a list "like" the other? I mean, I have a list of class names, (FOO BAR BAZ QUUX FRED), and I have a list of objects that are (in)direct instances of these classes. I want to sort all of these objects so all FOOs come first, then come all BARs, then come all BAZs, and so on.
<phoe> The instances are subclasses of one and only one of these classes, so there is no ambiguity here.
<Shinmera> (loop for class in classes nconc (loop for instance in instances when (instancep instance class) collect instance))
<loke> phoe: (sort INSTANCES #'string< :key #'class-of )
<Shinmera> loke: That's not what he wants.
<loke> Oh wait.
<loke> Yeah, I noticed.
<phoe> loke: this will sort them in order, but not in the order that I want.
<phoe> string< will give me a lexicographic order.
<Shinmera> Anyway, your sorting is not really a sorting at all but an implicit grouping.
<phoe> Shinmera: thanks, I will check it out in a moment.
rawste has quit [Ping timeout: 260 seconds]
Devon has joined #lisp
Ven`` has joined #lisp
Devon has quit [Ping timeout: 240 seconds]
<shrdlu68> clustering
<shrdlu68> You can sort to cluster them, and them sort the subsequences by some means.
<phoe> Yep, it's not sorting per se. More like radix sort of thing.
<phoe> I could perhaps go O(n) by going through the list and going (push instance (gethash (class-of instance) hash-table))
Cymew has quit [Remote host closed the connection]
<phoe> And then reading the hash-table values in the given order, nconcing the results.
<Shinmera> profile before you try to optimise it
<pjb> otwieracz: try: http://sprunge.us/QeBC
<pjb> otwieracz: threading is not deterministic. Each thread executes at its own speed. Perhaps in parallel, perhaps sequentially with other threads (you can have different number of cores available!). Some threads may be busy processing unix signals, which may occur randomly.
rawste has joined #lisp
rawste has quit [Client Quit]
Cymew has joined #lisp
<otwieracz> But I need to look into your code, as I don't know what you've changed yet.
<pjb> with it you should obtain the same output on all systems, I'd say.
rawste has joined #lisp
<shrdlu68> Is there a built-in binary search?
Bike has joined #lisp
<pjb> Well, actually I would have expected the "thread # waits on starting condition" messages closer to the "submitting thread #" messages.
<pjb> shrdlu68: nope, but there are com.informatimago.common-lisp.cesarum.utility:dichotomy and com.informatimago.common-lisp.cesarum.utility:dichotomy-search
<otwieracz> ok, but why it didn't finished?
<pjb> I extended the sleep to 20.
Cymew has quit [Ping timeout: 268 seconds]
<pjb> (I expect the starting synchronization to take a little time). Otherwise it finishes here.
Cymew has joined #lisp
wxie has joined #lisp
EvW has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
Cymew has quit [Ping timeout: 240 seconds]
nowhere_man has quit [Ping timeout: 276 seconds]
Cymew has joined #lisp
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Cymew has quit [Ping timeout: 260 seconds]
damke_ has joined #lisp
Cymew has joined #lisp
gtuser has joined #lisp
wxie has quit [Read error: Connection reset by peer]
wxie has joined #lisp
damke has quit [Ping timeout: 240 seconds]
<shaftoe> any way to destructure a property list?
<pjb> Not if you assume random order of the key-value pairs.
<shaftoe> what about alist?
<pjb> idem.
Cymew has quit [Ping timeout: 248 seconds]
<pjb> You could do: (destructuring-bind (&optional k1 v1 k2 v2 k3 v3 &rest others) p-list …)
<shaftoe> lemme try that
<pjb> But it wouldn't help, since you'd have to test for each key.
<pjb> Better just do: (let ((v1 (getf plist k1)) (v2 (getf plist k2)) …) …)
k-stz has joined #lisp
<mrSpec> shaftoe: (destructuring-bind (&key a b) '(:b 5 :a 10) (print a)) isn't what you are looking for?
<pjb> that would work, silly me…
<shaftoe> ahh cool
<shaftoe> cheers
<mrSpec> :)
zooey has quit [Read error: Connection reset by peer]
igemnace has quit [Quit: WeeChat 2.0]
zooey has joined #lisp
Kaisyu has quit [Quit: Connection closed for inactivity]
damke has joined #lisp
damke_ has quit [Ping timeout: 240 seconds]
Devon has joined #lisp
wxie has quit [Quit: Bye.]
Devon has quit [Ping timeout: 248 seconds]
<_death> also good to have &allow-other-keys
<kolb> Is this a bug, or UB?
<kolb> (with-simple-restart (abort "Exit command level ~D." level) (find-restart 'abort))
<kolb> (this returns an invalid pointer in both SBCL and CCL)
<kolb> 1.4.1, 1.11 respectively
<kolb> cpape: ^^^
<Younder> _death, powerplay ;)
Guest74955 has quit [Remote host closed the connection]
Guest74955 has joined #lisp
smurfrobot has joined #lisp
<pjb> kolb: nope: (let ((level 0)) (with-simple-restart (abort "Exit command level ~D." level) (print (find-restart 'abort)))) #| #<restart abort #x34B5AEAD> --> #<BOGUS object @ #x34B5AEAD> |#
<pjb> kolb: the returned object is a restart, as expected. But it's dynamic extend.
yaewa has quit [Quit: Leaving...]
<pjb> It becomes invalid when you get out of dynamic scope, since you cannot invoke it anymore.
moei has joined #lisp
<kolb> pjb: so you say its UB to return that restart?
<pjb> yes.
<phoe> breaking dynamic extent is undefined.
<phoe> you're basically returning what has already been freed.
<kolb> cpape: ^^^
<kolb> SBCL still shouldn’t segfault
<phoe> kolb: it can do whatever it pleases, it's undefined to do that in code.
<Shinmera> It'd be nice if it wouldn't, but UB is UB.
<kolb> CCL behavior seems more sensible
<phoe> kolb: CCL also can do whatever it pleases, it's undefined to do that in code.
terpri` has joined #lisp
<kolb> "klar, kannste schon so machen, ist dann halt kacke"
SuperJen has joined #lisp
<Bike> dx violations are unfortunately kind of hard to determine sometimes.
neoncontrails has joined #lisp
<phoe> translation for non-Deutsch people: owszem, można to tak zrobić, ale i tak wyjdzie do dupy
<Bike> lol
<phoe> (:
<kolb> :-)
<kolb> international fam
<Bike> hard to determine -> for the compiler, i mean, thus why you get bad behavior instead of an error.
<shrdlu68> Is there a library that contains a sorting function such that I can sort subsequences in a sequences in a straight-forward manner?
<shrdlu68> An "extensible" sorting function.
<phoe> shrdlu68: subsequences in sequences? you could theoretically create displaced arrays (for vectors) and sort these
<Bike> or just sort with :begin and :end?
ym has quit [Quit: Leaving]
<phoe> and use some sort of mapc for nested lists.
<phoe> or what Bike said.
ym has joined #lisp
Guest74955 has quit [Ping timeout: 248 seconds]
<Bike> well that's not true, it would have to be sort guaranteed to be in place
<shrdlu68> I mean compare the subsequences to each other and sort them accordingly.
<pjb> (let ((foo (coerce (loop repeat 20 collect (random 10)) 'vector))) (sort (make-array 10 :displaced-to foo :displaced-index-offset 5) '<) foo) #| --> #(0 5 9 5 1 0 1 2 2 2 3 4 5 6 9 2 0 3 8 1) |#
<Bike> oh. that's weird.
<pjb> Why do you want libraries for oneliners?
<Bike> Like, use elements 0 and 1 as a value somehow, then 2 and 3, then 4 and 5?
<shrdlu68> I've had to use a flat vector rather than a vector of vectors, hence the mess.
<pjb> shrdlu68: use displaced arrays and no mess at all!
<Bike> pjb, i think you missed the clarification.
smurfrobot has quit [Remote host closed the connection]
<kolb> phoe: I fed the polish version back into google translate, funny expression!
smurfrobot has joined #lisp
<pjb> You can build a vector of displaced arrays, sort it, and then do whatever you want with the result.
<shrdlu68> pjb: It's a huge structure, the overhead would likely overwhelm my 8G of RAM.
<pjb> Then do it as you want.
<pjb> Alternatively, I take bitcoins for small (or big) jobs.
<schweers> I want to treat a double-float as 8 consecutive bytes. Is there a portable way of doing so apart from using CFFI?
<_death> shrdlu68: for data of this size you'd likely want to write something yourself
<phoe> schweers: no. The representation, according to standathe standard, is implementation-dependent.
<Bike> schweers: there's an ieee-floats library that i think can do that.
<schweers> ok, lets say semi-portable: sbcl and ccl would be enough for me
<pjb> schweers: com.informatimago.common-lisp.data-encoding.ieee-754:float-64-to-ieee-754 and com.informatimago.common-lisp.data-encoding.ieee-754:ieee-754-to-float-64
<Bike> it is, but you can standardly get a significand and exponent and sign.
<shrdlu68> _death: I see, I was making sure I was not missing an easier way of doing it.
<mrSpec> _death: personally I think &allow-other-keys makes code harder to debug, when you miss something and destructuring-bind doesn't protest.
<phoe> Bike: oh. Hm. Correct.
<schweers> Bike: thanks, I’ll look at that
<phoe> And from the sig/exp/sign you can compute the float back.
<pjb> see also decode-float and integer-decode-float, and scale-float, etc.
<schweers> pjb: thanks, I’ll look at that too :)
<_death> shrdlu68: also, may want to do it without consuming so much RAM, but that's just oldtimer speaking ;)
<_death> mrSpec: sure, but I often use plists for their ad-hoc extensibility.. otherwise, classes/structs will do
<mrSpec> got it
<Bike> looks like it returns an integer, but that's pretty straightforwardly turned into a byte vector if you want that
<pjb> and mind the exponent too.
<shrdlu68> _death: I'm not an oldtimer but I too feel this is inelegant. I have to generate combinations with repetitions, and I'm not aware of an efficient algorithm of doing so.
<schweers> pjb: does this handle special cases like NaN and infinity?
<pjb> schweers: not necessarily.
<pjb> I didn't assume that such values could be lisp objects.
<_death> shrdlu68: is this for testing (maybe fuzzing?)
<phoe> schweers: NaN/infinity values aren't portable. CL standard doesn't conform to the IEEE float standard.
<shrdlu68> _death: Nope.
red-dot has joined #lisp
<schweers> As both SBCL and CCL have infinity I should be fine, especially as I only /really/ care about SBCl. CCL portability is only something I aspire to in order to not be tied to just one implementation.
<_death> shrdlu68: I see.. it seems like a classic problem so I'm guessing there are academic papers
<schweers> so thanks for the tips, I’ll look into both of them
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
wxie has joined #lisp
eSVG has joined #lisp
Bike is now known as Bicyclidine
EvW has quit [Ping timeout: 246 seconds]
EvW has joined #lisp
<pjb> schweers: I wouldn't even know how to get infinity in lisp, since (/ 0) #| ERROR: division-by-zero detected performing / on (1 0) |#
<pjb> (* most-positive-double-float most-positive-double-float) #| ERROR: floating-point-overflow detected performing * on (1.7976931348623157D+308 1.7976931348623157D+308) |#
<pjb> etc.
<schweers> pjb: I also havn’t found a portable way to do so. Both SBCL and CCL have constants for this.
Jen has joined #lisp
Jen is now known as Guest70716
<schweers> Ah, I’ve even got something for ecl although I can’t use it for different reasons
<schweers> sbcl has sb-ext:double-float-positive-infinity and friends
<schweers> ccl has the same symbol in the package ccl
<schweers> but I think I don’t need infinity for the use case I described earlier
oleo has joined #lisp
SuperJen has quit [Ping timeout: 240 seconds]
smurfrobot has quit [Remote host closed the connection]
knobo has quit [Read error: Connection reset by peer]
Sigyn has quit [Quit: NO HEARTBEAT, NO SERVICE.]
Devon has joined #lisp
Sigyn has joined #lisp
Devon has quit [Ping timeout: 240 seconds]
wxie has quit [Quit: Bye.]
rippa has joined #lisp
smurfrobot has joined #lisp
mson has joined #lisp
Ven`` has joined #lisp
random-nick has joined #lisp
whoman has quit [Remote host closed the connection]
whoman has joined #lisp
Bike has joined #lisp
LiamH has joined #lisp
wooden has joined #lisp
smurfrobot has quit [Remote host closed the connection]
knobo has joined #lisp
eschatologist has quit [Ping timeout: 240 seconds]
smurfrobot has joined #lisp
damke_ has joined #lisp
__rumbler31 has joined #lisp
damke has quit [Ping timeout: 240 seconds]
knobo has quit [Ping timeout: 240 seconds]
smurfrobot has quit [Ping timeout: 240 seconds]
Cymew has joined #lisp
smurfrobot has joined #lisp
knobo has joined #lisp
Cymew has quit [Ping timeout: 268 seconds]
knobo has quit [Ping timeout: 240 seconds]
Lord_of_Life has quit [Changing host]
Lord_of_Life has joined #lisp
Lord_of_Life has quit [Changing host]
Lord_of_Life has joined #lisp
himmAllRight has quit [Remote host closed the connection]
himmAllRight has joined #lisp
Cymew has joined #lisp
emaczen` has joined #lisp
fikka has quit [Read error: Connection reset by peer]
emaczen has quit [Ping timeout: 248 seconds]
domovod has quit [Quit: WeeChat 1.9.1]
dec0n has quit [Read error: Connection reset by peer]
Cymew has quit [Ping timeout: 240 seconds]
knobo has joined #lisp
Cymew has joined #lisp
eschatologist has joined #lisp
Devon has joined #lisp
fikka has joined #lisp
Cymew has quit [Ping timeout: 260 seconds]
Devon has quit [Ping timeout: 240 seconds]
random-nick has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 240 seconds]
python476 has joined #lisp
random-nick has joined #lisp
cromachina has quit [Read error: Connection reset by peer]
shrdlu68_ has joined #lisp
xrash has joined #lisp
damke has joined #lisp
shrdlu68 has quit [Remote host closed the connection]
warweasle has joined #lisp
damke_ has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
Guest24518 has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
jfe has joined #lisp
<jfe> hello
<beach> Hello jfe.
hajovonta has quit [Quit: hajovonta]
<jfe> i'm trying to get the function that corresponds to a symbol in a list but (function ...) seems to only accept "direct" symbols as arguments. is there a trick to doing this?
knobo has quit [Ping timeout: 240 seconds]
<beach> clhs fdefinition
<beach> jfe: You can't use FDEFINITION to find the definition of local functions. Only global ones. Is that adequate?
Jesin has joined #lisp
<jfe> beach: thanks, yes that's adequate.
smurfrobot has quit [Remote host closed the connection]
karswell_ is now known as karswell
resttime has quit [Quit: Leaving]
damke_ has joined #lisp
Cymew has joined #lisp
smurfrobot has joined #lisp
damke has quit [Ping timeout: 240 seconds]
Tobbi has joined #lisp
shrdlu68_ has quit [Remote host closed the connection]
svetlyak40wt has joined #lisp
Cymew has quit [Ping timeout: 240 seconds]
svetlyak40wt has quit [Client Quit]
fourier has joined #lisp
shrdlu68 has joined #lisp
fikka has joined #lisp
flamebeard has quit [Quit: Leaving]
brendyn has quit [Ping timeout: 240 seconds]
waynecolvin has joined #lisp
fourier has quit [Ping timeout: 248 seconds]
dalkire has joined #lisp
EvW has quit [Ping timeout: 258 seconds]
vlatkoB has quit [Remote host closed the connection]
hexfive has joined #lisp
igemnace has joined #lisp
Devon has joined #lisp
shrdlu68 has quit [Ping timeout: 248 seconds]
Devon has quit [Ping timeout: 246 seconds]
shrdlu68 has joined #lisp
jfe has quit [Ping timeout: 268 seconds]
EvW has joined #lisp
Guest70716 has quit [Remote host closed the connection]
Guest70716 has joined #lisp
Cymew has joined #lisp
<phoe> (flet ((foo () 42)) #'foo) returns a proper function
xrash has quit [Ping timeout: 248 seconds]
<phoe> oh, I think I know what he was trying to do.
<phoe> he was trying to see if a symbol is lexically fbound.
xrash has joined #lisp
vlatkoB has joined #lisp
Cymew has quit [Ping timeout: 250 seconds]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vlatkoB has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 240 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
vlatkoB has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
damke has joined #lisp
damke_ has quit [Ping timeout: 246 seconds]
quazimodo has joined #lisp
<schweers> is there a way to find the size of a (built-in) type in lisp? for instance to find out how much space is needed for a fixnum?
<pjb> Read the source of the implementation.
<beach> Sure. Round it up to an even number of bytes, and you have a pretty good idea.
<Bike> it might not even be a universal quality.
<schweers> I meant whether ther was a way to go from a type specifier to a number of bits or bytes
<beach> schweers: Common Lisp doesn't work that way.
<Shinmera> CL says nothing about memory, so no
<pjb> It's ludicruous to try to know the size of fixnum: it could be inlined!
<Bike> For example, you could have a complex that takes up a header word and two content words boxed, but in some situations it could be unboxed and only be the content words.
<schweers> yeah, normally. I know. I thought I could make my cludge less hacky ;)
Ven`` has joined #lisp
jfe has joined #lisp
<Bike> If your kludge involves objects having coherent sizes it's already too hacky. What are you doing?
orivej has quit [Ping timeout: 246 seconds]
<schweers> I have a large amount of data which will not fit into ram, so I’m offloading it into an on-disk key-value store (kyotocabinet). I can but byte vectors in there, and I want to dump a simple struct which constists of only ints and floats.
<varjag> you can keep all your data over in c-land via cffi, and know the size of that
* varjag is half-kidding
<schweers> that is also why I asked about putting floats into a byte vector a little while ago
<Bike> So you want to serialize.
<schweers> varjag: I was thinking about that. Would have done it if I hadn’t gotten a good answer here ;)
<schweers> basically, yes
<schweers> but I want it compact
<Bike> If you're only worried about integers and floats- for floats, you can check your implementation documentation. For integers, integer-length will tell you how many bits are required to store it.
<pjb> If you want your data on file, then why do you care about the internal representation?
<pjb> Just write the bytes you want!
<Bike> Yes, the lisp's representation is irrelevant.
<pjb> See for example: com.informatimago.common-lisp.heap.
<Bike> And for an integer type specifier, well, (unsigned-byte 7) means it takes seven bits if you don't need a sign, of course
<schweers> pjb: that is what I am doing, I just wondered if there was a better way. But given your comments and some more thought I guess it may be the right way after all
damke has quit [Ping timeout: 240 seconds]
<Bike> If you're worried about other possibly compound objects, the internal representation might not help since it could be full of pointers
<Bike> which pretty much does you no good.
nowhere_man has joined #lisp
<schweers> nah, I know they consist only of primitives
vertigo has quit [Ping timeout: 248 seconds]
damke has joined #lisp
__rumbler31 has quit [Quit: Leaving...]
vertigo has joined #lisp
smurfrobot has quit [Remote host closed the connection]
__rumbler31 has joined #lisp
smurfrobot has joined #lisp
shrdlu68 has quit [Remote host closed the connection]
smurfrobot has quit [Remote host closed the connection]
shrdlu68 has joined #lisp
msb has quit [Quit: ENOENT]
_cosmonaut_ has quit [Ping timeout: 255 seconds]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
msb has joined #lisp
EvW has quit [Ping timeout: 240 seconds]
Devon has joined #lisp
fikka has joined #lisp
<jfe> can someone here explain the reason why many compilers are bootstrapped with C/C++?
<Shinmera> Inertia, low-level control, bad foresight.
Devon has quit [Ping timeout: 240 seconds]
zmt00 has joined #lisp
<jfe> i'm an amateur on compilers but i've been writing a simple one in lisp and it just seems silly to me to use anything but a high-level language for bootstrapping.
fikka has quit [Ping timeout: 240 seconds]
* schweers just realized that sbcl has no support for block compilation
<schweers> is the proper way do deal with this to use large-ish labels blocks around what was previously an entry point function?
<Shinmera> jfe: C is a systems language, so a primitive compiler for it is often a first target for a new platform. You can then bootstrap a better C compiler with that. If your language runtime is then written against C, you get a new target "for free". Or at least that's the idea behind writing a compiler in C.
Cymew has joined #lisp
<Shinmera> Naturally this does not go as smoothly as one would like, so
neoncontrails has quit [Remote host closed the connection]
neoncontrails has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<Bike> Depends on what you mean by "bootstrapping", jfe
<Bike> The C _runtime_ is pretty much everywhere, and contains a number of useful things, so using it can be convenient. It would be shit to write a compiler in though.
python476 has quit [Quit: damn you nickserv]
<Bike> to write a compiler in C, i mean
Guest70716 has quit [Remote host closed the connection]
<beach> Yes, the GCC people are very brave.
<beach> LLVM too, by the way.
Guest70716 has joined #lisp
<pjb> gcc has a good portion of greenspunning in it…
<pjb> (being written by a lisper originally…)
Cymew has quit [Ping timeout: 240 seconds]
<beach> Indeed.
smurfrobot has joined #lisp
<Shinmera> beach: LLVM is C++, which is worse/better than C depending on who you ask :)
BitPuffin|osx has quit [Ping timeout: 255 seconds]
<beach> I can see that, yes. :)
neoncontrails has quit [Ping timeout: 260 seconds]
__rumbler31 has quit [Ping timeout: 246 seconds]
<Shinmera> Isn't Clisp also largely written in C?
<pjb> Shinmera: about 50%
Jesin has quit [Remote host closed the connection]
<Bike> Is it the compiler that is, or the runtime?
<pjb> the run time.
<beach> jfe: I think the analyses of Shinmera and Bike are correct. But there are many disadvantages with writing a Common Lisp system in C or C++. There seems to be a widespread idea that a lower-level language has to be used in order to implement a higher-level one.
<pjb> The clisp compiler itself is written in CL.
_cosmonaut_ has joined #lisp
<Bike> Cos, you know, writing a language runtime in C I can understand, you could debate whether that's a good idea. Writing a compiler in C is just bad.
<pjb> Bike: depends on whether you have a native compiler or not really.
<Bike> What?
<pjb> If you have a native compiler, then just add code generation for syscalls, and you can write your libcl instead of using libc.
<pjb> (actually if you have a VM you can do that too).
<Bike> Oh, you mean, for whether you should write a language runtime in C. Yes, sure.
python476 has joined #lisp
Xal has quit [Ping timeout: 268 seconds]
<waynecolvin> what is needed to impliment a core lisp? isn't the execution model and debugging features different than C...
<pjb> waynecolvin: not really.
<Bike> what is "needed"?
<Bike> and what is "core"?
<pjb> A lot of things are implementation dependent and a default implementation doing nothing is often allowed.
<pjb> notably the debugger, or the repl, or the garbage collector, etc, are optional.
Xal has joined #lisp
<pjb> Even the compiler is optional (you only need to perform minimal compilation, ie. macroexpanding (and special declaration noting).
<beach> waynecolvin: The people who use C to implement Common Lisp often rely on traditional, but unspecified or undefined, features of C.
<pjb> And conversely, C implementation can include REPL, debuggers and interpreters. Cf. Cint, EiC, etc.
<pjb> There are very few (standard) C programmers.
<waynecolvin> well, if CL has regular arguments, &key arguments etc, should your VM have bloated activation recotds for all functions?
<pjb> As you wish.
<Bike> Bloat sounds bad, whatever it is. So i'm going to say it "should not" have bloat.
<beach> I was just about to say something similar.
<pjb> About half the functions in CL can be implemented trivially calling the other half (eg. (setf (symbol-function 'delete) (symbol-function 'remove)) ; done )
<jasom> waynecolvin: C has variadic functions. keyword arguments are just a special case of variadic functions
<jasom> waynecolvin: it is not required that lisp use the same ABI as used by C on the system, but doing so isn't automatically bad; even multiple return values of size less than N can be done efficiently for all ABIs that permit N registers to be modified by the caller
smurfrobot has quit [Remote host closed the connection]
dddddd has joined #lisp
igemnace has quit [Quit: WeeChat 2.0]
Devon has joined #lisp
<shka> good evening
<beach> Hello shka.
quazimodo has quit [Ping timeout: 268 seconds]
EvW1 has joined #lisp
neoncontrails has joined #lisp
<beach> waynecolvin: I have the same question as Bike, what is included in a "core lisp"?
raphaelss has joined #lisp
FreeBirdLjj has joined #lisp
<waynecolvin> just a lisp kernel for bootstrapping, i used the wrong term
<shka> waynecolvin: unfortunately, CL is not formally layered
<Bike> you don't have to build a system that way.
<beach> waynecolvin: So you would write the compiler in that subset?
smurfrobot has joined #lisp
<beach> waynecolvin: That turns out to be very painful.
<shka> eulisp is
EvW1 has quit [Ping timeout: 246 seconds]
<waynecolvin> there are lisp/subset-to-c translators but i don't know what subset or how they work lol
<pjb> If you're really serious about bootstrap, then you start at the bash, and echo bytes to your exe file. Then you will bootstrap from a few binary instructions.
smurfrobot has quit [Remote host closed the connection]
<beach> waynecolvin: I had a better idea for SICL, namely to use an existing Common Lisp implementation to compile the code. That way, I can use the full language to write the compiler.
smurfrobot has joined #lisp
<pjb> You may start implementing car cdr cons if null and lambda (no closure, just functions) and read-char in binary. This could be feasible. Then from that you could implement (still in binary) a simple reader, eval and print. Then you would be able to go on in "lisp".
<waynecolvin> does it generate bytecode?
<beach> waynecolvin: My system? No, when it is done it will generate native code.
<pjb> beach lives in 2017, not in 1957.
<beach> Thanks, pjb! :)
<jackdaniel> waynecolvin: if you look for something minimal, what is not CL to bootstrap from, you may check out ecl_min (something used to build ecl's compiler)
pseudonymous has joined #lisp
fikka has joined #lisp
<shka> pjb: 2017 sounds like beach should generate JS :P
<beach> waynecolvin: But that's beside the point here. The point is that, if you build your system from a subset the way you describe, you either end up writing your compiler in a subset of the language, or you end up with code that is replaced once the system is built, or probably both.
vertigo has quit [Ping timeout: 248 seconds]
<pjb> This is something you do only the first time you implement a new language!
<waynecolvin> interesting https://gitlab.com/embeddable-common-lisp/ecl/issues/350 hey that's you!
<Shinmera> compiling to machine code or assembly just means emitting bytes or characters to disk or memory. Anything can do that. There's really no reason to bootstrap from a minimal system unless you have awful constraints like needing to interop with a system that is underspecified.
<jackdaniel> yup
<waynecolvin> pjb : that's a classic
epony has quit [Read error: Connection reset by peer]
<pjb> waynecolvin: Start with that, implement your first primitive in binary by hand, until you have your minimal REPL, and then go on writing lisp.
epony has joined #lisp
<jackdaniel> reading LiSP is a very good reading to learn how to write it and discusses important topics like variables etc
<waynecolvin> i worked out a text pattern to make DOS/CP-M86 assemble binary, but never made a Forth out of it
vibs29 has quit [Ping timeout: 260 seconds]
vibs29 has joined #lisp
panji has joined #lisp
panji has left #lisp [#lisp]
jack_rabbit has quit [Read error: Connection reset by peer]
vibs29 has quit [Ping timeout: 240 seconds]
vibs29 has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
vertigo has joined #lisp
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jack_rabbit has joined #lisp
Guest70716 has quit [Remote host closed the connection]
Guest70716 has joined #lisp
random-nick has quit [Remote host closed the connection]
<emaczen`> the link README-PREPARE.txt is broke at commonlisp.net/project/ecl
<emaczen`> where should I got to read how to setup commonlisp and android?
<jackdaniel> check out INSTALL file
<jackdaniel> if you are intersted in eql5-android, you'll find a good tutorial in this project
pseudonymous has quit [Ping timeout: 240 seconds]
abc has joined #lisp
Fare has joined #lisp
abc is now known as Guest42452
orivej has joined #lisp
Guest42452 has left #lisp [#lisp]
jfe has quit [Remote host closed the connection]
jfe has joined #lisp
j0nd0e has joined #lisp
zooey has quit [Ping timeout: 248 seconds]
<smurfrobot> does amyone know of recent survey/review papers discussing implicit parallelism and functional programming languages like lisp?
<pjb> Can you imagine anybody financing such a work today?
osune has joined #lisp
<emaczen`> I'm getting an Error with ECL: Detected access to an invalid or protected memory address
<smurfrobot> i am just curious about what has been done in the area.
<smurfrobot> so nothing recent?
<pjb> No, nothing recent.
<Xach> lisp isn't like that.
<pjb> But google about it, you might find very good papers about it 30 years old.
<smurfrobot> hmm ok thanks
FreeBirdLjj has quit [Remote host closed the connection]
turkja has quit [Ping timeout: 260 seconds]
__rumbler31 has joined #lisp
alexmlw has joined #lisp
zooey has joined #lisp
_cosmonaut_ has quit [Remote host closed the connection]
random-nick has joined #lisp
<Ober> so can Iota transform something like libssh to portable cl?
<phoe> Ober: what's Iota?
vertigo has quit [Ping timeout: 260 seconds]
<phoe> oooh, the compiler from froggey
vertigo has joined #lisp
<phoe> Ober: I think it can, since you can go from C through LLVM-IR to CL this way
<osune> can somebody recommend a hassle "free" PAS like Heroku for CL ? I want to host a small chat bot for no cost but fun.
<Ober> aws nano is free
<froggey> Ober: theoretically. I'm not sure how you'd interact with a translated library though
SaganMan has quit [Quit: WeeChat 1.6]
<Ober> froggey: ok. will pass some stuff through it to get a better idea
<Ober> great stuff btw :P
<osune> Ober: does it has ready to go sbcl? There seems no maintained base "Buildapp" Template for Heroku.
<waynecolvin> xlisp is fairly pretty easy to build on android (use make -f makefile.unix) but it isn't standard. ECL is much harder but there are binaries for arm32 you can download
<Ober> you could host a docker on there you pull from anywhere
<froggey> thanks, let me know if you run into trouble
<osune> Ober: never used docker, so I totally missed this option.
<Ober> `docker search sbcl` gives a ton of hits
<osune> thanks i give it a look
<phoe> My indentation just went crazy. My macro suddenly stopped indenting like it should and instead my macro is like https://i.imgtc.com/ni1wA3y.png
damke_ has joined #lisp
damke has quit [Ping timeout: 240 seconds]
<osune> phoe: i only know this behavior if my lisp buffer has no repl mode (or was it the other way round?)
<phoe> (defmacro define-raptor-module (name (&rest protocol-classes) &body clauses) ...) is how it's defined.
<phoe> hah, restarting spacemacs solved it. mysterious
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
<k-stz> I'm reading "Lisp outside the box" and in a chapter on Memory, the author mentions "The stack is a data structure which, like the GCed heap, was originally invented for
<k-stz> Lisp back in the 1950s.", I think that's interesting and like to back it up with some sources, but I can't find any, and for the stack I found contradicting ones
<shka> hmmm
<shka> that is interesting indeed!
<k-stz> :-)
<shka> i really don't know, but it may be even true
<shka> p_l: help us!
<pjb> Also any early compilation book; they'll discuss at length about displays (storage for the frames of functions).
zooey has quit [Remote host closed the connection]
<shka> pjb: oh, wow, thanks!
<shka> you are awesome
zooey has joined #lisp
<shka> i can't imagine how astonishingly innovative initial lisp was
<Bike> oh, the stack as in being made out of frames
<Bike> not having those explains why early fortran didn't have recursion
<pjb> shka: Actually, it was a second generation system: LISP has been developped only because neither the FORTRAN guys nor the Algo guys accepted to add ternary IF or COND to their languages! As for the cons cells, they were invented by NSS: http://informatimago.com/articles/flpl/index.html
hydan has quit [Quit: Connection closed for inactivity]
<pjb> Algol
<Bike> didn't even have enough bytes to finish the name
<shka> pjb: fascinating
smurfrobot has quit [Remote host closed the connection]
<k-stz> pjb: I'll keep it in the back of my head, I might just have occasion to check out your work, but its too much for now
LocaMocha has quit [Ping timeout: 248 seconds]
<k-stz> thanks, though
Cthulhux has quit [Changing host]
Cthulhux has joined #lisp
EvW has joined #lisp
shka has quit [Quit: Konversation terminated!]
varjag has joined #lisp
damke has joined #lisp
damke_ has quit [Ping timeout: 240 seconds]
damke_ has joined #lisp
Jesin has joined #lisp
damke has quit [Ping timeout: 240 seconds]
damke has joined #lisp
damke_ has quit [Ping timeout: 240 seconds]
j0nd0e has quit [Ping timeout: 240 seconds]
raphaelss has quit [Quit: Leaving]
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
shka has joined #lisp
nirved has quit [Quit: Leaving]
knobo has joined #lisp
EvW has quit [Remote host closed the connection]
zooey has quit [Remote host closed the connection]
zooey has joined #lisp
sz0 has quit [Quit: Connection closed for inactivity]
EvW has joined #lisp
dalkire has quit [Remote host closed the connection]
sukaeto has joined #lisp
knobo has quit [Ping timeout: 248 seconds]
knobo has joined #lisp
smurfrobot has joined #lisp
fikka has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
fikka has quit [Ping timeout: 246 seconds]
knobo has quit [Ping timeout: 240 seconds]
Devon has quit [Ping timeout: 260 seconds]
osune has quit [Remote host closed the connection]
osune has joined #lisp
pierpa has joined #lisp
<python476> ever wanted to see lisp and quantum computers ? https://www.youtube.com/watch?v=f9vRcSAneiw
Guest70716 has quit [Remote host closed the connection]
Guest70716 has joined #lisp
jfe has quit [Ping timeout: 276 seconds]
shka has quit [Ping timeout: 248 seconds]
gtuser has quit [Quit: gtuser]
Bike has quit [Ping timeout: 260 seconds]
vlatkoB has quit [Remote host closed the connection]
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Jesin has quit [Quit: Leaving]
<Cthulhux> lovely
<python476> Cthulhux: you watched it ?
<Cthulhux> not completely yet
<Cthulhux> TL;DW ;-)
<python476> Cthulhux: as you wish
jfe has joined #lisp
<python476> I loved the "grad students discover lisp and report about it down the road"
<python476> anyway back to lol
Xof has quit [Ping timeout: 248 seconds]
damke_ has joined #lisp
damke has quit [Ping timeout: 240 seconds]
kokonaisluku has joined #lisp
random-nick has quit [Remote host closed the connection]
smurfrobot has quit [Remote host closed the connection]
SuperJen has joined #lisp
resttime has joined #lisp
damke_ has quit [Ping timeout: 240 seconds]
Guest70716 has quit [Ping timeout: 260 seconds]
Tobbi has joined #lisp
<resttime> I got CCL 1.9 working on flight hardware, I got told if packaged then it might get deployed with the satellite once it goes to space :3
<resttime> I took a picture of testing sending a hex command to a serial device connected and it works: https://i.imgur.com/KLKm9iN.png
damke_ has joined #lisp
<whoman> =) =)
<resttime> If I can get PPP running by compiling the kernel module then I might be able to get a REPL over SSH
<resttime> At least on ground for testings
<pjb> Do you have time to upgrade to 1.10 or 1.11?
<pjb> Because IIRC, I had some bad bugs in 1.9, and was quite happy to upgrade to 1.10… (but it may have been MacOSX specific bugs, I don't remember).
<resttime> I wasn't sure how, I read there would be some issues because the hardware uses soft float and that was 'abandoned' 1.10 and onwards would mess up some math functions
<pjb> oh, in this case, stay with 1.9, indeed.
<whoman> #1=with all of the (with-all-of-the-... in lisp, is there a commonly accepted practice to jump into rabbit holes ? also what is that procedure =)?
<resttime> pjb: Yeah reading over release notes again for v1.10 and it says it https://trac.clozure.com/ccl/wiki/ReleaseNotes/1.10
fikka has joined #lisp
<pjb> whoman: I donm't understand your question.
<whoman> pjb: i see a lot of lisp code using (with-...) as wrappers to create/destroy of various states or objects. is it normal that main program code is often wrapped in all of that ?
<resttime> If I can send lisp to space and make it useful I will be satisfied (and then I will try to send my art on the satellite too hehehe)
<pjb> whoman: yes.
<pjb> whoman: it's the RAII pattern, basically.
knobo has joined #lisp
osune has quit [Read error: Connection reset by peer]
<pjb> resttime: of course, if you write papers and make youtube conferences, you'll be in good place next to DeepSpace 1 and its RAX software.
LiamH has quit [Quit: Leaving.]
jfe has quit [Ping timeout: 255 seconds]
pseudonymous has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
vertigo has quit [Read error: Connection reset by peer]
vertigo has joined #lisp
smurfrobot has joined #lisp
cas_ has joined #lisp
<whoman> pjb: okay thanks, i will search =)
<pjb> whoman: have a look at with-open-file ; macroexpand it.
<pjb> clhs with-open-file
<resttime> Hahaha no way, what I do is so little. I am in disbelief that I somehow ended up this kind of stuff. Like I see how stuff happened but at the same time I'm like, "waht? serisouly?"
knobo has quit [Ping timeout: 240 seconds]
_krator44 has quit [Changing host]
_krator44 has joined #lisp
_krator44 has quit [Changing host]
_krator44 has joined #lisp
jfe has joined #lisp
<whoman> pjb: ive dont a bunch of C++ so the idioms make a lot of sense to me. and now i understand.. so its quite alright to have many levels deep of main code running inside of the insides of the insides of ... ? perhaps i am touching in to some stack depth trauma, i am not smart enough to see
<jasom> whoman: there's no issue whatsoever in doing it
neoncontrails has quit [Remote host closed the connection]
<jasom> whoman: because of the possibility of non-local exits, you're going to have a lot of code of the pattern (let ((foo ...)) (unwind-protect (progn ...) (destroy foo))) the WITH- familiy of macros just allow you to not worry about all the moving parts there.
neoncontrails has joined #lisp
Guest24518 has left #lisp [#lisp]
lisp_guest has joined #lisp
<lisp_guest> hi everyone, could someone tell me what's wrong with this piece of code? http://rextester.com/TDO73450
<lisp_guest> i've been starting at it for a while but can't seem to find what's wrong
<lisp_guest> this is almost literally copied from Let Over Lambda's Chapter 3
knobo has joined #lisp
<Bicyclidine> this code is nonconforming. (the code in let over lambda is nonconforming.)
<jasom> (print (1 2 ,g!three)) <-- looks very wrong
Bicyclidine is now known as Bike
damke has joined #lisp
<lisp_guest> it does seem fishy to me too, but i've been thinking that the book must be right, so it's probably my fault in not understanding backquote correctly or something
<Bike> no, the book is wrong. you're not the first person to come in here asking about defmacro/g!
<lisp_guest> hah, really, that makes me happy :-)
<Bike> when i say "wrong" i mean that it works on several implementations, such as ccl. but it's not conformant code.
<lisp_guest> i see. what exactly is non-conforming about ti?
<lisp_guest> it*
<whoman> jasom: ah cool, that is exactly what i was hoping =) i will read more about non-local exits later on. im still not approaching return/return-from and how that seems a bit magical
<Shinmera> It's ironic that a book with a tone so preachy and arrogant has bad code in it
neoncontrails has quit [Ping timeout: 240 seconds]
<whoman> lol that sounds like perfect compliment Shinmera .
<Shinmera> whoman: ?
damke_ has quit [Ping timeout: 240 seconds]
<Shinmera> It's the opposite of a compliment. I'm making fun of the author.
<lisp_guest> yeah, reading the introduction made the book seem like ***THE BOOK***
<Bike> clhs `
<pjb> whoman: that said, if you have to open several files and it bothers you to have several with-open-file embedded, you can always write a macro to be able to open them all in one go. Just like LET lets you bind several variables at once.
<jasom> whoman: even absent non-local exits, it's useful to not forget the teardown code
<Bike> "An implementation is free to interpret a backquoted form F1 as any form F2 that, when evaluated, will produce a result that is the same under equal as the result implied by the above definition, provided that the side-effect behavior of the substitute form F2 is also consistent with the description given above."
Cymew has joined #lisp
<Bike> this means that `whatever can be read as anything. it can incorporate things like vectors and structs that flatten doesn't know about.
<pjb> jasom: it's probably not a stand alone expression. Check where it occurs, and see if there's a ` around it.
damke_ has joined #lisp
<whoman> Shinmera: why would someone with ego problems have good code? is what i am thinking.
<jasom> whoman: I think Shinmera was more "People in glass houses shouldn't throw stones"
<whoman> pjb: ah, that makes sense! thinking ahead of me there, thx =)
<lisp_guest> Bike: hmm, so would that be the reason why one of the symbols is literally ",g!three" instead of "g!three" as i would expect?
<Shinmera> Well, I mean, some people have a good justification for saying their stuff is good. Because it is actually good.
<Bike> lisp_guest: that said, your code is wrong in another way, and i don't know if it's from the book
<lisp_guest> Bike: probably is, i'm all ears
<pjb> lisp_guest: The bug is on the second line of: (defmacro/g! test-macro (x y) `(let ((,g!three 3)) (print (1 2 ,g!three))))
<Bike> lisp_guest: first you call syms-in, which sort of flattens a form, then you call g!-sym-p on each item
<pjb> it should be `(let ((g!three 3))
<Bike> lisp_guest: g!-sym-p takes the symbol-name immediately
smurfrobot has quit [Remote host closed the connection]
<Bike> lisp_guest: so, if your form has a 3 in it, your thing tries to do (symbol-name 3), which is wrong
damke has quit [Ping timeout: 240 seconds]
<Bike> lisp_guest: it checks for symbolp right below that, but it should be checking above
<lisp_guest> oh right, thanks
zachk has joined #lisp
<lisp_guest> Bike: and to make the code actually work portably, what would i have to do?
<Bike> pjb: the intent of this is that g!three will be bound at macroexpansion time to a gensym
<pjb> Well, the other bug is in (print (1 2 ,g!three)) since 1 is not the name of a function!
<whoman> Bike: whoa that is intense
<lisp_guest> pjb: but i want to bind the symbol that's bound to g!three
<whoman> @ `
<Bike> oh, that is a bug.
Cymew has quit [Ping timeout: 260 seconds]
<jasom> pjb: that's what I was referring to when I said it looked wrong
<Bike> lisp_guest: there's no way to do this well (where "well" includes conformingly)
jfe has quit [Ping timeout: 240 seconds]
<jasom> Bike: I disagre
<pjb> In that case it would need (print '(1 2 ,,g!three))
<Bike> oh?
<jasom> Bike: you can use a portable quasiquote implementation
<lisp_guest> pjb: would that be a quote or a quasiquote on that list?
<Bike> backquote is only part of the problem. other code can include code in non-lists.
<jasom> Bike: oh right, macros can expand to whatevery the implementation desires
<Bike> (defmacro foo (thing) (struct-read thing)) is ok. rare, but ok, and implementations do this kind of thing sometimes.
<Bike> (meaning you have a literal struct in the source)
<pjb> well if g!three is bound to a variable name, then it should be (print (list 1 2 ,g!three))
<jasom> wait, this happens before the body is macroexpanded, so it shouldn't be an issue there, right? i.e. it's not the generic code-walker problem
SuperJen has quit [Remote host closed the connection]
<Bike> the problem is that it's not macroexpanded.
<lisp_guest> pjb: what about (print `(1 2 3 ,,g!three))?
<Bike> what sbcl does is read ,foo as #S(COMMA :form foo) or something.
SuperJen has joined #lisp
<whoman> no lisp eval bot eh?
<jasom> Bike: which is why using a portable quasiquote library is okay
<Bike> so in the unmacroexpanded code, there's a literal struct. and in that struct, there's something that will be a form later
<pjb> but syms-in is buggy, it should be: (defun syms-in (&rest body) (remove-if-not (functiokn symbolp) (remove-duplicates (flatten body))))
<Bike> but defmacro/g! can't know to get the symbol out
<jasom> Bike: the rest of the standard readtable is pretty well defined, right? quasiquotation is the only issue
<Bike> i already said there are other cases
<jasom> Bike: do you have an example?
<Bike> (defstruct foo form) (defmacro unfoo (thing) (foo-form thing)) now have code like (unfoo #.(make-foo :form 'g!three))
<lisp_guest> pjb: i've fixed g!-sym-p according to what bike said, i.e. moving the check for symbolp before using (symbol-name s)
<lisp_guest> so it should be ok now, right?
<Bike> it's still fundamentally non conformant, lisp_guest
<pjb> lisp_guest: it would do too, yes.
<jasom> Bike: I'm missing how (foo-form thing) can have a *read-time* expansion of a non-list
<Bike> huh? it's not read time.
<lisp_guest> Bike: so using what you quoted from clhs, where exactly is the part that's wrong?
<Bike> the part that's wrong is the assumption that lisp code is entirely contained in list structure
<jasom> oh, I see what you're saying. It's not non-conformant, it just requires that the body be a list.
<lisp_guest> oh i see, so the code walker incorrectly assumes everything will be a list?
<jasom> (Bacquote still needs to be fixed)
waynecolvin has quit [Quit: WeeChat 2.0]
<pjb> So yes, the code in "Let Over Lambda" is pedagogical! You have to find the bugs in it… :-)
<Bike> okay, yes. but this is a bad requirement to make.
<Bike> especially since the problem being solved is being too lazy to use with-gensyms explicitly :/
<jasom> LoL shows it in use with quasi-quote, which is absolutely wrong; the rest becomes more of a style question
<lisp_guest> indeed :-), but it's a fun exercise
<lisp_guest> so basically, quasiquotes when read have impl-defined representation?
<jasom> as long as LoL is approached as a fun exercise it's fine. It shouldn't be used as a library of useful macros
<Bike> and that representation can include code outside of list structure, that is the obvious problem, yes.
<lisp_guest> what does "list structure" mean here?
<jasom> lisp_guest: yes. There are similar issues e.g. for pattern matching. The solution there is to use a known quasiquote implementation (e.g. fare-quasiquote)
<Bike> flatten only knows about lists.
<jasom> lisp_guest: where the onlyh aggregate datatype is a list
<jasom> e.g. (foo (bar)) vs. (foo #(bar))
<lisp_guest> right, that's what i meant, but the formulation was kinda weird (for me at least)
<lisp_guest> mhm
<lisp_guest> s/meant/thought/
<Bike> it's a subtle issue. experienced lisp programmers can still find this shit confusing.
<lisp_guest> i've read the clhs page multiple times but didn't connect the fact that flatten only works on lists and that "any other form F2" might contain non-lists
rawste has quit [Quit: Quitting…]
<Bike> see? subtle
<lisp_guest> indeed, but it's also my noobiness i blame :-)
<Bike> i don't think any implementation did choose to expand into non-lists, before sbcl switched to that uh... a year ago?
<lisp_guest> i mean, i started seriously with studying lisp only a month or so ago
<Shinmera> I remember some people getting mad about that
<lisp_guest> i think that's just what i read today lol
<lisp_guest> but i couldn't understand what the fuss was about
<lisp_guest> hah i guess now it makes sense (if that really was the thing i read about)
<lisp_guest> so walking over code that uses ` is a no-no
<Bike> walking over code like this in general is not great.
<Bike> anyway, like i said, you're not the first newbie to come in here asking about this. it's most of what i've heard of LoL, so my opinion isn't great, but on the other hand i haven't heard any OTHER problems with it, so just be cautious i guess
<lisp_guest> yeah, glad i had someone to ask :-), thanks
<pjb> lisp_guest: depends on what you mean by "walking over". The expansions should contain only functions, macros and standard special operators, so a code walker should be able to interpret it correctly.
<lisp_guest> another question, in the body of defmacro/g!, inside the first quasiquote, when ,@body is spliced into the list
<pjb> The only problem to code walkers are implementation specific special operators (not covered by a macro expanding to non implementation specific special operators).
<lisp_guest> in the case where body itself uses a quasiquote (i.e. in my test-macro)
<lisp_guest> what is expanded first? the quasiquote in body, or the beginning quasiquote
cas_ has quit [Quit: Leaving]
<lisp_guest> pjb: understood
smurfrobot has joined #lisp
kokonaisluku has quit [Quit: ChatZilla 0.9.93 [Firefox 52.5.0/20171117140933]]
<lisp_guest> the relevant definition from clhs i see about ,@body is "[,@form] is interpreted as form"
<lisp_guest> "form" here is my "body", but "body" itself is a list of something that uses quasiquote
smurfrobot has quit [Remote host closed the connection]
shenghi has quit [Ping timeout: 246 seconds]
neoncontrails has joined #lisp
__rumbler31 has quit [Ping timeout: 240 seconds]
knobo has quit [Ping timeout: 240 seconds]
shenghi has joined #lisp
smurfrobot has joined #lisp
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
notemerson has joined #lisp
<jasom> lisp_guest: quasiquote is expanded by the reader, and are expanded as soon as it is read
<jasom> lisp_guest: if you have a quasiquote inside a quasiquote, recurse down to the inner quasiquote
<jasom> ``(foo ,bar)) the outter quasiquote never sees the comma
emaczen` has quit [Ping timeout: 240 seconds]
smurfrobot has quit [Remote host closed the connection]
<lisp_guest> jasom: right, so in this example http://rextester.com/TDO73450 (ignore the mentioned bugs), when ,@body is used to splice another list, i.e. the list "body"
smurfrobot has joined #lisp
<lisp_guest> this list "body" was constructed by capturing the body of "test-macro" which itself had a quasiquote
<jasom> lisp_guest: that's the wrong way to think about it
<lisp_guest> was this quasiquote already expanded then, before being bound to "body"?
<jasom> lisp_guest: there are no nested quasiquotes there.
<lisp_guest> yeah, i'm trying to wrap my head around it
<jasom> lisp_guest: yes quasiquote is expanded at *read* time, long before macros ever get into it
smurfrobot has quit [Remote host closed the connection]
<jasom> (read-from-string "`(foo , bar)")
<lisp_guest> what am i supposed to see?
<jasom> of course sbcl doesn't help you out for making it obvious
<lisp_guest> right, so i'd have to use some other implementation that doesn't use these internal representations for quasiquote
groovy2shoes has quit [Excess Flood]
<lisp_guest> i guess that's part of why it was so confusing
<jasom> I should say, it is expanded to some unknown FORM that when evaluated will generate something equivalent to what the hyperspec says
groovy2shoes has joined #lisp
<lisp_guest> being aware that the internal representation of quasiquote is impl-specific makes it clearer now a bit
<lisp_guest> hm, clips also doesn't help, i get the same output as with sbcl
smurfrobot has joined #lisp
flavio81 has joined #lisp
<jasom> lisp_guest: the spec even mentions that implementations may do this for making printing prettier
<lisp_guest> i guess i'll just have to use my imagination
varjag has quit [Ping timeout: 248 seconds]
<jasom> (car (read-from-string "`(foo, bar)")) may help
<lisp_guest> jasom: ya, i've read that paragraph multiple times but couldn't think of an example where it might affect me
<lisp_guest> now it's pretty obvious i guess
<lisp_guest> let me try that
varjag has joined #lisp
<lisp_guest> ah, SB-INT:QUASIQUOTE
<lisp_guest> and SYSTEM:QUASIQUOTE in clisp
smurfrobot has quit [Remote host closed the connection]
<jasom> (describe (cadadr (read-from-string "`(foo, bar)"))) may help
emerson has quit [Quit: WeeChat 1.9.1]
notemerson is now known as emerson
jfe has joined #lisp
<lisp_guest> is there a reason your comma comes directly after "foo"?
<lisp_guest> i.e. is that intentional?
<jasom> lisp_guest: typo
<jasom> lisp_guest: makes no difference though
<jasom> https://gitlab.common-lisp.net/frideau/fare-quasiquote <-- readme here also talks a lot about quasiquotation
<lisp_guest> i am just reading that
<lisp_guest> thanks :-)
varjag has quit [Ping timeout: 268 seconds]
wxie has joined #lisp