freenode/lisp - IRC Chatlog
Search
22:56:32
White_Flame
matzy_: hmm, I can't find it either. I wonder if he just has it in his local-projects and loads it that way?
22:56:56
White_Flame
again, if it's symlinked there than the standard ql:quickload will find it by its asd name
22:57:30
matzy_
White_Flame: ok cool, well at least i know how to get it on my machine now. glad i'm not crazy. thanks!
22:57:47
White_Flame
yeah, the readme does make it look like it's downloadable via quicklisp, which is odd
23:03:43
alexanderbarbosa
disturbing moments at python lands: Modifying an Attribute’s Value Directly. NOOOOOOOOOOOOOOOOOOOOO
23:17:58
aeth
I wonder if "cl-docs" would be a good name for the md->html library, since it'd be covering document formats
0:12:00
aeth
make-array with an :initial-element and if that's too verbose (it often is) you can just define a trivial inline function to do it
0:13:39
aeth
They could be more space-efficient and provide the compiler's type inference more information if you give them an :element-type, e.g. (make-array 3 :element-type 'single-float :initial-element 0f0)
0:14:30
aeth
element-type is only going to work for certain kinds of numbers and characters, like e.g. (unsigned-byte 8). Besides characters and bits, it's implementation specific, but almost all of them will have single-float, double-float, and various byte sizes (especially 8, 16, 32, and 64) that are signed and unsigned
0:16:08
aeth
by default, and if you give it an invalid type, it'll just be a T array, i.e. holds anything
0:16:45
aeth
initial-contents is another useful feature, e.g. (make-array 3 :element-type 'single-float :initial-contents '(1f0 2f0 3f0)) => #(1.0 2.0 3.0)
2:14:53
manualcrank
how do you quell the "the default initial element 0 is not .." for uninitialized specialized arrays?
2:18:31
manualcrank
if you give an initial-element here it'll just be 10 references to the same element
2:21:59
aeth
manualcrank: (upgraded-array-element-type '(array fixnum (*))) is probably going to be T... what implementation are you using to get that error/warning/note, though?
2:26:55
aeth
I guess it's one of those things that only exists within function scope because that information is going to be lost outside of that function because it's just a simple-vector, i.e. a vector containing T
2:27:18
aeth
You could try (make-array 10 :element-type '(array fixnum (*)) :initial-element (make-array 0 :element-type 'fixnum)) or you could also try using :initial-contents
2:27:33
Bike
the warning only shows up in a file because if you just put a make-array call in the repl it won't compile anything.
2:31:16
Bike
i think sbcl should just take out the warning, really... reading an element without writing it first is UB anyway
2:38:01
manualcrank
i assumed if the compiler knew i was processing an an array of fixnum arrays it would generate more efficient code?
2:39:04
Bike
you can declare the type of elements in an array with type declarations, rather than specifying :element-type, which is more fundamentally about the runtime
2:45:34
aeth
manualcrank: If you wanted more efficient SBCL code here, you could consider a struct with typed slots or a 2D array.
2:49:43
manualcrank
adjacency list representation -- each element of the array is an adjustable array
2:52:11
manualcrank
i use vector-push-extend to add vertices. A 2d array would be very wasteful in that case, graph is large but not usually dense
3:01:22
manualcrank
i do declare array type when it's a parameter, but not being a fan of DECLARE (aesthetics) i had been using element-type at the point of creation (thinking the effect would be the same)
3:08:09
Bike
it might work out the same, provided you never pass the array to a function or antyhing
3:13:19
minion
The URL https://gitlab.common-lisp.net/users/sign_in?secret=2292e1bb will be valid until 03:15 UTC.
6:25:03
tourjin
when I run clisp in wsl I get this errors. Cannot map memory to address 0x800983608000 .
6:25:03
tourjin
[/build/clisp-u7VYrq/clisp-2.49.20170913/src/spvw_mmap.d:498] errno = 22 (Segmentation fault (core dumped)
6:39:18
beach
tourjin: You probably also don't get many answers because CLISP is not the most commonly used implementation among #lisp participants.
6:43:35
no-defun-allowed
tourjin: I would think it's an odd bug created by memory mapping trickery some Lisp implementations use.
6:44:00
no-defun-allowed
WSL still runs under the Windows kernel and tries its best to map POSIX-y calls to Windows, and I would expect some impedance issues.
7:20:36
pjb
jiny: in that case, it can be expected indeed that strange things occur with memory and mmap. A feature request should be posted on the clisp github to ask support for wsl. But this will probably be very low priority, so you better provide a patch with a PR…
7:25:18
jiny
thanks pjb . I installed gnu clisp . it seems to work fine. but clisp on wsl crashes when I run it. and I use low version of windows10 home edition. so I cant install new wsl2 version on my computer.
7:26:13
pjb
jiny: since sbcl already solved the problem, you might be able to provide a working patch easily enough.
7:28:22
red-dot
good luck with sbcl on Windows... perhaps WSL will work. For normal Windows, this just isn't a platform they care about.
7:28:48
red-dot
Say, does anyone know how to contact the gitlab.common-lisp.net folks? They sign up system is a bit broken
7:29:00
pjb
jiny: the thing is that sbcl understood the problem and corrected it for sbcl. So reading this patch you will be able to understand it, and to build a patch for any implementation, including clisp.