Search
Saturday, 13th of October 2018, 10:48:26 UTC
10:53:41
no-defun-allowed
There was a really nice three digit fraction for pi I had at one point.
10:54:21
no-defun-allowed
355/113 is accurate to 6 places.
11:03:01
no-defun-allowed
Single floats are supposed to be good for at least six digits with small numbers, so I'm happy with that.
14:22:14
Posterdati
still no fix for iolib under openbsd...
15:55:40
Posterdati
iolib is not usable on bsd systems, due to wrong error constants definitions in sockets/grovel.lisp and syscalls/ffi-types-unix.lisp
16:25:29
White_Flame
no-defun-allowed: specifically, 32-bit ieee floats have 7.22 decimal digits of precision
22:32:56
no-defun-allowed
Morning, LdBeth
22:38:16
russellw
what's the recommended way to check if a character is whitespace?
22:39:03
Shinmera
find + an array that contanis all characters you consider whitespace
22:40:33
emaczen
https://pastebin.com/zJVfpq0h -- I can't determine the inconsistent results here...
22:40:54
kristof
I was going to suggest a range check on char-int
22:41:03
Bike
your implementation might provide checking for the unicode WSpace property
22:41:25
emaczen
it will work 99% of the time for me on OSX and 1% of the time on raspbian
22:42:17
emaczen
I get a memory access error in local function get-family when evaluating the form (cffi:foreign-slot-value addr '(:struct sockaddr) 'sa-family)
22:42:58
russellw
I think I like kristof's solution best. thanks to everyone who replied!
22:43:25
Shinmera
it's also not portable but who cares
22:43:42
|3b|
what do your struct defs look like?
22:44:20
|3b|
also, (cffi:foreign-type-size :pointer)
22:44:46
|3b|
(and use cffi to allocate it rather than mixing in some other FFI and manual malloc/free)
22:44:58
emaczen
|3b|: ffi is my own code
22:45:15
emaczen
It is just c functions defined with defcfun
22:45:32
|3b|
if so, write a (ffi:with-malloc ... ) macro :)
22:45:46
emaczen
|3b|: Yep, I will get to it eventually
22:45:46
|3b|
ACTION would still just use cffi:with-foreign-object (buf :pointer) though
22:46:43
emaczen
|3b|: I'll make another paste for my struct definitions
22:46:57
|3b|
c code works reliably on both?
Saturday, 13th of October 2018, 22:48:26 UTC