freenode/lisp - IRC Chatlog
Search
8:24:10
scymtym
beach: yeah, as i said, it worked very well for me. but as shka_ mentioned, a little extra work is needed to make the approach work across multiple threads
10:16:47
Xach
in my innocence i imagined someone making a graphical frontend and wanted it to be able to handle progress bars without changing much
10:49:42
p_l
I seem to recall an early example of conditions being used in relation with text input editing
14:31:59
uhrenmacher
Ok, hello people, just havin' two questions my knowledge in terms programming is limited to C, Java and some scripting langs. So I thtought about learning something like some Lisp dialect. What dialect do you recommend a newbie? 2. I have been using Vim for some time now, I am pretty used to it, is it worth it to go for Emacs, when coding in Lisp?
14:32:44
beach
uhrenmacher: This channel is dedicated to Common Lisp, so we will be biased in favor of Common Lisp.
14:34:46
uhrenmacher
>Java, bruh learned it when I was like 12 to h4xx0r in gaymes, using it for GUIs only nawadays
14:36:05
beach
uhrenmacher: See random-state.net/features-of-common-lisp.html for a list of features of Common Lisp.
14:39:20
cl-arthur
uhrenmacher: I used to use vim, now after enough lisp I use emacs (w/ SLIME). lisping with emacs/slime is far better an experience than the straight vim I used before. There's something SLIME-like for vim, but yeah go emacs.
14:39:47
beach
uhrenmacher: Most people here probably use SBCL. It is not just a compiler. It is an interactive system, just like any other Common Lisp implementation.
14:40:37
phoe
uhrenmacher: the interactivity of Lisp is a massive benefit over all non-interactive languages
14:41:07
phoe
one can, and should, inspect, debug, modify, converse with a living Lisp application without ever quitting it
14:41:34
Inline
it's just that interactivity i sometimes lack especially when doing oop related stuff
14:41:35
uhrenmacher
ah, yeah, that was something. Ok, this question is probably far to retarded, but...why can't I just write my code in a file, compile it and then execute it? Like just looked up some tuts on it, but couldn't find anything for this. Maybe I am to brainlet to see the advantages, idk
14:42:52
phoe
when your program doesn't work then it just crashes, which means that you don't get to debug it or inspect its data structures live
14:43:08
beach
shortername: You would create an executable only at the end of a long development cycle. We can discuss that in a few months.
14:43:39
phoe
Lisp can compile incrementally, which means very short feedback loops, where a newly compiled function is available inside your program in milliseconds rather than seconds and you can immediately play with it in the REPL
14:43:40
Inline
for redefining functions/macros it's ok i suppose, but really i have not found a good way to oop stuff yet
14:46:09
jackdaniel
removing methods from a generic functions is kind of awkward, maybe that's what he means
14:51:31
Xach
maybe i'd also like a nicer inspect-at-point type thing - something that knows if it's looking at a defgeneric, defun, defmethod form and inspects appropriately instead of requiring me to manually enter #'foo at the prompt
18:49:28
benjamindc
Does anyone know of a good tutorial the describes up-to-date best practices for Lisp project organization and build processes?
19:10:54
loli
is there any literature on how to write an image based system, akin to Common lisp or those forth/smalltalk systems?
19:15:28
phoe
the basic idea of the Roots of Lisp interpreter is the same idea that stands behind all image-based systems
19:15:38
dlowe
a lot of "scripting languages" are also image based systems, so I'm not sure why people acts it's so crazy when lisp does it
19:16:51
loli
can those systems save the current image, then resume on a ceratin function afterwords? I'm curious on how the format of that is, thanks for the suggestion
19:16:55
no-defun-allowed
They're just tedious to use interactively; I can't break into a REPL in a Python program too easily.
19:17:28
loli
well I'm curious if that kind of detail is noted anywhere, as when I searched for papers on the subject it came up baren
19:17:33
phoe
most Lisp implementations dump their in-memory data structures somewhere and then restore those when the image is reloaded
19:17:41
no-defun-allowed
And one does not have update-instance-for-redefined class, so one is limited in what they can change while live.
19:18:05
phoe
the simplest idea ever is to record all commands that were issued to the image from its start to its freezing and then replay them when the image is thawed
19:19:20
phoe
I mean, if in theory you do (defun foo () 42) (defun bar () (foo)) (dump-image "foo.image") then all that is required for the dumped image to become equivalent is to reexecute (defun foo () 42) (defun bar () (foo))
19:19:43
phoe
obviously this won't work in case of filesystem interaction or other side effects, but it's a simple idea that will work for toy interpreters
19:20:07
no-defun-allowed
Some Smalltalk implementations do that, and export a changelog pretty much like that one.
19:26:25
loli
I've made a fair few interpreters in my day, I guess the saving the memory to disk in a format that is very quick to reload is what alludes me
19:27:07
no-defun-allowed
I can't remember if they also dump an image now, but in some cases, they don't touch the filesystem at any other time.
19:29:22
phoe
https://github.com/phoe-trash/ccl/blob/0aa5b5d209f288ee04157c60624dea5f79787c16/xdump/faslenv.lisp
19:30:06
phoe
DEFINE-FASL-OPERATIONS contains a declarative list of all FASL commands permitted in a CCL FASL file
19:33:17
loli
thanks for the links, I'll spend some time studying them, and hopefully have a better idea how to make a nice image environment
19:35:05
no-defun-allowed
Wouldn't code have to be position-independent, or installable at an arbitrary location given to you?
19:37:58
phoe
but e.g. if all of your code is interpreted then your code is actually data, and dumping data is easier
19:39:22
phoe
then your compiled code needs to take this into account - code must be reloadable like this
19:47:53
benjamin`
oh i did come across that, but it hasn't been touched in 4 years, save for an edit to the README