xkapastel has quit [Quit: Connection closed for inactivity]
orivej has quit [Ping timeout: 245 seconds]
rob_w has joined #picolisp
orivej has joined #picolisp
tankf33der has quit [Ping timeout: 252 seconds]
tankf33der has joined #picolisp
ubLIX has joined #picolisp
<Nistur>
mornin'
rob_w has quit [Quit: Leaving]
ubLIX has quit [Quit: ubLIX]
<beneroth>
hi all :)
<Regenaxer>
Hi beneroth, Nistur
<Nistur>
o/
<clacke_movim>
Emerging from lurking simply to say thank you for mentioning midipix, as this is the first time I hear about it. Looks really interesting.
<clacke_movim>
I might pop into their channel just to get pointers on how they managed to make a not-horrible fork()
<clacke_movim>
beneroth: or are you saying that midipix's fork() is not not-horrible?
<beneroth>
afaik it is not really implemented, or not finished, or something like that (preventing picolisp to be fully usable on windows via midipix at least)
<beneroth>
the last info I have is that they are working on it. I'm not following their project, I just get to know this things when joebo mentions them here
<beneroth>
this is going on for longer now, so I guess they met hard issues or they progress got slowed for some other reason
<clacke_movim>
oh ok
<beneroth>
clacke_movim, you are the matrix user of us, right?
<beneroth>
any recommendation for a non-electron client ?
<clacke_movim>
I used to use Matrix
<beneroth>
I have seriously doubts about electrons security, they had grave security incidents in the past, and the shit is based on NPM which I categorize as inherently untrustable code repo/distribution system.
<clacke_movim>
As my username indicates I am now using Movim as my web client
<beneroth>
oh you quit matrix?
<clacke_movim>
I use Conversations on the phone
<clacke_movim>
My IRC bridge is biboumi
<beneroth>
so back to XMPP ?
<clacke_movim>
yep
<clacke_movim>
My phone is much happier with Conversations than with Riot.
<beneroth>
I preordered the librem mobile phone, which comes with matrix. I hoped matrix to become my new main messenger, but I don't like NPM-based clients..
<beneroth>
android?
<clacke_movim>
yes
<clacke_movim>
The reason I have a separate username is because Movim conflates social-network following and IM contacts. So I created a movim.eu account, and I use that on the web, and on my phone I use my good old lysator (uni computer club) account, which is plain `clacke` on IRC.
<clacke_movim>
they're also on two different biboumis for redundancy :-)
<clacke_movim>
Maybe at some point I
<clacke_movim>
Maybe at some point I'll just add the movim.eu account to my phone and ditch the IRC connections on my IM account.
<clacke_movim>
Then I'd just be plain clacke on both devices again.
<clacke_movim>
midipix people have been really active on the yakshaving front, creating sofort, slibtool and some Windows binary tools
<beneroth>
I didn't know about movim
<beneroth>
sounds good
<beneroth>
does the video call feature also support desktop sharing?
<beneroth>
(for business use)
xkapastel has joined #picolisp
<clacke_movim>
I haven't looked that deeply into it, I'm just happy to have a web XMPP client and an alternative social network model to the Fediverse
<clacke_movim>
Not that there's anything wrong with the Fediverse model, just fun to explore.
<beneroth>
ok. so I presume you also don't host a server yourself, aye?
<clacke_movim>
yeah, I don't
Viaken[m] has left #picolisp [#picolisp]
ubLIX has joined #picolisp
[rg] has joined #picolisp
<[rg]>
hello,
<[rg]>
im interestd in picolisp and the vm, but not sure if I have requiste knowledge to dive into this stuff, any readings you recommend?
<beneroth>
hi [rg], welcome :)
<beneroth>
how did you stumble into picolisp? :D
<[rg]>
the first time? through wikipedia from the lisp page
<beneroth>
interesting, sounds like a pretty straight travel.
<[rg]>
i've been searching and looking for an ideal language for the last few months
<beneroth>
for what purpose?
<beneroth>
more theoretical interest, or practical needs?
<[rg]>
to learn indepth, and to use when implementing my ideas
<[rg]>
i don't think I get much from my cs education
<beneroth>
yeah so did I come here (and some paul graham essays and urgings of friends to get into lisp)
* [rg]
looks up paul graham
<beneroth>
ok, so you are studying CS and you already know a few programming languages and even have some knowledge about internals and stuff, but maybe not so much practical training?
<[rg]>
oh that guy
<beneroth>
paul graham has nothing to do with picolisp, nothing at all.
<beneroth>
aye
<[rg]>
yeah
<beneroth>
make a startup. use lisp. that guy :D
<[rg]>
had a taste of theoretical stuff and how usefull it is this year
<beneroth>
has some good insights, some weak insights, some good advices, some advices which should maybe get you into making him money, and some pretty wrong notions.
<beneroth>
as usually :)
<[rg]>
so a language like lisp looks like ill be able to use some of those things
<[rg]>
where should I start
<[rg]>
career wise im more interested in computers than languages, the vm is one of the things that caught my eye
<beneroth>
my background: initially self-trained programmer followed by proper education (no CS class at university though), working on ERP and database stuff in small and bigger companies, all the time programming C/C++ on the side and wildly researching, and eventually accepting that developer time / productivity does matter and that C/C++ is pretty bad on that front. so I researched for lisps, getting put of from CL by the fact that it apparently has many platform
<beneroth>
-compatibility problems (had enough of that with C/C++), researched further and somehow ended in picolisp :)
<beneroth>
so since 2013-14 something I'm here. I have my own company doing software development consulting, custom business applications, freelancing, but working on the side on my own products, and since 2015 also having productive picolisp-based applications sold and operating.
<[rg]>
c and c++?
<beneroth>
aye
<[rg]>
or just c++ ;)
<beneroth>
C too
<beneroth>
C is arguably nicer, as it s a rather small language. C++ is a broad mess of features :D
<[rg]>
im trying to learn some ebedded stuff as well, was sad to learn its usually c++ namespaces with c
<[rg]>
the lies people tell lol
ubLIX has quit [Quit: ubLIX]
<[rg]>
now i don't know what to do with my microbit
<beneroth>
well C++ contains like all of C (a few exceptions), plus huge additions and additional concepts.
<beneroth>
so yes, especially embedded people usually program in C (or believe so), but in fact compile it with a C++ compiler :D
<[rg]>
im picky as you can tell
<[rg]>
i did here there was a picolisp machine
<[rg]>
hear*
<beneroth>
I can. that's why you came here. only picky people here. picky and stubborn and somewhat radical.
<[rg]>
yes, i also dream of making my own editor someday :)
<beneroth>
apparently he is still working on it a bit, but largely the project kinda fell asleep.
<[rg]>
interesting
<[rg]>
but i dont know enough to go further -.-
<beneroth>
Alexander Burger (the author of picolisp, Regenaxer here in the channel) made a verilog implementation (hardware chip design specification) for the picolisp Vm for that project, but as not much further came out of it, this is not really pushed much anymore
<beneroth>
which is picolisp running barebone directly on a PC without any operation system, on top of BIOS.
<beneroth>
it apparently runs in Qemu (foss hardware virtualizer/emulation) and on some laptops if you are very lucky with the BIOS. it uses the BIOS for screen IO, and it turns out while there are standards for the BIOS, most BIOSes these days don't implement most of it, as OSes usually do most stuff themselves instead of relaying on the BIOS.
<beneroth>
also it has no network stack (which would be a tremendous huge work to implement), so it is not much more than a pure picolisp repl running bare-bone :)
<beneroth>
picolisp has two main feats: 1) dense, succinct, very powerful and flexible language, and 2) pil database, a DBMS (or rather, a kind of framework to easily build your own DBMS), which is kinda a blend of relational-transactional, OOP and graph database architecture.
<beneroth>
.
<beneroth>
the main documentation / best source is the reference (also part of the distributed picolisp in the doc/ subfolder): https://software-lab.de/doc/index.html
<beneroth>
you probably have to read it multiple times, as it is quite densely written
<beneroth>
it covers the core language
<beneroth>
the rest of the documentation is a bit spread out, partially incomplete/missing, though one can always search in the mailing list archive or come here for questions :)
<beneroth>
.
<beneroth>
[rg], do you have a linux machine you can use? have you picolisp installed?
<beneroth>
we recommend to actually build a small, practical program, that is the best way to get into a language anyway.
<beneroth>
the version in the ubuntu packages is good enough for playing around, and also most other purposes. but it usually lags behind the "official" release, which is updated quite often (weekly or more)
<beneroth>
though most changes are either small or additions, as the core thing is pretty stable and well battle-tested.
<beneroth>
picolisp is more than 30 years old :)
<beneroth>
[rg], in which timezone are you based?
<beneroth>
we are spread out all over the world
<beneroth>
though the most active people here in IRC (including Regenaxer, the author) are usually active during European daytime
<[rg]>
im in est, toronto tome
<[rg]>
sorry a bit distracted
<beneroth>
no problem, no worries.
<beneroth>
sorry, I'm a bit talkative :)
<[rg]>
oh it wasn't you
<[rg]>
i was just doing 4 things at once
<[rg]>
yeah i do like maturity
<[rg]>
it's what caused me to dabble in things like erlang
<[rg]>
so you are on the project as well?
<[rg]>
whats up next for picolisp?
<beneroth>
there isn't really a big project
<beneroth>
Regenaxer is doing nearly all of the development of picolisp, or if people have ideas/needs/contributions they send it to him and he puts it in (when it passes the rather high quality standards)
<[rg]>
oh neat
<beneroth>
at the moment no big step is ahead, as far as I know.
<beneroth>
95% or so, when someone thought they found a bug or missing feature, it's just a programmer/user mistake, or can easily be done with existing things.
<beneroth>
than sometimes someone comes up with the need for a new feature, usually when doing some practical real applications with picolisp.
<[rg]>
ok, lets talk data structures
<beneroth>
and pretty rarely someone finds a real bug or inconsistency, usually in a context where picolisp was/is not used much so far so some edge cases are still possible
<beneroth>
ok
<beneroth>
go into your picolisp directory
<beneroth>
if you don't know where it is, start picolisp and enter: (path "@")
<beneroth>
@ in a filepath is a placeholder for the picolisp dir
<[rg]>
im there :)
<beneroth>
check out doc/structures
<[rg]>
from pil? or regular shell
<beneroth>
or better doc64/structures
<beneroth>
its a file
<beneroth>
text file
<beneroth>
so open it in normal shell
<beneroth>
or you can do in pil (call 'nano (path "@/doc64/structures"))
<[rg]>
gotcha
<[rg]>
so these primary data types are just cells of memory
<beneroth>
on the programming level, you usually don't have to think about the underlying cell structure of the VM
<beneroth>
aye
<[rg]>
ok, so pointers I assume, since the list is the only ds
<beneroth>
the fundamental data types in picolisp (and there are no other data types, everything else is built upon them) are: numbers (integer. as large as you want), lists, and symbols
<beneroth>
it's all pointers in the background, but from a programming perspective you usually don't work with pointers in picolisp
<[rg]>
interesting, so lets try to build a linked list, where do I start
<beneroth>
but yeah, a cell is basically two pointers (cadr and cdr), with each of them pointing either to another cell, or pointing to a value (e.g. integer value)
<beneroth>
pil: (list 1 2 3 4 5)
<beneroth>
or shorter, using the 'quote reader macro: '(1 bla blubb foo bar 3 4 5)
<beneroth>
or if the list consists only of numbers, you can leave the quote away, as it is automatically detected to be a list: (1 2 3 4 5)
<[rg]>
bla blubb foo bar are symbols?
<beneroth>
aye
<beneroth>
do you know rosettacode.org? pretty nice resource, collection of basic programming examples with implementations in various programming languages. nearly all have a picolisp example
<[rg]>
can I manipluate a cell in any way?
<[rg]>
yeah i'm familiar
<[rg]>
gotcha
<[rg]>
was under the impressions i was gonna get a lesson haha
<beneroth>
you mean cell as in the underlying lisp vm structure (arguable you manipulate them with every lisp action), or a cell as a single slot in a list ?
<beneroth>
well, everything is manipulating those cells, though best you view it as a pool of fine granulation/structuring of memory (RAM)
<beneroth>
the shortest instance of a list is the pair, in lisp also usually called a "cons pair"
<beneroth>
in picolisp, you can build such a pair with the (cons) function
<[rg]>
ah I see, so manipulating a linked list is superficial
<[rg]>
nice
<[rg]>
i think i will explore some graph problems in picolisp
<beneroth>
a list in picolisp is a (simple) linked list consisting of multiple cons pair, each storing the value (well the pointer to the value) in one of its cell addresses, and the second address points to the next cons pair or (when it is the last one of the list) to the global symbol NIL
<beneroth>
so in that sense, a pure cons pair like produced from (cons 1 2) is not a list (because a list always ends with NIL in the last cdr), but all lists are built up as cons pairs :)
<beneroth>
variables are symbols
<beneroth>
the symbol data type has 3 features: a name (by which it is referred to in the source code), a value, and a property list (key values)
<beneroth>
so a variable A with a cons pair as it value could be produced that way: (setq A (cons 1 2))
<beneroth>
or, using 'quote-macro: (setq A '(1 . 2))
<beneroth>
notice the dot . its the difference between a list (1 2 3) and a cons pair (1 2 . 3)
<[rg]>
nice and consise
<[rg]>
so what is that pair?
<[rg]>
a list and a number?
<beneroth>
(setq) is "set quoted", meaning it treats its first argument as quoted and does not evaluate it before working with it
<[rg]>
or rather a pair and a number
<beneroth>
a list can hold whatever you like, numbers, symbols, cons pairs, other lists
<[rg]>
yes, but in this case (1 2 . 3) is 1 2 a list or a pair?
<[rg]>
a pair right
<beneroth>
there is also (set) to set a symbols value, but as it evaluates its first argument too, you usually want to quote them: (set 'A 1)
<beneroth>
ah
<beneroth>
it's a list ending with a cons pair, so you end up with the cell structure [1|->] [2|3]
<[rg]>
ooo
<beneroth>
usually lists are expected to end with NIL, and cons pair are usually a tuple of just two values
<[rg]>
ok cool
<[rg]>
thanks beneroth i'm gonna be up reading all night :)
<beneroth>
important to notice that in picolisp the datatype is an attribute of the VALUE, not of a variable!
<beneroth>
ok
<beneroth>
:)
<beneroth>
you have to picture and understand the R-E-PL concept
<beneroth>
READ: turning the textual source code in a binary representation (which is mainly pointers pointing at each other)
<beneroth>
EVALUATE: execute something
<beneroth>
PRINT: send it to stdout/write it to the terminal
<beneroth>
LOOP: repeat the whole thing
<beneroth>
at every step, different thing happens
<[rg]>
whats the state of picolisp terminal stuff?
<[rg]>
i'd like to try making a game
<beneroth>
well, most time the terminal is waiting for you to make an input it can read
<[rg]>
well Im talking like curses stuff
<beneroth>
ah ok
<beneroth>
well picolisp terminal itself is just stdin/stoud, no curses
<beneroth>
you can work with curses
* [rg]
ponders
<beneroth>
there is picolisp editor called VIP, basically vi implemented in picolisp with some picolisp-specific features and others left out
<beneroth>
that one uses curses, I think (you can ask Regenaxer tomorrow)
<[rg]>
nice that he's online
<beneroth>
as curses being a C library, you can easily use it in picolisp (in pil64 bit, so I just assume you are on a 64 bit machine, right?) with the (native) function
<beneroth>
he is online now, but marked as away, probably sleeping
<beneroth>
he lives in Germany
<[rg]>
i was just saying in general
<[rg]>
and im gonna go explore some picolisp (+ math) now
<beneroth>
ok
<[rg]>
hopefully I have something to showcase next time :)
<beneroth>
for math, keep in mind picolisp has no floating pointers
<[rg]>
thanks for the talk!
<beneroth>
but you can do precise fixpoint calculations
<[rg]>
huh, ok never heard of fixpoint tbh, but ill figure it out