phoe changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
perrierjouet has quit [Quit: WeeChat 3.4]
taiju has joined #commonlisp
nij- has joined #commonlisp
perrierjouet has joined #commonlisp
gaqwas has joined #commonlisp
gaqwas has quit [Ping timeout: 256 seconds]
Oladon has joined #commonlisp
unyu has joined #commonlisp
rotateq has quit [Ping timeout: 240 seconds]
waleee-cl has quit [Ping timeout: 240 seconds]
wyrd has joined #commonlisp
waleee-cl has joined #commonlisp
<mfiano> Hmm regarding the about combination mapping function, what if I had a list of 3 elements, such as '(0 128 256), and I wanted to find every 4-tuple with repetitions allowed? Can alexandria (or anyone else here) help me?
<mfiano> '((0 0 0 0) (0 0 0 128) (0 0 0 256) (0 0 128 0) ... (256 256 256 256))
<_death> nested dolists
s-liao has joined #commonlisp
<semz> alexandria:map-product with the list repeated four times would work too
<mfiano> Ah map-product was the one I was remembering, thanks!
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
s-liao has quit [Ping timeout: 256 seconds]
masinter has joined #commonlisp
morganw has quit [Remote host closed the connection]
s-liao has joined #commonlisp
waleee-cl has quit [Remote host closed the connection]
waleee-cl has joined #commonlisp
molson has quit [Ping timeout: 240 seconds]
kevingal has quit [Remote host closed the connection]
pranavats has left #commonlisp [Error from remote client]
<mfiano> pjb: cesarum's license scares me :)
<pjb> AGPL3 !
<mfiano> I know.
<mfiano> It's unsuitable for my uses.
waleee-cl has quit [Ping timeout: 268 seconds]
Common-Lisp has joined #commonlisp
<EdLangley[m]> I've actually been considering AGPL3 for "applications" and MIT for libraries
<EdLangley[m]> That way, I don't have to worry about the license of my application's dependencies and my libraries don't impose too much on their users
<Common-Lisp> I exclusively license my crap in AGPLv3
Bike has quit [Quit: Lost terminal]
Oladon has quit [Quit: Leaving.]
ec has quit [Ping timeout: 276 seconds]
<aeth> I exclusively use the MIT license because all code's reusable library code if you're clever enough.
<aeth> My code starts specific and then generalizes until I spin it off. I probably could keep a monorepo instead and skip the last step.
<EdLangley[m]> The great thing about not having any contributors is you can just copy it to a library :)
<EdLangley[m]> I have a library of utilities I use in all my projects and I just move useful things there
<aeth> If I had a corporation, I'd consider doing something more complicated with licenses.
<aeth> But then you'd also have to consider e.g. a CLA, and people might not like a CLA that could turn AGPL into MIT
<aeth> Even if it's just for things that get moved elsewhere
<aeth> And I can't really blame them. Promises are kept until you're acquired by one of the 10 tech megacompanies.
amk has quit [Ping timeout: 250 seconds]
molson has joined #commonlisp
karlosz has quit [Ping timeout: 256 seconds]
<aeth> I suppose everyone could assign their copyright to, say, the Common Lisp Foundation or something
amk has joined #commonlisp
elderK has quit [Quit: Connection closed for inactivity]
molson has quit [Remote host closed the connection]
jealousmonk has quit [Quit: ERC (IRC client for Emacs 27.1)]
molson has joined #commonlisp
Bike has joined #commonlisp
molson has quit [Remote host closed the connection]
molson has joined #commonlisp
masinter has quit [Ping timeout: 256 seconds]
dec0d3r has quit [Quit: Leaving]
<ns12> aeth: Dangerous! When an evil beast takes control of the Common Lisp Foundation, they will change the license to a proprietary one! Say goodbye to all the open source Common Lisp libraries!
<beach> Good morning everyone!
<ns12> Good morning beach!
karlosz has joined #commonlisp
masinter has joined #commonlisp
<beach> contrapunctus: define-save-info specifies a list of "save entries", where a save entry is a list of two symbols, an initarg (usually for some slot) and the name of a reader that corresponds to that initarg.
<mfiano> I don't mind using copyleft software, but developing with, especially for the purpose of making a living, is out of the question.
lisp123 has joined #commonlisp
<lisp123> When connecting to a remote image in SLY on your current machine, I'm experiencing a tiny amount of lag - does anybody else have this?
karlosz has quit [Quit: karlosz]
<Josh_2> Nope
<lisp123> Josh_2: Thanks
lisp123 has quit [Quit: Leaving...]
qeqeqw has joined #commonlisp
<Josh_2> I have very fast internet though and my remote server isn't far
<Josh_2> Jonathan should swap to parsing as a hash table by default
<Josh_2> It should be more explicit :sob:
semz_ has joined #commonlisp
semz has quit [Ping timeout: 240 seconds]
notzmv has quit [Ping timeout: 268 seconds]
amk has quit [Ping timeout: 256 seconds]
amk has joined #commonlisp
Bike has quit [Quit: Connection closed]
xsperry has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
qeqeqw has quit [Ping timeout: 250 seconds]
wyrd has quit [Quit: leaving]
attila_lendvai has joined #commonlisp
Algernon69 has joined #commonlisp
Algernon91 has joined #commonlisp
Jing has joined #commonlisp
Algernon69 has quit [Ping timeout: 268 seconds]
Algernon91 has quit [Ping timeout: 268 seconds]
Common-Lisp has quit [Quit: Leaving]
shka has joined #commonlisp
s-liao has quit [Quit: Client closed]
karlosz has joined #commonlisp
attila_lendvai has quit [Ping timeout: 268 seconds]
<contrapunctus> beach: thanks for the response. In trying to find out "when or why does client code need to use `define-save-info`?", I tried to run `do-things-1` and got this error - https://paste.rs/MEQ
<beach> Every class that has instances that need to be saved needs a method.
<beach> The demos should work though. I haven't changed anything.
pillton has quit [Remote host closed the connection]
gaqwas has joined #commonlisp
<EdLangley[m]> Josh_2: did you happen to use the OpenAPI spec for cl-matrix? or handwrite the api wrappers?
mon_aaraj has quit [Ping timeout: 250 seconds]
mon_aaraj has joined #commonlisp
Cymew has joined #commonlisp
mon_aaraj has quit [Ping timeout: 268 seconds]
scymtym has quit [Ping timeout: 256 seconds]
scymtym has joined #commonlisp
pjb has quit [Remote host closed the connection]
Algernon91 has joined #commonlisp
Algernon666 has joined #commonlisp
Algernon91 has quit [Ping timeout: 256 seconds]
mon_aaraj has joined #commonlisp
MajorBiscuit has joined #commonlisp
MajorBiscuit has quit [Client Quit]
MajorBiscuit has joined #commonlisp
attila_lendvai has joined #commonlisp
notzmv has joined #commonlisp
s-liao has joined #commonlisp
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
masinter has quit [Ping timeout: 268 seconds]
pve has joined #commonlisp
simendsjo has joined #commonlisp
mgl has joined #commonlisp
simendsjo has quit [Ping timeout: 268 seconds]
Major_Biscuit has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
MajorBiscuit has quit [Ping timeout: 256 seconds]
pjb has joined #commonlisp
gaqwas has quit [Ping timeout: 240 seconds]
varjag has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
varjag has quit [Ping timeout: 256 seconds]
varjag has joined #commonlisp
<pve> Hi, is the "defsystem" syntax used in "asd" files based on some specification? Just curious..
<pve> I noticed it seems pretty similar to the syntax used in mk:defsystem.
mon_aaraj has quit [Ping timeout: 240 seconds]
<jdz> pve: Documentation has the grammar (not sure if that's what you're asking): https://asdf.common-lisp.dev/asdf.html#The-defsystem-grammar
<pve> jdz: Thanks, I meant if the syntax was defined in conjunction with the development of ASDF in an ad-hoc fashion, or if the syntax (or parts of it) had been specified earlier by someone else.
<jdz> Pretty sure previous versions of system definition facilities (hence the A in the name) were considered when the library was being written.
<pve> jdz: ok, I understand
mon_aaraj has joined #commonlisp
varjagg has joined #commonlisp
varjag has quit [Ping timeout: 240 seconds]
kevingal has joined #commonlisp
rotateq has joined #commonlisp
mon_aaraj has quit [Ping timeout: 250 seconds]
Jing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mon_aaraj has joined #commonlisp
taiju has quit [Remote host closed the connection]
Jing has joined #commonlisp
<pve> I was reading this thread about ASDF where some people suggested having a specification for a system definition facility (as opposed to a just a single implementation) and it sounded like a pretty cool idea.
<phoe> it's cool but infeasible
<pve> but apparently this has never been attempted?
<phoe> we can't even get the CDR process going again
<phoe> how can we attempt at a whole specification for a system loader
<phoe> ;; for any sane definition of "we"
<pve> well that's a bummer
<phoe> not really a bummer, more like our harsh reality
<phoe> ASDF is the local optimum until there happens to be a force that can move everything to a different local optimum
rogersm has joined #commonlisp
osp has quit [Ping timeout: 240 seconds]
karlosz has quit [Quit: karlosz]
osp has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
s-liao has quit [Quit: Client closed]
s-liao has joined #commonlisp
qeqeqw has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life_ is now known as Lord_of_Life
qeqeqw has quit [Ping timeout: 240 seconds]
<frodef> Does SLIME have a mechanism to remove methods? (based on a DEFMETHOD form)
<rotateq> hm i see slime-undefine-function
<rotateq> or with FMAKUNBOUND ?
<frodef> I think ELI had that years back, and it's very useful.
<rotateq> yes i think you want to do it on certain specializations
<frodef> FMAKUNBOUND is kind of the big hammer solution :)
<rotateq> like when i defined naively an initialize-instace :before which should be with :after and then i wondered why the other still tried to fire ^^
<rotateq> yes indeed
<rotateq> hm there's also REMOVE-METHOD, or you look what closer-mop has in charge additionally
<rotateq> i don't know yet how to use REMOVE-METHOD correctly
<frodef> you have to FIND-METHOD first. It's quite tedious, which is why it should be in the IDE.
<rotateq> ah that makes sense, like when i figured out how to list only certain EQL specializer methods for a generic function with closer-mop
<rotateq> so you would want to be with the cursor in your source file and then call slime-undefine-method?
<frodef> right
<frodef> Also, some sort of generic function inspector where you can see and remove methods would be nice.
wyrd has joined #commonlisp
<rotateq> FIND-METHOD seems also a bit tedious
<rotateq> there is closeau
<rotateq> for having an inspector
Lord_Nightmare has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
<jdz> frodef: slime-inspect-definition
<jdz> frodef: You may need to load slime-fancy-inspector.el.
<frodef> jdz: there it is! thanks!
<frodef> seemed like an obvious thing to have, happy to see it's there.
<frodef> strange thing it's not bound to any key by default.
<frodef> (or menu)
<beach> It is.
<beach> Middle click on presentation (I think) and then inspect.
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<frodef> beach: But I don't have presentations in my .lisp buffer.
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<beach> Ah, I see. Right.
<beach> Emacs has a very approximate idea of what is in your .lisp buffer. I mean, it can't even indent or highlight correctly. Expecting it to recognize a method or a generic function would be too much.
<frodef> beach: is this a climacs rant? :)
varjagg is now known as varjag
<frodef> (is that still a thing?)
<beach> You could see it as a Second Climacs rant. (first) Climacs is no longer a thing, and Second Climacs is being developed very slowly, so not usable yet.
<frodef> Oooh.. multiple climacs!
<beach> Well, the first one was already better for Common Lisp editing than Emacs, at least in some respects. Second Climacs uses a Common Lisp reader (Eclector) to parse the buffer contents, so it has a much better idea of the contents.
<beach> And it can handle things like custom reader macros.
<frodef> sounds like good work (as ususal!)
<rotateq> even when i define a new %DEFCLASS macro it doesn't indent anymore correctly
amb007 has quit [Read error: Connection reset by peer]
gxt has quit [Remote host closed the connection]
amb007 has joined #commonlisp
gxt has joined #commonlisp
Algernon666 has quit [Ping timeout: 268 seconds]
lisp123win has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.4]
<lisp123win> For my understanding, why are there so many revisions and changes to ASDF (or any other build tool)? The naive part of me just wants now to write a series of LOAD forms and be done with things
<lisp123win> But I'm sure there are some aspects I am clearly missing
<rotateq> ohai lisp123win
* rotateq looks through the windows
<lisp123win> (and I was programming in another language, and building was a complete DISASTER, so I do appreciate ASDF alot)
<lisp123win> rotateq: Hello from a closed source machine where my every key is tracked into M$ ML models :-)
<rotateq> what i also got to like is this Shake Haskell tool to fight against Make madness. but it's not really normally usable yet, a bit complicated and hmm. but in the long run it does things better too
<rotateq> nice
<mcoll> what is the canonical way to interact with cairo in common lisp? I see cl-cairo2 but it's almost 10 years old, is it up to date enough? is the cairo API that stable?
perrierjouet has joined #commonlisp
<rotateq> mcoll: don't confuse this with being "out of date" :) there is real legacy with CL and it could also mean "finished and usable"
perrierjouet has quit [Client Quit]
<lisp123win> rotateq: Interesting to hear, sounds like I should try haskell sometime too
<rotateq> lisp123win: phew, hmm, but not just because of that then
<lisp123win> I am have started to branch into other languages just for fun, but now we are going off topic so I will shut up :-)
<mcoll> yeah, fair enough, maybe my question could be reformulated, what is the best way currently in CL to generate images with text rendering?
<rotateq> so that's why i've sended in query
<rotateq> okay, i don't know :)
foxfromabyss has joined #commonlisp
<foxfromabyss> Hi! How can I achieve partial application in CL?
<foxfromabyss> I have a function of 2 arguments, and would like to pass it as `:test` in `find` with one of them already supplied, as `find` requires a function of 1 argument
<foxfromabyss> I tried making a function of 2 arguments return a lambda requiring 1 argument, with 1 argument already applied, but that failed to compile for some reason
<mcoll> foxfromabyss: that should work I think
perrierjouet has joined #commonlisp
<foxfromabyss> I would guess i am just holding it wrong
<jdz> foxfromabyss: Maybe you want to supply :key instead of :test?
<foxfromabyss> that was my initial idea, but I have a `cons point_1 point_2` and would like to check if either of them satisfies equality
<mcoll> foxfromabyss, I think you're closing the lambda parenthesis, so you're not returning a lambda so B is not defined
<rotateq> mcoll: what i saw now too :)
<foxfromabyss> that is true, thanks :D
<foxfromabyss> but how do I call that now? `((test 5) 6)` and `(6 (test 5))` fails with illegal function call
<foxfromabyss> but `(test 5)` returns a lambda successfully
<flip214> foxfromabyss: (funcall (test 5) 6)
<foxfromabyss> I see, thanks!
Algernon666 has joined #commonlisp
<mcoll> np :)
<mcoll> well, it looks like cl-cairo2 loads and the demos work, so I guess I'll continue with this until I hit a wall
simendsjo has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
qeqeqw has joined #commonlisp
Jing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<flip214> Can I deftype a range of characters without using SATISFIES?
<phoe> MEMBER?
<phoe> I assume you can generate a proper MEMBER type with a macro in order to avoid typing them all in
<phoe> or even just via DEFTYPE
<phoe> (deftype characters-between (first last) `(member ,@(loop for code from first to last collect (code-char code)))) or something
_whitelogger has joined #commonlisp
antoszka has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
dilated_dinosaur has joined #commonlisp
drakonis has quit [Client Quit]
drakonis has joined #commonlisp
lisp123win has left #commonlisp [ERC (IRC client for Emacs 26.3)]
dale has joined #commonlisp
aartaka has joined #commonlisp
splittist_ has quit [Ping timeout: 256 seconds]
etimmons_ is now known as etimmons
szkl_ has quit [Ping timeout: 256 seconds]
dale_ has quit [Ping timeout: 256 seconds]
Jing has joined #commonlisp
Xach_ has quit [Ping timeout: 256 seconds]
Demosthe1ex has quit [Ping timeout: 256 seconds]
dimlibera is now known as dim
Demosthenex has joined #commonlisp
szkl_ has joined #commonlisp
Xach has joined #commonlisp
splittist_ has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
d4ryus has joined #commonlisp
Xach has quit [Changing host]
Xach has joined #commonlisp
semz_ is now known as semz
s-liao has joined #commonlisp
s-liao has quit [Quit: Client closed]
<|smlckz|> is there any format incarnation to convert T ans NIL to 1 and 0 respectively?
<|smlckz|> *inchantation
<|smlckz|> **incantation
<scymtym> "~:[0~;1~]"
<rotateq> hehe
simendsjo has quit [Ping timeout: 268 seconds]
robin__ is now known as robin
<Krystof> what no (setf zerop)?
<rotateq> :D
ck__ is now known as ck_
epolanski has joined #commonlisp
kevingal has quit [Ping timeout: 268 seconds]
mal1 is now known as lieven
Bike has joined #commonlisp
pranavats has joined #commonlisp
azimut_ has joined #commonlisp
azimut has quit [Ping timeout: 276 seconds]
vats has joined #commonlisp
bauripalash has joined #commonlisp
bauripalash has quit [Client Quit]
foxfromabyss has quit [Quit: Client closed]
clos-encounters has joined #commonlisp
Lord_Nightmare has joined #commonlisp
random-nick has joined #commonlisp
hobo_ has quit [Quit: ZNC 1.8.2 - https://znc.in]
cage has joined #commonlisp
s-liao has joined #commonlisp
s-liao has quit [Client Quit]
anddam has left #commonlisp [WeeChat 3.4]
domovod has joined #commonlisp
s-liao has joined #commonlisp
s-liao has quit [Client Quit]
sveit_ has quit [Quit: Bye]
sveit has joined #commonlisp
vats has quit [Ping timeout: 256 seconds]
parjanya has joined #commonlisp
clos-encounters has quit [Ping timeout: 240 seconds]
hugo- is now known as hugo
Guest70 has joined #commonlisp
Guest70 has left #commonlisp [#commonlisp]
ec has joined #commonlisp
Cymew has quit [Ping timeout: 256 seconds]
kevingal has joined #commonlisp
jealousmonk has joined #commonlisp
<beach> http://metamodular.com/SICL/environment-info.pdf is the latest version of our paper on Trucler to be submitted to ELS'22. Feel free to give us feedback. I am not sure whether we should include CLISP in the section on previous work, and I am not sure where to find the most recent CLISP code. Opinions are welcome.
mgl has quit [Quit: Client closed]
<beach> The deadline is presumably this coming Sunday, but I fully expect another week of extended deadline.
<beach> Thanks.
<phoe> as for whether to include it or not, absolutely no idea
<beach> Yeah. I hesitate.
<phoe> no release in a decade is telling, even if it has some commits in the past year
<phoe> ;; and an unmerged PLN implementation
<beach> I'll dig a bit and then make a decision.
<beach> It has no CLtL2 environment functions. I might have a look at the native environment representation, but it is likely to be in C.
<phoe> let me make a quick check...
<rotateq> hehe testing with quickcheck phoe :)
<rotateq> hm i _could_ try to read the paper till sunday
|3b|` is now known as |3b|
<phoe> that's from CLISP
<phoe> it seems that its lexenvs are some sort of Lisp structures
<phoe> but there's no good way to access them from the outside, I can't find any good interface after a really quick look
<beach> phoe: Good catch. Thank you.
<beach> It looks like a vector of vectors to me.
<phoe> mind the #<FUNCTION ...> thing
<phoe> whatever it is, it prints some lambda-like Lisp forms, so it has to keep them memorized somewhere
<beach> I see, yes.
<phoe> oooh wait a second
<phoe> that's a macro to return the current environment, similar to what I've done above, I guess
<beach> Seem that way.
<phoe> ext:eval-env is also there
<beach> Good hints. That will help a lot. Thanks again!
<phoe> also see CLISP 37.3 - it seems that there's some bytecode representation for lexenvs
<phoe> maybe this can provide some insight too
<beach> Yeah.
<contrapunctus> beach: re: clobber-demo, to get the aforementioned error ( https://paste.rs/MEQ ) all I did was `(ql:quickload :clobber) (in-package :clobber-demo) (do-things-1)` ...any idea why that's happening?
<beach> contrapunctus: Not really. Let me have a look.
SAL9000_ is now known as SAL9000
<beach> I can reproduce that at least.
<phoe> (CLOBBER:LOG-TRANSACTION (NEW-BANK #<BANK {10031C7933}>) NIL)
<phoe> is the second argument meant to be NIL?
<phoe> that looks like the root of the problem to my unclobbered eye
<contrapunctus> I thought it was supposed to be a symbol, perhaps, but quoting it didn't change anything
<rotateq> beach: Your papers always have a nice layout. :)
<contrapunctus> (i.e. `'*transaction-log*` instead of `*transaction-log*` ) ...and, well, it gave a different error.
<beach> contrapunctus: I think you need to execute START first.
<beach> contrapunctus: And STOP afterwards.
<beach> START is what associates a log file with the code.
<beach> rotateq: The physical layout is determined by ACM.
<contrapunctus> beach: ah, that works, thanks! 🙂️
<beach> Sure.
<beach> contrapunctus: I am sorry that it's not better documented. I wrote it mostly as a concrete suggestion in the debate about prevalence, serialization, etc.
fitzsim has quit [Remote host closed the connection]
jeosol has quit [Quit: Client closed]
<beach> And there should of course be a more explicit check that START has been executed.
<beach> contrapunctus: If you feel like improving it, just go ahead.
<contrapunctus> beach: just made a PR 😀️ see if you like this as the README - https://github.com/robert-strandh/Clobber/blob/fb401800f0bb9f986691279d4349dc4925823cf3/README.md
<beach> Perfect. Merged! Thanks!
<phoe> contrapunctus: added a random suggestion
<phoe> maybe it's feasible, maybe not, just a thing that occurred to me
<contrapunctus> phoe: oh lol, I was thinking the same thing myself xD
<beach> I'll let y'all work on that. I still need to work on the paper.
wheelsucker has joined #commonlisp
qeqeqw has quit [Ping timeout: 240 seconds]
santiagopim has joined #commonlisp
Catie has joined #commonlisp
<phoe> sounds good
<phoe> ah, the joy of not submitting anything to ELS
<beach> Heh.
<phoe> I am free to instead write 50 kB of Markdown regarding the state of our Common Lisp world in light of some recent kerfluffles that echoed through it
<phoe> and I'm not yet done!
<rotateq> phoe: Maybe I have something interesting in a few years. :)
<phoe> rotateq: let's hope so
<beach> phoe: Oh, anything I can read?
<phoe> beach: yes, as soon as I have all of my stuff written down
<beach> phoe: Is this about the "community" debate?
<phoe> I touch that topic a little bit, but with a twist
<beach> I look forward to reading what you come up with.
<phoe> sure,
<beach> It seems to me that people spend more energy obsessing about this "community" thing than they spend working to get more stuff done.
treflip has joined #commonlisp
domovod has quit [Quit: WeeChat 3.4]
<phoe> IMO not really
<beach> OK.
<Bike> not that i've been paying much attention, but "somebody is hassling the ASDF dev enough that they want to quit" seems like a specific actionable issue
<phoe> I gotta finish my article about that since finger-pointing at people is a thing that is both dangerous and missing the point
* phoe digs back into emacs
Algernon91 has joined #commonlisp
ec has quit [Ping timeout: 276 seconds]
ec has joined #commonlisp
Algernon666 has quit [Ping timeout: 268 seconds]
<rotateq> phoe: Thanks that you believe in me. :) [when I didn't interpret too wrongly]
<phoe> rotateq: no problem, and you didn't interpret that wrongly
<rotateq> oki, I'm glad to be allowed to learn so much from you all, as exchange of thoughts is very important
<phoe> I have no idea if it's explicit permission - IMO it's more like, you simply are a decent citizen of #commonlisp
brown121407 has joined #commonlisp
<phoe> no spamming, no trolling, no personal attacks, no asking the same question over and over again, no soliciting money after proclaiming yourself to be the sole worthy leader of the Common Lisp community at large and the only savior from some almighty mafia thing that is both otherwise undefeatable and comically impotent in stopping you altogether
<phoe> just hanging out and asking questions is more than fine, that's what #commonlisp is for
<jackdaniel> that's technically pointing fingers
<phoe> jackdaniel: right, apologies
* phoe is still sore after that, will need to take proper care in the future
wheelsucker has quit [Remote host closed the connection]
<rotateq> yes right, like you for example. I'm no programming genius like gilberth or others here, but I try to get better every day.
Oladon has joined #commonlisp
qeqeqw has joined #commonlisp
<Bike> nother obscure standard question
<Bike> "ffloor, fceiling, ftruncate, and fround handle arguments of different types in the following way: If number is a float, and divisor is not a float of longer format, then the first result is a float of the same type as number. Otherwise, the first result is of the type determined by contagion rules;"
<Bike> how is this different from the contagion rules?
Noisytoot has quit [Quit: ZNC 1.8.2 - https://znc.in]
Noisytoot has joined #commonlisp
<Bike> by the contagion rules, if divisor is a rational it's converted to a float of number's type, so the result will be of that type
<Bike> and if it's a float of shorter or equal format, by the contagion rules it will be converted ot the larger format, again giving you the type of number
<semz> Are contagion rules defined for operations with optional arguments?
<Bike> not specifically, but the way this is phrased the divisor clearly exists, presumably defaulting to 1 if necessary
<phoe> Bike: maybe it's a repetition; see e.g. CLHS STRING which does not mention the term "string designator" and instead spells out the "string, symbol, or character" thing fully
<phoe> I mean, I wouldn't be surprised if these *are* contagion rules
<Bike> yeah but the page on the string function doesn't also use the phrase "string designator"
<phoe> Bike: that's exactly what I mean
<phoe> it could use the term "string designator" but it doesn't
<phoe> even though CLHS Glossary S defines that term
<Bike> no, but i mean, the way this ftruncate is written, it's phrased as if these rules are different from the general contagion rules
<aeth> could just be a side effect from how the standard was written?
<aeth> perhaps it was defined before the contagion rules
Major_Biscuit has quit [Ping timeout: 268 seconds]
<Bike> but it mentions the contagion rules!
<semz> wait, aren't ffloor et al required to return a float even if you do (ffloor 1)?
<semz> the contagion rules don't specify that
<Bike> if it just repeated the contagion rules, that would be one thing. but no, it says "do this, except sometimes do the contagion rules instead"
<aeth> yes, but were the contagion rules different at some point?
<Bike> beats me
<aeth> it could've just been something that wasn't caught in the editing process as the standard changed over time
<Bike> semz: point, but then if we follow the text as written, we do follow the contagion rules if number is a rational (so if the divisor is also a rational, the result would be)
<Bike> so maybe it's just broken
<semz> hm
masinter has joined #commonlisp
Jing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<semz> might be worth looking into the proper standard, it might be a CLHS error
<jasom> In theroy if you did ffloor 1.0d 'a then the result would need to be a double-float since the divsor is not a float of a longer format :P
fitzsim has joined #commonlisp
<jasom> Also, it might matter for implementations with subtypes of real other than integer and float?
<jasom> e.g. an implementation with a builtin decimal or computable type?
<sm2n> I think rational is required?
<jasom> Also, it might matter for implementations with subtypes of real other than rational and float?
<Bike> jasom presumably means like quaternions or whatever
<Bike> or if they have to be reals, i dunno, computables
<jasom> log-scaled numbers would apply, maybe fixed-point too (though those are arguably rationals)
<jasom> it does have to be real, per the spec
<Bike> i get the idea, anyway
attila_lendvai has quit [Ping timeout: 268 seconds]
<semz> CLHS is accurate here for the record.
jeosol has joined #commonlisp
<Bike> meaning it reflects the standard?
<semz> yes
<Bike> right, thanks.
amb007 has quit [Ping timeout: 250 seconds]
amb007 has joined #commonlisp
attila_lendvai has joined #commonlisp
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
Oladon has quit [Quit: Leaving.]
cosimone has joined #commonlisp
parjanya has quit [Ping timeout: 250 seconds]
Algernon91 has quit [Ping timeout: 268 seconds]
epolanski has quit [Quit: Connection closed for inactivity]
tyson2 has quit [Remote host closed the connection]
treflip has quit [Quit: good night ☺/]
cosimone has quit [Remote host closed the connection]
notzmv has quit [Ping timeout: 268 seconds]
cosimone has joined #commonlisp
karlosz has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
simendsjo has joined #commonlisp
<rotateq> phoe: but if you would like it, i could come up from time to time here with another erc instance and give statements (rather than expressions) like "all those silly parentheses!" and then leave :D
<phoe> please no
<phoe> ;; #lispcafe would be better for that
<rotateq> of course it was a big joke
<phoe> :D
amb007 has quit [Ping timeout: 256 seconds]
<rotateq> i remember this one dude some months ago immediately "is clhs the best that can be done?" or others
amb007 has joined #commonlisp
kevingal has quit [Remote host closed the connection]
osp has quit [Quit: Leaving]
qeqeqw has quit [Ping timeout: 250 seconds]
Josh_2 has quit [Ping timeout: 250 seconds]
dre has quit [Ping timeout: 240 seconds]
greaser|q has quit [Changing host]
greaser|q has joined #commonlisp
greaser|q is now known as GreaseMonkey
d4ryus has quit [Quit: WeeChat 3.4]
d4ryus has joined #commonlisp
<simendsjo> In some languages, I can use _ as a variable (or prepend _) to indicate a variable is unused. In CL, this is `(declare (ignore x))` as I understand it. While it does what I want, it's very verbose, especially in short lambdas. Are there a shorthand/hack available?
<phoe> not really
<simendsjo> I see, no big deal.
<semz> Within loop forms you can use nil to indicate that the variable is unused, but this is a special case.
<phoe> the only helpful thing is that required arguments in DEFMETHOD don't have this behavior
<phoe> because they are implicitly used for method dispatch
<phoe> and what semz said
<EdLangley[m]> You can just use the variable
<EdLangley[m]> (lambda (_) _ 42)
<jmercouris> anyone can think of an elegant way of collecting every other element from a list? E.G. (list 0 1 2 3 4) -> (list 1 3)
<EdLangley[m]> Some might say its inelegant, but its concise
<jmercouris> now, note that this list isn't a number, so I can't do evenp or some other such heuristic
<moon-child> here is a fun trick: name function parameters + and -
<jmercouris> s/heuristic/predicate
<phoe> (loop for (x y) on list by #'cddr collect y)
<jmercouris> phoe: I like
<moon-child> since those are special, they will not be complained about
<jmercouris> thanks
<phoe> except for the NIL at the end
<phoe> you can try to work around that one somehow
<jmercouris> hm, that is problematic isn't it
<phoe> or maybe not, gimme a sec
<EdLangley[m]> jmercouris: (mapcan (let ((it nil)) (lambda (v) (setf it (not it)) (if it (list v) (list)))
<EdLangley[m]> s/jmercouris: (mapcan (let ((it nil)) (lambda (v) (setf it (not it)) (if it (list v) (list)))/jmercouris: (mapcan (let ((it nil)) (lambda (v) (setf it (not it)) (if it (list v) (list)))/
<EdLangley[m]> Hmm, no emacs to count parens
<phoe> (loop for cons on '(0 1 2 3 4) by #'cddr for (x y) = cons when (cdr cons) collect y)
ec has quit [Remote host closed the connection]
<jmercouris> hm, that is starting to become a little bit convoluted
<jmercouris> I mean, I understand it, but at glance goin through the codebase, I would do a double take
<moon-child> (loop for x in '(0 1 2 3 4) for flag = nil then t when flag collect x)
<moon-child> err
ec has joined #commonlisp
qeqeqw has joined #commonlisp
<moon-child> for flag = nil then (not flag)
<EdLangley[m]> The predicate would be: (let ((it t)) (lambda (v) (setf it (not it)) (if it (list v) (list))))
<jmercouris> phoe: (loop for (x y) on (list 0 1 2 3 4) by #'cddr when y collect y)
<EdLangley[m]> (mapcan 'true-every-other-time '(0 1 2 3 4))
<phoe> (let ((list '(0 1 2 3 4))) (remove-if #'evenp list :key (alexandria:rcurry #'position list)))
<moon-child> jmercouris: what if you have nil in your list?
<phoe> jmercouris: that will fail i--- yes
<jmercouris> there are no nils in my list
<EdLangley[m]> Where true-every-other-time is: (let ((it t)) (lambda (v) (setf it (not it)) (if it (list v) (list))))
* moon-child still likes for flag = nil then (not flag)
<jmercouris> I'm not sure the flag adds clarity here
<rotateq> yes, first clarity by reading
<jmercouris> too bad there is no mapcaddr
<jmercouris> rotateq: CLHS is not beginner friendly, but it is good
<jmercouris> personally I do not like all the restrictions placed around the source material
<jmercouris> can't reproduce it in this way or that way without the icons etc etc
<phoe> jmercouris: (loop for thing in '(0 1 2 3 4) for i from 0 when (oddp i) collect thing)
<mfiano> That is a particular derivation of the source material
<jmercouris> phoe: indeed, that also works! and solves the nil problem
<mfiano> Not the canonical source
<jmercouris> mfiano: sure, but I don't see any PDFS of the ansi spec
<mfiano> The canonical source is almost illegible and costs $$$
<jmercouris> I've looked... but cannot find
<mfiano> But the next best thing is dpANS which is mostly the same
<mfiano> You are looking for the draft, not the ANSI spec
<jmercouris> ah! thank you again
<mfiano> ANSI controls the spec and you would need a license.
<mfiano> THe draft is almost hte same though
<phoe> AFAIK the same plus minus whitespace and front matter
tyson2 has joined #commonlisp
<jmercouris> any LaTeX sources available? or just the PDF?
<jmercouris> got it, thanks
engblom_ has left #commonlisp [#commonlisp]
<rotateq> jmercouris: i remember very well the situation i was in when beginning, so yes, not very beginner friendly :)
<jmercouris> rotateq: I too remember, I was just a little baby tomato in Lisp 4 years ago
<jmercouris> I tried to fit everything into my mental model of previous languages
<jmercouris> felt like starting over completely
<rotateq> hehe. and riping more every day
<jmercouris> when I decided to forget everything and learn lisp from a "blank" slate
<rotateq> yes and it teaches much from another and well thought point of view
<jmercouris> It was difficult as I had been programming already for around a decade
<rotateq> oh i can imagine, for me not so much, but other "not normal" stuff and more math things before
<semz> Lisp often feels like some alternate history where Unix didn't win
<rotateq> and now you're so deeply into the AWESOME project of nyxt jmercouris, or don't i remember that correctly?
<EdLangley[m]> That's one critique of lisp (and Smalltalk) you'll find
<jmercouris> rotateq: you are correct, that is what I am working on
<rotateq> semz: in other universes
<EdLangley[m]> CL impls like to pretend the rest of the system doesn't exist
<rotateq> firefox annoys me more and more, but i have to redo the nyxt tutorial and manual, so finally can get productive at serious browsing too
<rotateq> EdLangley[m]: :)
<jmercouris> well, 2.2.4 is quite good, and I would say is a suitable replacement for a standard browser
<jmercouris> it is significantly more stable than all previous versions
<rotateq> running on 2.2.3 here :)
<jmercouris> there is a big improvement then for 2.2.4!
<rotateq> okay!
<semz> EdLangley[m]: Funny enough that's really a criticism of everything outside Lisp in disguise
<rotateq> wait, better in #nyxt ... (watches for the offtopic-police)
<jmercouris> lol :-)
morganw has joined #commonlisp
<rotateq> EdLangley[m]: the "owning" reminded me on one of the good quotes from Erik Naggum
<rotateq> "… it's just that in C++ and the like, you don't trust anybody, and in CLOS you basically trust everybody. The practical result is that thieves and bums use C++ and nice people use CLOS."
<theothornhill> jmercouris: (loop for x in (cdr '(0 1 2 3 4)) by #'cddr collect x)
<rotateq> isn't :ON then better?
<rotateq> or hm okay
azimut_ has quit [Remote host closed the connection]
azimut has joined #commonlisp
dre has joined #commonlisp
<rotateq> hi dre :)
gaqwas has joined #commonlisp
<theothornhill> Can someone help me understand this a little better? What is the shl for, and how does that relate to the line below? That's line 10-11
<phoe> theothornhill: fixnums in SBCL are represented shifted left one bit
igemnace has quit [Ping timeout: 268 seconds]
<phoe> as for CMOVO, no idea
<dre> hey rotateq :D
<theothornhill> the conditional move should relate to whether it's a 1/0 in line 10
<dre> i got the common lisp client merged into nvim-conjure if there's still nvim users here.
<phoe> nice!
<theothornhill> phoe: but how does that work, though? 7, or 0111 is 1110 suddenly?
<Bike> yeah, 7 as a tagged immediate will be 00001110.
<theothornhill> Thanks, is that the term for it? Tagged immediate?
<Bike> yeah. "immediate" because it's in a register or something instead of memory. and "tag" is the end 0. non-fixnums have different tags.
<theothornhill> Ah, right. That tg represents the type, then?
<theothornhill> s/tg/tag
<Bike> yes. zero is used as a tag since it has the convenient property that you can add and subtract tagged fixnums without untagging or retagging.
<Bike> since obviously 7 << 1 + 7 << 1 = 14 << 1
gaqwas has quit [Remote host closed the connection]
<Bike> not immediately sure what the conditional move is for, tho.
<theothornhill> Yeah, because then the number will end in zero, so the condition will always be false, no?
<Bike> i guess probably some sb32 times itself is a bignum, and it's a check to return that in that case?
<theothornhill> Yeah, maybe, but i set safety 0 and speed 3, so probably that will fail if we overflow?
<Bike> ok, yeah, i got it
<Bike> -2147483648 is the only (signed-byte 32) that, squared, is not a fixnum
<Bike> so, if the imul overflows, num must have been -2147483648, so the cmov arranges to return the bignum 4611686018427387904
parjanya has joined #commonlisp
<Bike> if you put in some non-(signed-byte 32), since you have safety 0, it will just return that bignum anyway
<theothornhill> yeah! that's what I see as well, here
<theothornhill> Right, and that bignum is (1+ most-positive-fixnum)
<rotateq> theothornhill: be careful declaring (optimize (safety 0)) when full moon is, the loopus is out for hunt
<theothornhill> So it's a conditional check for overflow that checks whether the shift left destroys the tag?
<theothornhill> rotateq: I always go (optimize (safety 0) (debug 3) (speed 0))
Inline__ is now known as Inline
<rotateq> don't do that now! optimizations are not of strong interest for first
<semz> not sure if this declaration is a typo or a joke
<rotateq> maybe better learning things themselves before thinking about such things
<rotateq> semz: yeah same thought here
<theothornhill> :)
<rotateq> in 'Common Lisp Recipes' edi clearly says the three steps of optimizing "1. don't do it. 2. don't do it. 3. don't do it (yet)"
cage has quit [Quit: rcirc on GNU Emacs 27.1]
<rotateq> so much money and time always wasted every day in the world with directly think about over-optimizations sacrifycing other stuff
<theothornhill> 4. do it when you want to look at the disassembly and compare with other things through godbolt
parjanya has quit [Read error: Connection reset by peer]
<theothornhill> And I'd also like to get a feel for _how_ the disassembly looks, intuitively, I mean.
<rotateq> shouldn't you more care really learning CL seriously?
<rotateq> in your own interest
<rotateq> just to beware you from pitfalls and thoughts i had in the past
<theothornhill> what is really learning cl seriously?
<rotateq> freeing your mind
<theothornhill> from
<rotateq> those other stuff?
<theothornhill> what other stuff?
<rotateq> this disassembly for example
<rotateq> all very implementation dependent
<theothornhill> yes, of course, but I learned something today
<rotateq> or I'm just wrong. can someone back me up here please?
<rotateq> good!
<rotateq> and what?
<phoe> analyzing disassemblies might be important, depending on what you do and what you are optimzing
<rotateq> yes phoe of course, didn't doubt it. but for that one has to be able to read it
<phoe> and a question about reading and understanding disassembly seems to be exactly what theothornhill posted up there
<theothornhill> hehe, you are not wrong, and I agree with you. The reason I'm doing this now is that I don't want to code in C to learn about x86
simendsjo has quit [Ping timeout: 256 seconds]
<rotateq> no don't get me wrong, have high respect for everyone who is able to
<theothornhill> but?
<rotateq> yes theothornhill, you could usee CL as a "meta-level" for doing assembly
<rotateq> but what? nothing
<theothornhill> ok:)
<semz> theothornhill: In case you meant (optimize (safety 0) (debug 0) (speed 3)) instead of the rather bizarre (safety 0) (debug 3), please don't, especially in public interfaces let alone everywhere. It's not the "make Lisp fast" button, it's the "make Lisp segfault on minor mistakes" button.
<theothornhill> semz: hehe, don't worry. It was a joke
<semz> phew
<rotateq> theothornhill: good to have you on board! and we need many point of views indeed
<theothornhill> thanks :)
<rotateq> so now i can sleep today :)
<theothornhill> I like how you get afraid seeing stupid things on the internet
<rotateq> don't say 'stupid', maybe 'different' :)
<theothornhill> hehe, ok
<Bike> "So it's a conditional check for overflow that checks whether the shift left destroys the tag?" a shift left isn't going to destroy the tag, since a zero bit will be shifted in
<Bike> however if the imul returns a high enough number, the most significant bit will be set, and that will be shifted out by the shl, causing overflow
<theothornhill> rotateq: but yeah, I think looking at the internals is very interesting. Implementation dependent or not. That's why I like lisp. You can choose your abstraction level at any time, and noone (apart from irc, perhaps) will judge :P
<pjb> Bike: it's not so obvious that 7 << 1 + 7 << 1 = 14 << 1 in C. AFAICS, it depends on sizeof(int) and CHARBITS, and it expects some consistency between the undefined behavior of << and of +, which is nowhere guaranteed, since we're talking of undefined behavior of two different operators.
<frodef> Is there any semi-standard (library) function that flips the args of a binary function?
<pjb> Bike: you'd have to say, "assuming a CHARBITS and sizeof(int) big enough, …".
<phoe> frodef:
<phoe> clhs complement
<pjb> frodef: I don't know of any library gathereing this kind of functions. I've proposed to newbies to write one several times. Cf. Baker's functional paper.
<Bike> assuming you mean like haskell flip, no
<pjb> frodef: (lambda (f) (lambda (y x) (funcall f x y)))
<phoe> oh, not a boolean flip
<frodef> right
<phoe> sorry
<semz> pjb: int has a minimum range. C isn't THAT useless.
<pjb> semz: right :-)
<semz> It's surprisingly low though, 2^15 - 1 max iirc
* rotateq flips
attila_lendvai has quit [Ping timeout: 256 seconds]
<theothornhill> pjb: offtopic now, but isn't 7 << 1 + 7 << 1' '7 << (1 + 7) << 1' in implicit precedence?
<pjb> theothornhill: yes, I think you're right, too.
<Bike> luckily, this question is completely irrelevant to the point i was trying to make
<rotateq> can i have it in ASH expressions? :/
<pjb> I always fully parenthese my C expressions..
<theothornhill> Bike: hehe yeah, sorry
<Bike> (= (+ (ash 7 1) (ash 7 1)) (ash 14 1))
aartaka has quit [Ping timeout: 240 seconds]
<pjb> (= (ash 14 1) (+ (ash 7 1) (ash 7 1))) ; guaranteed.
<rotateq> thanks
<rotateq> pjb: as c-macros need all those parentheses. a bit ironic
<Bike> before coming in with a pedantic criticism, just ask yourself: does this actually matter? am i improving the clarity of this conversation by making this point, or just making it that much more obscure for no good reason?
qeqeqw has quit [Ping timeout: 250 seconds]
<Bike> also, maybe don't do it if the criticism doesn't even apply within the irrelevant circumstances, as per the C minimum size
<theothornhill> Sorry if I offended you. Thanks for your help. I was just trying to understand.
<Bike> you're not the one i'm complaining about
<rotateq> ok sry, wasn't intended like that
<theothornhill> Well, you'd be happy to know that (square most-positive-fixnum) returns that constant, and. (square (1- most-positive-fixnum)) returns 4
<theothornhill> Both of which are clearly crazy results. Seeing how safety is 0 in this case, I guess all bets are off and bogus values are preferred?
<Bike> just to be perfectly clear, i am not talking about anyone but pjb
<phoe> yes
<phoe> if you have safety 0, then unicorns are allowed to happen and *will* happen
<theothornhill> Great, my daugther loves unicorns
<Bike> and yes generally speaking you should not use safety 0 for this reason
<Bike> you might get segfaults, or worse, like in this case, silent and incorrect results
<phoe> can be anything from an error through silently returning invalid values all the way into trashing your heap and/or stack
<phoe> unicorns are somewhere on that spectrum, i just have no idea where
<theothornhill> Well, you'd have to run enough code with safety 0 to find them. I seems noone dares
<rotateq> oh hmm
<phoe> theothornhill: actually
<phoe> (ql:quickload :jsown) or (ql:quickload :jonathan)
<phoe> that's two json parsers that dare, both sorta popular
<theothornhill> Oh great news!
<phoe> there's a reason why I have two sb-ext:restrict-compiler-policy calls in my rc file - one for safety 3, the other for debug 3
<mfiano> ^
<EdLangley[m]> Or, you could live life on the edge and restrict-compiler-policy to safety 0
<phoe> (optimize (everything 0))
<mfiano> I think that edge is not really there and you are falling to your doom, you just haven't realized it yet, like Wile. E. Coyote.
<theothornhill> rotateq: see? It's learning in doing stupid things :)
<pjb> Bike: I just like to poke fun at C.
<phoe> I share the sentiment but it's a wee bit off topic on #commonlisp
<rotateq> theothornhill: I can just do stupid and unuseful stuff :) and of course asking dumb questions
<semz> (safety 0) doesn't really do all that much outside of special situations (where you're better of with a (locally (declare ...) ...)) anyway, it's usually some 10%
<semz> at most
<semz> array heavy stuff is the exception ime
<rotateq> i often wrap classes where slot-types shall be explicitely checked (and not just having it for kind/part of documentation) with (locally (declare (optimize (safety 3))) ...)
<theothornhill> Bike: the clc in that disassembly though. I read somewhere sometime that that was for extra values as in (values 'foo 'bar). Why isn't that removed in compilation when the function makes to calls to values? If I'm correct, that is
<rotateq> or defining more precise checks in {initialize,allocate}-instance :after
<theothornhill> s/makes to/makes no
<phoe> AFAIK CLC is called if a function only returns one value
<Alfr> Though (safety 0) sometimes is useful, e.g. when trying to match the disassemble output with the code I wrote.
<Bike> theothornhill: it still needs to indicate to the caller that exactly one value was returned. as explained in http://www.sbcl.org/sbcl-internals/Unknown_002dValues-Returns.html#Unknown_002dValues-Returns this is indicated by clearing the carry flag.
<Bike> this is done by*
<Bike> (this is an "unknown values" return because the caller knows nothing about this function)
<theothornhill> Bike: thanks! Interestingly it seems to me from reading this, that returning more than three values might be slower, since it involves the stack, but <= 3 values does not.
<Bike> probably, but also the caller's code might be a little slower with multiple values versus one, since it has to do a little more to determine the number of values
<theothornhill> Makes sense
<Bike> it can get subtle. if the caller is expecting some number of values, due to a type declaration or whatever, that might be a little more optimized. i don't know.
<theothornhill> My guess is that if performance would be that important you'd probably not return multiple values at all, or not use lisp in the first place
<Bike> well, this probably won't be a bottleneck anyway, compared to boxing floats or something
<theothornhill> yeah
mon_aaraj has quit [Ping timeout: 240 seconds]
molson has quit [Ping timeout: 250 seconds]
dec0d3r has joined #commonlisp
Algernon69 has joined #commonlisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
cosimone has quit [Remote host closed the connection]
shka has quit [Ping timeout: 256 seconds]
cosimone has joined #commonlisp
Algernon69 has quit [Read error: Network is unreachable]
kevingal has joined #commonlisp
hobo has joined #commonlisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
<masinter> the franz PDF of dpANS converts to HTML OK. I imagine it would be better to start w'ith the tex
ec has quit [Ping timeout: 276 seconds]
Guest74 has joined #commonlisp
<Xach> There were at some point like 5 efforts to process the dpANS tex sources
<mfiano> At some point, but at all points, likely higher (I never even mentioned mine publicly)
pve has quit [Quit: leaving]
<masinter> I'll probably rename it
waleee has joined #commonlisp
parjanya has joined #commonlisp
parjanya has quit [Read error: Connection reset by peer]
perrierjouet has quit [Quit: WeeChat 3.4]
szkl_ has quit []
szkl_ has joined #commonlisp
szkl_ has quit [Client Quit]
szkl has joined #commonlisp
jpl01 has joined #commonlisp
varjag has quit [Ping timeout: 256 seconds]
cosimone has quit [Ping timeout: 250 seconds]
karlosz has quit [Quit: karlosz]
Colleen has quit [Quit: Colleen]
waleee has quit [Quit: WeeChat 3.4]
waleee has joined #commonlisp
Colleen has joined #commonlisp
<mzan> theothornhill: eh, if you came from C, (signed-byte 32) is "error-prone". You had to change mentality.
<mzan> It is not a phisical 32 bit value.
<mzan> You are saying to Lisp that you want to manage numbers with a range of (- 0 (ash 1 31)) to (ash 1 31)
<mzan> Every Lisp implementation can manage these numbers internally in different formats.
<mzan> For example usually in SBCL, in 64 bit platforms the last 3 bits of a number are used as tag.
<mzan> So you can manage as a single word number only numbers with 61 bits.
<mzan> For example with this formula you can discover the tag bits used in your platform
<mzan> (defconstant +max-bits+ (- (max (integer-length most-positive-fixnum) (integer-length most-negative-fixnum)) 1)
<mzan> "After these bits, native numbers are not any more nice inside CL run-time, because they will be big numbers.
<mzan> I subtract 1 bit for avoiding problems with signed fixnum. This is not optimal, but for this code example, good enoxgh.")
<mzan> This work for fixnum. I don't know how to adapt for (signed-byte 32)
<mzan> In CL it is the contrary of C. You don't think to number formats. The CL will change numeric format automatically if it discover an overflow during calculations.
<mzan> So results will be always exacts.
<mzan> Exacts, but sometime a little slower.
<mzan> Only in the end, if you want very fast code, then you can starting optimizing the code.
igemnace has joined #commonlisp