freenode/#lisp - IRC Chatlog
Search
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 >
7:12:21
phoe
beach: Have you done any work on a spellchecker? I remembering you having such a project once.
7:16:17
beach
Also, if it includes the word categories possible for each one, that would help the future grammar checker.
7:17:45
phoe
I'll try munching on https://github.com/robert-strandh/Spell/blob/master/Lisp-Wordlist/spell.lisp in a spare while today.
7:36:52
phoe
beach: it's not really a Lisp question, but, we have a tree (or even, a trie) of words like the ones that you have constructed. That way, we can look up words that are correct.
7:37:32
phoe
Now, based on that, we need an algorithm that will look up suggestion for words that were not found. For example, we have "across" in the example dictionary that you created, and we'd like it to turn up as a suggestion if we type "acros".
7:39:30
phoe
I also assume that you want to be automatically able to parse the english-* files in your repository and create entries based on each line inside them.
8:17:45
beach
shka_: Faster lookup won't be necessary. Most of the time, the exact match will be found, and when it is not, it is more important to get good advice that to get good performance.
8:18:30
xificurC
given this cl-i.asd file: http://ix.io/1lDG I can (asdf:load-system :cl-i) and get T but (asdf:test-sytem :cl-i) just returns T without actually running the tests. Is there some glaring error in the definitions of the systems?
8:19:18
beach
shka_: But we don't have that, so wee need to think about simplicity and maintainability.
8:19:38
xificurC
for the record I cannot (asdf:load-system :cl-i-tests) this way. I'm not sure what is the idiomatic way to organize a library and its tests
8:21:13
Shinmera
Here's a working example for tests https://github.com/Shinmera/3d-vectors/blob/master/3d-vectors-test.asd https://github.com/Shinmera/3d-vectors/blob/master/3d-vectors.asd
8:22:17
beach
xificurC: ASDF finds the system based on the name of the file. So if the name of the file is not cl-i-tests.asd then it won't find your system.
8:22:38
jackdaniel
beach: in fact it will, because in order to find cl-i (which is tested) it must load whole asd
8:25:31
jackdaniel
xificurC: if you define it in the same file, way recommended by asdf authors is to name it cl-i/tests
8:26:32
xificurC
I was copying this - https://gitlab.common-lisp.net/asdf/asdf/blob/master/doc/best_practices.md#trivial-testing-definition
8:27:41
jackdaniel
magic name conventions affecting library behavior are something what makes my day ;)
8:33:07
scymtym
i guess the SYSTEM/SUB-NAME naming requirement for defining multiple systems in the same file was chosen because SYSTEM/SUB-NAME.asd would not be a valid filename
8:34:06
phoe
beach: just a minor finding, you defclass NODE but don't use it as a superclass of anything later on.
8:34:13
jackdaniel
I'm aware of that, still it is just one step from making comments affecting inner workings of your library
8:36:01
xificurC
I have no idea why this isn't working. Before I had 2 asd files but I was the best practices page do it in 1 and thought it might be cleaner
8:36:26
xificurC
so now I'm in the stage where someone might say it's cleaner, but it's not working :)
8:39:10
phoe
beach: I assume that I should, for now, focus on a way of parsing the english-* files, correct?
8:41:28
scymtym
xificurC: your example seems to work here. it returns t as you observe, but i see "Success: 0 tests, 0 checks." being written to standard output
8:42:24
beach
phoe: If you store a single character per node, it may be a bit more expensive than necessary, but that might not be a problem.
8:43:49
xificurC
I'm pushing a path to asdf:*central-registry* to get my asd found, can there be a difference in what asdf does with a system found this way? Before asking, yes, I have to.
8:45:12
beach
phoe: But many prefixes will be shared, and you don't have to store every basic form with every derived form.
8:47:49
phoe
Also, one more thing - I don't even have to store the final forms of the words in the leaf nodes. The tree structure is enough.