beneroth changed the topic of #picolisp to: PicoLisp language | The scalpel of software development | Channel Log: https://libera.irclog.whitequark.org/picolisp | Check www.picolisp.com for more information
Iacob has quit [*.net *.split]
aw- has joined #picolisp
Iacob has joined #picolisp
alexshendi has quit [Quit: -a- IRC for Android 2.1.60]
seninha has quit [Remote host closed the connection]
seninha has joined #picolisp
seninha has quit [Remote host closed the connection]
rob_w has joined #picolisp
msavoritias has joined #picolisp
beneroth has joined #picolisp
<tankf33der> hi all
<tankf33der> abu[7]: busy? meetings?
<beneroth> hi tankf33der :D
<abu[7]> Hi tankf33der, yes in meeting
seninha has joined #picolisp
<abu[7]> tankf33der: Meeting is over
<tankf33der> ok
<tankf33der> so
<tankf33der> i have a struct
<tankf33der> and
<tankf33der> if i pass "abc" as Password it generates correct result
<tankf33der> if (mapcar char (97 98 99)) the same ok too.
<tankf33der> if (mapcar char (range 1 8)) ok too
<abu[7]> strdup() needs a string
<tankf33der> oops
<tankf33der> i meant
<tankf33der> (pack (mapcar char (range 1 8)))
<tankf33der> of course.
<abu[7]> yeah
<tankf33der> it generates WRONG result if pass (pack (mapcar char (range 200 208)))
<abu[7]> I see
<tankf33der> looks like strdup corrupts it
<abu[7]> These are UTF-8 characters
<tankf33der> yeap
<abu[7]> two bytes each
<abu[7]> should be OK though
<tankf33der> should i work in range 1 127 then ?
<abu[7]> I think it should be OK
<abu[7]> strdup looks only ror null-byte
<tankf33der> yeah
<abu[7]> In which way corrupted?
<tankf33der> functions returns wrong result
<abu[7]> Perhaps the password needs to be ASCII?
<tankf33der> because one function accepts password as strings
<tankf33der> another should accept lists
<tankf33der> (de randL (A)
<tankf33der> (make (do A (link (rand 0 255)))) )
<tankf33der> i generates password line this :)
<abu[7]> good
<abu[7]> No ided
<tankf33der> ok
<abu[7]> btw, (let Config (%@ "malloc" 'P 16)
<abu[7]> Why not (bur Config 16 ?
<abu[7]> *buf
<abu[7]> You want to keep it, no free() ?
<tankf33der> never used buf before
<tankf33der> i only have experience with malloc-free.
<abu[7]> It is easier sometimes
<tankf33der> native is hardcore for me.
<abu[7]> if the struct should persist, you need malloc
<abu[7]> for me too
<tankf33der> but you coded it in correct way.
<tankf33der> magically picolisp have no open issues, no bugs.
<abu[7]> I hope so :)
<abu[7]> Because you tested so well
<abu[7]> In the beginning we had many bugs
<tankf33der> test suite covers 97% of functions.
beneroth_ has joined #picolisp
beneroth has quit [Ping timeout: 245 seconds]
rob_w has quit [Remote host closed the connection]
teddydd_ has joined #picolisp
teddydd has quit [Ping timeout: 264 seconds]
beneroth_ has quit [Quit: Leaving]
beneroth has joined #picolisp
teddydd_ has joined #picolisp
teddydd_ has quit [Changing host]
teddydd_ is now known as teddydd
pablo_escoberg has joined #picolisp
pablo_escoberg has quit [Client Quit]
pablo_escoberg has joined #picolisp
<pablo_escoberg> So I need to know the structure of the returned data in advance and pass that structure to "native"?
<abu[7]> Yes, you must allocate the memory, populate it if necessary, and pass it
<abu[7]> Simple structs are directly allocated and disposed by 'native'
<abu[7]> The ref of 'native' explains it in detail, but it is complicated
<pablo_escoberg> OK, so I need to figure out what this struct is.  And this is going to be more difficult than I thought, but still (probably) doable.
<abu[7]> In short, you can directly initialize any struct directly if it contains no pointer to other memory areas (strings or structs)
<tankf33der> native.* a lot of combinations
<abu[7]> pablo_escoberg, you need the declaration of the 'sqlite3' struct
<pablo_escoberg> yup, that's what I need to find.
<abu[7]> Seems not in the link you posted in the matrix channel
<abu[7]> Perhaps it is a good idea if you see if you understand tankf33der's examples
<pablo_escoberg> probably, but I need to find the structure of that object regardless.
<pablo_escoberg> without it, I really can't get anything done...
<abu[7]> true
<pablo_escoberg> it's declared as " typedef struct sqlite3 sqlite3" without a body.  How do I allocate for that??
<abu[7]> This is not the structure but just the short type
<abu[7]> saves typing "struct" each time
<abu[7]> There must be "struct sqlite3 {" somewhere
<pablo_escoberg> right, found the actual structure in a different file.
pablo_escoberg has quit [Quit: Client closed]
seninha has quit [Remote host closed the connection]
seninha has joined #picolisp
msavoritias has quit [Remote host closed the connection]