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
geri has joined #picolisp
<geri> hey, looks like i managed to write a proper indent function
<geri> tell me if anything seems logically wrong :D
<geri> well, it doesn't do the "if size of car is more than 12, go to next line" thing
<geri> just indentation
<abu[7]> Sounds good :) I cannot say anything though, as I have absolutely no idea about emacs
<geri> its okay, functions are named pretty descriptively
<geri> just check last block
<geri> basically if theres more open parens than closing ones, indent the line to level of previous line + 3, if theres more closing ones, -3 and otherwise at the same level
<abu[7]> How about parens in strings and/or (possibly nested) comments?
<geri> oh good catch
<geri> lets see..
<geri> yeah, borks it
<geri> if you add a lone closing paren into a string
<geri> and just adding parens to strings adds indentation
<geri> okay thanks
<abu[7]> Just to be perfect :)
<geri> yee
<geri> i dont want it to be annoying either
<geri> plus its a fun project anyway
<abu[7]> Sure :)
<geri> how do i check if im looking at a string or not, hmmm
<abu[7]> pilPretty also does not handle that
<geri> ahaha
<geri> amazing
<abu[7]> That's why I removed it perhaps
<abu[7]> Vip is correct
<geri> well its probably gonna increase complexity quite a bit
<abu[7]> Yeah
<abu[7]> Vip keeps proper info for the state of each char
<abu[7]> Each char is a symbol
<geri> it has to be run at the beginning of sexp 100% of the time though, no?
<geri> otherwise it can only know state of following lines
<abu[7]> Yes, the whole file is marked up all the time
<geri> i mean it seems only to*
<geri> vip doesnt autoindent, no?
<geri> or does it
<abu[7]> Not "auto", only if you hit comma
<geri> i meant you have to run comma on beginning of sexp to get proper indentation
<abu[7]> T
<geri> im so traumatized by dw deleting with inclusion
<geri> xd
<geri> i know its like simpler like that but trauma is real
<abu[7]> Hmm, what do you mean with "deleting with inclusion"?
<geri> deletes up to beginning of text including the first character
<geri> im really bad at talking today
<abu[7]> I see, yes, differs from VI
<geri> im honestly surprised you were a vim user and not like an nvi user
<abu[7]> So "de" or "dE"
<geri> or busynox vi
<geri> :d
<geri> busybox*
<geri> :D*
<geri> i use dw to delete indentation often
<geri> so all the spaces but nothing else
<geri> hence the trauma
<abu[7]> This does TAB in Vip
<abu[7]> Move *till* non-white
<geri> i need not to move but delete all whitespace until text stards
<geri> i cant type xd
<abu[7]> The fundamental principle of VI
<abu[7]> Move
<abu[7]> All those commands are based on move
<abu[7]> ce
<abu[7]> de
<abu[7]> ye
<abu[7]> etc
<abu[7]> Edgting *is* move
<abu[7]> Editing
<geri> that's not what i meant i wanna do 🤧
<geri> imagine you wanna delete all indentation completely in task function in lib.l
<abu[7]> <}
<geri> its not efficient but id usually just spam dw followed by j until its done or use :s
<abu[7]> You do "<}" several times
<geri> okay great
<geri> 99999<}
<abu[7]> yes
<abu[7]> or "<G"
<abu[7]> till eof
<geri> wait it seems to indent 99999 following lines by one level lol
<geri> well idea is understood anyway
<abu[7]> You can repeat with "."
<geri> oh yeah
<abu[7]> Usually I do "<%" for one s-expr
<abu[7]> or just "," in the end
<abu[7]> I don't write code line by line usually, but fragments here and there, that's why I don't want the editor mess up my code while I type by auto-indenting it
<geri> it can be annoying if you got adhd and cant close stuff you written above before writing something new haha
<abu[7]> T :)
alexshendi has joined #picolisp
alexshe51 has quit [Ping timeout: 255 seconds]
geri has quit [Remote host closed the connection]
alexshendi has quit [Ping timeout: 268 seconds]
alexshe30 has joined #picolisp
alexshe30 has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshe30 has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshe30 has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshe30 has joined #picolisp
alexshendi has quit [Ping timeout: 268 seconds]
alexshe30 has quit [Read error: Connection reset by peer]
alexshe43 has joined #picolisp
alexshe43 has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshe29 has joined #picolisp
alexshendi has quit [Ping timeout: 260 seconds]
alexshe29 has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp