freenode/#lisp - IRC Chatlog
Search
0:05:19
luis
fiddlerwoaroof: you said you had to patch CFFI and Osicat to get static linking working. Will you be sending pull requests?
0:09:27
nyingen_
Do we have any particular libs or idioms for spawning external processes and doing I/O with them?
0:11:00
aeth
In particular, uiop:run-program or uiop:launch-program (the latter is newer and is capable of being async)
0:12:24
aeth
You probably want (uiop:launch-program name :input :stream :output :stream) and then you call uiop:process-info-input and uiop:process-info-output to get the two streams
0:18:56
nyingen_
I am writing some glue code. Last time I did this I switched to perl because CL's MySQL libs did not work for me. But this database is in sqlite, which I have used CL with before, so it should be all good
0:25:58
fiddlerwoaroof
If you're expecting something like (swap (atom 0) '1+) => (atom 1), that doesn't exist
0:40:00
elderK
Another dumb question: If I have a structure instance, and I copy it is, is the copy deep?
1:27:04
elderK
Guys, is there a better way to exit from inside a nested loop, other than using return-from?
2:24:53
elderK
I wonder if it's better to cache the exact dimensions of an array, rather than keep extracting it via array-dimensions
3:33:46
fiddlerwoaroof
elderK: equalp can be a bit surprising becaue (equalp #("asdf") #("ASDF)) => t
3:36:15
loke`
It's better to simply ignore its extentence since there are very close to zero cases where it does what you expect. And even in cases where you think it does what you expect, it doesn't.
3:36:42
fiddlerwoaroof
Or, perhaps more interestingly would be something like (== '(a 1) '(a 2) :key 'car :test 'eql) => t
3:38:55
fiddlerwoaroof
But, I think an equality function that worked on pairs of sequences and took a :key/:test pair like a bunch of other sequence functions would fit in nicely.
3:40:07
fiddlerwoaroof
If you wanted to be _really_ general you could add an argument for a function that took each of the provided arguments and mapped them to sequences, which were then compared elementwise using :key/:test
3:40:52
fiddlerwoaroof
But, I think the ultimate thing to realize, is that equality is highly domain-specific
3:42:43
fiddlerwoaroof
luis: I wonder if it would be better to split the asdf parts of cffi into a new system
4:01:49
elderK
equalp uses char-equal for comparing strings, right? And that is case insensitive. char= /is/ case sensitive.
4:06:08
fiddlerwoaroof
elderK: yeah, which is why I've never really used equalp for anything, except as a hash-table test
4:12:41
elderK
But, yeah, I noticed that it would suck if, for example, you had an array of say, strings.
4:13:38
elderK
Had quite a bit of fun today just, tinkering away on my first "not just screwing around" program in CL. I'll probably throw it all away - I'm learning more as I go.
4:16:01
fiddlerwoaroof
It's not really intended to be beginner-level documentation, which partially accounts for its structure
4:16:07
elderK
I'll get used to it. But, sometimes, it's like... you wind up in the glossary or in say, some docs for something but the important info you are looking for isn't in either place. Like, I was trying to learn more about &key and &optional parameters. defun just says "lambda list" So, glossary. "Ordinary lambda list." Glossary. Bounced around for ages, until I wound up in the right place :P
4:17:17
fiddlerwoaroof
italicized links go to the glossary, which generally means I avoid clicking them unless I'm really interested in what a word means
4:17:39
elderK
I do have a question regarding setf types. I've noticed that there is defsetf. But, in other projects, I swore I saw them using something like (defun (setf whatever) ...). Looking around in CLHS, I got a bit confused. Like, how do you define a setf expander?
4:20:06
elderK
Sometimes, it has more like, examples. Seemed more tutorially, but not /too/ tutorially, if you get my gist.
4:21:07
elderK
Aye. I only use it to kind of get a better... grasp. When that's done, I zoom back to CLHS.
4:23:10
fiddlerwoaroof
I bind it to Command-Alt-\ and I have easily accessible documentation for everythign I need
4:24:59
elderK
I can't believe I didn't know about this! It has docsets for all the things I use! This is *great*
4:39:12
fouric
drmeister: in case you weren't aware of it already, here's another CLASP: https://www.radioeng.cz/fulltexts/2011/11_04_880_889.pdf
4:41:33
beach
When I name things, I try to introduce a different spelling, or at least verify that Google does not return anything interesting first.
4:44:33
beach
I will make an exception with the second version of Gsharp. It will use a name that is in line with a long tradition for score editors: Clovetree.
4:47:45
beach
Of course, I need to make sufficient progress on SICL first, so that I can hand it over to others. :)
4:55:41
no-defun-allowed
has anyone written a program that tries to generate proofs (or new facts) given some facts?
4:56:09
elderK
fiddlerwoaroof: The only problem with Zeal, for me, is the same problem with most things today that integrate CEF or Webkit in some way: It means I'm effectively running a zillion instances of a web browser. :|
4:56:46
no-defun-allowed
i know people have used programs to assist with proofs, but i think letting the program try to generate some itself would be faster
5:02:32
no-defun-allowed
beach (IRC): was G# the least used note on the internet when you named Gsharp?
5:12:32
no-defun-allowed
i thought about that but i haven't seen people generate new rules like that
5:15:43
fiddlerwoaroof
"The little prover" is a really interesting nice introduction to the underlying system
5:19:10
LdBeth
#'no-defun-allowed: in prolog you can define relations and ask what’s the relation between two term
5:48:47
no-defun-allowed
yes, they're only the same in the --horrible and out of tune-- equal temperament tuning
5:51:39
no-defun-allowed
(it's annoying that all the nice ratios like 3:2 for a perfect fifth are off)
6:12:13
elderK
Guys, question: How am I meant to parse: " defgeneric function-name gf-lambda-list [[option | {method-description}*]]"
6:12:28
elderK
As far as I read that, it says we can have only /one/ option. But we can have zero or more method-descriptions.
6:12:52
elderK
But the CLHS states you can have multiple options - as long as each is specified once?
6:51:56
beach
It is quite confusing, but I think if one takes the time to read it, it might become clear. :)
7:58:47
cupholder
I'm doing the exercises from Norvig's PAIP to learn CL, and noticed something weird. He says compilation makes functions 300+ times faster, but trying his "f" function on an input of a billion (to see the running time difference on a modern computer) gives me 4.919s for the interpreted version and 4.918 for the compiled version.
8:00:13
cupholder
To make sure I wasn't crazy, I wrote a basic recursive fibonacci function and timed it. It came out to 4.063s for the interpreted version and 4.064s for the compiled version. In both cases, I ran the function with the timer after defining it in the repl, entered (compile 'f) or (compile 'fib), and ran it again.
8:08:32
cupholder
The explicitly-compiled version runs with the same time on subsequent runs. Did SBCL produce a different binary for the same code? Is it non-deterministic?
8:11:35
jdz
I don't know. I'd rather forget a thing or two now and then than one bit flip in my brain crash the whole thing.
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