freenode/#lisp - IRC Chatlog
Search
18:05:37
pjb
In lisp you would want an implementation that offers real-time guarantees with the garbage collector for example.
18:05:43
jackdaniel
if it is lisp, you have a gc puzzle to solve (though it's something possible to overcome from what I've heard)
18:06:05
pjb
Or at least, an implementation where you can disable (temporarily) the garbage collector.
18:06:41
pjb
You could become instant lisp hero, by implementing a real-time garbage collector in some CL implementation (eg. sbcl or ccl).
18:07:40
pjb
Now, while there's little guarantee, you could study the GC algorithms used, and compute an upper limit to the time spent by the GC, given the memory size.
18:09:23
pjb
The point here is that hard-real-time is parameterized by a response time, and this response time doesn't need to be small.
18:10:58
pjb
For example, you get a telemetry packet from a sonde on Mars. You guarantee that you can answer back command in one hour ± 30 second. top
18:14:03
pjb
Have a look at com.informatimago.common-lisp.cesarum.activity ; there are others in quicklisp too.
18:16:51
pjb
razzy: note that real-time and run-time are given in more precise increments than universal-time, but they're not based on a specific epoch. I have code to adjust them to the same epoch as universal-time.
18:18:01
pjb
mkdir -p ~/quicklisp/local-projects/com ; git clone https://github.com/informatimago/lisp.git ~/quicklisp/local-projects/com/informatimago
18:19:10
pjb
(ql:quickload :com.informatimago.common-lisp.interactive) (use-package :com.informatimago.common-lisp.interactive.interactive)
19:37:06
shka_
anyway, i think that there is no way to make handler-bind work with transfered errors
19:40:19
pjb
(handler-bind ((error (lambda (err) (return (send-condition-to-other-trhread-and-get-answer err))))) (do-something))
19:41:44
pjb
Now, in the other thread, dyou don't need a hander-bind, you can just handle the condition when you receive it. Since it must return the result and send it back to the original thread for handling by handler-bind.
19:42:03
shka_
pjb: just one question: do you think that i can make interactive restarts thread-transparent?
19:42:55
pjb
Well, implementations usually do it the other way: they allow several thread to be in the debugger, and the user may switch the debugger UI from one thread to the other.
19:43:46
pjb
But you could do it like you want. You only would have to collect the restarts in the debugged thread,a nd pass them along with the condition, to let the debugger thread do the UI, and return back the decision.
19:47:28
pjb
Now, if you want to use an existing debugger, you would have to restablish the restart names and resignal the condition, but you wouldn't have the same stack frames.
20:34:39
AeroNotix
(qtapropos "QString") and (find-qtclass "QString") don't seem to have it. I've ensure-smoke'd everything possible
20:55:40
phoe
AeroNotix: you can translate Lisp strings to octets, Qtools should be able to read a vector of ub8 as QByteArray
20:56:49
AeroNotix
I get there is automatic marshalign between QString and lisp strings but it wouldn't hurt to have it available, surely?
20:57:51
Shinmera
Anyway, it seems CommonQt unmarshals char* to String, so maybe just QByteArray::data will get you a string?
21:00:59
Shinmera
Well the problem with the QtWebKit bindings available from CommonQt is that they're real old by now :/
21:02:05
phoe
Shinmera: I'd prefer something offline - I'll be deploying an app and I don't want everyone to share the same key.
21:03:34
jmercouris
phoe: look for stuff that is in public domain, I'm sure there is something on project gutenberg
21:05:40
Shinmera
phoe: bundle hunspell or something would be my suggestion, if that feature is really needed at all.
21:07:18
edgar-rft
phoe: make creating a dictionary part of the game and let the users write it themselves
21:09:01
jmercouris
I don't have a good internet connection at the moment, otherwise I would link a few
21:09:08
edgar-rft
dictionary data is dead easy to get but to sort out the unwanted stuff takes ages
21:09:51
jmercouris
I've been working with NLP tools, and I think that the community has done a great deal to ensure quality, accessible data exists
21:10:39
jmercouris
also what is unwanted stuff? infrequently appearing definitions? very easy to remove them when you just do some simple statistics on a corpus
21:12:35
edgar-rft
jmercouris: dictionary data tends to be *huge*, rolplayers do not need to waste gigabytes of ram for dictionary data like NLP folks usually do. They often only need a subset of a big dictionary, therefore my suggestion to let the users write the dictionary themselves
21:13:21
jmercouris
well, maybe you can scrape forums of roleplayers or their conversations on twitter, and then determine which words need to exist as definitions
21:13:38
jmercouris
then you could also automatically extract definitions from where they exist in the corpus by training a model
21:14:01
jmercouris
people generally start definitions in the same way, so you wouldn't need a very large training set to get meaningful results
21:14:31
phoe
Dictionary lookups are going to happen a few times per minute at most, I'm fine with accessing a flatfile and fseeking to it as long as I have an index
21:18:31
edgar-rft
As a non-english speaker I often skim dictionaries for learning interesting words, I assume phoe wants it for similar purposes
23:02:38
ealfonso
can I write a nested destructuring list macro argument as an &optional or &key argument?
23:04:15
Bike
like if you have (&key (x y)) it will interpret that as keyword :x, variable x, default y
23:06:58
jasom
ealfonso: oh, be aware that (uiop:pathname-parent-directory-pathname #p"/foo/bar") => #p"/" because the parent directory of the file bar in the directory /foo is /
23:08:17
jasom
ealfonso: if you want to have the parameter always treated as a directory you can use uiop:ensure-directory-pathname on it first
23:13:51
ealfonso
Bike I want to allow the macro user to provide a two-type (sym form) where form uses sym. But I don't want to make them required
23:15:06
specbot
Specifiers for keyword parameters: http://www.lispworks.com/reference/HyperSpec/Body/03_dad.htm
23:15:44
jasom
ealfonso: note from that link the example of: (&key ((:radix radix)) ((:type type) 'integer)) ...)
23:18:09
ealfonso
I see. I guess I can replace :type with (var1 var2) and 'integer with the corresponding default to get nested destructuring?
23:21:38
Bike
so like, if you have (&key ((:type (a b) '(x y)))), you could pass :type (3 4) or something.
23:34:39
it3ration
I use Clojure in my day job and have been an Emacs hacker for about a decade - I'm trying to understand how Common Lisp handles (or if it has) any similar way of namespacing the way Clojure does
23:37:32
it3ration
specifically, in Clojure you can distinguish between the same keyword defined in separate namespaces, for example, :user/foobar
23:38:34
AeroNotix
it3ration: http://www.gigamonkeys.com/book/programming-in-the-large-packages-and-symbols.html
23:39:11
Bike
i mean, for example for &key parameters, you can use arbitrary symbols, so there's namespacing there
23:40:30
AeroNotix
it3ration: it's a good book. It doesn't treat CL as some kind of God Language like a lot of other SLW books do
23:41:03
serichsen
Ah sorry, FSET is not exactly right, but there are several hits for "common lisp lazy" on duckduckgo.
23:42:48
it3ration
I've been pretty spoiled by Clojure's immutability, concurrency primitives, laziness, and consistency - I've used Emacs Lisp for years but never played with CL, it's very different from Clojure
23:44:15
AeroNotix
it3ration: aside from core.async do you actually use the other primitives regularly? I wrote clojure for a couple of years professionally and none of my problems fit those use-cases
23:46:09
p_l
it3ration: you can write :ns/keyword style in CL, it will just bundle the whole thing after : as symbol name
23:56:44
AeroNotix
it3ration: yeah, just interested in what you actually use. I never found any of them fit many problems. ESPECIALLY the STM
0:36:55
jasom
It seems to be more common to explicitly iterate over a generator function rather than have a lazy list
0:41:37
aeth
What's the best way to assert two things? If you assert them separately, you risk the user correcting the 2nd assert by providing something that fails the 1st assert. If you assert them together, then the user does not know which of the two failed in particular.
0:52:04
aeth
The only thing I can think of right now is doing the assertion test twice, once together in the assert and then again in the error message.
3:39:22
earl-ducaine
A style question for Lispizens! I've always considered &aux barbaric. But I realize such conventions are usage driven more than from a perspective of practicality.
3:39:24
earl-ducaine
A quick survey of local ql seem to indicate that it's a rare usage, but not absent. Do people have strong personal preferences? Have they seen code where its usage is styalistically prefered in certain contexts?
3:56:02
drmeister
Say you are in the process of typing in form: (foo (bar "this is a" 1 2 3 <point> . What libraries would help me find "bar"?
4:00:07
drmeister
Object? It's part of the standard - it's handy when you want to define a compact lambda.
4:08:35
drmeister
beach: Say you are in the process of typing in form: (foo (bar "this is a" 1 2 3 <point> . Could eclector help me find "bar"?
4:10:01
beach
I am not sure whether scymtym has finished the possibility of parsing incomplete input, but it is planned.
4:11:49
drmeister
I can get the position of point in the parsed expression by comparing the source location of each cst element to the position of the <point>?
4:14:48
beach
You would probably do a tree search. Start with the root, figure out in which child it is, search that child recursively, until you are either in a leaf, or between two children.
4:45:04
no-defun-allowed
okay, very important style question here: should i spell quanti[zs]e and normali[zs]e with a Z or S?
4:54:34
no-defun-allowed
i already went with "colours" too so i guess i'm stuck with british english
4:56:48
no-defun-allowed
i'm working on a simple video effect processor cause kdenlive's green screen is horrid
4:58:43
edgar-rft
The CL ANSI spec is an american thing. The arpanet was too slow at that time so communicating with europe was abandoned (if I know that right).
5:00:31
jackdaniel
"arpanet was slow"? how long did email travel from us to europe? maybe they should use the postmail
5:01:17
jackdaniel
from what I've read (I don't remember the sources) they simply didn't include europe because were not interested in suchc cooperation
5:02:37
jackdaniel
but according to this you are right: http://www.nhplace.com/kent/Papers/cl-untold-story.html
5:03:01
edgar-rft
jackdaniel: section 3.3 "The exclusion of Europe and Japan" in <http://www.nhplace.com/kent/Papers/cl-untold-story.html>
5:04:38
jackdaniel
otoh one could argue, that Kent Pitman was one of these guys. who'd say: "because *we* didn't want to cooperate with them" ;-)
5:05:12
edgar-rft
...and of course there was no arpanet outside of the US, but I don't know what else they used for email at taht time
5:05:44
oni-on-ion
we have lisp in prolog and prolog in lisp, in several ways. what about symbolics network, was it called ghost ?
5:05:48
PuercoPop
Is there a way to 'right align' with format when specifying a width? ej. "depth ~2A" where the A is going to be a number. I want the extra space to be at the before inserting the number if it is only a 1 digit one.
5:22:15
no-defun-allowed
ACTION uploaded an image: foo.png (19KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/UxKpRUTiWQxnojQxWQCKBPqY >
5:25:14
no-defun-allowed
ACTION uploaded an image: foo.png (20KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/cXsPJSlBCUqrTjNLjKNvnDOl >