freenode/#lisp - IRC Chatlog
Search
18:23:08
Bike
oh, true that it's bogus in that it won't work if the condition evaluates to non-nil but non-T, though
18:24:31
jcowan
The Scheme standard basis set at runtime is variable reference, implicit function call, literals (including quote), if, setq, lambda. This is thought to be minimal, but I know of no proof. Outside runtime are macrolet, defpackage, and include (as in C).
18:26:20
Bike
well, if that's on the table, (defvar *aux* (vector nil (lambda (x y) (funcall x)) nil (lambda (x y) (funcall y))) (defmacro if (condition then &optional (else ''nil)) `(funcall (svref *aux* (length (string (not (not ,condition))))) ...))
18:29:25
Bike
http://okmij.org/ftp/Scheme/quote-as-macro.txt here's the quote as macro i was thinking about
18:35:13
Bike
i mean, (eval #(...)) returns immediately, right? so you could just macroexpand (quote #(...)) to #(...)
18:40:11
_death
in that same comment about the mote datatype, Steele remarks: "For example, I might extend my Common Lisp to evaluate a vector by evaluating its elements in parallel and returning the value of just one of them (implemented by choosing the value of whichever one finishes first)."
18:40:45
jcowan
he was much concerned with parallelism in those days: see the xapping example imn cltl
18:41:20
Bike
or fortress, but i guess that continues the "this might be a dumb way to denote a perfectly fine concept" concern
18:45:56
pjb
jcowan: () is a symbol, which is declared as a constant variable, whose value is CL:NIL when evaluating CL:NIL it's a symbol, which is declared as ac onstant variable, whose value is CL:NIL. Therefore the result is CL:NIL!
18:47:42
_death
the message is https://cl-su-ai.cddddr.org/msg02850.html btw.. more about portable code walkers
18:49:15
jcowan
When I wrote a Lisp interpreter long ago, the undefined-function-name logic checked to see if the name matched /c[ad]*r/ and emulated it on the spot
18:49:17
jmercouris
it doesn't mean I don't end up drawing little diagrams to figure out what it is doing
18:49:45
Bike
in modern CL objects other than symbols and conses are self evaluating, so the kind of extension steele talks about there is not possible
18:50:35
Bike
"A form that is neither a symbol nor a cons is defined to be a self-evaluating object. Evaluating such an object yields the same object as a result. "
18:51:02
_death
Bike: but the potential number thing is still possible.. hardcoding IPs and magic numbers in code looks fun
18:51:41
Bike
as far as i know, printability has no impact on evaluability at all, which seems sensible to me
18:51:43
jmercouris
are you telling me that the definition of self-evaluation means only returning the identity?
18:52:17
jmercouris
i just assumed self-evaluation meant that the object itself is a function which returns something
18:52:44
Bike
Sure, it's possible to imagine a world in which eval is a generic function and you can put methods on it, for example.
18:54:15
jmercouris
the only idea that made me consider it is the idea that behind self-evaluation, must be evaluation
18:54:49
alandipert
i understand lazy evaluation in other languages as something like Bike's idea of eval as generic,and conditional operators are specializations
18:55:05
Bike
well, i mean. eval is just a function. if eval had no behavior specified it wouldn't be a very easy to use function.
18:55:33
jcowan
Bike: your quote says "A form" not "An object", so I think evaluating an object that is not a form is undefined behavior
18:55:35
alandipert
i think maybe our understanding is similar, to the extent that a function is a kind fo stored sexp
18:57:31
jcowan
alas the definition of "evaluate" and "form" in the glossary are mutually recursive, but it definitely does not say that all objects are forms.
18:58:25
Bike
by the way, the generic eval thing i heard of here: https://www.piumarta.com/software/maru/ never heard of it elsewhere
18:59:39
Bike
the issue where they changed the non-cons-symbol evaluation behavior mentions having to quote vectors
19:00:18
jcowan
But you'd be surprised how common circularity is in even professionally produced language dictionaries.
19:00:59
Bike
i don't think i would be. CL is the language where prog2 returns the first value, after all
19:02:34
jcowan
jmercouris: No, a form is a symbol, compound form (non-empty list), or self-evaluating object (any object but a symbol or cons), so all forms are objects and vice versa
19:03:47
_death
jmercouris: personally I don't mind calling (1 2 3) a form, unless the context requires the distinction
19:04:55
jcowan
It isn't a form in the first sense ("object meant to be evaluated") because it obviously isn't, but it is a form in the second sense.
19:06:37
jcowan
General dictionaries (not like the CL glossary) are constantly hovering between circularity and "word not in" (a word is used in a definition but not defined). The two are incompatible in principle, but you want to minimize a weighted sum of the two
19:07:43
jmercouris
i wonder if you could make a dictionary starting from a single definition from which all are built
19:08:56
Bike
take fifty thousand pages to show that in at least some cases, a circle has an inside and an outside
19:10:05
Bike
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.374.4778&rep=rep1&type=pdf little old now, but
19:52:15
phoe
21:02 < jcowan> jmercouris: No, a form is a symbol, compound form (non-empty list), or self-evaluating object (any object but a symbol or cons), so all forms are objects and vice versa
19:53:09
phoe
no, a compound form must be: "a non-empty list which is a form: a special form, a lambda form, a macro form, or a function form."
20:13:53
_death
Load Symbol Character.. although it should really be LDC - LoaD Character and take string designators
21:30:55
samlamamma
Everyone knows that (+ "hello " "world") equals (+ "world" "hello "), I see no issue with this
21:42:48
samlamamma
Today I did not write a single line of code, but at least I discovered /r/lispmemes.
21:47:01
_death
if + is not necessarily associative, why be strict about commutativity? (= (+ (+ 0.1d0 0.2d0) 0.3d0) (+ 0.1d0 (+ 0.2d0 0.3d0))) ;)
22:06:43
jcowan
That's the way IEEE floats work: 2-argument + is commutative, but 3-arg + is not associative
22:12:07
jcowan
so we have established that (1 2 3) is not a form, and that (eval (1 2 3)) is undefined behavior, yes?
22:32:52
Bike
i think there was a way to get the bot to look up glossary entries, but i don't remember it
22:32:55
specbot
To use the specbot bot, say something like "database term", where database can be: clhs lp mop.
22:33:30
jcowan
no datum entry; object entry defines it as "datum", and also gives a contextual definition of "a foo object"
22:40:20
jcowan
datum in NL means date in EN, and very unfortunately indeed Daten in DE means both dates and data (as pl. of datum)
22:51:09
jcowan
a friend of mine from Texas but been working IT in Germany for decades tells his crew to say Datumswerte instead
23:00:21
jcowan
_death: Google Translate says Boolescher Wert, which I assume is pronounced "buhlscher"
23:02:56
Bike
this paper uses algol notation, which i don't understand, in order to explain the Plankalkül notation i also don't understand. pretty nice
23:07:48
jcowan
so a perfect hybrid of English root pronounced Englishly and German affix pronounced Germanwise
23:10:54
aeth
Is there a CLobol Cobol-in-CL and if not, why did they miss the opportunity to use that name?
23:27:55
aeth
If we're going to go down that route we might as well shut everything down except for ##javascript
23:52:29
jcowan
I don't see any CL-to-JS that's even close to complete in "language features" as opposed to "library features"
23:55:01
aeth
You can't really have something that's both efficient and a conforming CL in JS because the languages are just too different.
23:58:42
jasom
the biggest one being that you can't just dynamically generate assembly and then call it (which most traditional lisps do)
23:58:49
Bike
i think t hey still haven't implemented exceptions and it looks like they've decided to go with C++ style ones, which I can tell you from experience are an enormous pain in the ass to reconcile with lisp nonlocal control flow.
0:17:49
no-defun-allowed
All I know of is cl-javascript, which might be a bit dead, and doesn't run as fast as the JITting implementations.
1:31:18
matzy_
i can set up the acceptor just fine, and even give it a document root, but i can't figure out how to hit even the simplest route
1:36:17
matzy_
should be super simple, a GET route at localhost:4444 (port i set it to in the acceptor), 127.0.0.1:4444/foo?a=Bob
1:38:08
no-defun-allowed
And did you start Hunchentoot with an instance of easy-routes:routes-acceptor?
1:38:46
matzy_
(defvar *my-acceptor* (make-instance 'easy-routes:easy-routes-acceptor :port 4444 :document-root #p"www/"))
1:40:44
matzy_
like i feel i'm just missing something here. i work with APIs written in (far less interesting) languages everyday
2:01:56
pjb
White_Flame: (loop for test in '( nil (f o o) ) collect (format nil "(~{~A~^ ~})" test)) #| --> ("()" "(f o o)") |#