<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>
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