freenode/lisp - IRC Chatlog
Search
0:15:52
didi
What do you think of my `find-sorted' function: https://paste.debian.net/hidden/d4868f9e It finds an item inside a sorted sequence. The purpose is to stop short if the item can't be beyond a certain point.
0:23:00
nyef
But under the circumstances, if you're even trying this, the list is probably the wrong data structure in the first place.
0:27:43
TruePika
quick question, is anyone else having DNS lookup issues from Google's servers? I can't check anywhere other than IRC without a DNS...
3:25:49
drmeister
Does anyone do much multithreaded programming? Does a condition-variable pass a mutex from one thread to another?
4:21:15
H4ns
drmeister: no, a condition variable complements a mutex. one thread grabs a lock on the mutex, then waits for the condition variable to be posted. when the wait returns, the condition variable was posted by another thread and the mutex is locked.
4:21:49
H4ns
drmeister: it is basically a low-level protocol that can be used to implement e.g. semaphores or other higher-level constructs.
4:23:10
H4ns
drmeister: like all things concurrent, condition variables are not very easy to explain and i may have done a terrible job at it :)
4:24:46
l04m33
drmeister: as for ECL, it avoided pthreads on purpose, for some portability reason iirc
4:35:48
drmeister
l04m33: I see. It uses pthreads for threads themselves, but not mutexes or condition variables. It also uses pthreads rwlocks.
4:37:07
drmeister
Clasp uses pthreads mutexes and condition variables. They don't mix well with some of the Common Lisp code in the ECL "MP" package.
4:53:22
drmeister
l04m33: Not quite. I implemented process, mutex and condition-variable types in C++ using pthreads. Then I copied the ECL mp.lsp Common Lisp source thinking that it would work unchanged with my process, mutex and condition-variable types. This has worked over and over again as I've developed Clasp. Not this time though.
4:54:03
drmeister
The ECL implementation of mutex keeps track of the mutex owner. I had fudged something that didn't quite behave the same way and so mp:with-lock didn't work properly.
4:54:36
drmeister
This may come back to bite me - maybe the reason why ECL implemented mutexes was because pthreads mutexes don't keep track of their owner and it's necessary for some reason.
4:55:03
drmeister
But when I changed the implementation of mp:with-lock, now all of a sudden slime works in :spawn mode with Clasp again.
5:00:24
l04m33
drmeister: I stumbled into some article explaining why ECL dosn't use pthread condition variables, but I can't find it atm
5:11:39
l04m33
drmeister: they wanted to support Windows, not quite relevant to your problem here though
5:12:05
mkennedy
When I'm looking at a disassembly of a function in SBCL, it often says up the top "; no-arg-parsing entry point" What is meant by that?
5:24:50
phoe
If Franz can roll with their own CL specification based on dpANS2, then I can roll my own CL specification based on dpANS3.
5:42:37
jackdaniel
shrdlu68: check out https://common-lisp.net/project/ecl/static/ecldoc/Extensions.html#System-building
5:47:19
drmeister
https://usercontent.irccloud-cdn.com/file/uB5kqu1b/set-pprint-dispatch-mir0.dot.png
5:49:23
drmeister
I'll have to investigate further why it didn't dump the mir of what we wanted it to dump.
9:07:23
JuanDaugherty
anybody know of a work with shrdlu besides the evident stuff, tsgouros, the resurrection 10 ya, e.g. a port to sbcl
9:08:06
jackdaniel
ryanwatkins: this may be related: https://sourceforge.net/p/sbcl/mailman/message/34821303/
9:09:11
beach
ryanwatkins: You can use the Cleavir compiler framework and define a WebAssembly backend for the intermediate format.
9:56:02
White_Flame
flip214: I don't think parenscript would help. There's no JS-isms in webasm, so converting to JS is a sidetrack
9:57:21
White_Flame
It will be interesting to see if webasm will allow you to specify your own ABIs, multiple environmental stacks, etc, in a way that's sensibly fast. I think that it's also supposed to support GC languages in the future; whether it will offer its own GC or just tools tob uild one, I'm not sure
10:50:37
dxtr
I'm getting some issues with äåö in filenames (Don't ask me why someone has put that in the filename)
10:55:26
beach
I just created a file named åäö with two lines of text in it. Then I did an (open "åäö" :direction input) and I was able to read the contents.
11:00:21
beach
That seems correct then. If you send those characters by a network, they are going to be converted to UTF-8.
11:00:36
dxtr
I am PUTing a file with ZS3 (Which I think is using drakma under the hood) and somewhere along the lines it isn't doing the correct thing with åäö
11:01:42
H4ns
dxtr: you'll have to encode the name in the url properly, and that is somewhat of a pain. i think your safest bet is to encode the name externally and make drakma not try to encode the url. there is an option for that.
11:05:09
Xach
That is not to say there are no bugs, but at least it is not a completely unknown situation
11:05:23
H4ns
dxtr: drakma has a url-encode function in utils.lisp which also accepts an external format.
11:15:31
Xach
dxtr: the encoding comes into play when converting to and from sequences of non-characters.
11:22:18
Xach
dxtr: in common lisp, nesting defuns is never done. if you want local functions, flet or labels are the things to use.
11:54:17
dxtr
I even tried (remove-if) with (lambda (c) (find (char-downcase c) "åäö" :test #'char-equal))
11:55:52
jdz
dxtr: also, why do you do CHAR-DOWNCASE if you use CHAR-EQUAL (which is case-insensitive)?