freenode/#lisp - IRC Chatlog
Search
10:53:47
jmercouris
both logs are not working, can someone please remind me what I need to put in my SBCLRC to enable debugging?
10:57:09
jackdaniel
what is "enable debugging"? what logs? you'll get dropped in a debugger for unhandled errors without any magic things in sbclrc
10:58:20
jmercouris
sorry yes, I mean with regards to stepping through a restart after recompiling a function
10:58:45
jmercouris
so, when a signal is raised (I think that's how you say it) and you get the debug menu, I want to be able to recompile the function and restart from a previous frame
10:59:09
oni-on-ion
(declare (optimize (debug 3))) in sbclrc though, i've been suggested here before.
10:59:40
jmercouris
there was someone who had posted a slightly different solution, I just can't find it in the logs :\
11:00:23
oni-on-ion
or -> https://stackoverflow.com/questions/4638710/maximum-debug-info-from-steel-bank-common-lisp-slime
11:00:26
jmercouris
if I remember or find what that other user had posted, I will repost tot his channel
13:58:18
dim
that's with Welcome to Clozure Common Lisp Version 1.11-r16635 (DarwinX8632)! on macOS Mojave
14:03:25
jdz
dim: I think there's a release of ccl compatible with latest macOS, read something about those lines on the mailing list.
14:04:56
jdz
"sudo installer -store -pkg ccl.pkg -target /" on the http://setf.clozure.com/~rme/ccl.pkg
14:18:33
dim
seems to work fine, thanks, but I need to learn how to use it from SLIME rather than with the integrated GUI
14:25:41
jdz
If it's about Common Lisp, then iterate predates CL (year 1990, http://dspace.mit.edu/handle/1721.1/41498?show=full).
14:36:06
pfdietz
I'm grumpy about ITERATE. It doesn't work with COVER. Hacking COVER to make it work with it is on my to-do list.
14:44:01
astalla
There's also my "doplus" library that predates FOR: https://bitbucket.org/alessiostalla/doplus/wiki/Home
17:13:51
beach
HAH! "A key concept in all operating systems is the /process/." From Tanenbaum and Bos: Modern Operating Systems.
17:16:27
shka_
"mr Tanenbaum, just like you have passed judgment on operating system design, i have come to pass judgment on you!"
17:16:47
beach
Though, he might be forgiven, since the book restricts the domain to "modern" operating systems. :)
17:17:53
beach
It reminds me of when I was a child and my parents were forced to replace their gas stove with an electric one (which of course is much worse, at least with the design at the time). My mother said "well, I guess it's more modern".
17:49:58
jcowan
Well, it depends on how they define "process". I don't want to see everything in the system put into one great big event loop for all applications simultaneously, like the Mesa OS from Xerox did.
18:45:30
sjl
anyone want to review this terrible thing I wrote on my lunchbreak http://paste.stevelosh.com/fdce3e2e7518439e6ab2bb4ee89598e8a743bc13
18:46:12
sjl
use case is solving largest common substring for N strings, without implementing fully generalized suffix trees (which I could not do in one lunchbreak)
18:47:27
beach
"Associated with each process is its /address space/, a list of memory locations from 0 to some maximum, which the process can read and write. The address space contains the executable program the program's data, and its stack."
18:47:29
anniepoo_
I see a serious issue - you're doing this on your lunch break, which weakly implies you're not writing lisp code during work work time....
18:49:42
sjl
Not sure that's more readable, at least to me. I tend to think of the first unless as "check if you've fallen off the array" and the when as checking if you've ticked over a bound.
19:47:19
anamorphic
How do I find out the default --dynamic-space-size in sbcl? It's platform dependent, but don't know where to look for x86_64
19:51:12
anamorphic
Cool thanks. it was ~1G... now to look for how I'm exhausting that. Seems like penty of space
19:51:31
Posterdati
please help, I'm trying to run a simple client/server ssl test using iolib/sockets and cl+ssl, but the server gave me ssl-error-zero-return while creating the ssl server stream... Any hints? Thanks!
20:02:24
jasom
sbcl's GC is throughput optimized, so you can have a lot of garbage before a full-gen GC happens.
20:25:12
DS9Soft
How do I get a system defined with ASDF and named foo/bar in a file named foo-bar.asd get loaded from another system? QuickLisp doesn't seem to recognize the system as it uses /
20:38:29
sbenitezb
thanks, apparently only the primary system can be resolved to its own .asd file, which sucks
20:42:42
jasom
sbenitezb: either call it foo-bar and put it in foo-bar.asd or call it foo/bar and put it in foo.asd
20:46:09
jasom
sbenitezb: alternatively you can do asdf:load-asd on the asd file and then the system will be found.
20:46:59
Posterdati
fe[nl]ix: I used openssl s_client and the server answered with the right certificate, the client I programmed did not verify the certificate!
20:47:28
sbenitezb
jasom: thanks, I'll see what I can do. I actually don't like foo/bar much, but looks like a better subsystem separator
20:49:02
sbenitezb
ha, it would even make more sense to have subsystems using / as separator and then each in their own directory
20:49:43
sbenitezb
well that's what I'm trying to do, but those systems are not recognized automatically
21:37:01
elderK
I've been looking at Practical Common Lisp part on Loop, and stuff. But, I can't see any obvious... equivalent.
21:39:10
void_pointer
elderK: I think that is pretty close to C's do while. I don't use that construct in C, so I might be a bit rusty on it, but it is like while but evaluates the condition at the end rather than the beginning
21:39:45
void_pointer
wait, just realized, what I wrote checks the end condition in the beginning. Easy way to fix it is to have
21:41:51
void_pointer
(do ((first-iteration t nil)) ((and (not first-iteration) (end-test-form))) stuff)
21:43:48
void_pointer
with complicated variable initialization and stepping (especially common when you specify a variable's type)
21:45:10
elderK
Like, I have a structure called world, it represents the world state. It's dumb, it just contains an array of a certain format.
21:46:10
josh5tone
when I get naming paralysis, I just name 'em wrong, and see how long it takes for me to figure out why
21:46:17
sjl_
I read something somewhere making the argument against the foo-... prefixes... I wonder if I can find it.
21:47:04
void_pointer
if that is the only object in the package, you can more easily get away with dropping prefixes
21:47:17
elderK
Well, for instance, say I want to access the state of a cell in the world. I simply had "cell-state", then I had "world-cell", now I have "world-cell-state"
21:47:20
void_pointer
if there are many kinds, then prefixes can sometimes be the only easy way to avoid clashes
21:48:06
elderK
Also thought of simply: world-state. But that makes you think of the state of the entire world, not just one cell in it.
21:48:42
Xach
I like to use un-prefixed names. If multiple objects can reasonably work with STATE, that's good. If the argument lists aren't compatible, I try to find a different name, or use different packages.
21:49:07
elderK
Well, these all operate on world alone. They are not meant to be generic in any way.
21:50:16
elderK
I understand that a method specialized on some type, is used for that type when you invoke the generic with an argument of that type?
21:50:19
Xach
elderK: in c++ and many other languages you prevent name clashes by using classes as the way to separate names.
21:50:49
elderK
Also to group them, though. You know for instance, that these methods are to be used only on "world", since they are methods.
21:53:26
Xach
I'd expect something named STATE to take a single argument and return some state object. The extra stuff makes me think a more specific name would help.
21:55:15
sjl_
some day I'm just going to (defmacro href (hash-table key &optional value) `(gethash ,key ,hash-table ,value)) and be done with it.
21:58:36
elderK
I would ask for comments about a certain function, but, I think I'll just write it all up, finish it, and ask for a critique on the entire thing :)
21:58:37
Xach
i had a thing i made where i had a bunch of functions that acted on an object and it turned out for most of it i really only needed the name of the thing to do most of the work, so i was glad i didn't make specialized methods or a lot of type checks. i could treat the string name as the object and save some work.
21:59:58
elderK
Even if you used check-type a ton, couldn't you use like, deftype to kind of decouple the real type from the name you use for that type? Kind of like using or typedef in C++?
22:00:02
asarch
One stupid question: Can you connect Slime in one PC to a SBCL session in another different host?
22:03:32
Xach
asarch: when i did it, i used an ssh tunnel. there is some fiddling with filename translation required to get things to work properly. (i think the specifics are in the manual but i haven't checked recently)
22:03:58
Xach
asarch: i found it to be a bit painful when i tried it several years ago so i usually edit on remote slimes with remote emacses.
22:11:59
oni-on-ion
when sbcl or impl runs swank and server, slime can connect considering version compat
22:12:30
josh5tone
asarch: do these details help? https://common-lisp.net/project/slime/doc/html/Connecting-to-a-remote-lisp.html
22:13:23
oni-on-ion
its always worked for me, not much special things. ssh like xach says for if you have a proper secure network setup. =)
22:13:40
oni-on-ion
(which one would already know how to set up, else would have a network admin whom to ask.)
22:21:54
asarch
Another stupid question: Is SBCL a distributed environment (this SBCL can use that SBCL capabilities)?
22:25:00
elderK
I thought of map, but it's not producing any output. Just, calling a function on each adjacent cell.
22:28:12
sjl_
as long as you don't do my personal pet peeve of calling a boolean parameter somethingp I'm happy
22:33:40
void_pointer
The first if you mean equalp equality, the second if you mean equal equality, and = if you mean numeric equality.
22:34:45
void_pointer
Especially the convention for ? for predicates and ! for anything that mutates its arguments
22:35:14
aeth
void_pointer: There's one problem with the naming conventions in Scheme. Because they improved the names (e.g. map instead of mapcar) that means that good names aren't available (i.e. a sequence-generic map cannot be called map in Scheme)
22:36:24
aeth
Additionally... CL requires you to help the compiler out if you want efficient array/sequence code. Scheme wants to keep dynamic typing at maximum efficiency which means no generic aref... which also means instead of one type declaration you have potentially dozens of de-facto declarations right there in the foo-ref name.
22:37:31
aeth
In Scheme you could have stuff like ub8-ref instead of just declaring the array once as (unsigned-byte 8)
22:40:50
aeth
(Technically you do (simple-array (unsigned-byte 8) (*)) in CL... But inconvenient syntax like that can always be fixed with macros.)
22:41:32
void_pointer
Reminds me, I've been trying to get half decent array math performance. If I have two arrays that are for sure the same size with the same type which is known to be (unsigned-byte 32) and then doing an element-wise multplication in place. I can't seem to get more than 70 M/s out of SBCL on my computer even with declarations so far.
22:42:04
aeth
elderK: CL is a safe language so it probably will try to find a reasonable initial-element (NIL or some numeric type's 0 or #\Nul) even if you don't provide one, although that's implementation specific
22:42:25
aeth
It might notice that you set every element right afterward and optimize that away, but I don't think even SBCL is that sophisticated
22:42:52
void_pointer
the make-array function has an :initial-element keyword to pass an initial element. It defaults to nil
22:43:35
jcowan
and there is universal polymorphism, like cons, and there is "universal polymorphism by cases", like write/display.
22:44:13
aeth
void_pointer: But when it is nil that does not mean the initial element is nil, at least in SBCL. It will use the numeric type's 0 or the character #\Nul in SBCL e.g. (make-array 42 :element-type 'character)
22:44:14
void_pointer
aeth: if it was that smart, it would take a lot less time to do the multiplciations. I am doing it several times in a row and it could just do it once and be done, but the time scales with the number of times it is done
22:44:56
void_pointer
aeth: oh, that is convenient. I've always been scared to not give some :initial-element to avoid a crash
22:45:33
jcowan
I have only ever seen trash in numeric arrays and only in some implementations; the rest are all about 0.
22:45:43
void_pointer
aeth: which is funny given that it would just drop into the debugger if there was a problem rather than crash (I still think a lot like a Python programmer)
22:46:36
aeth
jcowan: specifcially, the numeric type's 0 if numeric *or* #\Nul if character *or* NIL if generic
22:47:51
aeth
|3b|: Or define this behavior explicitly in a macro even though every reasonable implementation already has it