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
andyjpb has joined #picolisp
andyjpb has quit [Client Quit]
jibanes has quit [Ping timeout: 245 seconds]
jibanes has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
aw- has joined #picolisp
xkapastel has quit [Quit: Connection closed for inactivity]
orivej has joined #picolisp
<Nistur> mornin' all
<Regenaxer> Hi Nistur
<Nistur> hey there :)
<beneroth> hi Nistur
<beneroth> hi Regenaxer :)
<Regenaxer> Hi beneroth
xkapastel has joined #picolisp
razzy` has quit [Quit: ERC (IRC client for Emacs 26.1)]
xkapastel has quit [Quit: Connection closed for inactivity]
razzy has joined #picolisp
<razzy> omg, i love rewriting functions on the fly, when debugging. just have to do it with (setq ) :]
<razzy> is there a easy function to turn picolisp code into safe transient characters? and than back?
<razzy> what if i want (pretty) print everything picolisp REPL spit at me?
<razzy> should i hack pil? or should i hack Emacs?
razzy has quit [Ping timeout: 246 seconds]
xkapastel has joined #picolisp
aw- has quit [Quit: Leaving.]
jibanes has quit [Ping timeout: 272 seconds]
jibanes has joined #picolisp
jibanes has quit [Client Quit]
jibanes has joined #picolisp
jibanes has quit [Client Quit]
jibanes has joined #picolisp
<wuehlmaus> wow, pil64 on linux printed 'til 100 000 000 in 13 seconds, my poor pil32 on mac despite of a SSD did the same thing in 26 seconds
<wuehlmaus> pil64 is very impressive
<wuehlmaus> this is still another linux than on my netbook, here it is ubuntu and a very old machine
<wuehlmaus> still it's so much faster
<wuehlmaus> the virtue of assembly?
<tankf33der> yea
<tankf33der> start coding, try convert something from arc :)
<Regenaxer> The main reason pil64 is much faster is that it has short numbers
<Regenaxer> Arithmetics with small number creates no garbage
<Regenaxer> But Asm has its part too
ubLIX has joined #picolisp
<wuehlmaus> how do i get a slice of a string? i know that i can chop a string
<wuehlmaus> say i want the 2 to the 5th character
<wuehlmaus> hmm, nth?
<tankf33der> yea
<tankf33der> nth+head
<tankf33der> what is your task ?
<wuehlmaus> just trying to replace my function knowledge of scheme :-) no task
<tankf33der> find the task!
<tankf33der> and implement on scheme,arc and picolisp.
<wuehlmaus> > (substring "hello" 1 3)
<wuehlmaus> "el"
<tankf33der> (nth (chop "hello") 2)
<tankf33der> -> ("e" "l" "l" "o")
<wuehlmaus> then pack
<tankf33der> (pack (head 2 (nth (chop "hello") 2)))
<tankf33der> -> "el"
<wuehlmaus> i like substring :-)
<wuehlmaus> it's good that i can combine tools to get what i want, though
<Regenaxer> You can use any list operations on chopped symbols. So there are a lot of possibilities :)
<Regenaxer> For example for an arbitrary pattern:
<Regenaxer> : : (extract and '(T NIL NIL NIL T T NIL T) (chop "abcdefgh"))
<Regenaxer> -> ("a" "e" "f" "h")
<wuehlmaus> oh nice
ubLIX has quit [Quit: ubLIX]
ubLIX has joined #picolisp
razzy has joined #picolisp
<razzy> there is not a function that does not execute anything from its insides, yes?
<razzy> some (NIL NIL NIL (my-sexp)) construct
<Regenaxer> You mean 'quote'?
<Regenaxer> not evaluating its arguments?
<razzy> not evaluate, not print, just encapsulate code in ()
<Regenaxer> Can you give an example?
<Regenaxer> arg -> return value
<razzy> something like quote, that works like #comments . for code storage in file
<razzy> normal comments are hard to work with in automated way
<Regenaxer> It *is* quote, or you can simply use a transient symbol
<Regenaxer> But note that this wont work in genera
<Regenaxer> l
<Regenaxer> Consider (if (foo) (comment "test") (yes-code) (no-code))
<razzy> (quote) returns its insides
<razzy> but it better than nothing. i forgot i can use quote for that purpose :]
<razzy> thx
<Regenaxer> What else to return?
<razzy> nothing
<Regenaxer> You must always return something
<razzy> act as code storage
<Regenaxer> there is no "nothing"
<razzy> NIL
<Regenaxer> You can trivially write such a function
<Regenaxer> but it is useless
<razzy> (nil (quote prg)) solved
<razzy> it saves me time
<Regenaxer> How would you use it?
<Regenaxer> Why not use #{ ... }# ?
<razzy> so i can collapse code i do not want to look at and i do not use at a time
<Regenaxer> moment, brb
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
<Regenaxer> The best is #{ ... }#
<Regenaxer> it also nests
<razzy> do i need new pil?
<razzy> or emacs module?
<Regenaxer> What kind of new?
<razzy> #{ }# does not work for my emacs
<razzy> hilights are off
<Regenaxer> This has nothing to do with the editor
<Regenaxer> Comments always work
<Regenaxer> ah
<Regenaxer> Then use vip
<razzy> i do not want to yet
<Regenaxer> It highlights Building the PilBox KernelBuilding the PilBox Kernel
<Regenaxer> oops
<razzy> :]
<Regenaxer> it highlights #{ }#
<Regenaxer> (wrong paste, just writing a mailing list post about PilBox)
<razzy> no problem
<razzy> also, i read backlog if i asked something. if noone want to answer, no problem
<Regenaxer> ok, which question was unanswered?
<razzy> function that adds and removes all escape characters
<razzy> i did not find
<Regenaxer> filter
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
<razzy> i will look, easy hack if i want emacs picolisp-REPL to (pretty) print everything?
<Regenaxer> Or just 'delete'
<Regenaxer> I have no idea about emacs
<razzy> thx, i have trouble believing filter could easily find all controll characters and escape them :].
<Regenaxer> I dont really know what you want to do
<Regenaxer> you said delete all escapes
<Regenaxer> (delete Lst (char 27) T)
<razzy> also *add* all escapes to code
<Regenaxer> also?
<razzy> 2 functions that are complementary
<Regenaxer> What do you need that for
<Regenaxer> ?
<razzy> playing with code
<Regenaxer> It depends on the usage
<razzy> evolutionary algoritms, text compression
<Regenaxer> So just do it. It is trivial
<Regenaxer> (pack (mapcar '((C) (if (= C ..) (list ...
<Regenaxer> depends what exactly you want to do
<Regenaxer> or use 'make' in a loop, or 'replace'
<Regenaxer> it all depends on the details
<razzy> i want to take random text, find all controll characters, escape them.
<Regenaxer> Think about it
<Regenaxer> Then do it :)
<Regenaxer> What is the problem?
<Regenaxer> (if (>= 32 C) .. above
<Regenaxer> (>= 32 C) is control
<razzy> but, if it find controll character, i am in the world of problems if it start controlling flow
<Regenaxer> For the most general and powerful way, consider 'state'
<Regenaxer> I use it in @lib/vip.l to markup text
<razzy> will look
<Regenaxer> For a simple replace of control chars, use the above mapcar or better mapcan
<razzy> will look
<Regenaxer> good
<razzy> also, not properly escaped controll characters are source of horrible bugs.
<Regenaxer> Really?
<razzy> if you did not catch them all, and interpretter have sometimes undocummented controll characters
<razzy> really hard to be sure it is bugless
<Regenaxer> Huh? I never saw a crash due to a control character
<Regenaxer> In most languages they are just white space
<Regenaxer> (in pil too)
<Regenaxer> And what does escaping them help?
<razzy> i can than work with them safely?
<razzy> "safely"
<Regenaxer> I don't understand
sebboh has joined #picolisp
<Regenaxer> What "horrible bugs" have you seen?
<sebboh> hi Regenaxer. #penti isn't occupied today so I came here.
<Regenaxer> Hi sebboh! Welcome!
<razzy> mostly imagining them, thank you for time
<Regenaxer> Yes, #penti is abandoned
<Regenaxer> Here is perfect for Penti too :)
<Regenaxer> razzy, welcome
<sebboh> I downloaded pentiKeyboard.apk today and it has md5sum 8e5e26b79de3238b4cfd704a965e9967. Is that right?
<Regenaxer> I have 8e5e26b79de3238b4cfd704a965e9967
<Regenaxer> ah
<Regenaxer> yes, same
<Regenaxer> (I saw only the last part ;)
<sebboh> ok great. I have the right file, non-corrupted. When I try to use (stock) file manager to open the .apk, it tells me "Parse error". Is my android too old or something? It's 5.1.1
<Regenaxer> I havent tried any file manager, put you can do $ unzip -l pentiKeyboard.apk
<sebboh> 15 files.
<sebboh> file(1) reports it is a zip, too.
<Regenaxer> yes, 15 files
<sebboh> when I tap a file in File Manager, it opens the file in the default application. For APKs, I presume that is some apk installer.
<Regenaxer> yes
<Regenaxer> It seems to depend on the Android
<Regenaxer> What if you long-press in Downloads and then share?
<sebboh> let's see
<Regenaxer> I think even better is do use Chrome
<sebboh> I don't have Chrome. ...I may have chrome, but I haven't updated it. :) I have Firefox.
<Regenaxer> You click on the link do download it, and Chrome pops up a short "open" message
<Regenaxer> Firefox too iirc
<Regenaxer> hmm :)
<sebboh> long-press, share gives me only a few options... Termux, Bluetooth, Gmail, Signal, and WhatsApp.
<Regenaxer> ah, you have Termux
<Regenaxer> then it is easy, I always use termux
<sebboh> yes, firefox gave me an 'open' button, and I did that. Parse error.
<sebboh> ok
<Regenaxer> Did you setup-storage in Termux?
<sebboh> I do not have a command with that name on my path but I will search the web for it now.
<Regenaxer> you can access download directly with it
<Regenaxer> I think you need the Termux-API app
<Regenaxer> Termux:API to be exact
<sebboh> ok the command is `termux-setup-storage` and it does some things, one of which is configure ~/storage/downloads. Fine, done. Ok, I'll install Termux:API.
<Regenaxer> Perfect!
<Regenaxer> Then you can do termux-share -d ~/storage/downloads/pentiKeyboard.apk
<Regenaxer> sebboh, I assume you don't use Google Play Store, right?
<Regenaxer> Otherwise it would be easier ;)
<sebboh> I have google play store, yes, but I didn't see pentikeyboard in there.
<Regenaxer> ah, it is there
<sebboh> (Play store hides apps incompatible with your device.)
<sebboh> trying termux-share
<Regenaxer> You think it is incompatible? Penti only needs Android 6
<Regenaxer> Perhaps that's why you get the above error?
<sebboh> oh, I have android 5.1.1. I didn't see the requirement before
<sebboh> surely.
<Regenaxer> Sorry!
<Regenaxer> Old versions of Penti used to work on 5
<Regenaxer> Shall I try to find an old one?
<sebboh> I should just rebuild the new one with different settings I think. I see your penti build doesn't require android studio anymore. Nice.
<Regenaxer> This is not enough. There is code now which is not supported on 5
<Regenaxer> Thats why I increased it
<sebboh> I tried your old penti on my old android 5.1.1 phone. Unfortunately the hardware didn't support more than 2 multitouch spots. My wife got a new phone, so I have her old 5.1.1 now.. maybe it supports enough multitouch points for penti..
<sebboh> oh... I see
<sebboh> Normally I would turn to your version control system, but if I recall correctly, you only use tarballs, is that right?
<Regenaxer> Not important stuff though. The DEF functionality iirc
<Regenaxer> yes, I use snapshots to be exact
<Regenaxer> I'm just grepping for an older version
alexshendi has joined #picolisp
<Regenaxer> I upload it
<Regenaxer> sebboh, can you try this one? https://software-lab.de/pentiKeyboard5.apk
<Regenaxer> It is in the newest directory for minSdk 21
<Regenaxer> built Nov 23 last year
<sebboh> it installs.
<Regenaxer> Cool!
<sebboh> I can select Penti as my keyboard, but when when I tap a text box, I just get a black area where a keyboard should be. I don't see the circles.
<sebboh> when I go into Input settings and tap Penti, nothing happens. When I tab Gboard instead, I see a list of settings.
<Regenaxer> First there should be "PENTI" in large letters
<sebboh> I don't have adb available to see if there are log messages or something.
<sebboh> I haven't seen that
<Regenaxer> strange
<Regenaxer> You can switch back to normal keyboard?
<Regenaxer> And then, when selecting Penti again, you should see "PENTI" in a black-to-white gradation
<Regenaxer> ie the screen before calibration
<sebboh> I can switch back and forth, but "nothing happens" when I switch to penti
<Regenaxer> It should work on any device. Is just pure Java
<sebboh> there is a black void. I noticed that if I leave penti selected and do different things that would activate a keyboard.. the black void does not appear. It only appears when I switch away from gboard.
<Regenaxer> I tried also on x86-32 devices
<Regenaxer> But the gradation text never appears?
<sebboh> correct
<Regenaxer> What if you tap with all 5 fingers nevertheless?
<sebboh> Does it do any network activity? I have restricted network activity
<Regenaxer> No
<sebboh> nothing happens when I tap the void with four fingers and a thumb
<sebboh> nor four fingers either
<sebboh> I will plug it into ADB later.
<Regenaxer> A single finger should also show a circle
<Regenaxer> ah, no
<sebboh> nope, I think it is crashing as soon as it starts
<Regenaxer> single finger does nothing
<Regenaxer> hmm, some logcat would be helpful perhaps
<Regenaxer> Does your device support multi-touch?
<Regenaxer> It must detect 5 touches simultaneously by hardware
<sebboh> I have a logcat app on the phone... it says W/InputEventReceiver(23430): Attempted to finish an input event but the input event receiver has already been disposed.
<Regenaxer> No idea what this means
<Regenaxer> Perhaps indeed a hardware issue?
<Regenaxer> No support for 5 touch input events?
<sebboh> no idea. I will pause this project until later.
<Regenaxer> Yeah, a pity though
jibanes has quit [Ping timeout: 250 seconds]
jibanes has joined #picolisp
mtsd has joined #picolisp
<Regenaxer> Hi mtsd! Thanks for your mail!
ubLIX has quit [Quit: ubLIX]
<mtsd> Hi Regenaxer!
<mtsd> Thanks for replying quickly :)
<mtsd> You are right, it is going to be some work to do this, but I am looking forward to it.
<Regenaxer> :)
<mtsd> At least one of them is quite interested. He has asked me for help to get started before
ubLIX has joined #picolisp
<Regenaxer> Cool! I'm sure you can do :)
<mtsd> Let's hope so :)
<mtsd> Time to get some sleep. I will keep you posted! Good night!
<Regenaxer> Yeah, me too
<Regenaxer> Good night!
mtsd has quit [Quit: leaving]
alexshendi has quit [Ping timeout: 258 seconds]