freenode/#lisp - IRC Chatlog
Search
4:31:26
jack-thomas
Hi, so in Slime, I'm looking at the debug backtrace and I toggle details. This is what I see. " 0: (UIOP/RUN-PROGRAM:RUN-PROGRAM "/bin/bash" :INPUT #<SB-IMPL::STRING-INPUT-STREAM {1003F059A3}> :OUTPUT #<SB-IMPL::STRING-OUTPUT-STREAM {1003F05B43}> :ERROR-OUTPUT #<SB-IMPL::STRING-OUTPUT-STREAM {1003F.. Locals: SB-DEBUG::ARG-0 = "/bin/bash" SB-DEBUG::MORE = (:INPUT #<SB-IMPL::STRING-INPUT-STREAM {1003F059A3}> :OUTPUT
4:31:27
jack-thomas
#<SB-IMPL::STRING-OUTPUT-STREAM {1003F05B43}> :ERROR-OUTPUT #<SB-IMPL::STRING-OUTPUT-STREAM {1003F05B43}> ...)" (New lines replaced with 4 spaces.) Any idea how to see the rest of those details?
4:32:43
jack-thomas
I can post a pic if that will help. I'm not seeing anything in the slime documentation
5:23:55
jack-thomas
no-defun-allowed: No, do you notice how I can only see part of the function call? The sexp ends with ...
6:04:08
beach
fengshaun: Some people, including me, are working on creating a debugger worthy of the name for Common Lisp.
6:11:07
stylewarning
This is a weak point I have with lisp... files. How can I make a file shorter without overwriting it? Something like truncating it.
6:23:41
stylewarning
Shinmera: I'm not sure, I'm experimenting around with how I want to manage the use of files as temporary (swap-like) storage of data
6:24:40
Shinmera
I'd keep the file size constant and just have a first field in the file that denotes the allocated bytes in the file.
6:34:50
stylewarning
beach: what about displaying in the backtrace where dynamic bindings or restarts are installed
7:04:14
beach
Don't hold your breath. It will require support from the Common Lisp implementation, and maintainers of implementations other than SICL will probably be reluctant to adding such support.
7:56:33
seok
When writing a long function, do you write the functions in parts and assemble them finally for readability, or do you just write the long form for shorter code?
8:00:59
no-defun-allowed
There's a joke that you shouldn't ever write a function longer than your head, but in Lisp, you should probably aim for shorter.
8:59:49
no-defun-allowed
Are there any benchmarks on how using type tagged pointers instead of consing up fixnums in the heap perform in (some kind of Lisp)?
9:00:10
no-defun-allowed
I know the former is much, much better, but I'm trying to estimate by how much.
9:03:15
Shinmera
Tagging and untagging is practically free on the CPU, whereas the rest requires constant memory access. So the benchmark is, well, your memory bandwidth and cache.
9:04:36
no-defun-allowed
I have a bytecode Lisp interpreter in CL and I'm looking at another bytecode interpreter in C, and wondering how mine is 10x faster on the only "benchmark" they have provided.
9:08:02
no-defun-allowed
My guess is that my environment model (a list of vectors) is faster than theirs (a hash table of some kind, I am not very good at reading C), and that they use heap-allocated numbers, whereas I snarf SBCL's fixnums.
9:10:00
no-defun-allowed
The former has a 3x or so speed increase, and I'm about to test the latter.
9:20:13
jonatack
seok: i'm not sure how lispy this is, but one advantage to me of breaking a long function into shorter ones is that you can unit test them.
9:25:56
beach
Cleavir can only be used to implement a Common Lisp compiler, and SICL is not in a state to be used by a general audience.
9:29:05
thijso
So I'm wondering... those of you using emacs as your editor, do you just use it's default indenting for CL code? Or are there packages (or settings) that make it better?
9:30:40
no-defun-allowed
Using the slime-indentation contrib for SLIME guarantees you don't get odd looks when you show your code to #lisp.
9:32:02
no-defun-allowed
The default Emacs indentation is okay, but slime-indentation makes it work much better. I think LOOP is the best example of the differences between them.
11:40:07
thijso
So if I have a part of my lisp code light up in red in emacs, it means there's something wrong, right? Apart from (error "whatever") where 'error' is red, I mean?
11:43:39
no-defun-allowed
If you write (foo (bar baz <Newline> quux) bloop), Emacs will highlight bloop red because it's in a silly spot.
12:02:12
thijso
Uhm. But what is wrong with (loop named something<newline>do<newline>(function-called) .. ? 'function-called' is marked red here, which I find a little strange. Is it the 'do'?
12:03:06
White_Flame
if your function name starts with "assert" it also changes red like "error" does
12:03:44
thijso
It looks like something else is going on. Is the function name "check-schedule" something special? It lights up anywhere I put it in my code...
12:05:22
thijso
Is there somewhere I can change those assumptions? I'm fine with 'assert' and 'error', but 'check-' not so much
12:07:05
thijso
Of course, I'm running a clfswm window manager on sbcl on funtoo, so that might explain some things...