freenode/#lisp - IRC Chatlog
Search
15:43:42
ebrasca
I remember someone here suggested me to make my fat32 portable between CL implementations.
15:46:07
beach
Isn't it just about reading and interpreting a sequence of bytes as directories and files?
15:49:48
beach
ebrasca: Define two generic functions READ-SECTION and WRITE-SECTOR. Let them take an additional argument CLIENT. Create methods specializing on (CLIENT MEZZANO) that call the Mezzano operations with that name.
15:50:19
beach
ebrasca: Other clients can then add methods for their particular version of those functions.
15:54:22
beach
loke: As usual, I don't know. I am looking in the specification now to see whether I can find something.
15:55:02
loke
It's in these menus here I want a divider: https://github.com/lokedhs/maxima-client/blob/master/src/cm
15:55:36
loke
The documentation suggests there is a special value called :DIVIDER, but if I stick one of those into the list of entries, it doesn't even compile
16:00:23
beach
loke: It says that STRING in (string type value &key ...) does not have to be given when TYPE is :divider, but I don't know whether that means that NIL should be given instead.
16:03:36
beach
random-nick: Scheme has call/cc but Common Lisp doesn't. It could be a very costly thing to implement, plus the semantics can be very strange if, for instance, the same unwind-protect were to be executed more than once.
16:04:18
loke
Oh, you can also add a string to divider, and then it becomes a neat label. I wonder if that's standard.
16:25:36
beach
loke: See ADD-MENU-ITEM-TO-COMMAND-TABLE (unless you are at work of course, but I suspect not at this time).
16:33:13
random-nick
hm, does anybody know the state of GNU Kawa's Common Lisp implementation? the only thing I could find in Kawa's manual is that it is incomplete
16:35:11
random-nick
yes, GNU Kawa is primarily a Scheme implementation for the JVM but it apparently has incomplete support for compiling Common Lisp and Emacs Lisp
16:40:46
jackdaniel
note that it doesn't cover everything, but a fair chunk of the issues may come when you test with it
16:51:27
MichaelRaskin
beach: would debug functionality like you have describe as a low-level functionality for clordane be useful if it is implemented as a library on top of SBCL with 10× slowdown for threads under debugging?
16:53:05
random-nick
Xach: looks like kawa common lisp really doesn't implement much of common lisp, it's useless for any real world use case
17:27:02
Xach
random-nick: I have never heard of kawa common lisp and i really like to learn about common lisps.
17:28:05
random-nick
Xach: it doesn't really have a website, it's just mentioned of the features page of Kawa Scheme
17:32:06
jmercouris
has anyone investigated using a distributed package manager for CL? https://github.com/whyrusleeping/gx
17:33:15
aeth
There's a lot of things beyond the standard that libraries assume, too. For instance '(unsigned-byte 8) and 'single-float and 'double-float arrays are de facto standard even though the standard only requires bit and character. And there's probably a dozen portability libraries that express parts of the de facto standard, like bordeaux-threads and cffi.
17:34:26
aeth
Someone should probably make a complete list for implementors, if it doesn't already exist.
17:41:51
aeth
dlowe: CDR isn't up for me (did it move?), but I don't think that ever took off. Just a list of portability libraries and a test suite for some simple things libraries always assume like the array types would probably be better.
17:45:00
aeth
Portability libraries would cover most things. I don't think there's a popular Unicode one, though.
18:07:25
makomo
if i have a list bound to x and do something like (mapc (lambda (x) <body>) x), what x does "x" refer to within the body?
18:09:42
jmercouris
has anyone investigated using a distributed package manager for CL? https://github.com/whyrusleeping/gx
18:13:49
MichaelRaskin
beach: Yes, because it is a natural extension of what I did with wrapping local variables
18:14:38
beach
MichaelRaskin: Can it be done automatically or does the programmer have to put the wrapping code in manually?
18:16:11
specbot
Congruent Lambda-lists for all Methods of a Generic Function: http://www.lispworks.com/reference/HyperSpec/Body/07_fd.htm
18:19:27
Ukari
i could specify parameter's type in defmethod's parameter, is it possible to specify a function with it's accept and return type?
18:20:39
MichaelRaskin
beach: well, you might expect that clordane with Cleavir's first-class support wille be obviously better.
18:22:35
MichaelRaskin
I could write the form wrapper part, but I prefer navigating traces to hand-stepping, so I am not a likely Clordane user… If you can give me a spec for low-level functionality, I might consider writing it just to show off Agnostic Lizard.
18:24:29
beach
MichaelRaskin: I'll think about it. Right now I am off to spend time with my (admittedly small) family.
20:33:36
imjacobclark
Hello - I am trying to hook cl-json and MAKE-ARRAY up to get a JSON object printed to screen, however I keep running into Value #2A((("hello" . "world"))) is not of a type which can be encoded by ENCODE-JSON.
20:33:43
imjacobclark
This is the code I am trying... (print (json:encode-json (make-array '(1 1) :initial-contents '( (("hello" . "world") )))))
20:38:06
imjacobclark
Bike: so my main problem really is when passing encode-json a list that has a variable in it, the variable isn't evaluated, the variables name ends up in the JSON
20:38:15
imjacobclark
For example the following code... (json:encode-json '#( ((foo . (1 2 3)) (bar . path) (baz . #\!)) "quux" 4/17 4.25 ))
20:38:55
imjacobclark
Sorry, I'm learning Lisp and this is me trying to solve a real world problem in it
20:39:38
imjacobclark
Right I see - is there a way to get it to be evaluated? I was thinking make-array could do that
20:39:38
Bike
You could do, e.g., (json:encode-json (list foo 14)), and then encode-json will be passed a list with two elements, the first of which is whatever value the variable FOO has
20:41:37
Bike
'(a b) is the constant version of (cons 'a (cons 'b nil)), while '(a . b) is (cons 'a 'b)
20:42:29
jmercouris
imjacobclark: this will be a very useful chapter for you: http://www.gigamonkeys.com/book/they-called-it-lisp-for-a-reason-list-processing.html
20:42:56
imjacobclark
Still fighting with this example though, can't settle my mind until I get it working
20:43:04
imjacobclark
I've tried converting it to a list... (print (json:encode-json (list (("test" . (1 2 3))))))
20:44:00
Bike
You realize that "test" is a string, and not a symbol, so it doesn't mean a variable in any context?
20:44:05
imjacobclark
(json:encode-json '#( ((foo . (1 2 3)) (bar . path) (baz . #\!)) "quux" 4/17 4.25 ))
20:45:43
imjacobclark
yes variable, e.g in javascript I would do... let myvar = "test"... {"myKey": myvar};
20:46:28
White_Flame
man, sometimes the array types can be annoying. clack wants a (simple-array (unsigned-byte 8)), and flexi-streams output returns a (vector (unsigned-byte 8)). Simple-vector always uses element type T, so there's no "simple-vector" type that can be specialized to (unsigned-byte 8)
20:47:17
imjacobclark
a dotted pair - right... goes to read up on dotted pairs via http://www.gigamonkeys.com/book/they-called-it-lisp-for-a-reason-list-processing.html
20:47:43
Bike
White_Flame: i think the conversion is just (coerce flexi-streams-output 'simple-array), though.
20:56:47
White_Flame
Bike: yeah, I have the coerce in there; not sure if it actually performs a data copy. i would nope not, but the extra type checking is annoying in the inner core of I/O
20:59:15
_death
it does copy.. maybe flexi-streams should be fixed to return a (simple-array (unsigned-byte 8))
21:00:42
White_Flame
well, which "more defining" of a datatype, the fact that it's simple, or the fact that it's a vector?
21:33:57
whartung
while I can dispatch a generic function on a structure type, I can’t “inherit” from a structure, I need to recode them all as classes first in CLOS, right? (I have a bunch of structs and am just lazy enough to not convert them into defclass if I don’t have to)
21:54:45
whartung
so if I have (defstruct xxx a b c) and (defstruct (yyy (:include xxx)) x y z) and (defmethod m1 (arg1 xxx)) and (defmethod m2 (arg1 xxx)) and (defmethod m2 (arg1 yyy)), will those work as expected? Is there a relationship between xxx and yyy or is it simplty structural?
21:57:34
whartung
ah cool! Well, that makes it easy then — I don’t have to class-ify them then…Because I mostly want to specialize behavior, not structure. So I should be able to (defstruct xxx a b c) and then simply (defstruct (yyy (:include xxx))) and method dispatch should Just Work.
0:19:28
mfiano
Does anyone know how to use the type pattern in trivia, on arguments of a list, and also bind the arguments for use in the clause body?
1:24:08
jack_rabbit
Ahh, I see: https://github.com/pkhuong/string-case/commit/718c761e33749e297cd2809c7ba3ade1985c49f7