freenode/lisp - IRC Chatlog
Search
14:30:34
phoe
jackdaniel: (format nil "~0f" 0.01) should similarly be ;=> .0 since we round to 0 decimal digits, correct?
14:36:01
jackdaniel
and under arguably incorrect interpretation (format nil "~0,0f" 0.01) will be 0.
14:40:27
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
14:42:40
phoe
well, following the last part - width is 0, so obviously we print with as many chars as we need
14:42:41
jackdaniel
depends how you read the first paragraph and if you allow specifying d=0 (explicitly)
14:44:13
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.
14:45:06
jackdaniel
(of course "." is not correct, so this test should test at least if the result is a number)
14:47:40
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)
14:48:16
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
14:53:48
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?
14:54:31
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*.
14:55:08
phoe
and the spec explicitly allows a case of printing floats with a period at the end, so they are NOT readable as floats
14:56:59
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
14:57:58
phoe
jackdaniel: this hints for either dropping that test case or annotating it with :ANSI-SPEC-PROBLEM.
14:58:32
jackdaniel
or modifying it to check for (or "0." ".0") to catch a cmu format bug where "." is printed (and other similar bugs)
15:12:20
phoe
(format nil "~2f ~1f ~0f" 0.01 0.01 0.01) should be ".0 .0 .0" for sure, should it not
15:17:56
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)
15:46:46
jackdaniel
equivalence partitioning is finding sets of data which are the same under some criteria
15:46:48
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
15:47:07
jackdaniel
and I believe that all three cases fall in the same partition, so testing all three doesn't seem necessary
16:22:43
phoe
if everything is correct, then after merging up CCL should fail no more FORMAT.F.* ansi-tests
16:24:00
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~
16:48:19
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?
17:14:11
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.
17:17:25
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
17:20:48
phoe
the latter needs to return two values - NIL NIL in case of short method combinations and * T in case of long method combinations
18:00:16
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.
18:01:45
Xach
refpga: quicklisp-controller might be heavyweight for getting started and pretty annoying. there are some other dist-creation libraries available
18:02:28
Xach
refpga: anything missing when loading quicklisp-controller is likely available at github/quicklisp
18:09:15
phoe
Xach: what happens if two dists provide the same system? How is the conflict resolved?
18:09:47
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.
18:58:25
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.
19:04:28
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
19:05:15
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
19:10:43
phoe
Bike: my reasoning is that if we are able to define method combinations then we should be able to introspect them as well
19:11:00
phoe
and the method combination name and arglist are sorta the most basic properties of one
19:11:34
Bike
but the only thing you can do with a method combination is compute an effective method.
19:16:54
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
19:29:21
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.
19:43:43
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
19:46:16
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
19:47:03
phoe
failproofshark: can't do it relative to a package, but you can do it relative to an ASDF system
19:47:15
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.
19:51:24
refusenick
Looks like SBCL and CCL can be made to emit WASM now: https://hacks.mozilla.org/2019/11/multi-value-all-the-wasm/
20:15:19
p_l
it could have been worked around, but it's annoying, bug-prone, and significant perf hit
20:18:33
p_l
refusenick: yes - and it could have been worked around, pretty sure ECL gets around C's single return too.
20:19:11
refusenick
Take a look at the link. They added support! Hopefully it goes further than Go's idea of multiple returns.
20:20:16
p_l
jackdaniel: more like both were not-really-reimplementable sanely with core WASM, unlike some of the other implementations :)
20:20:24
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.
20:20:27
jackdaniel
I'm well aware that wasm devs were reluctant to allow multiple returned values (and that scl implementer were advocating cl support)
20:21:19
p_l
refusenick: Go does have multiple return values. Not sure if it really differs from multiple values in CL, though
20:22:11
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
20:23:55
refusenick
I remember someone suggesting reviving CLISP specifically for use with wasm and adding a JIT.
20:24:05
jackdaniel
refusenick: I think I'm misunderstood, but lets assume it is a lacking in my comunication skills
20:24:40
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
20:26:16
jackdaniel
old maintainers are still available for advice on the mailing lisp, new developers are polishing the thing
20:27:48
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
20:28:44
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?
20:29:25
jackdaniel
testing on every platform takes a lot of time, not to mention other issues with releasing software (i.e regressions whatsoever)
22:42:42
phoe_
luis: I've only tested this on SBCL/CCL/ECL, https://github.com/phoe/trivial-method-combinations
23:43:17
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?)
23:44:49
phoe
luis: long-method-combination should be a subclass of standard-method-combination I think
23:47:08
phoe
luis: please file issues on that one to include standard-method-combinations in the algorithms and to add #'method-combination-options
23:47:27
luis
phoe: no, /you're/ right. :D (typep #<EXCL::LONG-METHOD-COMBINATION @ #x2063d5942> 'excl::standard-method-combination) => t
0:42:51
|3b|
cl-opengl users please test the branch at https://github.com/3b/cl-opengl/tree/enum-groups2 and see if it breaks any of your code
1:35:16
aeth
Firefox copy and paste has, well, it takes a second before it registers for some reason
1:35:38
aeth
(the other link was to prove in another channel that Valve can in fact release more than 3 games in a series)
1:37:22
aeth
ScaredySquirrel: http://www.gigamonkeys.com/book/ is generally the recommended introduction to CL book but there are many books. https://cliki.net/Lisp%20books
1:37:36
aeth
ScaredySquirrel: The other one, if you have no programming experience, is https://www.cs.cmu.edu/~dst/LispBook/ iirc
1:38:11
aeth
There are other introduction books but they're not available for free online and aren't as universally well-received