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
l1x has quit [Quit: Connection closed for inactivity]
rumbler31 has joined #lisp
<aeth> I'm surprised that a possible alternative to REMOVE-IF-NOT wasn't REMOVE-UNLESS
<aeth> UNLESS is (almost) IF-NOT in the language...
<White_Flame> it's NOT-WHEN
<aeth> right
<aeth> a true IF-NOT in the language would have a second branch and just reverse the order of the IF
<aeth> so (if-not test else then)
<White_Flame> (remove-if-not (lambda (x) (not-when ...)) ...
<aeth> (defmacro if-not (test then &optional else) `(if ,test ,else ,then))
rumbler31 has quit [Ping timeout: 265 seconds]
<Xach> /win 2
matryoshka has quit [Quit: ZNC 1.8.2 - https://znc.in]
matryoshka has joined #lisp
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
judson_ has joined #lisp
igemnace has quit [Quit: WeeChat 3.0]
igemnace has joined #lisp
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
random-nick has quit [Ping timeout: 256 seconds]
judson_ has joined #lisp
asarch has quit [Quit: Leaving]
matryoshka has quit [Quit: ZNC 1.8.2 - https://znc.in]
matryoshka has joined #lisp
akoana has left #lisp ["Leaving"]
matryoshka has quit [Client Quit]
matryoshka has joined #lisp
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
judson_ has joined #lisp
ariedro has quit [Ping timeout: 265 seconds]
judson_ has quit [Client Quit]
judson_ has joined #lisp
judson_ has quit [Client Quit]
jeosol has joined #lisp
ramus has joined #lisp
rumbler31_ has quit [Ping timeout: 264 seconds]
rumbler31_ has joined #lisp
Demosthenex has quit [Ping timeout: 256 seconds]
wxie has joined #lisp
Demosthenex has joined #lisp
ralt has quit [Quit: Connection closed for inactivity]
bitmapper has joined #lisp
judson_ has joined #lisp
ramus has quit [Quit: leaving]
secretmyth has quit [Quit: Leaving]
rumbler31 has joined #lisp
<edgar-rft> I've heard REMOVE-UNLESS does the opposite of REMOVE-UNMORE
scymtym_ has joined #lisp
<White_Flame> for most cases, REMOVE-UNFEWER would be more grammatically correct
scymtym has quit [Ping timeout: 260 seconds]
rumbler31 has quit [Ping timeout: 256 seconds]
dbotton has joined #lisp
ramus has joined #lisp
<dbotton> if anyone over next day or so has time and can try out my tutorial 8 from CLOG running at http://office.botton.com:8080/ I made some critical changes from last test (thank you for using it those that did). The source is at https://github.com/rabbibotton/clog/blob/main/tutorial/08-tutorial.lisp
brandflake11 has joined #lisp
<brandflake11> Hey all, I have a question for you all. I am writing a function in lisp, and need to create a list out of the function's arguments. Here is what I have for the function:
<brandflake11> (defun pick-three (note1 note2 note3)
<brandflake11> (nth (random 3) note-list)))
<brandflake11> (let ((note-list (list (note1 note2 note3))))
<brandflake11>
<brandflake11> Now, when I run this, it has errors of course
<Bike> please use a pastebin service for multi-line pastes. anyway, so this function is supposed to randomly select and return one of its three arguments?
<brandflake11> Yes, exactly, and sorry about the pastebin thing
<Bike> The only problem I see in this paste is that you meant to write (list note1 note2 note3).
<Alfr> brandflake11, assuming note1 isn't a function, there's your error.
<Bike> other than that it works, though it might not be the best way to do it.
<brandflake11> Alfr: What do you mean by this?
<Bike> you wrote (note1 note2 note3). this means it will call the function NOTE1 with two arguments. Since there's no function called NOTE1, you get an error.
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Alfr> brandflake11, what Bike said above. You want (list n1 n2 n3), not (list (n1 n2 n3)).
<Bike> your compiler might alert you to this. SBCL says "Undefined function: NOTE1" when you compile, and "The function NOTE1 is undefined" when you actually call it.
<brandflake11> Oh, I see
nicktick has joined #lisp
<brandflake11> Thanks so much all, it works now!
<brandflake11> Is there a better way to take the arguments and make a list?
<Bike> No, but if you all you want to do is pick one of the arguments randomly, you probably don't need to make a list.
<brandflake11> I tried '(note1 note2 note3), but they gave me the literal variable names as members in the list
<brandflake11> Bike: I see. I'm not sure what function would help with that though.
<brandflake11> Is there a function that returns nth of arguments?
<saturn2> you can do (defun pick-random (&rest args) (nth (random (length args)) args))
<brandflake11> I haven't learned about &rest yet, but that's something I need to look into
<brandflake11> Oh shoot, does that mean I can use any number of arguments?
<saturn2> yes
<brandflake11> That's awesome! Thanks so much, I appreciate everyone's help
<brandflake11> Does the &rest args stand for something? Like is it an abbreviation of a phrase in English?
<Alfr> There's call-arguments-limit .
<saturn2> rest is just the word rest, as in the rest of the arguments
<saturn2> and args is short for arguments
<brandflake11> saturn2: I see. That makes sense
<saturn2> args is just a variable name which can be anything you want
<brandflake11> Oh, and args can substitute where you want the arguments.
<brandflake11> It's like a meta-variable
<saturn2> it's just a regular variable, which holds a list of the rest of the arguments
<brandflake11> That makes more sense
judson_ has joined #lisp
ukari has quit [Remote host closed the connection]
ukari has joined #lisp
mmmattyx has quit [Quit: Connection closed for inactivity]
<brandflake11> One more question: can you use &rest with other mandatory variables? Like (note1 note2 &rest args) making note1 and note2 arguments mandatory?
<brandflake11> Sorry, I meant mandatory arguments
wxie has quit [Ping timeout: 260 seconds]
<saturn2> yes, you can
<fiddlerwoaroof> If you know you have 3 arguments, something like this is probably better: (define pick-three (a b c) (ecase (random 3) (0 a) (1 b) (2 c)))
<brandflake11> saturn2: that is absolutely sweet
<brandflake11> fiddlerwoaroof: thanks for this suggestion. I'll look into the ecase function!
python476 has quit [Ping timeout: 264 seconds]
<fiddlerwoaroof> My laptop autocorrected defun there...
<brandflake11> Oh, I didn't even notice
pillton has joined #lisp
<saturn2> yes, fiddlerwoaroof's way is more efficient
<brandflake11> saturn2: What makes it more efficient? Is it easier on memory?
<brandflake11> saturn2: Or is just a matter of the programming notation
<brandflake11> ?
<saturn2> both memory and cpu, it doesn't have to allocate a list or iterate over the list
wxie has joined #lisp
<brandflake11> saturn2: That is good to know about and keep in mind
<saturn2> you could also get the best of both by adding (define-compiler-macro pick-random (&rest args) `(ecase (random ,(length args)) ,@(loop for arg in args for i from 0 collect (list i arg))))
<brandflake11> saturn2: Oh jeez, this one looks a little above my head :D
<brandflake11> That notation is interesting
<saturn2> that's called quasiquote, it's basically a template
<saturn2> that macro writes code like what fiddlerwoaroof wrote, but for any number of arguments
<brandflake11> saturn2: So the macro writes the lisp code itself?
<saturn2> yeah, that's how macros work
<saturn2> they are functions that return lisp code, which is then inserted in place of the macro call
<brandflake11> saturn2: I haven't learned about macros yet either. But man, that is really cool.
<brandflake11> With a macro, could you create a loop that makes a series of lisp code?
<saturn2> you mean a macro that recursively uses itself? yes, you can
<saturn2> and of course you can have regular loops in your macro, the one i wrote above has one
<brandflake11> :O Wow, that is insane.
<brandflake11> Would you mind explaining what the ` , and ,@ means in the quasiquote?
<brandflake11> Or direct me to a good page to read about them?
<brandflake11> I am looking at the hyperspec, but sometimes it goes a bit over my head
<aeth> brandflake11: So with quote, it basically follows the distributive property. '(a b c) is essentially like (list 'a 'b 'c) just like (* z (+ x y)) is like (+ (* z x) (* z y))
<aeth> Quasiquote is a quote you can unquote. `(a b c) is essentially the same as '(a b c) because there's nothing to unquote so it's just all quoted.
<aeth> `(a ,b c) however, will "unquote" b and so it's like (list 'a b 'c) instead of like (list 'a 'b 'c)
<aeth> i.e. it will try to look up the variable b
<brandflake11> aeth: Thanks so much for the explanation. What does the ,@ mean?
<aeth> ,@ is a bit more complicated. It's unquote splicing. It basically appends the inner list into the outer list
<aeth> So `(a b ,@'(c d e) f) => (A B C D E F)
<aeth> Notice that '(c d e) is quoted. Because otherwise it will try to funcall c
<brandflake11> aeth: Thanks, I was just about to ask you about that last point
aartaka has joined #lisp
<aeth> This last part is because you'll probably really just do `(a b ,@(some-function) f)
<aeth> As for why you'd need ,@ it's mostly for targeting some macros like LOOP, e.g. (loop repeat 3 do (print "hi"))
<saturn2> my code above collects a list of ecase clauses and splices them into place
Cthulhux` has quit [Excess Flood]
<aeth> If you're writing a macro with quasiquote that generates a loop, you'll probably have to do something like this: (loop ,@(generate-the-clause-here) do (print "hi"))
Cthulhux has joined #lisp
<aeth> well, with loop quasiquoted, of course
dbotton has quit [Quit: Leaving]
<brandflake11> saturn2: That makes sense, since you don't want separate lists together. You want one lits
<brandflake11> *list
<aeth> The other time you see ,@ a lot is with `(progn ,@body) in macros that have an &body body which is essentially just giving you the rest as a list just like &rest rest
pfdietz has joined #lisp
<brandflake11> Do you all ever get confused with the amount of ' you have to apply?
<aeth> The defmacro for WHEN might look something like this (name changed so you can evaluate it): (defmacro when* (test &body forms) `(if ,test (progn ,@forms) nil))
<aeth> nested 's aren't that big of a deal
<aeth> nested `s are extremely confusing
<aeth> At that point, just use helper functions to keep it simple
<aeth> If a function is (defined in another file that's loaded first) or (wrapped in an EVAL-WHEN) then it can be used as a helper function... at least for macros; I've never really had to use compiler macros.
<brandflake11> aeth: Oh, that makes more sense.
<brandflake11> Is a helper function one that is previously defined to be used in another function?
<brandflake11> Sorry if that's a silly question
<aeth> I personally see it as a function that's designed to keep another function (or a macro) short/simple/easy even if it's only going to be called from one caller (at least, outside of unit tests)
<aeth> but it doesn't have an official hyperspec definition afaik
<brandflake11> I apologize again for another question, but what exactly is a unit test?
<aeth> A lot of people don't like functions that are only called from one place, but I love them, especially in macros.
<aeth> As for unit tests, those are tests of a unit... usually a function or a class or things like that afaik.
<aeth> If you break up a big, messy macro into lots of functions, then you can test to make sure that any changes you make don't change any of those functions, which gives you more confidence to mess around with really tricky macros
<aeth> If you just have the macro, then you'll have to write a lot of tests on the macro directly, probably with MACROEXPAND-1 to test expanding the macro
<aeth> More concreately, you could have a function for your macro that turns (foo bar baz) into ((foo (make-quux 'foo)) (bar (make-quux 'bar)) (baz (make-quux 'baz))) and this is small, simple, and easy to test.
<aeth> then the macro itself just does something like `(let ,(your-function input) ,@body)
<brandflake11> aeth: Have you had to change the way you format your macros in professional environments because some people don't like formatting like that?
<aeth> Try to match the style of the person who originally wrote the file. There are lots of little things that can be different in styles.
mrcom has quit [Ping timeout: 265 seconds]
<aeth> In general, though, writing macros is rare.
mrcom has joined #lisp
mindCrime has quit [Ping timeout: 260 seconds]
<brandflake11> Thanks to all of the help I received on here. I have created my random sequencer in common music successfully!
<saturn2> nice :)
gaqwas has quit [Ping timeout: 264 seconds]
gaqwas has joined #lisp
gaqwas has joined #lisp
pfdietz has quit [Quit: Connection closed]
zaquest has quit [Quit: Leaving]
v88m has joined #lisp
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pfdietz has joined #lisp
zaquest has joined #lisp
galex-713 has quit [Ping timeout: 246 seconds]
matryoshka has quit [Quit: ZNC 1.8.2 - https://znc.in]
matryoshka has joined #lisp
mrcom has quit [Ping timeout: 265 seconds]
galex-713 has joined #lisp
Dizidentu has joined #lisp
<beach> Good morning everyone!
<Dizidentu> good morning
mrcom has joined #lisp
brandflake11 has quit [Quit: ERC (IRC client for Emacs 27.1)]
_jrjsmrtn has quit [Ping timeout: 246 seconds]
brandflake11 has joined #lisp
__jrjsmrtn__ has joined #lisp
bitmapper has quit [Quit: Connection closed for inactivity]
stoneglass has joined #lisp
manicennui has left #lisp [#lisp]
<beach> FILTER is not a great name for a filtering function, because it doesn't say whether the objects for which the predicate returns true are kept or discarded. REMOVE-IF and REMOVE-IF-NOT are much better.
judson_ has joined #lisp
judson_ has quit [Client Quit]
brandflake11 has quit [Quit: ERC (IRC client for Emacs 27.1)]
<beach> Dizidentu: So I saw in the logs that you are a C++ programmer. I think it would be a good idea for you to learn some Common Lisp to get another perspective on programming.
rogersm has quit [Ping timeout: 258 seconds]
rogersm has joined #lisp
erronius has quit []
Bike has quit [Quit: Lost terminal]
aeth_ has joined #lisp
aeth has quit [Disconnected by services]
aeth_ is now known as aeth
Khisanth has quit [Ping timeout: 265 seconds]
v88m has quit [Ping timeout: 265 seconds]
Khisanth has joined #lisp
rogersm has quit [Ping timeout: 258 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
andreyorst has joined #lisp
johnjay has quit [Ping timeout: 256 seconds]
judson_ has joined #lisp
v88m has joined #lisp
stoneglass has quit [Read error: Connection reset by peer]
johnjay has joined #lisp
orivej has quit [Ping timeout: 264 seconds]
hineios4 has joined #lisp
hineios has quit [Ping timeout: 264 seconds]
hineios4 is now known as hineios
rogersm has joined #lisp
galiant has joined #lisp
rogersm has quit [Ping timeout: 258 seconds]
galiant has quit [Remote host closed the connection]
rogersm has joined #lisp
aartaka_d has joined #lisp
aartaka has quit [Ping timeout: 240 seconds]
rogersm_ has joined #lisp
rogersm has quit [Ping timeout: 258 seconds]
<Dizidentu> beach I have python on my list before lisp
<beach> Oh, that's a bad idea.
<Dizidentu> they are the same purpose?
<Dizidentu> is lisp like python?
pillton has quit [Quit: ERC (IRC client for Emacs 27.1)]
<Dizidentu> anyways
<beach> Python is a pure interpreter, which means you can't really get any performance out of it, unless you write your code in C.
<beach> Most Common Lisp systems compile on the fly, so you can write all your code in a truly high-level language.
aeth has quit [Ping timeout: 272 seconds]
<beach> Furthermore, Python is not homoiconic, so you can't really do any metaprogramming in it, like macros.
<White_Flame> each languages seems to have its own definition of "metaprogramming". For python, it seems to be adding hooks on object methods
* White_Flame does not accept that definition
<Dizidentu> :)
aeth has joined #lisp
<beach> White_Flame: Thanks. I am not following the Python terminology, so I appreciate the information.
<Dizidentu> I would stay but I just got back and I want to catch this flight into slumber land while I still can :|
<beach> Dizidentu: Sleep well.
<Dizidentu> hey, thanks
wxie has quit [Quit: wxie]
wxie1 has joined #lisp
<beach> And, no, I think the purpose of Python is as a "scripting language", whereas Common Lisp is a general-purpose programming language.
wxie1 is now known as wxie
<saturn2> it doesn't seem like people care much about that distinction anymore
<White_Flame> because most people don't actually do core programming anymore, but rather call libraries (iow scripting)
<beach> But they should, shouldn't they?
<White_Flame> one then should wonder where the libraries come from
<beach> Mhm.
<saturn2> i mean, people build full applications in python
<White_Flame> and in tcl as well
<beach> I am sorry to hear that.
<beach> drmeister once showed us a site that gave the cost in electric power per computation unit for various languages, and Python is really bad.
<beach> Sorry, electric ENERGY per computation unit.
<saturn2> yeah, the python interpreter is astonishingly slow
parjanya has joined #lisp
narimiran has joined #lisp
<parjanya> mornings! Is there a function, or an easy test... to check if an object can be printed readably?
sauvin has joined #lisp
<beach> Probably not.
<beach> The answer would be influenced by things like methods on PRINT-OBJECT, and the existence of reader macros.
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<White_Flame> (handler-case (let ((*print-readably* t)) (write-to-string <item> nil)) (t (t) t))
<White_Flame> "easy" test?
<White_Flame> oops, NIL outside the write-to-string, as a return value
catalinbostan has joined #lisp
<White_Flame> actually, (ignore-errors (...try to print readably...) t), returning NIL if it isn't readable, is easier
<White_Flame> *readably printable
<parjanya> ah, very good idea, thanks! I tried finding a way to chase the method for printing, but no luck
iskander- has quit [Ping timeout: 264 seconds]
mrcom has quit [Ping timeout: 265 seconds]
<fiddlerwoaroof> That'll still output #< reader macros
<White_Flame> could be. Printing and testing for a "#<" prefix was my first idea
<beach> White_Flame: That's a nice idea!
stargazesparkleM has quit [Quit: Connection closed for inactivity]
<White_Flame> I just tested with function objects, and those blew up when *print-readably* was set
<flip214> how about reading the printed output in a ignore-case?
<flip214> *ignore-errors
<White_Flame> yep, read a few lines more
<White_Flame> (irc lines)
andreyorst` has joined #lisp
<fiddlerwoaroof> This works (let ((*print-readably* t)) (write-to-string (make-hash-table)))
<parjanya> it works ok here with ignore-case even with functions
andreyorst` has quit [Remote host closed the connection]
<fiddlerwoaroof> prints "#<hash-table>"
abhixec has quit [Ping timeout: 246 seconds]
<White_Flame> disclaimer: what I proposed was an idea, not a solution ;)
andreyorst has quit [Ping timeout: 240 seconds]
<flip214> White_Flame: sorry, I haven't seen READ mentioned yet.
<flip214> (read-from-string (with-output-to-string (s) (write '(1 2) :stream s :readably t)))
<White_Flame> ah, nifty
<White_Flame> if you truly do want to prune the values, then (values (thing-that-returns-multiple-values...)) does only return the first
<parjanya> I suspected there was a better way :-$ tx
<parjanya> works beautifully on all my extensive five tests : o )
<White_Flame> even hash tables?
<parjanya> yep!
<parjanya> I’m on CCL, so not sure about the others yet
<parjanya> turns out clisp and sbcl do output something, sigh
edgar-rft has quit [Quit: Leaving]
<White_Flame> hmm, is that a bug re the standard?
<White_Flame> implementation bugs, that is
<White_Flame> "If printing an object readably is not possible, an error of type print-not-readable is signaled rather than using a syntax (e.g., the ``#<'' syntax) that would not be readable by the same implementation."
mindCrime has joined #lisp
rgherdt has joined #lisp
rumbler31 has joined #lisp
jello_pudding has joined #lisp
ralt has joined #lisp
Blukunfando has quit [Ping timeout: 272 seconds]
mindCrime has quit [Ping timeout: 264 seconds]
attila_lendvai has joined #lisp
rumbler31_ has quit [Ping timeout: 260 seconds]
todun has joined #lisp
scymtym__ has joined #lisp
scymtym_ has quit [Ping timeout: 272 seconds]
anticrisis has quit [Read error: Connection reset by peer]
frgo_ has quit [Remote host closed the connection]
frgo has joined #lisp
rumbler31_ has joined #lisp
frgo has quit [Ping timeout: 260 seconds]
Tordek has quit [Ping timeout: 264 seconds]
Cymew has joined #lisp
vert2 has quit [Ping timeout: 246 seconds]
dwts has quit [Ping timeout: 256 seconds]
Tordek has joined #lisp
vert2 has joined #lisp
dwts has joined #lisp
aeth has quit [Ping timeout: 260 seconds]
todun has quit [Quit: todun]
aeth has joined #lisp
surabax 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
rgherdt has quit [Remote host closed the connection]
rgherdt has joined #lisp
xanderle_ has joined #lisp
mrcom has joined #lisp
xanderle has quit [Ping timeout: 260 seconds]
xificurC has joined #lisp
slyrus has joined #lisp
frgo has joined #lisp
frgo has quit [Read error: Connection reset by peer]
frgo has joined #lisp
devon has quit [Ping timeout: 240 seconds]
varjag has joined #lisp
pve has joined #lisp
makomo has joined #lisp
<xificurC> yesterday someone pointed out I can define a package local nickname for a package, where can I do that? I don't see this option in the defpackage clhs page
rogersm_ has quit [Ping timeout: 258 seconds]
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
rogersm has joined #lisp
rogersm_ has joined #lisp
rogersm has quit [Ping timeout: 258 seconds]
<xificurC> I'm really glad this is getting implemented, it's a huge boon in the lisp that doesn't like to get discussed here (or even be called a lisp)
hendursa1 has joined #lisp
heisig has joined #lisp
nicktick has quit [Ping timeout: 240 seconds]
hendursaga has quit [Ping timeout: 240 seconds]
<beach> xificurC: What does "the lisp that doesn't like to get discussed here" mean?
<xificurC> beach: clojure
<flip214> well, the topic says "Common Lisp"
<beach> xificurC: There is widespread agreement, even among the commercial Common Lisp vendors to implement package-local nicknames. But how does the implementation of package-local nicknames for Common Lisp benefit "other lisp"?
<mfiano> PLN has been a thing for 9 years now
<mfiano> Sorry 10
<xificurC> I'm saying I've been using local nicknames (aliases) in clojure and am happy I can use them in CL now as well
<xificurC> I mentioned it because I thought it might have been an inspiration to finally implement it
<xificurC> the last thing I'd like is for `(i:iter (for i from 1 to 10) (collect i))` work. But the reader screws me over, even though `iter` could resolve `for` and `collect` during macroexpansion
<beach> You need to complain to the person who wrote the ITER library.
<beach> Or, you can use LOOP instead, which is standard.
mrios22 has joined #lisp
<xificurC> beach: you mean it would be possible to do that? I thought it's not possible
<beach> To do what?
<xificurC> that example, `(i:iter (for i from 1 to 10) (collect i))`, to work
<mfiano> Not only possible but less code and more readable by others
<mfiano> (loop for i from 1 to 10 collect i)
<beach> LOOP can do it, so I don't see why ITER could not. But it would likely require a radical restructuring of the code.
<xificurC> loop is a builtin, so it could have the privilege to do that while others can't
jonatack has quit [Ping timeout: 260 seconds]
<beach> xificurC: It is a simple matter of using the names of the symbols involved instead of the symbols themselves.
<flip214> xificurC: how about i::(iter (for i from i to 10) (collect i))? but then the symbol "i" would be in the iter package...
<beach> xificurC: But I am guessing that FOR is a local macro introduced by ITER, and that would have to change.
<xificurC> I remember iter being praised, now I see it being, ehm, not praised
<mfiano> A lot of people shy away from trying to understand codebases using ITER
<mfiano> flip214: That's not standard
<beach> xificurC: It is possible that ITER can do some things that LOOP can not, but the fact that ITER is not standard is an argument against it, especially since LOOP can handle most situations.
jonatack has joined #lisp
<beach> xificurC: The argument that people use in favor of ITER and against LOOP is often that "LOOP is not Lisp-y", which is silly of course, since it is part of the standard.
<xificurC> mfiano why shy away? I don't find it much harder to read or understand than loop. Are there some inherent flaws in its implementation?
<xificurC> beach I thought the main argument is that an external package can extend iter, e.g. a database library exposing a cursor can plug it into it
<beach> xificurC: An external library that may or may not be maintained in the future, and that does little more than a standard facility should be given some thought before being used.
<heisig> xificurC: It is a question of the amount of 'vocabulary' that I need to know to read your code. LOOP is (for good or for bad) part of the vocabulary we all know. ITER isn't.
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
<mfiano> It's not standard Lisp which everyone is familiar with, it can have its forms broken up and spread out, it is often used like it is standard with use-package.
<beach> xificurC: I don't see any extension being used by your code there.
<flip214> heisig: but the same argument applies to lparallel, cl-who, alexandria, and so on and on.
<beach> flip214: There is no standard facility corresponding to those.
<beach> So that's different.
<xificurC> beach I was showing the simplest example, not a real one. At this point in time I'm not using anything that loop doesn't handle, so it's easy to switch back
<heisig> flip214: It is a difference whether you introduce functions or macros. And even with macros, there is a difference between introducing an obvious WITH-* macro, or an entirely new control-flow construct.
<beach> xificurC: So in that case, use LOOP for everything that does not require an extension.
<mfiano> In 15 years I have not needed LOOP to do anything else. One has to be careful about shiny things, features you think you might need, or think they will benefit you, but in turn do more harm than good.
<xificurC> this is the lisp schizofrenia I never understood - an infinitely extensible language that nobody wants to extend
<flip214> beach: I don't think that's a good argument. If something is being used often, it becomes mainstream - and then you'll see it so often that you'll just know it.
<beach> I totally agree with mfiano.
<flip214> so your argument sounds to me like "something must be used everywhere to be used everywhere", which is loopy ;)
<beach> xificurC: It is extended most often on a per-application basis. That's the beauty of it.
<xificurC> that was a reaction to "It is a question of the amount of 'vocabulary' that I need to know to read your code"
<flip214> heisig: so a CPS transform is bad, as it produces new control-flow semantics?
jonatack has quit [Quit: jonatack]
jonatack has joined #lisp
<beach> xificurC: Applications introduce new vocabulary in the form of functions, macros, classes, etc. That vocabulary becomes specific to the application and its domain.
<xificurC> beach why deprive libraries of that extensibility?
<beach> xificurC: That kind of extension is common and perfectly acceptable.
<beach> xificurC: I have no intention of depriving anyone of anything.
<heisig> xificurC: Extending Lisp is just something that shouldn't be done lightly. If you are working with music, this is a good reason to introduce custom notation. But 'I don't like LOOP' is not a very good reason for introducing custom notation.
<flip214> heisig: but the big reason for ITER is that it's notation is more Lisp-like!
<beach> "The argument that people use in favor of ITER and against LOOP is often that "LOOP is not Lisp-y", which is silly of course, since it is part of the standard."
<mfiano> The flexibility of Lisp allows you to use iterate or extend the language with new syntax of your own. This is why Lisp suffers from NIH, being so flexible and thus designed for small teams, makes it often more desirable and easier to re-implement a piece of software yourself, than to try to understand someone else's code. After all, code is just a projection of your mind, and trying to understand
<mfiano> someone else's moulding of the language for a particular domain usually doesn't map too well.
Khisanth has quit [Ping timeout: 246 seconds]
<xificurC> mfiano "In 15 years I have not needed LOOP to do anything else" - I find this thinking backwards. LOOP was chosen and implemented by a committee. That committee could have accepted SERIES just as well. Or it could have accepted none of them and we would be writing mapcars and the like. In that world if a user comes asking about LOOP, which is now a
<xificurC> library, would the argument be "In 15 years I have not needed LOOP because mapcar and friends can do everything LOOP can"?
<mfiano> xificurC: If we had series for decades of widespread use I would have "thought forward"
<xificurC> what does that mean?
surabax has quit [Quit: Leaving]
<xificurC> I only picked up 2 dependencies so far. I see iterate is not, ehm, famous around here :) The second is trivia. Is trivia OK?
<heisig> xificurC: I think I know how you feel about LOOP. It is not that I haven't used ITER myself because it is more powerful and flexible. But here I am, back to using LOOP. And why is that? Because having a powerful iteration construct is really not that important.
<heisig> Readable code is much more important.
<heisig> I think Trivia is OK though, but I don't know how others think about that.
<mfiano> When I first began using Lisp I too used iterate for a short while, but I couldn't agree more with heisig.
<flip214> heisig: and ITER isn't as readable as LOOP? Which difference (apart from the parens) do you see, in typical use?
<xificurC> heisig so you're saying in the years you programmed you find LOOP more readable than ITER, is that correct?
<flip214> another feature of ITER is that the clauses like COLLECT can be used in subforms as well - LOOP requires them at the loop-level, which is awful sometimes
<heisig> xificurC: 100% of the Lisp programmers know about LOOP, but only at most 60% (at most) know about ITER. That settles it for me.
<mfiano> LOOP only cares about the symbol name for LOOP keywords. Iterate requires you to modify symbol property lists for synonyms.
<mfiano> Which even contradicts its own documentation in this regard.
catalinbostan has quit [Ping timeout: 246 seconds]
<xificurC> I'll be getting rid of iterate then, at least for now.
<xificurC> thanks for the discussion
<xificurC> mfiano it requires modification of what?
<flip214> heisig: 10% of programmers know Java, but only 1% of programmers know Lisp. How is that an argument against Lisp? (numbers invented)
<flip214> I just know that people have to learn new things all the time...
<beach> flip214: Java does not have Common Lisp (with a different syntax) already built in.
<mfiano> xificurC: symbol-plists of iterates symbols
<flip214> of course, there's no reason to invent new code-flow macros all the time - but a nearly 1:1 translation of a construct defined in the standard is on the safe side, me thinks.
Khisanth has joined #lisp
aeth has quit [Ping timeout: 264 seconds]
aeth has joined #lisp
luni has joined #lisp
<heisig> flip214: I think the benefits of using Lisp over Java are greater than those of using ITER over LOOP. But even then I occasionally choose Java or Python over Lisp for some projects, because it is more accessible for the target audience. (Not often though, and not gladly)
jeosol has quit [Quit: Connection closed]
python476 has joined #lisp
igemnace has quit [Quit: WeeChat 3.0]
luni has left #lisp [#lisp]
andreyorst` has joined #lisp
mrios22 has quit [Ping timeout: 240 seconds]
ludston has joined #lisp
rumbler31 has quit [Remote host closed the connection]
wxie has quit [Ping timeout: 246 seconds]
ljavorsk has joined #lisp
pfdietz has quit [Quit: Connection closed]
mrcom has quit [Ping timeout: 265 seconds]
johnjay has quit [Ping timeout: 246 seconds]
johnjay has joined #lisp
liberliver has quit [Ping timeout: 246 seconds]
liberliver has joined #lisp
ljavorsk has quit [Ping timeout: 240 seconds]
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
Nilby has joined #lisp
frgo has quit [Ping timeout: 265 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
attila_lendvai has quit [Ping timeout: 256 seconds]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 256 seconds]
amerigo has joined #lisp
aeth has quit [Ping timeout: 260 seconds]
aeth has joined #lisp
kaftejiman has joined #lisp
frodef has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 272 seconds]
amb007 has joined #lisp
frodef has joined #lisp
hineios has quit [Ping timeout: 240 seconds]
hineios has joined #lisp
ukari has quit [Remote host closed the connection]
ukari has joined #lisp
galex-713 has quit [Ping timeout: 272 seconds]
vegansbane6 has quit [Quit: The Lounge - https://thelounge.chat]
xificurC has quit [Quit: Connection closed]
mrcom has joined #lisp
mrios22 has joined #lisp
vegansbane6 has joined #lisp
galex-713 has joined #lisp
fanta1 has joined #lisp
skapata has quit [Remote host closed the connection]
ukari has quit [Remote host closed the connection]
random-nick has joined #lisp
ukari has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
bitmapper has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
frgo has joined #lisp
jonatack has quit [Quit: jonatack]
frgo_ has joined #lisp
frgo has quit [Ping timeout: 260 seconds]
jonatack has joined #lisp
rozenglass has joined #lisp
fanta1 has quit [Quit: fanta1]
Cthulhux has quit [Changing host]
Cthulhux has joined #lisp
catalinbostan has joined #lisp
scymtym__ has quit [Remote host closed the connection]
nmg has joined #lisp
scymtym has joined #lisp
jonatack has quit [Ping timeout: 246 seconds]
jonatack has joined #lisp
xificurC has joined #lisp
ludston has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
gko_ has joined #lisp
Bike has joined #lisp
jeosol has joined #lisp
gko_ has quit [Remote host closed the connection]
caret has quit [Read error: Connection reset by peer]
rumbler31_ has quit [Ping timeout: 256 seconds]
caret has joined #lisp
aartaka has joined #lisp
ebrasca has joined #lisp
notzmv has quit [Ping timeout: 260 seconds]
villanella has joined #lisp
mankaev has quit [Ping timeout: 272 seconds]
aartaka_d has quit [Ping timeout: 265 seconds]
hendursa1 has quit [Remote host closed the connection]
hendursa1 has joined #lisp
wsinatra has joined #lisp
mankaev has joined #lisp
guaqua has quit [Ping timeout: 256 seconds]
guaqua has joined #lisp
mankaev has quit [Ping timeout: 240 seconds]
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #lisp
mankaev has joined #lisp
nmg has quit [Remote host closed the connection]
jonatack has quit [Ping timeout: 246 seconds]
rumbler31_ has joined #lisp
frgo has joined #lisp
gaqwas has quit [Ping timeout: 265 seconds]
frgo_ has quit [Ping timeout: 240 seconds]
<dim> I didn't follow closely and am wondering if ABCL is relevant to this Java/Common-Lisp discussion
je-suis-rpg has joined #lisp
pfdietz has joined #lisp
je-suis-rpg has quit [Client Quit]
ukari has quit [Remote host closed the connection]
<heisig> dim: No, I don't think so. But ABCL is a great thing to have.
<xificurC> can someone enlighten me how to correctly generate unhygienic code here? http://ix.io/2M0v . `aif` is just an example
<heisig> We recently had a project where we needed a computer algebra system in Scala. Our solution was to load ABCL into the same image, and to use ABCL to load Maxima.
<xificurC> heisig nice solution
fanta1 has joined #lisp
<heisig> xificurC: Your code is unhygenic, but you are in the wrong package. You pollute c::it, but write a cl-user::it.
<xificurC> heisig being unhygienic is the point in this case :) The fragment generates `C::IT` but I want to generate `IT` for whatever package is using the macro. Does that make sense?
<beach> xificurC: Symbol names are handled at read time. At macro-expansion time it's too late.
<Xach> LOOP handles it by comparing symbol-names.
<heisig> xificurC: Be careful what you wish for :) I would suggest having the package C export IT, and to have other packages import it.
<heisig> But if you really want to capture all kinds of IT, you need a substituting code walker.
<xificurC> I don't remember Paul Graham talking about this stuff in On Lisp. Was he just avoiding this whole topic by not using any packages?
<flip214> xificurC: get the symbol passed in
<beach> xificurC: Also AIF is really strange, since it handles general values as if they were Booleans. You are much better off without it.
<Xach> xificurC: paul graham did not document all the features of common lisp. packages are not discussed in detail.
<heisig> xificurC: If you really want to try this, use a code walker like https://gitlab.common-lisp.net/mraskin/agnostic-lizard and have AIF replace all symbols named IT with C::IT.
<heisig> (Please don't)
<xificurC> so let me rephrase to see if I understood this: to use unhygienic macros across packages one would need to use a code walker
dbotton has joined #lisp
<beach> xificurC: In fact, most of the anaphoric macros are weird and should probably be avoided altogether.
<beach> It's a cute exercise in how the macro system can be used, but not particularly useful, and not particularly conform with other software-engineering practices.
jonatack has joined #lisp
<heisig> xificurC: Here is one more solution: Your AIF macro could intern the name "IT" into the value of *package* that is used at macroexpansion time. But that would also violate some assumptions that readers of your code might have.
<heisig> Usually it is a good idea to listen to beach's advice.
dbotton has quit [Quit: Leaving]
cage_ has joined #lisp
jonatack has quit [Ping timeout: 240 seconds]
<xificurC> as I said `aif` wasn't the particular example. This one was http://ix.io/2M0x . It's similar to what is in LOL but closer to a clojure-like anonymous function definition. I find the shortcut useful and code written with it clearer. However it doesn't work across package boundaries, just like any unhygienic code doesn't seem to
fanta1 has quit [Quit: fanta1]
aeth has quit [Ping timeout: 240 seconds]
<xificurC> looking into the LOL codebase I see the same issues, the unhygienic symbols `a1` `a2` etc don't solve this issue. I wonder why are these books given such high praise then, when you take some code from it and use it in a standard way, failing immediately
xantoz has quit [Ping timeout: 256 seconds]
catalinbostan has quit [Quit: Textual IRC Client: www.textualapp.com]
aeth has joined #lisp
catalinbostan has joined #lisp
<beach> xificurC: On Lisp is good for things like computations done at macro-expansion time, but not for anaphoric macros.
<xificurC> beach and your thoughts on LOL?
<beach> I haven't read it. Sorry.
<mfiano> LOL should be taken with a large grain of salt
thinkpad has quit [Ping timeout: 260 seconds]
mrcom has quit [Ping timeout: 265 seconds]
thinkpad has joined #lisp
mrios22 has quit [Ping timeout: 264 seconds]
snits has quit [Ping timeout: 265 seconds]
<shka_> wow, clouseu displays rehash threshold as a progress bar
<shka_> how neat!
snits has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
<beach> Clouseau is a very nice program.
<shka_> and i never can type the name properly
<shka_> but yes, it is
<beach> I never use the SLIME inspector anymore.
waleee-cl has joined #lisp
<xificurC> mfiano the book went really hardcore into some custom closure-based OO design and I didn't really understand why would one want to do that instead of using CLOS. The macros were interesting and the sorting networks too
<scymtym> shka_: inspect a complex number :)
<beach> xificurC: One absolutely wouldn't want to do that.
<beach> ... closure-based OO design that is.
<_death> xificurC: I would advise not using such macros in CL.. but in your particular, the issue likely stems from interning symbols in the current package where the reader macro is expanded (which is likely what you want) but the expansion refers to symbol (% %1) interned when the reader macro is defined.. so you should use the ones you interned instead
<shka_> scymtym: cool
charles` has quit [Ping timeout: 258 seconds]
<_death> *symbols
<shka_> xificurC: anaphoric macros have the use case, really
<beach> shka_: Nah! :)
<shka_> they do!
<shka_> just don't reinvent the wheel
<frodef> maybe for very application-specific things, where words have very particular meanings.
<shka_> cl-ds:xpr is an anaphoric macro
<shka_> it is quite useful
<shka_> it is used to define lazy sequences
<shka_> works by writing recursive-like code
* heisig sees Clouseau's representation of complex numbers and goes on to rebind `C-c i'.
<shka_> heisig: HOW DO I DO THAT?
sjl has joined #lisp
<shka_> i don't know emacs very well
<xificurC> I guess the number of APL fans here is very close to 0. Anything that allows expressing yourself more concisely is worth consideration
<shka_> but i wanted to do it for a few weeks now :P
<xificurC> you just have to be careful not to reinvent perl
<shka_> xificurC: not exactly zero
<xificurC> shka_ I said close to 0. I see at least 1 familiar name in the channel
<shka_> but lisp macros need to be done really well in order to be so useful
<shka_> like, in the general case
<shka_> and writing macros ad hock leads to macros that are used just once
<shka_> and this is bad
<xificurC> shka_  good or bad is subjective to your use case
<mfiano> It's mostly a book about "Hey, look at what macros can do", but the very opinionated coding style that ignores conventions and the use of anaphors make it very rare you will ever see code like this in the real world.
<mfiano> Common Lisp code, that is.
jonatack has joined #lisp
<aeth> xificurC: Lexical closures are the only true way of doing encapsulation that's not just by convention (I say this, but now someone might think of something more obscure). Lexical scope is so encapsulated that lexical variables might not actually exist for things like debuggers without (optimize (debug 3))
<shka_> gosh, i guess heisig won't tell me
<aeth> xificurC: So you could probably come up with a very niche situation where you need to do that. Very niche.
<Xach> shka_: macrolet is its own thing
<shka_> Xach: ?
jonatack has quit [Ping timeout: 246 seconds]
<Xach> shka_: ad hoc, single-use-ish macros with macrolet can be fun
<shka_> oh, ok
<shka_> agreed
<xificurC> aeth I actually loathe enforced encapsulation that cannot be broken. In the few years I work on the JVM there have been several bugs in 3rd party libraries that I was close to unable to overcome because of it. I think we're all adults and know the risk of using internal, subject-to-change parts of a library.
jonatack has joined #lisp
charles` has joined #lisp
aeth_ has joined #lisp
jonatack has quit [Read error: Connection reset by peer]
aeth has quit [Disconnected by services]
<heisig> shka_: I am still experimenting. I will post my solution here as soon as it is presentable.
aeth_ is now known as aeth
HDurer has quit [Remote host closed the connection]
HDurer has joined #lisp
thinkpad has quit [Ping timeout: 264 seconds]
thinkpad has joined #lisp
<shka_> heisig: thanks!
<scymtym> heisig: one piece of the puzzle will probably involve updating the content of a persistent inspector window. one way to do that is (defvar *inspector* (nth-value 1 (clouseau:inspect INITIAL-VALUE :new-process t))) and later (setf (clouseau:root-object *inspector* :run-hook-p t) NEW-VALUE)
<shka_> hmmm, it seems that the minimal size of sbcl hash-table is 7?
<shka_> this gonna cost me some memory
<shka_> maybe i can figure something out
<flip214> shka_: make yourself a global readonly empty hashtable?
<shka_> flip214: nah, i have other idea
mmmattyx has joined #lisp
andreyorst` has quit [Quit: andreyorst`]
mindCrime has joined #lisp
mrcom has joined #lisp
johnjay has quit [Ping timeout: 240 seconds]
kapil_ has quit [Read error: Connection reset by peer]
kapil_ has joined #lisp
johnjay has joined #lisp
hnOsmium0001 has joined #lisp
Blukunfando has joined #lisp
Madvax has quit [Ping timeout: 240 seconds]
attila_lendvai has quit [Ping timeout: 256 seconds]
Madvax has joined #lisp
thinkpad has quit [Ping timeout: 256 seconds]
<heisig> scymtym: Thanks for helping! That was exactly what I needed.
thinkpad has joined #lisp
<scymtym> heisig: sure. you could use a prefix argument to force inspecting in a new window
<shka_> awesome
<shka_> let me try this out
<heisig> scymtym: Yes, there are plenty of potential tweaks. Also, I should overload more than just `C-c i'. But that was already enough of a digression for one day.
<_death> slime has a slime-prefix-map
lotuseater has quit [Ping timeout: 246 seconds]
<heisig> Also, I am not exactly proud of referencing a symbol from clim-internals. Is there a better way to check whether a frame is still alive?
kapil_ has quit [Quit: ZNC 1.8.2 - https://znc.in]
kapil_ has joined #lisp
sm2n_ has joined #lisp
sm2n has quit [Read error: Connection reset by peer]
thinkpad has quit [Ping timeout: 240 seconds]
phoe6 has joined #lisp
thinkpad has joined #lisp
Lord_of_Life_ has joined #lisp
aartaka_d has joined #lisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life_ is now known as Lord_of_Life
aartaka has quit [Ping timeout: 272 seconds]
<scymtym> heisig: maybe http://bauhh.dyndns.org:8000/clim-spec/28-5.html#_1560 ? the states are defined at the top of the page
brandflake11 has joined #lisp
galex-713 has quit [Ping timeout: 272 seconds]
galex-713_ has joined #lisp
parjanya has quit [Remote host closed the connection]
andreyorst has joined #lisp
jonatack has joined #lisp
jonatack has quit [Ping timeout: 256 seconds]
miasuji has joined #lisp
jonatack has joined #lisp
adlai has joined #lisp
<adlai> Oh boy, here I go bearing bad news again! ... if anyone both industrious and stupid wants to volunteer to maintain yet another library slipping towards gitrot, it appears that Anaphora has been soft-abandoned.
* adlai has anaphoric macros all over scalpl, even occasionally wrote a few of his own, although already has the volunteer hands more than full with wondering wtf to do about chanl's brokenness, an issue that blocks returning scalpl to official inclusion in various automated distributions.
<adlai> while we're on bad news of abandonment: Henry Baker's paper archive has gone offline, apparently along with the entire webserver that hosted it. Wikipedia is already linking to https://web.archive.org/web/20200212080133/http://home.pipeline.com/~hbaker1/ although I do wonder whether anyone has available an archive of just the signal, to save others the trouble of sifting through HTML noise.
judson_ has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 26.3)]
miasuji has quit [Ping timeout: 264 seconds]
thinkpad has quit [Ping timeout: 246 seconds]
frodef has quit [Ping timeout: 256 seconds]
lotuseater has joined #lisp
thinkpad has joined #lisp
secretmyth has joined #lisp
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
edgar-rft has joined #lisp
<jackdaniel> you know what would be cool? displacing (unsigned-byte 8) array to (unsigned-byte 32) so first four elements in the former go through the first element in the latter
<jackdaniel> I suppose that wouldn't be very lispy though
<beach> Could be quite useful though.
<jackdaniel> that's true
<jackdaniel> lispm had that feature (according to clx)
<adlai> isn't that merely a way to fuzz out endianness and word size?
<aeth> Another thing CL is missing that implementations could add is optimized heterogeneous 2D/3D/etc arrays.
<aeth> If there's a reasonable way to describe the :element-type for such arrays, I guess
<aeth> so e.g. an array where every row looks like: single-float (unsigned-byte 8) double-float (unsigned-byte 32)
<aeth> If it could reasonably be done as an extension, it would be compatible with portable CL since it'd just be a regular T array for those other implementations
<jackdaniel> I'm rewriting McCLIM clx renderer to always use xrender extension: https://i.imgur.com/3Kb4gmH.png ; that's why I've asked (I can't simply "cast" array even when I know that bytes are in correct order)
<jackdaniel> well, not asked but asserted that it would be cool feature
<adlai> aeth: you can probably get quite close to that with an element-type of a struct.
* adlai has not checked which compilers can unbox those
<adlai> however, provided that the array is an unboxed array of structs with unboxed immediates, that could have quite low overhead, if you have lots of state per cell.
<aeth> adlai: you can get close if you put a bunch of different homogeneous arrays inside of a struct
<adlai> isn't that the exact opposite of what you said earlier?
<adlai> you wanted locality consistent with coordinates.
<aeth> adlai: you can't have an element type of a struct, that's just going to be T, and semantically speaking, it's not going to work to have an array of a mutable element like a struct work in a specialized way.
<aeth> Whereas what I described would basically be like structs if you wrote the right kind of accessors, but without the semantic problems, although it would kind of mess with the concept of initial-element
<aeth> An array row of (single-float (unsigned-byte 8) double-float (unsigned-byte 32)) is an array row of things that can all be an upgraded-array-element-type in arrays in reasonable implementations, just not all in the same array at the same time.
<adlai> well, if all your immediates are numeric, you can probably fake it quite closely with jackdaniel's trick and possibly a bit of ldb and decode-float gluearbage.
<aeth> well, no, because floats are special
<aeth> at the hardware level
<aeth> The C illusion is an illusion.
<adlai> thus, "fake it", i.e. the compiler would store unboxed fixnums.
* adlai leaves off pursuing this optimization, however mature it may be... enjoy your bit-twiddling!
<aeth> Well, several problems there. First, arrays can store more than fixnums. An implementation could reasonably store unboxed double-float (larger than a fixnum), (unsigned-byte 64), or (signed-byte 64) in 64-bit implementations.
<aeth> In fact, if you're working with such numbers, you're probably better off overusing mutable arrays to avoid boxing
<aeth> (At least, potentially. Implementation-specific.)
<aeth> Second, this would be for very high-performance things, so converting an integer to a float each time might have a cost. Even a tiny cost can add up. I had a 3D renderer in mind when I was thinking about this.
<adlai> clhs integer-decode-float
<jackdaniel> I feel like in this meme with a pigeon (https://knowyourmeme.com/memes/annoyed-bird), laters \o
<adlai> that would be the correct function, not decode-float, since the latter doesn't actually rescue you from the floatsam!
mankaev has quit [Ping timeout: 240 seconds]
galex-713_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
surabax has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
galex-713 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
miasuji has joined #lisp
Dizidentu has quit [Quit: Connection closed]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
mankaev has joined #lisp
ramus has quit [Ping timeout: 246 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
Cymew has quit [Ping timeout: 240 seconds]
mmmattyx has quit [Quit: Connection closed for inactivity]
amb007 has quit [Read error: Connection reset by peer]
judson_ has joined #lisp
Jesin has quit [Quit: Leaving]
ramus has joined #lisp
amb007 has joined #lisp
Jesin has joined #lisp
amerigo has quit [Quit: Connection closed for inactivity]
brandflake11 has left #lisp ["ERC (IRC client for Emacs 27.1)"]
frodef 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
dbotton has joined #lisp
akoana has joined #lisp
Dizidentu has joined #lisp
thinkpad has quit [Ping timeout: 240 seconds]
Steeve has joined #lisp
thinkpad has joined #lisp
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
judson_ has joined #lisp
lotuseat` has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
lotuseat` is now known as lotuseater`
lotuseater has quit [Ping timeout: 272 seconds]
lotuseater` is now known as lotuseater
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
liberliver has quit [Quit: liberliver]
<jackdaniel> looking at ecl code it seems pretty much doable - i.e by relaxing the displace requirement to allow an array with a /compatible/ element type
<jackdaniel> there is also a cute internal function: (si:array-raw-data array) that returns an array with the element type byte8 (works on all arrays with the specialized element type)
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
thinkpad has quit [Ping timeout: 240 seconds]
amb007 has joined #lisp
<jackdaniel> even better, it is exported from the ext package
thinkpad has joined #lisp
luna_is_here has quit [Ping timeout: 272 seconds]
frodef has quit [Ping timeout: 256 seconds]
luna_is_here has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
parjanya has joined #lisp
amb007 has joined #lisp
lucasb has joined #lisp
aartaka_d has quit [Read error: Connection reset by peer]
amb007 has quit [Read error: Connection reset by peer]
aartaka has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
matryoshka has quit [Ping timeout: 272 seconds]
amb007 has joined #lisp
xificurC has quit [Quit: Connection closed]
xificurC has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
Dizidentu has quit [Quit: Connection closed]
matryoshka has joined #lisp
matryoshka` has joined #lisp
matryoshka has quit [Read error: Connection reset by peer]
amb007 has quit [Read error: Connection reset by peer]
sauvin has quit [Remote host closed the connection]
amb007 has joined #lisp
thinkpad has quit [Ping timeout: 246 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
vutral_ has joined #lisp
thinkpad has joined #lisp
gxt has quit [Ping timeout: 240 seconds]
gxt has joined #lisp
frodef has joined #lisp
brandflake11 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
rumbler31 has joined #lisp
flatheap has joined #lisp
xanderle_ has quit [Ping timeout: 246 seconds]
rumbler31 has quit [Ping timeout: 240 seconds]
Lycurgus has joined #lisp
rumbler31 has joined #lisp
charles` has quit [Ping timeout: 260 seconds]
rogersm_ has quit [Quit: Leaving...]
miasuji has quit [Ping timeout: 240 seconds]
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xanderle has joined #lisp
frgo has quit []
xanderle has quit [Read error: Connection reset by peer]
xanderle has joined #lisp
judson_ has joined #lisp
thinkpad has quit [Ping timeout: 256 seconds]
thinkpad has joined #lisp
frgo has joined #lisp
rogersm has joined #lisp
Lycurgus has quit [Quit: Exeunt]
andreyorst has quit [Read error: Connection reset by peer]
andreyorst has joined #lisp
xanderle has quit [Ping timeout: 256 seconds]
xanderle has joined #lisp
xanderle_ has joined #lisp
xanderle has quit [Ping timeout: 264 seconds]
andreyorst has quit [Ping timeout: 256 seconds]
andreyorst has joined #lisp
thinkpad has quit [Ping timeout: 246 seconds]
v88m has quit [Read error: Connection reset by peer]
thinkpad has joined #lisp
andreyorst has quit [Ping timeout: 256 seconds]
v88m has joined #lisp
cage_ has quit [Remote host closed the connection]
heisig has quit [Quit: Leaving]
frgo_ has joined #lisp
frgo has quit [Ping timeout: 260 seconds]
narimiran has quit [Ping timeout: 264 seconds]
SpaceIgor2075 has joined #lisp
catalinbostan has quit [Ping timeout: 246 seconds]
rogersm has quit [Remote host closed the connection]
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bitmapper has quit [Quit: Connection closed for inactivity]
charles` has joined #lisp
judson_ has joined #lisp
brandflake11 has quit [Quit: ERC (IRC client for Emacs 27.1)]
rogersm has joined #lisp
rogersm has quit [Remote host closed the connection]
rogersm has joined #lisp
rogersm has quit [Remote host closed the connection]
SpaceIgor2075 has quit [Remote host closed the connection]
dbotton has quit [Quit: Leaving]
Nilby has quit [Ping timeout: 246 seconds]
Blukunfando has quit [Ping timeout: 260 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
andreyorst_ has quit [Remote host closed the connection]
xificurC has quit [Quit: Connection closed]
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
mmmattyx has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
wsinatra has quit [Quit: WeeChat 3.0]
VincentVega 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
surabax_ has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
surabax has quit [Ping timeout: 240 seconds]
aartaka_d has joined #lisp
amb007 has joined #lisp
surabax__ has joined #lisp
secretmyth has quit [Quit: Leaving]
amb007 has quit [Read error: Connection reset by peer]
aartaka has quit [Ping timeout: 246 seconds]
surabax_ has quit [Ping timeout: 240 seconds]
scymtym has quit [Ping timeout: 256 seconds]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
surabax has joined #lisp
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
surabax_ has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
shka_ has quit [Ping timeout: 246 seconds]
amb007 has joined #lisp
surabax__ has quit [Ping timeout: 256 seconds]
amb007 has quit [Read error: Connection reset by peer]
surabax__ has joined #lisp
surabax has quit [Ping timeout: 246 seconds]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
surabax_ has quit [Ping timeout: 246 seconds]
amb007 has joined #lisp
surabax_ has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
surabax__ has quit [Ping timeout: 246 seconds]
amb007 has quit [Read error: Connection reset by peer]
surabax has joined #lisp
amb007 has joined #lisp
surabax__ has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
aartaka_d has quit [Ping timeout: 246 seconds]
surabax_ has quit [Ping timeout: 260 seconds]
surabax_ has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
rogersm has joined #lisp
amb007 has joined #lisp
surabax has quit [Ping timeout: 260 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
surabax has joined #lisp
surabax__ has quit [Ping timeout: 260 seconds]
amb007 has quit [Read error: Connection reset by peer]
surabax__ has joined #lisp
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
rogersm has quit [Ping timeout: 246 seconds]
amb007 has joined #lisp
pve has quit [Quit: leaving]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
surabax_ has quit [Ping timeout: 264 seconds]
surabax_ has joined #lisp
surabax has quit [Ping timeout: 260 seconds]
surabax has joined #lisp
surabax__ has quit [Ping timeout: 260 seconds]
surabax__ has joined #lisp
surabax_ has quit [Ping timeout: 260 seconds]
surabax__ has quit [Client Quit]
surabax has quit [Ping timeout: 264 seconds]
pillton has joined #lisp
skapata has joined #lisp
iskander has joined #lisp
quazimodo has quit [Ping timeout: 272 seconds]
anticrisis has joined #lisp
bilegeek has joined #lisp
snits has quit [Ping timeout: 240 seconds]
villanella has quit [Ping timeout: 240 seconds]
makomo has quit [Ping timeout: 256 seconds]
snits has joined #lisp
quazimodo has joined #lisp
OlCe has joined #lisp
VincentVega has left #lisp [#lisp]
scymtym has joined #lisp
rogersm has joined #lisp
VincentVega has joined #lisp
VincentVega has left #lisp [#lisp]
scymtym has quit [Remote host closed the connection]
rogersm has quit [Ping timeout: 264 seconds]
rgherdt has quit [Ping timeout: 264 seconds]
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
frgo_ has quit [Read error: Connection reset by peer]
frgo has joined #lisp
judson_ has joined #lisp
judson_ has quit [Client Quit]
HiRE has joined #lisp
HiRE_ has quit [Ping timeout: 272 seconds]
galex-713 has quit [Quit: No Ping reply in 180 seconds.]
Josh_2 has joined #lisp