ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: | Check also for more information
jibanes has quit [Ping timeout: 252 seconds]
jibanes has joined #picolisp
orivej has joined #picolisp
andyjpb has quit [Ping timeout: 240 seconds]
andyjpb has joined #picolisp
andyjpb has quit [Ping timeout: 240 seconds]
freemint has quit [Ping timeout: 276 seconds]
_whitelogger has joined #picolisp
rob_w has joined #picolisp
<tankf33der> o/
<tankf33der> Regenaxer: hi
<tankf33der> tried on 32bit again.
<tankf33der> the same message right ?
<tankf33der> LLVM9 on 64bit works, on 32bit failed.
<Regenaxer> Hi tankf33der! Not sure if same as last time
<Regenaxer> address operator
<Regenaxer> line 9465 in picolisp.s
<Regenaxer> So we need the corresponding llvm statement
andyjpb has joined #picolisp
<Regenaxer> Not sure how to find
<Regenaxer> from picolisp.bc
<Regenaxer> Which function?
<Regenaxer> picolisp.s is asm source, human readable
<tankf33der> # cat |llvm-as -o main.bc -
<tankf33der> llvm-as: <stdin>:1:1: error: expected top-level entity
<tankf33der> source_filename = "base.l"
<tankf33der> ^
<tankf33der> this one for llvm 3.4.2
<Regenaxer> Can you extract the function and pastebin?
<Regenaxer> from picolisp.s
<Regenaxer> in SymTab
<Regenaxer> .quad (SymTab+8)&4294967295
<Regenaxer> yes, & on a number is strange
<Regenaxer> But why is a number there?
<Regenaxer> Here it is:
<Regenaxer> SymTab:
<Regenaxer> I.xwordISymTab+8
<Regenaxer> I.xwordISymTab+8
<Regenaxer> I.xwordISymTab+8
<Regenaxer> I.xwordI79992034 // 0x4c494e2
<Regenaxer> I.xwordI0 // 0x0
<Regenaxer> I.xwordISymTab+8
<Regenaxer> wrong pase, "I" must be TAB
<Regenaxer> but anyway ...
<Regenaxer> Let me think about it. Must have to do with the word size
<Regenaxer> Just 9457. .quad (SymTab+8) would be correct
<Regenaxer> but it has garbage
<Regenaxer> 9457. .quad (SymTab+8)&4294967295
<Regenaxer> where does &... come from?
<tankf33der> this what i see in SymTab by "pil lib/llvm.l main.l -bye >"
<Regenaxer> yes
<Regenaxer> ptrtoint
<Regenaxer> pointer to int
<Regenaxer> 64 bit int
<tankf33der> # cat |llvm-as -o main.bc -
<tankf33der> i64 ptrtoint (i8* getelementptr (i8, i8* bitcast ([70 x i64]* @SymTab to i8*), i32 8) to i64),
<tankf33der> llvm-as: <stdin>:32:38: error: expected value token
<tankf33der> ^
<tankf33der> error from llvm3.4.2
<Regenaxer> hmm, no idea
<Regenaxer> looks like llvm can't handle its own pointer casting ;)
<tankf33der> cant handle its own pointer casting between 64 vs. 32bits ?
<tankf33der> maybe llvm expecting setup sizeof pointer ?
<Regenaxer> 64 bit integers
<Regenaxer> it must know the sizes
<Regenaxer> a 32 bit pointer fits into 64 bits
<Regenaxer> Not applyable
<tankf33der> ok
<Regenaxer> In C no problem
andyjpb has quit [Ping timeout: 268 seconds]
<Regenaxer> I think it cant handle it as it is at compile time
<Regenaxer> not runtime
<Regenaxer> Might be a bug in llvm
<Regenaxer> SymTab is tricky
<Regenaxer> Entries point to each other
<Regenaxer> at compile/link time
<Regenaxer> So the first error is in llvm-as?
freemint has joined #picolisp
<Regenaxer> the other in picolisp.s just follows
rob_w has quit [Quit: Leaving]
<Regenaxer> i64 ptrtoint (i8* getelementptr (i8, i8* bitcast ([70 x i64]* @SymTab to i8*), i32 8) to i64),
<Regenaxer> it can't handle this, right?
<tankf33der> seems.
<Regenaxer> Should ask in #llvm perhaps
<tankf33der> get up netbsd8 i386
<tankf33der> lets see.
sarna has joined #picolisp
andyjpb has joined #picolisp
<Regenaxer> I think no difference
<tankf33der> :)
<Regenaxer> it is internal llvm logic
<Regenaxer> Let's give up 32 bit for now ;)
<Regenaxer> Too tedious it seems
<Regenaxer> It is the linker who resolves that
<Regenaxer> and obviously it cannot handle 32 bit pointers inside 64 bit numbers
<tankf33der> the same error on llvm8 32bit
<tankf33der> ok/
<Regenaxer> ok
<tankf33der> ok.
andyjpb has quit [Ping timeout: 240 seconds]
<sarna> ok!
andyjpb has joined #picolisp
<sarna> also hi y'all, I'm new here o/
<Regenaxer> Hi sarna!
<Regenaxer> Welcome :)
<beneroth> Welcome sarna
<sarna> what editor do you use for development? is still suitable?
<beneroth> it is suitable
<beneroth> I use emacs, mainly because of paredit (makes arranging parens/s-expressions very handy)
<beneroth> some use vim
<beneroth> some use Visual Studio Code
<beneroth> some use a simple text editor
<Regenaxer> I use vim (or vip to be exact), but you can do (em ..) instead of (vi ..)
<beneroth> I usually have code open in emacs, and a second terminal window (outside emacs) with a test/debug repl
<sarna> I have spacemacs installed, since I wanted to learn a lisp and emacs seems to have the best tooling around
<beneroth> in the picolisp dir in @lib/el/ is an emacs picolisp-mode
<beneroth> some other picolisp-mode are available from emacs package managers, I believe
<sarna> there's also this
<sarna> I'll try this one first, if I have any problems I'll switch
<Regenaxer> yeah
<beneroth> it's quite probable that this is currently the best package
<beneroth> probably I should try it out ^^'
<sarna> maybe it's a dumb question, but can I learn picolisp without a solid background in CL/scheme? I only dabbled in these, and the most lisp code I wrote was in clojure
<Regenaxer> I think it is even better without :)
<Regenaxer> CL and Scheme are quite different, so it might be rather confusing
<sarna> neato
<sarna> the "macros are a kludge" statement on picolisp's website surprised me the most, lol
<Regenaxer> :)
<beneroth> yeah that is our point of view :)
<beneroth> picolisp uses FEXPR instead of macros. FEXPRs came out of favour in "mainstream" lisps some decades ago, but some still use it
<beneroth> FEXRP are more powerful than macros - but FEXPR are hard, often impossible, to compile
andyjpb has quit [Ping timeout: 264 seconds]
<beneroth> so instead of attempting approximation to the impossible, Regenaxer made picolisp to be a small and fast interpreter.
<beneroth> KISS is our guiding principle
<sarna> so.. "if we can't compile it, let's just interpret it instead"? :'D
<Regenaxer> yep
<sarna> I love this
<Regenaxer> Lets try to make a fast interpreter :)
<tankf33der> im using micro editor, not recommended.
<beneroth> tankf33der, this one?
<beneroth> I used nano for a while for pil.
andyjpb has joined #picolisp
sarna has quit [Ping timeout: 268 seconds]
<tankf33der> beneroth: yea
sarna has joined #picolisp
<tankf33der> sarna: btw, supports picolisp, its minipicolisp version.
<sarna> neat, thanks
<sarna> hey, isn't that thing with ignoring arguments/getting NIL if they're omitted.. problematic?
<sarna> I wasn't a fan of that in JS
<Regenaxer> I believe it is extremely powerful and convenient
<Regenaxer> In which way do you think it is problematic?
<sarna> instead of failing fast, it propagates NILs further down the call stack
<sarna> it's difficult to find the troublemaker sometimes :)
<Regenaxer> PicoLisp is very dynamic, so much more things propagate down. Also, NIL will not fail anything in most cases, it is an often-used value
<sarna> hmm, I think I'll have to use it for a bit first and then decide if I like it or not
<sarna> by the way, does picolisp have keyword arguments or something similar?
<Regenaxer> Yes, I think you made a valid point
<Regenaxer> You can do that, iirc there is even a rosetta task
<sarna> okay, I'll try to find it
<Regenaxer> It is the task "Named parameters"
<Regenaxer> Basically uses 'bind'
<Regenaxer> But for practical programming it is a bit clomsy to use
<Regenaxer> i.e. passing pairs
<Regenaxer> You could also use varargs and memq
<Regenaxer> (foo 'a 1 'b 2)
<Regenaxer> in foo:
<Regenaxer> (let Args (rest) (cadr (memq 'b Args)))
<Regenaxer> all a bit clumsy ;)
<sarna> neat! I like that version the most
<sarna> why did you capitalize Args? I didn't catch that convention in the style guide
<Regenaxer> There is also a note in faq.html - it is necessary avoid name conflicts
<sarna> oh, "Locally bound symbols start with an upper case letter"
<Regenaxer> yes
<Regenaxer> in doc/faq.html "Are there no problems caused by dynamic binding?"
<Regenaxer> oops, no
<Regenaxer> not that one
<Regenaxer> It is simply because it is a Lisp-1
<Regenaxer> eg.
<Regenaxer> (let car ... (car List))
<Regenaxer> 'car' is a global symbol
<Regenaxer> binding it locally *may* give surprises
<sarna> yeah I can see how :)
<Regenaxer> In CL or Scheme it is not so much a problem, because they do static binding
<Regenaxer> so 'car' is only in the lexical context
<Regenaxer> Pil is dynamic, so 'car' is bound for *all* code running in this context
<Regenaxer> also nested functions
<Regenaxer> (let car MyVehicle (foo))
<Regenaxer> if some code in foo does (car List) it probably crashes
<Regenaxer> in foo and all code called by foo :)
<sarna> this language makes me both excited and anxious
<Regenaxer> exactly! :)
<Regenaxer> Exactly as it was for me with my first motorcycle at 18
<Regenaxer> Don't worry too early
<Regenaxer> Pil is very interactive
<Regenaxer> Don't write it in a static manner, relying on a compiler to find errors
<Regenaxer> You find them immediately if you test your code
<sarna> true
<sarna> do people write automated tests too?
<sarna> or just explore stuff manually
<Regenaxer> Yes, some do. tankf33der always does
<aw-> i write tests
<Regenaxer> yes, hi aw-!
<Regenaxer> Also there are unit tests in @lib/test.l
<aw-> hi Regenaxer
<Regenaxer> :)
<aw-> yes I have a unit test library here too:
<Regenaxer> cool
<sarna> are libraries just .l files that you load?
<Regenaxer> yes
<Regenaxer> or C shared objects
<sarna> nice
<Regenaxer> or a few shared object files in PilAsm
<sarna> tankf33der: so much code to read :^) thanks
<Regenaxer> tankf33der: I'm now starting with I/O
<tankf33der> sweet.
<Regenaxer> llvm is tedious, but I'm getting closer
sarna has quit [Remote host closed the connection]
<beneroth> hey aw- :)
* beneroth has nothing to say, just greeting
<beneroth> people these days have really a big tendency to just assume things instead of looking at implementation code
<beneroth> bad habits from all those too-many-turtles stacks
<beneroth> and all those stacks with proprietary code, or unreadable code in another language
<beneroth> "pil all the way down, and then a bit (well documented) asm" is a important transparency feature
<Nistur> Urgh, Hello all
<Regenaxer> Hi Nistur!
<Nistur> hulloo
<beneroth> Urgh, Hello Nistur !
<beneroth> what are you urghing about?
<Nistur> Stress with getting this game out the door :P
<beneroth> push it, push it :)
<beneroth> I have a similar problem here. unfortunately not with a game but a boring business application
<Nistur> and I keep looking at pil and going "I wonder what I can make with it"... I am getting REALLY fed up with 'blueprints' in UE4 :P
<beneroth> I keep re-arranging the C# code and going "fck that would be sooo much simpler and quicker to do with pil..."
<Nistur> :D
<beneroth> everyday I hate (dumb implementations of) static typing more
<beneroth> most time is spent fighting stupid type system, or intransparent magic
<beneroth> C# cannot even do switch on a typeof
<beneroth> (they plan to implement it on the next version)
<beneroth> do you work on a big game or a not so big one?
<beneroth> (big as in... size?)
<Nistur> Jumanji
<Nistur> for PS4, XBOne, Switch and PC
<Nistur> it's... big-ish
<Nistur> not the biggest game I've worked on by any stretch
<beneroth> I have a switch
<beneroth> mostly playing "The Darkest Dungeon" currently. and Links Awakening, for the nostalgia
<beneroth> I haven't seen the jumanji movie
<Nistur> It was actually not terrible
<Nistur> I was expecting it to be
<Nistur> the 1996 movie was great
<Nistur> but the 2017 movie actually was fun
<Nistur> anyway, this is based on the 2017 movie, and the one out later this year
<Nistur> I was considering trying to make a small switch game in my own time... but I don't really have any of that :D
<Nistur> although, I _am_ going to try my best to do some gamedev, and carve out at least a little time
<Nistur> I was thinking though, so I don't have to reinvent the wheel, to not use lisp as I was hoping to, as there are not really any paths to getting anything sensible on console (yet)... I will keep trying in work time... but before then, I will probably use something like Löve for my personal project, and of course at work use UE4 and Unity
<beneroth> yeah, sounds meaningful
<beneroth> pil on android (but only android for the time) might be a way
<beneroth> but yeah android... same problem as with PC, hardware is a mess and moving target :)
<beneroth> console is more reliable
<Nistur> primary target is Switch I think. I want to make a point and click adventure, and I think that's a reasonable target
<beneroth> T
<beneroth> good ecosystem for indie games afaik
<beneroth> do you know "Baba is you" on the switch?
<beneroth> pretty simple but nice puzzle game
<beneroth> (needs pilog/prolog thinking to solve)
<beneroth> for adventure you mainly need good story writing, I'd think
andyjpb has quit [Ping timeout: 240 seconds]
<tankf33der> Regenaxer: in general i understands io.l code from pil21
<Regenaxer> tankf33der, congrats! :)
<Regenaxer> Easier than pilAsm?
<tankf33der> yea
<Regenaxer> Looks like (Pico)Lisp, but it isn't ;)
<Regenaxer> only the syntax
Seteeri has joined #picolisp
<beneroth> so pil21 is not pilAsm?
Seteeri has quit [Ping timeout: 245 seconds]
orivej has quit [Ping timeout: 264 seconds]
freemint has quit [Ping timeout: 264 seconds]