jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.5.4, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
khisanth__ has joined #lisp
cosimone has quit [Ping timeout: 245 seconds]
rgherdt has quit [Ping timeout: 240 seconds]
rgherdt has joined #lisp
meepdeew has joined #lisp
meepdeew has quit [Remote host closed the connection]
rgherdt has quit [Client Quit]
eddof13 has quit [Quit: eddof13]
frgo has joined #lisp
isBEKaml has joined #lisp
frgo has quit [Ping timeout: 245 seconds]
slyrus__ has joined #lisp
slyrus_ has quit [Ping timeout: 240 seconds]
aindilis has quit [Read error: Connection reset by peer]
aindilis has joined #lisp
aindilis has quit [Remote host closed the connection]
aindilis has joined #lisp
karlosz has joined #lisp
meepdeew has joined #lisp
meepdeew has quit [Remote host closed the connection]
karlosz has quit [Client Quit]
meepdeew has joined #lisp
jackdaniel2 has joined #lisp
meepdeew has quit [Remote host closed the connection]
jackdaniel2 has quit [Read error: Connection reset by peer]
X-Scale has quit [Ping timeout: 240 seconds]
X-Scale` has joined #lisp
X-Scale` is now known as X-Scale
zulu-inuoe has joined #lisp
<dlowe> Anyone have experiense using lem? It looks interesting
<Xach> steal my sumshime
<dlowe> Xach: that was a very far reach
<Xach> only 90s kids would understand
<dlowe> One interesting thing it does is provide a docker container so you can try it out with no setup
<dlowe> which is an interesting solution to the lisp-in-a-box
<dlowe> Xach: now I must listen to it. It's the law.
FreeBirdLjj has joined #lisp
<Xach> I tried to add lem but there was an issue, I think.
smazga has joined #lisp
<jasom> just because it seems like something that might already exist; a tool for pretty-printing durations to round amounts? e.g. print "3 seconds or "5 minutes" or "2 hours" or "3 days" or "3 weeks" given some type of time duration as input?
wiselord has quit [Read error: Connection reset by peer]
wiselord has joined #lisp
<oni-on-ion> whoa -- just learned about: (format nil "~r" 1234) ==> "one thousand two hundred thirty-four"
<oni-on-ion> jasom, i cant seem to find anything built in, perhaps this is helpful? --> https://github.com/quek/simple-date-time
<oni-on-ion> although it uses CLOS which to me seems too heavy for its purpose
orivej has quit [Ping timeout: 252 seconds]
meepdeew has joined #lisp
meepdeew has quit [Remote host closed the connection]
wiselord has quit [Read error: Connection reset by peer]
wiselord has joined #lisp
<pjb> oni-on-ion: even better: this is the (format nil "~:r" 1234) #| --> "one thousand two hundred thirty-fourth" |# time somebody found it!
<oni-on-ion> hehe
* oni-on-ion been avoiding format, printf trauma
EvW1 has quit [Ping timeout: 246 seconds]
isBEKaml has quit [Remote host closed the connection]
<oni-on-ion> its possible to do custom formats ? for eg., print digit from 1-26 for alphabet: "abcd -> 1234"
no-defun-allowed has joined #lisp
<no-defun-allowed> You could use #/, but it's a bit odd.
<no-defun-allowed> clhs 22.3.5.4
<Xach> no-defun-allowed: odd in what way?
<no-defun-allowed> I recall it being weird with packages.
<no-defun-allowed> But if you're asking, it probably isn't.
<Xach> ah. yes, it follows its own rules, separate from how the reader usually works.
<oni-on-ion> hehe. cool thanks =)
<no-defun-allowed> I believe it was this part that tripped me up: If name does not contain a ":" or "::", then the whole name string is looked up in the COMMON-LISP-USER package.
<Xach> there's also no escaping and it's coerced to uppercase.
<pjb> oni-on-ion: yes. See for example: http://paste.lisp.org/display/163695
<Xach> so no functions named |///funky monkey///|
<no-defun-allowed> ):
<no-defun-allowed> I assume it could be so compilers could generate code for FORMAT rather than interpreting the string. If that rule wasn't there, the effect would be dependent on the current package, but that doesn't seem too difficult to manage
meepdeew has joined #lisp
meepdeew has quit [Remote host closed the connection]
jlarocco has joined #lisp
karlosz has joined #lisp
isBEKaml has joined #lisp
isBEKaml has quit [Changing host]
isBEKaml has joined #lisp
<oni-on-ion> pjb thanks, thats a big one . quite cool
ralt has quit [Quit: Connection closed for inactivity]
clothespin_ has joined #lisp
joast has quit [Quit: Leaving.]
FreeBirdLjj has quit [Remote host closed the connection]
smazga has quit [Ping timeout: 252 seconds]
bitmapper has quit [Ping timeout: 240 seconds]
clothespin has quit [Ping timeout: 245 seconds]
wiselord has quit [Ping timeout: 240 seconds]
isBEKaml has quit [Remote host closed the connection]
isBEKaml has joined #lisp
isBEKaml has quit [Changing host]
isBEKaml has joined #lisp
isBEKaml has quit [Client Quit]
frgo has joined #lisp
joast has joined #lisp
oni-on-ion has quit [Ping timeout: 246 seconds]
oni-on-ion has joined #lisp
frgo has quit [Ping timeout: 240 seconds]
<jasom> I've used that for escaping strings: (format X "Foo \"~/pkg:escape/\"" bar) is much more obviously correct that (format X "foo \"~a\"" (escape bar)), particularly when you have a long format string or many arguments.
torbo has joined #lisp
<pjb> (format nil "Foo ~S bar" "Hello \" World! \\ <-- ha! \"") #| --> "Foo \"Hello \\\" World! \\\\ <-- ha! \\\"\" bar" |#
FreeBirdLjj has joined #lisp
jonatack has quit [Read error: Connection reset by peer]
Guest31 has joined #lisp
ebrasca has quit [Remote host closed the connection]
ebrasca has joined #lisp
kobain has quit [Ping timeout: 265 seconds]
shifty has joined #lisp
iridioid has joined #lisp
vms14 has joined #lisp
smasta has quit [Ping timeout: 276 seconds]
<vms14> what's the "correct" way for having a group of labelled functions with local variables, should I use let and put the labels inside that let, or make the labelled functions receive them as argument? two of them are recursive and one gets called from another, but needs an argument that the callee does not need
<vms14> sorry if you cry with the code, but it's a bad implementation of a image format I've created
<vms14> the image will be a list of positive and negative numbers and the first item will be the width of the image
jackdaniel2 has joined #lisp
<vms14> positive numbers refer to a color and negative numbers mean steps or points to draw with the current color
jackdaniel2 has quit [Read error: Connection reset by peer]
meepdeew has joined #lisp
Guest31 has quit [Ping timeout: 265 seconds]
<aeth> They do different things. If you use the parent environment you're creating a closure.
ebrasca has quit [Remote host closed the connection]
Necktwi has joined #lisp
<vms14> aeth: what would you do?
frgo has joined #lisp
Necktwi has quit [Client Quit]
Necktwi has joined #lisp
frgo has quit [Ping timeout: 265 seconds]
<pjb> aeth: only the CL:FUNCTION special operator can create closures.
iridioid has quit [Ping timeout: 240 seconds]
lxbarbosa has joined #lisp
iridioid has joined #lisp
Necktwi has quit [Quit: leaving]
ebrasca has joined #lisp
iridioid has quit [Ping timeout: 240 seconds]
lxbarbos` has joined #lisp
lxbarbosa has quit [Ping timeout: 276 seconds]
<vms14> oh
<vms14> I guess I have it
<vms14> it seems to work, but I'm testing it yet
orivej has joined #lisp
<vms14> nope
* vms14 cries
Oladon has joined #lisp
<vms14> it works xD
<vms14> (draw-image '(14 3 :end 4 :end 3 -3 2 -5 3 :end))
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
iridioid has joined #lisp
<Josh_2> very kewl vms14
aindilis has quit [Remote host closed the connection]
aindilis has joined #lisp
iridioid has quit [Ping timeout: 276 seconds]
<vms14> Josh_2: ty but now I need to create a paint software able to export to this weird format I've created
<oni-on-ion> gimp plugin uses a form of scheme, if that helps =)
iridioid has joined #lisp
<vms14> and I have no idea about how I should do it, but since will be for basic pixel art stuff it should be easier
<vms14> oni-on-ion: right I always forget gimp uses lisp
<vms14> I have to create a paint or a conversor to other format
<vms14> with the time I'll need a conversor anyway
<vms14> but could be funny make a buggy paint
<oni-on-ion> CL could use some painting code.. is there anything in McCLIM ?
iridioid has quit [Ping timeout: 240 seconds]
PuercoPope has joined #lisp
<vms14> oni-on-ion: I'm using clx and I saw no way to import images more than monochrome bitmaps
<vms14> I'm not able to find a library that loads images and can work with clx
iridioid has joined #lisp
<vms14> new-clx has support for xpm format, but the old one not, I use the "old" one since I target sbcl
<oni-on-ion> but pixmaps ?
<oni-on-ion> ohh clx, right..
<oni-on-ion> doing raw x11 ?
<vms14> yes
<vms14> I did it in C and it's much easier with lisp
<oni-on-ion> working with colormaps and stuff? x_x
<vms14> yes
<oni-on-ion> i've done it in C as well =)
<vms14> but it's easy
<oni-on-ion> making window manager ?
<oni-on-ion> (just curious)
<vms14> not now
<vms14> but I'd like in a future
<vms14> just games
<oni-on-ion> could always hook up opengl to the window, might be helpful for higher color and hardware acceleration if neede
<vms14> I see clx loads glx too
<oni-on-ion> nice =) couple months ago i got some raw pixel blitting happening and it was very fast. so one can use any image loader
<oni-on-ion> like the recent PNG library for CL which is nice n fast (compared to the previous one, afaik)
<vms14> oni-on-ion: if you know xlib you'll love clx
<vms14> if you want to get started I recommend to google for "simple clx", they're simple examples and knowing xlib you'll easily get the difference
<oni-on-ion> i can imagine =) however i am just using raylib for now. its a nice library, than SDL(2), and works for win32 and the web as well.
<oni-on-ion> for using opengl, i had it rendering Cairo onto opengl texture then to window in real time at hyper speed on old hardware
<vms14> seems interesting
<oni-on-ion> using... glTexSubImage2D =)
slyrus_ has joined #lisp
<oni-on-ion> (cairo because i needed vector and also font. also the API is just about interchangeable (especially with ocaml!!) with html5 canvas so that my work could run on any modern system incl. mobile and game console)
slyrus__ has quit [Ping timeout: 240 seconds]
PuercoPope has quit [Remote host closed the connection]
iridioid has quit [Ping timeout: 240 seconds]
Zanitation has quit [Quit: WeeChat 2.6]
<vms14> oh so it uses opengl and webgl
<vms14> it's a great choice
refpga has joined #lisp
<vms14> I only target linux and NetBSD
<vms14> and maybe sbcl
<oni-on-ion> cool =) i honestly would too but i want to show my friends who only have mobile, and my tablet is stuck with windows8.1
<vms14> it's nice, I always wanted in secret to develop stuff for smartphones
gravicappa has joined #lisp
<oni-on-ion> they are cheap and quite powerful. my desktop feels like wooden carriage
bacterio has joined #lisp
bacterio has quit [Changing host]
bacterio has joined #lisp
<vms14> this is the total ram memory in my pc 2047 MB, so yes
iridioid has joined #lisp
<oni-on-ion> hehe i've had that last year. this year i've had 4gb
vlatkoB has joined #lisp
anewuser has joined #lisp
ark has quit [Remote host closed the connection]
frgo has joined #lisp
Bike has quit [Quit: Lost terminal]
ark has joined #lisp
jackdaniel2 has joined #lisp
frgo has quit [Ping timeout: 240 seconds]
jackdaniel2 has quit [Read error: Connection reset by peer]
dddddd has quit [Remote host closed the connection]
<aeth> vms14: how to structure internal functions is sort of just a matter of taste.
<aeth> they're fairly rare in CL, anyway.
<aeth> At least that's the impression I get.
<vms14> aeth: yes, but I'd like to learn how to write "correct" code
<vms14> and I'm trying to avoid think in optimization
<vms14> just how to do the stuff
<vms14> think in optimization limits you so much while designing something
<vms14> this is also why I think C programming limits your mind
iridioid has quit [Ping timeout: 240 seconds]
vms14 has quit [Remote host closed the connection]
iridioid has joined #lisp
frgo has joined #lisp
ebzzry has quit [Ping timeout: 245 seconds]
Oladon has quit [Quit: Leaving.]
frgo has quit [Ping timeout: 276 seconds]
iridioid has quit [Ping timeout: 265 seconds]
emma has quit [Remote host closed the connection]
Necktwi has joined #lisp
iridioid has joined #lisp
<pjb> oni-on-ion: cliki.net references several graphic toolkits. I would suggest pgl, since it's very simple. (However it's not native). Depending on the sophistication of your paint application, and the target systems, McCLIM or CLX could be good choices too.
<pjb> oni-on-ion: https://www.cliki.net/pgl
<oni-on-ion> i think it was vms14 who is doing current clx work. i will regard this new information
iridioid has quit [Ping timeout: 276 seconds]
iridioid has joined #lisp
torbo has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
iridioid has quit [Ping timeout: 245 seconds]
jeosol has joined #lisp
iridioid has joined #lisp
Kevslinger has quit [Quit: Connection closed for inactivity]
dale has quit [Quit: My computer has gone to sleep]
anewuser has quit [Ping timeout: 252 seconds]
iridioid has quit [Ping timeout: 265 seconds]
anewuser has joined #lisp
shifty has quit [Ping timeout: 240 seconds]
iridioid has joined #lisp
frgo has joined #lisp
enrio has joined #lisp
frgo has quit [Ping timeout: 240 seconds]
iridioid has quit [Ping timeout: 240 seconds]
madage has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
jackdaniel2 has joined #lisp
karlosz has quit [Quit: karlosz]
jackdaniel2 has quit [Read error: Connection reset by peer]
FreeBirdLjj has quit [Ping timeout: 276 seconds]
bacterio has quit [Ping timeout: 240 seconds]
hiroaki has quit [Ping timeout: 250 seconds]
Necktwi has quit [Ping timeout: 276 seconds]
Inline has quit [Quit: Leaving]
JohnMS_WORK has joined #lisp
iridioid has joined #lisp
anewuser has quit [Ping timeout: 265 seconds]
<beach> Good morning everyone!
ir0nbutt has joined #lisp
iridioid has quit [Ping timeout: 240 seconds]
JohnMS_WORK has quit [Read error: Connection reset by peer]
<no-defun-allowed> Good morning beach!
<Josh_2> Mornin
<ebrasca> Morning beach!
ironbutt has quit [Read error: Connection reset by peer]
<phoe> morniiing
JohnMS_WORK has joined #lisp
ironbutt has joined #lisp
ir0nbutt has quit [Ping timeout: 245 seconds]
sauvin has joined #lisp
ir0nbutt has joined #lisp
ironbutt has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #lisp
brown121408 has quit [Quit: Quit]
brown121407 has joined #lisp
brown121407 has quit [Client Quit]
brown121407 has joined #lisp
ironbutt has joined #lisp
iridioid has joined #lisp
ir0nbutt has quit [Ping timeout: 252 seconds]
jackdaniel2 has joined #lisp
zaquest has quit [Quit: Leaving]
FreeBirdLjj has quit [Ping timeout: 252 seconds]
eschatologist has quit [Excess Flood]
eschatologist has joined #lisp
zaquest has joined #lisp
ir0nbutt has joined #lisp
madage has joined #lisp
ironbutt has quit [Ping timeout: 252 seconds]
jackdaniel2 has quit [Read error: Connection reset by peer]
retropikzel has joined #lisp
brown121407 has quit [Quit: Quit]
brown121407 has joined #lisp
ironbutt has joined #lisp
ir0nbutt has quit [Ping timeout: 240 seconds]
iridioid has quit [Ping timeout: 265 seconds]
iridioid has joined #lisp
ggole has joined #lisp
manualcrank has quit [Quit: WeeChat 1.9.1]
iridioid has quit [Ping timeout: 265 seconds]
frgo has joined #lisp
ljavorsk__ has joined #lisp
Harag has joined #lisp
frgo has quit [Ping timeout: 240 seconds]
jonatack has joined #lisp
iridioid has joined #lisp
<Harag> What should the method-combination-type-name be in find-method-combination if I am trying to check if method z has a specialization on class a for (defmethod z ((var a)))
ir0nbutt has joined #lisp
iridioid has quit [Ping timeout: 246 seconds]
ironbutt has quit [Ping timeout: 245 seconds]
Necktwi has joined #lisp
iridioid has joined #lisp
ravenousmoose has joined #lisp
refpga` has joined #lisp
ravenousmoose has quit [Ping timeout: 252 seconds]
refpga has quit [Read error: Connection reset by peer]
jonatack_ has joined #lisp
jonatack has quit [Ping timeout: 276 seconds]
<beach> Harag: Usually the method combination is STANDARD.
<beach> Harag: But I am not sure that is what you want.
ironbutt has joined #lisp
<beach> Harag: I am thinking you probably want to call METHOD-SPECIALIZERS on every method on Z instead.
<Shinmera> or just FIND-METHOD
ir0nbutt has quit [Read error: Connection reset by peer]
<Shinmera> depending on what the circumstances are
rgherdt has joined #lisp
<beach> Sure, yes.
iridioid has quit [Ping timeout: 252 seconds]
ir0nbutt has joined #lisp
ironbutt has quit [Ping timeout: 240 seconds]
scymtym has quit [Ping timeout: 276 seconds]
FreeBirdLjj has joined #lisp
jackdaniel2 has joined #lisp
frgo has joined #lisp
jackdaniel2 has quit [Read error: Connection reset by peer]
iridioid has joined #lisp
FreeBirdLjj has quit [Ping timeout: 250 seconds]
frgo has quit [Ping timeout: 240 seconds]
iridioid has quit [Ping timeout: 265 seconds]
iridioid has joined #lisp
shifty has joined #lisp
gxt has quit [Ping timeout: 260 seconds]
jackdaniel2 has joined #lisp
jackdaniel2 has quit [Read error: Connection reset by peer]
<Harag> i just want to check if the method combination exists
<beach> Are you sure you know what "method combination" means?
hhdave has joined #lisp
iridioid has quit [Ping timeout: 240 seconds]
<Harag> beach: most likely not
<Harag> (find-method #'z '() (list (find-class 'a))) does the job
iridioid has joined #lisp
jackdaniel2 has joined #lisp
ebrasca has quit [Ping timeout: 240 seconds]
jackdaniel2 has quit [Read error: Connection reset by peer]
<Harag> but (find-method #'z '() (list (find-class 'b))) gives me an error, I was expecting nil ??
iridioid has quit [Ping timeout: 265 seconds]
scymtym has joined #lisp
khisanth_ has joined #lisp
<phoe> Harag: which error?
<phoe> find-class is going to signal an error if class B doesn't exist
iridioid has joined #lisp
varjag has joined #lisp
<_death> it has an errorp parameter
khisanth__ has quit [Ping timeout: 240 seconds]
iridioid has quit [Ping timeout: 250 seconds]
iridioid has joined #lisp
puchacz has quit [Quit: Connection closed for inactivity]
ljavorsk_ has joined #lisp
refpga` has quit [Remote host closed the connection]
jackdaniel2 has joined #lisp
iridioid has quit [Ping timeout: 240 seconds]
ljavorsk__ has quit [Ping timeout: 246 seconds]
<phoe> _death: find-method is going to signal an error anyway if you call it like (find-method #'z '() (list nil))
iridioid has joined #lisp
jackdaniel2 has quit [Read error: Connection reset by peer]
<_death> nil is not a class or a list (eql something)
ljavorsk__ has joined #lisp
<Harag> _death: thanx did not see errorp parameter, and I should never have the nil issue so its ok
<phoe> _death: but NIL is what (find-class ... nil) will return in that case
<phoe> if it can't find the class
<_death> phoe: the misunderstanding is that you think I referred to find-class, while I referred to find-method
ljavorsk_ has quit [Ping timeout: 276 seconds]
<Harag> find-class was just to simplify the example I am actually looping through a list of super classes
<Harag> so should not end up with a nil in the class list ever
<phoe> _death: welp, I see
<_death> anaphora bites again
Josh_2 has quit [Ping timeout: 240 seconds]
iridioid has quit [Ping timeout: 276 seconds]
iridioid has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
shifty has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
Davd33 has joined #lisp
clothespin_ has quit [Ping timeout: 276 seconds]
shifty has joined #lisp
georgie has joined #lisp
georgie has quit [Client Quit]
FreeBirdLjj has joined #lisp
Davd33 has quit [Remote host closed the connection]
gxt has joined #lisp
FreeBirdLjj has quit [Ping timeout: 246 seconds]
jackdaniel2 has joined #lisp
wiselord has joined #lisp
ebrasca has joined #lisp
jackdaniel2 has quit [Read error: Connection reset by peer]
shifty has quit [Ping timeout: 246 seconds]
iridioid has quit [Ping timeout: 250 seconds]
shifty has joined #lisp
iridioid has joined #lisp
atgreen has joined #lisp
dddddd has joined #lisp
davepdotorg has quit [Remote host closed the connection]
gabiruh has quit [Quit: ZNC - 1.6.0 - http://znc.in]
gabiruh has joined #lisp
davepdotorg has joined #lisp
Necktwi has quit [Ping timeout: 252 seconds]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 245 seconds]
jackdaniel2 has joined #lisp
iridioid has quit [Ping timeout: 265 seconds]
jackdaniel2 has quit [Read error: Connection reset by peer]
Necktwi has joined #lisp
jonatack_ has quit [Ping timeout: 240 seconds]
ravenousmoose has joined #lisp
iridioid has joined #lisp
alexHu has joined #lisp
alexHu has left #lisp ["退出消息"]
ravenousmoose has quit [Ping timeout: 252 seconds]
enrioog has joined #lisp
enrio has quit [Ping timeout: 240 seconds]
jackdaniel2 has joined #lisp
ljavorsk__ has quit [Ping timeout: 252 seconds]
jackdaniel2 has quit [Read error: Connection reset by peer]
jackdaniel2 has joined #lisp
jackdaniel2 has quit [Client Quit]
iridioid has quit [Ping timeout: 276 seconds]
FreeBirdLjj has joined #lisp
iridioid has joined #lisp
FreeBirdLjj has quit [Ping timeout: 250 seconds]
heisig has joined #lisp
iridioid has quit [Ping timeout: 240 seconds]
Harag has quit [Ping timeout: 240 seconds]
iridioid has joined #lisp
cosimone has joined #lisp
iridioid has quit [Ping timeout: 240 seconds]
m00natic has joined #lisp
iridioid has joined #lisp
Davd33 has joined #lisp
nanoz has joined #lisp
<phoe> reviving yesterday's float-printing discussion - time to debate FORMAT.F.45
<phoe> (def-format-test format.f.45 "~2f" (1.1) "1.0")
FreeBirdLjj has joined #lisp
enrioog has quit [Ping timeout: 250 seconds]
<phoe> once again we have floats that do not fit inside their field
<phoe> so I assume that we only print the first decimal place
<phoe> so the correct printed value in that case would be "1.1" because we do not want to lose precision and since we print that decimal place anyway
iridioid has quit [Ping timeout: 265 seconds]
FreeBirdLjj has quit [Ping timeout: 252 seconds]
<phoe> so I argue, following jackdaniel's advice, that ANSI-TEST is incorrect in this case (;
Davd33 has quit [Ping timeout: 240 seconds]
<jackdaniel> "hen a sequence of digits, containing a single embedded decimal point, is printed; this represents the magnitude of the value of arg times 10^k, rounded to d fractional digits. " and *after* that we have "If it is impossible to print the value in the required format then …"
<jackdaniel> so this test seems to be correct given we follow the order in which things are specified in ~f section (22.3.3.1)
<jackdaniel> as in: first we round to number of fractional digits (in our case 0), then we add extra space to have a float
xkapastel has joined #lisp
<phoe> hmmmm
iridioid has joined #lisp
<jackdaniel> for more fun and giggles to (format t "~2f" 1.999)
<phoe> note that D is nil
<phoe> "~2f" does not specify D
<jackdaniel> I'm talking about paragraph describing w
<phoe> yes, you are
<phoe> but you cannot round to D fractional digits if D is nil
<jackdaniel> W = integral-digits + 1 + D
<jackdaniel> with an exception for few corner cases
<jackdaniel> but in this case fractional digits is 0, because 2 = 1 + 1 + D
<jackdaniel> that's why I've phrased the sentence before the way I did
<phoe> > W = integral-digits + 1 + D
<jackdaniel> you shouldn't have highlighted me, now that you did you have the above disagreement ,p
<phoe> where is that specified?
<phoe> jackdaniel: I'd rather disagree than make an invalid MR or an invalid test
<jackdaniel> w is the width of the fileld to be printed and d is the number of digits to print after the decimal point - literally the first paragraph
<phoe> yes, I can see that
<jackdaniel> so W = D + all-characters-before-fractional-digits
<phoe> why can I specify D on my own then if it depends only on W
<phoe> you don't seem to take e.g. padding into account
<phoe> oh wait, you do
<jackdaniel> W = D-if-unspecified + all-characters-before-fractional-digits
<jackdaniel> or whatever, either way this test is correct imo
<phoe> still - I cannot see the default value of D anywhere
<phoe> let me process it for a moment
<jackdaniel> if the parameter d is omitted, then there is no constraint on the number of digits to appear after the decimal point. a value is chosen for d ...
<jackdaniel> so it *is* described in the very same seciton.
<phoe> jackdaniel: there!
<phoe> yes, thanks
<phoe> ...
<phoe> ...except that if the fraction to be printed is zero, then a single zero digit should appear after the decimal point if permitted by the width constraint.
<phoe> "if permitted by the width constraint"
<jackdaniel> I should start working as a voice over; where I read the CLHS in a dramaticcal voice :)
<phoe> this implies that printing "1234." is correct if the width is 5
<jackdaniel> dramatical*
<phoe> which seems to invalidate the conclusions of our previous discussion
<phoe> wtf
<jackdaniel> I think we read this sentence differently
lxbarbos` has quit [Ping timeout: 240 seconds]
iridioid has quit [Ping timeout: 240 seconds]
<jackdaniel> as in "if permitted by the width constraint" in case that "d is ommited" -- it is a tautology, because "the next arg is printed as float", and "1234." is not float
<jackdaniel> so w /always/ permits the last 0 due to the paragraph about too small field width
<phoe> If the parameter d is omitted, then there is no constraint on the number of digits to appear after the decimal point. A value is chosen for d in such a way that as many digits as possible may be printed subject to the width constraint imposed by the parameter w and the constraint that no trailing zero digits may appear in the fraction, except that if the fraction to be printed is zero, then a single zero digit
<jackdaniel> unless d is deliberely set to 0
<phoe> should appear after the decimal point if permitted by the width constraint.
<jackdaniel> and width constraint always permits a digit after the decimal point because of the above
<jackdaniel> as I said, tautology
<phoe> OK
<jackdaniel> what could be arguable is whether d may be 0 or not
<jackdaniel> because if it may, then it stays in opposition to the first paragraph, argument is then not printed as a float
<phoe> d = 0 means "print 0 digits after the decimal points"
<phoe> s/points/point/
<jackdaniel> I know what it means, and I'm saying that it is arguable that it is a correct specifier for ~f
<phoe> I agree
<phoe> you can't print a float with zero digits after the decimal point
lucasb has joined #lisp
<phoe> especially because already 1. means a different thing in CL - namely, read this in base 10
<jackdaniel> I've taken the interpretation that if d is explicitly set to 0 then user knows what they do, but imo it wouldn't be violating the spec if implementation signaled an error for d=0
ebzzry has joined #lisp
<phoe> if W is 2, then we have two spaces for printing the float
<phoe> if we print 1.1, then one is the first digit before the point and the other is the point
<phoe> so effectively d is equal to 0 in that case
ravenousmoose has joined #lisp
<jackdaniel> I don't understand what you are saying to me
<phoe> we want to print 1.1 using "~2f"
<phoe> we have a field of width 2
<jackdaniel> then it should be printed as 1.0
<jackdaniel> because float does not fit in 2 characters
<phoe> yes, and this implies that d is implicitly set to 0
<jackdaniel> I can see one digit after "."
<jackdaniel> so this doesn't hold
<phoe> "d=0" doesn't mean "print nothing after the decimal point"
<phoe> if d was 1, then we would be allowed to print it as 1.1
<phoe> so d cannot be 1
<jackdaniel> no we wouldn't
patrixl has quit [Read error: Connection reset by peer]
<jackdaniel> because overall width is 2
<phoe> my question is - if overall width is 2, then what value is chosen for d?
<phoe> "A value is chosen for d in such a way that (...)"
<phoe> for width 2 and float being 1.1, *what* value is chosen for d?
<jackdaniel> in this case there is a single digit after the decimal point
<phoe> I know that there is a single digit after the decimal point
<jackdaniel> I still don't understand you, d is ommited so there is no d value
<phoe> correct, i do not pass D
<phoe> and the spec means that then it is the formatter that chooses a value for D
ravenousmoose has quit [Ping timeout: 250 seconds]
<phoe> because "If the parameter d is omitted, then (...) A value is chosen for d (...)"
<phoe> what is the value that gets chosen for 1.1 and W=2?
<jackdaniel> 1, not 0
<phoe> D is 1
<jackdaniel> because number of digits after the decimal point is 1
<phoe> so we are allowed to print the first decimal place
<phoe> because then "~2f" is equivalent to "~2,1f"
<phoe> because in both cases D is 1
<jackdaniel> no, because it doesn't fit in w and we round the number first
<jackdaniel> (format nil "~2,1f" 1.1) is still 1.0
<phoe> "..rounded to d fractional digits"
<phoe> and we do not provide D
<phoe> so D is chosen
<phoe> and it is chosen to be 1
<jackdaniel> D is chosen after rounding
<jackdaniel> it is not said /when/ the formatter choses the value
<phoe> we cannot choose D after rounding if we need D to perform the rounding
<phoe> and we need it to perform the rounding because we need to round to D digits
<jackdaniel> OK, then D=0 and we print one digit, what contradicts second paragraph
<phoe> but D=0 is invalid since we cannot print 0 decimal digits
<jackdaniel> I wouldn't hold too tightly to wording "a value is chosen for d"
<phoe> we've discussed that one a little bit higher
<phoe> and that would mean that the strict minimum for D is 1
<phoe> jackdaniel: I'd actually hold on to that - this is the part that describes the constraints for auto-choosing D if the user does not provide it themselves
<jackdaniel> I do not agree with such interpretation, I've only said that I wouldn't say that if implementation signals error for d=0 is violating the spec
patrixl has joined #lisp
<jackdaniel> in fact I've decided that allowing specifying d=0 is more useful and left it that way
<phoe> if we tell the float-printer that "0 is the number of digits to print after the decimal point"
<phoe> then it doesn't print a float
<jackdaniel> "is rounded to d fractional digits" imo refers to *specified* d, and if d is not specified we take whatever fits w and after that we match value of d
<jackdaniel> yes, I've said that. "d=0 is arguably correct blah blah"
<phoe> if we follow it this way, then we do not specify D, so we DO NOT round number 1.1 to D specified digits
<phoe> and then, "If the parameter d is omitted (...)", we choose D to be 1
<jackdaniel> I think you go in circles, I disagree with your interpretation and I've said why above (a few times), I have other things to do now
<phoe> OK, I'll re-read it a few more times
<phoe> < jackdaniel> as in: first we round to number of fractional digits (in our case 0)
<phoe> I still think you inferred "D is unspecified → D is 0" in that case
<phoe> so D = W - integral-digits - 1
<phoe> except for a few corner cases... blah, this is one of these corner cases
<jackdaniel> no, because disregarding how you specify D, if W is 2, then you'll have 1.0 here
<jackdaniel> even if you specify D=999999999999999999999
<jackdaniel> and if you were printing 1.999, then you will have 2.0
<phoe> OK, let me go through the algorithm one step at a time.
* jackdaniel minimizes the window because he gets distracted from the work
<phoe> Number is 1.1; W is 2; D, K, padchar, atsign are NIL.
<phoe> Constraint: we must print the number as a float.
<phoe> "Exactly w characters will be output." This is impossible to satisfy because the only float that we can print in two characters is 0.0. Therefore, "the scaled value is printed using more than w characters, as many more as may be needed."
<phoe> So we will use three characters.
<phoe> So now "a sequence of digits, containing a single embedded decimal point, is printed; this represents the magnitude of the value of arg times 10^k, rounded to d fractional digits."
<phoe> I cannot round the value to D digits because D was not provided. So either "a value is chosen for D" right now, or I signal a type error in my head.
<phoe> I am trying to literally follow the algorithm from the spec. (And I silently hope that I'm doing it correctly.)
edgar-rft has quit [Quit: Leaving]
<phoe> Where is my reasoning wrong?
<phoe> Is the spec not clear here?
ebrasca has quit [Remote host closed the connection]
__jrjsmrtn__ has quit [Ping timeout: 246 seconds]
_jrjsmrtn has joined #lisp
<jackdaniel> only during "then a sequence of digits ... is printed" the fourth paragraph is triggered, that you print the scaled value with as many character as is needed. no mention of rounding now (only about scaling by factor k)
<jackdaniel> so you print first character, second character, and then you add as many characters as needed to achieve a valid float from already printed characters
<jackdaniel> if we want to treat wordly specification as algorithm
<jackdaniel> (what is a debatable approach)
<nirved> jackdaniel: "except that if the fraction to be printed is zero, then a single zero digit should appear after the decimal point if permitted by the width constraint."
<nirved> so (format nil "~2f" 1.1) => "1."
<jackdaniel> nirved: we've already discussed it
<jackdaniel> see the very first paragraph: "arg is printed as float"
<jackdaniel> if "width constraint can't be satisfied, extra characters are added"
<jackdaniel> so to print a float you must add 0
<jackdaniel> 1.0 in this case
<pjb> or 1 why not?
<pjb> 1.1
<jackdaniel> so as noted before this "if permitted by the width constraint" is a tautology
iridioid has joined #lisp
* jackdaniel tried his best to explain why not
<phoe> so we print a sequence of digits that represents some object X
<phoe> that object X is a float that is rounded to D fractional digits
atgreen has quit [Ping timeout: 265 seconds]
<jackdaniel> NO
<phoe> so we need D to be able to compute that sequence
<phoe> "Then a sequence of digits, containing a single embedded decimal point, is printed; this represents the magnitude of the value of arg times 10^k, rounded to d fractional digits."
<phoe> "a sequence of digits (...) represents the magnitude of the value of arg times 10^k, rounded to d fractional digits."
<jackdaniel> you can't fit the number in width, so you do not round it beforehand, I've said it explicitly above
<nirved> having zero fractional digits makes it integer
<pjb> When w is not enough, it's printed as ~F (format nil "~F" 1.1) #| --> "1.1" |# not 1.0
<phoe> pjb: what implementations do is irrelevant
* jackdaniel gives up repeating himself
<phoe> jackdaniel: it seems that the spec is going in circles
<pjb> phoe: I'm saying this is my understanding, not the implementation.
<phoe> and I'm trying to figure out where exactly it loops or where it contradicts itself
<jackdaniel> imo it doesn't loop nor contradict itself
<pjb> all implementations print "1." for ~2F but ecl which prints "1.0"; I'd deem them all wrong.
<jackdaniel> and that the test is correct
iridioid has quit [Ping timeout: 250 seconds]
<phoe> jackdaniel: if it's correct, then I've arrived at a conclusion that D is required to compute the sequence of digits that is then printed
<jackdaniel> imo your conclusion is wrong
<phoe> OK - which step of my trainthought is wrong?
<nirved> "single zero digit should appear after the decimal point if permitted" makes it clear that a zero might not appear after decimal point
<phoe> nirved: except for 1.0
<phoe> where it MUST appear otherwise it's not a float
<jackdaniel> jackdaniel> only during "then a sequence of digits ... is printed" the fourth paragraph is triggered, that you print the scaled value with as many character as is needed. no mention
<jackdaniel> of rounding now (only about scaling by factor k)
<jackdaniel> 14:06 < jackdaniel> so you print first character, second character, and then you add as many characters as needed to achieve a valid float from already printed characters
<jackdaniel> 14:07 < jackdaniel> if we want to treat wordly specification as algorithm
<pjb> We'd need an expert system to interpret clhs entries formally.
<jackdaniel> wow, I've repeated myself again. I can't stick to my declarations
<jackdaniel> or rather "I'm not able to stick to them"
<phoe> > so you print first character, second character, and then you add as many characters as needed to achieve a valid float from already printed characters
<phoe> add as many characters as needed, so I add one character
<phoe> with that I agree, we need one more decimal digit to make "1." a float
<phoe> now let me parse "only during "then a sequence of digits ... is printed" the fourth paragraph is triggered, that you print the scaled value with as many character as is needed. no mention of rounding now (only about scaling by factor k)"
<jackdaniel> (handler-case (print-rounded arg) (overlow () (print-valid-digits arg) (add-missing-part)))
<phoe> so you mean that the paragraph "Then a sequence of digits (...) is printed" does NOT invoke the paragraph "A value is chosen for d (...)" ?
<jackdaniel> so in this exceptional case we indeed treat d as 0 and add .0 to have a valid float
<nirved> does "containing a single embedded decimal point" mean that the decimal point must be surrounded by digits?
<jackdaniel> nirved: no, .42 is a valid float
<jackdaniel> 12. is not a valid float (it is a valid integer though)
<phoe> I still do not understand *this* part - why do we treat D as 0? Where does that page specify it? Why is D even allowed to be 0 if it means "print 0 decimal digits" which in turn implies that the number is not printed as a float which contradicts the very first paragraph of ~F?
<jackdaniel> we treat D as 0 because W is to small to hold more D. Then we add .0 to have a valid float.
<phoe> "If the overflowchar parameter is omitted, then the scaled value is printed using more than w characters, as many more as may be needed."
<phoe> this means to me that W might as well be 3, since we print using three characters anyway
Bike has joined #lisp
<jackdaniel> and by we treat D as 0 I mean the number of fractional digits we round to, not how many fractional digits are printed.
<phoe> so "~2f" and "~3f" are equivalent for 1.1
<phoe> OK, I see.
<phoe> Let me process for a moment...
wiselord has quit [Ping timeout: 240 seconds]
<phoe> "d is the number of digits to print after the decimal point"
<jackdaniel> also, "we use more characters as needed" is not equivalent to "W is now as many characters as we need"
<phoe> "rounded to d fractional digits"
<phoe> So D has two functions.
<jackdaniel> OK, let me use letter D' (d prim)
<phoe> One - how many digits do we print
<phoe> Two - how many decimal points do we round to.
<phoe> And in case of 0 these two contradict each other.
<jackdaniel> I.e to three decimal points: 3... ;-)
<phoe> Because we need to round to 0 decimal points but we MUST NOT print 0 decimal digits.
<phoe> OK. Now I understand.
<phoe> I will annotate the ANSI-TEST with this reasoning, so other people will luckily not need to have this discussion again.
<phoe> Thank you for your patience.
<jackdaniel> I'm not patient, rage fueled me ;)
igemnace has joined #lisp
<phoe> Thank you for your rage. (,
<nirved> (format nil "~,-1f" 1.1) => "1.0"
milanj has joined #lisp
<phoe> nirved: D is not allowed to be negative
<phoe> you cannot print -1 decimal points
<nirved> where does it say so?
<jackdaniel> how many is -1 characters?
<nirved> zero
<jackdaniel> (format nil "~,-1f" 33.14) ; -> 33 ;?
<jackdaniel> that's some creative math
<jackdaniel> that said -1 works on my repl ;)
<jackdaniel> as 0 indeed. I'd expect a very restrictive implementation to signal an error
<nirved> some give "33.0", others "33."
<jackdaniel> that's another story
<nirved> ccl gives an error
<phoe> nirved: this case is where a lot of implementations go weird
<phoe> this is why I'm trying to dig into the spec instead of asking the impls
<nirved> would "1." be allowed when *print-readably* is nil?
lxbarbosa has joined #lisp
<phoe> "~F binds *print-escape* to false and *print-readably* to false."
bitmapper has joined #lisp
cosimone_ has joined #lisp
cosimone has quit [Ping timeout: 245 seconds]
<nirved> then "1." is a valid output
<jackdaniel> is 1. a float?
<nirved> "1." when read gives an integer
<phoe> is 1. required to be readable by the Lisp reader as a float if *print-readably* is explicitly NIL?
<jackdaniel> could you read to me the first paragraph of 22.3.31?
<jackdaniel> 22.3.3.1 *
<jackdaniel> sorry
Kevslinger has joined #lisp
<phoe> "The next arg is printed as a float."
<phoe> "there is always at least one digit on each side of the decimal point."
<jackdaniel> I was asking nirved
<phoe> so .0 is invalid as well, lol
Finnfinn has joined #lisp
wiselord has joined #lisp
<jackdaniel> it is not, because it .42 is explicitly mentioned as an exceptional situation
<jackdaniel> in 22.3.3.1
<phoe> 22.3.3.1? grepping the page for ".42" shows me nothing
<nirved> jackdaniel: if *print-readably* is false, then ~f is not required to print a readable float in all and every case
<nirved> (in my understanding)
<jackdaniel> phoe: Leading zeros are not permitted, except that a single zero digit is output before the decimal point if the printed value is less than one, and this single zero digit is not output at all if w=d+1.
<phoe> Yes, I see.
<jackdaniel> nirved: sure, but the paragraph says "next arg is printed as a float", not a readable float. is 1. a float?
<nirved> jackdaniel: yes and no
<phoe> jackdaniel: are there floats that are non-readable?
<phoe> if not, then "float" and "readable float" mean one and the same thing
amerlyq has joined #lisp
<phoe> and therefore all floats must be readable
<jackdaniel> phoe: I'm only trying to follow nirved. From not readable floats I can think of infinities
<nirved> my bad english, i mean "readable as a float"
atgreen has joined #lisp
<phoe> jackdaniel: AFAIK the CL standard doesn't define infinities
<jackdaniel> nirved: I thought you've built your argument on print-readably, not print-readably-as-a-float ,) that said, why 14. is a float?
<jackdaniel> phoe: but does it forbid them?
<jackdaniel> the question is whether existance of non-readable floats violates the spec, not whether spec defines floats which are not readable
<phoe> jackdaniel: nope, it doesn't forbid them
<jackdaniel> s/is whether/is about/
<jackdaniel> meh, nvm that correction
<nirved> jackdaniel: outside of the standard, when I see 14. it looks more like a float than an integer to me
<phoe> nirved: we're sadly not outside of the standard
<phoe> if someone could review it in a spare while before it gets a chance to be merged then I'd be grateful
<jackdaniel> makes sense. I'd also change the test to check the other case: "~2f ~2f" (1.1 1.9) "1.0 2.0"
<phoe> jackdaniel: added in another commit
<phoe> ...the more I work with the ANSI spec the more tempted I am to revive ultraspec
frgo has joined #lisp
<phoe> maybe later™
notzmv has quit [Ping timeout: 240 seconds]
reepca has quit [Remote host closed the connection]
<phoe> jackdaniel: newlines added.
<jackdaniel> please squash first and third commits
<phoe> jackdaniel: would it be okay to squash all three together?
<phoe> Or would you rather have the 2nd commit separate?
iridioid has joined #lisp
<jackdaniel> I'm indifferent to that
<phoe> If squashing everything is okay, then GitLab is capable of squashing everything on merge - I've selected that option
<phoe> (and I don't need to do anything ;)
iridioid has quit [Ping timeout: 265 seconds]
<phoe> jackdaniel: thanks!
<jackdaniel> sure
edgar-rft has joined #lisp
Harag has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
Kundry_Wag has joined #lisp
cosimone_ has quit [Quit: Terminated!]
<phoe> jackdaniel: (format nil "~0f" 0.01) should similarly be ;=> .0 since we round to 0 decimal digits, correct?
<jackdaniel> yes
Necktwi has quit [Read error: Connection reset by peer]
<jackdaniel> and under arguably incorrect interpretation (format nil "~0,0f" 0.01) will be 0.
scymtym has quit [Ping timeout: 245 seconds]
Necktwi has joined #lisp
<phoe> the last zero is not output if and only if w=d+1
<phoe> but W and D are both zero
<phoe> so obviously this passage does not apply, since 0=0+1 is false (,
<phoe> siiigh
<jackdaniel> I'm not going to argue about that because it is undefined behavior anyway, but in short specifying explicitly d to 0 could be interpreted as printing an integer with a "." in the end
<phoe> why test it if it's undefined
<phoe> should I annotate it with :ansi-spec-problem?
<jackdaniel> hm, or is it defined? I'm not sure at this point.
<phoe> neither am I
<phoe> my mind is full of shredded words from CLHS 22.3.3.1
<phoe> well, following the last part - width is 0, so obviously we print with as many chars as we need
<jackdaniel> depends how you read the first paragraph and if you allow specifying d=0 (explicitly)
<phoe> d is 0, so we round to 0.0
<phoe> but also we are supposed to print 0 decimal digits which is undoable
<phoe> so we need to print the first digit, then the period, then the edge-case 0
warweasle has joined #lisp
<phoe> so I'd argue that 0.0 is consistent with FORMAT.F.45 that we've just battled over
<jackdaniel> or we take that d specified to 0 by the programmer (not by a formatter) is a deliberate action and under the least surprising action principle it is 0.
<phoe> let us suppose (format nil "~3f ~2f ~1f ~0f" 0.0 0.0 0.0 0.0)
<jackdaniel> (of course "." is not correct, so this test should test at least if the result is a number)
<phoe> ~3f is obviously 0.0 and ~2f is obviously .0
<phoe> uh wait a second
<jackdaniel> 0.0 .0 .0 0.
<jackdaniel> no, sorry, 0.0 .0 .0 .0
<jackdaniel> in this case, d is not specified
<phoe> yes, one sec
<phoe> (format nil "~3,0f ~2,0f ~1,0f ~0,0f" 0.0 0.0 0.0 0.0)
<jackdaniel> imo all that should be printed as 0.
<phoe> ~3,0f is " 0.", ~2,0f is "0."
zmv has joined #lisp
<jackdaniel> if we take that d=0 is bogus and we always print a float, then all should be .0. but it is never a single dot character (like in original cmu format implementation)
<jackdaniel> if we take that d=0 is allowed as a deliberate action, then ditto, 0.
<phoe> so basically ~1,0f and ~0,0f are variants of ~2,0f that utilize the "if W is too small then take as many chars as we'd like" clause
<phoe> that is my current line of reasoning
<jackdaniel> n.b format and loop are my least favourite dwim operators in cl
<phoe> inorite
bitmapper has quit []
<phoe> Should we test that (format nil "~3,0f ~2,0f ~1,0f ~0,0f" 0.0 0.0 0.0 0.0) should evaluate to " 0. 0. 0. 0." in ANSI-TEST? Or is that too undefined and should we drop a part of that test?
<jdz> I'm not following this discussion, but I'm pretty sure a number with a dot at the end is used to read a decimal number regardless of the *read-base*.
<phoe> jdz: that is correct
<phoe> and the spec explicitly allows a case of printing floats with a period at the end, so they are NOT readable as floats
manualcrank has joined #lisp
bitmapper has joined #lisp
<jackdaniel> it is unclear whether it should print "0. 0. 0. 0." or ".0 .0 .0 .0"
<jackdaniel> that said it would be enough to check for "~0,0f" if it is either 0. or .0, other cases are not very interesting
<phoe> jackdaniel: this hints for either dropping that test case or annotating it with :ANSI-SPEC-PROBLEM.
<jackdaniel> or modifying it to check for (or "0." ".0") to catch a cmu format bug where "." is printed (and other similar bugs)
<jackdaniel> i.e "0.0" would also be incorrect in this case
<phoe> so it is either .0 or 0.
<phoe> sigh
<phoe> what if we change 0.0 to 0.01 - does the result change anyhow?
ir0nbutt has quit [Quit: Leaving]
dale_ has joined #lisp
dale_ is now known as dale
grewal has quit [Ping timeout: 265 seconds]
grewal has joined #lisp
Inline has joined #lisp
<phoe> no, definitely not today
<phoe> maybe tomorrow
<phoe> my mind has had enough
retropikzel has quit [Quit: Leaving]
<phoe> but
<phoe> (format nil "~2f ~1f ~0f" 0.01 0.01 0.01) should be ".0 .0 .0" for sure, should it not
ravenousmoose has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
ravenousmoose has quit [Ping timeout: 245 seconds]
<jackdaniel> yes, that's not controversial
<jackdaniel> also, I've said that it is either "0." or ".0" - third interpretation is that format signals a condition that d must be (integer 1)
<phoe> jackdaniel: so either 0. or .0 or an error is signaled
<phoe> this behaviour is effectively undefined then
<phoe> I propose to drop this test case
<jackdaniel> no, because we have some clearly invalid behaviors
<jackdaniel> most notably "0.0" and "."
<phoe> so should we just check that the result is not a member of ("0.0" ".")?
<phoe> or that an error is signaled?
<jackdaniel> (or (signals error #1#) (string= #1# ".0") (string= #1# "0."))) is more precise
<jackdaniel> this test could be annotated of course
<phoe> OK
sjl_ has joined #lisp
retropikzel has joined #lisp
bacterio has joined #lisp
vlatkoB has quit [Remote host closed the connection]
vlatkoB has joined #lisp
heisig has quit [Quit: Leaving]
warweasle has quit [Quit: back in a bit]
bitmapper has quit [Ping timeout: 265 seconds]
gxt has quit [Ping timeout: 260 seconds]
rippa has joined #lisp
domovod has joined #lisp
orivej has quit [Ping timeout: 245 seconds]
EvW has joined #lisp
JohnMS_WORK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<phoe> jackdaniel: equivalent partitions? what do you mean?
<phoe> oh, *different*
<phoe> these are the three edge cases that we are testing for
<jackdaniel> equivalence partitioning is finding sets of data which are the same under some criteria
<phoe> ~2f is defined and an edge case, ~1f is a case where W is too small to fit the number, ~0f is a case where W is zero
<phoe> yes, I understand now
<phoe> in theory, ~1f and ~0f belong to the same partition
<jackdaniel> and I believe that all three cases fall in the same partition, so testing all three doesn't seem necessary
<phoe> (format nil "~2f ~1f ~0f" 0.01 0.01 0.01) ;=> ".0 .01 .01" on SBCL
<jackdaniel> that's why I've asked for an explanation /in the review thread/
<phoe> so definitely not the same partition if there are bugs to be found there
<phoe> oh - you want me to comment *there*
<phoe> OK, I'll do that
<jackdaniel> I think that channel participants are tormented enough for today (me included)
Denommus has joined #lisp
<phoe> ;__;
<phoe> sorry
iridioid has joined #lisp
ebrasca has joined #lisp
retropikzel has quit [Quit: Leaving]
bacterio has quit [Read error: Connection reset by peer]
iridioid has quit [Ping timeout: 240 seconds]
makomo has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
wilfredh has joined #lisp
Oladon has joined #lisp
Kundry_Wag has quit [Read error: Connection reset by peer]
Kundry_Wag has joined #lisp
bitmapper has joined #lisp
lxbarbosa has quit [Remote host closed the connection]
Odin- has joined #lisp
bitmapper has quit [Ping timeout: 276 seconds]
<phoe> if everything is correct, then after merging up CCL should fail no more FORMAT.F.* ansi-tests
<phoe> and I will be able to tackle the hellhole that is FORMAT.E.*
<phoe> by then I'll be long banned from #lisp for being obnoxious with float-related spec questions though, so that's nothing to worry about~
<flip214> phoe: we'll find a tent for you in Vienna
Josh_2 has joined #lisp
bitmapper has joined #lisp
nullman has joined #lisp
amerlyq has quit [Quit: amerlyq]
Norimo has joined #lisp
jmercouris has joined #lisp
<luis> Is there some way to retrieve the (:method-combination ...) clause of a generic function? mop:generic-function-method-combination seems to return an opaque object, doesn't it?
<beach> It returns a method-combination metaobject, yes.
<luis> beach: its slots/readers are unspecified aren't they?
<beach> That might be true. The AMOP does not say much about method combinations.
<flip214> wasn't that part of a talk at ELS? perhaps last year?
<flip214> that these parts are not yet accessible?
<beach> The only paper I remember on that subject was by Didier Verna.
<beach> metamodular.com/CLOS-MOP/method-combinations.html
<phoe> is there any MOP extension or CDR that defines the method combination metaobjects?
<phoe> or rather, how can they be accessed?
<beach> I am unaware of anything like that.
retropikzel has joined #lisp
<phoe> sounds like a good place for a portalib
<beach> Indeed.
random-nick has joined #lisp
<luis> It's probably outside closer-to-mop's scope isn't it?
<phoe> yes
<phoe> MOP doesn't touch method combinations, so C2MOP won't touch it either
makomo has quit [Quit: WeeChat 2.4]
EvW has quit [Ping timeout: 245 seconds]
mrcom has joined #lisp
<Bike> they'd need something to be portable over. sbcl method combination objects are quite different from clasp's and i imagine other implementations have their own things going on too.
<beach> Still, they probably all have a the name and arguments available.
entel has joined #lisp
<Bike> maybe. but what would you want to do with method combinations anyway? pretty much the only thing that needs em is compute-effective-method, if i remember correctly
Oladon has quit [Quit: Leaving.]
jmercouris has quit [Remote host closed the connection]
<phoe> method-combination-name, method-combination-arglist
<phoe> the latter needs to return two values - NIL NIL in case of short method combinations and * T in case of long method combinations
abhixec has joined #lisp
Inline has quit [Remote host closed the connection]
<phoe> sounds like a relatively simple portalib to write
Inline has joined #lisp
retropikzel has quit [Quit: Leaving]
random-nick has quit [Ping timeout: 252 seconds]
Inline has quit [Remote host closed the connection]
Inline has joined #lisp
Inline has quit [Max SendQ exceeded]
vibs29 has joined #lisp
vibs29 has left #lisp [#lisp]
Inline has joined #lisp
retropikzel has joined #lisp
Inline has quit [Remote host closed the connection]
zotan_ has quit [Ping timeout: 246 seconds]
Inline has joined #lisp
hhdave has quit [Quit: hhdave]
domovod has quit [Quit: WeeChat 2.6]
random-nick has joined #lisp
brown121407 has quit [Remote host closed the connection]
chip2n has quit [Ping timeout: 276 seconds]
iridioid has joined #lisp
atgreen has quit [Ping timeout: 276 seconds]
eddof13 has joined #lisp
davepdotorg has quit [Remote host closed the connection]
iridioid has quit [Ping timeout: 240 seconds]
m00natic has quit [Remote host closed the connection]
smazga has joined #lisp
refpga has joined #lisp
<refpga> Hi, anybody has experience in setting up a quicklisp dist? I'm trying to load quicklisp-controller package and it complains that "system project-info not found". I can't find this asdf system anywhere.
<Xach> refpga: quicklisp-controller might be heavyweight for getting started and pretty annoying. there are some other dist-creation libraries available
<refpga> Oh
<Xach> https://github.com/orivej/quickdist for example - I think there is something else
<refpga> Thank you
<Xach> refpga: anything missing when loading quicklisp-controller is likely available at github/quicklisp
<refpga> Thanks
<Xach> refpga: what will be in your dist?
<refpga> Personal projects. But really I'm just trying it for now.
<Xach> Sorry for the lack of docs on the topicd
<refpga> Does a dist usually host all the dependencies of it's projects as well?
<Xach> refpga: usually, yes
<Xach> refpga: though that's not a requirement.
abhixec has quit [Remote host closed the connection]
abhixec has joined #lisp
jonatack_ has joined #lisp
<phoe> Xach: what happens if two dists provide the same system? How is the conflict resolved?
<Xach> phoe: there is a numeric priority system. higher number indicates more preferred. default preference value is the universal-time of installation of a dist. can be adjusted at dist, release, or system level.
<phoe> Xach: got it. Thanks.
abhixec has quit [Ping timeout: 240 seconds]
vibs29 has joined #lisp
vibs29 has left #lisp [#lisp]
abhixec has joined #lisp
Norimo has quit [Quit: Norimo]
wilfredh has quit [Quit: Connection closed for inactivity]
Norimo has joined #lisp
easieste has joined #lisp
varjag has joined #lisp
jonatack_ has quit [Quit: jonatack_]
jonatack has joined #lisp
easieste has quit [Ping timeout: 252 seconds]
seok has joined #lisp
iridioid has joined #lisp
iridioid has quit [Ping timeout: 246 seconds]
LiamH has joined #lisp
ravenousmoose has joined #lisp
ggole has quit [Quit: Leaving]
kobain has joined #lisp
kobain has quit [Excess Flood]
kobain has joined #lisp
kobain has quit [Excess Flood]
refpga has quit [Read error: Connection reset by peer]
kobain has joined #lisp
kobain has quit [Excess Flood]
kobain has joined #lisp
dvdmuckle has quit [Quit: Bouncer Surgery]
atgreen has joined #lisp
dvdmuckle has joined #lisp
hiroaki has joined #lisp
<phoe> luis: are there any other needs for method combinations that you'd need? Name and arglist are the only two that come to mind.
Kundry_Wag has quit [Read error: Connection reset by peer]
<phoe> Also, is there any need for #'METHOD-COMBINATION-{NAME,ARGLIST,...?} to be generic?
<Bike> technically you should be able to make your own class or at least subclass method-combination, and make it work by defining a method on compute-effective-method
<Bike> that would be fucking weird to do, though
<Bike> i think a lot of the reason method combinations are underspecified is that define-method-combination is... overspecified? i mean not really, but I genuinely cannot figure out a reason to mess with the mop protocol rather than use define-method-combination
<Bike> which lets you use arbitrary code anyway
orivej has joined #lisp
<phoe> Bike: my reasoning is that if we are able to define method combinations then we should be able to introspect them as well
<phoe> and the method combination name and arglist are sorta the most basic properties of one
<Bike> but the only thing you can do with a method combination is compute an effective method.
<Bike> which there's already a function for, obviously
<Bike> so i don't see what knowing the arguments or whatever gets you really
<phoe> "what is the name of that generic function's method combination?"
<phoe> "what is the argument list of that generic function's method combination?"
Remavas has quit [Ping timeout: 240 seconds]
<Bike> but what can you do with that information?
<Bike> nothing. make another identical method combination, i guess?
<phoe> display it to a curious user
<Bike> define a print-object method on method combinations
<phoe> and put what inside that method
<Bike> i mean the implementation defines one.
<Bike> and it looks like sbcl actually displays both already
<phoe> yes
<Bike> what i'm sayin is the actual mop protocols involve a lot of interactions between different functions and stuff. this is more like function-lambda-expression
<phoe> yes
Kundry_Wag has joined #lisp
oni-on-ion has quit [Ping timeout: 240 seconds]
oni-on-ion has joined #lisp
Kundry_Wag has quit [Ping timeout: 265 seconds]
retropikzel has quit [Quit: Leaving]
sauvin has quit [Read error: Connection reset by peer]
Remavas has joined #lisp
iridioid has joined #lisp
clothespin has joined #lisp
<phoe> luis: I'll back out of writing that library for now. e.g. SBCL doesn't make the method combination's lambda list accessible anywhere.
<phoe> (even though I've tried to hack around it)
gravicappa has quit [Ping timeout: 265 seconds]
eddof13 has quit [Quit: eddof13]
jonatack has quit [Read error: Connection reset by peer]
iridioid has quit [Ping timeout: 276 seconds]
Kundry_Wag has joined #lisp
flak has joined #lisp
failproofshark has joined #lisp
khisanth_ has quit [Ping timeout: 250 seconds]
khisanth_ has joined #lisp
rippa has quit [Ping timeout: 252 seconds]
<phoe> Unless you're okay with just name and arguments.
Kundry_Wag has quit [Remote host closed the connection]
<oni-on-ion> thats what she said
slyrus has joined #lisp
Kundry_Wag has joined #lisp
<phoe> OK
<failproofshark> How would I go about referencing files local to a package? I currently have a project that references a few files local to a package and when I try using it as a depenency it complains that it can't find the files because it's looking for said files in the package that's trying to use it instead of where it actually exists in the package it's trying to depend on
milanj has quit [Quit: This computer has gone to sleep]
slyrus_ has quit [Ping timeout: 265 seconds]
davepdotorg has joined #lisp
scymtym has joined #lisp
<failproofshark> i realize this might not be a common lisp question and perhaps something more specific to asdf. just not sure about it's (perhaps) specific relevancy
<Xach> failproofshark: one option is asdf:system-relative-pathname.
<phoe> failproofshark: can't do it relative to a package, but you can do it relative to an ASDF system
<phoe> Xach mentioned the proper function
<Xach> failproofshark: i like to use *compile-file-truename* and *load-truename* instead sometimes. i don't like asdf functions embedded in my code usually.
<failproofshark> ah ok. i think that's what I might be looking for. it rings a bell. thanks
<failproofshark> understood, ill also look into those
<failproofshark> thanks again ( ^ o ^) /
davepdotorg has quit [Ping timeout: 240 seconds]
refusenick has joined #lisp
<refusenick> Looks like SBCL and CCL can be made to emit WASM now: https://hacks.mozilla.org/2019/11/multi-value-all-the-wasm/
Kundry_Wag has quit [Remote host closed the connection]
clothespin_ has joined #lisp
EvW has joined #lisp
<oni-on-ion> ohh!
failproofshark has quit [Ping timeout: 276 seconds]
Kundry_Wag has joined #lisp
clothespin has quit [Ping timeout: 252 seconds]
abhixec has quit [Ping timeout: 265 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
Kundry_Wag has quit [Remote host closed the connection]
bitmapper has quit [Ping timeout: 265 seconds]
ravenous_ has joined #lisp
* jackdaniel wonders, what makes sbcl and ccl so special that they can
keep_learning has quit [Ping timeout: 252 seconds]
ravenousmoose has quit [Ping timeout: 250 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
eddof13 has joined #lisp
Kundry_Wag has quit [Read error: No route to host]
nanoz has quit [Quit: Leaving]
Kundry_Wag has joined #lisp
atgreen has quit [Ping timeout: 276 seconds]
<p_l> jackdaniel: it was more an issue with wasm that made it hard
<p_l> it could have been worked around, but it's annoying, bug-prone, and significant perf hit
<refusenick> p_l: Wasn't the issue wasm's lacking support for multiple return values?
<p_l> refusenick: yes - and it could have been worked around, pretty sure ECL gets around C's single return too.
<refusenick> Take a look at the link. They added support! Hopefully it goes further than Go's idea of multiple returns.
sbryant has quit [Ping timeout: 246 seconds]
sshirokov has quit [Ping timeout: 240 seconds]
<p_l> yes, it's an extension. We will see how far it goes
<jackdaniel> well, I was poking at this exclusive right for sbcl and ccl to work on wasm
<jackdaniel> and to utilise this m-v-p capability
<p_l> jackdaniel: more like both were not-really-reimplementable sanely with core WASM, unlike some of the other implementations :)
<refusenick> jackdaniel: I've heard that Go has multiple return values (albeit more limited than CL's). Don't quote me on that - I'm not a Gopher.
<jackdaniel> I'm well aware that wasm devs were reluctant to allow multiple returned values (and that scl implementer were advocating cl support)
Norimo has quit [Remote host closed the connection]
<p_l> refusenick: Go does have multiple return values. Not sure if it really differs from multiple values in CL, though
<jackdaniel> refusenick: the gist of my remark was that cmucl, ecl and any lisp which will potentially target wasm can take advantage of that too
iridioid has joined #lisp
<refusenick> jackdaniel: Didn't SBCL subsume CMUCL?
<p_l> refusenick: CMUCL is still alive
<p_l> anyway, I was joking more on the fact that CLISP and ECL didn't need that
arma_ has joined #lisp
<refusenick> I remember someone suggesting reviving CLISP specifically for use with wasm and adding a JIT.
<jackdaniel> refusenick: I think I'm misunderstood, but lets assume it is a lacking in my comunication skills
failproofshark has joined #lisp
<p_l> CLISP is still alive, though dimnished, it never got as bad as GCL
<jackdaniel> n.b clisp is alive, so there is no need to revive it. admittedly it didn't have release for quite a time, but commits flow
<p_l> could do with proper release, tbqh
<p_l> but I'm actually unsure if it's got anyone to make the call?
<jackdaniel> old maintainers are still available for advice on the mailing lisp, new developers are polishing the thing
<jackdaniel> it doesn't mean it won't take another 5y
hiq[m] has quit [*.net *.split]
madage has quit [*.net *.split]
oxford has quit [*.net *.split]
milanj has joined #lisp
iridioid has quit [Ping timeout: 276 seconds]
<p_l> jackdaniel: I think the issue with lack of proper releases, even if very minor ones, is that it's harder to get it to hands of wider group of people
refusenick has left #lisp ["ERC (IRC client for Emacs 26.3)"]
<jackdaniel> sure, but making proper releases requires time. I'm amazed how sbcl releases the thing every month or two - ecl will be soon™ released after, what, 3y of development?
karstensrage has quit [Ping timeout: 240 seconds]
failproofshark has quit [Ping timeout: 265 seconds]
Odin- has quit [Ping timeout: 240 seconds]
<jackdaniel> testing on every platform takes a lot of time, not to mention other issues with releasing software (i.e regressions whatsoever)
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
sbryant has joined #lisp
<jackdaniel> luckily ecl has now two maintainers and a few time-to-time contributors
smazga has quit [Quit: leaving]
gxt has joined #lisp
Kundry_Wag has quit [Ping timeout: 246 seconds]
Kundry_Wag has joined #lisp
oxford has joined #lisp
madage has joined #lisp
jonatack has joined #lisp
Guest50354 has joined #lisp
smazga has joined #lisp
vydd has joined #lisp
gareppa has joined #lisp
techquila has joined #lisp
vydd has quit [Changing host]
vydd has joined #lisp
flak has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
failproofshark has joined #lisp
brettgilio has quit [Ping timeout: 245 seconds]
failproofshark has quit [Ping timeout: 276 seconds]
whiteline_ has joined #lisp
gareppa has quit [Quit: Leaving]
failproofshark has joined #lisp
equwal- has joined #lisp
X-Scale` has joined #lisp
whartung_ has joined #lisp
arma_ has quit [Quit: arma_]
izh_ has joined #lisp
cracauer` has joined #lisp
arma_ has joined #lisp
Ekho has quit [Disconnected by services]
ravenous_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lucasb has joined #lisp
CommanderViral1 has joined #lisp
hiroaki has quit [Ping timeout: 246 seconds]
clothespin__ has joined #lisp
whiteline has quit [Remote host closed the connection]
equwal has quit [Quit: ZNC 1.7.5 - https://znc.in]
CommanderViral has quit [Quit: ZNC 1.7.1+deb1+bionic1 - https://znc.in]
whartung has quit [Read error: Connection reset by peer]
kini has quit [Remote host closed the connection]
X-Scale has quit [Ping timeout: 240 seconds]
vaporatorius has quit [Ping timeout: 240 seconds]
cracauer has quit [Ping timeout: 240 seconds]
equwal- is now known as equwal
whartung_ is now known as whartung
X-Scale` is now known as X-Scale
clothespin_ has quit [Ping timeout: 246 seconds]
kini has joined #lisp
epony has quit [Remote host closed the connection]
Ekho has joined #lisp
epony has joined #lisp
vaporatorius has joined #lisp
vaporatorius has quit [Changing host]
vaporatorius has joined #lisp
xkapastel has joined #lisp
EvW has quit [Ping timeout: 250 seconds]
Xach has quit [Ping timeout: 240 seconds]
Xach has joined #lisp
hiroaki has joined #lisp
mindthelion has joined #lisp
techquila has quit [Ping timeout: 250 seconds]
EvW has joined #lisp
davepdot_ has joined #lisp
rgherdt has left #lisp ["Leaving"]
davepdot_ has quit [Ping timeout: 265 seconds]
Denommus has quit [Remote host closed the connection]
vlatkoB has quit [Remote host closed the connection]
zotan has joined #lisp
patrixl has quit [Read error: Connection reset by peer]
Odin- has joined #lisp
patrixl has joined #lisp
iridioid has joined #lisp
techquila has joined #lisp
mindthelion has quit [Ping timeout: 240 seconds]
zmv has quit [Read error: Connection reset by peer]
iridioid has quit [Ping timeout: 252 seconds]
EvW has quit [Ping timeout: 246 seconds]
random-nick has quit [Ping timeout: 246 seconds]
clothespin_ has joined #lisp
Bike has quit [Quit: Bike]
clothespin__ has quit [Ping timeout: 252 seconds]
phoe has quit [Ping timeout: 246 seconds]
akoana has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
hiroaki has quit [Ping timeout: 246 seconds]
Kundry_Wag has joined #lisp
phoe_ has joined #lisp
<phoe_> luis: I've only tested this on SBCL/CCL/ECL, https://github.com/phoe/trivial-method-combinations
failproofshark has quit [Quit: leaving]
clothespin_ has quit [Ping timeout: 240 seconds]
sjl_ has quit [Ping timeout: 265 seconds]
Kundry_Wag has quit [Ping timeout: 240 seconds]
phoe has joined #lisp
izh_ has quit [Quit: Leaving]
EvW has joined #lisp
clothespin has joined #lisp
varjag has quit [Ping timeout: 252 seconds]
v0|d has quit [Ping timeout: 265 seconds]
Bike has joined #lisp
phoe_ has quit [Remote host closed the connection]
notzmv has joined #lisp
arma_ has quit [Quit: arma_]
varjag has joined #lisp
varjag has quit [Ping timeout: 265 seconds]
iridioid has joined #lisp
Codaraxis has joined #lisp
<luis> phoe_: cool, I've sent you a pull request with an Allegro CL implementation.
<luis> phoe_: are you handling the standard method combinations in method-combination-arglist? (Also, how about calling that method-combination-arguments or method-combination-options, maybe?)
<phoe> luis: no, just long-method-combination.
<phoe> also options and arglist-lambda-list are two different things.
<luis> phoe_: at least in ACL, they're not subclasses of long-method-combination
iridioid has quit [Ping timeout: 240 seconds]
<luis> phoe_: oh, then method-combination-arglist doesn't do what I though it did
<luis> options seems more useful then
<phoe> luis: long-method-combination should be a subclass of standard-method-combination I think
<luis> That doesn't sound rigt.
<phoe> wait a second
<phoe> gah
<phoe> for a second I thought that standard-method-combination was a MOP term
<luis> phoe: maybe it is
<phoe> no, it isn't
Kundry_Wag has joined #lisp
<phoe> it is an ANSI CL term
<phoe> you are correct, the sh-m-c, l-m-c, and st-m-c seem to be distinct
davepdotorg has joined #lisp
<phoe> luis: please file issues on that one to include standard-method-combinations in the algorithms and to add #'method-combination-options
<phoe> I'll fix that up tomorrow
<luis> phoe: no, /you're/ right. :D (typep #<EXCL::LONG-METHOD-COMBINATION @ #x2063d5942> 'excl::standard-method-combination) => t
<phoe> wtf
<phoe> it is too late for me to be doing lisp
<phoe> good night, I'll read up the log and the issues tomorrow
<luis> Likewise. Let's try again tomorrow.
davepdotorg has quit [Ping timeout: 240 seconds]