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
chuckJ has joined #picolisp
orivej_ has joined #picolisp
orivej has quit [Ping timeout: 276 seconds]
aw- has joined #picolisp
franco has joined #picolisp
orivej_ has quit [Ping timeout: 248 seconds]
orivej has joined #picolisp
<aw-> hmmm.. seems Alex's https gateway is down
franco has quit [Ping timeout: 260 seconds]
<yumaikas> So I'm trying out Termux for the first time on Andriod
<yumaikas> Liking it so far.
Regenaxer has joined #picolisp
<aw-> cool
<aw-> hi Regenaxer
<Regenaxer> Hi aw-
<aw-> Regenaxer: question about miniPicolisp and gen3m
<aw-> does gen3m need to be compiled for the target architecture?
<aw-> I read this line ten times already "This is necessary because gen3m must be aware of the architecture (cell sizes differ on 32 or 64 bit machines)."
<aw-> but still not clear
<Regenaxer> architecture here means 32 or 64 bit
<Regenaxer> not the cpu
<aw-> ohh
<Regenaxer> Where is that written?
<aw-> so compiling it on 32-bit will not be able to compile miniPil for 64-bit ?
<Regenaxer> Ah, this talks about the tool
<aw-> i'm thinking it's these lines from gen3m.c:
<aw-> typedef unsigned long word;
<aw-> typedef unsigned char byte;
<Regenaxer> So perhaps cross-compilation is difficult
<aw-> ahhh yes, that's what i'm trying to figure out
<Regenaxer> all sizes I think
<Regenaxer> it builds cells
<Regenaxer> Not sure how to do it in cross-compilation
<Regenaxer> I would use qemu
<aw-> but there's no way the Mizar used qemu.. it's what i'm trying to figure out
<aw-> ohhh they used scons! ugh
<Regenaxer> What is scons?
<Regenaxer> I meant not qemu on the target, but on the build system
<Regenaxer> just compile gen3m in qemu
<Regenaxer> then *use* it in the build
<aw-> yeah i tried a few ways of doing that and couldn't
<Regenaxer> (if build is done on a arm64, with qemu arm32)
<Regenaxer> hmm
<Regenaxer> gen3
<Regenaxer> m
<Regenaxer> is stand-alone
<Regenaxer> Perhaps better to make gen3m aware of that?
<aw-> can i build this without gen3m ?
<Regenaxer> you need the *.d files
<aw-> right.. sym.d etc
<Regenaxer> don't rememrer exactly, but aren't they
<Regenaxer> CPU independent?
<Regenaxer> Just pointers and offsets?
<aw-> oh... wait i'll try
<Regenaxer> It looks like a common cross-compilation issu, building a tool for the toolchain
<Regenaxer> If you find a way, can you add a not to the wiki article?
<aw-> this Makefile is a bit confusing
<aw-> what's the default target?
<aw-> i don't understand how it knows what to compile with just "make"
<Regenaxer> It is always the first target, here picolisp: $(bin)/picolisp
<aw-> oh ok!
<aw-> ok i get it now ;)
<Regenaxer> ok
<Regenaxer> I'm reading the article now. Didn't remember that I even wrote it ;)
<aw-> haha
<aw-> ok i'm getting integer overflow when i try to cross compile
<aw-> perhaps because:
<aw-> fprintf(fp, "\n#define ROMS %d\n", RomIx);
<aw-> fprintf(fp, "#define RAMS %d\n", RamIx);
<aw-> it's the only thing in sym.d which might be architecture specific
<Regenaxer> Do you use -m32 or so to build 'gen3m'?
<aw-> yes that's what i'm trying
<Regenaxer> ok
<aw-> oh
<aw-> haha
<aw-> ok so... -m32 is not for ARM
* aw- facepalm
<aw-> doens't work
<aw-> i need a different way to cross-compile with gen3m
<aw-> or without gen3m
<Regenaxer> Without is not possible I think
<aw-> how can I manually specify the cell sizes?
<Regenaxer> hmm, first step would be to replace sizeof(char*)
<Regenaxer> But I don't know if this is enough
<Regenaxer> There may be many more assumptions about the sizes
<Regenaxer> Why is it not possible to build gen3m for the toolchain?
<Regenaxer> hmm, there is 'Bits'
<Regenaxer> introduced 13sep16abu
<aw-> hmmm
<aw-> i think qemu is probably necessary
<aw-> although would be nice if i could cross-compile :\
<Regenaxer> yep
<Regenaxer> I can't believe that it is not possible to compile executables for the toolchain
<Regenaxer> in 32bit
<Regenaxer> How did the Mizar people do it?
<aw-> not because i can't run it
<aw-> i can compile 32 but it won't run
<aw-> the problem is gen32m
<aw-> I found a paper published by Raman Gopalan on picoLisp for embedded
<aw-> and this: Currently, a Python based build system called SCons [8] is being used to compile the code base.
<Regenaxer> looks like something in that direction
<aw-> hmmm... it says gen3m is optional?
<Regenaxer> Perhaps if you built *.d already
<Regenaxer> But you will need to re-build them frequently
<aw-> well.. for anything that's written in .s right?
<Regenaxer> yes
<Regenaxer> The idea is to put also application-specific stuff there
<Regenaxer> to use less RAM
<aw-> yeah
<aw-> i need a coffee
<Regenaxer> :)
<aw-> ok Regenaxer, in ram.d: "(any)0x1338649, (any)(Rom+1)," <— 0x1338649 is a memory address?
<Regenaxer> Rather an offset I suppose
<Regenaxer> no
<Regenaxer> a constant value
<Regenaxer> well
<Regenaxer> it is a function pointer here, boxed as a number
<Regenaxer> <<2 | 1
<Regenaxer> I don't remember well
<Regenaxer> Function addresses are not known at this point, right?
<aw-> i don't know.. i'm still trying to wrap my head around the code
<Regenaxer> (any)0x29951a59, (any)(num(doQuote) + 2),
<Regenaxer> this is a pointer into code, in boxed form
<Regenaxer> haha, no!
<Regenaxer> it is the name
<Regenaxer> no problem
<Regenaxer> as I said, a constant, no pointer
<aw-> oh ok
<aw-> just a constant
<Regenaxer> sym.d and rom.d go in sync
<Regenaxer> 0x27c9a7 is "NIL"
<Regenaxer> in ASCII-6/7
<Regenaxer> the encoding of miniPil names
<Regenaxer> So in "(any)0x29951a59, (any)(num(doQuote) + 2)" 0x29951a59 is the name
<aw-> oh
<Regenaxer> and doQuote+2 is the function pointer
<Regenaxer> ie. the value of that symbol
<aw-> how do you know 0x27c9a7 is NIL ?
<aw-> i'm looking at init.s
<Regenaxer> cause sym.d and rom.d go in parallel
<Regenaxer> or, in this case, beginning of main()
<Regenaxer> NIL is created first
<Regenaxer> then T and then quote
<aw-> since before i was looking at sym.d and ram.d oops
<aw-> oh this is wonderful
miskatonic has joined #picolisp
<aw-> ok ok, it's all starting to make sense now
<aw-> ok next question: can you explain "static byte Ascii6[]" from gen3m.c ?
<aw-> the byte array
<aw-> where do the numbers come from
<miskatonic> isn't pil written nowadays in assembly, not C?
<Regenaxer> miskatonic, yes, but this is miniPicoLisp
<Regenaxer> aw-, mini uses a tricky encoding
<Regenaxer> ASCII packed in 6 or 7 bits
<Regenaxer> see mini/doc/structures
<Regenaxer> ASCII-6/7 -> 96 characters: ...
<Regenaxer> Common characters take only 6 bits
<aw-> ahhhh
<aw-> OK! i get it
<aw-> very interesting..
<aw-> it's actually pretty brilliant
<miskatonic> Is that like the common compression algorithms, where frequent patterns are encoded as shorter sequences than rare patterns?
<Regenaxer> yes, but much simpler
<Regenaxer> quite trivial, just pack the bits
<Regenaxer> ie. the frequency is not detected dynamically, but the encoding is fixed
<beneroth> exciting discussion :)
<beneroth> bbl
beneroth is now known as bene|off
<cess11> yes, very interesting
<m_mans> btw, VSCode editor seems very nice choice for PicoLisp
<cess11> Isn't it quite bloated? 1 GB RAM+?
<cess11> Maybe I'm confusing it with something else.
<cess11> No, it was it and Atom I had in mind. Perhaps they're better now, haven't used Windows in a year or two.
<m_mans> I'm on Linux
<m_mans> Hm, I see that VSCode uses several processes, might be quite expensive
<m_mans> not 'pico' solution of course
abel-normand has joined #picolisp
abel-normand has left #picolisp [#picolisp]
<clacke[m]> They're both Electron-based, so they'll eat a gig of your RAM before you even start typing. GigaLisp.
<m_mans> yeah, seems so
fraya has joined #picolisp
<cess11> I went full vim when I left Windows for Manjaro, whenever it was.
<cess11> Notepad++ was pretty good in my opinion.
<cess11> Not sure how well it does with code styling outside JS and some MS languages though.
orivej has quit [Ping timeout: 248 seconds]
<aw-> ahahah VSCode
<aw-> GigaLisp indeed
<aw-> m_mans: what Linux are you on?
<m_mans> Mint 18.1 Mate
<aw-> oh perfect
<aw-> use Pluma!
<m_mans> ok, I'll see :)
<aw-> i think it comes by default with mate
<aw-> That's what I use on Linux: lightweight, not bloated with features, still has syntax highlighting and line numbers
<aw-> or you know.. SublimeText is nice too.. but for me there's no arm64 build :( .. also closed source :(
<clacke[m]> A gedit with syntax highlighting? Interesting. (pluma)
<clacke[m]> And it's ported to GTK+3. I thought MATE porting to GTK+3 was stalled forever. At least for this app I'm apparently wrong.
<C-Keen> gedit does have syntax highlighting already?
<clacke[m]> Oh, I just wasn't aware then.
<clacke[m]> I have only used it like I would use Notepad on Another OS.
<clacke[m]> Ah, I'm hilariously wrong about gtk+3
<clacke[m]> "is now GTK3 only"
<aw-> clacke[m]: yeah!
<aw-> my perception of gEdit has always been "bleh"
<C-Keen> with plugins it is pretty nice, without it it is pretty bland. same can be said for emacs and vi :)
<aw-> haha
<cess11> The basic command engine in vim is pretty powerful on its own.
<cess11> And emacs understands a lisp.
<C-Keen> and gedit understands python for plugins, so that' on par :)
<cess11> Sounds cumbersome to use plugins.
<miskatonic> emacs lisp is completely different from picolisp
alexshendi has quit [Read error: Connection reset by peer]
<aw-> Regenaxer: how is the "number of cells" defined in miniPicoLisp?
<cess11> miskatonic: How much is completely?
<aw-> i'm looking for the code that differentiates 32/64-bit
<aw-> brb
<miskatonic> cess1: complete enough to write easily pil-secpressions which are invalid in emacs, and vice versa
aw- has quit [Quit: Leaving.]
alexshendi has joined #picolisp
<miskatonic> thirty-years-of picolisp is rapidly approaching. we need a picolisp script for a pil processor embedded into the controller of a digital stove, able to bake an anniversary cake
<cess11> Right, so just about everything is completely different, including different versions of pil.
aw- has joined #picolisp
<anjaa> cess11: accidentally hit myself in the mouth with a moving box, but at least i didn't split my lip
<Regenaxer> aw-, it is as I wrote above: hmm, there is 'Bits'
<Regenaxer> it is the solution
<Regenaxer> if ((Bits = atoi(*++av)) == 0)
<Regenaxer> Bits = (int)sizeof(char*) * 8;
<Regenaxer> So no worry with qemu
<aw-> oh ok, so it is in gen3m
<Regenaxer> Sorry, forgot about this, and then was out untie no
<Regenaxer> w
<Regenaxer> right
<Regenaxer> pass 64 or 32 as first arg
<aw-> no problem
<aw-> Makefile specifies 0
<aw-> passes 0
<Regenaxer> yep, default
<aw-> hmmm i see
<Regenaxer> s/default/auto
<aw-> OK this is perfect!
<aw-> thank you!!
<Regenaxer> :)
<cess11> anjaa: Ow.
fraya has quit [Quit: Leaving]
rob_w has joined #picolisp
alexshendi has quit [Ping timeout: 248 seconds]
alexshendi has joined #picolisp
orivej has joined #picolisp
franco has joined #picolisp
alexshendi has quit [Ping timeout: 248 seconds]
<tankfeeder> Regenaxer: cant open https://software-lab.de/doc/ChangeLog now
<tankfeeder> rebooting? :)
<cess11> Works for me.
<Regenaxer> oops
<Regenaxer> strange!
<Regenaxer> Seems to be down! Thanks for the hint!
<Regenaxer> It is hosted by Strato.de
DerGuteMoritz has quit [Read error: Connection reset by peer]
<Regenaxer> What might be wrong? It is running without flaw since 2004
alexshendi has joined #picolisp
<Regenaxer> Now it works again!
<Regenaxer> Seems they had some problems
<miskatonic> what does strato have to do with picolisp?
<Regenaxer> I rented web space and email there
<miskatonic> would be cool if there routers, load balancers, firewalls etc. were powered by pil
<Regenaxer> yep
DerGuteMoritz has joined #picolisp
alexshendi has quit [Ping timeout: 248 seconds]
rgrau has joined #picolisp
aw- has quit [Quit: Leaving.]
orivej has quit [Remote host closed the connection]
franco has quit [Ping timeout: 260 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
nihirash has joined #picolisp
DerGuteMoritz has quit [Ping timeout: 240 seconds]
bene|off is now known as beneroth
<beneroth> hi all
alexshendi has joined #picolisp
<beneroth> cess11, clacke[m], m_mans I used to do picolisp with editor nano (with syntax highlighting)
<beneroth> also, you might not really want to use an electron-based editor..
<beneroth> remote code execution in atom
<beneroth> age-old security mistake of trying to block bad stuff with an (ever) incomplete blacklist
DerGuteMoritz has joined #picolisp
<miskatonic> I use emacs, but not because an editor extensible with one kind of lisp would be a natural choice for editing any other kind of lisp
<beneroth> well I use emacs because of paredit, an editor feature which doesn't make much sense for non-lisp-languages
orivej has quit [Ping timeout: 240 seconds]
nihirash has quit [Remote host closed the connection]
miskatonic has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
alexshendi has quit [Ping timeout: 250 seconds]
<viaken> paredit is nice
orivej has joined #picolisp
alexshendi has joined #picolisp
alexshendi has quit [Ping timeout: 268 seconds]
rob_w has quit [Quit: Leaving]