Search
Saturday, 13th of October 2018, 10:56:17 UTC
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?
22:50:18
emaczen
https://pastebin.com/iuwCtc8F -- struct definitions
22:50:53
emaczen
The only type difference I am aware of are between sa_family and sin_family
22:51:08
emaczen
I forgot to try the c code on my pi. Give me a sec
22:52:53
emaczen
yep, C code works fine on my pi too
22:54:34
|3b|
hmm, does (get-family (cffi:mem-ref buf :pointer)) work any better?
22:55:00
|3b|
ACTION wouldn't expect it to work at all if that was the problem (or at least give nonsense results), but doesn't look right
22:55:19
emaczen
what doesn't look right?
22:55:25
russellw
when you don't specify in-package, your symbols are defined in :cl-user, aren't they?
22:55:46
|3b|
ACTION is confusing things
22:55:48
emaczen
they are interned in the current package
22:56:10
russellw
right, but what is the current package by default?
Saturday, 13th of October 2018, 22:56:17 UTC