freenode/#lisp - IRC Chatlog
Search
20:38:42
drmeister
With Common Lisp CFFI - what is the idiomatic way to allocate an array of characters that I can pass a pointer to a function that will fill it with a zero terminated string. I know the maximum length of the zero-terminated string.
20:41:12
lacedaemon
with-foreign-string will allocate a Lisp string, copy it into C uselessly just so it can be overwritten
20:43:10
lacedaemon
with-foreign-pointer-as-string will do that, see the example in https://common-lisp.net/project/cffi/manual/html_node/with_002dforeign_002dpointer_002das_002dstring.html
23:15:25
dim
drmeister: I had a weird dream/idea the other day with CL and the .Net platform wherein someone would do the same as you did with LLVM and clasp, only targeting the .Net IR thingy this time, so that you could have basically CL#
23:15:47
dim
I'm not sure if I should thank you for that too, adding to CANDO and clasp, but well ;-)
23:17:41
dim
IBCL or something yeah, I think, based on IKVM which is a Java layer for the CLR, and ABCL, I believe
2:13:01
pjb
(defparameter *deutsch-woerter* (make-dictionary)) (dictionary-add-word *deutsch-woerter* (make-word "arbeit")) (dictionary-add-word *deutsch-woerter* (make-word "haus")) ; etc.
2:15:09
pjb
Your dictionary can also have some smarts, (dictionary-find-word *deutsch-woerter* "Häuser") -> #<word "Haus" :plural :nominative>
2:16:49
pjb
DICTIONARY-FIND-WORD could be a high level linguistic operator. (word-case (make-word "Häuser")) -> :nominative can be a high level linguistic operation.
2:18:21
ThomasLewis[m]
I would use a word class and a dictionary class with a hash table keyed to the word with the values being instances of word.
2:18:48
pjb
for example. It doesn't matter what you use. What matters is what abstraction you're designing and using.
2:18:56
ThomasLewis[m]
You could even make the slots containing the hash tables indexed by letter, type, or whatever.
2:19:15
pjb
Once you've defined an abstraction, you can change its implementation at will, therefore it doesn't matter if you use a a-list, a hash-table or noodles.
3:09:36
no-defun-allowed
member for lists, find for sequences, position for sequences if you want the index
3:15:14
didi
I don't know I'm disappointed by TYPECASE macroexpasion. I guess I was expecting something more obscure than a COND with a bunch of (typep ...) clauses.
3:18:09
didi
pillton: I don't think so. I strictly used type so I could use some kind of compiler magic or whatever. Oh well.
3:19:58
pillton
I'm sure the applications of typep will get transformed in to that during compilation.
3:20:10
pjb
(search (list "Mapple") (list "Apple" "Mapple" "Zappel") :test (function equal)) #| --> 1 |#
3:20:50
pjb
(search (list "Mapple" "Zappy") (list "Apple" "Mapple" "Zappel") :test (function equal)) #| --> nil |#
3:28:31
gendl
If you make the browser window very long, you get a horizontal scrollbar, and I can't see why (but that's really more of a web dev question not a lisp question.. just putting it out here in case the spirit moves anyone to look at it.)