jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | offtopic --> #lispcafe
xsperry has quit [Remote host closed the connection]
acolarh has joined #lisp
xsperry has joined #lisp
slyrus has joined #lisp
kevingal has quit [Remote host closed the connection]
slyrus has quit [Ping timeout: 265 seconds]
kmeow has joined #lisp
rixard has quit [Read error: Connection reset by peer]
anticrisis has quit [Read error: Connection reset by peer]
Inline has quit [Ping timeout: 260 seconds]
anticrisis has joined #lisp
rixard has joined #lisp
notzmv has joined #lisp
Josh_2 has quit [Ping timeout: 240 seconds]
mindCrime_ has quit [Ping timeout: 252 seconds]
zefram22 has quit [Ping timeout: 268 seconds]
mindCrime_ has joined #lisp
irc_user has joined #lisp
akoana has quit [Quit: leaving]
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #lisp
quazimodo has joined #lisp
akoana has joined #lisp
theruran has joined #lisp
akoana has left #lisp ["Leaving"]
lotuseat` has joined #lisp
lotuseater has quit [Ping timeout: 245 seconds]
zzappie has quit [Ping timeout: 240 seconds]
tempest_nox has joined #lisp
zzappie has joined #lisp
Spawns_Carpeting has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
Spawns_Carpeting has joined #lisp
hiroaki has quit [Ping timeout: 260 seconds]
<ebrasca> How to reverse a integer? For example #b10000010 -> b01000001.
quazimodo has quit [Ping timeout: 240 seconds]
heretical_crypte has quit [Ping timeout: 245 seconds]
heretical_crypte has joined #lisp
dieggsy has quit [Ping timeout: 250 seconds]
dieggsy has joined #lisp
<no-defun-allowed> Is this for implementing CRC?
imode has joined #lisp
<ebrasca> Yes
<ebrasca> Input reflected and Result reflected
<no-defun-allowed> Which one is this? CRC32?
hiroaki has joined #lisp
frost-lab has joined #lisp
<ebrasca> It is generolized , I did test 8 , 16 , 32
<ebrasca> (make-crc crc-name width polynomial)
<pjb> ebrasca: integers have infinite length in Common Lisp. How do yo fetch a bit at ∞ to put it at 0?
monolithic has quit [Remote host closed the connection]
<ebrasca> pjb: I work with n bits.
* no-defun-allowed doesn't recall a practical CRC32 algorithm reversing any bits.
Sheilong has quit []
<ebrasca> pjb: For crc32 32 bits.
<ebrasca> no-defun-allowed: Is it good idea for me to ignore that part?
DHARMAKAYA has quit [Quit: Turning off a portion of this simulation.]
<White_Flame> convert to bit vector, call nreverse, convert back \:D/
CrazyPyt_ has quit [Read error: Connection reset by peer]
<no-defun-allowed> I don't think you will do any bit-wise CRC for a filesystem, only on bytes.
hiroaki has quit [Ping timeout: 260 seconds]
<ebrasca> no-defun-allowed: What do you mean?
<ebrasca> White_Flame: How?
<White_Flame> expensive looping
<White_Flame> but still, unless there's some weird superoptimizer style trick to bit order reversal, you'll probably still have to loop
<White_Flame> or make some lookup tables and do it in batches
<ebrasca> I was expecting you to tell me this method.
<no-defun-allowed> ebrasca: Any real implementation of CRC for a filesystem would use a byte-wise loop, not bitwise, and there is no reversal there.
<ebrasca> no-defun-allowed: It is a tutorias , see later.
<dieggsy> way back in the day (lol just a few years ago) i had found some way to have a running SBCL process and write scripts that would like connect to it, does anyone know what i'm referring to ?
<dieggsy> i don't think i was manually connecting to a swank server, though that may have been what the tool was doing
<ebrasca> I think I don't need to add thah feature then.
<moon-child> White_Flame: why is that log2?
<ebrasca> Thanks!
<moon-child> that's constant for a given byte, or linear for a sequence (in its length)
<White_Flame> for 32-bits, it takes 5 steps. For 16 bits it woudl take 4, etc
<White_Flame> erm, minus one
<ebrasca> It seems expensive.
<moon-child> ebrasca: yes, you probably want a per-byte lookup table
Stanley00 has joined #lisp
<White_Flame> hmm, with 4 bytes to look up and re-merge, that pairwise reversal's 5 steps for reversing a 32-bit word might be shorter/faster
<White_Flame> but yeah, feel free to try the various options in pjb's links for the really weird and potentailly shorter solutions
<dieggsy> oh, it may have been scriptl that i was using then
<dieggsy> is that a all still recommendable (or was it ever) ?
<pjb> Now, when you have specific operations that can be thus optimized (don't forget the logand etc to ensure 32-bit operations are performed on the intermediaries), such algorithms are ok. But if you had some generic bit manipulations to perform, of various kinds, one way to do it in lisp would be to convert the integer into a bit-vector.
<pjb> Then you can manipulate the bit-vector with any array or sequence operator. replace, reverse, aref, find, etc.
<pjb> subseq.
<pjb> Of course, it would be nice if there was an implementation operation to do that perhaps in a more efficient way than looping on logbitp…
<ebrasca> Here my crc how I have it now http://ix.io/3e0u
<ebrasca> I did remove compute-crc*-simple
orivej has quit [Ping timeout: 268 seconds]
<dieggsy> ah, scriptl is broken. nice lol.
zzappie has quit [Ping timeout: 240 seconds]
raeda_ has quit [Read error: Connection reset by peer]
raeda_ has joined #lisp
<ebrasca> Do you have some name recomendations for my crc lybrary?
asarch has joined #lisp
datajerk has quit [Remote host closed the connection]
datajerk has joined #lisp
<asarch> Does Melpa have a mirror?
<asarch> "Contacting host: melpa.org:443" -> "Failed to download ‘melpa’ archive."
frost-lab has quit [Quit: Connection closed]
hypercube has quit [Quit: WeeChat 3.1]
hypercube has joined #lisp
frost-lab has joined #lisp
shifty has joined #lisp
<beach> Good morning everyone!
<dieggsy> mernin
irc_user has quit [Quit: Connection closed for inactivity]
MrMobius has joined #lisp
MrMobius has left #lisp [#lisp]
hjudt has quit [Ping timeout: 240 seconds]
lotuseat` has quit [Quit: ERC (IRC client for Emacs 27.1)]
charles` has joined #lisp
semz has quit [Ping timeout: 245 seconds]
raeda__ has joined #lisp
raeda_ has quit [Read error: Connection reset by peer]
sp41 has quit [Ping timeout: 240 seconds]
semz has joined #lisp
semz has quit [Changing host]
semz has joined #lisp
charles` has quit [Ping timeout: 245 seconds]
hjudt has joined #lisp
luckless_ has quit [Remote host closed the connection]
luckless_ has joined #lisp
mindCrime_ has quit [Ping timeout: 252 seconds]
mindCrime_ has joined #lisp
Bike has quit [Quit: sleep]
<dieggsy> ooh, does anyone have strong opinions on sly vs slime ?
raeda__ has quit [Ping timeout: 252 seconds]
pillton has joined #lisp
jlarocco has joined #lisp
<beach> Not a "vs" opinion, but I think both are sub-optimal and we should work to get something better.
raeda has joined #lisp
xlei has quit [Quit: ZNC - https://znc.in]
<dieggsy> lmao
<dieggsy> sly has better completion for what that's worth
<dieggsy> or at least, it works better out of the box for me
karlosz has quit [Quit: karlosz]
<beach> In what way is it better?
<beach> I haven't used sly, so it's an honest question.
xlei has joined #lisp
<beach> OK, so let's take an example. Say you have:
<beach> (let ((multiple-value-bla 234))<newline> (f multiple-value-b
<beach> in a buffer.
<beach> Now complete. With SLIME, I use C-c C-i.
<beach> What is the expansion?
kmeow has quit [Ping timeout: 245 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
<beach> The cursor should be after the multiple-value-b by the way.
slyrus has joined #lisp
<moon-child> is there a general solution to that (that doesn't require special knowledge of the 'let' form)? You would have to macroexpand 'let' with a partial body (or, more charitably, a body with a hole in it) in order to infer that 'multiple-value-bla' were bound at the point of the cursor. All that without knowing the end of the body
mindCrime_ has quit [Ping timeout: 240 seconds]
<beach> So, we should analyze the buffer that way. Why should we settle for a lousy approximation?
<moon-child> I'm not saying we should settle, I'm genuinely curious how you would solve that problem
<dieggsy> beach: ? it suggests multiple-value-bla
<beach> dieggsy: Suggests?
<dieggsy> well, i'm using company-mode
skapata has quit [Remote host closed the connection]
<dieggsy> well, it's using company-mode
<beach> dieggsy: Does it "suggest" anything else?
<moon-child> (I suppose one solution would be to have the editor automatically insert closing parentheses, but I find such 'features' jarring)
<dieggsy> beach: oof, actually nevermind i guess, it's all over the place now
slyrus has quit [Ping timeout: 252 seconds]
<dieggsy> moon-child: huh. i basically never work without paren auto-closing
<beach> moon-child: Eclector would fill in the rest of the buffer so that we get (let ((multiple-value-bla)) (f multiple-value-b<cursor>)), then we would take the CST and convert it to an AST to get the role of each identifier.
<moon-child> (I think structural editors would be a good solution, but those would require a somewhat radical rearchitecturing of editing and dynamic analysis infrastructure)
<dieggsy> beach: i'm just trying it out for the first time too FWIW
<beach> dieggsy: I still don't understand what "suggestions" you got.
<moon-child> beach: how do you infer the )) at the end? It seems very easy, in more complex scenarious, to get that wrong
<beach> moon-child: It can't always get it right, but the simple solution is often correct. Eclector has a bunch of restarts for that kind of stuff.
<dieggsy> beach: i'm not entirely sure how this is working yet. at first when i tried it, it suggested multiple-value-bla *only*, as in, in a completion popup. when i went back and tried it however, it suggested multiple-value-bind, multiple-value-call, everything *but* multiple-value-bla lol
<dieggsy> so much for that i suppose
<dieggsy> still, i'm willing to give it a try and see how it stacks up i guess. meh
<dieggsy> ..you can get multiple-value-bind completed from mvbind too. it's using some kind of fuzzy completion.
<beach> dieggsy: Here is another thing you can try to compare between the two. Type (let ((hello<newline> and observe where the cursor is located. It is under the `e' in hello in SLIME. Now try (let ((prog1<newline> and observe the cursor positionh.
<beach> *position.
<beach> dieggsy: My point is that multiple-value-bind should not be a suggestion since there is no such variable in scope.
<dieggsy> beach: it's under the E in sly for the first example, under the g in the second
<beach> And why on earth would it do that?
<beach> PROG1 is a lexical variable introduced by LET and not a special operator.
<beach> In fact, SLIME (or Emacs) nicely highlights the PROG1 for me as well, as if I should want that.
<dieggsy> beach: wait, what does slime do
<beach> It puts the cursor under the `g' and draws the prog1 in purple.
<dieggsy> oh, ok. so the same
<dieggsy> ....so your point is they're equally bad
<beach> And I am asking, "why on earth would it do that?
<beach> Yes.
<dieggsy> which is fine. but i guess for you then, i'm asking: which is less bad? lol
<beach> I was hoping that sly would be better as you said.
<dieggsy> well, i only said that specifically completion seemed better out of the box
<beach> Granted.
narimiran has joined #lisp
<dieggsy> beach: wait, so do you use emacs or slime at all in this case?
<beach> But I have just had enough with substandard software, so I am not up to comparing badness.
<dieggsy> we talkin like, command line repl + ed or something here? heh
<beach> I am using Emacs + SLIME because that's the best I know, though perhaps SLY is better. But I am also working on creating something much better.
Nilby has joined #lisp
<beach> Every day, I also use a crappy operating system that is the best one available (as far as I know).
<dieggsy> lol
<dieggsy> this is all fine, but just like a let binds variables in a particular scope, we can ask questions within a particular practical scope
<dieggsy> so you can have practical opinions and recommendations on existing software despite none of it being optimal
<dieggsy> nothing ever will be if you go deep enough
<beach> I think we can do much better than what we have, and I think my time is better spent trying to accomplish something better, than comparing several sub-optimal solutions.
<beach> We can at least analyze the buffer contents as well as a compiler does. I don't see any reason to do worse than that.
<dieggsy> that works when you have that time, but when you need to get something done now (or in the interim), you still need to compare the sub-optimal solutions
<dieggsy> in fact, as you've stated, you're using those sub-optimal solutions to accomplish the better thing. so the question "which sub-optimal solution should i use" isn't a useless one
charles` has joined #lisp
<beach> Sure, however, if I estimate that the differences are small, then I would spend more time comparing than what they deserve, and that would take up time. So I would need some indication that the difference is significant before I take time to compare.
<beach> That's why I asked you those questions.
nullman has quit [Quit: leaving]
<dieggsy> beach: and tbh, i do appreciate that, i learned some things along the way and gained useful insights about these tools, so cheers
<beach> My point is also that, if everyone needs to get things "done now", then we are collectively going to waste a lot of time on sub-optimal tools. So it would be better if each one took a little time to improve the tools so that everyone could become more productive.
<dieggsy> i think i'd agree on that. there's a line between practicality and complacency
nullman has joined #lisp
<ChoHag> Just saying, in all this time, you could have typed in 'bla' and moved on to figuring out how to make the computer guess what you're thinking of for the next expression.
luckless_ has quit [Remote host closed the connection]
luckless_ has joined #lisp
asarch has quit [Read error: Connection reset by peer]
* beach was apparently unable to get the message across, so will now be quiet.
<Nilby> beach: I very much agree we can do better, and it's werid, because I'm usually very dissatisfied with it, but the completion I usually use in emacs (based on dabbrev-expand) expands to "multiple-value-bla" in that case. But I know it's cheating and I want it to be real syntax aware too.
<Nilby> I've worked on parser based completion, but it too has a number of problems, and seems to be aided by statistical completion.
<beach> Again, I don't see why the editor couldn't do what the compiler does in order to determine what is in scope.
<dieggsy> ChoHag: lol
<White_Flame> bla
<Nilby> It should be able to, it's just not always what you want. But maybe it should be a first guess.
<White_Flame> hmm, I'm no closer to advancing the state of things in such a time
<White_Flame> I think I'm better off complaining & working as well
<White_Flame> stay mad, folks
<Nilby> After about (* 1000 bla) it starts to pay off though.
srhm has quit [Quit: Konversation terminated!]
<Nilby> or one hard to find bug based when you typed multiple-value-ble instead
<ChoHag> See, everyone always concentrates on the 'bla' and disregards the rest.
<Nilby> Also multiply the time saved by all the other people that can use your better completion.
<ChoHag> I'm working on this, fwiw, by removing as far as possible the distinction between editor and compiler.
<dieggsy> ChoHag: I dunno if you're being serious but that's a fascinating statement
<ChoHag> I am.
<Nilby> ChoHag: I'm pretty sure that's what beach is working towards too.
<ChoHag> Sounds like he's working on something out of the ordinary, certainly.
<ChoHag> That's good. We need unorthodox ideas.
charles` has quit [Ping timeout: 245 seconds]
<ChoHag> Unfortunately I'm surrounded by huge, shaggy yaks and my razor is blunt.
<Nilby> ChoHag: Same. The weight of yaks sitting on your average developer, or even lispers, is nearly crushing.
<ChoHag> Also fwiw, the point of my snide comment was not "type bla and move on" but of the larger question of trying to make the computer guess what you want with(out) giving it context.
<ChoHag> And that in that game, tab-completion is kicking the tires.
<ChoHag> Well it's emacs, so it's control-c-control-i-completion.
<ChoHag> Nilby: One particularly frustrating problem, and ironic since I'm doing exactly that, is the way perfectly good code remains unused while a new implementation gets written.
<White_Flame> and that's the point of sicl if I understand correctly
<Nilby> Agree. There's also a large weight of good but forgotten code, that's too overwhelming for me to think about.
monolithic has joined #lisp
karlosz has joined #lisp
Spawns_Carpeting has quit [Ping timeout: 252 seconds]
frost-lab has quit [Ping timeout: 246 seconds]
<fiddlerwoaroof> At one point I realized that many people don't use: https://github.com/anwyn/slime-company
<fiddlerwoaroof> It doesn't distinguish between operator and arugment positions and it's annoying in a couple ways, but its main advantage is that it works by querying your lisp system to determine what symbols are available
<dieggsy> ah, i actually am using that with slime
DHARMAKAYA has joined #lisp
<fiddlerwoaroof> cool, I shared it somewhere at one point and was surprised by the people who didn't know about it
karlosz has quit [Ping timeout: 265 seconds]
anticrisis has quit [Read error: Connection reset by peer]
<ChoHag> fiddlerwoaroof: That's exactly the sort of thing I mean.
<fiddlerwoaroof> I'd really like a better completion system, but it seems to me that any particular strategy for completions is going to have annoying edge cases
<ChoHag> It should be unthinkable that the system doesn't somehow make slime users aware that slime-company is available, at least.
anticrisis has joined #lisp
<ChoHag> But without going full xanadu.
<fiddlerwoaroof> I don't know how you solve that problem
<fiddlerwoaroof> I have all sorts of handy utilities on my laptop that no one can use because I haven't advertised them :)
<ChoHag> They're not available then are they?
<fiddlerwoaroof> slime-company is easy enough to find using normal emacs commands, though
<ChoHag> No we don't need the internet to become telepathic.
<fiddlerwoaroof> C-h P slime...
<moon-child> ChoHag: what's wrong with xanadu? :P
<no-defun-allowed> It's still virtual paper.
<fiddlerwoaroof> The other difficulty with completion is that sometimes text-based completion is better
<fiddlerwoaroof> If I have three symbols with somewhat conventional names, after I type foo-a, foo-<TAB> completing foo-a makes it easier to input foo-b
<fiddlerwoaroof> even though the completion is actually wrong, it's more useful than showing me either nothing (because I'm in a let and foo-a is a parallel binding) or some random symbol.
Spawns_Carpeting has joined #lisp
gaqwas has joined #lisp
gaqwas has joined #lisp
<fiddlerwoaroof> One thing I'd like is the ability to write code into the buffer with #1# and #1= and then tell emacs to "expand" the reader macros
quazimodo has joined #lisp
Jachy has quit [Quit: Leaving.]
<fiddlerwoaroof> It wouldn't be safe because it'd break identity, but it'd be pretty useful in some situations.
<moon-child> I'm inclined to say that if you need to duplicate enough code that that would be useful, you're probably doing something wrong anyway
<fiddlerwoaroof> I do it mostly in the slime repl
<fiddlerwoaroof> Things like #.(cons 'foo (cdr +))
<fiddlerwoaroof> Also, there's a bunch of places where that sort of editing shortcut would just be nice
<Nilby> Heh. My repl does that. It's easy to add to any repl.
<Nilby> just bind a key that does (write-to-stirng (read))
<fiddlerwoaroof> Yeah, also doing + will show the expansion
zefram22 has joined #lisp
<Nilby> or just press the key, then undo
Jachy has joined #lisp
orivej has joined #lisp
thomasb06 has joined #lisp
DHARMAKAYA has quit [Read error: Connection reset by peer]
varjag has joined #lisp
<dieggsy> i wonder if there's any real reason that scriptl should be using C (C++ ? )
<dieggsy> it's a very cool idea broken though it may be
<dieggsy> be interesting if it could be ported fully to CL
waleee-cl has quit [Quit: Connection closed for inactivity]
tempest_nox has quit [Read error: Connection reset by peer]
irc_user has joined #lisp
remby has left #lisp ["Good Bye"]
varjag has quit [Ping timeout: 246 seconds]
<jlarocco> In the Slime REPL, when I run (ql:quickload :my-package) where my-package has a syntax error, or some other failure, is there a shortcut or function to jump to the source code location causing the problem?
andrei-n has joined #lisp
Jachy has quit [Quit: Leaving.]
<jlarocco> If I compile the file with C-c C-k, I can use next-error and previous-error to jump to the location that caused the problem, but that doesn't seem to work using (ql:quickload) from Slime
theothornhill has joined #lisp
shka_ has joined #lisp
johannes_ has joined #lisp
gaqwas has quit [Ping timeout: 246 seconds]
karlosz has joined #lisp
zefram22 has quit [Ping timeout: 246 seconds]
mgiraud has joined #lisp
random-nick has joined #lisp
mgiraud has quit [Ping timeout: 252 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
andreyorst has quit [Ping timeout: 265 seconds]
<no-defun-allowed> Re-reading the Early History of Smalltalk, this statement could be read as in favour of generic functions and/or method combination: "And we soon discovered that "prototypes" were more hospitable than classes, and that multiple inheritance would be well served if there were classes for methods that knew generally what they were supposed to be about (inspired by Pat Winston's 2nd order models)."
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
andreyorst has joined #lisp
Jachy has joined #lisp
karlosz has quit [Quit: karlosz]
theothornhill has quit [Read error: Connection reset by peer]
z0d has joined #lisp
Lycurgus has joined #lisp
theothornhill has joined #lisp
imode has quit [Ping timeout: 240 seconds]
karlosz has joined #lisp
surabax has joined #lisp
mathrick_ has quit [Ping timeout: 265 seconds]
<pillton> I don't understand how "functions" coupled with state got so far. I am referring to the syntax for application and their declaration/definition.
heisig has joined #lisp
orivej has quit [Ping timeout: 265 seconds]
<Lycurgus> fwiw, smalltalk doesn't have multiple inheritance
ljavorsk has joined #lisp
<Lycurgus> pillton that reminds me of when I once asked my mother if they had electricity when she was a child
<Lycurgus> mutatis mutandis, what did people do before strict FP?
kevingal has joined #lisp
mathrick_ has joined #lisp
srandon111 has quit [Ping timeout: 240 seconds]
<Lycurgus> in fact before haskell, and erlang (outside switches), when strict FP meant ML, it (strict FP) was considered a useless academic toy
<Lycurgus> strict/pure whatever;strict properly contrasts with lazy at this point
<Lycurgus> language is not exactly ur friend
hiroaki has joined #lisp
<Lycurgus> it also makes it sound like langs with full referential transparency were now the norm which is hardly the case
<Lycurgus> rather there's a pervasive FP fad of sorts
Spawns_Carpeting has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
Spawns_Carpeting has joined #lisp
__jrjsmrtn__ has joined #lisp
_jrjsmrtn has quit [Ping timeout: 260 seconds]
srandon111 has joined #lisp
Lycurgus has quit [Quit: Exeunt]
<phoe> jlarocco: compile with debug 3, then the backtrace will have a green-colored frame that shows the form beind compiled
<phoe> from there you can jump to source location of that frame
shifty has quit [Ping timeout: 246 seconds]
shifty has joined #lisp
rixard has quit []
tophullyte has quit [Ping timeout: 252 seconds]
zzappie has joined #lisp
easye has quit [Remote host closed the connection]
hendursaga has quit [Ping timeout: 240 seconds]
zzappie has quit [Remote host closed the connection]
zzappie has joined #lisp
loskutak has joined #lisp
hendursaga has joined #lisp
sz0 has joined #lisp
easye has joined #lisp
karlosz has quit [Remote host closed the connection]
anticrisis has quit [Read error: Connection reset by peer]
White_Flame has quit [Quit: No Ping reply in 180 seconds.]
White_Flame has joined #lisp
pillton has quit [Quit: ERC (IRC client for Emacs 27.2)]
tgbugs has quit [Ping timeout: 260 seconds]
gigamonkey has quit [Remote host closed the connection]
tgbugs has joined #lisp
gigamonkey has joined #lisp
pbgc has joined #lisp
dhil has joined #lisp
Jesin has quit [Ping timeout: 240 seconds]
rdd has quit [Ping timeout: 240 seconds]
frost-lab has joined #lisp
hypercube has quit [Ping timeout: 245 seconds]
Jachy has quit [Remote host closed the connection]
lotuseater has joined #lisp
theothornhill has quit [Ping timeout: 260 seconds]
theothornhill has joined #lisp
Krystof has quit [Ping timeout: 240 seconds]
gigamonkey has quit [Ping timeout: 246 seconds]
saganman has joined #lisp
scymtym has quit [Remote host closed the connection]
epony has quit [Ping timeout: 240 seconds]
shifty has quit [Remote host closed the connection]
<pjb> moon-child: structural editors feel like straight jacket. I like the flexibility of emacs, allowing you to work at the character level as well as structurally thru things like paredit. It's a nice compromise IMO.
shifty has joined #lisp
irc_user has quit [Quit: Connection closed for inactivity]
<beach> pjb: That would be a "straitjacket".
<beach> But yes, now that we can parse the buffer contents incrementally, using the Common Lisp reader, I don't think there is any need for such restrictions.
<pjb> Oh! Thanks. :-)
vegansbane6963 has quit [Quit: The Lounge - https://thelounge.chat]
albusp has quit [Remote host closed the connection]
albusp has joined #lisp
Stanley00 has quit []
shifty has quit [Ping timeout: 240 seconds]
shifty has joined #lisp
saganman is now known as notsaganman
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
orivej has joined #lisp
shifty has quit [Ping timeout: 240 seconds]
<splittist> You speak as if editing at the repl with SUBST and SETF CXXR isn't optimal...
<flip214> splittist: yeah, ed for the win!!
notsaganman is now known as saganman
<pjb> if you have automatic editing to do, why not. But otherwise, consider something like sedit.
<pjb> A true structural editor for sexps.
<pjb> It's ed-like but the same could be done vi- or emacs-like with nice key bindings.
<pjb> paredit approaches it, while leaving the character basis. We could implement a sedit in emacs, purely structural.
andrei-n has quit [Ping timeout: 268 seconds]
Jesin has joined #lisp
andrei-n has joined #lisp
zupss has quit [Quit: leaving]
jello_pudding has quit [Ping timeout: 260 seconds]
jello_pudding has joined #lisp
vegansbane6963 has joined #lisp
zupss has joined #lisp
trokotech has quit [Remote host closed the connection]
hendursaga has quit [Ping timeout: 240 seconds]
hendursaga has joined #lisp
flazh has joined #lisp
zzappie has quit [Remote host closed the connection]
zzappie has joined #lisp
contrapunctus has left #lisp ["Disconnected: closed"]
contrapunctus has joined #lisp
andrei-n has quit [Quit: Leaving]
idxu has quit [Quit: ZNC - https://znc.in]
idxu has joined #lisp
f4r59 has quit [Read error: Connection reset by peer]
Duuqnd has joined #lisp
loskutak has quit [Quit: WeeChat 3.1]
Iolo has quit [Ping timeout: 240 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
Iolo has joined #lisp
heisig has quit [Quit: Leaving]
Bike has joined #lisp
ljavorsk has quit [Ping timeout: 245 seconds]
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #lisp
zefram22 has joined #lisp
orivej has quit [Ping timeout: 268 seconds]
andrei-n has joined #lisp
johannes_ has quit [Quit: leaving]
simplegauss has quit [Ping timeout: 260 seconds]
sabra has quit [Quit: Konversation terminated!]
pbgc has quit [Quit: Computer has gone to sleep.]
sveit has quit [Ping timeout: 248 seconds]
thonkpod has quit [Ping timeout: 248 seconds]
random-nick has quit [Quit: quit]
random-nick has joined #lisp
saganman has quit [Ping timeout: 252 seconds]
pbgc has joined #lisp
saganman has joined #lisp
sveit has joined #lisp
simplegauss has joined #lisp
hypercube has joined #lisp
nij has joined #lisp
<nij> Hello! I found that a script "dictionary" I wrote hasn't been working for a while.. but failed to see why's that the case: https://bpa.st/UILA
amb007 has quit [Read error: Connection reset by peer]
scymtym has joined #lisp
amb007 has joined #lisp
<beach> You don't exactly give the output that would tell us why. But one hint is that ASDF by default converts warnings to errors that will prevent the compilation from finishing properly. You may want to change that default.
thonkpod has joined #lisp
<nij> Err. whatelse output should I provide? This is the debugging message after I run (ql:quickload :dictionary)
<beach> Try putting this in your .sbclrc: (setf asdf:*compile-file-failure-behaviour* :ignore)
sveit has quit [Ping timeout: 245 seconds]
simplegauss has quit [Ping timeout: 260 seconds]
<nij> Thanks! I now see the bug, and have fixed it.
<nij> Should I leave that line in my .sbclrc? Or just to turn that on when it's needed?
thonkpod has quit [Ping timeout: 260 seconds]
<beach> I have mine in there permanently.
<nij> Good-fu! Thanks :-)
<beach> Sure.
random-nick has quit [Quit: quit]
rixard has joined #lisp
random-nick has joined #lisp
nij has quit [Remote host closed the connection]
zefram22 has quit [Ping timeout: 246 seconds]
epony has joined #lisp
zupss is now known as zups
simplegauss has joined #lisp
sveit has joined #lisp
klltkr has joined #lisp
theothornhill has quit [Ping timeout: 252 seconds]
thonkpod has joined #lisp
Josh_2 has joined #lisp
varjag has joined #lisp
xkapastel has joined #lisp
Lycurgus has joined #lisp
hypercube has quit [Ping timeout: 260 seconds]
<beach> phoe: Are you the one in charge of the streaming for ELS? If so, what is the deadline for uploading the talk?
nicktick has joined #lisp
<Josh_2> Hey
<Josh_2> Can someone show me an example of them using (declare (dynamic-extent <var>)) ?
<beach> There are several examples in the Common Lisp HyperSpec.
<beach> clhs dynamic-extent
<Josh_2> yes but the examples are just trivial
<Bike> what do you want to do that the examples don't cover?
<Josh_2> Was wondering if someone could show me an example in real code where they have used it to get a performance increase
<lotuseater> Josh_2: this is something which I still don't get ^^ got to know this after reading the Google Common Lisp style guide
<pjb> Josh_2: here is an example: https://termbin.com/iqq4
<Nilby> Josh_2: alexandria has examples
wsinatra has joined #lisp
<Bike> i mean, honestly, there's not much to it. if you make an object and you know it won't escape you can declare it dynamic-extent to hint to the compiler to stack allocate
<Bike> that's it. knowing when something escapes can be complicated, tho.
<pjb> the use of the guard cons cell lets you avoid a special case when you have to insert at the before the first element of the list. However, this cons cell is a temporary cons cell that won't be needed once the function returns.
<lotuseater> had the thought it could be useful if you loop many times and create each time new data in a DO clause
<pjb> Josh_2: therefore it can be declared dynamic-extend and the implementation could allocate it on the stack instead of the heap.
<pjb> It's dangerous to write dynamic-extend declarations, because in maintenance, the status of the object could change! It's better to let the compiler determine it itself, without error.
orivej has joined #lisp
<Nilby> I would only use a dynamic-extent declaration where it was demonstrated to make speed critical code faster.
Sheilong has joined #lisp
trokotech has joined #lisp
hypercube has joined #lisp
waleee-cl has joined #lisp
fengshaun has quit [Quit: bibi!]
fengshaun has joined #lisp
wooden has quit [Ping timeout: 265 seconds]
Lycurgus has quit [Quit: Exeunt]
wooden has joined #lisp
wooden has quit [Changing host]
wooden has joined #lisp
frost-lab has quit [Quit: Connection closed]
hypercube has quit [Quit: WeeChat 3.1]
jeosol has quit [Ping timeout: 240 seconds]
hypercube has joined #lisp
luckless has joined #lisp
Sauvin has quit [Read error: Connection reset by peer]
<Josh_2> Thanks for the responses
luckless_ has quit [Ping timeout: 240 seconds]
Sauvin has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 26.3)]
hiroaki has quit [Ping timeout: 260 seconds]
nnni has joined #lisp
srhm has joined #lisp
srandon111 has left #lisp ["leaving"]
<nnni> Is it possible to find out the size of a compiled function?
<Bike> not portably
<nnni> Is there a SBCL specific solution?
<Bike> hm, dunno. it's a bit of an involved question. for a closure the code will be sort of separate from the closure vector, for example
<phoe> beach: I am in charge of streaming; I don't know if we have an established deadline, heisig will know that as the programme chair
<phoe> personally I will be happy if you give it to me before the weekend
<phoe> but I do not know if heisig has any additional constraints on top of that
<beach> OK, good to know. Thanks.
<Bike> i guess you'd do sb-kernel:fun-code-header, and then look at the... there's a "code-size" and a "text-size". couldn't tell you what they are.
<Bike> and obviously these are unstable internal interfaces. why do you want to do this?
<nnni> Bike: I am compiling some data into closures. I want to see the differences b/w (data+runtime functions) and closures implementations.
<Bike> well, again, closures aren't stored as one thing. if you have multiple closures of the same function, in basically any implementation they'll all share the same code
<nnni> If you have access to OnLisp book, chapter 6.
<Bike> and code is usually separate from data
<nnni> I want to see how the size of closures grows with the size of input data.
<Bike> the size of the closures is a different question from the size of the function
<Bike> generally speaking closures are represented with a simple vector. there will be an entry for each thing closed over.
<Nilby> Perhaps a more portable and comprehensive way is to look at (room) differences under controled conditions, e.g. making sure gc is done.
<Bike> i don't think i'm explaining this well, sorry. What I mean is that the code - the executable code I mean - is stored separately from the closure data. That's what I meant by the size of the closure versus the size of the function.
<nnni> So it will be hard to inspect just the executable part of the closure?
saganman has quit [Read error: Connection reset by peer]
<Bike> well it sounds like you're not actually interested in the executable size, since that's a fixed cost, unlike the actual closed over data, which every closure instance will have its own copy of
<Bike> i'd say the basic guide here is that you can expect (let ((a x) (b y)) (lambda (n) (if n a b))) and (vector a b) to take up rougly the same amount of space, plus the closure has the fixed space of the code
saganman has joined #lisp
varjag has joined #lisp
<nnni> Bike: Thank You.
<phoe> nnni: just the executable part of the closure? hmmm
<phoe> I guess that #'disassemble is going to tell you that
<phoe> like, the total assembly size
<nnni> phoe: dissassemble is not giving me that
<nnni> It is showing some 14 bytes for a function of considerable size.
<phoe> 30 bytes in this trivial case
<phoe> and there is indeed 30 bytes of code in there
<phoe> ...why is there #'disassemble in that code though
<phoe> huh
<phoe> this smells like a SBCL bug
<nnni> Try something complicated like
<nnni> (disassemble (let ((x 42)) (lambda () (loop :for i :from 0 :upto x :do (princ i)))))
long4mud has quit [Quit: WeeChat 3.0.1]
yonkunas has joined #lisp
cage_ has joined #lisp
cosimone has joined #lisp
heisig has joined #lisp
<phoe> that's a bug in SBCL
<phoe> I bet $5
<Nilby> I think it knows the lambda is trapped
* phoe took it to #sbcl
heisig has quit [Quit: Leaving]
IPmonger_ has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
IPmonger has joined #lisp
imode has joined #lisp
zaquest has quit [Quit: Leaving]
zaquest has joined #lisp
cosimone has quit [Read error: Connection reset by peer]
hiroaki has joined #lisp
contrapunctus has left #lisp ["Disconnected: closed"]
contrapunctus has joined #lisp
heisig has joined #lisp
nnni has quit [Quit: leaving]
slyrus has joined #lisp
slyrus has quit [Remote host closed the connection]
thomasb06 has quit [Remote host closed the connection]
gitgood has joined #lisp
f4r59 has joined #lisp
mindCrime_ has joined #lisp
narimiran has quit [Ping timeout: 252 seconds]
slyrus has joined #lisp
slyrus has quit [Ping timeout: 252 seconds]
zups has quit [Quit: WeeChat 2.3]
heisig has quit [Quit: Leaving]
zups has joined #lisp
Krystof has joined #lisp
<phoe> hello, this is a message from the European Lisp Symposium organizational team
<phoe> During this year's ELS, we will be selling prints and hosting an auction of the original of The Y Combinator Codex, a 42cm x 240cm calligraphy piece.
<phoe> All proceeds from the auction and print sales made during the two days of ELS (sans printing and shipping costs) will be split evenly and donated to the following organizations, earmarked as money for promotion and development of the respective Lisp languages and their implementations:
<phoe> Free Software Foundation (elisp), Clojurists Together (clojure), Common Lisp Foundation (cl), Software Freedom Conservancy (Racket), and ACM SIGPLAN (earmarked as scholarships for the ICFP Scheme Workshop).
<phoe> this is the end of the message
slyrus has joined #lisp
narimiran has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
long4mud has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
slyrus has quit [Ping timeout: 260 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
mindCrime_ has quit [Ping timeout: 265 seconds]
<cage_> phoe, how can the people partecipate at the auction?
tophullyte has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
<dieggsy> damn, be nice if it had a less distracting background
<phoe> cage_: there'll be a web app for that, announced during the conference
johnjay has quit [Ping timeout: 252 seconds]
amb007 has quit [Read error: Connection reset by peer]
johnjay has joined #lisp
amb007 has joined #lisp
aeth has quit [Ping timeout: 252 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
aeth has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
gaqwas has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
<cage_> phoe, thanks!!
skapata has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
eschatologist_ has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
gum_ has joined #lisp
ecraven- has joined #lisp
xi has joined #lisp
leeren_ has joined #lisp
flip214_ has joined #lisp
theothornhill has joined #lisp
jibanes_ has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
santiagopim[m]1 has joined #lisp
kreyren has quit [Ping timeout: 276 seconds]
FennecCode has quit [Ping timeout: 276 seconds]
tweet[m] has quit [Ping timeout: 276 seconds]
arcontethegreat[ has quit [Ping timeout: 276 seconds]
eschatologist has quit [Ping timeout: 276 seconds]
e[m]1 has quit [Ping timeout: 276 seconds]
santiagopim[m] has quit [Ping timeout: 276 seconds]
leeren has quit [Ping timeout: 276 seconds]
ecraven has quit [Ping timeout: 276 seconds]
gum has quit [Ping timeout: 276 seconds]
xi- has quit [Ping timeout: 276 seconds]
flip214 has quit [Ping timeout: 276 seconds]
jibanes has quit [Ping timeout: 276 seconds]
ecraven- is now known as ecraven
gum_ is now known as gum
FennecCode has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
amb007 has joined #lisp
orivej has joined #lisp
tweet[m] has joined #lisp
kreyren has joined #lisp
notzmv has quit [Ping timeout: 240 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
arcontethegreat[ has joined #lisp
e[m]1 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
hiroaki has quit [Ping timeout: 260 seconds]
cosimone has joined #lisp
flip214_ is now known as flip214
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
zefram22 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
hiroaki has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
Inline has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
notzmv has joined #lisp
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
jonatack has quit [Ping timeout: 245 seconds]
amb007 has joined #lisp
jonatack has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
josemanuel has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
<ChoHag> Does CL have a standard description equivalent to scheme's RxRs?
<Xach> ChoHag: there is an ANSI standard
ntqz has joined #lisp
DHARMAKAYA has joined #lisp
<phoe> ChoHag: yes, see clhs
amb007 has quit [Read error: Connection reset by peer]
<phoe> clhs car
<phoe> if you go to the toplevel, then CLHS is a rendition of ANSI CL standard
amb007 has joined #lisp
karlosz has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
supercoven_ has quit [Read error: Connection reset by peer]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
<pjb> ChoHag: Well, it's not strictly equivalent to scheme RnRS: there's only One CL ANSI Standard to rule them all, One CL ANSI Standard to find them, One CL ANSI Standard to bring them all, and in the darkness bind them. So if you write a conforming CL program in 1996, it will work the same in 2021, and it will work the same in 2046. On the other hand, with scheme, you'd be hard pressed to locate r3rs implementations, and in 2046,
amb007 has joined #lisp
<pjb> won't find any working r5rs implementation, so your programs and libraries will be dusk, rotten bits.
<ChoHag> Does it have to be in the darkness?
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
<phoe> only if you go real cheap on the lightbulbs
amb007 has joined #lisp
<pjb> ChoHag: said otherwise, my advice is, if you don't plan to finish the program this year, and become a billionaire selling it by next year, if instead you plan to work on your free time for the next few years, perhaps the next few decades, you should better use Common Lisp to avoid having to rewrite it every year (like, eg. swifth programs for iOS that require maintenance only to stay on the AppStore because of new versions of iO
amb007 has quit [Read error: Connection reset by peer]
<pjb> the Swift language!).
amb007 has joined #lisp
<ChoHag> Oh other end of the stick. I'm working on an implementation.
<Xach> ChoHag: of what?
<ChoHag> I don't want to write things in CL. I'm making something I want to implement CL in.
<pjb> Great! And this means that you won't have to change the implementation each year, so you can concentrate on making it better. You may also prefer to collaborate with beach on #sicl ?
<Xach> I don't think I've ever come across someone unfamiliar with the CL standard who is writing a new language in which to implement CL
<ChoHag> I'm not trying to get anyone to change implementations. I want to stop all that sort of shit.
<ChoHag> I want to explore ideas around interoprability.
<ChoHag> That's why I want a standard to work toward.
slyrus has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
<dieggsy> ChoHag: could you be more specific
amb007 has joined #lisp
<ChoHag> Not really. I'm chewing the fat a bit.
amb007 has quit [Read error: Connection reset by peer]
<ChoHag> My focus has been mostly on scheme. I've not touched CL for a few years. I want to re-acquaint myself.
amb007 has joined #lisp
<ChoHag> It ANSI the latest word in CL standards?
amb007 has quit [Read error: Connection reset by peer]
<ChoHag> Is
amb007 has joined #lisp
<Xach> ChoHag: yes
<dieggsy> latest and only AFAIK
amb007 has quit [Read error: Connection reset by peer]
slyrus has quit [Ping timeout: 252 seconds]
amb007 has joined #lisp
<ChoHag> Thanks.
anticrisis has joined #lisp
wsinatra has quit [Ping timeout: 252 seconds]
<pjb> ChoHag: as I said, there is only one ANSI CL Standard for ever.
<pjb> ChoHag: if you write a CL implementation today, it will still be a CL implementation in 20 or 40 years from now. Actually, until the singularity!
<pjb> ChoHag: that said, it is allowed to write implementations of a subset of Common Lisp, or superset (extensions) to CL as long as it's clearly documented.
<pjb> ChoHag: nothing prevents you to spend the next 40 years improving on your extensions to the CL language in your implementation.
wsinatra has joined #lisp
<dieggsy> pjb: 'allowed' in what sense? just like, you can still call this CL by the standard's definition ?
<dieggsy> cause technically people can do whatever they want heh
<Nilby> In this case allowed meas conforming to standard, not what one can do.
andrei-n has quit [Quit: Leaving]
hjudt has quit [Quit: leaving]
Lord_of_Life_ has joined #lisp
<pjb> dieggsy: in the sence that as long as the implementation is a conforming CL implementation, a conforming CL program will produce the same results as on any other conforming CL implementation. Ie. the extensions cannot modify the semantics of the base CL language.
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
Lord_of_Life has quit [Ping timeout: 265 seconds]
amb007 has quit [Read error: Connection reset by peer]
<pjb> dieggsy: an implementation can easily provide new functionalities in different packages. Eg. clisp provides a ffi in the FFI package, a interface to regex(3) in the REGEXP package, access to screen and keyboard in the SCREEN and KEYBOARD packages, access to LINUX specific operations in the LINUX package, etc.
amb007 has joined #lisp
Lord_of_Life_ is now known as Lord_of_Life
<dieggsy> pjb: fair, thanks!
<pjb> dieggsy: furthermore, functions taking &key arguments, may allow additionnal key arguments for extensions. The standard behavior apply when those additionnal key arguments are not provided.
<pjb> dieggsy: some extensions in the class hierarchy are possible when mentionned (intermediate classes, or subclasses could be provided). etc. It's all specified in great detail.
<dieggsy> pjb: also wow, clisp sounds really neat..... should i switch from SBCL heh
<pjb> But the important point: to remain a conforming implementation any extension (or subset of the language) must be clearly documented.
<pjb> dieggsy: well, it depends. sbcl has its own extensions, but both have problems. The best is to use all the implementations to validate one's conforming code, and to use the implementation best adapted to the deployment case.
hjudt has joined #lisp
<pjb> When you want to write portable programs you would avoid those implementation specific extensions anyways, using preferably portability libraries or conforming libraries. Or using #+/#-, you would make use of the extension only when the specific implementation is used.
<Nilby> dieggsy: Sadly clisp isn't as neat as it sounds anymore. It has some problems, which likely won't be resolved, and you can have all that in sbcl, and bunch other stuff which make it very fast.
<dieggsy> Nilby: ah, what sorts of problems ?
<pjb> I still have more problems, bugs and crashes with sbcl than clisp…
<pjb> dieggsy: for example, sbcl lies to you. It says that call-arguments-limit is 4611686018427387903, but when you try to call (apply f l) with a list L containing 100000 elements, it crashes.
<dieggsy> lol
<pjb> Other implementations give smaller call-arguments-limit and don't crash!
<Nilby> It doesn't handle unicode that well anymore. It's pathnames are troublesome.
<pjb> clisp has 4096 and works perfectly.
<dieggsy> when you're applying a function to that many arguments, one might argue it's more an issu of program design?
<pjb> clisp has the best encoding support, notably unicode: it knows the name of all the unicode characters. That's not the case with sbcl or ccl they give you useless names such as #\u12345
<pjb> All implementations have problem with pathnames: https://github.com/informatimago/check-pathname
<antoszka> pjb: how does clisp keep up with the growing unicode standard?
<antoszka> (if you *all the unicode characters*?)
<antoszka> it doesn't seem super actively maintained
zzappie has quit [Ping timeout: 240 seconds]
<pjb> clisp has a report of 72 lines, while sbcl (some old version) had 338 lines of problems!
<_death> pjb: the problem with clisp is that it needs a new release
<pjb> antoszka: it uses the iconv library ;-)
zzappie has joined #lisp
<antoszka> well, okay then ;)
<pjb> _death: it's on github, so you can get as up-to-date as you wish.
<_death> pjb: I've had trouble compiling it the last time I tried.. some .d compilation errors
<pjb> That's possible.
<pjb> More maintainers would help.
<pjb> As soon as I win the lotto…
jonatack has quit [Quit: jonatack]
slyrus has joined #lisp
slyrus has quit [Remote host closed the connection]
slyrus has joined #lisp
<jcowan> Call-arguments-limit is mostly important when applying a function rather than invoking one. (apply + list) really be non-portable when the list has more than 50 elements.
<jcowan> s/really/should not realloy
<jcowan> really, even
slyrus has quit [Ping timeout: 252 seconds]
cage_ has quit [Quit: Leaving]
<_death> since you can query its value, you can use it to portably apply with more than 50 elements on implementations that support it..
notzmv has quit [Ping timeout: 252 seconds]
wsinatra has quit [Quit: WeeChat 3.1]
<jcowan> Case by case, yes. + is associative, but - needs a different approach
<_death> + is not always associative..
qewr is now known as CrazEd
CrazEd is now known as Guest43342
<jcowan> True.
zzappie has quit [Ping timeout: 240 seconds]
<dieggsy> _death: are you referring to floating point cause TIL
<_death> yes
<jcowan> So how would you write a function to apply an arbitrary number of list elements to an arbitrary (opaque) function?
<_death> you wouldn't?
<phoe> jcowan: that's the issue
<phoe> APPLY is not implementable in terms of portable CL without APPLY
<phoe> well, I mean, you could dispatch based on the total number of arguments
<phoe> and then do a giant gase of (funcall foo), (funcall foo arg1), (funcall foo arg1 arg2), ..., (funcall foo arg1 arg2 ... argn)
<phoe> this would be ugly as holy hell but technically it could work
<Bike> (defun apply (f &rest args) (multiple-value-call (values-list (butlast args)) (values-list (first (last args))))
<Bike> just to be pedantic for a moment
<phoe> wait
<Bike> oh, i forgot to throw f in the call. whatevs
<phoe> clhs multiple-value-call
<phoe> okay, TIL
<Bike> sbcl implements apply in terms of multiple-value-call so that it only needs to optimize one kind of vararg thing
<phoe> Bike: thanks for that, I haven't thought of that
<phoe> wow! nice
<Nilby> nice one Bike :)
<jcowan> My point is that (contra what _death appeared to be claiming), there is no waay to write a portable APPLY* that uses APPLY to accept arbitrarily long lists.
<Bike> i think _death just meant that you can do (if (> call-arguments-limit (length args)) (apply f args) (error "implementation sucks too hard, sorry!"))
zefram22 has quit [Quit: zefram22]
zefram22 has joined #lisp
<jcowan> Ah, I see.
ljavorsk has joined #lisp
<_death> now we need to check each implementation's multiple-values-limit ;)
<pjb> jcowan: check group-by!
<jcowan> that's a first step, but it doesn't really get you there, because you don't know what to do after grouping them.
<_death> pjb: do you really need that min?
<Nilby> It's like core Lisp is a system of equations where you can solve in terms of the others.
<moon-child> 'metacircular' thing is thataway
<moon-child> don't remember link sadly. The original site is dead now, though it's on the internet archive
gaqwas has quit [Ping timeout: 240 seconds]
<pjb> _death: yes, sbcl is really idiotic.
<_death> pjb: (nthcdr 3 '(x)) => NIL
<pjb> call-arguments-limit is gigantic, and nthcdr doesn't terminate before having counted down the whole count!
<pjb> _death: (nthcdr call-arguments-limit '(x)) ; answer when it's done!
<pjb> Anyways, the point is that apply is called with lists that have less elements than call-arguments-limit so it should not crash.
<_death> hmm.. this reminds me the old doctor joke..
<pjb> Exactly, hence the min.
<_death> pjb: well, why not define your own nthcdr?
<pjb> Because there's one in CL!
<_death> or patch sbcl ;)
<pjb> Perhaps one day, eventually.
<_death> pjb: what I mean is, you are concerned about passing call-arguments-limit to nthcdr, so why fix that only at this location instead of defining pjb-nthcdr that you can always use
<pjb> Because the beyond nthcdr, the problem is sbcl lying about call-arguments-limit anyways.
<_death> so back to being the doctor.. why would you do that?
<_death> (pass c-a-l)
<pjb> to splice the argument list by chunks that are acceptable by apply.
<pjb> read the code.
<_death> so it seems you want an sbcl-conservative-call-arguments-limit
<_death> I think it probably depends on the control stack size
Spawns_Carpeting has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
<_death> so can't be a dumb constant
Spawns_Carpeting has joined #lisp
<pjb> It could indeed be computed from the control-stack-size parameter, but in any case, it better be conservative as you say, because the stack may be almost full already.
<Nilby> I would bet it's accurate, but I'm not curious enouch to test it.
zefram22 has quit [Ping timeout: 276 seconds]
<Nilby> especially not on systems with an OOM killer
<_death> anyway, defining such a conservative constant would avoid the special casing and related code
<mfiano> Not sure how much this changed in the 3 years since I posted it: https://gist.github.com/mfiano/1a31ef23cdde03e17843e02ffbffa46f
Spawns_Carpetin- has joined #lisp
narimiran has quit [Ping timeout: 260 seconds]
aartaka_d has joined #lisp
Spawns_Carpeting has quit [Ping timeout: 265 seconds]
<_death> but that nthcdr doesn't check for nil is indeed strange
mindCrime_ has joined #lisp
aartaka has quit [Ping timeout: 240 seconds]
<Nilby> I actually appreciate sbcl's optimism. like for (glob "/**"), but it usually fails because fixed heap :(
<_death> if checking for nil on each iteration is too slow, it could split it so that it checks every M iterations
zefram22 has joined #lisp
Sauvin has quit [Ping timeout: 240 seconds]
Sauvin has joined #lisp
ljavorsk has quit [Ping timeout: 276 seconds]
shka_ has quit [Ping timeout: 268 seconds]
Guest43342 is now known as CrazEd
CrazEd is now known as Guest48036
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
theothornhill has quit [Ping timeout: 252 seconds]
long4mud has quit [Quit: WeeChat 3.0.1]
shifty has joined #lisp
long4mud has joined #lisp
notzmv has joined #lisp
cosimone has quit [Remote host closed the connection]
pbgc has quit [Quit: Computer has gone to sleep.]
gaqwas has quit [Ping timeout: 276 seconds]
<gendl__> Hi, in sbcl, how can I set a global parameter so that its value will be inherited by any newly spawned threads?
<gendl__> for example `*read-default-float-format*`
<phoe> gendl__: sb-ext:symbol-global-value
<gendl__> if I set it in .sbclrc then it stays set in zaserve webserver threads;
<phoe> this value will be visible if other threads do not rebind a variable
<gendl__> if i just setq it in some application file, then start the webserver, the server threads don't see the value.
<phoe> oh, wait
<phoe> that's a standard CL symbol
<phoe> hm, troublesome
<gendl__> it's a standard CL symbol -- but I'm allowed to set it to double-float in my application, aren't I?
<phoe> you are
gaqwas has joined #lisp
gaqwas has joined #lisp
<phoe> but the question is how this behaves in a multithreading context
<gendl__> with emacs/slime there does not seem to be a problem
<gendl__> i only started noticing the problem when running bare-bones in a shell
<_death> gendl: that would be a bad idea... a lot of code assumes 1.0 is a single-float, and contains declarations to this end
<_death> gendl: so binding *read-default-float-format* is practical only in limited contexts
<gendl__> _death: so I should just dynamically bind it with let and never setq or setf it?
surabax has quit [Quit: Leaving]
<_death> gendl: what I mean is that it's useful if you, say, READ something yourself.. if you load arbitrary code, it's likely not a good idea to have it bound to anything but single-float
bitmapper has quit [Quit: Connection closed for inactivity]
frgo has quit [Remote host closed the connection]
tempest_nox has joined #lisp
dhil has quit [Quit: Leaving]
frgo has joined #lisp
gaqwas has quit [Ping timeout: 252 seconds]
saganman has quit [Ping timeout: 252 seconds]
<gendl__> ok thanks.
<_death> just my experience.. and imagine that some of that code also turns safety off.. evil stuff
<jcowan> As a particular case, if you are reading numeric data generated by something other than CL or Fortran, it is advisable to dynamically bind it to double-float.
<Odin-> Floating point arithmetic is a mess.
hjudt has quit [Ping timeout: 246 seconds]
notzmv has quit [Ping timeout: 252 seconds]
djuber has joined #lisp
djuber has quit [Read error: Connection reset by peer]
kevingal has quit [Remote host closed the connection]
<jcowan> It depends on how you look at it: inexact values or inexact operations.
djuber has joined #lisp
<gendl__> Sounds like I have to do A fairly major reengineering an Gendl
<jcowan> The usual approach is to say that float values are inexact representations of mathematical numbers, but an alternative view is that float values represent exact numbers, but floating point operations are fast but inexact approximations to mathematical truth.
<gendl__> on*... as it is now, it pretty much depends on *read-default-float-format* being bound to ‘double-float. Annoying things will start breaking everywhere if that’s not the case.
varjag has quit [Ping timeout: 252 seconds]
<gendl__> And indeed, quickloading Gendl will clobber that parameter globally.
Guest48036 is now known as CrazEd
<moon-child> I think inexact representation is usually the better approach
<moon-child> if you consider algorithms that actually track precision
<gendl__> In order to be a good citizen, it sounds like Gendl has to stop doing that and figure out where to strategically do local dynamic binding.
<phoe> yes
CrazEd is now known as Guest61939
<_death> I guess you could add some asdf-specific code to bind it for certain components.. not tried that though
<gendl__> It’s going to take a lot of regression testing, So it will have to happen after our May 1 release. Not enough time to risk it before that.
hjudt has joined #lisp
<dieggsy> is CFFI the most portable to write FFI code ?
<dieggsy> most portable way*
<phoe> dieggsy: yes
jrm2 has joined #lisp
jrm2 has quit [Client Quit]
jrm2 has joined #lisp
<jcowan> dieggsy: Note that CFFI has multiple implementations, conceptually one for each CL implementation.
<dieggsy> jcowan: wait, how would that affect how i develop with it
<jcowan> It doesn't directly, except that if there is no CFFI implementation for the CL you are using, you are out of luck.
<phoe> CFFI has support for all major impls though, doesn't it?
Spawns_Carpetin- has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
<Odin-> jcowan: How is that different in any meaningful way from CL itself?
<jcowan> It isn't.
Spawns_Carpeting has joined #lisp
<jcowan> But it is portable in a different sense from most portable packages.
<jcowan> In particular, some features don't work on some implementations, see https://common-lisp.net/project/cffi/manual/cffi-manual.html#Implementation-Support
<dieggsy> jcowan: oh, i see. that's good to know, thank you
nicktick has quit [Ping timeout: 260 seconds]
<moon-child> damn, allegro and lispworks are both stuck on utf16
<moon-child> s/utf16/16-bit code points/
<Odin-> A lot of things are.
shifty has quit [Ping timeout: 246 seconds]
<Odin-> Java, and thus ABCL, to mention one.
shifty has joined #lisp
Nilby has quit [Ping timeout: 250 seconds]
Duuqnd has quit [Remote host closed the connection]
jrm2 is now known as jrm
<jcowan> IIRC, CMUCL is stuck on Latin-1
<jcowan> (or 8-bit characters)
<moon-child> is cmucl used at all anymore, though? My impression was sbcl superseded it
<jcowan> No clue on that
pbgc has joined #lisp
pbgc has quit [Client Quit]
hjudt has quit [Ping timeout: 240 seconds]
hiroaki has quit [Ping timeout: 260 seconds]
<dieggsy> hmm, i'm looking for something like CHICKEN's foreign-value? e.g. (foreign-value SOME_C_VAR int)
<dieggsy> basically an inline defcvar
<dieggsy> ... i think
<kagevf> I like White_Flame's fast-body macro idea (yeah just read it now)
hjudt has joined #lisp
<jcowan> kagevf: url?
igemnace has quit [Quit: WeeChat 3.1]
<_death> dieggsy: if you M-. on cffi:defcvar, you may arrive at the conclusion that (cffi:mem-ref (cffi:foreign-symbol-pointer "SOME_C_VAR") :int) may work ;)
hiroaki has joined #lisp
akoana has joined #lisp
hjudt has quit [Ping timeout: 252 seconds]
<dieggsy> _death: ah, it doesn't only because what i'm after is actually a macro in a header file, lol. but cheers
<dieggsy> i guess CFFI primarily works on shared libraries and not header files... ?
<phoe> yes
<_death> there is cffi-grovel
<phoe> macros disappear after compilation and cffi works on compiled objects; but see what _death said
<phoe> the groveller is capable of parsing header files
<dieggsy> hmm, looking into it now, thanks
<drmeister> Does ASDF or quicklisp provide a function to get a list of all systems loaded?
<phoe> (asdf:already-loaded-systems)
<drmeister> Thank you!
<drmeister> I was trying riffs on all-loaded, all-systems ...
<phoe> (apropos "loaded") did the trick
<jcowan> Anyone know why it's called "the groveler"? "Grovel" in the sense "inspect closely" seems to be computer jargon with no obvious connection to its mundane meanings "be prone", "crawl", etc.
<phoe> it's kinda like russian roulette
<jcowan> "abase oneself"
<drmeister> Cando uses 81 asdf systems. Yeesh.
<dieggsy> _death or phoe not sure i understand how to use cffi-grovel from the docs
<_death> jcowan: in the manual it says "grovels through system headers".. so maybe in the sense of "crawl"
<no-defun-allowed> grovel, verb, 3. to take pleasure in mean or base things.
* jcowan chuckles
<_death> dieggsy: you could look at a project that uses it.. here's a simple one https://github.com/death/monotonic-clock
<phoe> drmeister: a humble number for a pretty complete programming environment
charles` has joined #lisp
<dieggsy> _death: thanks. still getting used to the whole packaging framework. i guess it has to be used with an asdf declaration, not in code like CFFI itself
<_death> dieggsy: yes
bilegeek has joined #lisp
Guest61939 is now known as CrazEd
CrazEd is now known as Guest80223
<kagevf> jcowan: I don't think White_Flame left one? but the basic idea was to create a macro that you could wrap around a defun and the macro would set compiler optimizations, etc
<jcowan> Ah
<kagevf> jcowan: White_Flame wrote this: (defmacro fast-body (&body body) ...)
djuber has quit [Ping timeout: 252 seconds]
<kagevf> if you update a macro you have to re-compile every defun that uses it ... something I didn't know and caused me a lot of confusion ... so FYI anybody who didn't know that hehe
<pjb> kagevf: that's why project often have macros in a separate file, so that we may write file dependencies in asdf and have things recompiled automatically.
* White_Flame 's ears burn
<pjb> phoe: it's the opposite: each major implementation has a custom FFI. Therefore there can be a CFFI backend for them.
<no-defun-allowed> Whatever happened to White_Flame? He got a macro that made his ears burn...
<White_Flame> (defmacro fast-body (&body body) `(locally (declare (optimize (speed 3) (safety 0) (space 0) (compilation-speed 0))) ,@body))
<pjb> moon-child: cmucl may still be used, since it has some differentiating characteristics. For example, it can be compiled with 8-bit characters instead of unicode. That may be useful.
<pjb> moon-child: but otherwise, yes, sbcl has mostly superceded it.
<pjb> jcowan: cmucl is not stick on latin-1, you can also compile with with unicode support.
<jcowan> Ah, okay
djuber has joined #lisp
<no-defun-allowed> Suppose someone might find sanely bootstrapping too boring.
<kagevf> pjb - like when you do an asdf:load?
<White_Flame> plus a (slow-body ...) that muffles BCL optimization warnings :-3
* kagevf steals White_Flame's macro
<White_Flame> *SBCL
<White_Flame> obviously mind the (safety 0) implications
<kagevf> pjb: asdf:load-system, actually
<drmeister> Is there a way to get a list of all source files in an asdf system from within Common Lisp?
<drmeister> I'm writing a report and I'm taking an inventory of the amount of code that we compile into our runtime.
<drmeister> So far: 580,000 lines of C++; 236,000 lines of Common Lisp code; 81 ASDF systems.
random-nick has quit [Ping timeout: 252 seconds]
<phoe> drmeister: (asdf:module-components (asdf:find-system :phoe-toolbox))
<drmeister> The last one doesn't mean anything to non-CL people - so I'm trying to get an estimate of the number of lines of CL code that come from ASDF systems.
<phoe> then use #'asdf:component-pathname to extract actual pathnames
<phoe> don't forget to include the cloc statistics for clasp itself :D
<White_Flame> speaking of dynamic-extent from upstream in the logs, is there a legal way to push to a lexical list var while having all the cells be dynamic-extent?
<pjb> kagevf: yes.
<pjb> White_Flame: of course, you can do whatever you want with the cells. That's the danger of dynamic-extend declarations.
Oladon has joined #lisp
<pjb> White_Flame: note that the declaration is on the variable holding the value, not the value, while it applies obviously to the allocated values…
DHARMAKAYA has quit [Quit: Turning off a portion of this simulation.]