ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Check also http://www.picolisp.com for more information
aw- has quit [Quit: Leaving.]
orivej has joined #picolisp
orivej_ has quit [Ping timeout: 256 seconds]
orivej has quit [Ping timeout: 246 seconds]
aw- has joined #picolisp
rob_w has joined #picolisp
orivej has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
_whitelogger has joined #picolisp
<aw-> Regenaxer: i tried compiling pil21 on arm64, and it fails with llvm-7 and llvm-8
<aw-> well, the first issue is it can't bootstrap without picolisp
<aw-> and second issue is i have to make clean first, to remove the binary .bc files
<aw-> also, hi
<aw-> so i just modified the Makefile to use existing picolisp64 binary, and llvm-8 commands (llc-8, etc), and it seems to have compiled correctly
<tankf33der> me too
<tankf33der> only x64 was ok
<aw-> tankf33der: oh ok, thanks
<aw-> seems (file) is undefined
<Regenaxer> Strange! Should bootstrap without pil installation
<Regenaxer> (file) is not implemented yet iirc
<aw-> Regenaxer: perhaps if i had llvm-10
<Regenaxer> src/base.bc is not in the tgz?
<aw-> yes it is, but it doesn't work on arm64
<Regenaxer> I use it on arm64 almost exclusively
<aw-> or it requires llvm-10
<Regenaxer> Perhaps it does not match old llvm?
<aw-> Debian Buster doesn't have version 10
<Regenaxer> llvm-10 is surely not necessary
<aw-> it is according to error messages
<Regenaxer> hmm
<Regenaxer> I have 9 on Buster
<Regenaxer> apt list llvm
<Regenaxer> llvm/unstable,now 1:9.0-49.1 amd64 [installed]
<Regenaxer> Listing... Done
<aw-> llvm-link: base.bc: error: Unknown attribute kind (61) (Producer: 'LLVM10.0.1' Reader: 'LLVM 7.0.1')
<aw-> ah
<aw-> unstable
<aw-> yeah.. i dont want to install unstable stuff on my work machine
<aw-> sorry
<Regenaxer> Not sure about 7
<Regenaxer> never tested
<aw-> same error with LLVM 8
<Regenaxer> hmm, does that mean it never allows a lesser version than the builder has?
<Regenaxer> But a fresh build works for you?
<aw-> no idea, i've never used llvm before
<Regenaxer> No
<aw-> fresh build yes, if I bootstrap with picolisp
<Regenaxer> I mean if you build with some pil
<Regenaxer> ok
<Regenaxer> yes
<Regenaxer> So in the long rang we should ship from a lower version
<Regenaxer> On Termux I have 10
<Regenaxer> and I built on Termux
<Regenaxer> The version shoul not matter
<aw-> well..
<aw-> it compiles with LLVM-7 if i bootstrap with picolisp64
<aw-> but i have to do make clean first, remove the .bc files
<Regenaxer> tankf33der, why do you call the Intel archiecture "x64"? I think it is wrong, there is no such at Intel
<aw-> x86-64 ?
<Regenaxer> aw-, yes, as I said, we can build with an older version in the future
<Regenaxer> aw-, yos
<Regenaxer> or x86-32
<aw-> x64 maybe is just faster to type ;)
<Regenaxer> the family based on 8086 originally
<Regenaxer> then 80186 and 80286
<Regenaxer> thus x86
<Regenaxer> Yeah, typing easiness
<Regenaxer> hehe, then I have a problem on Termux. An older version does not exist :)
<aw-> can't llvm specifically target older versions?
<Regenaxer> good idea
<tankf33der> slide 6.
<tankf33der> current pil21 generates llvm-ir code for only platform.
<Regenaxer> Which one? "C to IR"?
<Regenaxer> tankf33der, I do not understand
<tankf33der> slide 6 shows llvm-ir is different for platforms.
<Regenaxer> This is what all LLVM docs say, and LLVM folks tell all the time
<Regenaxer> But it is *exactly* what I tried to avoid
<Regenaxer> With the lib.c and lib/sysdefs stubs
<tankf33der> thats why i cant compile pil21 on non x64 platform.
<Regenaxer> the *.bc files in the distro should contain not platform specific stuff
<tankf33der> i686 failed, sparc failed.
<Regenaxer> tankf33der, it is NOT x64 !!!
<tankf33der> i686 32bit failed.
<Regenaxer> If some arch fails, we must locate the problem
<Regenaxer> 32-bits is not supported
<Regenaxer> not possible
<Regenaxer> we have *some* assumptions, see the end of doc/structures
<tankf33der> ok
<Regenaxer> 64 bit per word
<tankf33der> so sparc on modern solaris 11 failed too.
<tankf33der> 64bit, modern llvm.
<Regenaxer> But for other things (endianess, stack direction, stack alignments) I avoided dependencies
<Regenaxer> The questions is why they fail
<Regenaxer> Which assumption is violated?
<tankf33der> i dont remember.
<tankf33der> i will try next week and show if you want.
<Regenaxer> ok, anyway it is a different problem as aw has
<Regenaxer> the version issue
<Regenaxer> Is it really that LLVM complains when the build version is newer?
<Regenaxer> Always?
<Regenaxer> Even if all features are supported?
<Regenaxer> We could fix that trivially
<Regenaxer> If we pack src/base.ll into the distro
<tankf33der> he should remove bc files or run make clean
<Regenaxer> instead of base.bc
<Regenaxer> tankf33der, he did, but then he needs a global pil
<Regenaxer> Thats what I wanted to avoid
<Regenaxer> I want it to bottstrap by itself
<tankf33der> then someone should pickup correct tool chain and create bc for correct platform
<Regenaxer> The problem is only that *bc is very big
<Regenaxer> $ lt src/base.*
<Regenaxer> -rw-r--r-- 434K Jul 30 14:32 src/base.bc
<Regenaxer> -rw-r--r-- 2.8M Jul 30 14:32 src/base.ll
<Regenaxer> no, I mean *.ll
<Regenaxer> That's why I want to distribute *.bc
<Regenaxer> src/base.ll does not contain *any* version information
<tankf33der> then you should distribute *.bc for every platform and llvm version.
<Regenaxer> It is just a text file *I* create
<tankf33der> but bc does
<Regenaxer> completely equal for all versions
<Regenaxer> Yes
<aw-> i dont like the idea of distributing bc
<aw-> because it's binary
<Regenaxer> the bc is generated by the stupid llvm-10 here
<Regenaxer> T
<aw-> i want source code to compile from, not binary
<Regenaxer> aw, you can
<tankf33der> afk.
<Regenaxer> but you also want to bootstrap, right?
<aw-> i dont want to bootstrap
<aw-> i **had no choice**
<Regenaxer> But I don't want that mess of supporting many platforms
<Regenaxer> as in pil64
<aw-> yes understood
<Regenaxer> I did a lot of effort to separate arch info
<Regenaxer> and it is ok (except for sparc and other esotherics)
<Regenaxer> But the version is stupid
<aw-> so to avoid doing like pil64, the only option is to include the .bc file ?
<Regenaxer> The *.ll file would be fine too
orivej has joined #picolisp
<Regenaxer> .bc and .ll are equivalent
<Regenaxer> as I understood it
<aw-> i see
<Regenaxer> you can convert from one to the other
<Regenaxer> But bc is a lot smaller, see above
<Regenaxer> .ll is a text file, which is generated by the build process from the sources in src/*.l
<Regenaxer> It *should* be portable
<Regenaxer> at least is that what I intended
<Regenaxer> I could perhaps distribute a zipped .ll
<Regenaxer> hehe:
<Regenaxer> $ zip -r a.zip src/base.ll
<Regenaxer> $ l a.zip
<Regenaxer> -rw-r--r-- 1 abu abu 454K Jul 30 14:38 a.zip
<Regenaxer> Makes the Makefile a little more involved
<tankf33der> iirc sparc has the same problem, no pil64
<aw-> so if the .ll are in the .tar.gz then they're compressed too
<Regenaxer> tankf33der: This means it cannot bootstrap with some pil64?
<Regenaxer> aw-, wow, of course!! :)
<Regenaxer> hehe
<Regenaxer> that would be trivial
<aw-> Regenaxer: the problem is still that even if i have the .ll and or .bc you distribute, i cant compile with LLVM-8
<Regenaxer> I don't think it is a problem then
<Regenaxer> Why should it?
<aw-> you saw the error i posted earlier
<Regenaxer> The .ll file contains absolutely no version information
<aw-> oh really?
<Regenaxer> hmm, which one? Can't find it atm
<aw-> can you make a new release with those?
<aw-> i get this error if i force llvm-8 with the .bc you provided
<aw-> llvm-link-8: base.bc: error: Unknown attribute kind (61) (Producer: 'LLVM10.0.1' Reader: 'LLVM 8.0.1')
<aw-> llvm-link-8: error: loading file 'base.bc'
<Regenaxer> We need to change the dependencies in Makefile first
<Regenaxer> ah, yes, that one
<Regenaxer> Yeah, there is no producer in .ll
<aw-> oh great
<aw-> let's try that
<Regenaxer> the .ll files I completely generate, every byte
<Regenaxer> every line
<Regenaxer> It is simply a text file 'prin'ted by src/lib/llvm.l
<aw-> good
<aw-> almost 100k lines of text haha
<Regenaxer> The problem is that the dependency in Makefile only looks at base.bc
<Regenaxer> yeah, bloated :)
<Regenaxer> We first need an additional rule to build .bc from .ll
<tankf33der> http://ix.io/2sGY
<aw-> isn't it there already?
<aw-> llvm-as -o base.bc base.ll
<aw-> to build base.bc
<tankf33der> this is sparc error generating base.bc file
<Regenaxer> I see
<Regenaxer> memcpy intrisic
orivej has quit [Ping timeout: 256 seconds]
<Regenaxer> It is as it is documented
<Regenaxer> Perhaps also a version problem?
<Regenaxer> The llvm lang ref says:
<Regenaxer> declare void @llvm.memcpy.p0i8.p0i8.i64(i8* <dest>, i8* <src>,
<Regenaxer> i64 <len>, i1 <isvolatile>)
<Regenaxer> Anyway, let's try with a modified Makefile first
<Regenaxer> Changed Makefile, testing
<Regenaxer> Done, the TGZ got marginally bigger
<Regenaxer> from 358 KiB to 584
<Regenaxer> That's tolerable, right?
<Regenaxer> aw-, can you test it in your setup?
<Regenaxer> I released it
<tankf33der> Regenaxer: works.
<Regenaxer> Cool! :)
<Regenaxer> I'm very glad we found this solution
<aw-> works
<Regenaxer> :))
<aw-> Regenaxer: indeed, this is great
<Regenaxer> I was too much worried about the size
<aw-> .tgz isn't very big
<aw-> 584K
<Regenaxer> yeah
<Regenaxer> I have a stupid paranoia
<Regenaxer> Running light without overbyte
<aw-> that paranoia is very much appreciated
orivej has joined #picolisp
<Regenaxer> ok :)
<aw-> Regenaxer: why does the makefile define ASM, but then $(LIB)/sysdefs: calls clang directly?
<aw-> instead of $(ASM)
<Regenaxer> oh, yes, stupid
<Regenaxer> I change it
<aw-> same in lib.bc
<Regenaxer> Released once more
<Regenaxer> yeah, fixed
<aw-> sorry
<aw-> oh you spotted it too
<aw-> ok
<Regenaxer> vip spotted it :)
<aw-> this deserves an announcement on the mailing list
<Regenaxer> hmm, a bit too early I think
<aw-> haha ok
<Regenaxer> We get too many questions ;)
<Regenaxer> Like why (file) does not work :D
<Regenaxer> scnr
<aw-> :)
orivej has quit [Ping timeout: 240 seconds]
<Regenaxer> beneroth here?
<Regenaxer> I abandoned using (+Swap +List +Ref +Link)
<Regenaxer> +Swap does not work well with external symbols
<Regenaxer> I use plain (+List +Ref +Link)
<Regenaxer> +Swap would need to be made more clever
<Regenaxer> I don't want to start that now
<beneroth> back now
<Regenaxer> My use case doesn't actually need it, the list is not such long :)
<beneroth> ok
<Regenaxer> Just to keep you informed
<beneroth> else why not use an explicit separate entity, instead of an "anonymous separate entity" via swap?
<beneroth> yeah thanks, appreciated :)
<Regenaxer> yes, this is better
<Regenaxer> as you said yesterday
<beneroth> maybe make it even a +Key +List +Link and use request to deduplicate :P
<beneroth> well depends on the usage
<Regenaxer> T
<Regenaxer> A separate entity is more powerful anyway
<beneroth> T
<beneroth> costs maybe 2-4 line of codes and a few internal symbols
<Regenaxer> yeah
<beneroth> but also more maintainable I think
<Regenaxer> extendable
<beneroth> +Swap is really just good for +String when they are not as big to make Blob useful
<beneroth> yeah
<Regenaxer> yes, that was the intention
<beneroth> I like to do Entities with 1-1 joints
<Regenaxer> right
<beneroth> for cases where is additional information only required in some objects (if a second parent entity would not make sense)
<beneroth> or when...in majority of queries only one or the other is of interest, even when its logically 1 single entity/unit
<Regenaxer> and to make loading fast
<beneroth> exactly
<Regenaxer> eg during seach
<beneroth> a partitioned object/entity, in a way
<Regenaxer> very efficient in space and speed
<Regenaxer> memory space, not disk
<beneroth> T
<beneroth> disk too, if variation between objects is big, less diversity in object size
<Regenaxer> indeed, block size
<beneroth> e.g. I have a general Organisation entity, but actionally multiple types of organisations exist (different business relationship), and a single organisation might be none, one, or multiple of this extra/sub- types
<beneroth> so I have the organisation-type-specific stuff in a separate metadata entity which has a 1:1 joint to the general organisation
<beneroth> so also separated indexes
<Regenaxer> good
<beneroth> I feel this is a good flexible approach, as I expect longterm many changes to the type-specific metadata and additional subtypes
<beneroth> decoration instead of inheritance
<Regenaxer> yeah, decoration is a good term
<beneroth> I think it is the technical correct one even (well deduced from the Decoration Pattern from GoF)
<Regenaxer> I see
<beneroth> and yeah, the lisp view has a bit of "design patterns (especially OOP) are a bit of a language smell"...but I would argue we also have patterns in lisp, for sure
<beneroth> less need for design patterns than java certainly, because the language is much more flexible/powerful, allows better abstractions
<Regenaxer> Pattern is a quite overloaded term
<beneroth> and patterns always are at risk of being cargo culted.. but still some good stuff in there
<beneroth> T
<Regenaxer> The compression factor of *.ll is stunning. This shows how redundan the LLVM-IR code really is
<Regenaxer> I should have tried earlier
rob_w has quit [Quit: Leaving]
<tankf33der> i think sparc fails because llvm6 has different memcpy declarations.
<Regenaxer> I see, it is still 6 on sparc?
<Regenaxer> Perhaps that memcpy version did not exist yet?
<tankf33der> it has 5 params
<tankf33der> maybe.
<Regenaxer> Is sparc still maintained?
<beneroth> kinda not really
<tankf33der> all solaris yes.
<beneroth> there is a FOSS project
<tankf33der> :)
<Regenaxer> ok
<beneroth> Oracle still takes support payments, but they fired all SUN hardware/solaris guys afaik
<Regenaxer> uh
<tankf33der> true.
aw- has quit [Quit: g'nite]
<tankf33der> downloading latest patches.
<tankf33der> so i need compile llvm myself.
<Regenaxer> Is it worth the effort?
<tankf33der> eh. just for testing.
<tankf33der> for llvm testing :)
<Regenaxer> right :)
orivej has joined #picolisp
<tankf33der> failed in pil21
<tankf33der> http://ix.io/2sIk
<tankf33der> rest pilog's functions is ok
<tankf33der> FYI>
<tankf33der> FYI.
orivej has quit [Ping timeout: 256 seconds]
<tankf33der> found something in pil21 100x slower than pil64
<Regenaxer> Was out. Thanks tankf33der for the pilog bug! Will check
<Regenaxer> Wow, 100 times?
<tankf33der> sha3, very complex, reducing.
<Regenaxer> I see
<Regenaxer> Pilog is involved. Will look during the next days
<Regenaxer> pil21 returns @A=(0)
<Regenaxer> This slow-down must be a bug
<Regenaxer> some loop not terminating in time perhaps
<tankf33der> http://ix.io/2sIP
<tankf33der> Regenaxer: found this way.
<Regenaxer> Thanks! Can reproduce the different timing
<Regenaxer> It must be wrong caching
<Regenaxer> probably idx does not work correctly, right?
<Regenaxer> the rest is just normal stuff
<tankf33der> yea
<tankf33der> time difference is huge.
<tankf33der> afk.
<Regenaxer> yeah
<Regenaxer> *must* be 'idx'
<Regenaxer> We will quickly find
<Regenaxer> (not today :)
_whitelogger has joined #picolisp
orivej has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp