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
aw- has joined #picolisp
aw- has quit [Quit: Leaving.]
<Regenaxer> Nistur: The contents of http://ix.io/2iIN are unreadable
<Regenaxer> But anyway, if you return a pointer to a struct, it must be either static or explicitly freed, either on the Lisp or on the C level
<Regenaxer> If you pass *in* a structure as a nested List, 'native' allocates a buffer, formats the data into it, passes a pointer to the buffer to C, and frees the buffer upon return
<Regenaxer> I think this is all pretty normal, and behaves what I called "normally" ;)
<Regenaxer> Ah, sorry, http://ix.io/2iIN and http://ix.io/2iIM are different links!
<Regenaxer> So test_malloc is fine
<Regenaxer> To return char* s[2], (S . 2) is not good. 2 bytes are too small ;)
<Regenaxer> You need to pass (S S)
<Regenaxer> IIRC
<Regenaxer> hmm, but right, 2 is not the size in bytes
<Regenaxer> Not sure atm what goes wrong
<Regenaxer> I have to delve into native soon again anyway, when porting to pil21
rob_w has joined #picolisp
orivej has joined #picolisp
mtsd has joined #picolisp
<mtsd> Good morning everyone
<Regenaxer> Hi mtsd!
<Nistur> Regenaxer: urgh, I only checked by curl'ing the file... I forgot that gcc put in loads of colour codes now which would mess that up. That is pretty much irrelevant though, it's just warning about lack of precision when casting a char* to %X (unsigned int) in my printf on the two lines MALLOC and FREE
<Regenaxer> Yeah, no problem. I was just mislead by the similarity of the two URLs
<Nistur> :)
<Nistur> also g'mornin'
<Regenaxer> Yess, good morning :)
<Nistur> hmmm, while generate _shouldn't_ be called simultaneously from different threads, processes, whatever, I don't like the idea of statically allocating the struct... I guess the solution is to add a 'this' ptr to the struct, and pass that back, so that I can then free it
<Regenaxer> I do not see why this should be necessary
<Regenaxer> btw, a static struct is no option?
<Regenaxer> ok, threads ...
<Regenaxer> But why do you need a 'this' ptr? Isn't it known at all times?
<Nistur> I _probably_ don't need threads for this call, but I've been taught to know that when I say that, and act on it, I'll regret it later, and it's better to make it threadsafe just in case :P
<Regenaxer> true
<Nistur> becuase if I return a struct as (S . 2) then try to pass it back to a function to free it, I don't seem to maintain the same C ptr
<Regenaxer> But keep in mind that PicoLisp itself can run only single-threaded
<tankf33der> hi all
<Nistur> hulloo
<Regenaxer> Hi tankf33der!
<tankf33der> i dont remember tested or not, pil21 works on llvm10
<Regenaxer> I think you tested once
<Nistur> hmmm. Maybe it isn't a problem then... But, quite honestly, I'd still rather be certain as adding the ptr in to cleanup should be trivial
patrixl has left #picolisp [#picolisp]
<Regenaxer> tankf33der, is this pil32 version with alloca really 9 times slower?
<tankf33der> yea
<Regenaxer> surprising
<tankf33der> in this task
<Regenaxer> yes
<Regenaxer> strange
<tankf33der> under tcc and clang ever slower
<Regenaxer> is it not 'emu' built accidently? ;)
<tankf33der> gcc -O2 -> 9mins
<tankf33der> -O3 -> 7mins
<tankf33der> i dont think so, cd src && make
<tankf33der> :)
<Regenaxer> So we would need to look at the generated assembly. If alloca() really compiles to stack arithmetics, or calls malloc() or something
<Regenaxer> BTW, I'm frustrated by this LLVM discussion in the list
<Regenaxer> If people are anxious that the code generator inserts *undetectable* malicious code, you cannot trust *any* system
<Regenaxer> (well, theoretically you can't, but practically)
<Nistur> there is healthy paranoia... and then there is...
<Regenaxer> T
<Regenaxer> But such attacks would be stupid, they would be detected
<Regenaxer> Not by analyzing the code, but by the behavior of your program
<Regenaxer> Such exploits are detected in all kinds of software
<Regenaxer> If not using LLVM, what to do?
<Regenaxer> All world is using it
<Nistur> I've not read the entire thread, but I read the first few emails... while I agree with some things, I think, in _general_ that it's silly. While it's _possible_ with FOSS software, especially something so complex as LLVM... the fact that it _is_ open source means that someone can easily stumble across it, and these things only work if they're undetectable...
<Regenaxer> right
<Nistur> and the "your distro uses a modified version" thing... feel free to compile from scratch so you know that's not the case :P
<Regenaxer> This problem is with any software one uses
<Nistur> correct
<Regenaxer> So there are easier attacks
<Regenaxer> direct
<Regenaxer> not by modifying the building of other programs
<Regenaxer> Still I'm frustrated
<Regenaxer> unsure about the "halal" way
<Regenaxer> The world is full of fundamentalists unfortunately
<mtsd> I don't know what to make of the thread, really
<mtsd> In my case, I have to trust the software made by other people
<Regenaxer> T
<mtsd> I trust your work, and your decisions, Regenaxer.
<Nistur> I don't
<Nistur> I mean
<Nistur> I do...
<Nistur> ...
<Nistur> ...
<Nistur> ...
<Nistur> oh glorious dictator :P
<mtsd> Since I am not able to make such things myself, I have no choice but to lean on the work of others here
<Regenaxer> mtsd, thanks
<Nistur> yup :)
<mtsd> I mean, I use Linux, Firefox, several other languages. All are things too big for me to understand och replicate.
<mtsd> The alternative, I suppose, would be to give up computers and become a gardener instead
<mtsd> Which is a nice job in itself. Not intending anything bad towards gardeners :)
<Nistur> mtsd: I've accidentally half become a gardener...
<mtsd> That sounds interesting. How do you accidantally become half a gardener? :)
<mtsd> The Picolisp source is free, so anyone could create a fork to their own liking, I suppose
<mtsd> Or re-use the ideas, invent something new etc.
<Nistur> A healthy respect for privacy and security is good. But there are limits :P I have a macbook of my own which runs closed source software. I got it as I was originally doing some freelance iOS dev. Now it's _mostly_ an SSH client, but there are a few things I run on that. My linux boxes are entirely FOSS really. For work I have a bunch of things which are not FOSS, but they are on work computers and never
<Nistur> on my own (and even then, where there is a FOSS option, I'll choose that ---- screw you Outlook) Partially these choices are because of personal preference, i'm more comfortable and familiar with these tools... but in part it's trust in their openness and respect for privacy. If I'd start down the paranoia route, then yeah, basically nothing is good enough, unless I wrote it myself. Maybe TempleOS... I
<Nistur> might go for that :P
<Nistur> mtsd: MrsNistur loves gardening, and we have a garden, and as of a few years ago, an allotment too. But she has had some medical complications which, while all sorted for a number of years, has meant that she hasn't had the energy and stamina to do much... so I've ended up doing the majority of the work
<mtsd> That's what confuses me about the thread, I suppose. Some valid points of view, privacy and security are very important subjects. But where do you stop? What can you trust?
<beneroth> oh hi all
<beneroth> very busy here
<Nistur> beneroth: we weren't talking about you, don't worry
<Nistur> ;)
<beneroth> oh I don't worry, I know you like me :)
<Nistur> yup
<beneroth> Nistur I agree with your points @ Guido discussion
<Nistur> good with ketchup
<beneroth> ha!
<beneroth> and while it is silly to ask idealists to be saints, his use of Google stuff weakens his point. I deliberately do without google stuff for over 15 years now (except search & android, too impractical)
<beneroth> in the current IT landscape it is impossible to do trusted computing. you can only try to minimize the risk.
<Nistur> yup
<beneroth> having picolisp as an alternative to other stuff on more platforms (especially MacOS) is a step into the right direction.
<beneroth> it's not worsening the situation.
<Nistur> I use as little Google stuff as possible. DuckDuckGo for search is _usually_ good enough. I have an Android, but there's no alternative really, unless you want iOS which... no.
<beneroth> exactly
<Regenaxer> Sorry, lots off phone calls here, Can't follow the discussion :(
<beneroth> no worries Regenaxer :)
<beneroth> nothing important
<Regenaxer> but interesting
<beneroth> just agreeing with your opinion in many words :P
<Regenaxer> ok :)
<Regenaxer> bbl
<Nistur> :)
<Regenaxer> puh
<Regenaxer> done
<Nistur> :)
<Regenaxer> As mtsd put it, But where do you stop? What can you trust?
<Regenaxer> OK, anyway
<Regenaxer> I don't stop with LLVM now
<Regenaxer> There is no other option
<Regenaxer> The things Guido mentiones are all toy projects
<Regenaxer> haha, systems in three lines or so
<mtsd> Even if you wrote all software yourself, everything, there is still the issue about hardware.
<Regenaxer> right
<Regenaxer> and the surrounding infrastructure
<mtsd> Exactly.
<Regenaxer> network, neighbors, burglars
<Regenaxer> haha, yes
<mtsd> These things are not limited to computers. You drive cars and have to trust the manufacturer, eat food you have not grown yourself etc
<mtsd> Hard to be an island
<Regenaxer> :(
alexshendi has joined #picolisp
<alexshendi> G'Day!!!
<Regenaxer> Servus alexshendi!
<alexshendi> Hi Regenaxer, how are you?
<Regenaxer> Thanks! All right :)
<beneroth> Regenaxer, right so. Also, Guido can implement some more variants if he likes. Asking others to do as he likes is just demand attitude, entitlement bullshit
<Regenaxer> absolutely
<beneroth> he can join communities who have a code of conduct if he likes that. I hate this attitude.
<beneroth> nobody is entitled to get free stuff. and not even entitled to be treated nicely after being rude.
<Regenaxer> "childish" as you said ;)
<Regenaxer> strange indeed
<alexshendi> Regenaxer: I'm trying to port pil64 to a new platform (OpenBSD/arm64). Im currently running "bin/pil lib/test.l -bye +". Im am getting output of the form "19961 SIG-4" (several such lines). Are these error messages?
<alexshendi> Many thanks in advance
<Regenaxer> "19961" is the process ID, it received a signal 4 (illegal instr I believe)
<Regenaxer> So the machine code is wrong somehow
<Regenaxer> just bin/picolisp runs?
<alexshendi> OK, can I find out, where the error was?
<Regenaxer> yes, e.g with gdb
<Regenaxer> gdb bin/picolisp
<Regenaxer> then 'r' for "run"
<Regenaxer> It will stop at some point
<alexshendi> The SIG-4s are gone now, but replaced by SIG-25s :(
<Regenaxer> hehe, Heisenbug
<Regenaxer> is it arm64 code?
<alexshendi> Yes, but SIG-25 ist filesize limit exceeded?
<Regenaxer> Probably which signal is meaningless
<Regenaxer> something is very basically wrong
<Regenaxer> Does it run at all?
<Regenaxer> beyond 'main'?
<Regenaxer> $ gdb bin/picolisp
<Regenaxer> ...
<Regenaxer> >(gdb) break main
<Regenaxer> Breakpoint 1 at 0x100b0
<Regenaxer> >(gdb) r
<Regenaxer> Starting ...
<Regenaxer> Breakpoint 1, 0x00000055555650b0 in main ()
<Regenaxer> then you can single-step with 'ni'
<Regenaxer> to see if anything at all works
mtsd has quit [Quit: Leaving]
rob_w has quit [Quit: Leaving]
<alexshendi> Woohoo, it works now!
<Regenaxer> Cool! What was it?
<alexshendi> I had to make a few changes to sys/arm64.openBsd.code.l.
<Regenaxer> good
<beneroth> wohoo
<beneroth> congratulations, alexshendi !
<alexshendi> had to replace "ld A (S I)" with "ld4 (I)" in some places. and (oct "0177") with (hex "ff")
<alexshendi> It was hindered by my less than spotty knowledge of ARM assembly.
<Regenaxer> Wow, good job!
<alexshendi> How long is the test supposed to run? It seems to hang. I remember you had to do something to /etc/hosts in order for it to complete, but cant remeber what...
<Regenaxer> It takes about one second normally
<Regenaxer> or two
<Regenaxer> It probably waits for some child process
<Regenaxer> pipe or so
<Regenaxer> Best do a binary search
<Regenaxer> Comment some of the 'load'ed files
<Regenaxer> and if you know the file, put a NIL in the middle to stop
<alexshendi> top seems to show that it hangs in select/poll
<Regenaxer> yes, waiting
<tankf33der> alexshendi: linux on musl?
<tankf33der> or this is openbsd?
<alexshendi> tankf33der: OpenBSD/arm64 on a Pinebook
<tankf33der> show etc host
<Regenaxer> hehe
<Regenaxer> You could post that to the list in response to Guido
<alexshendi> tankf33der: This is /etc/hosts
<alexshendi> 127.0.0.1 localhost
<alexshendi> # ::1 localhost
<tankf33der> Regenaxer: this post from Guido, i think
<Regenaxer> I think it is a response, a criticism
<Regenaxer> Guido propayates WASM
<Regenaxer> g
<tankf33der> alexshendi: comment 127
<tankf33der> uncomment ::1
<tankf33der> and try again
<alexshendi> tankf33der: Thanks, but it still seems to hang. Maybe I shoul restart the network?
<alexshendi> *should
<tankf33der> nope, works immediately
<tankf33der> pil32 compiles here too ?
<alexshendi> tankf33der: OpenBSD has no 32bit compatibility layer.
<tankf33der> ok
<tankf33der> go to test.l and comment all
<tankf33der> and uncomment by every line
<tankf33der> afk.
<alexshendi> I'm off too. Goodbye.
<Regenaxer> See you!
alexshendi has quit [Quit: leaving]
<Nistur> Regenaxer: I tried installin penti on my tablet, it says the APK doesn't work :(
<Regenaxer> Hmm
<Regenaxer> It needs Android 6.0
<Regenaxer> Did you install from Play Store?
<Nistur> nah, downloaded from your site
<Nistur> I bet this has got an old version of Android
<Nistur> its a Fire tablet... so I have to look it up, because it only tells me it's FireOS
<Regenaxer> Can you check in Settings / System?
<Nistur> no, it pretends to not be Android
<Regenaxer> I see
<Regenaxer> moment
<Nistur> yeaaaaah, it's based on Android 5.1.1
<Nistur> ahh well, never mind
<beneroth> I feel your pain
<Regenaxer> I have an old version
<Regenaxer> moment, searching
<Regenaxer> hmm, no, sorry ;)
<Regenaxer> seems gone
<Nistur> no worries
<Regenaxer> :)
<Nistur> I like the idea of a chording keyboard and wanted to try it :P But I guess now I'll never know ;)
<Regenaxer> hehe
<Regenaxer> Next time you have another device
<Regenaxer> ah!
<Regenaxer> found it
<Regenaxer> Can you try pentiKeyboard5.apk ?
<Regenaxer> Same site
<Nistur> this was also partially because I have a stack of think MDF, and while I have parts marked out for some project, I have some spare, and I was thinkin it'd be fun to shape it into a... keyboard thing, I could get a teensy and some keyswitches and make a one handed ergonomic keyboard :P
<Regenaxer> yeah, haptic real keys are better
<Nistur> While I'm definitely the kind of person to attack a project like that just because, I have far more than enough projects right now, so I shoudn't, unless I know I'd use it :P so I wanted to get some practice on my tablet first
<Nistur> it's installed and working :)
<Nistur> thanks
<Regenaxer> Cool
<beneroth> congrats
<beneroth> I recommend doing a printout of the chords list, and use some typing training app to learn
<beneroth> some don't work nicely with non-standard keyboards
<Nistur> hello
<Nistur> yay! that worked :P
<Nistur> the slowest I've typed since I was about 5 years old :P
<beneroth> :)
<beneroth> wait until your finger get tired of the unusual movements :)
<beneroth> be aware of the combos, they order matters form them
<Nistur> i think this is weird
<beneroth> it is, but I found it better than usual tabled/mobile touch typing
<Regenaxer> ui, oil price is negative
<beneroth> yep
<beneroth> but as weird as some think, writes Reuters
<beneroth> *but not as weird
<beneroth> it's just the future trading, which is about oil to be traded physically at some specific time. which is next Tuesday.
<beneroth> and now nobody wants it because everyone run out of storage
<Regenaxer> yeah
<Regenaxer> May
<Nistur> trying gtypist... I can get most of the first lesson with only glances at the table... apart from the ;
<Nistur> haven't figured that out yet
<Nistur> ahhh, I think I have it
<Regenaxer> ;
<Nistur> yeah... got it now... I can't hit the arpeggios 100% yet...
<Regenaxer> The trick is a short tap with the last finger
<Regenaxer> The length of the first press does not matter