ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Picolisp latest found at http://www.software-lab.de/down.html | check also http://www.picolisp.com for more information
orivej has quit [Ping timeout: 260 seconds]
shpx has joined #picolisp
rob_w has joined #picolisp
shpx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shpx has joined #picolisp
orivej has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 245 seconds]
<cess11_> Good morning.
<Regenaxer> Hi cess11_
clacke[m] has quit [Ping timeout: 276 seconds]
clacke[m] has joined #picolisp
<tankf33der> Regenaxer: here ?
<Regenaxer> Hi tankf33der
<tankf33der> still fighting with native
<tankf33der> look at this code
<tankf33der> this code from monday
<tankf33der> it works.
<tankf33der> remember?
<tankf33der> :)
<Regenaxer> yes
<tankf33der> ok
<tankf33der> next
<Regenaxer> I think (I I I I N N N N) can be (I I I I N N S N)
<Regenaxer> ie a string, right?
<Regenaxer> But the proper hint must be set for it I think
<tankf33der> problem not here
<Regenaxer> yes, I know
<Regenaxer> just for completeness
<tankf33der> if i run this code from vim by !pil % + and copy paste by hands to pil repl
<tankf33der> it returns different results.
<tankf33der> 7162247751541981200 this is wrong.
<tankf33der> how it could be?
<tankf33der> all above on centos7
<Regenaxer> Then you have different pil processes? One in vim and one repl?
<tankf33der> yeap
<Regenaxer> You mean this return value 7162247751541981200
<tankf33der> yeap
<tankf33der> when i run pil ./showip.l by hands without vim it also returns garbage.
<tankf33der> ===============
<tankf33der> but when i run the same file on archlinux by hands and in repl it always returns garbage.
<Regenaxer> R1 and R2 are allocated automatically by 'malloc' and then freed again
<tankf33der> ===============
<tankf33der> but it works in repl.
<Regenaxer> yel
<tankf33der> tel ?
<Regenaxer> 7162247751541981200 is garbage, or perhaps an address on the stack
<Regenaxer> ok
<tankf33der> native is hard and lowlevel and now i cant know who failed code or environment. i must be sure.
<tankf33der> and i cant go forward.
<Regenaxer> Can you use ltrace?
<Regenaxer> To see what it malloc()s?
<tankf33der> let me try
<Regenaxer> It should alloc for R, then free it after reading the contents with '(R1 (8 .
<Regenaxer> N) (0 . 8)))
<Regenaxer> hmm, wait
<Regenaxer> 7162247751541981200 is the 5th arg, right?
<Regenaxer> it is not a pointer
<Regenaxer> It rather seems another problem
<Regenaxer> struct alignment
<Regenaxer> Perhaps it loads another lib in the context of vim?
<Regenaxer> Another env variable LD_LIBRARY_PATH
<Regenaxer> The important point here is to know how structure elements are aligned
<Regenaxer> What if you fetch the whole struct as bytes-only?
<Regenaxer> then see how it is aligned
<Regenaxer> (struct R2 '(B . 48))
<Regenaxer> Then it should be visible how the numbers are aligned
<Regenaxer> ie. non-zero bytes
<tankf33der> prepearing pastebins
<tankf33der> this is archlinux
<tankf33der> it works here.
<tankf33der> ======================
<tankf33der> this is centos7
<Regenaxer> only the malloc calls are needed
<Regenaxer> But what do you think of my idea above?
<Regenaxer> Looking at the bytes
<Regenaxer> to see if the alignments differ
<tankf33der> 5th item of struct is socklen_t ai_addrlen;
<Regenaxer> yes, I
<Regenaxer> but I's can be aligned
<Regenaxer> if N's are behind
<Regenaxer> not sure
<Regenaxer> just do (struct R2 '(B . 48)) or what is the size
<Regenaxer> then look at the bytes if you see an alignment pattern
<Regenaxer> eg (0 0 0 0 0 0 0 2 0 0 0 1 0 0 0 6 0 0 0 16 ...
<Regenaxer> this is for big endian
<Regenaxer> little endian would be
<Regenaxer> (0 0 0 0 2 0 0 0 1 0 0 0 ...
<Regenaxer> yes, you have little endian
<Regenaxer> So this looks good. Now compare with the "wrong" versions
<tankf33der> this is wrong version it seldf
<tankf33der> this is wrong version it self
<tankf33der> (0 2 1 6 7162247751541981200....
<freemint> Morning
<tankf33der> ============
<tankf33der> correct version:
freemint has left #picolisp ["Leaving"]
freemint has joined #picolisp
<tankf33der> pil versions 8.1.8 and 8.1.9 (archlinux vs. centos)
<Regenaxer> We dont need the correct
<Regenaxer> How are the bytes aligned in the bad version?
<tankf33der> this is wrong version
<tankf33der> when i run several times i always see this pattern ...98 106 101...
<tankf33der> let me try reinstall on centos
<Regenaxer> hmm
<tankf33der> 18.2.28
<tankf33der> the same
<Regenaxer> hmm, this makes no sense:
<Regenaxer> (0 0 0 0
<Regenaxer> 16 0 0 0
<Regenaxer> 98 106 101 99
<Regenaxer> 6 0 0 0
<Regenaxer> 1 0 0 0
<Regenaxer> 2 0 0 0
<Regenaxer> 224 91 96 1 0 0 0 0
<Regenaxer> 0 0 0 0 0 0 0 0
<Regenaxer> 64 105 96 1 0 0 0 0 )
<Regenaxer> 64 105 96 1 0 0 0 0 could be a pointer?
<Regenaxer> 224 91 96 1 0 0 0 0 too?
<tankf33der> yeap
<tankf33der> see man getaddrinfo
<Regenaxer> I know. I ask for alignment
<tankf33der> ok
<Regenaxer> ai_addrlen cannot be 98 106 101 99
<Regenaxer> But as the final thee pointers are correctly aligned, it is not an alignment problem
<Regenaxer> It really seems that the ai_addrlen field is not filled
<Regenaxer> or filled with garbage
<Regenaxer> 98 106 101 99, must be a small number
alexshendi_ has joined #picolisp
<tankf33der> this is output from c
<Regenaxer> ah, the problem is ai_addr, not ai_addrlen
<Regenaxer> ai_addrlen is 16 in both cases
<Regenaxer> * A pointer to the socket address is placed in the ai_addr field
<Regenaxer> This does not seem to happen
<Regenaxer> remains garbage 98 106 101 99 instead
<Regenaxer> aahhhh!!!
<Regenaxer> No, it *is* an alignment problem!i
<tankf33der> :(
<Regenaxer> (0 0 0 0
<Regenaxer> 2 0 0 0
<Regenaxer> 16 0 0 0
<Regenaxer> 6 0 0 0
<Regenaxer> 1 0 0 0
<Regenaxer> 224 91 96 1 0 0 0 0
<Regenaxer> 98 106 101 99
<Regenaxer> 0 0 0 0 0 0 0 0
<Regenaxer> 64 105 96 1 0 0 0 0 )
<Regenaxer> this is 9 fields !!!
<Regenaxer> 98 106 101 99 is alignment!
<Regenaxer> The first pointer 224 91 96 1 0 0 0 0 is aligned to 8 bytes
<Regenaxer> So you need to pass (I I I I I N N N N) in such cases
<tankf33der> wow
<tankf33der> 5764607531624169472 not valid pointer then
<Regenaxer> yes, so wrong alignment
<Regenaxer> tankf33der, sorry, must go
<Regenaxer> bbl
shpx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shpx has joined #picolisp
shpx has quit [Client Quit]
<Regenaxer> ret
<Regenaxer> Sorry, had to run
<Regenaxer> tankf33der, again: Alignment is a compile-time option
<Regenaxer> So it depends on the OS, the library build etc.
<Regenaxer> In vim it runs another version of libc probably
<Regenaxer> You need (I I I I I N N N N) or (I I I I I I N N N N) depending on the version
<tankf33der> :/
<Regenaxer> not nice, yes ;)
<tankf33der> tears.
<Regenaxer> The question is: How to find it out at runtime?
<Regenaxer> An then pass (I I I I I I N N N N) or (cdr (I I I I I I N N N N))
<tankf33der> both doesnt work on centos7
<tankf33der> even without vim
<tankf33der> '(R1 (8 . N) (0 . 8)))
<tankf33der> why 8 . N ?
<tankf33der> just large enough space for data ?
<freemint> I want that a +Listmember maintains a List of the +Liste he is a member of. And i want each +List to maintain a tree of all members in the list as well as the first and last time the +Listmember wrote to the list
<freemint> (class +ListMember +Account)
<freemint> (rel members (+Hook +Joint) (+ListMember) Liste)
<freemint> (rel homepage (+String))
<freemint> (class +Liste +Entity)
<freemint> (rel Liste (+List +Joint +Liste) )
<freemint> (rel since (+Ref +Date) members)
<freemint> (rel last_seen (+Ref +Date) members)
<freemint>
<freemint> Is that archived by the code?
<Regenaxer> tankf33der: ☆ a cons pair for the size and result specification in the CADR
<Regenaxer> (8 . N) is an 8-byte number
<Regenaxer> Initialized wit (0 . 8) ○ a pair (num . cnt)
<Regenaxer> so it could also be (R1 (8 . N) . 0) to init all with zero
<Regenaxer> or (R1 (8 . N)) without any init
<Regenaxer> freemint, I don't understand the question
<tankf33der> only this works in vim and pil
<Regenaxer> A list of lists is normally (+List +Bag)
<tankf33der> and ignore 1667590754 in R1 list
<tankf33der> insane.
<Regenaxer> What if you do '((I . 6) (N . 4)) ?
<Regenaxer> gives two lists
<Regenaxer> take only the first 5 from the first list
<Regenaxer> But you must pass '((I . 5) ... on unaligned systems
<tankf33der> this is the same system
<tankf33der> one run
<tankf33der> one call
<freemint> *drawing diagram*
<Regenaxer> tankf33der, but repl or vim, right?
<Regenaxer> vim uses other env
<tankf33der> now both right
<Regenaxer> ah, didn't see :)
<tankf33der> in this md5 example
<Regenaxer> '(I I I I N N N N) is not a good idea
<tankf33der> in this md5 example, if you would like call md5 hash two times you should modify params in native call
<tankf33der> '(I I I I N N N N) is not a good idea
<Regenaxer> it makes assumptions about alignment *and* endianess
<tankf33der> ^^^ only this works
<Regenaxer> On the tested systems, but not general
<Regenaxer> It relies on the fact that the highest 4 bytes of the N are zero
<Regenaxer> you need 5 I's
<Regenaxer> and then alignment or not
<tankf33der> 4-5-6 I's and 4 N's doesnt work
<tankf33der> garbage.
<tankf33der> i bruteforce combinations and found only this two variations
<Regenaxer> 5 I's
<tankf33der> 5 I's and 4 N's ?
<Regenaxer> works only on little endian
<tankf33der> this is the same OS
<Regenaxer> 5 I's *or* 6 E's
<Regenaxer> 5 I's *or* 6 I's
<tankf33der> 4 N's on both ?
<Regenaxer> depends on the compile-time flags when the lib was *built*
<tankf33der> the same libc
<Regenaxer> (0 0 0 0
<Regenaxer> 6 0 0 0
<Regenaxer> 16 0 0 0
<Regenaxer> 1 0 0 0
<Regenaxer> 2 0 0 0
<Regenaxer> 98 106 101 99
<Regenaxer> 224 91 96 1 0 0 0 0
<Regenaxer> 0 0 0 0 0 0 0 0
<Regenaxer> 64 105 96 1 0 0 0 0 )
<Regenaxer> Wont work here
<Regenaxer> The N gets 16 0 0 0 98 106 101 99
<tankf33der> the same libc
<Regenaxer> only if the garbage is zero by chance
<tankf33der> one call
<Regenaxer> depends on the memory
<Regenaxer> if it was zero already
<Regenaxer> you get 16 0 0 0 0 0 0 0
<Regenaxer> four zeros
<Regenaxer> but they were by chance allocated from a heap that was still zero
<Regenaxer> The only correct way is pass either 5 or 6 I's
<tankf33der> and 4 N's /
<tankf33der> ?
<freemint> Regenaxer, here is an ilustration
<freemint> https://www.draw.io/?lightbox=1&highlight=0000ff&edit=_blank&layers=1&nav=1&title=Untitled%20Diagram.xml#R7VvPb9owFP5ruFbYTgIcC%2Bu2wyZV6mHbaUqJC1ZDjBxTYH%2F9HGKH2HEKY4kTUXqo4hfjPH%2Fv8%2FsVGKDZaveFhevldxrheACH0W6APg0g9MZQ%2FM8E%2B1yAwDAXLBiJchE4Cp7IHyyFatqGRDjVJnJKY07WunBOkwTPuSYLGaNbfdoLjfWnrsMFrgie5mFclf4gEV%2Fm0rE%2FPMq%2FYrJYqieDobzzHM5fF4xuEvm8AUQvh7%2F89ipUa8n56TKM6LYkQg8DNGOU8vxqtZvhOINWwZZ%2F7nPN3UJvhhN%2Bzgeknd7CeIOVxg
<freemint> e9%2BF5hcdgNzuYPB2i6XRKOn9bhPLu7FcYXsiVfxWIExKVcDjOOd7UqgWKjgj%2BYrjBnezFFkUdCs1eUkOPt0RBAwbcsGSGQslDaflGsfNy%2FuJAQ2OHw%2BwgH1PDwHMIR9A%2BO4uRIOHyHcIz6Dwdwice4f3iYp8UpHpPTeOAkus%2FikxjN4zBNyVyHQGyT7X9KuA6DX9ngzs%2BGO8KzW%2BBuiJAc53cDMJLjR8yI0BszuUSuAI4q4c4AVChJN2yOtajAQ7bAvMT9KuwlWH0LqkrGcBxy8qYrYYNaPuGREqFeYdWRTnI4NoyV6y4%2FVI52xjrAOC0QGQvlO64sdDB8seuzuKAymdbJoBHBb9Lkwc3k%2F2ZyUDF5ShIBMAxiAc70mYmrRXYljM1%2Fp1gAXblVIYnwhVynRcoZ
<freemint> fcUzGtPslCc0ETOnLySODVEYk0WScUvYPXMI08yzEpHk3ssbKxJF2WOsfln33E2EKqRbIqh6Zs%2FCJ9iAYwa2NHf6jaQcXy%2FevpEZWPLo1vBGdXiv8OpZYHO1oHsGyS3Zemugex8W9DOS4NZQr5aMN6dfcvpmNT9yaJpq%2BZqfhPQjWaDw%2B8oC0KEFzqiY%2B5QES3XLSfDYDq6bJBigprLgsbssuJddAX33ltSztaYAsHUFPlju6TLXV2vcvL7Vc7iwQLUO7twDmH1Sp210tX%2B3YRC%2BEwfLEe7cBlG3kTDwdPuNgjv%2FwlhoUAEFE3Op5qIhrFbCt%2FKgvjxwGihs9XKPk1Pb2e30TAbGOZpcmpwCYyGvteS0ny94td3b6rP2ItOtRLYQ0GWJ3M%2BXqLpTtuSO7TGyWi7d
<freemint> GOk0fVetgX4xEuon1NJGbI2SqIf1jAmIy44GaqKcaTg56vRdNTLaHZcmQt7w%2FXWay4NQtSyJr7sj5XmnPUhrHrWadV492p2960dnfGnxcu9UFHxF9Xe62XLCdal4q%2FVkOi3sJrrxPHChPwMGC5AZfWocmrBNuC9NW2cT0np9faMShdKP1ullzld61c2Hw%2F%2BbDye%2BweB8hxd77yZfq9mI3HR0tlLc75LiJgUAurSbeKoL0hOOqw02xsEz6tZ%2BcdDW%2Bu6Ug55p0osbaKgbDk6cUlAMj7%2BLyacff3uEHv4C
<freemint> oh link is way to long i tinyurl it
<Regenaxer> No, only 3 N's
<tankf33der> ok
<Regenaxer> struct addrinfo {
<Regenaxer> int ai_socktype;
<Regenaxer> int ai_family;
<Regenaxer> int ai_protocol;
<Regenaxer> int ai_flags;
<Regenaxer> struct sockaddr *ai_addr;
<Regenaxer> socklen_t ai_addrlen;
<Regenaxer> char *ai_canonname;
<Regenaxer> struct addrinfo *ai_next;
<Regenaxer> };
<Regenaxer> between socklen_t and struct sockaddr *ai_addr; *may* be padding
<Regenaxer> oh, needs javascript
<freemint> i could send you an png too wait a minute
<Regenaxer> freemint, can't you express with simple words?
<freemint> I tried
<Regenaxer> tankf33der, what is that? Difference?
<Regenaxer> freemint, (+List +Bag) ?
<Regenaxer> maintains a List of the +List he is member of?
<Regenaxer> ???
<Regenaxer> I don't get it
<Regenaxer> And why does a list maintain a tree??
<Regenaxer> tankf33der, the two calls are the same?
<tankf33der> as you see the code
<Regenaxer> yes
<freemint> What i want
<Regenaxer> Is this for an aligned lib?
<Regenaxer> tankf33der, so it is fine
<Regenaxer> correct, not?
<tankf33der> correct, i will try to play
<Regenaxer> The 6th int is garbage, depending on what was in the heap before the call
<tankf33der> how i could found this without you ? :/
<tankf33der> and
<tankf33der> position between what fields padding is
<freemint> I thought i use a hook (which maintains an index tree internally)
<freemint> Regenaxer, '(+List +Bag) would work
<Regenaxer> tankf33der, padding is when size gets larger usually
<Regenaxer> 5 ints are not aligned to 64 bits, so they may be padded
<Regenaxer> freemint, great
<Regenaxer> is there an example out there? The demo app/ has no bags
<freemint> Does my code with hook express the diagramm i showed?
<Regenaxer> I haven't opened the diagram
<Regenaxer> too lazy to switch the browser to JS ;)
<Regenaxer> ah
<Regenaxer> you mean (rel members (+Hook +Joint) (+ListMember) Liste)
<freemint> diagramm as png
<freemint> i could give you svg, too
<Regenaxer> have the diagram
<Regenaxer> (rel members (+Hook +Joint) (+ListMember) Liste) is not correc
<Regenaxer> +Joint needs the other relation
<Regenaxer> and (rel Liste is in another class, and not a single object
<Regenaxer> (rel foo (+Hook +Joint) bar (+Cls))
<Regenaxer> then you can define relations in the same class or subclass using 'foo' as hook
<Regenaxer> you mean something like this?
<Regenaxer> (rel lst (+List +Bag)
<Regenaxer> ((+Ref +Date))
<Regenaxer> ((+Link) (+ListMember)) )
<Regenaxer> (rel lst (+List +Bag)
<Regenaxer> ((+String)) # Home page
<Regenaxer> ((+Ref +Date)) # since
<Regenaxer> ((+Ref +Date)) # last seen
<Regenaxer> ((+Link) (+ListMember)) ) # Some object
<Regenaxer> A +Joint does not work here
<Regenaxer> Another way is to have objects in between
<Regenaxer> like the +Pos objects between +Ord and +Item in app/er.l
<Regenaxer> this is most general
<freemint> I do not get the idea to what class the rel's are bound to
<Regenaxer> Always to the current class
<freemint> But you did not give any and defined to rel's
<freemint> with same name
<freemint> Also i want +Liste as standalone class i can search and index for
<freemint> ... but i go with an object in between now
<freemint> thanks
<Regenaxer> ah, these were two examples
<Regenaxer> the second extended the first
<Regenaxer> So +ListMember could be all you need
<Regenaxer> (rel mem (+List +Joint) list (+ListMember))
<Regenaxer> and in the other
<Regenaxer> (rel list (+Joint) mem (+Liste))
<Regenaxer> +ListMember has attributes since, last seen etc.
<Regenaxer> So actually no object in between necessary it seems
<freemint> mhh so i go for +bag
<freemint> That is actually good
<Regenaxer> But no +Joint in bag
<freemint> ok ... i know why
<Regenaxer> ok
<Regenaxer> ((+Ref +Link) (+ListMember)) then to go back from +ListMember
<freemint> +Ref2 is really cool .. but i see no use yet
<Regenaxer> it lets you search efficiently either in the current class or in the superclass
<freemint> After how many objects would you go for +Hook instead of a +List
<Regenaxer> +Hook is no alternative to +List
<Regenaxer> +Hook is a local root object for indexes
<Regenaxer> (+Ref +Link) is an alternative for (+Joint)
<freemint> +Hook maintains a local database in the object ...
<Regenaxer> exactly
<freemint> (===)
<freemint> Each +Liste will "somehow" "contain" all emails in that mailing list. I imagine that storing a few ten thousands email in a list and filter them to get what you need does not work great
<Regenaxer> I see
<freemint> You could use +Hook so the +Liste will "somehow" "contain" emails
<Regenaxer> then no +List, it will be too long
<Regenaxer> yes, the mails are in an index or indices
<Regenaxer> you can keep them local to some other object which is its hook
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
Regenaxer has quit [Remote host closed the connection]
Regenaxer has joined #picolisp
<Regenaxer> You would index the mails by address, timestamp, content etc
<Regenaxer> brb
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
<freemint> I want to have basic queries (title, data sent, sender, interval sent, (maybe full text)) on global and per mailing +Liste basis
<freemint> Unrelated but still related, can i index objects by (static) properties which are stored in objects "connected" to them
<freemint> example: each +Mail has an +Author and the other has an email +String. Can i index +Mail by the email +String of the +Author object(s?) "connected" to it?
<freemint> *the +Author has an email +String
<Regenaxer> You can query fine for those
<Regenaxer> Like you search for orders +Ord by supplier, item, customer
<Regenaxer> 'choOrd' in app/gui.l
<freemint> afk
<tankf33der> Regenaxer: here ?
<Regenaxer> yep
<tankf33der> remember i asked today
<tankf33der> 12:57 <tankf33der> '(R1 (8 . N) (0 . 8)))
<tankf33der> 12:57 <tankf33der> why 8 . N ?
<tankf33der> you answered
<tankf33der> Regenaxer> (8 . N) is an 8-byte number
<tankf33der> =========
<tankf33der> i thought (8 . N) is 8 8-byte numbers
<Regenaxer> □ structures, passed as lists with
<Regenaxer> ☆ a variable in the CAR (to receive the returned structure data, ignored
<Regenaxer> above), and
<Regenaxer> ☆ a cons pair for the size and result specification in the CADR (see
<Regenaxer> when the CAR is NIL)
<Regenaxer> ☆ an optional sequence of initialization items in the CDDR, where each
<Regenaxer> may be
<Regenaxer> ○ a positive number, stored as an unsigned byte value
<Regenaxer> ○ a negative number, whose absolute value is stored as an unsigned
<Regenaxer> integer
<Regenaxer> ○ a pair (num . cnt) where 'num' is stored in a field of 'cnt' bytes
<Regenaxer> So (8 . N) is a cons pair for the size and result specificatio
<Regenaxer> n
<Regenaxer> result is N
<tankf33der> 8 8-byte numbers is (64 . N) then ?
<Regenaxer> No, the size of *this* struct is 8 bytes
<Regenaxer> it is a pointer to the struct
<Regenaxer> (0 . 8)) is not needed, right? Or must this pointer be initialized?
<cess11_> So it is the pointer numbers and an offset telling where that memory structure ends?
<Regenaxer> if not, '(R1 (8 . N)) is enough
<tankf33der> does this will work too: '(R1 (1 . N) (0 . 8)))
<tankf33der> ?
<Regenaxer> cess11_, no
<Regenaxer> tankf33der, no
<Regenaxer> 1 byte is too small
<cess11_> It is the length of the pointer, then?
<Regenaxer> we must pass the address of a pointer
<Regenaxer> cess11_, yes, 8 bytes
<tankf33der> output seems correct, not tested with struct calls
<cess11_> Good, thanks, then I understand.
<Regenaxer> 1 *may* work, as malloc allocates more (aligned)
<Regenaxer> but it is wrong
<tankf33der> ok
<Regenaxer> you could also do '(R1 (8 B . 8))
<Regenaxer> allocate 8 bytes instead of 1 N
<Regenaxer> Same as '(R1 (8 (B . 8)))
<Regenaxer> Same as '(R1 (8 . (B . 8)))
<Regenaxer> '(R1 (8 . N)) is also '(R1 (8 . (N . 1)))
<Regenaxer> which is '(R1 (8 N . 1))
<tankf33der> tears.
<Regenaxer> or just '(R1 (8 . N))
<Regenaxer> :)
<Regenaxer> One N is 8 B :)
<Regenaxer> (N . 4) # long[4]
<Regenaxer> So (N . 1) is the same as N, right?
<tankf33der> right
<Regenaxer> I also have to look it up each time
<Regenaxer> forget it immediately again :)
<tankf33der> my problem was in (8 . N) and (N . 8)
<Regenaxer> yes, confusing
<tankf33der> reading everything about struct padding.
<Regenaxer> good
<tankf33der> why none told me "tankf33der, read struct padding and try again" ?
<Regenaxer> I did not even know *where* to read ;)
<tankf33der> i fought with problem which doesnt exist!
<tankf33der> damn.
<tankf33der> i'm very happy now.
<Regenaxer> But it is still nasty
<Regenaxer> we must know when it is aligned
<Regenaxer> Is there an easy way to find out at runtime, dynamically?
orivej has joined #picolisp
<tankf33der> lets says developer will add special reference in documentation of library
<Regenaxer> ok, lets hope
<tankf33der> lets say it all aligned last 30 years if no special notes.
<Regenaxer> Makes sense
rob_w has quit [Quit: Leaving]
alexshendi_ has quit [Read error: Connection reset by peer]
<freemint> tankf33der, what does the lib do you want to work with?
<tankf33der> freemint: libc
<freemint> ohhh
<freemint> cool
<freemint> which parts of it do you make accessable?
<cess11_> getaddrinfo()
<cess11_> At least that was what they were looking at earlier.
<freemint> so just this function ... ok
<tankf33der> Regenaxer: here?
<tankf33der> ignore above link
<tankf33der> this better:
<tankf33der> confused about comment 8 integers
<tankf33der> maybe 8 bytes?
orivej has quit [Ping timeout: 240 seconds]
<tankf33der> or c pseudocode int[8] fun(...
<Regenaxer> ret
<Regenaxer> no, 8 ints
<Regenaxer> 8 * 4 bytes
<tankf33der> does c pseudocode show 8 integers?
<tankf33der> confused again
<tankf33der> ok then
alexshendi has joined #picolisp
<Regenaxer> hmm, the C prototype does not care how many integers int *fun(void);
<Regenaxer> The caller must know
<Regenaxer> The prototype says only that a pointer to ints is returned
<Regenaxer> But we, as the caller, somehow "know" these are 8 integers ;)
<tankf33der> aaa, ok
<freemint> Regenaxer, Any tips on handling time zones?
<Regenaxer> The GUI can use the browser's time zone
<Regenaxer> Besides this I never needed it
<Regenaxer> The date/time functions support only UTC and local time
<freemint> (how would you store them?
<Regenaxer> I would stay with the internal date format
<Regenaxer> For your mails, the natural way is to store all as UTC
<Regenaxer> Normally I use
<Regenaxer> (rel ts (+Bag) ((+Date)) ((+Time))) # Timestamp
<freemint> So i would try to figure out the the time zone and go on from there
<Regenaxer> or (rel ts (+Ref +Bag) ((+Date)) ((+Time)))
<freemint> I would like to index both independently
<Regenaxer> yes, the UTC offset is in the "From " line, the first line
<Regenaxer> Does a time index make sense?
<freemint> ok
<Regenaxer> find all mails between 7 and 8 o'clock for *each* day?
<freemint> I see use cases
<freemint> you would combine it with a day filter ... but yeah
<Regenaxer> then an +Aux is needed
<Regenaxer> (rel d (+Aux +Ref +Date) (t))
<Regenaxer> (rel t (+Ref +Time))
<freemint> Does the first prefix class eat the first arguement?
<Regenaxer> Yes, *if* it takes arguments
<Regenaxer> depends on the class
<Regenaxer> and is just a convention of how the 'T' methods behave
<Regenaxer> But normally I go from left to right
<freemint> Let's say an email has date, time, from, and to how do i tell to indexes for any comination of those?
<freemint> Do i need every combination?
<Regenaxer> no
<Regenaxer> You select later from desired search criteria
<Regenaxer> only date+time is needed in combination
<freemint> ahh
<Regenaxer> so thit yesterday-noon is before today-morning
<Regenaxer> So I would do the +Bag, but if you want a separate time index then the +Aux
<freemint> Is there a reason why you make the rel names as short as possible
<Regenaxer> yes, it is more readable, and - more important - saves space in the DB
<Regenaxer> Theoretically reading and writing is faster too ;)
<Regenaxer> But space is always critical, not so much on disk but in the kernel buffers
<Regenaxer> Caching, cache hits
<freemint> Ahh then i will short them later
<Regenaxer> yes, good
<freemint> What happens if there are two equal +Keys ?
<Regenaxer> The GUI blocks them, but programmatically you can insert them into a tree
<Regenaxer> one of them will not be found then
<freemint> What is the difference to +Ref then?
<Regenaxer> I consider this as a corrupt DB, and 'dbCheck' complains about "dangling"
<Regenaxer> +Ref is no problem
<freemint> I see but the difference is semantic not technical
<Regenaxer> it makes the keys unique by adding the object itself
<Regenaxer> yes
<Regenaxer> technically it is the same tree
<Regenaxer> you can store any key/value
<Regenaxer> it is the +index family which makes these assumptions
<Regenaxer> various key formats
<Regenaxer> : (dep '+index)
<Regenaxer> +Idx
<Regenaxer> +IdxFold
<Regenaxer> +Ref
<Regenaxer> +index
<Regenaxer> +Key
<Regenaxer> Plus all the index prefix classes
<freemint> I got an prototype of my +Mail primitive, i am still not sure what to do with the text ...
<freemint> Can i still show it?
<Regenaxer> ok
<freemint> (class +Mail +Entity)
<freemint> ((+Date)) #when
<freemint> ((+Link) +Mailhost) #by
<freemint> ((+Link) +Mailhost) #from
<freemint> (rel recieved (+Swap +List +Bag)
<freemint> ((+Time))
<freemint> ((+Link) +Timezone) )
<freemint> (rel from (+Ref +Link +Account)) #index by mailing list (and user mabye) too
<freemint> (rel to (+Ref +Link +Account)) #
<freemint> (rel date (+Aux +Ref +Date) (time)) #
<freemint> (rel time (+Ref +Time)) #
<freemint> (rel message_id (+Ref +String))
<freemint> (rel subject (+IdxFold))
<freemint> (rel attachments (+List +Joints) attached (+Anhang))
<freemint> *+IdxFold +String)
<Regenaxer> Looks good!
<Regenaxer> What is 'received'?
<freemint> I just give an example
<Regenaxer> ((+Link) +Mailhost) must be ((+Link) (+Mailhost))
<Regenaxer> +Timezone too
<Regenaxer> or (+Ref +Link) (+Account)
<Regenaxer> etc
<freemint> From eclipse-admin Sun Jul 11 10:47:30 1999
<freemint> Received: (from uucp@localhost)
<freemint> by matrix.delos.de (8.8.8/8.8.5) id KAA18339
<freemint> From: Silbenfrau@aol.com
<freemint> for <eclipse@delos.de>; Sun, 11 Jul 1999 10:47:30 +0200 (MET DST)
<freemint> Received: from imo17.mx.aol.com(198.81.17.7)
<freemint> via SMTP by matrix.delos.de, id smtpdAAA0oE2I7; Sun Jul 11 10:47:02 1999
<freemint> Received: from Silbenfrau@aol.com
<freemint> by imo17.mx.aol.com (IMOv20.21) id kEJBa07548 (4224)
<freemint> for <eclipse@delos.de>; Sun, 11 Jul 1999 04:46:55 -0400 (EDT)
<freemint> Message-ID: <b8089967.24b9b3ff@aol.com>
<freemint> Date: Sun, 11 Jul 1999 04:46:55 EDT
<freemint> Subject: Re: [Eclipse] die ebene der eklipti(k)ker
<freemint> To: eclipse@delos.de
<freemint> MIME-Version: 1.0
<freemint> Content-Type: text/plain; charset="us-ascii"
<freemint> Content-Transfer-Encoding: 7bit
<freemint> X-Mailer: AOL 4.0.i for Windows 95 sub 23
<freemint> oder schreiben wir:
<freemint> Hilfe es wird dunkel...
<freemint> ist dies nur bei mir
<freemint> der Fall?....
<freemint> oder
<freemint> auch bei andern so?
<freemint> Hilfe, gibt's noch
<freemint>
<freemint> Andere.................
<freemint>
<freemint> hier in diesem All?
<freemint>
<freemint> (foreign mobx file)
<freemint> It is the paper trail of delivery
<Regenaxer> ok ;)
<freemint> (just kicked out the time zone ... it help with very dumb paper trail faking but having a reversible mapping between my db and mbox is not my goal
<freemint> Should i put mail-content in a different class?
<Regenaxer> Perhaps like the +Mup in the wiki?
<Regenaxer> perhaps not
<Regenaxer> it is just the text?
<Regenaxer> may be different parts
<Regenaxer> mimetypes, attachments
<freemint> Oh ... good point ... have forgot something
<freemint> Is that good?
<freemint> (rel other_header (+List +Bag)
<freemint> ((+Any)) ) #Value
<freemint> ((+String)) #Key
<Regenaxer> syntactically yes
<freemint> and otherwise?
<Regenaxer> Depends on the use case
<freemint> Is there a problem with +Any?
<Regenaxer> no, fine
<freemint> How does +Any look from a size point of view?
<Regenaxer> Can be anything
<Regenaxer> Why size?
<freemint> hard drive size
<freemint> Is a +Any that is a +String in the end bigger than a +String?
<Regenaxer> ah, no. No problem
<Regenaxer> +Any is just not checked or further handled
<freemint> I guess i go change value to +String too
<Regenaxer> you could make it all +Any
<Regenaxer> ok
<freemint> Why do'nt we make it all +Any?
<freemint> so gui can check?
<Regenaxer> yes, for example
<Regenaxer> for atoms it is not much different
<Regenaxer> but if it has internal structure like +List or +Bag the DB must know it
<freemint> I know this a stupid question but does the database does any magic with the type info under the hood?
<Regenaxer> yes, sure, just not much with +String or +Number
<Regenaxer> but it does a lot with symbols +Link, +Joint
<Regenaxer> and +List and +Bag
<freemint> this supprises me
<freemint> i thought you were of the type "type specific optimization?" let the run time handle that
<Regenaxer> most importantly the 'rel>' methods
<Regenaxer> it *is* all runtime
<Regenaxer> There is nothing static
<freemint> What is 'rel> ?
<freemint> nothing in the 'doc
<Regenaxer> 'rel>' looks at the involved objects and decides how to handle them
<freemint> ahh
<Regenaxer> Search for (dm rel> ... in @lib/db.l
<Regenaxer> or just for rel>
<freemint> This leads me to another question why @lib.db.l not in assembly?
<Regenaxer> rel> is the core function of E/R
<Regenaxer> haha, assembly makes no sense here
<Regenaxer> It is all method lookup
<Regenaxer> and I/O
<Regenaxer> It is *very* hard to write Lisp code in asm
<Regenaxer> asm is the VM
<Regenaxer> But the E/R stuff is on the Lisp level
<freemint> (dm rel> (Obj Old New))
<freemint> T )
<freemint> (dm rel?> (Obj Val)
<freemint> quiet empty :D
<Regenaxer> The default
<Regenaxer> like for +Any
<Regenaxer> does nothing
<Regenaxer> (class +Any +relation)
<Regenaxer> : (dep '+relation)
<Regenaxer> +Blob
<Regenaxer> +Any
<Regenaxer> +Bag
<Regenaxer> +relation
<Regenaxer> +Joint
<Regenaxer> +Link
<Regenaxer> +Bool
<Regenaxer> +Symbol
<Regenaxer> +String
<Regenaxer> +Number
<Regenaxer> +Time
<Regenaxer> ok, I need time now
<Regenaxer> Study it! :)
karswell has quit [Ping timeout: 240 seconds]
<freemint> Regenaxer, my girl friend enjoys Penti.
<freemint> afk
<Regenaxer> good to hear! :)
<Regenaxer> See you
<freemint> any tipps for getting the chords in to your head?
<freemint> ok bye
<Regenaxer> hehe, just typing all day
<Regenaxer> ok :)
C-Keen has quit [Quit: meltdown fixes]
yumaikas is now known as Church-
<cess11_> The Penti cheat sheet chord is a good start.
Church- is now known as yumaikas
<cess11_> F arpeggio then 1-2-5, 'h'.
<Regenaxer> cess11_, is starting with 1 for the thumb better? I thought zero
<Regenaxer> (did not use it so far)
<Regenaxer> I was thinking of a numeric notation
<Regenaxer> F arpeggio would be 0-1, the '-' meaning arpeggio
<Regenaxer> 'h' would be 014
yumaikas is now known as Church--
<Regenaxer> or is 1-2 125 better?
<Regenaxer> Seems like starting with 1 for the thumb in more intuitive
Church-- is now known as yumaikas
<Regenaxer> oops, FUNC is 3-4
<Regenaxer> 1-2 is SHIFT, and 2-1 is SHIFT-LOCK
<Regenaxer> hmm, not sure
<Regenaxer> Good night!
<Regenaxer> afp
orivej has joined #picolisp
<cess11_> I'm also not sure which is better.
<freemint> Good Night1
<freemint> !
freemint has quit [Ping timeout: 252 seconds]