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
<stacksmith> A question re native 64-bit linux. Is it possible to mmap specific memory in low (32-bit) address space? I need to map a lot of it - say from 0x20000000 to 0xFFFFFFFF. Thank you. Due to time differences, I will look for an answer in channel logs...
_whitelogger has joined #picolisp
<aw-> stacksmith: hi
<aw-> assuming the kernel doesn't prevent you from accessing that address space..
<aw-> if you can write C/ASM to mmap that address space, then yes you can from picolisp with native
<aw-> unless picolisp has a builtin mechanism to prevent that, but I am highly doubtful
<stacksmith> I suppose the real question is: does picolisp reserve low memory?
<aw-> hmm I wouldn't know, probably best to wait for Regenaxer to wake up ;)
<stacksmith> That is the plan. Thanks aw:
[rg] has joined #picolisp
orivej has quit [Ping timeout: 276 seconds]
groovy2shoes has joined #picolisp
groovy2shoes has quit [Excess Flood]
groovy2shoes has joined #picolisp
<clacke_movim> beneroth: Didn't know you're as recent as 2013 on picolisp
<clacke_movim> Had the impression you've been here at least a decade :-)
<[rg]> reading the picolisp ref, what is the significance of the nil structure?
<[rg]> NIL: / -> |'lin'| / | / | / |
<Regenaxer> Good morning!
<Regenaxer> Nice discussions! Thanks beneroth and aw- for the extensive explanations!
<Regenaxer> Concerning memory, PicoLisp under unix uses basically malloc(), so it depends on the system what memory addresses it gets
<Regenaxer> In PilOS it does all by itself, so it starts from low memory with the heap and high memory for the stack
<[rg]> good morning
<Regenaxer> Hi [rg]!
<stacksmith> Thanks Regenaxer. That's what I thought. Is it reasonable to use the assembler that bootstraps picolisp for other things?
<Regenaxer> I think PilMCU and PilOS does this
<Regenaxer> But both are not really practically usable at this stage
<Regenaxer> stacksmith, what is your intention?
<stacksmith> I've been experimenting with an unusual memory allocation scheme. I was wondering if I can get picolisp to work with it - assembly is getting a bit tiresome.
<Regenaxer> [rg], the NIL structure: NIL is a little special. Technically it is a symbol, but behaves as a list sometimes
<Regenaxer> an empty list
<[rg]> is 'lin' just another symbol?
<Regenaxer> no, this is meant to denote the name 'N', 'I' and 'L'
<Regenaxer> backwards as the chars in a symbol name are stored this way
<Regenaxer> Technically the name of a symbol is a number
<Regenaxer> But thats an implementation detail, better ignore for now
<stacksmith> Thanks Regenaxer, I have to run.
<Regenaxer> ok, cu :)
<[rg]> ohh ok
<Regenaxer> [rg], what the diagram in doc64/structures says is that NIL occupies 2 cells
<Regenaxer> 2 adjacent cells
<Regenaxer> so it is a symbol, but you can take the CDR of it
<Regenaxer> which is allowed otherwise only for list cells
<[rg]> so how does the type system work in picolisp? there are only really three data types right? or just two, the symbol, and number
<[rg]> how does that extend into other types?
stacksmith has quit [Ping timeout: 276 seconds]
<Regenaxer> There are only 3: numbers, symbols and lists
<Regenaxer> The type is identifies by the 4 tag bits in the pointer
<Regenaxer> Line 7 ff. in doc64/structures
<Regenaxer> Higher level stuff is implemented using these 3 types
<Regenaxer> either in list structures or in symbols
<[rg]> how would I get to that line from the html doc?
<Regenaxer> Symbols are very powerful, they are used to implement objects
<Regenaxer> Which html doc?
<[rg]> and that does make sense
<Regenaxer> I meant the file doc64/structures in the distro
<Regenaxer> ah, yes
<[rg]> oh ok
<Regenaxer> doc/ref.html also has extracts of these structures
<Regenaxer> but doc64/structures is the ultimate description :)
<Regenaxer> I think doc/ref.html also shows the tag bits though
<[rg]> alright, i saw polymorphism so I got a bit curious
<Regenaxer> this is on a higher level
<[rg]> but I guess you keep track of symbols but how are type derived?
<[rg]> not 'I guess' but anyways lol
<Regenaxer> The reader kind of guesses
<Regenaxer> if it is atomic but not a legal number, it is a symbol
<Regenaxer> All input (from REPL or file or pipe or whatever) is done via 'read'
<Regenaxer> 'read' immediatel converts everything to these internal cell structures
<[rg]> does picolisp need a grammar? not really eh
<[rg]> do you have one tho?
<Regenaxer> Lisp in general has almost no grammar or syntax
<[rg]> thats actually pretty cool
<Regenaxer> It is all dynamic, I think the important point are the evaluation rules
<Regenaxer> doc/ref.html#ev
<Regenaxer> So "A list is evaluated as a function call" is kind of the "grammar" ;)
<Regenaxer> The function is always in the CAR of a that list, and what it finally does depends all on that function
<[rg]> interesting, i want to write some picolisp code but not sure what yet
<Regenaxer> As beneroth said, a good starting point is rosetta code
<Regenaxer> gives ideas perhaps
<[rg]> whats your coding setup like?
<Regenaxer> What I myself currently find most interesting is PilBox, ie. PicoLisp on Android devices
<Regenaxer> Gives a lot of opportunities
<[rg]> and yeah perhaps, i was gonna do polynomial stuff but i need to finish reading the chapter first
<Regenaxer> All my current commercial apps use PilBox
<[rg]> so just the picolisp vm on android or more steps?
<Regenaxer> yes
<[rg]> wait, is it with the jvm?
<[rg]> or lower
<Regenaxer> No, it runs an arm64 binary in a Java Android app
<[rg]> cool
<Regenaxer> But allows access to the full Java toolbox
<[rg]> how was that part of the project?
<[rg]> i assume you've done your fair share of java programming?
<Regenaxer> Which project do you mean?
<[rg]> PilBox
<Regenaxer> ah, yes, a little Java, but not very much
<Regenaxer> All sources: https://software-lab.de/PilBox.tgz
<Regenaxer> You can check first https://software-lab.de/PilBox/README
<Regenaxer> PilBox is the simplest way to get some picolisp running
<Regenaxer> just install from Google Play
<Regenaxer> It has a REPL, which is a bit tedious to use, but can do anything
<[rg]> awesome :)
<Regenaxer> The REPL in PilBox also allows access to the shell
<[rg]> ill give it a look much later tho, my focus is currently not on mobile <I hear it's a bit tedius>
<Regenaxer> Needs all to be documented more :(
<Regenaxer> yes, a bit hard to use on a mobile if you dont have a proper keyboard
<[rg]> i have a bluetooth keyboard so im covered there
<Regenaxer> (I'm doing it though, I develop exclusively on an Android tablet, I don't even have a notebook any more)
<Regenaxer> ah, ok
<[rg]> yeah, i still havent built my mechanical one I bought last summer so I had to grab that one xD
<[rg]> i'm not there yet, but lets say I have a structure like a graph, would something like a general iterator work but being able to switching between iterating modes like BFS AND DFS?
<[rg]> if that doest make sense I can try to tidy it up
<Regenaxer> What is BFS and DFS?
<Regenaxer> ah
<Regenaxer> breadth/depth first
<[rg]> yeah
<Regenaxer> both are possible of course
<[rg]> like you know how its popular for languages now to have opaque iterators, what would that look like <I might be overthinking this>
<[rg]> just itr object and related functions for each method of iteration right
<Regenaxer> PicoLisp is probably the opposite of "opaque" :)
<[rg]> ok fair enough
<Regenaxer> Iterator functions like 'mapcan' are a little hiding the internals, but not much
<[rg]> maybe what I'm trying to ask is what does extending the language look like?
<Regenaxer> You can control everything on all levels
<Regenaxer> Extending is what Lisp is all about
<Regenaxer> The core system has only a relatively small set of built-ins
<Regenaxer> Most is loaded at startup
<Regenaxer> It is the 'pil' script as you know
<[rg]> so I could define a function in C and incorporate it seemlessly as an operator/builtin
<[rg]> ok
<Regenaxer> bin/picolisp is the lowest binary only
<[rg]> i'm starting to get the idea
<Regenaxer> Functions written in C can be called directly
<Regenaxer> via 'native'
<Regenaxer> Pil64 itself is written in a generic assembler
<Regenaxer> aka bootstrapping, as the assembler is written in PicoLisp
<[rg]> thanks for the explanations Regenaxer
<Regenaxer> Welcome :)
<[rg]> i'm so impatient, I want to be a picolisp master now! haha
<[rg]> goodnight
<Regenaxer> :)
[rg] has quit [Quit: Leaving]
<Regenaxer> afp
<tankf33der> morning
<tankf33der> btw, i use mmap via native.
<beneroth> Good morning
<beneroth> mmap, nice!
<Regenaxer> ret
<Regenaxer> must go again soon though
<Regenaxer> Yeah, mmap allows interesting things
<Regenaxer> I experimented with it a few years ago, but then never really used it
<Regenaxer> Good morning tankf33der btw :)
<Regenaxer> I have trouble with my tablet. The battery does not load well
<Regenaxer> I must find a new one quickly, before I cannot use it at all any more
<Regenaxer> I'm now on my wife's tablet while I try to charge mine. Have a meeting in two hours and need it
<Regenaxer> I'm considering to buy a phablet instead of a real tablet
<Regenaxer> Galaxy A70
<Regenaxer> Any comments?
<beneroth> no comments
<Regenaxer> The reason is that there are no really usable tablets on the market any more
<Regenaxer> All with too small RAM
<beneroth> I'm happy with a Huawei Media 3 Tablet (well phablet, it has a SIM module)
<beneroth> ah good point
<beneroth> I don't know my tablets RAM
<beneroth> I have to go
<beneroth> good luck to you!
<Regenaxer> They all seem max 4 G
<Regenaxer> thanks!
<Regenaxer> 4 GiB I mean
<Regenaxer> Strange, but most phones are bigger now
<Regenaxer> So I consider changing my working style again and switch from 9 inch to 7 ;)
<Regenaxer> sigh
<Regenaxer> Smaller has also advantages
<Regenaxer> transportability
<Regenaxer> afp
<Nistur> mornin'
orivej has joined #picolisp
libertas_ is now known as libertas
ubLIX has joined #picolisp
ubLIX has quit [Quit: ubLIX]
<tankf33der> pil passed tests on latest openbsd 6.5
<Regenaxer> Thanks tankf33der!
[rg] has joined #picolisp
<[rg]> tankf33der, wow you did all of advent
<tankf33der> no, ~85% and stuck somewhere
<tankf33der> evolution of picolisp programmmer:
<[rg]> tankf33der, can you see the blame in bitbucket?
<tankf33der> unknown.
_whitelogger has joined #picolisp
DKordic has joined #picolisp
ubLIX has joined #picolisp
ubLX has joined #picolisp
ubLIX has quit [Ping timeout: 245 seconds]
ubLIX has joined #picolisp
f8l has quit [Quit: Move in progress…]
ubLX has quit [Ping timeout: 258 seconds]
ubLIX has quit [Quit: ubLIX]
mtsd has joined #picolisp
<[rg]> any emacs users?
mtsd has quit [Quit: leaving]
<DKordic> [rg]: Welcome. Yes.
ubLIX has joined #picolisp
ubLX has joined #picolisp
ubLIX has quit [Ping timeout: 246 seconds]
ubLX has quit [Ping timeout: 246 seconds]
<[rg]> DKordic, does the default picolisp mode have to updated, it was looking in a weird place for the intpreter
stacksmith has joined #picolisp
<[rg]> i got a sefault, is that normal?
<[rg]> segfault*
<beneroth> normal beginner mistake, yeah, no worries
<beneroth> you probably tried to execute a function by mistake, doing a (SomeSymbol) while the symbol pointed to nil ? :)
<beneroth> gn8
<beneroth> (doesn't happen once you're not a beginner anymore)
<[rg]> fair enough, and yeah that looks like it
<[rg]> c ya
<DKordic> [pg]: I don't use any picolisp-mode. I prefer M-x ""term"" ""/path/to/pil"" in ""term-line-mode"".
<DKordic> I try to use as little GNU Emacs as possible until I switch to something reasonable.
<[rg]> what do you mean switch?
<[rg]> also, why not just use the terminal :P
<DKordic> Use another editor instead of GNU Emacs. A more reasonable integration of Text Editor and Terminal Emulator.
<[rg]> i've been trying jed recently
<[rg]> still havent found the right one yet
<DKordic> I recomend something straightforward and minimal. Have You tryed to write Your own?
<[rg]> nope, that's a far ways off
<DKordic> BTW [[https://sites.google.com/site/e3editor/][e3]] binary has about 10 KiB.