freenode/#lisp - IRC Chatlog
Search
6:31:02
beach
pillton: Which reminds me, the world is pretty biased toward the northern hemisphere. Take "Google summer of code" for instance. Do they put that on in December in Australasia?
6:52:31
loke___
They do have an office in Sydney. I went there for an interview a few years back. At the time they did the Google Docs development there.
6:54:03
Zhivago
But I'm also fairly confident that Summer of Code is using the northerly notion of Summer.
7:17:30
phoe_
beach: most of the habitable land and most of the population lives on the northern hemisphere, so the bias seems to have some foundation.
7:20:41
flip214
beach: historical convention is the best apology I can offer for "us" (as in the Northern Hemisphere)
7:42:15
flip214
beach: found another reason... having "us" in the upper half means that the unwashed hands land on the lower portion of the map, and not on the clean desk ;)
7:55:34
beach
Progress report on lambda-list parsing using Earley: First, I got everything working on normal S-expressions. Then I started modifying the code to work on concrete syntax trees (CSTs) instead (which was the purpose of the entire thing). It now passes the tests for ordinary, generic-function, and specialized lambda lists. That means that the Earley parsing code is basically working.
7:55:40
beach
For the remaining lambda-list types, the modifications I have to deal with have to do with getting the "test parsers" working. Recall that I am testing the lambda-list parsers by having a set of parallel parsers (called test parsers) that work differently.
7:55:42
beach
I then compare the parse trees generated by the "normal" parsers and the "test" parsers on a large number of randomly generated lambda lists. This technique means I have to write a significant amount of test code, but it is definitely worth it.
7:56:51
malice`
Hi! I've got a code with drakma http-request. I sometimes get 500, and when it happens I want to retry the request (until I get the answer). I've set up a handler-bind for the error I get. How should I setup the restart?
7:57:32
malice`
I am thinking of (restart-case (my-call) ((try-again (my-call)))) (where my-call is drakma:http-request ...), but I'm afraid that I might get 500 second time and it won't be handled. Am I right?
11:18:26
pillton
beach: Nice work with the Early parser. Writing lambda list parsers is such a pain.
11:19:44
pillton
beach: https://github.com/markcox80/specialization-store/blob/master/tests/lambda-lists.lisp#L45
12:06:44
beach
pillton: Thanks. I made my life harder, because this is Cleavir, so what is a valid lambda list could be extended by the implementation.
16:05:39
kefin_
I have (define-alien-routine "read" size-t (fd int) (sb-alien:void-alien buf) (size-t offset)) currently
16:13:26
nosefouratyou
I am trying to parse some json but I am getting results that don't make sense. It seems that (jonathan:parse ...) isn't modifying the result at all https://gist.github.com/nosefouratyou/bd4907f3de763c36abed39f502e0d6e0
17:12:03
phoe
to be more precise, in Lisp, stuff like (compile nil (lambda (x) (+ 'foo x)) will compile (and most likely produce a warning) and then, when you run it, produce a runtime error. but that's what you get for having a language with strong but dynamic typing.
17:15:14
phoe
nonetheless, type detection in some Lisp implementations (including the most popular ones) works decently, which is why you get that type warning during compilation.
17:18:43
pjb
adlaistevenson: the point is that the lisp systems validate the correctness at run-time, because it can change at run-time!
17:19:18
pjb
adlaistevenson: when you write an AI that learns, and compiles new knowledge into itself at run-time, you cannot prove it ages before.
17:21:02
pjb
adlaistevenson: furthermore, there is indeed the important question of what you call correctness: all lisp data is valid and correct lisp program (well almost, you can declare safety 0 and get a bunch of undefined behavior). But otherwise, you should always have controlled ie. "correct" execution, at the most basic level.
17:21:47
pjb
adlaistevenson: there can be an incorrect program, ie. a bug, only if you have a specification to check the behavior of the program against. To let do that by the computer, you will need a FORMAL specification.
17:23:14
pjb
It correctly signals a program-error (or an error, depending whether you pass it to the compiler or the interpreter).
17:23:41
Bike
checking that an algorithm implements a function isn't NP-hard. why would it be NP-hard? it's impossible. but for specific cases it's reasonable.
17:24:21
phoe
Bike: "when you write an AI that learns, and compiles new knowledge into itself at run-time, you cannot prove it ages before."
17:26:00
pjb
Often even multiple times the expected lifespan of all the universes in the multiverse.
17:28:16
Bike
whatever. lisp question. what happens if you use a forward-referenced-class as your metaclass.
17:29:37
pjb
If the metaclass cannot be finalized, there's no way to use it to even create a non-finalized class, so nothing can help.
17:30:52
Bike
actually, wait, to be a metaclass it has to be finalized, so the defclass with the :metaclass should finalize it at compile time (or if that's impossible, signal an error)
17:48:59
drmeister
If I break up a job across 8 threads and set them all in motion - does it make sense to have a loop that does JOIN-THREAD on all of them to synchronize with them all?
17:50:33
drmeister
(let ((threads (loop for x in jobs collect (make-thread #'(lambda (job) (do-job job))))) (loop for x in threads do (join-thread x)))
17:55:02
pjb
Granted, it may be needed more often in threads to collect the result, but honestly if you use threads, it's probably because the problem is more parallel than sequential, so you don't have a single result at the end in general, but you will have computed vectors of results during the processing.
17:55:43
pjb
drmeister: we fork more often than we wait for children, because synchronization with the termination of children is rarely needed.
17:56:46
pjb
In case of threads, often they will mutate a common data structure, so the final result is already synchronized around those mutation, and we don't care when it's complete.
17:57:07
pjb
My point is that it make sense to use join-thread, but also not to use it, when you don't need to.
17:57:55
drmeister
In this case I need to aggregate all of the results together. But I think now I'll use a thread pool and farm off smaller jobs to them. I have about 300 C++ source files that need to be analyzed to identify pointers in classes within the code. They can be analyzed in parallel - but the results need to be aggregated to generate code for a garbage collector.
17:59:01
pjb
drmeister: yes, if you keep worker pools, and initiate tasks by messaging them, you will get the results thru some messaging, and not at the end of the thread (they will be infinite loops). In this pattern, you don't need join-thread (it'd block forever).
18:01:44
drmeister
Hmm, I just incorporated a non-locking multi-producer, multi-consumer queue - I could use those here.
18:03:11
scymtym
drmeister: it make this kind architecture quite easy. e.g. https://lparallel.org/pmap-family/