freenode/#lisp - IRC Chatlog
Search
21:37:55
aeth
:type in defstruct is a lot more widely respected than :type in defclass, and is probably more optimizable where it is respected
0:13:04
mfiano
I would like to write a macro that allows specifying types for each argument, so that I can include an ftype declaration in the expansion. Can you give me some pointers on how to use your library to do that? :)
0:14:59
Bike
i can't recommend using that library, i think it's better to use an actual parser with a grammar. i don't know if there are other independent parsers though. i know sicl has one
0:16:23
mfiano
Ha fair enough. I really don't want to parse a lambda list myself. My library is in disrepair right now ever since I ripped out the defstar library due to being GPLv3.
0:16:52
mfiano
There doesn't seem to be many choices here to just add typed arguments to a defun wrapper
3:08:29
loke
pjb: Right, but in the discussion I had the person was arguing that the object orientation in Objective C was somehow fundamentally different from that of, say, Java because it's “message passing”.
3:18:27
aeth
It's harder than it looks in edge cases. I don't currently have typed keyword/optional/rest, for instance. I'll probably copy the syntax from pillton's specialization-store there. Similar syntax already, except I don't provide a return type
3:19:25
aeth
My return-type will probably be in a keyword argument to the name-and-options instead of its own field after the lambda-list like in specialization-store because I rarely need it
3:20:56
mfiano
and typed-args can be any OLL arguments aside &aux, because I'm lazy and never use them
3:22:18
White_Flame
loke: wikipedia says the major difference is that the target method is determined at runtime by the object's code, instead of at compile-time. So that's a bit more CLOSsy, in the runtime aspect
3:22:50
aeth
specialization-store is (name-and-options typed-lambda-list result-type &body body) and mine is (name-and-options typed-lambda-list &body body)
3:26:21
aeth
All that's really missing is a defmethod that supports inline and classes for keyword/optional (which iirc are not supported, possibly because of the ambiguity in a straightforward attempt)
3:34:15
proshlo
I'd like to write a Common Lisp interpreter on a graphing calculator so I can use Macsyma on it. Where should I start? I have an almost-finished Scheme interpreter in C++. Do I add special forms to make it a Lisp-2 and add defmacro facilities to bootstrap the rest? Should I go off the Clisp source code instead?
3:36:47
aeth
Graphing calculators are essentially identical to how they were 15+ years ago, stuck in time, afaik
3:37:40
aeth
Well, you can't have a significantly better one because they're mostly used on standardized tests or in classrooms.
3:37:43
proshlo
aeth: I think the most powerful version of the TI-84s has a 15mhz CPU and 24mB of ram.
3:37:46
Bike
proshlo: i mean, a lisp interpreter isn't really much harder than a scheme interpreter. having actual library functions is more work than the basic "if you type Z that evaluates to Y" stuff.
3:37:55
blep-on-external
i'm not saying get it from arxiv, but get it from arxiv and say if it's any good
3:37:57
White_Flame
proshlo: Scheme was intended as a minimalist language. Continuations can be kinda confusing, but would be a lot easier to implement in an interpreter than in a compiler
3:38:28
Bike
i also thought modern graphing calculators had some basic CAS in them. i know mine does
3:40:38
proshlo
loke: yeah Bike: Mine can do numerical integration, but not symbolic. I'd like to have that because Calc II is hard. :)
3:43:45
loke
the HP-58 language was stack based. So { X DUP MULT } was a list of three symbols, or a program that squares X
3:44:50
aeth
And it's an old enough app that it doesn't have ads or microtransactions or other nonsense! (I don't think I would have found it in today's Android.)
3:45:09
loke
Me and a friend implemented LISP-EVAL on the hp48. It wasn't much code, and it gave us Lisp.
3:45:24
aeth
loke: Do you still have the program? It would be interesting to see if it runs in Droid 48
3:45:55
loke
aeth: LISP-EVAL? No... we wrote it on the actual device, and lost the code before we could save it.
3:47:31
loke
One interesting aspect of the HP-48 language is if A contains the symbol B, and B contains the symbol C, then evaluating A results in C.
5:52:22
makomo
i just found parse-macro-lambda-list, but i'm interested in the one using a proper grammar and an early parser
7:33:23
beach
Murii_: ↑ Notice how it says that CAR is an "accessor". That means you can use it with SETF as I showed.
8:46:51
aeth
car is old enough that there's also another, legacy way. rplaca. yeah, use (setf (car x) 42) instead of (replaca x 42)
8:51:43
shka_
easy to remember because order is the same as argument list to setf-at-something functions
9:05:02
aeth
but I guess Lisp is proof that everything in software bloats into something way past its original purpose
9:09:03
pjb
Funny to use the music of Blade Runner in this clip. In Blade Runner, space didn't go beyond the solar system!