freenode/#lisp - IRC Chatlog
Search
0:38:41
aeth
pjb: I usually hide complicated things behind symbol-macrolet or with-accessors or something similar
0:40:34
pjb
didi: that is, it's better if you have to use it several times, or if it has to have an implementation that should be consistent with some other such macro or operator.
0:40:58
pjb
it is easier to ensure consistency in a mechanism, when it is implemented independently and separately from the rest of the code.
0:41:31
pjb
Also having such abstractions helps when you need to debug, since you can easily instrument those abstractions (add checks).
0:43:02
pjb
Yes. There are quick and easy checks that you can add when debugging and leave in production, but you can also add heavy checks (things that walk whole data structures, or perform complex computations to validate).
0:44:00
pjb
Note that I speak generally, here, not specifically for CL. I'm currently working on FreeRDP written in C, and it's horrible.
0:44:09
aeth
I created a typed cons cell out of structs that's about 30% slower than the built-in cons, but it saves having to walk the data structure to verify things (just check the type in O(1))
0:45:42
pjb
note that clisp can be compiled with a clisp compilation time option to add a slot to cons cells for your own usage.
0:47:10
aeth
Using structs is mostly portable because :type on a slot is usually at least somewhat respected. Full portability would require testing implementation behavior and wrapping the or check-type in places where it isn't respected on various implementations.
0:48:20
pjb
check-type must not be used indiscriminately. Sometimes you must rely on the intrinsic type checking.
2:00:54
nowhere_man
I'm starting to understand the concept of delimited continuations in the basic theory, but now I wonder: what are their typical uses?
2:10:09
White_Flame
delimited continuations are basically registering an lambda event handler from within a closure, for example
3:15:48
didi
krwq: I dislike doc generators, so I have no recommendation. But, I like this article: http://stevelosh.com/blog/2013/09/teach-dont-tell/
3:40:16
jasom
krwq: somewhat out-of-date, but: https://sites.google.com/site/sabraonthehill/lisp-document-generation-apps
5:12:16
drmeister
Does anyone have insight into how to implement the optimization where functions that call each other within a compilation unit call each other directly?
5:43:18
mfiano
pillton: I got your message. I actually get a warning when quickloading specialization-store now
5:50:20
beach
drmeister: Instead of going through the function name, you do a relative jump since the two functions are in the same code body.
5:51:19
beach
But, if you do that, you can no longer redefine the callee by hitting C-c C-c in SLIME.
5:55:33
beach
Also, functions can have more than one entry point. You don't need to check the number of arguments for such a call.
6:05:19
drmeister
We are stuck on a couple of fronts. Inlining is still broken and so we can't bring the new cst compiler online. That is very frustrating.
9:42:39
ebzzry
littlelisper: the canonical answer is http://www.gigamonkeys.com/book/files-and-file-io.html
10:15:55
beach
It is tricky stuff. I am pretty sure you don't have the right to recompile callers from source code. The environment may have changed since last compilation.
10:17:05
littlelisper
compiling my defpackage gives me "bogus DEFPACKAGE option: (:USE-IMPORT-FROM :CL-PPCRE :SCAN-TO-STRINGS)"
10:17:49
beach
p_l: At the very least, the direct call contains a relative callee address and after update, it must have an indirection through the symbol or the environment.
10:18:27
p_l
beach: I was thinking of using absolute addresses instead, and essentially handling it the same way one would handle GC-movable code
10:20:49
p_l
also, one could patch the callee location with a jump to new code, and have GC hooks that fixup it later
10:21:09
p_l
though the latter requires that all code moves only in the area supported by relative call
10:23:53
p_l
AMD64 for example only gives 32bit relative addressing, which is something I once considered for a rather "larger" compilation unit
10:26:16
p_l
beach: doing it like that would also fit with my ideas of marrying your single-level-storage for OS with some robust real hw :)
10:28:36
beach
Perhaps the easiest thing to do is to require the programmer to us NOTINLINE for a function that can be redefined separately. Then there is no obligation to make it work otherwise, because the callee could very well have been inlined, so that redefining it won't have any effect anyway. Then for NOTINLINE, generate a full call so that redefinition works as expected.
10:28:43
p_l
then compilation unit becomes essentially a "segment" which has a external reference table, a table of its own contents, and can be as big or as small as it needs to be (because we could do transparent segment nesting)
10:30:54
p_l
and inside a segment, the IP-relative offsets could be market by debug data and updated when necessary (done right, one could also "fork" segments)
10:45:16
budRich
hello lisp people. Im currently in the transition phase of going from i3 to stumpwm and sublime to emacs (don't ask why). And it feels like i need to get a good understanding of and learn some lisp. It's all a bit overwhelming right now, with all the different dialects and stuff, just thought i would ask here how YOU got started: book, cource, emacs, dialect, whatever.
10:47:40
pjb
budRich: have a look at http://cliki.net/Getting+Started and http://cliki.net/Online+Tutorial
10:47:49
budRich
great, this is what i thought and planned, i try to conf stump and get used to that first, before starting with emacs, it feels like it can get confusing. And wm hacking is my cup of tea.
12:12:54
beach
OK, I created an appendix describing how I plan to adapt Doug Lea's allocator to SICL. I would appreciate if y'all would take a look. It is the first draft so far, and I will likely work on the details later: http://metamodular.com/allocator.pdf
12:29:08
edgar-rft
I don't think it rally matters what acronyms like WRKZTG really mean because people using such things don't show the slightest interest to be understood by others, so their opinion should be totally ignored.
12:32:47
Bike
i'm just imagining that beach types like a champion texter, but we can't tell because of all the abbreviation expansions
12:32:55
beach
I mean, when I type (say here in IRC) "gme", it expands to "Good morning everyone!", and when I type "hs" it expands to "Common Lisp HyperSpec", so I don't need to expose other participants to such abbreviations.
12:33:32
edgar-rft
beach: what if I wrote my doctioral thesis with vim? would emacs abbrevs expanded there?
12:34:11
shka1
"Forgetting how to implement a Prolog system is as hard as learning how to build one."
12:37:11
edgar-rft
beach: My original rambling was about abbrevs like AFAIUI in text intended to be read by humans. Of course I have no problem if anyone uses the capabilities of his/her editor to make life less painful, as long as I don't need to read unexpanded abbrevs like AFAIUI in plain text.
12:38:03
beach
I just pointed out an easy way to avoid that, without having to manually expand those abbreviations. But I take it very few people use that way.