freenode/lisp - IRC Chatlog
Search
10:16:32
phoe
the list of definitions for a word is triival with any data structure, a proper prefix is pretty trivial with a trie, but word similarity - that's something that I don't know how to solve.
10:17:26
phoe
Especially since we don't want to input two words and get some "percentage", we want to input a word and some "percentage" threshold and get all the words which are within that threshold of similarity.
10:21:58
phoe
It looks like https://en.wikipedia.org/wiki/Approximate_string_matching will help us here.
10:24:31
phoe
beach: https://github.com/mikaelj/snippets/blob/master/lisp/spellcheck/spellcheck.lisp also, that's what Google tells me.
10:36:47
Jonsky
C-c C-v in slime mode is bound to lisp-show-variable-documentation. I want to unbind it so as to use C-c C-v TAB for inspecting representations. Tried "local-unbind-key" but it didn't work. What should I do?
10:37:03
jdz
phoe: I've recently come across this: http://gbbopen.org/hyperdoc/ref-double-metaphone-entities.html
11:08:10
splittist
I can see a trie being useful for autocomplete, but when I misspell things it's not usually at the end.
11:24:08
beach
phoe: what is missing from most existing projects is the part about word category. I want this so that the spell checker can ultimately be part of a grammar checker.
11:26:06
beach
jdz: Yes, very interesting. It would be great to suggest corrections that are related by similar pronunciation.
11:27:28
beach
splittist: My idea is to highlight the word with a different color when it is "complete", "complete but not unique", "prefix of a complete word", "not a prefix of a complete word".
11:28:03
beach
ACTION thinks that now #lisp participants are going to say something like "I would NEVER use anything that annoying".
11:36:13
beach
ACTION takes a break, contemplating near-misses based on the representation of the word in the phonetic alphabet.
12:08:49
otjura
is there a simple list of types I can use in DECLARE? hyperspec is reeeeaaly confusing on that or I am reading wrong pages
12:24:38
otjura
pjb: thanks, yep was browsing wrong pages. so they are called "system classes" in hyperspec. interesting.
12:29:31
otjura
I also just now noticed hyperspec lists some functions as simply "Function", while some are "Standard Generic Function", and I don't honestly understand practical implications of latter just by glossar
12:31:15
White_Flame
generic functions can be overloaded with new methods that dispatch on their parameters
12:32:03
White_Flame
lisp method dispatch doesn't dispatch on object type, because methods aren't on objects. They're toplevel functions that dispatch on the types of their parameters
12:32:50
phoe
otjura: generic functions have different behaviour that depends on the classes of objects that are passed to them
12:38:26
phoe
*specialize - this thing we did up there, where we also provided class names next to the function argument names
12:40:32
otjura
and in CL lingo what I think is type (float) is a standard class, right? so I can specialize DEFMETHOD on it?
12:42:58
otjura
interesting how in all other languages I know stuff like FLOAT and CHARACTER are known as types. in CL they are system classes.
12:43:44
pjb
otjura: now all classes have a correponding type and type specifier with the same name.
12:44:40
pjb
White_Flame: generic function dispatching is not done on the type of the parameters, but on their classes!
12:45:58
White_Flame
actually yeah, I thought I tried to avoid etiher type or class, but used type since that's what was being discussed
12:47:07
pjb
otjura: and instead of declaring the type of parameters, I would advise you to rather use check-type.
12:47:35
pjb
(or you can use declare locally after check-type, but a compiler for which types would matter would infer that automatically.
12:49:00
pjb
write: (defun f1 (x) (check-type x fixnum) (locally (declare (type fixnum x)) (the fixnum (truncate x 2))))
12:49:51
pjb
(f1 'foo) will signal an error with a restart to provide a correct value, while (f2 'foo) will have nasal daemons with (optimize (safety 0)).
14:01:22
beach
thinkpad: CLISP is currently not one of the well maintained implementations of Common Lisp, so don't worry about it.
14:34:02
pjb
beach: on the contrary, currently CLISP is one of the most maintained implementations of CL.
14:39:06
d4ryus2
When i have a thread which transfers data from a file to a socket, would it be save to call file-position (on the file-stream) from another thread to check the progress?
14:44:41
pjb
d4ryus2: some implementations have an attribute on stream to allow or prevent sharing of streams amongst threads.
14:44:58
loke___
I'm looking at the Feb messages. I'd have hoped to see some kind of ananouncement...
14:45:52
pjb
loke___: it never was stopped! Only CL development works more like pitch drops than water flow.
14:46:49
pjb
d4ryus2: perhaps other implementation specific semantics could be imagined for file-position with respect to "threads".
14:47:22
pjb
d4ryus2: However At the POSIX level, each file descriptor has its own file position. So assuming stream = file descriptor, then file-position could work, as long as the stream is accessible across threads.
14:48:05
pjb
d4ryus2: In any case you can easily report progress from the reading thread, by storing the file position in a global variable or using a callback.
15:30:29
nyef
Hunh. I think that the one NuBus card that I have that can (in theory) do more than 640x480 might be more-or-less working, just putting out a signal that the CRT doesn't like.
15:34:54
msmith
Any one know if there is a way to get the number bytes in a stream? I'm looking into the flexi streams library but was wondering if there was another way.
15:39:33
nyef
Does anyone know if a MacIvory 2 will work in a Quadra 800, or if it definitely won't?
15:39:43
warweasle
My brain is not working. How do you export a symbol from another package without using defpackage?
15:40:06
msmith
loke___ will that only work with streams associated with a file? what about socket streams?
15:41:49
loke___
msmith: That's not really possible either. Exactly what is it you're trying to achieve?
15:42:54
msmith
loke___: I'm trying to use read-sequence on a socket stream in a way that doesn't block
15:43:40
nyef
Hrm. Physically fits in the case, but the MacIvory 2 board itself takes up a slot and a half of space, and collides the case plastic in the uppermost slot, so overall it uses up all of three slots.
15:44:51
msmith
loke___: It's been a while, but I thought that if I read to a sequence of a certain size, it will block until there is enough data to fill the sequence
15:45:47
nyef
Upshot: No chance of having a second ethernet interface, and the onboard is unlikely to work with Genera.
15:47:20
loke___
msmith: I'm checking the CLHS, and the text seems to agree with you. However, I was sure that it returns immediately and returns the index of the last byte
15:47:39
warweasle
FYI: Clinch has plugins which add symbols after the package is defined. That's why I'm using the functions.
15:49:22
msmith
loke___: I was looking a output-stream-sequence-length in the flexi-streams doc. Seems like my best bet
15:50:15
msmith
I think that, if implemented , a server using read-sequence instead of reading one byte at a time would be very fast
15:55:14
beach
warweasle: You seem to want to access the symbol print-text in the pango package from some other package, right?
15:57:55
beach
warweasle: If it is already exported, why did you ask how to export a symbol from a different package?
15:58:29
msmith
warweasle: what's wrong with just accessing it with two colons? You don't want the name pango to appear in your code?
15:58:54
warweasle
beach: So I don't need the pango:print-text header and I can use cairo:print-text.
15:59:44
beach
warweasle: I have no idea what these packages do or how they are organized, so I can only help you if you describe what you want to do in abstract terms. Maybe someone else can help instead.
16:00:32
beach
warweasle: My question remains though. Why did you attempt to export a symbol that was already exported?
16:01:01
beach
So, just say pango:draw-text when you want it, and say cairo:draw-text when you want that.
16:02:39
warweasle
beach: It forces the user to know about cl-pango. It should be transparent from clinch and I only use 3-4 functionsfrom pango.
16:02:42
beach
warweasle: It is usually best not to :USE any packages other than the COMMON-LISP package in case that is your problem. Using explicit package prefixes makes your code clearer in the first place.
16:03:31
warweasle
I could just make a pass-through function: (defun clinch:print-text (args) (pango:print-text args...))
16:06:10
beach
warweasle: Like I said, it is much clearer to use explicit package prefixes than to :USE or IMPORT.
16:06:49
beach
warweasle: For something called PRINT-TEXT, it is unlikely that the overhead of a function call is going to make a difference, so I recommend you don't INLINE it.
16:40:34
jmarciano
I am often using (nor (zerop (length string to see if string is "", is there any simpler method?
17:20:31
nyef
Switching monitors got the Futura MX board working, but it still won't go past 640x480 for some reason. /-:
17:29:16
nyef
Oh, and the drive imaged into an SD card boots on the SCSI2SD, which is good to have confirmed.
17:31:32
nyef
Fare: Maybe? I'm out-of-position for attending, unfortunately. Though I may make hurried travel plans if necessary. (-:
17:44:38
nyef
pjb: Supposedly, the adaptor *does* encode the resolution. But the various settings lead to either "no signal" or 640x480. Trying to swap out for a different adaptor now.
17:46:50
pjb
You're in second generation displays: The Macintosh Color Display (14", 16" and 21") were introduced with resolutions of 640x480, 832x624 and 1152x870, with the 16 and 21 inch models being introduced in 1992, and the 14 inch model coming out with the Macintosh LCIII in 1993.
17:48:19
pjb
DA-15 connector, I assume: https://en.wikipedia.org/wiki/D-subminiature Check the table Normal density / High density / Double density.
17:54:47
nyef
I'm about two steps short of giving up, trying to run in 640x480 for the moment, and ordering another video card for the future.
17:57:22
pjb
http://www.ebay.com/p/apple-21-color-monitor-video-cable-6-feet-long-pn-590-0615-a-db15-to-13w3/1501476426?iid=112318911706
17:59:10
pjb
Not listed on ebay anymore, but there are hundreds of those cable in a box in some second hand computer shop. The problem is to locate it.
17:59:35
Fare
ACTION had his LispM @ 1600x1200, only to find out that the Mac and/or LispM had trouble displaying in 24-bit color.
18:35:13
nyef
I have two VGA adaptors. Both with DIP switches. One a ViewSonic, one a "MacPnP". Neither has managed to coax more than 640x480 out of this card.
18:57:33
nyef
... And, unlike using windows, it seems that I need to reboot every time I change some setting or other. What an odd turnaround.