Search
Friday, 21st of April 2017, 4:41:07 UTC
5:34:27
BusFactor1
does anyone know how to tell woo where to find libuv.so on macOS?
5:45:13
p_l
BusFactor1: you need to compile it yourself from source, or whatever third party packaging Mac users use
5:53:59
BusFactor1
i've got it installed through macports
5:54:21
BusFactor1
it just doesn't seem to recognize how to find it using DYLD_LIBRARY_PATH so I thought there might be some trick
5:54:32
BusFactor1
using cffi or something
6:32:09
shrdlu68
Good morning, people.
7:33:12
p_l
BusFactor1: I think there are ways to specify it explicitly in CFFI.. But also check if it is properly looking for .dyld file first
7:35:56
ogamita
shrdlu68: because the openssl now is financed and has hired tens of programmers and testers? I've not heard anything about it…
7:41:48
beach
Hello phoe. I need to go away for an hour or so. I'll let you know when I get back.
7:54:06
shrdlu68
ogamita: The mailing list is busy, and the list of online users is large. But I've rarely seen any activity there.
7:56:09
ogamita
ah right, some projects work with mail-lists more than with irc…
7:56:42
ogamita
irc may be too distracting.
8:59:58
beach
Thanks. So what about the LispOS specification?
9:15:35
beach
phoe: OK, I'll ask here, since you seem to ignore your PMs. Why is it hard to imagine techniques that will guarantee the integrity of an operating system in the presence of concurrency? Every desktop and mainframe operating system does it.
9:15:51
phoe
Sorry, was doing a work thing.
9:24:00
shka
well, i am not in the topic
9:24:22
shka
but what i would want to see are CSP style processes
9:25:38
beach
shka: Why and where would you want to see that?
9:27:35
shka
i want to have same style of api for calling remote processeses and ones on the local machine because it would greatly simplify construction of distributed systems
9:29:32
shrdlu68
This is strange. A function returns 3 closures, I bind the first two using multiple-value-bind, dicarding the third. Someone is calling the third one.
9:29:49
beach
shrdlu68: Paste the code.
9:30:14
loke`
shrdlu68: Just show the stack trace when the call happens.
9:31:17
shrdlu68
loke`: How do I do that?
9:31:39
beach
shrdlu68: You can put a (break) in the function being called.
9:31:40
shrdlu68
backtracing isn't giving much helpful info.
9:31:42
loke`
But a (BREAK) call in it?
9:32:13
beach
shrdlu68: Normally, if you are in SLIME, you can then get the source code of the point of the call.
9:32:38
beach
shrdlu68: Oh, but you need to use high DEBUG values by default.
9:32:54
beach
shrdlu68: I put this in my .sbclrc: (declaim (optimize (speed 0) (debug 3) (safety 3)))
9:33:43
mood_btf
Note that that doesn't guarantee permanent high debug values. For that, add (sb-ext:restrict-compiler-policy 'debug 3)
9:34:19
shrdlu68
Here: http://paste.lisp.org/+7E1H
9:35:24
shrdlu68
It only happens in some situations, but that it happens at all is puzzling.
9:35:25
beach
shrdlu68: I think you have misunderstood something...
9:35:29
mood_btf
shrdlu68: The only form in the (values) is the single (with-slots ...), which returns the third lambda
9:35:48
beach
shrdlu68: WITH-SLOTS does not preserve multiple values.
9:36:04
beach
shrdlu68: It only returns the value of the last form in the body.
9:36:06
mood_btf
So the only lambda ever returned is the third one, and the first and second are ignored
9:36:18
beach
shrdlu68: So your VALUES will be given a single value.
9:36:44
shrdlu68
The third one. Someone hold me 'afore I punch myself.
9:37:46
beach
shrdlu68: Unrelated, but still: you might want to use accessors instead of slot values directly, and use WITH-ACCESSORS instead of WITH-SLOTS.
9:38:28
beach
shrdlu68: Because slot-value doesn't allow you to build a proper protocol.
9:38:34
beach
It goes directly to the slot.
9:39:31
beach
shrdlu68: If you use SLIME-INDENTATION, there is no need to put a newline after the LOOP keyword. Your LOOP body will be indented properly then.
9:39:32
shrdlu68
I see. I'll do that, right now I'm trying to get this thing off the ground.
9:40:33
beach
Also, no whitespace before ) or after (.
9:41:43
shrdlu68
Yeah, I tend to do that while I'm creating the form and then clean it up after.
9:43:24
shrdlu68
How exactly do I go about getting slime indentation? Do I need to have slime running?
9:44:02
beach
In your .emacs, you put (slime-setup '(slime-fancy slime-tramp slime-asdf slime-indentation))
9:44:21
beach
Assuming you are using Emacs and SLIME.
9:45:04
shrdlu68
I am, I just don't like slime running, it opens too many buffers and I tend to be editing multiple files.
9:47:07
shrdlu68
Thanks, emac's indentation has forced me to adopt a few work-arounds, like putting a new-line immediately after the loop keyword.
9:47:14
beach
This is the first time I hear that "too many buffers" would be problematic.
9:47:54
shrdlu68
When I need a repl, I just M-x run-lisp.
9:48:40
shrdlu68
It distrupts my work flow when there are open buffers I'm not actively using.
10:46:45
filwisher
How do you include .a files when writing cffi bindings using cffi-grovel?
11:18:37
shka
filwisher: not user about cffi-grovel, but .a is a static library
11:19:37
shka
so first, you will need to make dynamic library
11:19:52
shka
if it is your own code, that shouldn't be a problem
11:20:23
shka
if not, not a problem as well, you will need to relink it
11:25:55
filwisher
i.e once recompiled, with `cffi:define-foreign-library`
11:29:57
shka
sorry, i don't use cffi that much
11:30:24
shka
filwisher: and when i'm using, i'm kinda doing it manually, without extra tools like grovel
11:31:32
shka
filwisher: so you want to repack your .a to .so
11:32:02
shka
you can find information about that with google
11:32:45
shka
then cffi:load-foreign-library (or something like that, i can't remember function name) should work
11:32:53
filwisher
I can recompile to .so but I'm unclear about integrating shared libraries with common lisp
11:33:06
shka
ah, that is actually quite easy
11:33:46
shka
i'm not sure if asd is handling this, but what i do is to use this: https://common-lisp.net/project/cffi/manual/html_node/load_002dforeign_002dlibrary.html
11:34:07
shka
second, i will show you my code
11:34:39
filwisher
OK great, this is really helpful
11:35:45
shka
(cffi:load-foreign-library (asdf:system-relative-pathname :overmind "lib/libqmlisp.so"))
11:36:09
shka
anyway, this is what i am doing in my lisp file
11:37:20
shrdlu68
It seems to me ironclad's sha512 isn't right. Could someone try hashing something and compare it to sha512sum's output?
11:43:40
shrdlu68
I just checked on a different machine with a different file and it matched.
11:44:16
shrdlu68
Let me get this file over to that machine.
11:49:19
shrdlu68
Okay, let me experiment some more.
11:50:05
phoe
Is there any kind of a library that portably provides thread-safe hashtables?
11:52:06
shrdlu68
Matched on the other machine, same file that's troublesome on this ppc.
11:52:35
shrdlu68
I think I've had enough trouble with it, I'll stop using it.
11:53:44
shrdlu68
Should I report this to ironclad?
11:54:15
phoe
This is portable ANSI Common Lisp.
11:54:24
shrdlu68
Ok. Let me check the other hashes.
11:54:25
phoe
This should not differ between implementations between architectures.
11:54:37
phoe
shrdlu68: what is your implementation?
11:54:52
phoe
Are there any other CL implementations for PowerPC?
11:55:23
phoe
Also - give me the octet vector that you are working on, I will check it locally.
11:56:10
phoe
I suggest #(113 119 101 114 116 121 117 105 111 112) which is "qwertyuiop".
11:56:37
phoe
On my machine, it sha512s to "6308d8f6a7ccc9f77e41be5331a52c71c0bb28ecbd4669b960d60dd505dfde9ddd7a30cd26bb308010b3819699daba7caeb791bf6a4153605fe56d1fd3d5df41"
11:57:01
shrdlu68
Curiosly, md5, sha1,sha224,sha256 all work.
12:00:00
shrdlu68
Matches yours using sha512sum, but ironclad's doesn't.
12:00:51
shrdlu68
It hashes to #(24 EA A7 FE 3F D0 53 80 93 E7 39 7E 92 42...AA C0 5C 3B)
12:01:14
shaftoe
isn't ironclad "unsupported" now? there was a post on planet.lisp.org not long ago
12:01:38
shaftoe
which sucks because there's not much by way of alternative...
12:02:02
shaftoe
i dont think there's a maintained libsodium package
12:02:08
shaftoe
and no way i'm using openssl :P
12:03:00
shaftoe
http://www.method-combination.net/blog/archives/2017/03/07/nibbles-and-ironclad-releases.html
12:03:06
shrdlu68
Wait, they released a new version recently, and last time I opened an issue on github (hardly two weeks ago), I got a response.
12:03:08
shaftoe
This is also an appropriate time to announce that I will no longer be maintaining nibbles, ironclad, nor any of my other Common Lisp packages.
12:03:22
phoe
shaftoe: unmaintained, not unsupported
12:04:18
phoe
that it currently lacks a maintainer
12:04:21
edgar-rft
shaftoe: it waits for *you* to become the new maintainer
12:04:29
shrdlu68
Well, who's the new maintainer?
12:05:27
phoe
https://github.com/glv2/ironclad shrdlu68
12:05:40
phoe
or so it seems from the fork graph
12:05:51
shrdlu68
The releases have been sparse over the years.
12:06:09
phoe
the last commit is 12 days ago, which is recently.
12:06:16
phoe
shrdlu68: file an issue there.
12:06:27
phoe
shrdlu68: also, what implementation are you using?
12:06:30
phoe
can you check on any other one?
12:06:49
shrdlu68
I can check on ECL. Uno momento.
12:07:27
phoe
CCL is also powerpc capable.
12:12:44
shrdlu68
Hell, let me start a fresh sbcl repl.
12:13:12
shrdlu68
I tried to compile CCL on this machine, wasn't successful.
12:13:32
phoe
Because this smells of SBCL/ppc bug now.
12:15:53
shrdlu68
Same result, so it can't have been a corrupted image or anything like that.
12:19:09
phoe
try restricting the SBCL compiler policy
12:19:50
phoe
and then recompile ironclad.
12:19:56
phoe
and try running sha512 again.
12:50:33
chrnybo
An around-method modifies an argument, stores the rest of the arglist in REST. How to splice the arguments stored in REST into call-next-method?
12:52:09
specbot
http://www.lispworks.com/reference/HyperSpec/Body/f_call_n.htm
12:52:25
phoe
(apply #'call-next-method rest)
12:52:33
phoe
chrnybo: I think something like that
12:54:28
chrnybo
Thanks! I got confused by only quoting the call-next-method, which gave the runtime error "UNDEFINED-FUNCTION: CALL-NEXT-METHOD is called outside the body of a method.".
12:54:56
chrnybo
Sharpsign-quoting made lispworks understand what I meant to do.
15:44:29
Ukari
(funcall ((lambda (f) (lambda (&rest x) (apply f x))) (lambda (a &key x y z) (+ a x y z))) 5 :x 1 :y 2 :z 3)
15:44:45
Ukari
it seems that &rest can passing all the arguments ?
15:47:23
Ukari
i mean use a funtion to wrap another, so it need passing all arguments
15:47:36
shka
Ukari: well, i guess you just figured this out
15:48:33
shka
well, it works exactly as you think it does
15:53:26
jusss
(a b) is (a b . nil) ((lambda (x) x) 3) how turn to dot-pair?
15:55:12
jusss
Bike: wow, ((lambda (x) x) 3 . nil) can run
15:56:44
TMA
jusss: ((lambda . ((x . nil) . (x . nil))) . (3 . nil))
15:57:35
jusss
TMA: wow, this can run too
15:58:29
Ukari
(list 1 2) eql (cons 1 (cons 2 nil))
16:00:01
beach
Ukari: Not in general, no. EQL can not be used to compare lists, other than for identity.
16:00:54
jusss
((lambda (x . nil) x . nil) 3 . nil)
16:01:14
Ukari
you are right, it seems should use equal
16:03:40
jusss
and why this can't run in lisp-1?
16:04:04
beach
jusss: What makes you think it can't?
16:04:27
jusss
beach: ((lambda (x) x) 3 . '())
16:04:46
shka
jusss: lisp-1 == single namespace for variables and functions
16:05:09
jusss
shka: beach , fine, I mean scheme
16:05:41
beach
jusss: What makes you think it won't run in Scheme?
16:05:59
beach
jusss: Your last example is not equivalent to the previous one.
16:06:15
shka
so stuff like (let ((l (list 1 2 3))) (flet ((l (a) (elt l a))) (call-me-maybe l) (l 1)) is complete crap in lisp-1
16:07:14
beach
jusss: ((lambda (x) x) 3 . nil) is not the same as ((lambda (x) x) 3 . '())
16:07:33
phoe
((lambda (x) x) 3 . nil) vs ((lambda (x) x) 3 . (quote nil))
16:07:35
shka
jusss: 3 . nil -> cons cell wirth first set to 3 and rest to nil
16:07:45
beach
jusss: But (lambda (x) x) 3 . nil) should work fine.
16:07:59
jusss
beach: but scheme don't have nil
16:08:37
phoe
jusss: replace all nil with ()
16:10:20
jusss
((lambda (x . ()) x . ()) 3 . ()) works!
16:17:15
jusss
can we turn ((lambda ...) 3) into (lambda ...) form?
16:17:57
beach
jusss: Can you be more specific about what you want to do?
16:18:17
beach
jusss: Is the "turning into" supposed to be done by a computer or by a human?
16:19:02
beach
jusss: Furthermore, a "lambda form" is just data. Perhaps you mean "a function"? They are not the same.
16:19:31
jusss
beach: ((lambda (x) x) 3) turn to (lambda .. 3 . nil) just one brace
16:19:55
beach
jusss: Sure, remove the first parenthesis.
16:20:09
beach
It won't be the same thing of course.
16:20:23
shka
jusss: what exactly do you want to write?
16:20:32
beach
jusss: Oh, you want them to mean the same to READ? No that can't be done.
16:21:23
beach
jusss: When READ has processed the first one, it is a list with the CAR being another list. But when READ has processed the second one, it is a list with the CAR being the symbol LAMBDA.
Friday, 21st of April 2017, 16:41:07 UTC