freenode/#lisp - IRC Chatlog
Search
6:37:12
v0|d
beach: is there a way to make a very tiny lisp image that removes all the unused functions removed?
6:38:20
v0|d
I mean, GHC can actually compile programs to a small binary w/o repls or anything but a main().
6:40:19
Shinmera
it's called tree-shaking. Most implementations don't offer it because people have plenty of RAM and disk space now.
6:41:36
aeth
I think one problem is that large Lisp programs will probably use most of the language, especially if they're using dependencies that can be very stylistically different from each other.
6:42:06
edgar-rft
it sounds easier than it is because you need to remove all unused implementation-internals, too
6:42:22
aeth
Right, the implementation internals might also use stuff like e.g. structure-objects even if you don't use any
6:52:35
edgar-rft
v0|d: how so what? tree shaking implementation internals or writing a micro assembler
6:55:12
edgar-rft
every ANSI CL function must be defined from something. This "something" must be removed from the final binary, too. What "something" is depends on the Common Lisp implementation.
6:57:40
jackdaniel
(example: small forth interpreter written in C used to bootstrap some functions and target compiler may be a part of a final runtime too)
7:00:09
edgar-rft
the question was howto reduce the size of a binary and the discussion was howto write a treeshaker
7:02:02
edgar-rft
jackdaniel: but it was said that ECL produces small binaries, maybe you're the right man to help :-)
7:03:20
jackdaniel
of course such runtime would only carry bytecodes compiler (but binary itself may be compiled to native beforehand), no ASDF etc
7:04:31
jackdaniel
needless to say, you may add module loading on demand (if present in form of fas files) - that way you may add compiled native module to a runtime
7:07:49
jackdaniel
McCLIM aligning text to right, wrapping by word against a margin and aligned vertically *above* bottom margin: http://i.imgur.com/Vbnr6Qx.png
13:24:16
pierpal
anyway I recommend you this book https://www.amazon.it/dp/B004IASVJK it's highly educational, as are the other books by the same author.
14:52:47
HighMemoryDaemon
What's a good site for pasting my Lisp code to share a link? Hastebin, my go-to, seems to be down.
15:34:50
kilimanjaro
what's the idiomatic way to get just the first value from a call which returns multiple values
15:35:27
kilimanjaro
e.g. i have a function which ends with (gethash foo frob), but i don't want the user to see the second value
15:52:58
kenster
Streaming some lisp programming: https://youtu.be/ZYdsxGa78q4 or https://www.twitch.tv/kingherring