freenode/#lisp - IRC Chatlog
Search
13:53:22
Bike
the more stuff like this the more uncomputable type operations get. lips's starts out more uncomputable than most, but still
13:55:17
Bike
for example if you defined foo to have type (forall x (function (x) (cons t x))), then did (loop until (condition) do (setf x (foo x))), inferring the type of x afterward would be kind of a journey, and you'd probably need something to give up and pick cons
13:57:49
Bike
jackdaniel: i mean in this case the idea would be defining multiple input output relationships, since CL already lets you describe one relationship overall
14:00:34
jackdaniel
regarding arg-types -> result-type I'm sure it would be possible to add something for non-standard generic functions, but that would be limited to classes -- imho a good thing
14:01:08
Bike
well in this case it wouldn't have any semantic effect, just be information for the compiler to use
14:02:25
trittweiler
There's define-api in named-readtables which expands to an ftype declaim for the functions exported from the package. (With a nicer syntax, in my opinion, because it takes the type signature separately instead of convoluting it into the parameter list.) The ftype declaration is nice because it lets sbcl often find type mismatched on compile-time.
14:02:29
jackdaniel
but then you'd either need to check the resulting type anyway or trust it foolhardily (like with invalid declarations)
14:03:15
Bike
yeah but that's true with any type declaration. this would just let you get more specific declarations, hopefully
14:56:20
pjb
ebrasca: optimizing compilers already transform (* 3 x x) into (let ((reg (* x x))) (+ reg reg reg)) !!!
14:56:49
pjb
ebrasca: try it in sbcl, I wouldn't be surprised that both (* 3 x x) and (+ (* x x) (* x x) (* x x)) compile to the same thing.
15:01:26
jackdaniel
or if you hire a person to rewrite the code, in this spirit we could say that any compiler optimizes anything into whatever, because it may be rewritten by some tool or a person ,)
15:02:18
jackdaniel
I wouldn't split that hair in four but some people do it a lot, so I thought I'll join the party
15:12:09
jackdaniel
I don't think that quicklisp is a sane requirement for testing gcc optimizations (also ditto, "in this spirit we could…")
15:13:53
pjb
jackdaniel: use the lisp REPL as a shell! No choice anyways, chsh /usr/local/bin/ccl has been done.
15:15:25
jackdaniel
^ completely fails as the argument for the thing discussed (a is b because c, but hey, you may z) - I had my share of entertainment, see you \o
15:16:05
pjb
jackdaniel: I demonstrated that gcc has no problem compiling (* 3 x x) if you use linc as pre-processor!
15:16:49
pjb
jackdaniel: and as the maintainer of ecl, you should be ashamed of your objection, since ecl compiles (* 3 x x) with gcc!!!
15:45:08
PuercoPope
jasom: One of the main problems I've encountered with JSCL is that it needs 'run-time' support for mapping CL objects to the semantics of JS. You mentioned the numeric tower, bit-vectors also come to mind. Given that wasm can also export functions to the host (JS in the case of browsers), what do you think of using wasm to implement things like integer arithmetic and have JSCL rely on them?
16:33:14
reepca
Is there a way for initforms in DEFSTRUCT to refer to each other? For example, I've got a queue struct and it needs the tail to initially be the head, and the head to initially be a fresh cons cell
16:35:00
Shinmera
you can use the :constructor and make the tail be &optional, referring to the head.
17:15:48
jackdaniel
pjb: essentially what you say is falsehood, A + B = B; where A is not 0 (licn + gcc = gcc), so it doesn't, well, add up. when you take everything verbatim at least make your claims logical
19:17:40
jasom
PuercoPope: that's fairly reasonable, as is having JSCL compile to an IR and have WASM interpret the IR.
19:23:35
PuercoPope
jasom: The 'IR' (or would AST be more accurate) is fairly close to JS and depends on having its data-types. Don't think it would be easy to write a wasm interpreter for that
1:11:01
equwal
I was able to hack together a build script for these font variants in a few hours, whereas I have no idea how I would have done it without Roswell.
1:42:30
_death
I think a script should be two forms: load the system, apply a function with command line args.. the rest belongs in the system, which can be depended upon by other lisp code