Search
Thursday, 17th of October 2019, 16:09:55 UTC
16:14:11
jackdaniel
I'm sure there are plenty of people who would love to drink your wine ;-) happy birthday! I wish you the best possible progress with your LispOS work :-)
16:16:02
beach
It was some time ago, but it was an important one, namely my last power of 2.
16:18:28
jackdaniel
ACTION tries to judge whether in beach's culture a joke "256 is definetely in your reach" would be a funny one or implying age of 128 and making jokes about death would be rude
16:19:35
ioa
late happy birthday from me too!
16:20:16
beach
jackdaniel: I can handle jokes.
16:20:38
jackdaniel
of course, I wonder if you'd appreciate that kind of joke or just frown at it
16:20:55
beach
You would have to try it out. :)
16:21:18
jackdaniel
heh, I'll wait for the next power of 2 ;)
16:21:46
ioa
beach: you should probably bring the wine to the ELS2020, I don't think we'll be able to afford anything in switzerland, lol :)
16:22:34
jackdaniel
I can think about another joke, that given the number of lispers splitting wine between three people is not that bad
16:25:00
beach
I need to go fix dinner. I might check in a bit later. If not, I'll be back tomorrow morning.
23:01:10
alandipert
quasiquote is go! reading how elector does it was really helpful, thanks https://tmp-alandipert.s3.amazonaws.com/Screen+Shot+2019-10-17+at+3.58.16+PM.png
3:40:49
beach
Good morning everyone!
3:42:15
beach
alandipert: Congratulations!
3:43:02
no-defun-allowed
Good morning beach!
4:00:47
beach
I need to figure out the implementation of CLASS-OF and TYPEP. The two are intimately related.
4:01:11
beach
CLASS-OF should work as follows:
4:01:58
beach
It should check whether the object is one with a special tag, such as FIXNUM, CHARACTER, SINGLE-FLOAT, or CONS.
4:02:21
beach
If it is one of those, call FIND-CLASS on the class name, or something similar.
4:02:36
beach
If not, it is a general instance, and the class object is found in the header.
4:03:08
beach
So now the question is, how does the code for CLASS-OF look?
4:04:21
beach
There are standard functions CHARACTERP and CONSP, but no such thing for FIXNUM or SINGLE-FLOAT.
4:04:41
beach
We could invent them, of course, and stick them in the package for numbers.
4:05:23
beach
So how do we implement FIXNUMP?
4:06:11
beach
We would like for all these types to be worked on by the type inferencer. So they should result in a TYPEQ-INSTRUCTION.
4:06:46
beach
We *could* write (defun fixnump (object) (cleavir-primop:typeq object fixnum))
4:07:24
beach
But I would rather write (defun fixnump (object) (typep object 'fixnum)).
4:07:38
beach
However, then we have to be careful with infinite computations.
4:08:08
beach
First, we need a compiler macro on TYPEP that turns it into a TYPEQ when the type descriptor is a constant.
Friday, 18th of October 2019, 4:09:55 UTC