freenode/lisp - IRC Chatlog
Search
11:39:18
ym
Can't find mention of ChrysaLisp in logs. Wasn't discussed yet or I'm doing something wrong?
11:45:27
no-defun-allowed
https://github.com/vygr/ChrysaLisp/blob/master/apps/films/app.lisp This indentation scares me.
11:46:15
ck_
loading cl-async through quicklisp fails with "#:libuv-grovel is unbound" -- is that expected?
11:55:07
ym
no-defun-allowed, yes, but I'm more interested in bare-metal implementations. Mezzano seems cool though.
11:58:33
no-defun-allowed
It runs on an x86_64 machine, the only non Lisp part being the bootloader.
12:02:07
no-defun-allowed
And the CADR runs Lisp Machine Lisp, which is not awfully far from Common Lisp as things go.
12:04:41
ym
CADR is for retro fanboys. Variation of RISC-V and SBCL optimized for each other - that's perfect case.
12:10:29
no-defun-allowed
So you want a C machine that has been adjusted slightly to run SBCL, which in turn is adjusted to run on that C machine better?
12:12:10
no-defun-allowed
Maybe I am too pessimistic, but if I was able to fab my own processor, I would definitely have it run a more Lisp-friendly instruction set.
12:12:29
no-defun-allowed
And I am never going to be able to fab my own processor, so we have to settle on running Lisp well on C machines.
12:19:40
jackdaniel
praise the stock hardware: it gives you a reasonable price which individual can afford with good performance disregarding the language you chose
12:22:07
no-defun-allowed
It wouldn't be anywhere close to a proper fab job in terms of efficiency or performance.
12:24:52
aap
there's a project to make a reincarnation of the lambda that executes macrocode directly from C instead of emulating the microcode
12:25:09
aap
once that is running lisp code, maybe the macrocode could be executed directly from an fpga perhaps
12:33:16
jackdaniel
behold the prophecy: one day we'll have stock hardware with powerful fpga boards being their peripherals (similar to zynq) and we'll synthesize hardware at real time
15:46:18
gendl
ACTION shoutout to Roswell and SBCL. I've been developing an elaborate thing for the past 6 months or so exclusively on Allegro and CCL. Tomorrow I'm talking to a firm who is already an SBCL shop and may have a use for our stuff. So
15:47:44
gendl
So I proceeded to do 'brew install roswell', 'ros install sbcl', added the newly installed 1.5.6 to my slime-lisp-implementations, and 5 minutes later my thing is up and running under SBCL, no changes, no visible diffferences (knock wood).
15:50:04
gendl
I even did (setf (readtable-case *readtable*) :invert), so everything looks the same as in Allegro in modern-mode (maybe I should start doing the same thing in Allegro and ditching modern-mode, although I have to see if abandoning modern-mode support would break any of our stuff for the few people who i think are using it under modern-mode )...
17:23:27
mfiano
If I supply the initargs argument to CHANGE-CLASS with an initarg not present in the target class, but instead defined by an initialize-instance :after method, it fails with "Invalid initialization argument" on SBCL. I could do (apply #'change-class instance class :allow-other-keys t initargs), but also, initialize-instance is never called. Do I have to explicitly call initialize-instance as well?
17:25:02
Bike
if you want the method to happen both on initialization and change-class it should be on shared-initialize.
17:26:38
mfiano
No I mean this code in general. I'm using the MOP to plug in topologically sorted mixin classes into a progn/most-specific-last protocol
17:32:04
mfiano
I've actually never used shared-initialize before. In this case, what should the slot-names argument be?
17:35:18
mfiano
In this case, I'm defining additional initargs for make-instance/change-class with the keyword arguments, and I will be setting slot values using them.
17:35:21
Bike
the thing to understand about initialization is that the primary method on make-instance is (initialize-instance (allocate-instance class ...initargs) ...initargs), and the primary method on initialize-instance is (shared-initialize instance t ...initargs), i.e. initialize-instance doesn't actually do anything by itself
17:36:31
Bike
with change-class the slot-names argument will be a list of the slot names added by the new class. meaning that you're not supposed to touch the existing slots.
17:40:59
mfiano
How does reinitialize-instance come into play? I do have a reinitialize-instance method defined for 1 class that I may change an instance to, and would like this called too.
17:41:59
Bike
in that case the list of slot-names will be nil, so you're not supposed to update any slots that don't have an initarg
17:42:14
Bike
sorry, i explained that poorly before, the list of slot names is the ones you're not supposed to touch if there's no initarg.
17:42:25
Bike
if there is an initarg you do change the slot because it's been explicitly given a new value
17:43:22
Bike
so for example if you have an instance with a slot that's unbound, initialize-instance will give that slot a value from the initform, but reinitialize-instance will not
17:45:38
Bike
if you redefine the class, shared-initialize will also be called, by update-instance-for-redefined-class. may or may not be relevant
17:48:05
mfiano
I normally use an :after method for initialize-instance for this type of thing. With shared-initialize does that still make sense?
17:49:08
Bike
initialize-instance methods make sense when you want something to happen only during initialization (like through make-instance) but not other times (change-class, reinitialize-instance, make-instances-obsolete)
18:28:48
Xach
before when i was interactively kicking off builds, cutting the time down made a huge difference
18:31:05
Xach
I'd still like to pursue it. It would be nice to come up with a system that I could run on e.g. 100 cloud servers and complete in 5 minutes or something.
18:33:53
srji
I am trying to extract elements from a sequence and want to copy them to a new list. https://gitlab.com/snippets/1896440
18:35:38
ck_
Xach: well, its about to be the season for more indoor activities. maybe you will be coerced into continuing .. by snow for example
18:36:18
Xach
ck_: it's possible but that is also the best time to harvest trees for firewood and lumber - less sap to dry later.
20:02:34
thijso
I'm looking for a system/library to facilitate kind of a disk-backed memory store. Something that saves the data to disk regularly, but a little loss is acceptable. Is there something like that for Lisp already? Might cl-prevalence be a good fit? Ubiquitous looks kinda like something also, except it's documentation is about persistent _configuration_ storage. Any other suggestions?
20:03:18
thijso
I'm thinking I might just start out with plists (or maybe a hash) and just serialize that to disk with alexandria or something.
20:40:54
thijso
In the case that the id's are strings, is it better to use an eql hash or coerce the strings into keys (with intern)? Or is it basically the same difference? Or third option?
20:45:48
saturn2
interned symbols don't get garbage collected, so don't use them unless you want them to stick around forever
21:34:15
White_Flame
you can manually intern your keys using a separate string->self equal hashtable first, then your main content will have eq strings
21:54:18
thijso
Have a separate hashtable mapping the "string keys" to something else, is that what you mean?
21:55:21
White_Flame
yes, map "foo" => "foo", in a #'EQUAL hashtable. Then when you do (gethash "foo" *table*), it'll return the exact same "foo" string instance, which can be then eq compared in a table, without converting it to a symbol
21:55:49
pjb
That said, it all depends on the speed of the hash function, which should be O(1) fast anyways. So using an equal hash table should not be significantly slower than using an eq hash table.
21:56:53
White_Flame
again, it all depends on where you want the cpu to spend time, if this is an optimization issue
21:57:15
White_Flame
and depending on what you're doing, it might be advantageous to keep the data as a string
22:00:01
thijso
I'll have to look into that map "foo" => "foo" trick later, because it's late here and I'm getting a 'does-not-compute' error in my head atm... ;)
22:28:12
White_Flame
thijso: there may be many string instances of "foo". however, the one that is the value in that hashtable is the "canonical" one. by always looking up your string in that hashtable and only using the value from there (lazily adding to it if the key isn't found), you basically intern your strings to EQ-able instances