p_l 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/> | ASDF 3.3.4
Bourne has quit [Ping timeout: 260 seconds]
sulami has quit [Ping timeout: 250 seconds]
axion has quit [Quit: WeeChat 2.6]
tiwEllien has quit [Ping timeout: 240 seconds]
emys has joined #lisp
emys has quit [Ping timeout: 265 seconds]
emys has joined #lisp
SGASAU` has quit [Quit: ERC (IRC client for Emacs 26.3)]
SGASAU has joined #lisp
karlosz has quit [Read error: No route to host]
karlosz has joined #lisp
emys has quit [Ping timeout: 250 seconds]
EvW has quit [Ping timeout: 260 seconds]
emys has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
axion has joined #lisp
emys has quit [Ping timeout: 246 seconds]
emys has joined #lisp
emys has quit [Ping timeout: 260 seconds]
axion has left #lisp [#lisp]
mfiano has joined #lisp
mfiano has quit [Changing host]
mfiano has joined #lisp
mfiano has left #lisp ["WeeChat 2.8"]
axion has joined #lisp
sulami has joined #lisp
sulami has quit [Ping timeout: 256 seconds]
buffergn0me has joined #lisp
dorketch has quit [Quit: WeeChat 2.7]
compmstr has quit [Quit: ERC (IRC client for Emacs 26.3)]
ahungry has joined #lisp
dtman34 has joined #lisp
orivej has quit [Ping timeout: 250 seconds]
smasta has joined #lisp
bitmapper has quit [Ping timeout: 265 seconds]
Oladon has quit [Quit: Leaving.]
Oladon has joined #lisp
gioyik has joined #lisp
reggie__ has joined #lisp
reggie_ has quit [Ping timeout: 265 seconds]
manjaroi3 has quit [Quit: leaving]
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
sulami has joined #lisp
gioyik has quit [Ping timeout: 264 seconds]
sulami has quit [Ping timeout: 256 seconds]
gioyik has joined #lisp
Bourne has joined #lisp
iAmDecim has joined #lisp
gioyik has quit [Ping timeout: 265 seconds]
ebrasca has joined #lisp
SGASAU has quit [Quit: ERC (IRC client for Emacs 26.3)]
SGASAU has joined #lisp
iAmDecim has quit [Ping timeout: 260 seconds]
<LdBeth> cannot parse the sentence
<LdBeth> well, yes, CL isn't Haskell, the order of definitions occurred in files does matter
jonatack has quit [Ping timeout: 265 seconds]
karlosz has quit [Quit: karlosz]
monok has joined #lisp
housel has quit [Read error: Connection reset by peer]
mono has quit [Ping timeout: 256 seconds]
<Inline> what about the overloading of the same symbol name from different packages whilst they are using other packages via :use directive in their package definition
<Inline> that's just catastrophic
smasta has quit [Ping timeout: 260 seconds]
<Inline> i have #:buffer as defclass, as defgeneric (both explicit and implicit via :reader,:writer and :accessor), as defmethod (the same).... the list goes on and on
sulami has joined #lisp
Xach has quit [Ping timeout: 250 seconds]
Xach has joined #lisp
sulami has quit [Ping timeout: 265 seconds]
amerigo has quit [Quit: Connection closed for inactivity]
Oladon has quit [Quit: Leaving.]
efm has quit [Remote host closed the connection]
efm has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
iAmDecim has joined #lisp
Involuntary has joined #lisp
Jeanne-Kamikaze has quit [Read error: Connection reset by peer]
iAmDecim has quit [Ping timeout: 256 seconds]
<beach> Good morning everyone!
<pjb> Inline: you can intern those symbols in a different package before uninterning them.
<pjb> Inline: or keep them in a list. Or just scan them from the objects. They're not lost. If they were, they'd be collected!
jonatack has joined #lisp
<Inline> ?
<Bike> morning is the part of the day soon after the rising of the sun, inline
whiteline has quit [Remote host closed the connection]
whiteline has joined #lisp
<Inline> am i allowed to refer to class slots as if they were struct slots ? like in struct-name-struct-sloss converted to class-name-class-slot ?
<Inline> sorry for the typo
<beach> Inline: Only if you define that name as an accessor.
<Inline> hmmm
<no-defun-allowed> If you define a accessor for the slot with that name, yes.
<Inline> reader too ? or writer ?
<no-defun-allowed> :accessor foo defines a function that can be called with (foo <instance>) and another that can be called with (setf (foo <instance>) <new-value>).
<beach> Inline: If you say :accessor <mumble>, then that is the same as saying :reader <mumble> :writer (setf <mumble>)
<Inline> alright thank you
<Inline> i'm not sure what's up here, but i'm getting lots of errors in mcclim and also climacs as a result
<beach> You need to show the errors.
<pjb> Inline: also, clim doesn't use CL:DEFCLASS, but CLIM:DEFCLASS, so be sure to use the right one.
theosvoitha has joined #lisp
<Inline> okayy
jamzattack has joined #lisp
<beach> Inline: It is easy to get confused if you do :USE in DEFPACKAGE too much. I :USE only the CL package and stick explicit package prefixes on other symbols when necessary. That way, I avoid many problems like the one you seem to have.
<Inline> well, the problem is in the defpackage forms in mcclim
<beach> Oh? How does that problem manifest itself?
orivej has joined #lisp
gioyik has joined #lisp
<Inline> i can't use clim-listener for example, when i press any key i get thrown into the debugger with various error messages
<Inline> usually of the sort no-applicable-method errors
<beach> So this is a different problem from you previous one.
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
sulami has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
ayuce has quit [Remote host closed the connection]
sulami has quit [Ping timeout: 258 seconds]
Kundry_Wag has joined #lisp
vhost- has joined #lisp
vhost- has joined #lisp
vhost- has quit [Changing host]
toorevitimirp has joined #lisp
gioyik has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 256 seconds]
Bike has quit [Quit: Lost terminal]
_paul0 has quit [Quit: Leaving]
gioyik has joined #lisp
ayuce has joined #lisp
karlosz has joined #lisp
<pjb> Inline: be sure to (:use "CLIM") and not (:use "CL"). You're not writing a common lisp program, you're writing a CLIM program!
shifty has joined #lisp
ayuce has quit [Remote host closed the connection]
ayuce has joined #lisp
Involuntary has quit [Quit: Leaving]
ayuce has quit [Read error: Connection reset by peer]
ayuce has joined #lisp
<beach> pjb: I think it is CLIM-LISP.
* adlai is considering exploring NLP as a hiatus from other projects; has anyone here got insights and/or experience with the various CL libraries for this?
Kundry_Wag has quit [Remote host closed the connection]
<adlai> e.g., are there relevant existing libraries other than those listed in https://www.cliki.net/Natural%20Language%20Processing ?
sulami has joined #lisp
sulami has quit [Ping timeout: 256 seconds]
karlosz has quit [Quit: karlosz]
<ebrasca> Morning!
<beach> Hello ebrasca.
karlosz has joined #lisp
<ebrasca> beach: How are you doing?
<beach> ebrasca: Yesterday, I finished reading Didier Verna's "habilitation" document, mostly about Common Lisp. Today, I'll work on my report for his defense. I also need to start thinking about my slides for the ELS papers. And I have a nasty problem to debug in my SICL bootstrapping procedure. In SBCL, I run out of bind stack, and I don't know how to debug that.
<beach> ebrasca: You?
<ebrasca> beach: My cat just died last die. I back to work with FSs for mezzano. I am probably fine.
<no-defun-allowed> RIP ebrasca's cat
<beach> Sorry to hear about the cat. Good luck with Mezzano.
<pjb> Happily, cats reproduce like rabbits, you won't have any difficulty to procure a new one.
<ebrasca> pjb: It take time to tech them and I like cats.
<pjb> ebrasca: perhaps you'd prefer to pet an elephant or a turtle. They outlive us…
<ebrasca> 1 to big , 2 to slow
<pjb> Yes, we should breed dwarf elephants. But don't believe turtles are always slow…
dmiles has quit [Read error: Connection reset by peer]
Oladon has joined #lisp
* adlai once saw a snapping turtle run, those things could easily catch an old cat
<adlai> strictly speaking they do not run since they maintain multiple points of contact with the ground at all times; still, they move quite fast
libertyprime has joined #lisp
dmiles has joined #lisp
ahungry has quit [Remote host closed the connection]
buffergn0me has quit [Quit: ERC (IRC client for Emacs 26.2)]
sulami has joined #lisp
ayuce has quit [Remote host closed the connection]
dmiles has quit [Read error: Connection reset by peer]
sulami has quit [Ping timeout: 256 seconds]
dmiles has joined #lisp
<beach> adlai: phoe was working on a spell checker, but I don't know how far he got. I have always wanted a spell checker that returns all possible candidates for a word, including the word category, and information such as singular/plural present/past tense, etc.
<beach> Such a thing could be used both for spell checkers and grammar checkers.
narimiran has joined #lisp
ayuce has joined #lisp
asarch has quit [Quit: Leaving]
<adlai> what you probably wanted is one that searches up to a hamming bound, rather than ~all~ possible candidates...
<beach> Oh, I didn't mean all possible candidates for a misspelled word.
<adlai> otherwise dog is a typo for cat :)
<beach> I mean for a correctly spelled word.
<beach> But you are right. For misspelled words, you have to limit the distance.
<adlai> by candidates for a correctly spelled word, you mean the anticipated typos when someone meant to type that word?
<beach> No. Let me give you an example...
<beach> I type "flies". I want both (noun, plural) and (verb third-person singular).
<adlai> ok, thanks for the example; that's quite outside what i imagined when you write "spell checker"; the colloquiallism that i remember my classics teachers using to describe this is "gloss"
<beach> Sure, you also need possible corrections for misspelled words.
<adlai> where "gloss" is a verb, and the similarity to the noun "glossary" is a very false friend
torbo has quit [Remote host closed the connection]
gravicappa has joined #lisp
vms14 has joined #lisp
<vms14> what's wrong?
<vms14> I'm trying to implement something like the js setTimeout
<vms14> I just maintain a list of symbols which have :code and :time properties
<no-defun-allowed> What is setp? set property?
<vms14> oh, lol
<vms14> I've put the < wrong
<no-defun-allowed> Ouch, I've done that before with times.
<vms14> setp is (defun setp (symbol property value) (setf (get symbol property) value)
<vms14> meh, isn't working
gko has joined #lisp
<vms14> the time was wrong
<pjb> vms14: what's wrong with defstruct or defclass?
<vms14> nothing I guess, I just like symbols
<pjb> ok.
<vms14> but in terms of performance, is better to use defstruct?
<vms14> I like to think symbols are cheap
<no-defun-allowed> DEFSTRUCT is faster, but DEFCLASS is less likely to be annoying if you want to update your definitions.
<pjb> In terms of code clarity, defstruct would be better.
ukari has joined #lisp
<no-defun-allowed> Hm, if you use properties on a symbol, those are stored on a property list, which is O(n) to access. Reading slots of a structure-instance or standard-instance (which are created from structures and classes, respectively) would be O(1).
<vms14> I'll use defclass for stuff like the player, enemies or alike I hope
<vms14> oh
<vms14> then I have no excuse to not use defstruct
<adlai> there's always an excuse not to use defstruct
<vms14> adlai: defclass?
<vms14> anyway I can't say I'm really worrying about performance
<vms14> I'm sending code to perl and waiting for the result, and even made this
<vms14> (defmacro async-eval (&body code)
<vms14> (when (car code)
<vms14> (eval (car code))
<vms14> (lambda ()
<adlai> optimization mature enough to want something that is not structured the way defstruct offers, yet immature enough to use defclass+nonstandard-object
<vms14> (setf code (cdr code)))))
* adlai hands vms14 a backquote and a bunch of commas
<adlai> use them wisely; and if you need another backquote, before you're done with this one, then may the angels have mercy on your soul
Oladon has quit [Quit: Leaving.]
ayuce has quit [Remote host closed the connection]
dddddd has quit [Remote host closed the connection]
ayuce has joined #lisp
<vms14> pjb: thanks, much nicer
<vms14> adlai: thanks for the ` and , also :D
shangul has joined #lisp
sulami has joined #lisp
dtman34 has quit [Ping timeout: 256 seconds]
sulami has quit [Ping timeout: 250 seconds]
karlosz has quit [Quit: karlosz]
shka_ has joined #lisp
orivej has joined #lisp
<vms14> it's weird, works fine until I have a loop
<no-defun-allowed> ebrasca, pjb: <https://youtu.be/AkukqriuvIM?t=55> "Watch a cat! It's an amazing animal..."
<no-defun-allowed> vms14: What are you trying to do with async-eval?
<vms14> no-defun-allowed: atm nothing, but for later, divide code in pieces, so the main loop can go executing that code without being blocked
<vms14> like when you make a ball movement from one direction to another, the main loop needs to update that ball bit a bit
<vms14> I want to just code the movement and let it being divided by pieces
<vms14> so async-eval creates a closure that when called will execute only one sexp
<vms14> and return nil once finishes
<no-defun-allowed> Right, you're trying to implement asynchronous evaluation. What's the plan then? Do you want a closure that will run one form at a time?
<vms14> yes
<vms14> a list of those closures
<vms14> so the main loop will iterate on them and eval only a sexp for everyone, then do other stuff
<no-defun-allowed> So, async-eval should produce a list of closures, one for each form?
<vms14> will only produce one closure with the code attached
kushal has joined #lisp
<vms14> like (defparameter code (async-eval (print "something") (print "more")))
<vms14> (funcall code) ; "something" (funcall code) ; "more"
<vms14> I'm looking for a better way to implement that
<vms14> so if you have any hint will be nice
<no-defun-allowed> Right. I would try to transform (asynchronously e1 e2 ... en) into (let ((counter 0)) (lambda () (incf counter) (case counter (1 e1) (2 e2) ... (n en))))
<vms14> why?
<vms14> then I need a macro to generate the case forms depending on the number of sexp the closure will have
<no-defun-allowed> That would implement your form without using EVAL, which isn't necessary (and is very, very necessary when macro writing).
<vms14> which should be easy
<vms14> thanks, I wanted to avoid the eval
<vms14> I'll work on that
<no-defun-allowed> https://plaster.tymoon.eu/view/1741 is my implementation of that; but you might want to figure that out for yourself.
kushal has quit [Quit: ZNC 1.7.5 - https://znc.in]
<vms14> thanks again, I was making a different macro just to generate the case form
<vms14> don't get why you use with gensyms
sulami has joined #lisp
iAmDecim has joined #lisp
<no-defun-allowed> The client code shouldn't be able to see the counter, so I use an uninterned symbol created by GENSYM to create a variable it won't be able to access.
<LdBeth> adlai: there're several algorithms that requires a Connect Machine or its simulator
<vms14> oh, you're trying to avoid variable capture bugs
<vms14> nice
<adlai> LdBeth: that sounds more complex than what I seek
<adlai> although, why would an algorithm care about the machine?
<p_l> feasibility of given algorithm to be efficient solution to a problem depends on the underlying architecture's broad strokes
<LdBeth> adlai: because it's about SIMD style processing, before GPU was available
ebrasca has quit [Remote host closed the connection]
iAmDecim has quit [Ping timeout: 256 seconds]
<p_l> beach: huh, I thought that "habilitation" was pretty much nonexistant in the west
<vms14> I've put weird names no one never will use
<vms14> async-code-counter-for-case
KindOne has quit [Ping timeout: 240 seconds]
slyrus__ has joined #lisp
<beach> p_l: I don't think there is a single "west" system.
slyrus_ has quit [Ping timeout: 256 seconds]
<p_l> I'm aware, but even discounting Bologna Process, "habilitation" doesn't seem to show up often when looking "to the west"
dale has quit [Quit: My computer has gone to sleep]
<p_l> (in Poland, it's a critical step on the road to being a professor)
<beach> Here too. Though not a strict requirement.
<beach> In practice it is mandatory.
<p_l> Ah
<p_l> In Poland, habilitation is generally required to lead independent research team
theosvoitha has quit [Quit: Connection closed for inactivity]
<beach> That's the exact definition of it here.
<p_l> And I don't think you can become even "extraordinary" (lower rank) professor without it
<p_l> For ordinary professor (Higher rank than extraordinary) it's mandatory
<beach> The full name of the title translates to "authorization to direct research".
<adlai> if you habilitate at one campus, take a job at another campus, and then return to the first, do you need rehabilitation?
<beach> adlai: It's a national title, so no.
<p_l> adlai: not in Poland, habilitation is part of your doctoral title
<p_l> That's the difference between "extraordinary" and "ordinary" professor in Poland
<adlai> oh it's just part of your doctoral work?
* adlai mentally equated this to 'postdoc'
<beach> adlai: Not here. It takes many years of experience and an additional document to write after the PhD.
<p_l> The naming comes from how a specific institution can "extraordinarily" name you a professor, but it can strip it and the title doesn't transfer
<p_l> An "ordinary professor" in Poland has national title unrelated current employment
sulami has quit [Remote host closed the connection]
<jackdaniel> how is it related to the channel topic?
<beach> Didier Verna is the relation.
<beach> But I think we have exhausted that one.
<jackdaniel> uhm
jonatack_ has joined #lisp
kushal has joined #lisp
jonatack has quit [Ping timeout: 265 seconds]
kushal has quit [Remote host closed the connection]
<vms14> oh, just discovered (get-internal-run-time) will print a time depending on the statements executing
<vms14> that's why my shit was behaving wrong in a loop
<vms14> it just went faster XD
<vms14> so I'll use get-internal-real-time
<vms14> also pjb in your example I saw get-whatever-seconds function
<vms14> but tried to use it and didn't exist
<vms14> oh, wasn't a function
<vms14> internal-time-units-per-second
<vms14> why did you use that, will change between implementations?
Inline has quit [Ping timeout: 246 seconds]
ukari has quit [Ping timeout: 260 seconds]
<vms14> now works fine :D
<vms14> thanks to all for helping me and giving me hints, specially you no-defun-allowed you improved my shit a lot and now I don't need to use eval
<no-defun-allowed> All good.
akoana has joined #lisp
vms14 has quit [Remote host closed the connection]
z147 has joined #lisp
amerigo has joined #lisp
gioyik has quit [Quit: WeeChat 2.8]
decent-username has joined #lisp
random-nick has joined #lisp
pve has joined #lisp
enrio has joined #lisp
enrio has quit [Read error: Connection reset by peer]
Lycurgus has joined #lisp
Lycurgus has quit [Remote host closed the connection]
z147 has quit [Ping timeout: 240 seconds]
whiteline has quit [Remote host closed the connection]
whiteline has joined #lisp
Inline has joined #lisp
<adlai> phoe: here is an example of with-simple-restart, for your condition system guide: https://github.com/adlai/event-emitter/blob/master/src/event-emitter.lisp#L35-L38
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life_ has joined #lisp
Lord_of_Life_ is now known as Lord_of_Life
<phoe> adlai: thanks!
z147 has joined #lisp
lavaflow has quit [Ping timeout: 256 seconds]
frgo has quit [Read error: Connection reset by peer]
frgo has joined #lisp
shifty has quit [Ping timeout: 260 seconds]
ukari has joined #lisp
narimiran has quit [Ping timeout: 260 seconds]
SGASAU has quit [Remote host closed the connection]
JohnMS has joined #lisp
SGASAU has joined #lisp
hhdave has joined #lisp
iAmDecim has joined #lisp
emys has joined #lisp
iAmDecim has quit [Ping timeout: 265 seconds]
emys has quit [Ping timeout: 260 seconds]
scymtym has quit [Ping timeout: 264 seconds]
emys has joined #lisp
joels has joined #lisp
emys has quit [Ping timeout: 272 seconds]
jonatack_ has quit [Ping timeout: 256 seconds]
jonatack_ has joined #lisp
scymtym has joined #lisp
JohnMS has quit [Quit: Konversation terminated!]
emys has joined #lisp
ljavorsk has joined #lisp
hhdave has quit [Quit: hhdave]
jamzattack has quit [Quit: bedtime :) have fun patching erc]
Bike has joined #lisp
dddddd has joined #lisp
emys has quit [Ping timeout: 264 seconds]
terpri has quit [Ping timeout: 260 seconds]
Steinberg2010 has joined #lisp
JetJej has joined #lisp
emys has joined #lisp
jonatack_ has quit [Quit: jonatack_]
jonatack has joined #lisp
emys has quit [Ping timeout: 260 seconds]
joels has quit [Ping timeout: 265 seconds]
emys has joined #lisp
aindilis has quit [Ping timeout: 240 seconds]
aindilis has joined #lisp
SGASAU` has joined #lisp
Steinberg2010 has quit [Ping timeout: 246 seconds]
SGASAU` has quit [Remote host closed the connection]
EvW has joined #lisp
SGASAU` has joined #lisp
emys has quit [Ping timeout: 272 seconds]
SGASAU has quit [Ping timeout: 265 seconds]
SGASAU has joined #lisp
<z0d> via Rainer
SGASAU` has quit [Ping timeout: 260 seconds]
Kundry_Wag has joined #lisp
emys has joined #lisp
aindilis has quit [Read error: Connection reset by peer]
emys has quit [Ping timeout: 260 seconds]
himmAllRight has joined #lisp
decent-username has quit [Remote host closed the connection]
emys has joined #lisp
emys has quit [Ping timeout: 250 seconds]
theosvoitha has joined #lisp
narimiran has joined #lisp
leo_song has quit [Read error: Connection reset by peer]
leo_song has joined #lisp
bitmapper has joined #lisp
<phoe> whole two pages
<phoe> still, nice
amerigo has quit [Quit: Connection closed for inactivity]
gxt has quit [Ping timeout: 240 seconds]
joast has quit [Quit: Leaving.]
shifty has joined #lisp
joast has joined #lisp
lucasb has joined #lisp
ahungry has joined #lisp
gxt has joined #lisp
Lycurgus has joined #lisp
EvW1 has joined #lisp
EvW has quit [Ping timeout: 265 seconds]
catalinbostan has joined #lisp
<_death> some slime trivia & rms "suggestion" in emacs-devel...
EvW1 has quit [Read error: Connection reset by peer]
EvW has joined #lisp
<beach> _death: Link?
efm has quit [Ping timeout: 256 seconds]
Zotan has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Zotan has joined #lisp
dale_ has joined #lisp
efm has joined #lisp
dale_ is now known as dale
<phoe> Yes, link please
<phoe> rms complaining that "slime" is a bad name
<phoe> what a curious time to live in
<_death> guess he's not aware of the consequences of this name change.. in any case, he seems optimistic about the future of CL if it's "not too late" :)
<phoe> haha
<drainful> I didn't know SLIME was a backronym
<beach> _death: I don't see any of that in the link that was posted.
<beach> Oh, "not too late" I see it.
<_death> beach: check out the rest of the thread
hhdave has joined #lisp
<beach> I was kind of expecting more words from rms, given the reaction here.
asarch has joined #lisp
<beach> Storm in a teacup.
<_death> the value of this discussion so far is mostly in the slime trivia
<beach> Got it. Thanks.
Steinberg2010 has joined #lisp
Steinberg2010 has quit [Client Quit]
EvW has quit [Remote host closed the connection]
EvW has joined #lisp
EvW has quit [Read error: Connection reset by peer]
EvW1 has joined #lisp
hhdave has quit [Quit: hhdave]
EvW1 has quit [Read error: Connection reset by peer]
shifty has quit [Ping timeout: 264 seconds]
rippa has joined #lisp
EvW has joined #lisp
shifty has joined #lisp
scymtym has quit [Ping timeout: 256 seconds]
pjb` has joined #lisp
aindilis has joined #lisp
pjb has quit [Ping timeout: 265 seconds]
ayuce has quit [Ping timeout: 240 seconds]
scymtym has joined #lisp
EvW has quit [Ping timeout: 272 seconds]
theosvoitha has quit [Quit: Connection closed for inactivity]
vms14 has joined #lisp
<mason> It'd be disappointing if it were given a boring new name.
<Grue`> I can think of some GNU projects with worse names...
<travv0> gnu itself is a worse name
ayuce has joined #lisp
toorevitimirp has quit [Quit: Konversation terminated!]
<vms14> this is what I have now
<vms14> I'm kinda happy with that, but I guess I should change those two "remove" functions to only one
<phoe> vms14: I'd get rid of EVAL
<phoe> and replace "code" with actual pre-compiled function objects
<vms14> phoe: we did
<phoe> could be anonymous ones
<phoe> no, you didn't
<vms14> well, no defun helped to do that
<phoe> DEFMACRO ASYNC-EVAL still has EVAL
<vms14> yes, I've just removed that
<vms14> it's replaced by async-code
<phoe> then the link at https://termbin.com/k1zt that you just posted still has it
<axion> your macro still has unwanted capturing
<phoe> oooh! that's what you meant
<vms14> she showed me how to do that with a case
<vms14> I wanted to get rid of using eval, but didn't know how
<vms14> axion: :O
<vms14> yes, I should use gensym directly
<vms14> I'm still having to learn how to use macros properly
<travv0> Any time you introduce bindings in generated code the names should be gensymed
<travv0> With rare exception
<axion> Well your comment says how, but you don't do it
<vms14> also I should comment my code
<vms14> that comment is just to remember someone helped me
<vms14> and it's the second time she helps me with a macro xD
iAmDecim has joined #lisp
shifty has quit [Ping timeout: 240 seconds]
<vms14> pjb`: it was you who told me to use defstruct?
<vms14> and there is code you don't see in termbin, but I'm using perl with a socket and making it eval whatever I want xD
<vms14> I have troubles to load libraries in netbsd, specially if they use ffi. Also tried to use sdl in slackware with quicklisp, but does not find the sdl .so, and it was installed
<vms14> so I'll use perl as a library and "raw" sbcl
<phoe> ahh, rare OSes
<vms14> if slackware would work with lisp and sbcl maybe I'd stay with that, since it's obviously much better to have just lisp and not doing such abomination like what I do
<vms14> but it seems it will be very deployable at least for unix, using perl sdl and sbcl
<vms14> and for windows I just need to change unix sockets for pipes
<vms14> I hope...
lavaflow has joined #lisp
KindOne has joined #lisp
efm has quit [Remote host closed the connection]
pjb` has left #lisp [#lisp]
pjb has joined #lisp
pjb has quit [Remote host closed the connection]
pjb has joined #lisp
<pjb> vms14: your async-code operators are not consistent. do-async takes a body, ie. a list of forms, whole process-async-code uses funcall (expecting a function designator, ie a function or a function name).
ATP7 has joined #lisp
emys has joined #lisp
efm has joined #lisp
<pjb> vms14: also, I would advise you to handle errors when calling the meat, and perhaps removing the activity when it produces errors. (or not, you could want to keep it in case the error is transitory).
xkapastel has joined #lisp
Lycurgus has quit [Remote host closed the connection]
gko has quit [Ping timeout: 256 seconds]
<jcowan> IMO the most important part of picking a name (other than that it's not insulting: few people love the name "Stalin" for an interprocedurally optimizimng compiler) is that Google doesn't find too many hits for it
Lycurgus has joined #lisp
<pjb> vms14: oh, sorry, I see your async-code now. It's ok.
emys has quit [Ping timeout: 260 seconds]
<pjb> vms14: also, have a look at bordeaux-threads.
emys has joined #lisp
iAmDecim has quit [Ping timeout: 265 seconds]
EvW1 has joined #lisp
efm has quit [Remote host closed the connection]
emys has quit [Ping timeout: 265 seconds]
ATP7 has quit [Quit: Leaving]
gravicappa has quit [Ping timeout: 256 seconds]
gravicappa has joined #lisp
aindilis has quit [Read error: Connection reset by peer]
<vms14> pjb: thanks for the hints and for your code
<vms14> I have no threads in lisp here, if you were telling me to use bordeaux threads to make async stuff or alike
<vms14> unless you just want me to look at the code
<pjb> vms14: ok, if you don't have threads, you must do it like that.
<vms14> and you're right, it's inconsistent, also thought that
<vms14> I see do-later as js setInterval
<vms14> but, would be better if it's a macro and I don't have to go creating lambdas
<vms14> so I guess I'll try to change that to be like do-async, taking a body instead of a function
<pjb> vms14: then you may want to have a look at jwacs, which has a cps-transformer. https://github.com/chumsley/jwacs
<pjb> vms14: it transforms a form into continuations, which let you split whole expressions into chunks that you can evaluate in turn as with async-code.
<vms14> jwacs - Javascript With Advanced Continuation Support :O
<vms14> I'll save those links
efm has joined #lisp
iAmDecim has joined #lisp
iAmDecim has quit [Ping timeout: 256 seconds]
terpri has joined #lisp
<phoe> Does the standard define default condition reporters anywhere?
wsinatra has joined #lisp
karayan has joined #lisp
EvW1 has quit [Ping timeout: 260 seconds]
<pjb> phoe: if it mentions them, then it must say that they're implementation dependent.
gioyik has joined #lisp
<phoe> pjb: I've just noticed. All implementations do these differently.
<pjb> phoe: basically, when an unhandled condition is signaled, the debugger is invoked, and the debugger s implementation dependent.
<phoe> pjb: (let ((*print-escape* nil)) (write-to-string (make-condition 'condition)))
<phoe> no debugger here
<phoe> just the condition reporter for CONDITION
<pjb> Oh, this. No, there's no specification of the message that will be printed.
<phoe> OK
<pjb> phoe: the standard condition classes are specified, of course, but you will notice that no reporter message is mentionned in those pages.
<phoe> yes, I've noticed that
<pjb> phoe: apart, perhaps the simple-error, since it takes a format-control-string and arguments ;-)
<phoe> :D
<pjb> Well, nope.
<pjb> It only says: "The type simple-error consists of conditions that are signaled by error or cerror when a format control is supplied as the function's first argument."
ebrasca has joined #lisp
<phoe> clhs simple-condition
<phoe> hmmm
<phoe> no reporting info here either!
<pjb> phoe: note for example, that clisp is localized, so the reporting can be done in different languages.
<phoe> correct
iAmDecim has joined #lisp
<Bike> i know it's an ANSI standard and all, but ruling out reporting in languages other than english would still kinda blow.
<pjb> All user interface questions are not specified, left up to the implementation.
<pjb> Even the REPL, it's specified only if available. You can have a conforming implementation without a REPL (ie. a batch compiler).
<pjb> And note that the prompt, how input is done, how output is presented, etc, are not specified.
<pjb> On the other hand, there's DRIBBLE, and slime-repl doesn't respect it!!! slime-repl is not a conforming CL repl! :-)
<Bike> phoe: i think the closest thing is the fiddly rules in 9.1.3.1
hiroaki has joined #lisp
pjb has left #lisp ["temporarily"]
pjb has joined #lisp
jayspeer has joined #lisp
<phoe> clhs 9.1.3.1
<specbot> Recommended Style in Condition Reporting: http://www.lispworks.com/reference/HyperSpec/Body/09_aca.htm
<phoe> huh
ArthurStrong has joined #lisp
<phoe> can an argument be made that an implementation doesn't conform to 9.1.3.1 if (let ((*print-escape* nil)) (write-to-string (make-condition 'condition))) returns something that isn't a properly structured English sentence?
<phoe> I can imagine implementation maintainers deciding to stone me if I ever make such an argument
<pjb> Nope, English is not specified there.
<phoe> these are only recommendations after all
<phoe> s/English/natural language/
<pjb> Well, I guess as long as it's not binary, anything is acceptable.
<Bike> i'm kind of surprised it doesn't even say simple conditions go through FORMAT, though
<pjb> (but then, since most implementation have characters corresponding to ASCII control codes, even binary output as text would do).
<Bike> i guess it might be weird to specify, since there are situations in which you want to report a condition in some limited way to avoid printer errors
<pjb> Bike: it's a little implied by the use of format-control and format arguments.
<pjb> Bike: but you can replace a call to format by a call to the formatter. (write-string (with-output-to-string (out) (funcall (formatter "~A~%") out "foo")))
<pjb> Bike: furthermore, an implementation doesn't have to call functions in the CL package. It can call internal functions. Even written not in CL!!!
cods has joined #lisp
<splittist> Displaying things in typeout windows on Genera...
mrcom has joined #lisp
<phoe> clhs *print-escape*
vms14 has quit [Remote host closed the connection]
Lycurgus has quit [Read error: Connection reset by peer]
<Bike> hm, seems like it should say "similar" instead of "equal" to me
<phoe> "an attempt is made"
<Bike> yeah, unlike print-readably, print-escape can just give up
<phoe> but yes, should be "similar"
jayspeer has quit [Read error: No route to host]
aindilis has joined #lisp
cosimone has joined #lisp
sauvin has quit [Read error: Connection reset by peer]
shka_ has quit [Read error: Connection reset by peer]
shka_ has joined #lisp
shangul has quit [Quit: Leaving]
cosimone has quit [Quit: Terminated!]
karayan has quit [Ping timeout: 240 seconds]
efm has quit [Ping timeout: 240 seconds]
jasom has joined #lisp
ayuce has left #lisp ["ERC (IRC client for Emacs 28.0.50)"]
gioyik has quit [Ping timeout: 265 seconds]
<jcowan> What are some standard use cases / applications for rationals other than integers?
cosimone has joined #lisp
<phoe> when you need to, uh, represent rationals in your program?
efm has joined #lisp
<phoe> they're infinite precision compared to floats, so perhaps that
<phoe> Offtopic - which part of the standard specifies that globally SETQing a symbol that hasn't been proclaimed a global variable is UB?
<jcowan> So fractions and arbitrary-precision floats are isomorphic?
<phoe> sure they are, an infinite-precision float 0.001 is just 1/1000
<phoe> as long as you don't care about normalization/denormalization and such cases, and compare via =
<jackdaniel> what is an infinite-precision float?
<jcowan> (modulo +inf.0, -inf.0, +nan.0, and -0.0
<phoe> yes, other than these edge cases too
<jcowan> A float whose mantissa is a bignum. Of course it is not truly infinite, any more than bignums are.
dddddd has quit [Ping timeout: 240 seconds]
<jasom> jcowan: fractions and arbitrary-precision floats are not completely isomorphic; they are only isomorphic to some arbitrarily small precision.
<jcowan> Fair enough
<jasom> you could implement an equality operator that would answer the question "is this float X the most accurate representation of this rational Y" at which point they would be isomorphic until you start doing math on them, at which point they can start drifiting
cosimone has quit [Quit: Quit.]
<travv0> phoe: i think it just fails to specify the behavior. the most relevant text i know of is "The following facilities allow the value of a variable (more specifically, the value associated with the current binding of the variable) to be altered. Such alteration is different from establishing a new binding. Constructs for establishing new bindings of variables are described in section 7.5."
<travv0> oh that's from cltl2, not the spec
<phoe> travv0:
<phoe> clhs 5.1.2.1
<Bike> phoe: 3.1.2.1.1 defines various symbols as lexical, dynamic, or constant. a variable that has not been proclaimed special, defconstant'd, or lexically bound, is not included in any of the cases. so, it's undefined
<phoe> if a symbol does not name a variable then it doesn't apply to 5.1.2.1
<phoe> Bike: thanks.
<Bike> it also says an unbound-variable error "should be" signaled if an unbound variable is referenced, so i suppose that could mean that in safe code implementations ought to signal an error
<phoe> this would imply that (setq ksdjksgh 42) in safe code should signal an error
<Bike> right.
<travv0> that would make sense
<Bike> well, maybe setq doesn't constitute a "reference", since it just writes
<Bike> eh.
<Bike> yeah, that must be true, since a variable that's proclaimed special but not bound can be setq'd fine.
cosimone has joined #lisp
<phoe> SBCL warns instead of erroring, just as usual
<aeth> jcowan: an arbitrary, programmer-specified precision float is more useful for the sort of float-style compuations than rationals since rationals will just grow to 234/923489 and then 384978/234897529 and then 328794813489734835179/347918374893714891309143 over time
<aeth> while rationals are more natural for what they're used for in the numeric tower
<jasom> right; floats and rationals fill a different niche in computing. Rationals are less surprising in their results, but floats are less surprising in their performance.
gioyik has joined #lisp
<aeth> yeah, that's a better way of phrasing it
Lycurgus has joined #lisp
<jasom> also, fixed-point math can be very useful now that we have 64-bit machines; 64-bit fixed point values can fit a large number of real-world uses.
jonatack has quit [Ping timeout: 256 seconds]
<aeth> and then you have things like (* pi 42/3) or (sqrt 2) and if you want a rational result there, heh, you'd have to add a required precision to everything.
cosimone has quit [Client Quit]
<jasom> one might say it's not rational to use rational numbers for irrational calculations :P
<jcowan> I'm dealing with someone who claims that exact fractions are pointless, so I want to point him to use cases
<jasom> jcowan (loop repeat 100000 sum (- 1/3 10/31))
<aeth> (/ 4 3)
<aeth> literally just (/ 4 3)
<aeth> for 4 / 3, Python 2 gives you 1, Python 3 gives you 1.3333333333333333, and a proper Lisp for (/ 4 3) gives you 4/3
jonatack has joined #lisp
gxt has quit [Ping timeout: 240 seconds]
<jcowan> Sure, but those are demonstrations of how fractions work, not use cases for them. No database I know of, for example, has fractions with arbitrary denominators, which suggests that (a) people don't need to store fractional data, or (b) it would be useful to do so, but because it's not available people don't think of it
<aeth> You can get either behavior in CL, e.g. (floor 4 3) (or is it truncate?) for Python 2's behavior or, for Python 3's, (float (/ 4 3) 1d0) or (float (/ 4 (float 3 1d0)) or (/ 4 3d0) etc.
<aeth> jcowan: No database is going to use fractions because they're built for performance
<jasom> jcowan: with my example a 64-bit double has an error in the 13th digit, which is way less accurate than one might expect from doubles
<aeth> If I'm doing a calculation where performance doesn't particularly matter, I'm going to stay in rationals until the end
<aeth> Or at least until I have to use a float like with SQRT
<Bike> maybe something in maths? but tragically, i'm not actually a mathematician
<phoe> jcowan: same use cases as for infinite-precision integer arithmetic. a rational is just a pair of automatically GCD'd integers
<Bike> determining the error of a floating point calculation, maybe
<phoe> you only don't need to have rationals if you don't divide your integers.
* jcowan notes that gcc depends on the mpfr library
<jcowan> (arbitrary floats)
<phoe> so that can be delegated to the question of "who needs infinite precision integers anyway"
<jasom> jcowan: that's necessary for compiling for a target with different FP precisions than a host, if you want to do constant folding anyways
<jcowan> Up to a point, Minister. A database with user-defined domains can store bignums and fractions, but query languages won't be able to cope with them as such.
<jcowan> jasom: Just so
* jcowan has always seen programming as a verbal, not a mathematical, activity
<Lycurgus> Minister?
<Lycurgus> ans in Yes .. ?
<Lycurgus> *as in
<pjb> jcowan: not enough APL ! :-)
<jcowan> Lycurgus: Yes. It's how the sidekick disagrees
<Lycurgus> ah
<aeth> jcowan: imo floats are good for algorithms... because the algorithm author did the work already to (hopefully) prove that the algorithm won't be terribly unsurprising, but floats are still, essentially, surprising.
<aeth> rationals should, more or less, work out exactly like they would if you had done things on paper.
<jcowan> Assuming you have a sufficiently large sheet of paper!
<aeth> If anything, the numeric tower should extend exactness past rationals and include symbols for sqrt, pi, etc. But that's certainly asking too much of implementors
<Lycurgus> the real diff between now and when the choice was fixed or float is that you have well worked out gmp, usually incorporated in ur better stuffs
<pjb> aeth: actually, no. Mathematical reals are surprising "unphysical". When you use reals in physics, you can't have present and distinguish future from past. You need intuitive numbers for that.
<Lycurgus> the mapping of floats to reals was studied albeit obtrusely from the start, there's an ieee paper on it circa '59 or '60
<drmeister> ASDF is driving me nuts at the moment.
<Lycurgus> s/obtruse/arcane/
<aeth> jcowan: that is, imo this is less surprising in a sense: (sqrt 12) => 2\/3 (or using the actual unicode symbol, which my IRC doesn't want me to paste)
<drmeister> I (asdf:load-system :something-that-im-developing)
jasom has quit [Quit: WeeChat 2.5]
<drmeister> I get this backtrace in slime...
<aeth> I think you would only have to extend the numeric tower to handle sqrt, e, and pi
jasom has joined #lisp
<drmeister> I have no idea what is wrong. Something in 'interpret.lisp'
<aeth> (Possibly exact exponentials too)
<drmeister> I C-c C-k the file and it generates lots of warnings - and I go through them looking for something that can break compile-file.
<drmeister> Is that the best I can do?
jello_pudding has quit [Ping timeout: 246 seconds]
<aeth> pjb: we don't need reals, we just need computable numbers, but specific to exact numbers, we just need a way to express the operations symbolically that currently require us to "escape" into the floats even if we don't want to. That's e, pi, sqrt, and possibly a general expt
<drmeister> Walking through 50 warnings looking for something that breaks compile-file is annoying.
<phoe> drmeister: that is what I do myself, yes.
<aeth> drmeister: I'd like to help, but I can't really figure out the control flow of ASDF, either
<aeth> Things I think must execute don't (break) etc.
<pjb> aeth: the strange thing is that with e pi and a few square roots, we have named enough reals to do most things. Imagine a universe where we would need to use hundreds of such numbers!
<pjb> and i.
<aeth> we do have i (and Scheme even does it like 4+3i instead of #C(4 3))
<pjb> e^-ipi +1 = 0
<aeth> pjb: afaik, we need more physical constants mostly because we don't use natural units, but rather the arbitrary metric ones
<aeth> but there might be some relations that still require constants anyway
<pjb> aeth: physical constants are not reals.
<aeth> at least in our current understanding
<pjb> aeth: it looks like for physics, we don't need all the reals, but we can work in a subspace of R.
gxt has joined #lisp
iAmDecim has quit [Ping timeout: 250 seconds]
7YUAAD074 is now known as ober
slyrus__ has quit [Remote host closed the connection]
<adlai> aren't most solutions to eigenvalue equations provably non-algebraic ?
jello_pudding has joined #lisp
* adlai always had this impression, maybe it's not true and physicists have only not yet found the closed-form algebraic expressions
iAmDecim has joined #lisp
<aeth> My impression as far as physical constants go, and I'm not a physicist, is that it's *possible* that some of the relations described in the constants are like pi...
<Bike> transcendental numbers infinitely outnumber algebraic ones, no?
<phoe> this is the most #lisp post I have read today
<adlai> Bike, correct, the algebraic numbers are countable whereas transendentals are uncountable
libertyprime has quit [Read error: No route to host]
<Bike> drmeister: any actual warning other than a style-warning will cause compile-file to report failure.
jonatack_ has joined #lisp
<jasom> Bike: I agree with drmeister in that it's annoying to have 100s of style warnings and then a single warning or error *somewhere* in the output
<Bike> oh, sure. i don't know what the hey asdf is doing.
<phoe> jasom: that could perhaps be a slime issue
<jasom> sbcl is fairly profligate with its style warnings when speed optimizations are enabled
<phoe> to have the slime debugger report errors at the top of *slime-compilation-warnings* buffer, or something
<phoe> that would be a good sieve IMO
<phoe> drmeister: what do you think?
<Bike> hm, we could probably sort the conditions we give to slime
<jasom> yeah ,reporting in order of severity error,warning,style-warning (does lisp have anything less sever than style warnings?)
<Bike> i don'
<Bike> t know if slime would respect the order, though
<Bike> lisp does not have anything less severe than style warnings, but it's reasonably common to have a compiler-note class that's less severe
<_death> compiler-note?
<phoe> Bike: I'd actually prefer slime to do it rather than submit changes to all the implementations
<Bike> sbcl has it and swank supports it
<phoe> _death: standard lisp
<phoe> compiler-notes are a SBCL thing
<_death> phoe: right
<Bike> i think other implementations have them
<Bike> if not, they probably ought to, it's useful
jonatack__ has joined #lisp
jonatack has quit [Ping timeout: 258 seconds]
<Bike> standard situations can easily be compiler notes. off the top of my head, when the compiler attempts to use a compiler macro but it fails because an argument was not constant
<Bike> that's not a style problem, it's just "hey, this could work better"
cosimone has joined #lisp
jonatack_ has quit [Ping timeout: 260 seconds]
oldtopman has quit [Read error: Connection reset by peer]
<phoe> yes
<phoe> huh, sounds like a possible CDR
MightyJoe has joined #lisp
<drmeister> Hi - sorry - got called away for a bit.
Lycurgus has quit [Quit: Exeunt]
<pve> hello everyone
cyraxjoe has quit [Ping timeout: 260 seconds]
<pve> If I have a defclass in a file, and then later in that same file a defmacro with an &environment parameter, then should the environment parameter know about that class? (that could be passed to find-class when the macro is expanded)
<Bike> this is unfortunately a bit of a mystery.
<Bike> the clhs page on defclass says the type has to be noted as a type by the compiler, but whether that means find-class works...
<drmeister> Ok - thanks folks - knowing that it annoys everyone else helps somewhat - it means I'm not missing something.
<pve> the clhs page explicitly mentions find-class, but I can't get it to work on SBCL.. hence my confusion
akoana has left #lisp ["Leaving"]
<Bike> yes, well, there are some difficulties. for example if the class definition requires some methods on validate-superclass and mop things.
<phoe> drmeister: I'd throw a pair of issues at ASDF and slime; the one at ASDF stating that the error signaled due to compile-file errors should contain the list of signaled errors in a slot; the one at slime, errors could be at the top of the slime-compilation-output buffer
jonatack__ has quit [Read error: Connection reset by peer]
<phoe> that should fix the issues for everyone
dtman34 has joined #lisp
jonatack__ has joined #lisp
jonatack__ has quit [Client Quit]
<pve> ok, thanks
<Bike> phoe: looking at swank, sbcl, lispworks, and allegro all have compiler notes. (SCL and CMUCL also treat style warnings as notes, not sure what's going on there)
jonatack has joined #lisp
defaultxr has joined #lisp
jonatack has quit [Read error: Connection reset by peer]
iAmDecim has quit [Ping timeout: 256 seconds]
<Bike> phoe: and while i'm at it, sbcl, clasp, and allegro have condition classes for noting a redefinition (also supported specially by swank)
shifty has joined #lisp
shka_ has quit [Ping timeout: 264 seconds]
<Bike> implementation compilers are the heaviest users of weird condition shit i'm aware of, so it's interesting to see what they go with
jonatack has joined #lisp
Grauwolf has quit [Read error: Connection reset by peer]
iAmDecim has joined #lisp
<jackdaniel> ecl has compiler-note, compiler-style-warning, compiler-warning or something in this spirit
<jackdaniel> mind that compiler-warning does not subclass/subcondition the warning condition
<Bike> yeah, it's the same on sbcl.
<Bike> swank/ecl.lisp doesn't know about any notes. sad
<Bike> oh wait, misunderstood re compiler warning
* jackdaniel dives right now in ecl's moppery, pcl is annoying
<pjb> pve: AFAIUI, the defclass defines classes in the global environment (named NIL). The environment the macro gets will be a local (lexical) environment. You can define classes in that environment (using (setf find-class) !). But if you don't and call just find-class, it will find the class in the global environment. So you need to use the &environment only if you use (setf find-class) to define local classes.
choegusung has joined #lisp
z147 has quit [Ping timeout: 240 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
asarch has quit [Quit: Leaving]
<pve> pjb: Thank you. Hmm, local classes.. that's a new one
<pjb> pve: I'm not sure of the usefulness of this concept, though…
theseb has joined #lisp
<phoe> random question: which symbol from the CL package is the most obscure one?
<phoe> note I'm not asking about useless; I'm asking about the most confusing, unknown, unused and/or underutilized one
<phoe> so far I am thinking either WITH-CONDITION-RESTARTS or something from the pathname dictionary
<jackdaniel> otherwise
<phoe> oof, that's a good one
<aeth> The most useless pair is RPLACA and RPLACD, basically just unwritable, unmemorable alternatives to (setf car) and (setf cdr)
<jackdaniel> they are quite memorable to me
<aeth> they're memorable in a sense, but I always look them up to make sure I didn't get a letter wrong, which I sometimes do
<Bike> i remember this came up before and someone- maybe xach? found that OTHERWISE is the only cl symbol that doesn't fit a meaning classification
<Bike> also, besides otherwise i'd pick STANDARD
<Shinmera> phoe: dribble?
<axion> under-used: dribble?
<Shinmera> hah.
<axion> ha
<phoe> good ones too
<scymtym> NRECONC
<Shinmera> there's also ed
<jackdaniel> both-case-p
<jackdaniel> ed has potential
<jackdaniel> cdaadr
<aeth> PROG, PROG*, and PROG2 are things that people probably don't know exist, even though PROG2 is useful. (PROG and PROG*, not so much, since TAGBODY is almost always in a macro)
<jackdaniel> with sufficiently elaborate c*r hierarch one could do morse with them
<aeth> it looks like there's a PROGV as well
<phoe> progv is actually useful, as obscure as it is
<aeth> PROGV is the one I haven't heard of before, I knew I'd find one if I did "!l1sp prog" in DDG
<phoe> it is the only operator that allows you to bind dynavars fully at runtime
<Shinmera> ldiff?
<Shinmera> lotsa weird stuff I never use.
emys has joined #lisp
<_death> ldiff is quite useful, especially in tandem with member
<axion> sublis? Don't think I've ever seen that one used before. As for me, I never use DO/DO* and I always get confused about the control flow when I see it used by others, but that's just me probably.
<aeth> The real strange things are extentions to things you use every day where you never use those features. I'm talking about e.g. &aux
<aeth> it is a symbol in CL...
<phoe> aeth: also a very good one
<_death> I guess one way to find out is to write a program calculating the relative frequency of the symbols in the lisp codebase on your machine
wheelsucker has joined #lisp
cyraxjoe has joined #lisp
<aeth> A weird feature (which I have found a use for) is ":allow-other-keys t" in the caller, but that's not in CL. This allows you to have a higher-order-function in your public API without making breaking changes when you add optional things.
<aeth> (I mean, it's a keyword, not in the CL package)
MightyJoe has quit [Ping timeout: 240 seconds]
<phoe> aeth: &allow-other-keys
<phoe> that is in CL though
<theseb> Does EVERY expression need to return something? I tried "(if false 3)" and didn't see it return anything?
<phoe> ...oh, you mean the caller side though
<_death> clhs gentemp
<phoe> theseb: what's "false"?
<aeth> phoe: (defun foo (f) (funcall f :foo 42 :allow-other-keys t)) (foo (lambda (&key) (format t "Hello!~%")))
<aeth> phoe: incredibly obscure but you can see where it makes sense
<phoe> aeth: yes, that's correct
<theseb> phoe: oh ..ug i did it in an online web scheme thing
<phoe> theseb: in Common Lisp, this returns NIL
<theseb> phoe: but question still stands
<_death> I guess the boole operators are also quite obscure
<phoe> (if nil 3) ;=> nil
<phoe> _death: boole operators actually make sense when you think about them
<theseb> phoe: interesting
<pjb> clhs if
<pjb> theseb: ^
<phoe> but yes, they're underused
<_death> phoe: Naggum had an interesting post about them
<theseb> phoe: why something so basic is *different* between common lisp and scheme?
xuxuru has joined #lisp
<pjb> theseb: note how the else-form default is nil. Therefore (if nil 3) returns nil. It could have been (values) but since multiple values are a recent addition to lisp, they stayed with nil which was the original behavior.
<phoe> theseb: because they're different languages
<travv0> that's just the tip of the iceberg when it comes to basic things that are different between cl and scheme
<phoe> that's like asking why something so basic is different between C++ and Java
<phoe> for any good enough value of "something so basic"
<aeth> theseb: That's one of the few points where Common Lisp is more ideologically ideal than Scheme is. most Schemes take "unspecified" return values literally and return something like #<unspecified> or #<undefined>, which your REPL might not show. Or maybe returning nothing, in a way that CL can't.
elderK has joined #lisp
elderK has quit [Changing host]
elderK has joined #lisp
<phoe> in theory Lisp can return (values) but that gets coerced to NIL anyway
<aeth> theseb: In Common Lisp, things that would have a "useless" return still return something: NIL (which is false)
<aeth> phoe: yes, except in multiple-value-call or multiple-value-list
<aeth> so returning (values) is just asking for code to break in an edge case
<phoe> yes
<_death> GO and THROW for example do not return anything
<phoe> _death: nice
<phoe> neither does INVOKE-DEBUGGER
<aeth> or your REPL's implementation-specific (exit) or (quit)
<elderK> Hey all. I was wondering where I can find a list of defined character names.
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<elderK> Say, for |. Is it just #\| or is there another name, like pipe?
<phoe> elderK: that's implementation-dependent
<phoe> clhs 2.1.3
<phoe> the rest is up to the implementation
<Shinmera> clhs 13.1.7
<elderK> phoe:Perhaps it would be better to match on unsigned integer values then.
<phoe> elderK: some char-codes won't map to characters and instead return NIL.
choegusung has quit [Quit: leaving]
<Bike> elderK: many, hopefully most, implementations use the names defined by unicode.
emys has quit [Ping timeout: 260 seconds]
<Bike> which would make, e.g., (name-char "VERTICAL_LINE") work
<aeth> Unicode is one of the few places where the implementation is lacking.
<aeth> s/implementation/specification/
<aeth> Which is good. Implementations can use modern Unicode, not early 1990s
<phoe> aeth: modern implementations specifically break the standard to use unicode
<aeth> I wish they'd break the standard to add the IEEE short-float (too imprecise)
<phoe> clhs 13.1.4.3
<elderK> Are there any particular gotchas I should be aware of if I am parsing arbitrary input?
<phoe> "Every character with case is in one-to-one correspondence with some other character with the opposite case."
<pjb> aeth: an implementation can be an implementation of a superset of CL.
<elderK> I am working on a small tool, originally written in C, reimplementing in Lisp for fun.
<aeth> phoe: SBCL doesn't violate the standard here. SBCL has separate case rules in sb-unicode...
<elderK> The tool reads a modified form of BNF, and lets me do a bunch of useful things.
<phoe> this one is against unicode and so modern implementations knowingly break this
<_death> aeth: couldn't an implementation just define a half-float type?
<Shinmera> Work on CL started well before Unicode came out.
Kundry_W_ has joined #lisp
<phoe> aeth: oh!
<phoe> I need to see it now then
<aeth> phoe: It's actually a bit annoying because I #+sbcl sb-unicode things and then #-sbcl the standard CL things and hope they're like CCL and standards-violating to more closely match sb-unicode
<aeth> no portability library here afaik
<aeth> but there's no whitespacep
<aeth> I don't think the standard anticipated all of the whitespace in Unicode
<phoe> yes, that's correct
SGASAU has quit [Remote host closed the connection]
<pjb> aeth: as long as it's documented, you can define a half-float as a subtype of float.
SGASAU has joined #lisp
Kundry_Wag has quit [Ping timeout: 258 seconds]
<aeth> pjb: it would be much better to have a the half-precision float as the short float, though, since (1) it's IEEE not some extension and (2) the linguistic/reader convenience is for short floats, which most implementations currently don't even support
<aeth> (it's about 50/50 on long float)
<aeth> (I mean, short-float is almost-universally single-float in modern CL)
<Shinmera> probably because most processors don't operate on them.
emys has joined #lisp
<drmeister> phoe: Thank you very much!
<pjb> aeth: but it would break programs that expect the 16 significant bit of the mantisa of a short-float…
<phoe> drmeister: no problem; if ASDF and slime decide to implement that, it'll be a time-saver for all of us.
<pjb> aeth: granted, there must not be a lot of programs using short-floats…
narimiran has quit [Ping timeout: 258 seconds]
<froggey> aeth: ok, you've convinced me. I'll implement short-float as IEEE half float
<froggey> afaik the precision minimums are just recommendations, not requirements
<aeth> great
emys has quit [Ping timeout: 265 seconds]
<aeth> it's only 11 instead of 13 bits... probably no one will notice
<stylewarning> froggey: arbitrary precision floats for long floats!
<froggey> that's considerably more complicated
<aeth> froggey: you're right, it's a recommendation. http://www.lispworks.com/documentation/HyperSpec/Body/t_short_.htm
<aeth> So it's conforming, it's just that no one is raising this issue around implementors
<aeth> I guess it can't be required because hardware support isn't really something implementors have control over
karlosz has joined #lisp
catalinbostan has quit [Quit: Textual IRC Client: www.textualapp.com]
azimut__ has quit [Remote host closed the connection]
<pjb> Good point, the minimums are only recommendations! Great!
<aeth> I think some GPUs support IEEE half-precision float these days so implementation support might be useful
luckless has joined #lisp
<aeth> (meanwhile, everyone will continue to do machine learning in Python)
<pjb> aeth: definitely.
luckless is now known as azimut__
<aeth> Hopefully we can start a short-float effort like we did with package-local-nicknames
<aeth> then languages that have a long-float will have four distinct floats
<elderK> Hmm. Does CL define a "carriage return" character?
<Bike> clhs 13.1.7
<Bike> so, kinda.
<Shinmera> elderK: I linked you the answer already before
<Bike> so you did
emys has joined #lisp
<elderK> Shinmera: You did indeed.
<elderK> I am curious as to how lexing is often done in CL. Is it common to switch on the CL character names? Or is it common to switch on code-points?
<elderK> Then when you know the code point, translate it to a character and push it into some buffer?
SGASAU has quit [Remote host closed the connection]
ukari has quit [Remote host closed the connection]
pve has quit [Quit: leaving]
ukari has joined #lisp
iAmDecim has quit [Ping timeout: 256 seconds]
<phoe> I'd personally switch from charcodes to characters as soon as I can; this way I will also get instant char-code validation, and any char-codes that are invalid can be mapped to something sane or used to signal a corrupted-file error of sorts
<elderK> phoe: So, code-char ASAP?
<aeth> char<, char<=, etc. give you basically everything you need... except for one thing
<phoe> elderK: even better, don't read the files yourself; let babel/flexi-streams do that for you
<aeth> I had to write my own char-dec and char-inc that goes to char-code and then back to code-char
<aeth> that is, if I want the largest char char< but not char<=
Kundry_W_ has quit [Remote host closed the connection]
<aeth> (or the other way around)
<elderK> phoe: What would babel / flexistreams do for me here? Eithey way, I still want to pump my lexer state machine.
<aeth> The other thing where the integer representation makes more sense is, I don't think there's an "infinity" char that's char> all other chars
<aeth> some things may want something like that, too
ahungry has quit [Ping timeout: 256 seconds]
<aeth> (you can just (1+ char-code-limit) if working with char-codes)
emys has quit [Ping timeout: 246 seconds]
<aeth> (then you have the advantage of an error if you try to use the "char infinity" outside of the reasonable context to use it, too)
<aeth> technically, I think it might just be char-code-limit instead of (1+ char-code-limit), but unfortunately that's just a "might"
<aeth> In SBCL (code-char (1- char-code-limit)) seems to be the largest valid
emys has joined #lisp
<aeth> hmm... in fact, char-code-limit isn't even required to be a fixnum so it might be most-positive-bignum. It just needs to be *an* upper bound.
<phoe> elderK: portably taking care of character encoding for you.
<elderK> phoe: It's a tool for myself so I can safely assume ASCII for now.
<phoe> oooh, not even UTF-8?
<phoe> well then
<aeth> elderK: In that case, I'd just assume that code-char/char-code is valid Unicode
<aeth> Implementations that break this assumption can be dealt with via #+foo later
theseb has quit [Quit: Leaving]
emys has quit [Ping timeout: 264 seconds]
<elderK> Is there a way to clear a vector? Or reset a stringstream?
emys has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Read error: Connection reset by peer]
<jasom> elderK: what do you mean by "clear" a vector?
<jasom> elderK: for vectors with fill-pointers, you can set the fill-pointer to 0
Kundry_Wag has joined #lisp
iAmDecim has joined #lisp
<jasom> and get-output-stream-string will reset a an string-output-stream (but per spec is not compatible with with-output-to-string)
<pjb> jasom: setting the fill-pointer doesn't change the elments. it doesn't "clear" anything.
<jasom> pjb: it makes it logically empty, which could be considered clearing
<pjb> elderK: perhaps you want: (fill vector nil) (let ((v (vector 1 2 3))) (fill v nil) v) #| --> #(nil nil nil) |#
<pjb> jasom: despite the name "fill-pointer", it doesn't mean that the remaining elements are less in the vector. You can count on them, and use the fill-pointer just as a cursor in the vector.
<pjb> jasom: it's not logically empty. It's just a vector with a cursor at the start, so that if you push new elements, they will overwrite the old elements.
<jasom> pjb: LENGTH will return 0; that sounds empty to me
<elderK> pjb: Logically "cleared" is fine. I just want to reuse a buffer is all, and be able to translate the buffer into a string later :)
<pjb> jasom: (array-dimension v 0) always return the same…
iAmDecim has quit [Ping timeout: 265 seconds]
<pjb> (array-dimension (make-array 10 :fill-pointer 0) 0) #| --> 10 |#
emys has quit [Ping timeout: 240 seconds]
<jasom> (alexandria:emptyp (make-array 10 :fill-pointer 0))
<jasom> (alexandria:emptyp (make-array 10 :fill-pointer 0)) ; => T
<pjb> elderK: for a vector of characters, basically it wouldn't make a difference to fill it with #\null, so indeed, setting the fill-pointer will be enough.
<pjb> elderK: but for a vector of non-number and non-character, filling it with nil would allow the objects to be garbage collected if no other references exist.
<pjb> which would be a better clearing of the vector…
grobe0ba has quit [Quit: ZNC 1.7.4 - https://znc.in]
grobe0ba has joined #lisp
Lord_of_Life_ has joined #lisp
Grauwolf has joined #lisp
Grauwolf has joined #lisp
cosimone has quit [Remote host closed the connection]
wsinatra has quit [Quit: WeeChat 2.8]
gravicappa has quit [Ping timeout: 264 seconds]
cosimone has joined #lisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<elderK> pjb: Thank you, pjb
modula2 has joined #lisp
defaultxr has quit [Ping timeout: 250 seconds]
modula2 is now known as defaultxr
defaultxr has quit [Client Quit]
defaultxr has joined #lisp
Kundry_Wag has quit []
<phoe> woah
<phoe> the optional arguments to CERROR are used *both* for the format control and for the datum?
iAmDecim has joined #lisp
<pjb> nope. cerror continue-format-control datum &rest arguments
<Bike> you can use ~*... actually tne notes even say so, huh
<pjb> If datum is a condition, arguments can be supplied, but are used only in conjunction with the continue-format-control.
<phoe> (cerror "Frobnicate ~A ~A ~A ~A." 'simple-error :format-control "foo ~A" :format-arguments '(42))
<phoe> this causes a condition with report "foo 42" to be signaled
<pjb> :-)
<phoe> with a CONTINUE restart available, signaling "Frobnicate FORMAT-CONTROL foo ~A FORMAT-ARGUMENTS (42)."
<phoe> this is the coolest thing I have learned today! crazy!
lucasb has quit [Quit: Connection closed for inactivity]
<pjb> phoe: yes, I see. indeed, arguments is used to both initialize the condition, and to format the continue-format-control string, when datum is not itself a condition.
joast has quit [Ping timeout: 256 seconds]
<pjb> It is assumed that indeed, the arguments to the conditions are reused for the continue restart message.
<phoe> And that is a very nice hack
defaultxr has quit [Ping timeout: 256 seconds]
modula2 has joined #lisp
modula2 is now known as defaultxr
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
hhdave has joined #lisp
efm has quit [Remote host closed the connection]
efm has joined #lisp
efm_ has joined #lisp
efm has quit [Ping timeout: 256 seconds]
X-Scale` has joined #lisp
_jrjsmrtn has joined #lisp
__jrjsmrtn__ has quit [Ping timeout: 240 seconds]
X-Scale has quit [Ping timeout: 265 seconds]
X-Scale` is now known as X-Scale
asarch has joined #lisp
iAmDecim has quit [Ping timeout: 265 seconds]
smasta has joined #lisp
random-nick has quit [Ping timeout: 240 seconds]
elderK has quit [Quit: WeeChat 2.8]
efm_ has quit [Quit: Konversation terminated!]
dddddd has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
ebrasca has quit [Read error: Connection reset by peer]
smasta has quit [Ping timeout: 246 seconds]
choegusung has joined #lisp
joast has joined #lisp
smasta has joined #lisp
iAmDecim has joined #lisp
ebrasca has joined #lisp
iAmDecim has quit [Ping timeout: 256 seconds]
lxbarbosa has joined #lisp
orivej has quit [Ping timeout: 265 seconds]
<no-defun-allowed> Have named registers disappeared from cl-ppcre?
efm has joined #lisp
<no-defun-allowed> Hm, maybe not. The GitHub repository for cl-ppcre has named register support, but the Quicklisp version does not.
efm_ has joined #lisp
efm has quit [Ping timeout: 260 seconds]
ayuce has joined #lisp
Oladon has joined #lisp
emys has joined #lisp
choegusung has quit [Quit: leaving]
ayuce has quit [Remote host closed the connection]
ayuce has joined #lisp
azimut__ has quit [Remote host closed the connection]
jasom has quit [Quit: WeeChat 2.5]
azimut__ has joined #lisp
karlosz has quit [Quit: karlosz]
ayuce has quit [Remote host closed the connection]
gabot has quit [Ping timeout: 240 seconds]