Search
Friday, 20th of September 2019, 12:36:18 UTC
15:45:32
jcowan
Is there a usual method of doing random access on ordinary files in CL implementations?
15:46:25
specbot
http://www.lispworks.com/reference/HyperSpec/Body/f_file_p.htm
15:46:25
Xach
jcowan: file-position is the usual method.
15:47:52
jasom
defining vops can make for very confusing to read code: https://github.com/sionescu/swap-bytes/blob/master/sbcl.lisp
15:55:48
jcowan
Ah, I missed it because I didn't realize it could change the position as well. Thanks, all.
15:57:54
jcowan
That looks fine, particularly the relaxed constraint on file positions in character streams.
16:25:30
vms14
how can I make format iterate a list ignoring the values?
16:26:04
vms14
(format nil "~{oh ~^,~}" '(1 2 3))
16:26:19
vms14
won't work because the list is not "consumed" so it never ends
16:26:43
vms14
I don't want the numbers, just dotimes behavior
16:32:42
Xach
vms14: stick a ~* in the {}
16:32:57
Xach
(format nil "~{hi~*~^, ~}" '(42 1 2 1)) => "hi, hi, hi, hi"
16:33:10
Xach
maybe there are other options
16:40:27
Lord_of_Life_
** NICK Lord_of_Life
19:53:27
learning
** NICK still_learning
19:59:57
verisimilitude
So, what are you working on?
20:00:15
verisimilitude
I'm working on TCP libraries, as I don't want to use USOCKET or IOlib.
20:01:25
verisimilitude
I have an experimental little TCP client library I've named EASY-PEASY-TCP I'm currently fiddling with; it's only useful for basic network clients, but it's only intended for such things.
20:09:23
clothespin_
I'm working on mechanical CAD
20:24:38
Shinmera
Working on a UI toolkit
20:25:18
clothespin_
I use your vector and matrix libs
20:25:39
Shinmera
Hope there isn't too much trouble there :)
20:25:52
clothespin_
I'll try to submit a patch
20:26:51
clothespin_
what are the details of your ui toolkit?
20:27:15
Shinmera
Uh, you'll have to be more specific than that.
20:27:35
Shinmera
I'm not sure how to answer that question
20:27:46
clothespin_
is it completely lisp or does it wrap a c++ lib or something?
20:28:36
clothespin_
I wrapped "Dear ImGui"
20:31:49
Shinmera
Yeah, I'm trying really hard to reduce the number of foreign libraries to zero.
20:34:05
Shinmera
I'm also not a fan of immediate mode UIs, so that's another thing :)
20:35:12
clothespin_
Using Imgui has provided a cheap way of moving forward for me
20:35:41
Shinmera
Sure. I don't blame anyone for using it, it's pretty nifty and easy to hook up.
20:36:37
clothespin_
Mirai had an interesting ui: HI: human interface
20:36:48
clothespin_
I think it was all lisp
20:37:11
clothespin_
I wanted to use it for this project but Mirai died
20:39:34
Shinmera
Hopefully McCLIM will grow a GL Core backend at some point
20:39:42
Shinmera
So that there's an alternative out there.
20:40:24
clothespin_
I'm not sure I'm sold on CLIM.
20:40:36
clothespin_
HI had it's roots in dynamic windows
20:41:38
clothespin_
I assume your UI toolkit is not McCLIM?
20:42:09
Shinmera
Like most things I do it's from scratch.
20:42:15
clothespin_
Do you have a link?
20:42:32
Shinmera
https://shirakumo.org/projects/alloy
20:48:11
Shinmera
I hope to write some articles and maybe even a paper once things have crystallised a bit more.
20:48:32
jasom
anyone know when SBCL won't open-code sb-rotate-byte:%rotate-byte? I'm rotating by a constant value and a hand-written rotate-byte is over an order-of-magnitude faster becuase it's making a function-call when I use sb-rotate-byte:rotate-byte
20:49:06
Shinmera
Probably a better question for #sbcl
20:50:16
clothespin_
What are you using for a backend?
20:50:34
Shinmera
Alloy is primarily a protocol, so it's backend agnostic.
20:50:49
clothespin_
you don't have a test backend?
20:50:49
Shinmera
I'm mostly working on a GL one though since that's what's useful to me at the moment.
20:51:00
Shinmera
I have a GL and an SVG one.
20:52:40
clothespin_
the latest release of 3d-matrices and 3d-vectors fixed some problems in the quicklisp version, suchas mlookat
20:53:33
clothespin_
now everything seems to be working sans a few compiler warnings
20:55:08
clothespin_
I am planning on making it compile seperate packages for single-float and double-float since I use both at the same time
20:55:43
clothespin_
and I'm considering making the memory be in the foreign heap for communication with C++
20:57:06
Shinmera
On SBCL at least you should be able to just pin the matrix arrays and get a pointer while pinned.
20:57:30
clothespin_
yeah, i use that for vertex and index buffers
20:57:57
clothespin_
allegro cl has something similar, and i assume LW does too
20:58:11
Shinmera
probably. A lot of implementations do
20:58:23
LiamH
Take a look at static-vectors.
20:58:41
clothespin_
it would be cool if sbcl allowed you to stack allocate arrays and structs
20:58:41
Shinmera
LiamH: static-vectors are not so nice since they require manual deallocation.
20:59:04
clothespin_
I use finalizations
20:59:11
LiamH
Shinmera trivial-garbage helps with that
20:59:21
Shinmera
Not if the foreign memory might have pointers.
20:59:25
Shinmera
Which is, kinda the point
20:59:55
clothespin_
the structs I'm using are just coordinates and such which get copied around
21:00:03
Shinmera
static-vectors are also moot if the vector comes from or is shared with some native lisp library.
21:01:31
clothespin_
stack allocated vectors would be nice so you don't fragment your foreign heap
21:15:10
Xach
Do you think you might go to the SBCL20 get-together?
21:15:50
Shinmera
I've been considering it a lot, but I don't know. Current university semester looks deadly busy, especially later in the year
21:16:14
Shinmera
I could maybe do a one-day trip, I don't know. Would have to check travel times and all.
21:16:51
Xach
I missed ELS so it would be wonderful to see my euro-pals again soon
21:17:06
Shinmera
You could also wait for ELS20 in Zürich :)
21:17:28
Xach
I didn't know it had been announced!
21:17:42
Shinmera
It's not published yet but it was announced at the end of this year's
21:19:19
Xach
I enjoyed my time in Zürich last year (3 minutes running from airport gate to airport gate for my ELS connection)
21:19:56
Shinmera
I'll bother didier to check my els-web changes and maybe publish it if he thinks it's time.
21:22:38
akoana
Xach: will we be able to have a (ql:quickload "grüezi") then :)
21:25:41
verisimilitude
So you're using a C library for your CAD GUI, clothespin_?
21:59:54
clothespin_
I'm using a C++ library, Opencascade
22:00:27
clothespin_
and "Dear Imgui" also c++
22:42:52
fragamus
where in the blue blazes is the source file containing the main for lisp.run in clisp
0:29:34
vms14
how can I make a shorthand for hunchentoot?
0:29:39
vms14
(defmacro route (url (&key (type "text/html") parameters) &body content)
0:29:39
vms14
`(tbnl:define-easy-handler (,(gensym) :uri ,url) (,@parameters)
0:29:39
vms14
(setf (tbnl:content-type*) ,type)
0:29:58
vms14
and I call it with (route "/" () (format nil "~a~a" (header) (body (select "posts"))))
0:30:13
vms14
but it's wrong and I don't know why
0:30:57
vms14
it's for the parameters define-easy-handler is expecting?
0:32:41
no-defun-allowed
Have you tried macroexpanding it?
0:33:00
no-defun-allowed
(Also, I probably wouldn't count on TBNL sticking, it's literally To Be Named Later, and it has been named.)
0:33:49
no-defun-allowed
You could use a package-local nickname now, unless you have some weird targets.
0:34:31
no-defun-allowed
Or you could use the package if it really bothers you, since Hunchentoot isn't going to change much soon, but that is still bad form to some people.
0:34:39
vms14
I've put header instead of head
0:34:57
vms14
I need to learn more about common lisp packages
0:35:15
vms14
I know basic stuff but I need more
0:36:00
vms14
I went to perl, and now returning to lisp, so it's like starting again
Saturday, 21st of September 2019, 0:36:18 UTC