freenode/#lisp - IRC Chatlog
Search
18:11:39
pjb
Actually, sbcl compiler is one of the fastest CL compiler there is, since it's compiled using sbcl compiler itself, which produces one of the fastest CL native code.
18:33:30
oni-on-ion
this is all i can find about it, but does not say much about the compiler itself: http://www.ffconsultancy.com/languages/ray_tracer/conclusions.html -- in my experience sbcl, gcc, ocaml are equally awesome
19:31:06
asdf_asdf_asdf
Hi. How define body of routine? After defined routine I must defined body this routine? How it do? Thanks.
19:32:22
Xach
asdf_asdf_asdf: there is no body. it is declaring an interface to an existing foreign function, so it is for specifying the arguments and return type.
19:36:06
Xach
asdf_asdf_asdf: scratch that - no matter what the answer is, i cannot help - but maybe someone else can.
20:11:15
aeth
asdf_asdf_asdf: Usually you want to find a JSON version of the API that you can parse rather than doing it manually yourself... afaik.
20:11:56
aeth
If it's a common "I have to interface with this" library, then JSON (or XML) versions exist for exactly this purpose, sometimes officially.
20:14:32
borodust
claw is quite beta yet and only docs is me (apart from ones that can be borrowed from cl-autowrap)
20:16:35
borodust
if structs-by-value are not tossed around by the api in question, that should be a piece of a cake
20:17:27
borodust
lemme know what header you need a wrapper for and i can arrange it in 15 min or smth
20:17:33
aeth
Bike: In case I was unclear, I don't mean the API is literally XML or JSON, I mean an API is often described in XML or JOSN, e.g. for Vulkan. https://github.com/KhronosGroup/Vulkan-Docs/blob/1.0/src/spec/vk.xml
20:20:30
aeth
It would be incredibly amusing (and not *entirely* surprising, since Microsoft has tried like 20 different APIs) if you could interact with Windows directly via XML.
20:28:59
defunkydrummer
minion: memo to asdf_asdf_asdf: there are already Win32 API bindings out there, see https://github.com/Zulu-Inuoe/win32 for an example.
20:31:30
defunkydrummer
minion: memo to asdf_asdf_asdf: also this guy has several bindings to various Win32 APIs: https://github.com/fjames86
0:38:02
eschulte
does anyone know of a way to write bytes to a process in CCL? The following doesn't work (although the SBCL analog works fine) http://sprunge.us/3eQrKO
0:38:53
eschulte
this would be handy to allow for using cl-store to compress stored objects through xz on their way to disk (and then restore them back from the output stream of an xzcat process)
0:44:35
mfiano
does this help? https://gist.github.com/mfiano/8d21591372abbb63e93abc994f1a52dc You can then use `alexandria:copy-stream` for another input layer which looks like it buffers 4k
0:49:22
eschulte
I think I'm missing something, I'm trying to write bytes to STDIN but the function you posted takes STDIN from a string
0:49:46
eschulte
do you mean create a CCL process and then use copy-stream to create a buffered copy of the :input stream?
0:55:05
aeth
uiop:launch-program is the better version in UIOP... a bit harder to get started with, though
0:59:58
eschulte
aeth: thanks! I can at least write-bytes to the input stream of a process started that way.
1:16:36
eschulte
Yeah, launch-program works well. The only downside being that (as opposed to SBCL) I have to decide when creating the process if I want to write characters or bytes
5:02:30
no-defun-allowed
<beach> http://www.lispworks.com/documentation/HyperSpec/Body/f_float.htm actually
5:02:51
beach
gabbiel: It would be much better if you tell us what you want to do, rather than referring to a different language.
5:03:37
gabbiel
I was going to click on link but pressed the kill window keybinding instead by accident
5:04:14
loke`
if you want to convert to a specific float type, you can use (COERCE 1/3 'DOUBLE-FLOAT)
5:09:07
loke`
gabbiel: It implements it by using rationals behind the scenes, and then provides a custom reader/writer and some other syntactic sugar to make it nicer.
5:10:08
loke`
it contains functions for converting them to/from strings as well without losing precision.
5:10:54
loke`
In most cases I personally just use raw rationals. I rarely have to read or write them.
5:11:07
gabbiel
I do all my arithmetic with ratios, and now I have to convert to decimals for this function I have
5:12:42
gabbiel
the function in question outputs grams, so I need the actual decimal so I can properly mix my stuff
5:14:37
gabbiel
but first I need to write a subst-if like of function so I can find the ratios in the tree
5:16:13
gabbiel
I'm printing the whole tree you see, if they're floats already, I don't need to calculate where they are and then print them
5:17:57
gabbiel
since the tree is a list, and also contains symbols, I can't do that. I'll have to settle for subst-if 'ing the numbers into floats and then printing the tree
5:20:20
gabbiel
but I wouldn't want this printing behavior to be permanent, only when my function is running
5:22:24
gabbiel
ok, I see, thanks guys, I'll use this pprint-dispatch stuff, apropos has helped me figure out the functions I need to make the behvaior temporary
5:23:56
beach
This would have been much easier if it had started with "I have a tree represented as a list, and I want to print the whole thing normally, except when the leaf is a ratio, because then I want it to print as a decimal.".
5:26:28
beach
Yeah, well, I am also notorious for not understanding descriptions like that. LdBeth caught it.
5:30:18
gabbiel
ldbeth: correct me if I'm wrong. Do I have to copy-print-dispatch, then set-pprint-dispatch, then setf *print-pprint-dispatch* back to the copy?
5:32:38
gabbiel
lmao I thought I could "cons" a "pprint-dispatch" object or something, but I know it's not a list
5:35:35
LdBeth
gabbiel: the sad thing is the actual implementation of pprint table can vary, so what you have is the things specified in the standard, copy the default pprint table then modify it
5:39:46
gabbiel
I feels lik there should be a macro that returns a variable to the value it had when the macro was expanded