beneroth changed the topic of #picolisp to: PicoLisp language | The scalpel of software development | Channel Log: https://libera.irclog.whitequark.org/picolisp | Check www.picolisp.com for more information
peterhil has quit [Ping timeout: 252 seconds]
peterhil has joined #picolisp
peterhil has quit [Ping timeout: 252 seconds]
peterhil has joined #picolisp
peterhil has quit [Ping timeout: 252 seconds]
razzy has quit [Ping timeout: 244 seconds]
hunar has joined #picolisp
razzy has joined #picolisp
razzy has quit [Ping timeout: 250 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 250 seconds]
<aw-> Regenaxer: here?
razzy has joined #picolisp
razzy has quit [Ping timeout: 250 seconds]
<beneroth> hi aw- !
<beneroth> :)
<beneroth> nice keyboard
<aw-> hi beneroth
<aw-> i'm reading data using (in) from STDIN, and i can't figure out how to 'stop' reading once it finds what it wants
<aw-> i did the usual (from "something" (till "^J" T)).
<aw-> (from "something") (till ...)
<aw-> but it'll still continue reading STDIN until there's no more to read
<beneroth> so (till) misbehaving and you get a longer string returned than expected?
<beneroth> or it hangs forever?
<aw-> no
<aw-> i get the string i want but only if I manually kill the process that's creating the input in STDIN
<aw-> only _after_ i stop the process
<beneroth> possibly the sneder process is not flushing?
<beneroth> *sender
<beneroth> so nothing (or not the till value) arrives at your process until sender gets killed and its buffer flushed?
<beneroth> maybe you can test by doing (until) and (char) instead of (till) to debug, if the situation allows it
<beneroth> or you can put unix command 'tee' between sender and receiver, and additionally log what gets piped
<Regenaxer> Hi aw-, beneroth!
<beneroth> hi Regenaxer !
<Regenaxer> So 'till' never returns?
<Regenaxer> and "something" is a pipe?
<Regenaxer> oops, ne
<Regenaxer> no
<Regenaxer> (in X where X is a pipe?
<beneroth> as I understand: something is a pipe, and till doesn't return until sender process gets killed, then everything works as expected.
<Regenaxer> but (from "something"), not (in "something" ...
<beneroth> oh, I misread from as in haha
<Regenaxer> Hmm, and (from "something" (till "^J" T)) is wrong nesting
<Regenaxer> yeah, me too initially
<beneroth> T
<Regenaxer> so just s/from/in ?
<Regenaxer> maybe aw- made the same mistake as we ;)
<beneroth> I'd think. Then it sounds like a sender buffer issue, not a till issue.
<Regenaxer> T
<aw-> hi Regenaxer
<aw-> yes i mistyped
<aw-> ok i checked the program and indeed it's a sender issue
<beneroth> :)
<aw-> just wrote a small picolisp tool to read data from an NFC reader
<aw-> the nfc reading tool was blocking so i just recompiled it without blocking
<Regenaxer> Sounds fine
<aw-> would be better to use the shared lib but there was already a tool that does exactly what i want.. so i'm calling it with (in '(nfctool)...)
<aw-> less work ;)
<Regenaxer> Depends on how complicated the native call gets
<Regenaxer> With pil21 it got somewhat easier with e.g. (buffer ..)
<beneroth> aw-, nice
peterhil has joined #picolisp
<hunar> Hi :) How can I print to stdout when inside an (out "file"
<hunar> I'm trying to debug a program that hangs
<Regenaxer> (out NIL ...)
<Regenaxer> For debug better (msg X " String")
<Regenaxer> or just (msg X)
<Regenaxer> Or you can trace or single-step
<hunar> (out NIL ...) So I cant print to file and stdout at the same time?
<hunar> I'll try msg
<hunar> msg was my solution :) .. would (debug also work if the argument wasn't a function?
<hunar> (debug (for i 100 etc..
<Regenaxer> "print to file and stdout at the same time" not really - in the inner out it is redirected
<Regenaxer> (with (out -1 you can print to the outer channel
<Regenaxer> 'debug' expects a function or method, not an expression
<Regenaxer> To stop at the loop, do (! for I 100 ...
<Regenaxer> you can edit a function in memory with (v foo)
<Regenaxer> then insert a '!' at a convenient place
<hunar> So I put my loop in a function then (debug and place ! where i want to stop
<Regenaxer> yes
<hunar> Thanks :D
<Regenaxer> or insert '!' directly
<hunar> I'll try what works for me :)
<Regenaxer> yes :)
<Regenaxer> and <enter> at such a breakpoint continues execution
<hunar> Can I see what line or expression i'm currently on when (debug ing?
<beneroth> ! is a break point
<hunar> It sais Can't debug
<hunar> says*
<Regenaxer> (debug 'foo) ?
<hunar> yes
<Regenaxer> 'foo' must be an EXPR or FEXPR
<Regenaxer> not a SUBR
<Regenaxer> (debug ) modifies it by inserting '!'s
<hunar> I inserted ! after the function parameter on an empty line, when i removed it, it now debugs
<Regenaxer> Not empty line, but in one of the expressions in the body
<Regenaxer> Best (debug 'foo) (pp 'foo) to see it
<Regenaxer> or (v foo)
<hunar> Thanks :)
<Nistur> aw :D
<Nistur> also hello all!
<hunar> Hi Nistur :)
<Regenaxer> Hi Nistur!
<Nistur> \o/
<Nistur> my penti keyboard might get upgraded soon :P I finally got a resin printer so I can (hopefully) print some keycaps :P
<beneroth> \o/ Nistur
<beneroth> gz
<beneroth> Hope you also still got food? :P
<Nistur> food? What is that?
<beneroth> brain fuel
<Regenaxer> Cool Nistur!
<beneroth> looking forward to new pics :)
<beneroth> you do all the same, or different sizes/shapes?
<Nistur> the keycaps? I can print whatever I want :P
<Nistur> https://www.thingiverse.com/thing:4542301 If I used Fusion360 I could use this to generate keycaps
<Nistur> or, I mean, I could just generate some myself...
razzy has joined #picolisp
<beneroth> My thought was that traditional keycaps might be less optimal for penti as you don't have a rectangular board but more like a half circle. Of course if you adjust the keycap orientation it's probably fine. or you want to make them round (mushroom shaped?), and maybe different sizes between thumb/repeat key/other keys? or maybe my thoughts are hogwash :)
<Nistur> I designed the orientation around the weird shape
<Nistur> so you press them at the right angle and they sit pretty much perfectly under the... pad of the finger?
<Nistur> the idea was that you _can_ just use standard keycaps for this. Sure you have to print the body of the keyboard out anyway, but I can't get around that, and the keycap printing needs different tech
<Nistur> so keeping as many off-the-shelf components as possible seems better
<Nistur> There is one thing I noticed though, while using it. It is considerably _more_ tiring to use than a standard keyboard, when put at the same height as a keyboard
<Nistur> ie, on an elbow level desk
<Nistur> the angle is just a bit off and weird, so pressing the keys proves to be more effort than anticipated
<Nistur> HOWEVER
<Nistur> if I use it as I'd originally designed (ie sitting next to me at leg level, as if I was sitting on the bed) then it's perfect
<Nistur> it also works very comfortably if I just rest it going across my lap
<hunar> Is there a software that turns my standard keyboard into penti :) ? I want to first exercise on my computer, because on my phone the screen must be sideways to get my fingers comfortable but then the screen is awkward to read .. I'm comfortable on the space j k l ; keys or space j i o ;
<Nistur> What OS?
<hunar> Linux
<hunar> I have windows too
<Nistur> I used my phone to practice, SSH'd to my computer with connectbot, and then used... fauxcon to forward keyboard events to X (or, most of the time I actually had a convoluted screen setup buuuut...)
<Nistur> did I see somewhere that there's something to set up to use your computer numpad as penti though?
<Nistur> or was that a dream?
<hunar> I hope it was real ;)
<Nistur> waiting for our lord and saviour to respond ;)
<hunar> :)
<Regenaxer> Initially I had a kind of Penti on my Linux notebook
<Regenaxer> But I needed to write a device driver
<Regenaxer> by hacking evdev.c
<Regenaxer> It used the numpad
<Regenaxer> I think beneroth saw it here once
<Regenaxer> Ah, I still have it :) https://software-lab.de/penti.tgz
<Regenaxer> But the Linux kernel changed meanwhile I suppose, so it won't work without modifications
<hunar> Can I run PilOS in virtualbox? in case the evdev.c didn't work
<aw-> Nistur: hi, resin printer wow
<beneroth> Regenaxer, yeah
<Regenaxer> PilOS so far only worked in Qemu
<beneroth> and one specific mainboard :P
<Regenaxer> and on my Asus Notebook :)
<hunar> I'll try evdev.c then :)
<Regenaxer> There is a README in the tarball iirc
<hunar> Yeah, I saw PilOS there ;)
<Regenaxer> right, cause you mentioned PilOS
<Regenaxer> I forgot that it worked in PilOS
<Regenaxer> In PilOS it is written in PilASM
<Regenaxer> much more clean than a patched evdev.c ;)
<Regenaxer> We should really port PilOS to LLVM (pil21)
<Regenaxer> and make it fully stand-alone
<hunar> That would be awesome :)
<Regenaxer> I don't have enough knowledge about possible target hardware
<Regenaxer> Cool would be some smartphone
<Regenaxer> Current PilOS simply uses the legacy BIOS but that's not really supported by new hardware any more
<beneroth> maybe target common cheap hacker hardware like raspberry (ARM) or the like
<Regenaxer> yes, that's useful too
<beneroth> or the rock64 :)
<beneroth> I'd guess that is the most likely eventual "productive" operation of PilOS: micro server
<Regenaxer> and such hardware is better documented
<beneroth> on big hardware it can probably be operated on Qemu just fine
<beneroth> T
beneroth has quit [Remote host closed the connection]
beneroth has joined #picolisp
<Nistur> I think making it support RPi would be the best option. Things like Rock64 should be relatively easy to add support for later
<Nistur> and then, once it's provably working on Pi, supporting phones would be... not easy, but easier than going from x64 and more open to phones directly, I should think
<Regenaxer> yes
<hunar> I wanted to buy a raspberry pi last month, only one place had it and it was $80+ .. he said they are all made in china and chips became very expensive and the price on PI's website is not real
<hunar> I just tired PilOS on qemu :D the 0 7 8 9
<hunar> 0789+ keys are working out of the box as penti keyboard
<Regenaxer> Great :)
<Regenaxer> also in all combinations (chords)?
<Regenaxer> and +
<Regenaxer> ie 5
<hunar> Yes :)
<hunar> I couldn't find evdev.c on my system, should I recompile linux kernel for that?
<Regenaxer> Hmm, he driver systematics of Linux change every week :(
<hunar> :(
<Regenaxer> It would be cool if there were a user-level way for keyboards in Linux, as it is in Android
<Regenaxer> Looks promising!!
clacke has joined #picolisp
<razzy> i vote for PilOS for ARM processors. there are already usable open ARM linux-first phones on the market.
<beneroth> (actual usable) phones is another story, as the whole mobile network stuff is a horrible mess of proprietary parts, commercial standards, mountains of legacy cruft (e.g. your SIM card has probably a linux OS on it, maybe multiple)
<beneroth> that hope we can delay for a long while
<beneroth> picolisp itself runs natively on ARM for quite some years now
<Regenaxer> Yeah, the CPU itself is not the problem, as LLVM takes care of it
<beneroth> the niche for pilOS I see in secure & low energy (while still powerful to program arbitrarily) hardware appliances
<beneroth> I believe
<Regenaxer> It is how it bootstraps, initializes devives etc.
<beneroth> T
<beneroth> hardware-specific driver/memory structures/behaviors
<beneroth> many quirks and special cases, which still need to be handled (even if not documented) to get a useful system you can use with existing stuff
<Regenaxer> And poorly documented if at all
<beneroth> and a lot of the documentation trade secret or only available for expensive money. that's why there are still big security issues found in WLAN and bluetooth, those standards (IEEE) you need to pay for to even read it, so much less security research is done on it (in public) vs. e.g. internet/software standards which are easy available and well understandable RFC standards
<Regenaxer> indeed
<razzy> btw, (task) interrupt has no protection against rewriting symbols that are already rewriten in main loop, yes?
<beneroth> I can only recommend to read RFC's (e.g. about URLs, http, software file formats). they're often easier to understand than the wikipedia article about the stuff
<Regenaxer> 'task' is no interrupt
<beneroth> razzy, it's concurrency, but not parallel
<Regenaxer> T
<Regenaxer> So you can access all globals
<Regenaxer> like any other function(ality)
<razzy> i agree with you that cell systems are mess. But, i already daily use pinephone to my great delight. often i have to restart cell service tho.
<beneroth> no protections within the same picolisp process (except for unreachable memory like transient scopes, namespaces you cannot reach etc)
<beneroth> razzy, I've too much respect about the lack of battery safety in pinephone, so I never really switched to mine :/
<beneroth> still waiting for the librem 5 prism phone, I hope the company gets my order done before they get grounded by lack of money or whatever
<Regenaxer> battery safety? Explodes?
<beneroth> unlikely but some hardware and software safety stuff is lacking in the pinephone, so there is a rare chance it gets explosive when too much electricity gets put into it or drawn from it in short time, something like that
<beneroth> might be different for every shipment of pinephone they made
<beneroth> as they constantly improve and iterate
<Regenaxer> ok
<beneroth> but I believe they still only sell it as a "developer device" so people create software for it, not really as a consumer device
<razzy> i keep watch on temperature too. computing feels mor ereal.
<razzy> yep, not regular customer device.
<beneroth> yeah. if only Nokia would not have run into economic problems and taken over by that MS guy. I loved my N900 with Maemo linux OS, and everything accessible. contacts can be imported/exported using CSV, still not possible in android except when going through google cloud.
<beneroth> (or quirky adb wrapping on computer)
<razzy> still good value/cost for me.
<beneroth> good :)
<beneroth> you use the pine exclusively as phone? or you got a fallback?
<beneroth> dumbphones are actually hard to get here now, except for rather unusable phones with KaiOS for seniors
<razzy> to quote "linux started as worst operating system. Now linux is best operating system without noticable changing."
<razzy> beneroth: I have fallback in closet. i did not used it in long time.
<razzy> I also rarely talk to people over cell service.
<razzy> bbl
razzy has quit [Quit: leaving]
razzy has joined #picolisp
<beneroth> good points :)
hunar has quit [Quit: Client closed]
tankf33der has quit [Quit: the lounge - https://webirc.envs.net]
<beneroth> bbl
beneroth has quit [Quit: Leaving]
tankf33der has joined #picolisp
tankf33der has quit [Client Quit]
tankf33der has joined #picolisp
tankf33der has quit [Quit: the lounge - https://webirc.envs.net]
tankf33der has joined #picolisp
hunar has joined #picolisp
hunar has quit [Quit: Client closed]
tankf33der has quit [Quit: the lounge - https://webirc.envs.net]
tankf33der has joined #picolisp
tankf33der has quit [Quit: the lounge - https://webirc.envs.net]
tankf33der has joined #picolisp
razzy has quit [Ping timeout: 244 seconds]
tankf33der has quit [Quit: the lounge - https://webirc.envs.net]
tankf33der has joined #picolisp
beneroth has joined #picolisp
tankf33der has quit [Quit: the lounge - https://webirc.envs.net]
tankf33der has joined #picolisp
razzy has joined #picolisp
aw- has quit [Ping timeout: 252 seconds]
peterhil has quit [Ping timeout: 244 seconds]
razzy has quit [Quit: leaving]
razzy has joined #picolisp
beneroth has quit [Quit: Leaving]
<razzy> hmm, how do i send keys to linux terminal from picolisp and read answers?
<Regenaxer> What do you want to do?
<Regenaxer> What does it mean to "send a key"?
<razzy> Regenaxer: I want to create interface between user and linux terminal. so i can script in picolisp. even control programs like mutt or ncdu.
<razzy> i think there is function to send commands to linux. that would partially accomplish
<razzy> hmm, is there special syntax to read and write files from (task)?
<Regenaxer> I use a special script for something similar
<Regenaxer> http://ix.io/3xzE
<Regenaxer> Good night!
<razzy> Regenaxer: Thank you, Good night!
<razzy> script does not read terminal tho. is there a way?
<razzy> everything in (task) works as in regular pil. same variables and everything. yes?
peterhil has joined #picolisp
razzy has quit [Ping timeout: 240 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 245 seconds]
peterhil has quit [Ping timeout: 252 seconds]
aw- has joined #picolisp