Search
Friday, 20th of October 2017, 21:22:04 UTC
21:25:36
asarch
Scheme is not object-oriented, is it?
21:25:52
_death
asarch: what difference does it make
21:26:16
asarch
I mean, just for my notes
21:26:45
_death
asarch: http://paulgraham.com/reesoo.html
21:27:13
asarch
Common Lisp has CLOS, Emacs has "Enhanced Implementation of Emacs Interpreted Objects"
21:27:43
_death
scheme has object systems, some clos-like.. but not part of the standard
21:28:47
asarch
BTW, it's awesome your nick!
21:29:13
_death
came up with it when I was 14 :)
21:45:06
chream_
jackdanial: thanks! will try the develop branch.
21:46:18
aeth
Is there any way to use +foo+ in an array type without an intermediate deftype?
21:47:57
aeth
I can't say this: (defstruct foo (bar (make-array +foo+ :element-type 'fixnum) :type (simple-array fixnum (+foo+))))
21:48:54
aeth
I can e.g. say this: (defstruct foo (bar (make-array (list +foo+ 4) :element-type 'fixnum) :type (simple-array fixnum (42 4))))
21:49:30
aeth
So I can get around the problem of make-array for 2D arrays where '(+foo+ 4) will obviously not work, but I can't get around the problem of type in a defstruct for any dimension arrays if there's a constant instead of a number for the size
21:50:14
aeth
The problem is that defstruct doesn't quote the type in :type so I can't e.g. `(,+foo+) or (list +foo+)
22:00:22
aeth
I'm using defstruct through a macro
22:00:48
_death
sure, you could also eval.. or hack defstruct to evaluate the typespec, or..
22:05:01
aeth
yes, but afaik that requires the user to #.+constant+ which isn't a good interface
22:05:36
_death
you'd also need to make sure the constant's value is available
22:06:59
aeth
I suppose #. will work for now
22:07:44
aeth
It's clearer than a dozen type definitions
22:11:10
aeth
The best alternative if there's no workaround would probably be to define (gensym) types with the struct
0:10:49
bigos
looks like my simple experiments with CFFI have worked
0:10:49
minion
bigos, memo from phoe_: nie dam rady, padam ;_;
5:09:02
beach
Good morning everyone!
5:50:53
beach
gilberth: Hello! What's up?
Saturday, 21st of October 2017, 9:22:04 UTC