beneroth changed the topic of #picolisp to: PicoLisp language | The scalpel of software development | Channel Log: | Check for more information
<geri> i just noticed @lib/tinymce.l has a readme at the end of the file; does NIL on top level make the rest of the file into a comment?
<geri> also i only learned yesterday that vip is made of only ansi escape sequences XD
<abu[7]> pablo_escoberg: Yes, highlighting is done only in 'addLine'. But the classification of the characters of a line is done in 'markup'
<abu[7]> geri: Yes, reading NIL is EOF
<abu[7]> This used in many files in the form `*Dbg
<abu[7]> Vip war ncurses first, but I noticed that ncurses are a real mess
<geri> i remember that :D
<geri> are escape codes *not* a mess?
<abu[7]> Much better :)
<geri> are they now? :D
<geri> i mean, i use em often, but i hadnt used cursor movement ones
<abu[7]> Ncurses is a version mess
<geri> ah, like that
<abu[7]> And, more important, the code of Vip is a lot simpler without curses
<abu[7]> Though perhaps a bit slower
<abu[7]> but that's not the bottleneck
<geri> its a good question whether or not its slower
<geri> you could try comparing older to newer version for large files or something
<geri> or maybe check latency on key press
<geri> check like without tools, just what feels faster :D
<abu[7]> It is not the file size (that's a bottleneck for Vip itself) but probably the screen size
<abu[7]> Ncurses is optimized for screen output
<abu[7]> So on a serial, slow, terminal it would be significant
<geri> i know all refreshes are explicit
<geri> almost all
<geri> wrote tetris in cl w/ curses :)
<abu[7]> ok, so you know
<geri> that its pretty hard to manage the screen objects? yeah xd
<geri> (or pointers in this case, you get the idea)
<abu[7]> T
<geri> can you print characters at particular coordinates with escape codes?
<geri> like top left cell of the terminal, or exact middle using some math, etc?
<abu[7]> Yes
<geri> i think you can then do the same optimized outputs by only changing what's under the cursor/getting changed
<geri> like if i press l, i have to rewrite current cell to be proper face, then rewrite next cell and that's p much it, rest of output shouldnt be touched
<geri> its probably +- how its done rn
<abu[7]> Yes, but it is not worth the effort on fast terminals
<geri> so how does screen update rn on mouse movements?
<abu[7]> (it used to be on 9600 baud)
<geri> cursor**
<abu[7]> [lib/term.l
<abu[7]> @lib/term.l
<abu[7]> Very simple
<abu[7]> 'cup' positions the cursor
<geri> 94 lines? woah
<geri> there's a modal text editor in pure bash
<geri> thats probably the same strategy as there
<abu[7]> nice
<geri> im kind of inspired to write my own
<geri> :D
<abu[7]> Good idea πŸ‘
<geri> ~/.pil is hardcoded everywhere right?
<abu[7]> Yes, several places I think
<geri> eh
<geri> i know its a unix tradition but i dont like cluttered $HOME
<geri> bash and sbcl are other offenders!
<abu[7]> Yeah, but it is very convenient
<geri> nowadays home is a fallback location, configs go to $XDG_CONFIG_HOME or ~/.config, cache goes to $XDG_CACHE_HOME or ~/.cache
<abu[7]> ~/.config is also in HOME
<geri> yeah, but 1 directory vs 1 per program you use
<geri> cef_user_data emacs gtk-3.0 mpv unity3d chromium fcitx ibus NecroDancer virt-viewer config.git fcitx5 keepassxc nicotine dconf firefox lem pulse inputrc discord fontconfig libvirt racket dunst git MonoGame repos QtProject.conf Electron glib-2.0 mozc sway shrc.local
<geri> crap in my ~/.config
<abu[7]> Problem is on embedded systems where home is not writable
<geri> if that was in ~ id die
<geri> even better
<geri> you can add overrides using $PIL_HOME or something
<geri> then if home isnt writable they can move it and if you dont like ~/.pil you can too
<geri> )
<geri> env var cause no chicken and an egg problem of "all of my dotfiles are located here, but i need ~/.pil/config to actually know where it is"
<abu[7]> Many ways
<geri> yeah
<geri> i could write it myself honestly, if the idea is okay
<geri> i think this is simpler than supporting all the XDG_*_HOME variables by default, checking if you gotta put it in home anyway and then finding out its not writable ahaha
<abu[7]> I would change 'UsrHome' via 'struct', or just set HOME before starting pil
<geri> won't it mess with (path "~/file")?
<geri> and (sys "HOME") if you need it
<abu[7]> 'path' uses $UsrHome
<abu[7]> H
<abu[7]> H
<abu[7]> 'struct' is not usable here
<abu[7]> We don't know the addsess
<geri> hm
<geri> is UsrHome available at runtime?
<abu[7]> Not easily
<abu[7]> I don't see any real problem
<geri> well, you said it yourself about non-writable home problem on embedded devices
<abu[7]> You need some writable space
<geri> (mightve misunderstood)
<abu[7]> s
<abu[7]> Yes
<abu[7]> but you have other writable space
<abu[7]> so set HOME before start
<geri> hmmmmmm
<geri> i guess then youll be hardcoding paths to files in actual home if you need them
<geri> but thats a somewhat niche issue
<geri> or set a "home" variable which points to actual home
<geri> nasty but it works
<geri> do you use 'call often in prod apps?
<abu[7]> Not sure, probably more often 'in', 'out' or 'pipe'
<geri> i meant more about using external programs, if forgot in can call them too
<geri> :D
<abu[7]> (call "mkdir" "-p" perhaps
<geri> yeah thatd be a whole rewrite in pil
<geri> cause make directory in C isnt recursive
<abu[7]> T
<abu[7]> and not time critical
<geri> ye
bjorkint0sh has quit [Ping timeout: 240 seconds]
bjorkintosh has joined #picolisp
bjorkintosh has joined #picolisp
<geri> i only now noticed its possible to indent let prettily
<geri> still following the indentation rules
<geri> (somewhat)
<abu[7]> OK, but it is not according the rules as I see them
<abu[7]> See (doc 'pretty)
<geri> because let should be on line one and the rest should be below?
<geri> if that, then de doesnt follow them either :)
<abu[7]> Some *functions* are allowed to keep one or several more items on the same line
<abu[7]> Mainly flow funs
<abu[7]> (vi 'pretty
<abu[7]> (vi 'pretty)
<abu[7]> A long 'cond' ;)
<abu[7]> Sometimes I violate the rule though, and put a few more items on the first line
<abu[7]> But the indent is always clear
<geri> just saying if there are exceptions anyway, like de, might be a good idea to add let to them because of how much better it looks
<geri> although again thats a formatting preference thing
<abu[7]> 'let' *is* such an exception
<abu[7]> ((memq (car X) '(let let?))
<geri> ah, just not long let
<abu[7]> There is no long let
<geri> wait whats that line
<geri> (let (X 1 Y 2) ...) i called "long" let
<abu[7]> ok, the expr is long
<abu[7]> Anyway, just pp your fun to see the "official" format
<geri> "pp your fun" sounds amazing
<geri> :D
<abu[7]> tankf33der always perfectly sticks to the rules
<abu[7]> amazing ? ;)
<geri> hilarious
<abu[7]> You can of course format any way you like, but it makes the code harder to read for others
<abu[7]> np
<abu[7]> Also harder for you if you do things like (more (who 'foo) pp)
<geri> ye
<abu[7]> There are some debugging features which use pretty implicitly
<geri> time to rewrite pretty in my pilrc :)
<geri> (im joking)
<abu[7]> Ξ”
<abu[7]> πŸ‘
<geri> is that a delta?
<abu[7]> Yes, wrong key ;)
<geri> that's a rare kind of typo haha
<abu[7]> I typed Alt-D instead of Alt-T on Steno
<abu[7]> Alt-T gives πŸ‘
<geri> t for thumb?
<abu[7]> Yep
<geri> and d for delta
<geri> very nice
<abu[7]> ☺ is L
<abu[7]> ß
<geri> smiLe or Laugh?
<abu[7]> 😎 is C (cool)
<geri> haha
<geri> very C
<abu[7]> ☺
<geri> and its all coded in the KB?
<abu[7]> yes
<geri> cool, we both got programmable keyboards then :D
<abu[7]> In Alt only these three
<abu[7]> but with C-Space I have a lot more
<abu[7]> πŸ˜‡
<geri> C-SPC is like a prefix/leader key for emojies?
<abu[7]> and kanji 東京
<geri> had to double check whether or not it was tokyo
<abu[7]> Correct!
<geri> )
<geri> "east capital"
<geri> okay that i didnt know
<geri> very nice
<abu[7]> C-SPC then $ gives a few emojis
<geri> and kyoto is "capital (of) everything", woah
<abu[7]> C-SPC then toukyou gives 東京
<geri> oh wait how does that work?
<geri> ctrl space like switches to japanese iem on android level?
<geri> or is there some other magic involved
<abu[7]> yes
<geri> ah
<abu[7]> same in Penti
<geri> i have fcitx5 installed on my desktop so i have the sameish thing
<abu[7]> C-SP displays candidates while you type
<geri> but its super + space
<abu[7]> T, or C-J on some systems
<geri> wait, and it works in ssh too, doesn't it?
<abu[7]> s
<geri> sh!
<abu[7]> Yes, it is on key input leveu
<abu[7]> level
<abu[7]> So also in browser or any other app
<geri> yeah
<geri> emacs can actually let you type any language without setup
<geri> just say "write japanese pls" and it works, but only in itself
<abu[7]> nice
<abu[7]> Such a toggle is convenient
<geri> sometimes yeah
<geri> like not having to set up input langs on work machine
<abu[7]> If I needed kanji more ...
<abu[7]> T
<abu[7]> Now I must use C-SP for every word
<abu[7]> or phrase
<geri> well, phrase is usable-ish
<geri> if it was every word id die
<abu[7]> I have also other often needed stuff there
<abu[7]> like email address for logis
<abu[7]> login
<geri> like actually have control and alt keys on your keyboard
<geri> ah, like macros
<abu[7]> kind of
<geri> (word "macro" totally isnt overloaded!)
<abu[7]> haha, yes
chexum has quit [Ping timeout: 260 seconds]
chexum has joined #picolisp
<geri> aight, actually killing irc for today :D
<geri> laters
<abu[7]> o/
geri has quit [Quit: ERC (IRC client for GNU Emacs 29.3)]
theruran has quit [Quit: Connection closed for inactivity]
theruran has joined #picolisp