wigust has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 248 seconds]
Ukari has quit [Ping timeout: 248 seconds]
thebardian has joined #lisp
thebardian has quit [Remote host closed the connection]
krator44 has quit [Quit: --]
WorldControl has quit [Quit: Ex Chat]
<dwts> hey guys
_krator44 has joined #lisp
fikka has joined #lisp
thebardian has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
thebardian has quit [Remote host closed the connection]
<k-stz> So I was asking recently for a portable way to translate foreign c-arrays to lisp arrays for efficiency, and it ends up that there is no difference for scanning over either of those (the lisp-array was even slightly slower)
<Bike> florin96: why did you write ((loop
<pjb> Because he thought he could take advanced functional programming in lisp, before learning the basic lisp syntax.
<Bike> was kind of hoping for more specificity
<aeth> Very basic Lisp syntax: foo(x, y) becomes (foo x y) and foo[0] becomes (elt foo 0) and foo["key"] becomes (gethash :foo key) and foo = bar becomes (setf foo bar) and [1, 2, 3] becomes '(1 2 3) or (list 1 2 3) or #(1 2 3) or (vector 1 2 3) depending on if you want a linked-list (sequential access) or a vector (O(1) access to any elt)
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<aeth> Even with just that, the mistake becomes clear, the ((loop ...)) is a function call (it only wouldn't be in a special form like let)
<pjb> (gethash :key foo)
thebardian has joined #lisp
<aeth> pjb: oops
<aeth> you're right, I kinda rushed that, I should just have it written right once and then paste it in whenever basic syntax errors come up
bitch has quit [Quit: The bitch has left the building.]
Lord_of_Life has quit [Quit: EliteBNC free bnc service - http://elitebnc.org - be a part of the Elite!]
klltkr has joined #lisp
klltkr has quit [Client Quit]
Tobbi has joined #lisp
fikka has joined #lisp
Lord_of_Life has joined #lisp
Lord_of_Life has joined #lisp
Lord_of_Life has quit [Changing host]
Lord_of_Life has joined #lisp
<mfiano> k-stz: Hello. Any chance you will be doing more game rom hacking in CL videos?
fikka has quit [Ping timeout: 240 seconds]
<whoman> wait what
<k-stz> mfiano: hey, as a matter of fact I'm working on a new one since a few weeks!
<whoman> universal resource location pls
<mfiano> k-stz: Excellent!
reu_ has quit [Quit: こんなにも、世界はレプリスで満ちあふれていたのか? もし、今自分の手を傷つけてみたら、同じように泡を立てて消えていくのか?]
arbv has quit [Remote host closed the connection]
<k-stz> im struggling with the ending bit, and getting distracted by efficiency issues, but it won't be long now
<whoman> distracted by japanese
jameser has joined #lisp
<mfiano> k-stz: drop by #lispgames again sometime and let us know :)
fikka has joined #lisp
<k-stz> mfiano: will do!
<k-stz> gotta go now (its late here in germany), see ya
k-stz has left #lisp ["ERC (IRC client for Emacs 25.3.1)"]
bitch has joined #lisp
bmgxc9 has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
reu has joined #lisp
fikka has joined #lisp
markong has quit [Ping timeout: 258 seconds]
pierpa has quit [Quit: Page closed]
Jesin has joined #lisp
damke has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 248 seconds]
damke has joined #lisp
White_Flame has quit [Ping timeout: 248 seconds]
kkini has joined #lisp
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fikka has joined #lisp
raphaelss has quit [Remote host closed the connection]
raphaelss has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
bmgxc9 has quit [Quit: Leaving]
White_Flame has joined #lisp
thebardian has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
Denommus has joined #lisp
florin96 has quit [Quit: Page closed]
terpri has joined #lisp
SaganMan has joined #lisp
fikka has joined #lisp
Jesin has quit [Quit: Leaving]
Amplituhedron has quit [Ping timeout: 268 seconds]
Jesin has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
QualityAddict has joined #lisp
text1 has joined #lisp
orivej has quit [Read error: Connection reset by peer]
mejja has quit [Read error: Connection reset by peer]
mejja_ has joined #lisp
orivej has joined #lisp
fikka has joined #lisp
pmetzger has quit []
safe has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 248 seconds]
grublet has joined #lisp
mson has quit [Quit: Connection closed for inactivity]
python476 has joined #lisp
igemnace has joined #lisp
broccoli_ has joined #lisp
pjb has quit [Remote host closed the connection]
pjb has joined #lisp
broccoli_ has quit [Client Quit]
thebardian has joined #lisp
fikka has joined #lisp
broccolistem has joined #lisp
EvW1 has quit [Ping timeout: 255 seconds]
broccolistem has quit [Quit: WeeChat 2.0-dev]
fikka has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
d4ryus1 has joined #lisp
d4ryus has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
thebardian has quit [Remote host closed the connection]
fikka has joined #lisp
test1600 has joined #lisp
shifty has joined #lisp
jstoddard has joined #lisp
asarch has quit [Quit: Leaving]
fikka has quit [Ping timeout: 260 seconds]
mejja_ has quit [Quit: mejja_]
fikka has joined #lisp
asarch has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
mson has joined #lisp
ahungry has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
jameser_ has joined #lisp
jameser has quit [Ping timeout: 240 seconds]
dddddd has quit [Remote host closed the connection]
fikka has joined #lisp
python476 has quit [Ping timeout: 268 seconds]
SuperJen has joined #lisp
bmgxc9 has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
Ukari has joined #lisp
marusich has joined #lisp
JenElizabeth has quit [Ping timeout: 240 seconds]
<Ober> is there some case issue with allegro not finding a function name in this fashion ? (defun star-call () (funcall (find-symbol (format nil "~a-call" *my-type*))))
damke has quit [Ping timeout: 240 seconds]
<Bike> try "~a-CALL"?
grublet has quit [Quit: Leaving]
damke has joined #lisp
<pjb> Ober: ~A depends on *print-case* and other variables: DO NOT use it to build symbol names!
<pjb> Don't use format for that. Use concatenate.
Xal has left #lisp ["ERC (IRC client for Emacs 25.2.1)"]
<pjb> Ober: also, this is not conforming code (funcall (find-symbol because implementations are allowed to FBIND any symbol from CL, including CL:NIL, which can be returned by find-symbol.
fikka has joined #lisp
asarch has quit [Quit: Leaving]
pillton has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
fikka has quit [Ping timeout: 260 seconds]
pillton has joined #lisp
bmgxc9 has quit [Remote host closed the connection]
fikka has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
SuperJen has quit [Remote host closed the connection]
SuperJen has joined #lisp
terpri has quit [Remote host closed the connection]
sz0 has quit [Quit: Connection closed for inactivity]
fikka has joined #lisp
<Ober> ahh print-case. was hunting for it in my stuff
fikka has quit [Ping timeout: 240 seconds]
<Ober> thanks pjb
schoppenhauer has quit [Ping timeout: 240 seconds]
schoppenhauer has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
fikka has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
borei has joined #lisp
<Ober> (defun star-call () (funcall (find-symbol (string-upcase (concatenate 'string *my-type* "-CALL"))))) ;; more respectable? or string-upcase unsafe in this context? I will be testing if find-symbol returns nil or not. just trying it out in the repl. refactoring a lot of rundundant code
<borei> hi all !
sjl has joined #lisp
<beach> Good morning everyone!
<beach> Hello borei.
sjl has quit [Ping timeout: 260 seconds]
zaquest has quit [Quit: Leaving]
fikka has joined #lisp
zaquest has joined #lisp
MrBusiness has joined #lisp
alpert has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Ukari has quit [Ping timeout: 260 seconds]
bmgxc9 has joined #lisp
bmgxc9 has quit [Client Quit]
kenster has joined #lisp
bmgxc9 has joined #lisp
bmgxc9 has quit [Remote host closed the connection]
fikka has joined #lisp
QualityAddict has quit [Ping timeout: 248 seconds]
fikka has quit [Ping timeout: 240 seconds]
pfdietz has quit []
fikka has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
neoncontrails has quit [Remote host closed the connection]
neoncontrails has joined #lisp
neoncontrails has quit [Remote host closed the connection]
neoncontrails has joined #lisp
shrdlu68 has joined #lisp
neoncontrails has quit [Remote host closed the connection]
neoncontrails has joined #lisp
neoncontrails has quit [Remote host closed the connection]
neoncontrails has joined #lisp
neoncontrails has quit [Remote host closed the connection]
neoncontrails has joined #lisp
neoncontrails has quit [Remote host closed the connection]
neoncontrails has joined #lisp
neoncontrails has quit [Remote host closed the connection]
fikka has joined #lisp
neoncontrails has joined #lisp
neoncontrails has quit [Remote host closed the connection]
LocaMocha has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
mishoo has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
oleo has quit [Quit: Leaving]
neoncontrails has joined #lisp
neoncontrails has quit [Remote host closed the connection]
neoncontrails has joined #lisp
neoncontrails has quit [Remote host closed the connection]
<Ober> re
Karl_Dscc has joined #lisp
<edgar-rft> mi
dvdmuckle has quit [Quit: Bouncer Surgery]
dvdmuckle has joined #lisp
thebardian has joined #lisp
fikka has joined #lisp
whoman has quit [Quit: Leaving]
d4ryus1 is now known as d4ryus
fikka has quit [Ping timeout: 260 seconds]
dec0n has joined #lisp
fikka has joined #lisp
vlatkoB has joined #lisp
borei has quit [Ping timeout: 240 seconds]
Bike has quit [Quit: Lost terminal]
fikka has quit [Ping timeout: 248 seconds]
damke_ has joined #lisp
damke has quit [Ping timeout: 240 seconds]
shka has joined #lisp
BigSafari has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
johnnymacs has joined #lisp
<johnnymacs> join #lispcafe
fikka has joined #lisp
<Shinmera> No
orivej has quit [Ping timeout: 248 seconds]
Ellenor is now known as Reinhilde
fikka has quit [Ping timeout: 258 seconds]
fikka has joined #lisp
scymtym has quit [Ping timeout: 248 seconds]
raphaelss has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
cryptomarauder[m has joined #lisp
hajovonta has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
<hajovonta> good morning
<kenster> hello
<BigSafari> morning
igemnace has quit [Ping timeout: 240 seconds]
<loke`> Hello
mishoo has quit [Ping timeout: 248 seconds]
terpri has joined #lisp
<cryptomarauder[m> hola hola
<hajovonta> hi
ahungry has quit [Remote host closed the connection]
fikka has joined #lisp
igemnace has joined #lisp
alexmlw has joined #lisp
<beach> Is anyone here familiar with Doug Lea's memory allocator? It is the one provided by default in many GNU/Linux distributions. I am wondering how it could be simplified if it is known that the use case is different from the typical one. The use case I have in mind would call malloc() many times, followed by free() many times.
<beach> In case anyone wonders, this issue is related to Common Lisp, because in SICL every heap-allocated object has a 2-word header that contains (a pointer to) the contents vector (that I call a "rack"). And I am thinking of a garbage collector that uses mark-and-sweep for the headers and a standard memory allocator for the racks.
fikka has quit [Ping timeout: 248 seconds]
<beach> For one thing, Doug Lea's allocator contains a "cache" so that an chunk that is freed is not immediately coalesced with its neighbors, in case the next operation is an allocation of a block of the same size. This situation won't happen with the use case I am targeting.
<beach> s/an chunk/a chunk/
<shka> beach: is that a "SLAB" allocator?
<beach> minion: What does SLAB stand for?
<minion> Sabaigrass Logography Affirmance Bedirter
<shka> right
<beach> I don't know what SLAB means in this context.
Cymew has joined #lisp
<shka> (append '(a b c) '(d e f) '(g (h i)))
<shka> damn it
<shka> ever since new FF came out, vimperator does not work
<shka> crap
<shka> here
<shka> it is no longer used in linux
<cryptomarauder[m> nice
damke_ has quit [Ping timeout: 240 seconds]
<cryptomarauder[m> I was wondering if anyone used vimperator
<shka> but it is still used in Solaris
<shka> cryptomarauder[m: "used"
<beach> I am pretty sure Doug Lea's allocator is not of that type.
<cryptomarauder[m> yeah
<shka> since i no longer can yy to yank url, it leads to some hilarious fails
mishoo has joined #lisp
<cryptomarauder[m> I just always noticed it in pkg searches for vim in freebsd
damke_ has joined #lisp
<cryptomarauder[m> speaking of vim. really want to explore vlime
<shka> beach: well, it really sounded like slab or something slab like
Cymew has quit [Remote host closed the connection]
orivej has joined #lisp
fikka has joined #lisp
<kkini> Suppose I have a path of a directory as a string, but I don't know whether it has a trailing "/". What's the best way to get the same valid pathname directory from each?
<kkini> (pathname-directory "/foo") is '(:ABSOLUTE) while (pathname-directory "/foo/") is '(:ABSOLUTE "foo"); I want the latter from both
<kkini> The obvious way seems to be to just append "/" to the string before calling pathname-directory, since (pathname-directory "/foo//") is also '(:ABSOLUTE "foo") (at least on my machine), but I wonder if there's a more portable way, or something
Ukari has joined #lisp
Cymew has joined #lisp
<kkini> shka: vimperator still more or less works on Waterfox ( https://www.waterfoxproject.org ) if you want to try that
<kkini> there is also this effort to reimplement something like vimperator that's new-firefox-compatible, though I don't know how alpha-quality it is at the moment: https://github.com/cmcaine/tridactyl
<cryptomarauder[m> anyone know what the state of sbcl is on freebsd?
<shka> kkini: try the above
<shka> kkini: (pathname-directory (make-pathname :directory '(:absolute "/foo")))
<shka> actually below
fikka has quit [Quit: leaving]
fikka has joined #lisp
<kkini> ah, great. Thanks! (I was scrolling up to see what you meant by "above" until you pinged me a second time :P)
<otwieracz> Hey.
lisp_guest has joined #lisp
<shka> sorry about that!
<kkini> haha no problem
<shka> mistakes were made
<otwieracz> I've got wrapper library around libcrul to use with CFFI.
<otwieracz> Should I handle signals in this library?
<shka> i would say: NO
<shka> handling signals in libs is usually a bad idea
<kenster> hmmm
<shka> got to go, see you in the evening
scymtym has joined #lisp
<kkini> shka: hmm, actually your solution doesn't seem to work; I get '(:ABSOLUTE "/foo") rather than '(:ABSOLUTE "foo")
<kkini> and also when I have nested directories, I get "/foo/bar/baz" -> '(:ABSOLUTE "/foo/bar/baz") instead of '(:ABSOLUTE "foo" "bar" "baz")
Cymew has quit [Remote host closed the connection]
shka has quit [Ping timeout: 248 seconds]
Cymew has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
<kkini> Hmm, I guess I can use (sb-ext::parse-native-namestring "/foo" nil *default-pathname-defaults* :as-directory t) on SBCL
<kkini> lol, ugly but it works
orivej has joined #lisp
Cymew has quit [Ping timeout: 248 seconds]
edgar-rft has quit [Ping timeout: 248 seconds]
mishoo_ has joined #lisp
Cymew has joined #lisp
mishoo has quit [Ping timeout: 240 seconds]
SamSkulls has joined #lisp
sjl has joined #lisp
sjl has quit [Ping timeout: 255 seconds]
Cymew has quit [Remote host closed the connection]
Cymew has joined #lisp
alpert has quit [Ping timeout: 248 seconds]
varjag has joined #lisp
murii_ has joined #lisp
kenster has quit [Ping timeout: 248 seconds]
alpert has joined #lisp
<Ober> how hard would it to do clos objects on the leveldb bindings? manardb is really nice, but a bit unportable to other languages.
igemnace has quit [Quit: WeeChat 1.9.1]
Ukari has quit [Ping timeout: 252 seconds]
Lord_Nightmare2 has joined #lisp
Lord_Nightmare has quit [Ping timeout: 268 seconds]
Lord_Nightmare2 is now known as Lord_Nightmare
IRCNickname has quit [Ping timeout: 248 seconds]
hhdave has joined #lisp
text1 has quit [Read error: Connection reset by peer]
<kkini> Dumb question, but how can I find out whether a (require 'foo) would succeed without actually running it?
shrdlu68 has quit [Ping timeout: 248 seconds]
* kkini = kini, disconnecting this nick now
kkini has quit [Quit: ERC (IRC client for Emacs 25.1.1)]
<jackdaniel> kini: you can't. implementation may provide module-load-hooks, so user may put his own function there
<jackdaniel> that potential function during require may try to load it with quicklisp (for instance), or utilise some other means to acquire software
<jackdaniel> so you don't know if it will succeed without actually running it
thebardian has quit [Remote host closed the connection]
hhdave_ has joined #lisp
hhdave has quit [Ping timeout: 248 seconds]
hhdave_ is now known as hhdave
amerlyq has quit [Ping timeout: 240 seconds]
amerlyq has joined #lisp
murii_ has quit [Ping timeout: 255 seconds]
wxie has joined #lisp
mson has quit [Quit: Connection closed for inactivity]
shrdlu68 has joined #lisp
Ukari has joined #lisp
heurist has quit [Ping timeout: 248 seconds]
fikka has quit [Ping timeout: 250 seconds]
nirved has joined #lisp
fikka has joined #lisp
heurist has joined #lisp
jameser_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fikka has quit [Ping timeout: 248 seconds]
_cosmonaut_ has joined #lisp
markong has joined #lisp
sjl has joined #lisp
m00natic has joined #lisp
sjl has quit [Ping timeout: 240 seconds]
milanj has joined #lisp
test1600 has quit [Read error: Connection reset by peer]
damke has joined #lisp
damke_ has quit [Ping timeout: 240 seconds]
lvo has joined #lisp
<easye> Happy T-day, brethen of the CONS.
fluter has quit [Ping timeout: 240 seconds]
<jackdaniel> I'm thankful that I'm not living in US (however I'm not thankful that I'm living in PL) he he
<easye> Question of style: when defining a function that destructively modifies an argument, should the function always return the reference to the argument as a primary value? I'm reviewing code that doesn't always follow this convention, and wondering if I should demand a rewrite.
<flip214> easye: https://common-lisp.net/~frideau/lil-ilc2012/lil-ilc2012.html#(part._sec-.Transformers) argues that _modifying_ functions shouldn't return
<flip214> the modified thing, only other values.
<flip214> pure functions should return the "new" value, of course.
<easye> flip214: ACK.
<flip214> easye: sorry, the right header is "4.2.1 Mutating and Linearized"
<jackdaniel> nreverse may return a new cons (which is composed from conses of input argument) – arg reference usually points at last cons
<jackdaniel> s/a new cons/a new list/
<flip214> I still seem to have a bad mental model of backquote and comma.
<flip214> why/what is the difference?
<flip214> (list* 'with-slots ',vars instance body)
<flip214> `( with-slots ',,vars ,instance ,@ body)
<jackdaniel> try this: (let ((foo (list 1 2 3))) (nreverse foo) foo)
<easye> Well, I am reviewing my own code with a jaundiced eye <https://github.com/cloudfleet/blimp-parachute/blob/master/chute/crypt.lisp#L101>.
<flip214> the LIST* form gives the expected result; the backquote not.
<flip214> easye: (VALUES bytes ...) returns a sane value, IMO
fluter has joined #lisp
<easye> flip214: My rule of thumb: whenever I see two #\, the code needs to be rewritten.
<flip214> easye: a macro-writing macro would use ,, ...
<flip214> but good to know that it's not just me ;)
<flip214> I guess I'll have to re-read "let over lambda", perhaps then I'll find out what I'm doing wrong
fikka has joined #lisp
wxie has quit [Remote host closed the connection]
MrBismuth has joined #lisp
MrBusiness has quit [Ping timeout: 255 seconds]
fikka has quit [Ping timeout: 268 seconds]
shrdlu68 has quit [Remote host closed the connection]
fikka has joined #lisp
Cymew has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 248 seconds]
sjl has joined #lisp
fikka has joined #lisp
sjl__ has joined #lisp
sjl has quit [Ping timeout: 250 seconds]
vlatkoB has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 255 seconds]
vlatkoB has joined #lisp
BigSafari has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eSVG has joined #lisp
fikka has joined #lisp
Tobbi has joined #lisp
shrdlu68 has joined #lisp
flamebeard has joined #lisp
raynold has quit [Quit: Connection closed for inactivity]
Denommus` has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
dddddd has joined #lisp
Denommus has quit [Ping timeout: 250 seconds]
fikka has joined #lisp
Denommus` has quit [Ping timeout: 252 seconds]
fikka has quit [Ping timeout: 248 seconds]
trosa-work has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
shifty has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
aoh has quit [Ping timeout: 240 seconds]
EvW has joined #lisp
aoh has joined #lisp
<beach> I guess I'll have to figure out the simplification of Doug Lea's allocator myself. When I do, I could write a paper about it.
<mrottenkolber> beach: ping me if you do :-)
fikka has quit [Ping timeout: 260 seconds]
<beach> Figure it out, or write the paper? :)
<mrottenkolber> when you share your findings, in any form really :-)
<beach> mrottenkolber: It won't be a general simplification. Only one that is valid for the use case where lots of calls to malloc() are followed by lots of calls to free().
<beach> Speaking of which, it would be good to have allocation traces of typical Common Lisp programs, so that the quality of garbage collector algorithms could be tested in controlled conditions.
EvW has quit [Ping timeout: 250 seconds]
fikka has joined #lisp
Cymew has joined #lisp
Mandus has quit [Ping timeout: 240 seconds]
Mandus has joined #lisp
Cymew has quit [Remote host closed the connection]
Cymew has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
sjl__ has quit [Ping timeout: 264 seconds]
smokeink has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
lnostdal has quit [Quit: https://www.QuantAtaraxia.pw/]
damke_ has joined #lisp
damke has quit [Ping timeout: 240 seconds]
shrdlu68 has quit [Ping timeout: 240 seconds]
<hajovonta> when I start hunchentoot in SBCL and start an easy-acceptor, the core cpu usage jumps to 100%. But this is only on Windows. Can somebody verify this?
aoh has quit [Ping timeout: 250 seconds]
shrdlu68 has joined #lisp
<easye> beach: is there an implementation independent format you would recommend for allocation traces?
<beach> Maybe Wilson et al have something in their survey paper. I don't remember.
attila_lendvai has joined #lisp
tlaxkit has joined #lisp
lisp_guest has quit [Ping timeout: 248 seconds]
<lieven> traditionally some lisps used obstacks for this. there's a GNU C extension inspired by them.
<beach> What did they use obstacks for?
<lieven> honestly I don't remember. could be specific to the emacs lisp implementation.
<beach> You said "traditionally some lisps used obstacks for this". I am wondering what "this" refers to.
<lieven> memory management
<lieven> the usage pattern is allocate, allocate, allocate and then drop the obstack in one move
<beach> Ah, but that is not what I said. I said lots of allocations, and then lots of frees, but not necessarily of everything allocated up to that point.
<lieven> so one obstack per scope or per other coarse part and you drop the obstack when you go out of scope
<beach> Yes, I know about obstacks, but don't know of any Lisps using them. I don't know Emacs Lisp very well though.
aoh has joined #lisp
Arcaelyx_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Tarap has joined #lisp
<beach> At the risk of repeating myself, the context is that every heap-allocated object in SICL has a 2-word header and (a pointer to) the contents vector, and I am thinking of using a mark-and-sweep garbage collector for the headers. Whenever a header is found to be dead, it would call the equivalent of free() with the contents vector.
trosa-work has quit [Remote host closed the connection]
Bike has joined #lisp
narendraj9 has joined #lisp
fikka has joined #lisp
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Tobbi has joined #lisp
<flip214> hajovonta: I just read on #sbcl that the windows threads seem broken right now. which version are you using?
SaganMan has quit [Ping timeout: 248 seconds]
kami has joined #lisp
<kami> Hello #lisp
rumbler31 has quit [Remote host closed the connection]
usr_1 has joined #lisp
smokeink has quit [Read error: Connection reset by peer]
<beach> hello kami.
murii_ has joined #lisp
shrdlu68 has quit [Read error: Connection reset by peer]
shrdlu68 has joined #lisp
GrayArea has quit [Ping timeout: 258 seconds]
usr_1 has quit [Ping timeout: 268 seconds]
usr_1 has joined #lisp
pjb` has joined #lisp
pjb has quit [Ping timeout: 258 seconds]
Cymew has quit [Read error: Connection reset by peer]
Cymew has joined #lisp
nmg has joined #lisp
GrayArea has joined #lisp
<hajovonta> flip214: thanks. right now I can't check, but I'll get back to you a few hours later.
usr_1 has quit [Ping timeout: 255 seconds]
usr_1 has joined #lisp
<flip214> hajovonta: I won't be much help anyway. Try #sbcl, please.
Amplituhedron has joined #lisp
narendraj9 has quit [Remote host closed the connection]
msb has quit [Ping timeout: 240 seconds]
<hajovonta> ok
pjb` is now known as pjb
TCZ has joined #lisp
nmg has joined #lisp
nmg has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
usr_1 has quit [Remote host closed the connection]
Amplituhedron has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #lisp
msb has joined #lisp
TCZ has quit [Client Quit]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
mishoo_ has quit [Ping timeout: 248 seconds]
shrdlu68 has quit [Ping timeout: 240 seconds]
Amplituhedron has joined #lisp
oleo has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
python476 has joined #lisp
Cymew has quit [Remote host closed the connection]
Cymew has joined #lisp
alpert has quit [Remote host closed the connection]
shrdlu68 has joined #lisp
<flip214> thanks
rumbler31 has joined #lisp
sz0 has joined #lisp
Cymew_ has joined #lisp
Cymew has quit [Ping timeout: 255 seconds]
Cymew_ is now known as Cymew
rumbler31 has quit [Ping timeout: 268 seconds]
rumbler31 has joined #lisp
LiamH has joined #lisp
broccolistem has joined #lisp
mishoo_ has joined #lisp
trosa-work has joined #lisp
eudoxia has joined #lisp
Cymew has quit [Remote host closed the connection]
damke_ has quit [Ping timeout: 240 seconds]
damke has joined #lisp
Cymew has joined #lisp
asarch has joined #lisp
Ukari has quit [Remote host closed the connection]
Amplituhedron has quit [Ping timeout: 240 seconds]
papachan has joined #lisp
trosa-work has quit [Remote host closed the connection]
Cymew has quit [Remote host closed the connection]
mikecheck has joined #lisp
Cymew has joined #lisp
Cymew has quit [Remote host closed the connection]
nmg` has joined #lisp
nmg` has quit [Remote host closed the connection]
nmg has quit [Remote host closed the connection]
nmg has joined #lisp
_cosmonaut_ has quit [Ping timeout: 255 seconds]
SaganMan has joined #lisp
fikka has joined #lisp
GrayArea has quit [Ping timeout: 258 seconds]
fikka has quit [Ping timeout: 258 seconds]
fikka has joined #lisp
broccolistem has quit [Ping timeout: 250 seconds]
NaNDude has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
dec0n has quit [Read error: Connection reset by peer]
Tarap has quit [Read error: Connection reset by peer]
GrayArea has joined #lisp
grublet has joined #lisp
Josh_2 has joined #lisp
rippa has joined #lisp
scymtym has quit [Remote host closed the connection]
scymtym_ has joined #lisp
FreeBirdLjj has joined #lisp
neoncontrails has joined #lisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #lisp
Josh_2 has quit [Remote host closed the connection]
vap1 has quit [Quit: Leaving]
broccolistem has joined #lisp
optikalmouse has joined #lisp
nika has joined #lisp
lisp_guest has joined #lisp
flamebeard has quit [Quit: Leaving]
thinkpad has quit [Ping timeout: 248 seconds]
LiamH has quit [Ping timeout: 240 seconds]
sjl__ has joined #lisp
sjl__ has quit [Read error: Connection reset by peer]
mikecheck has quit [Remote host closed the connection]
myrkraverk has quit [Ping timeout: 260 seconds]
shrdlu68 has quit [Quit: Lost terminal]
kenster has joined #lisp
hajovonta has quit [Quit: hajovonta]
mircea_popescu has joined #lisp
damke_ has joined #lisp
damke has quit [Ping timeout: 240 seconds]
<mircea_popescu> !~later tell k-stz your reading voice is phenomenal by the way... are you willing to do voiceovers and stuff ?
<mircea_popescu> a damn, no bot.
FreeBirdLjj has quit [Remote host closed the connection]
shifty has joined #lisp
kami has quit [Ping timeout: 260 seconds]
<Bike> minion: note for mircea_popescu: i think this is the syntax
<minion> Remembered. I'll tell mircea_popescu when he/she/it next speaks.
trosa-work has joined #lisp
<mircea_popescu> oh ty,
<minion> mircea_popescu, memo from Bike: i think this is the syntax
<mircea_popescu> minion: note for k-stz your reading voice is phenomenal by the way... are you willing to do voiceovers and stuff ?
<minion> why do you want to know?
<Bike> the colon is important
<mircea_popescu> minion: note for k-stz: your reading voice is phenomenal by the way... are you willing to do voiceovers and stuff ?
<minion> Remembered. I'll tell k-stz when he/she/it next speaks.
<mircea_popescu> aha. sorry for teh spamming
<mircea_popescu> minion:help
<mircea_popescu> Bike if you care, #trilema put a !?help function mandatory in teh bot spec. do you care ?
<Bike> i don't know what trilema is, and i don't maintain minion. but having some uniformity among bots might be nice.
<mircea_popescu> right. http://trilema.com/2016/trilema-bot-spec/ is the current version, if it helps anyone.
orivej has joined #lisp
FreeBirdLjj has joined #lisp
mson has joined #lisp
trosa-work has quit [Remote host closed the connection]
raynold has joined #lisp
damke_ has quit [Ping timeout: 240 seconds]
hhdave has quit [Ping timeout: 255 seconds]
* |3b| wouldn't be surprised if minion is older than that channel :p minion should respond to help though, just probably needs a space
<|3b|> minion: help
<minion> There are multiple help modules. Try ``/msg minion help kind'', where kind is one of: "lookups", "helping others", "adding terms", "aliasing terms", "forgetting", "memos", "avoiding memos", "nicknames", "goodies", "eliza", "advice", "apropos", "acronyms".
papachan has quit [Ping timeout: 248 seconds]
rumbler31 has quit [Remote host closed the connection]
<jackdaniel> minion: chant
<minion> MORE RELIABLY
Josh_2 has joined #lisp
optikalmouse has quit [Quit: optikalmouse]
k-stz has joined #lisp
<mircea_popescu> aha!
<mircea_popescu> minion: help goodies
<minion> If I'm connected to a lisppaste bot, try ``minion: paste 42'' or some other number.
<mircea_popescu> minion: paste 69
<minion> watch out, you'll make krystof angry
<mircea_popescu> |3b| very likely it is, yeah.
<Bike> lisp paste is down indefinitely, unfortunately
<beach> mircea_popescu: You can use /msg to talk to minion if you want to experiment.
<mircea_popescu> Bike how did it work ? ben_vulpes can prolly be enticed to make his paste cover.
<Bike> how did what work?
<mircea_popescu> beach yeah, i intend to not further spam the channel with minion interactions.
<|3b|> used to report pastes for a specific channel when they were made, until people started using it for spam :/
<mircea_popescu> Bike http://btcbase.org/log/2017-11-12#1736582 (there linked, lisp bot returning error via paste)
<mircea_popescu> |3b| voice model could take care of that.
<mircea_popescu> Bike it says "nothing at that url" now because pastes expire ; but links are autoarchived so you can see what it was at http://archive.is/Q9zSk
<drmeister> Does anyone use monolithic-compile-bundle-op with ASDF?
QualityAddict has joined #lisp
<drmeister> I can construct a monolithic bundle - but I'm wondering how to load it.
<drmeister> I can load the FASL directly. Is there some way to load the FASL using ASDF so that it locates it properly?
SaganMan has quit [Quit: laters]
<|3b|> also lisppaste would add links back to irc logs for time when paste was made for a specific channel, though i think that went away when the logger it linked to disappeared
<mircea_popescu> anyone know who maintains that whitequark logger ?
<Bike> yes, whitequark does.
<Josh_2> #bringbackLispPaste
<Bike> they don't use this channel.
<Bike> but they should be on freenode
<mircea_popescu> aha. ty.
<|3b|> actually i guess that was the lisppaste bot rather than minion (same set of bots though)
mircea_popescu has quit [Read error: Connection reset by peer]
mircea_popescu has joined #lisp
<mircea_popescu> Josh_2 if someone could specify what it's supposed to do, i suspect it could happen before thanksgiving
<mircea_popescu> ideally, this one.
<Josh_2> huh?
<Josh_2> I wanna be able to make my pastes on paste.lisp
<Bike> that would be quite a feet, given that it is thanksgiving
<mircea_popescu> bringbackLispPaste <
<Bike> i mean the basic thing is it's a pastebin. with good syntax highlighting. then there are bonuses for being connected to the channel or whatever, but those weren't online for months even before the paste bin itself was shut down.
<mircea_popescu> how's "connected to channel" go specifically ?
<Bike> never used it personally
<Josh_2> just want the website pastebin Q_Q
<|3b|> mircea_popescu: question of manpower to maintain it rather than features
<Bike> also, i think #common-lisp.net might be the proper venue
<mircea_popescu> Josh_2 do you mean you specifically care what url it lives at ?
<mircea_popescu> |3b| im trying to let you ride on already extant manpower, is the idea.
* |3b| likes the lisp specific features of lisppaste rather than url
Kaisyu has quit [Quit: Connection closed for inactivity]
<Josh_2> well my browser remembers paste.lisp.org Q_Q
<mircea_popescu> |3b| so basically the spec is "lisp syntax highlights" ?
<Josh_2> the URL wouldn't matter though, as long as it has lisp in it :D
* |3b| misses the IRC integration too, but that is even more work to police
<|3b|> mircea_popescu: links to spec in particular, + interactive paren highlighting
<mircea_popescu> so this'd be a bundle of js ?
LiamH has joined #lisp
<|3b|> it does all that server side, though these days js would probably be reasonable
<mircea_popescu> how can you have interactive parens highlighting server side ?
<|3b|> server + css
<mircea_popescu> was this a html5 item is the idea ?
<|3b|> nah, just css with :hover
<mircea_popescu> ah.
m00natic has quit [Remote host closed the connection]
<|3b|> but very useful for figuring out poorly formatted code from random new lisp programmers when too lazy to copy to emacs and reformat it :)
<mircea_popescu> couldn't simply use candi let her figure it out ?
<|3b|> figure what out, how to format the code readably?
<mircea_popescu> gimme a bit of lispy thing, let's work an example.
* |3b| has thought that would be a fun feature for a pastebin (or in general for that matter), but too lazy to write it
moei has quit [Quit: Leaving...]
<mircea_popescu> |3b| what i mean is something like this :
<mircea_popescu> mircea_popescu: !W (expt (/ 39 40) 30)
<mircea_popescu> candi_lustt: mircea_popescu: 539433869154135747306270525845277238187683254801/1152921504606846976000000000000000000000000000000
<mircea_popescu> if the lisp is malformed obv the bot will just spit an error message.
msb has quit [Ping timeout: 240 seconds]
<|3b|> we meant stuff people pasted on to the pastebin, not in channel
nmg has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<|3b|> in-channel eval-bot is a different question, which has come up in the past and generally been rejected
<mircea_popescu> pretty sure it eats an url too.
fikka has quit [Ping timeout: 268 seconds]
msb has joined #lisp
<|3b|> originally when someone created a paste at paste.lisp.org and specified #lisp, lisppaste bot would read announce the new paste in channel
<mircea_popescu> so basically a sort of rss follower ?
<|3b|> until people started making pastes just to get it to announce random spam/offensive/whatever stuff :/
<|3b|> it was built into lisppaste, so faster than rss
<mircea_popescu> ah, speed is a consideration ?
<|3b|> yeah, has to be faster than just pasting the link yourself :)
<mircea_popescu> can poll rss every second if you care...
* |3b| isn't actually suggesting to reimplement this feature, since fixing the spam problem is probably more effort than the feature is worth
<mircea_popescu> fwis (trilema has this function for lordship blogs) it's about there, second or so.
<|3b|> (particularly if the fixes would reduce the usefulness, for example by requiring authentication etc)
<mircea_popescu> ah, un-identity also a consideration ?
<|3b|> more "convenience from random not-usually-irc-users looking for help", but yeah
<mircea_popescu> there's a lot of lispers not usually on irc ?! i had no idea.
shka has joined #lisp
* |3b| isn't sure there are 'a lot' of them on irc or otherwise :p
<mircea_popescu> :p
palter has joined #lisp
<|3b|> but a reasonable fraction of the ones that do exist aren't on irc
<|3b|> or are sometimes but aren't heavy irc users
<mircea_popescu> well... i don't expect fare's going to ask for help on irc, or such. but anyway.
<|3b|> why not? (aside from tending to wards the not needing help side)
<mircea_popescu> that was the mental model, "lisp users who aren't on irc are also not very new ; 100% of under 30 hispers i mean lispers are irc-driven.
<|3b|> i'd have guessed opposite :p
<|3b|> the cool kids use discord or whatever these days :)
<mircea_popescu> discord lisp, now that's a thought.
<|3b|> and/or forums, facebook, twitter, whatever
<kenster> I'm the cool kid around here
<mircea_popescu> what proof do you have ? :D
<kenster> discord is for GAMERS
<kenster> my proof is uh... uhh
<kenster> see me around the block on my skateboard
papachan has joined #lisp
<kenster> just a suggestion: maybe the way to get paste lisp to have less spam is to make sure the code is 60% parentheses and parseable AST :D
<|3b|> would make errors hard to paste
<mircea_popescu> only way to fight the problem is via wot&voice model, which pointedly excludes the something-to-allcomers model.
<mircea_popescu> otherwise, you just move the spam.
<kenster> comment-region in *scratch* |3b|
<shka> good evening!
<minion> shka, memo from p_l: I jak ludzie się zapatrują na twój program w CLu w pracy?
<|3b|> lisppaste also (by default) kept pastes around forever (barring accidents with its backend storage), which made it nice for long-lived logged IRC channels
<|3b|> always fun to find your problem in an IRC log with link to a workaround/fix/patch and get "expired paste" from the link
<mircea_popescu> the correct solution seems to be to expire pastes and archive links. that way a) the niceness you quote is log-wide, not just re pastes and b) people can paste things they don't want to stick around forever.
<mircea_popescu> best of all worlds.
<|3b|> well, also issue of what happens when a particular logger goes away
<mircea_popescu> that's why you have redundancy. trilema uses like ... 3. 4. something like that.
* |3b| is unlikely to maintain my own public archive just because i want to share a link from my personal logs
Vivit has joined #lisp
pseudonymous has joined #lisp
<mircea_popescu> why not ? got a perfect answer to the q kenster couldn't resolve above if you do.
<Vivit> What's the name of the clnoobs channel? Zeroes or o's?
<|3b|> Vivit: oo
<Vivit> Thanks
<|3b|> mircea_popescu: too much work for just an occasional link
<mircea_popescu> it all derives from the concept of identity. once you're somebody as opposed to nobody, it's not too much work as it goes into building your identity as opposed to just serve an occasional link.
<|3b|> too much work (for me) even for something that would get used a lot for that matter :p too many other projects waiting on time
<kenster> we gotta add face id to post on lisp code
<kenster> lisp is really advanced for ML so probably good for facial recognition in the browser
<kenster> XD
<|3b|> no, i mean if i look into my log and see some random user pasted an error report 4 years ago that applies to some current thing and i want to paste their link
raphaelss has joined #lisp
LocaMocha has quit [Ping timeout: 240 seconds]
<mircea_popescu> kenster rsa key suffices.
<kenster> :p
<|3b|> where random-user was someone who showed up for 10 minutes and never came back, with no external identity
<|3b|> i'm not planning to mirror every link (including the spam ones, illegal ones, etc) that shows up in IRC just on the rare chance of that situation :)
<|3b|> and even less interested in actively deciding which to mirror
<mircea_popescu> the very concept of an illegal link...
<mircea_popescu> but we digress.
<|3b|> yeah, whole conversation is getting a bit off topic :/
<mircea_popescu> anyway, so i gather after an ~hour's active effort that there isn't anything whatsoever one could do that's useful for #lisp.
Jesin has quit [Quit: Leaving]
<|3b|> only specific thing i could suggest is a pastebin with persistent pastes and highlighting/linking similar to the colorize lisp lib (as used on lisppaste)
nika has quit [Ping timeout: 240 seconds]
<|3b|> there are other things that could be useful, but probably not worth the effort
<Bike> mircea_popescu: it's kind of you to consider it.
<mircea_popescu> Bike ima let it fall into teh passive mode, who knows what occurs.
Karl_Dscc has joined #lisp
palter has quit []
<|3b|> yeah, sorry if i'm sounding negative about trying to be helpful :/
<Vivit> So in a (labels) expression, does the order in which you define functions matter or can you define them as an afterthought the way you might say in a mathematical proof "where n is ..." after a mathematical expression in terms of n
zooey has quit [Ping timeout: 248 seconds]
<Vivit> In CL
<|3b|> Vivit: all functions defined by a LABELS form have same scope = whole form including the definitions, so order doesn't matter
<|3b|> (human readers might find some ordering more clear though)
varjagg has joined #lisp
tlaxkit has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
<Vivit> Just don't beg the question
tlaxkit has joined #lisp
tlaxkit has quit [Max SendQ exceeded]
FreeBirdLjj has joined #lisp
* |3b| fails to parse that response
tlaxkit has joined #lisp
zooey has joined #lisp
FreeBirdLjj has quit [Ping timeout: 248 seconds]
<aeth> Simple proof that order doesn't matter (but not being ordered might be confuse people): (defun 2+ (x) (- 2 x)) (labels ((3+ (x) (1+ (2+ x))) (2+ (x) (+ 2 x))) (+ (2+ 10) (3+ 10))) => 25
<aeth> It uses the inner (correctly defined) function.
<aeth> Otherwise it would say 5, e.g. (defun 2+ (x) (- 2 x)) (flet ((3+ (x) (1+ (2+ x))) (2+ (x) (+ 2 x))) (+ (2+ 10) (3+ 10))) => 5
murii_ has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 248 seconds]
<Bike> no. the order doesn't matter. it's not like let*.
tlaxkit has quit [Quit: ¡Adiós!]
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Colleen has quit [Ping timeout: 260 seconds]
Tim_F_Croso has joined #lisp
fikka has joined #lisp
Tobbi has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
whoman has joined #lisp
wigust has joined #lisp
mircea_popescu has quit [Ping timeout: 240 seconds]
shifty has quit [Ping timeout: 268 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
shka has quit [Ping timeout: 240 seconds]
damke_ has joined #lisp
damke has joined #lisp
damke_ has quit [Ping timeout: 240 seconds]
damke has quit [Ping timeout: 240 seconds]
akem has joined #lisp
damke has joined #lisp
alexmlw has quit [Quit: alexmlw]
moei has joined #lisp
bugrum has joined #lisp
kenster_ has joined #lisp
kenster has quit [Remote host closed the connection]
lisp_guest has quit [Remote host closed the connection]
kenster_ is now known as kenster
damke_ has joined #lisp
damke has quit [Ping timeout: 240 seconds]
mircea_popescu has joined #lisp
remi`bd has joined #lisp
scymtym_ has quit [Ping timeout: 250 seconds]
EvW1 has joined #lisp
zooey has quit [Ping timeout: 248 seconds]
BigSafari has joined #lisp
zooey has joined #lisp
flavio81 has joined #lisp
Jesin has joined #lisp
eudoxia has quit [Quit: Leaving]
damke has joined #lisp
damke_ has quit [Ping timeout: 240 seconds]
mircea_popescu has quit [Ping timeout: 240 seconds]
vlatkoB has quit [Remote host closed the connection]
alpert has joined #lisp
GrayArea has quit [Ping timeout: 258 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
neoncontrails has quit [Remote host closed the connection]
damke_ has joined #lisp
alpert has quit [Ping timeout: 268 seconds]
damke has quit [Ping timeout: 240 seconds]
flavio81 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
damke has joined #lisp
damke_ has quit [Ping timeout: 240 seconds]
scymtym has joined #lisp
fikka has joined #lisp
damke_ has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
damke has quit [Ping timeout: 240 seconds]
mircea_popescu has joined #lisp
Tim_F_Croso has quit [Quit: good bye cruel world]
EvW1 has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
nowhere_man has quit [Ping timeout: 240 seconds]
thebardian has joined #lisp
<aeth> Does anyone put let over defuns for something sort of like globals? I think advantages are that they're in lexical scope (and thus faster) and contained to just where they're needed (instead of actually global) and the disadvantages are that the let would be recompiled with SLIME instead of the function and it looks like it wouldn't be a top-level form (so no inlining?)
<aeth> I mean, the defuns wouldn't be top-level forms
* |3b| doesn't do it often, but thinks it is a reasonable thing to do
alpert has joined #lisp
<Bike> what is let over globals
<Bike> like (let ... (defun ...))?
<aeth> Sorry, I guess I was unclear, I mean let to create varaibles that are sort of like globals, so over things that are normally top-level
<Bike> occasionally. i might do the ltv cell thing instead to keep it toplevel though.
* |3b| probably wouldn't make any assumptions about performance etc though without testing
nirved has quit [Quit: Leaving]
<aeth> |3b|: Disassembling two otherwise identical functions, one accessing *foo* and one accessing a lexical foo, can show you the exact instruction-level overhead in an implementation afaik.
<|3b|> for that particular function, compilation settings and implementation version :)
<aeth> for a simple (+ foo x 42) vs. (+ *foo* x 42) it looks like it adds 6 lines of assembly instructions for *foo* in SBCL
<aeth> on default settings
<|3b|> (and also, checking is what i mean by "not making assumptions")
<aeth> overhead might go up or down depending on the optimization settings and the type of the thing (e.g. this uses generic-+ because it's adding two fixnums to an unknown number)
alpert has quit [Ping timeout: 240 seconds]
<Bike> if you're using sbcl you can use defglobal, right?
<aeth> (defparameter *foo* 42f0) (let ((foo 42f0)) (defun foobar (x) (declare (single-float x)) (+ foo x 42f0))) (defun foobar* (x) (declare (single-float x)) (+ *foo* x 42f0))
<aeth> This version adds a lot more of an overhead, e.g. foobar knows it's single float (probably because it can determine that foo is constant because nothing can set it) and foobar* cannot do this, looking almost identical to the original foobar*
<aeth> Even defglobal wouldn't be as efficient because SBCL couldn't assume foo constant. (Although you could just defconstant here, it'd get more interesting with a setter)
<aeth> I guess this has an advantage over constants because you can redefine it at runtime (just recompile the let form, including the function)
<Bike> i figured with defglobal it wouldn't have to do whatever to account for rebinding.
<aeth> This ruins most of the optimizations to #'foobar in SBCL because now it can't assume and looks less efficient than foobar*. (let ((foo 42f0)) (defun foobar (x) (declare (single-float x)) (+ foo x 42f0)) (defun (setf foobar) (new-value) (setf foo new-value)))
<aeth> This gets rid of the two generic-+ calls, but I'm not sure what the three alloc_tramp things are doing at the end. (let ((foo 42f0)) (defun foobar (x) (declare (single-float x)) (+ foo x 42f0)) (defun (setf foobar) (new-value) (check-type new-value single-float) (setf foo new-value)))
<aeth> Also, I miss lisp paste
<aeth> It doesn't seem to cons
<aeth> And it seems to be slightly faster than foobar*
<aeth> It looks like I can add a (proclaim '(inline foobar)) and get slightly more of a performance advantage in a simple (time (dotimes (i 1000000) (foobar 42f0))) while inlining foobar* will do nothing
<|3b|> declaring the type on the let would probably help
milanj has quit [Quit: This computer has gone to sleep]
Karl_Dscc has quit [Remote host closed the connection]
alpert has joined #lisp
BigSafari has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
LocaMocha has joined #lisp
remi`bd has quit [Quit: leaving]
alpert has quit [Ping timeout: 248 seconds]
SuperJen has quit [Remote host closed the connection]
SuperJen has joined #lisp
<pjb> aeth: in general, there are advantages, but also a lot of inconvenient to closures. More so for global "closures". Notably in terms of debugging, testing, etc.
<pjb> aeth: basically, closures are not "purely functional", since the data in the closures (notably global closures), can have only the purpose of being mutated to provide a different result.
<Xach>
<pjb> Also, when considering non-global, but true closures, you may easily generate closures generating closures, etc, and while it may seem clear and obvious when you write them, it's actually hard to read and understand, notably when you're not the author.
flavio81 has joined #lisp
<aeth> pjb: well, it does look like closures can also be used for local constants and SBCL (haven't tested other implementations) can detect that it's constant (i.e. no setter) and compile it as if it was a constant
<aeth> That might have some niche use somewhere
Vivit has quit [Ping timeout: 268 seconds]
Jesin has quit [Quit: Leaving]
<aeth> The only reason to put it outside the function instead of inside it, though, would be if it's shared between multiple functions.
grublet has quit [Quit: Leaving]
wxie has joined #lisp
mircea_popescu has quit [Ping timeout: 240 seconds]
EvW has joined #lisp
damke has joined #lisp
papachan has quit [Quit: Leaving]
damke_ has quit [Ping timeout: 240 seconds]
flavio81 has left #lisp [#lisp]
Amplituhedron has joined #lisp
pierpa has joined #lisp
thinkpad has joined #lisp
thebardian has quit [Remote host closed the connection]
wxie has quit [Remote host closed the connection]
LocaMocha is now known as MochaLoca
borei has joined #lisp
<borei> good morning/afternoon !
<borei> can somebody point me right direction in regards to initialize-instance method.
<borei> i have 2 classes base and derivative, both of them use initialize-instance method
<borei> with base it's cleare.
<borei> clear. but child - a bit more tricky
<pjb> why?
<borei> will it call initialize-instance of base class and then child one ?
<pjb> Depends.
<pjb> If you write a main method, it won't. You need to call (call-next-method).
<pjb> But if you write a :before or :after method, then you don't have to do anything.
<pjb> I find in general that writing an :after method for initialize-instance is the most practical.
<Bike> clhs 7.6.6.2
<Bike> explains the order methods are called in in detail
<borei> super ! thanks for direction.
<pjb> (it's called primary method, not main method).
dilated_dinosaur has quit [Remote host closed the connection]
<pjb> borei: you have to consider whether some initialize-instance method would call other methods on the instance being initialized, that could be overriden and that would therefore need to have the subclass slots initialized before being called (then a :before or :around may be needed).
nowhere_man has joined #lisp
<pjb> borei: and you may also want to consider whether you really want a method on initialize-instance, and not rather one on shared-initialize, which would be called by initialize-instance, but also reinitialize-instance, update-instance-for-redefined-class, and update-instance-for-different-class.
<pjb> (but honestly, so far I've only written method on initialize-instance, since change-class is rarely used).
<borei> digging into it
mishoo_ has quit [Ping timeout: 248 seconds]
pseudonymous has quit [Ping timeout: 252 seconds]
alpert has joined #lisp
<k-stz> aeth: the other day I considered to use closures when dealing with syscalls that want c-structs as arguments to put data in them (pass by reference). Then foreign-allocate'ing them in the LET around the defun once, and reusing them as variables for the syscalls. This way one can save to allocate and free memory on each syscall (with-foreign-object ..), and just reuse the once allocated foreign c-struct(or whatever) in the LET around
<minion> k-stz, memo from mircea_popescu: your reading voice is phenomenal by the way... are you willing to do voiceovers and stuff ?
<k-stz> defun.
skeuomorf has joined #lisp
grublet has joined #lisp
<k-stz> well that's uplifting
<pjb> k-stz: very bad idea.
alpert has quit [Ping timeout: 248 seconds]
<Bike> if you did that for a lot of functions you'd end up reserving a lot of memory you can't use otherwise... but i dunno
<Bike> also you can't call it multiple times at once, obviously.
<pjb> k-stz: unless you add to your closure messages to de-allocate and re-allocate the temp foreign memory, so we may save the lisp image and re-launch it properly.
<k-stz> yes, you'd return the values in them immediately, not the pointers
<Bike> what?
<pjb> basically, any reference to a foreign data can become dead pointer at any time.
<pjb> (given you can save the lisp image at any time).
attila_lendvai has quit [Quit: Leaving.]
<k-stz> pjb: why can it become a dead pointer?
<pjb> because that's what saving a lisp image does to foreign data.
<Bike> if the image is saved, your implementation can't serialize some random memory you allocated outside of its control
<pjb> To any external resources for that.
python476 has quit [Ping timeout: 248 seconds]
<k-stz> To clarify: The real example is a syscall that reads a single byte from another process and wants a c-struct to put it in. My closure would does return the value from the c-struct, not a pointer to the c-struct (mem-ref <c-strct> <type> <index>)
kini has quit [Ping timeout: 260 seconds]
<k-stz> ah I didn't know that
<pjb> and the c-struct?
<k-stz> is just there to serve the (some-syscall-binding c-struct ...) ...
<pjb> How did it come there?
<k-stz> pjb: I don't understand
<pjb> You allocated it, from foreign memory.
<pjb> It's a pointer that will be dead when you save the image.
kini has joined #lisp
<Bike> k-stz: well, i'd be more worried about the parallelism thing. if you call this function from two different threads it will be problematic, as they will try to use the same memory. of course this might not be a problem for your particular application.
dilated_dinosaur has joined #lisp
<k-stz> Bike: ah, good point
<Bike> also, if you would other just allocate and then free the memory within your function, your implementation may be able to stack allocate the memory instead.
<Bike> if you would otherwise*
<pjb> If you want to avoid multiple allocation/deallocation you can use a pool, but dynamically.
<Bike> more expensive than keeping the memory around, but to a much lesser extent that malloc and free
varjagg has quit [Quit: ERC (IRC client for Emacs 25.2.1)]
<Bike> timewise, i mean
<k-stz> Bike: thanks didn't know that either!
<kini> jackdaniel: thanks for the answer (about require)
<kini> I don't suppose there's some way to (require 'foo) and then "un-require" it, then?
<kini> I guess requiring foo might have some side effects that are impossible to undo...
<Bike> cffi documentation mentions the possibility, but you'd have to look at your implementation to see whether this optimization is done
myrkraverk has joined #lisp
<pjb> kini: (setf *modules* (delete 'foo *modules*))
<pjb> kini: or perhaps: (setf *modules* (delete 'foo *modules* :test (function string-equal)) )
<pjb> yes, it's specified as a list of strings.
<k-stz> Bike: yes just saw that too in with-foreign-object
grublet has quit [Quit: Leaving]
<kini> pjb: hmm, interesting
<Bike> naturally that doesn't undo the actual side effects. functions will still be defined and such.
<k-stz> so stack allocation saves us from parallelism as it's thread specific, and its not so expensive as malloc/free bookkeeping
<kini> Bike: yeah, I figured that must be the case
<pjb> kini: of course, the only thing that does, is that if you (require 'foo) again, it will be reloaded.
<pjb> But as Bike mentions, side effects would be difficult to undo in general.
<kini> basically I have some (sbcl-specific) code which tries to detect what the correct $SBCL_HOME value for loading sbcl contrib modules is based on where the sbcl core image is, but it's not that accurate so I was wondering if I could just test whether loading the modules works or not, as a maximally accurate method
<kini> but it sounds like that's not feasible, unless I want to actually needlessly load the module in this file
fikka has quit [Ping timeout: 248 seconds]
eSVG has quit [Ping timeout: 258 seconds]
grublet has joined #lisp
safe has joined #lisp
dilated_dinosaur has quit [Quit: Leaving]
dilated_dinosaur has joined #lisp