rob_w changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Check also http://www.picolisp.com for more information || Attention due to latest spam floods this channel will only allow registered users to send messages - check https://freenode.net/kb/answer/registration
pierpa has quit [Quit: Page closed]
razzy has joined #picolisp
_whitelogger has joined #picolisp
_whitelogger has joined #picolisp
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #picolisp
_whitelogger has joined #picolisp
_whitelogger has joined #picolisp
ubLIX has joined #picolisp
orivej has joined #picolisp
ubLIX has quit [Quit: ubLIX]
<Regenaxer> Fixed a nasty bug. Took me three days to find.
<Regenaxer> Crashes when garbage collection runs after namespaces were switched in a couroutine
<razzy> woa :]
<Regenaxer> (would also happen if in a catch/throw env)
<Regenaxer> Yeah, was really tough. Very hard to reproduce
<Regenaxer> especially I observed it only in a PilBox app initially
<razzy> also i found several uses of standalone throw (throw 2) throw you 2levels of parenthesis up (also standalone-throw is not recommended to use with high numbers )
<Regenaxer> yes, or even better only with symbolic tags
<Regenaxer> In pil64 short numbers work though
<razzy> symbolic tag?
<razzy> you mean catch?
<Regenaxer> (throw 'foo)
<Regenaxer> yes, also in catch of course
<razzy> he he he, you are better than i thought
<freemint> there is always a catch
<freemint> razzy what do you mean by you found serveral uses of '(throw 2) also good morning
<freemint> Also Good Morning
<razzy> freemint: that i would like to have jumps in lisp code
<razzy> and writing catch on upper end seem like waste of time
<freemint> have you considered making your code cyclic?
<tankf33der> diff for bug Regenaxer said
<freemint> cyclic code allows the interpreter to coninue at an arbitrary place in the code
<Regenaxer> Also Good Morning to freemint
<freemint> I see why the bug is nasty.
<Regenaxer> Yeah, to reprodue it:
<Regenaxer> (symbols 'foo 'pico)
<Regenaxer> (co 'tst
<Regenaxer> (symbols '(pico foo))
<Regenaxer> (gc)
<freemint> What use cases did you have for namespace switching in coroutines?
<Regenaxer> (msg (symbols) " co") )
<Regenaxer> (msg (symbols) " top")
<Regenaxer>
<Regenaxer> or, for catch:
<Regenaxer> (symbols 'foo 'pico)
<Regenaxer> (catch 'tst
<Regenaxer> (symbols '(pico foo))
<Regenaxer> (gc)
<Regenaxer> (msg (symbols) " co")
<Regenaxer> (throw 'tst) )
<Regenaxer> (msg (symbols) " top")
<Regenaxer> Both will segfault
<freemint> Can you comment on that bug in regard to PicoLisp simplicity?
<Regenaxer> Yes: It is a very simple bug once it was found ;)
<razzy> freemint: i completely forgoten about cyclic codes. are there some interesting best practices? instead of main loop?
<freemint> The best practice is "DON'T". The speed increases over for loops are minor in most cases if you want leave the loop later. In an extreme numeric loop it might be 20% if recall correctly. generalized Cyclic code is not well supported in picolisp syntax. You would need to write your own domainlang which is expanded by a macro.
<freemint> the macro should be mostly trivial except that you need to use destructive methods on the code
<razzy> only advantge i see is no need for bootloaders, just persistent memory
<freemint> Also the code can no be pretty printed 'unbug and similar programms might get stuck in loops when traversing the source code
<razzy> yeah, whole lot of other problems :]
<razzy> also harder to reverse engineer :]
<freemint> but is allows you to write very, very performant code as the interpreter is not even aware of the redirection since he just keeps following cdrs
<freemint> razzy only by a constant effort wo write tools which handle cyclic code
<freemint> but the funny thing is that there might be multiple ways to display a cyclic code.
<razzy> fuck that is slick
<razzy> might be?
<razzy> there are infinite ways how to describe anything
<freemint> without escaping into post modernism
<razzy> do you mean multiple usefull ways to display cyclic code?
<freemint> the "cyclic" cdr could point anywhere in to the program. Including further down the line.
<freemint> well we need a way to notate cyclic code. i will just use jump and label. instead since they get the idea across.
<Regenaxer> PicoLisp can print cyclic structures without going into an infinite loop only for top-level cyclic lists (ie. there the last CDR points into this same list)
<freemint> i am talking about generalized cyclic list where the cdr could also point in to a parrent or child list.
<freemint> i am aware
<Regenaxer> yes, I know
<Regenaxer> Would need a special 'print' function, marking the list
<freemint> (prog (loop (bla) (if (bue) (duh) (goto "A")) (dre)) (mak) (label "A") (bil)) is the same cyclic structure as
<freemint> (prog (loop (bla) (if (bue) (duh) (label "A") (bil)) (dre)) (mak) (goto "A"))
<freemint> (and both will never terminate if (dre) does not return T. )
<razzy> imho the best way would be generating flowchart
<freemint> in the long run, yes
<razzy> in graphics
<freemint> Regenaxer, do you get my point that there is no obvious way to print a "code-graph" ?
<Regenaxer> yes
<razzy> you let the code run until it start to overlap
<razzy> and you get et least "pivot" points
<freemint> it is not that simple
<razzy> and the rest you need to figure out where they are converging/iterating
<razzy> complete mess :]
<freemint> not is very simple and beautilfull.
<freemint> The "uglyness" you see is just that we try to squish the code down to a linear form when in reality the code is properly represented as something more dimensional since it folds onto itself
<freemint> imagine what mess a möbius strip would be in 2d.
<freemint> or a donut
<freemint> razzy for well behaved jumps cdr and recurse might do it as well
<razzy> graph view could be more simple from more lvls up type view. if you have so much computing power to manage, you mostly care only where the parts are iterating. and you only picture functions that are reused and persistent in memory.
<freemint> i do not understand
<razzy> freemint: hard-to-reverseengineer without typical performance costs have its value on its own
<freemint> it is not hard to reverse engineer!
<razzy> harder-to-reverse-engineer
<freemint> In fact if i would make an educational lisp based programming language to teach the essence of programming i would use generalized cyclic code instead for and other types of loops.
<razzy> cool
<freemint> such code is easier you do not need to be aware what for means
<freemint> and in picolisp for means a lot.
<freemint> by the way regenaxer i love that you did include loop and for. otherwise your code would be completely unreadable
<Regenaxer> So now it is *mostly* unreadable?
<Regenaxer> my code, I mean
<freemint> the interesting bits yes
<razzy> for me as a newbie, it is mostly unreadable. :] no offence
<Regenaxer> yes, no problem
<freemint> there are several things contributing to that.
<razzy> i kind of prefer readable, if little stretch code. for people who like tight code, code is collapseable in org-mode.
<razzy> i am kind of overfed with convoluted puzzle code. i could use more dumbed down relaxing version.
<freemint> well then take break
<razzy> sure :] taking elisp for a ride
<razzy> or trying to
<freemint> i think picolisp is the answer to the questions: "What if Regenaxer had to code golf web application which he needs to maintain in the future?"
<Regenaxer> golf?
<freemint> "code golf" - an challenge where you attempt to write a program which does something in the shortest way. generally counted in letters
<Regenaxer> ok
<Regenaxer> Then all my code is golf
<Regenaxer> I don't rest usually until I'm sure it is the shortest version
<Regenaxer> also for everyday code
<freemint> i've tried to code golf in picolisp. but picolisp got some attributes which make it less competetive
<Regenaxer> if counting in letters, yes.
<Regenaxer> J is better then, or APL
<Regenaxer> I count cells in any case
<freemint> verbose names, variadic functinos (and there by paranthesis), not using weird symbols. Lack of built-in numeric functions. (like prime test, exp)
<freemint> if you would want to get into code golfing. i would recommend the forum for that in stack exchange
<Regenaxer> No interest
<freemint> in case i ever want to write a biographie of you, i got an title: "The man who code-golfed web apps"
<freemint> (preliminary title)
<freemint> i am very glad that you do not gpt that far to write cyclic code
<freemint> Regenaxer, when i ask people about you behind closed doors the answers is always: "Yeah definitly a demigod, what now that i think about it a two thirds god". ;)
<Regenaxer> Funny
<freemint> are do built in symbols in picolisp always resolve to the same number in the same version or does that depend on how you compiled it too?
<Regenaxer> Only in Ersatz (and emu?) it gives a normal number, and always the same. On others it is a function pointer which is defined at startup time (OS loader)
<Regenaxer> (no, not in emu. Only Ersatz)
<freemint> ok i had the same number in row thats why i asked (64 bit x86)
<Regenaxer> yes, if started in the same machine with same libs etc it does not change
<freemint> oh ok
<freemint> i thought that i might could get less bytes with numbers instead of names and rd/pr
<freemint> but that won't work then
<freemint> hat won't work then
<freemint> afk
freemint has quit [Ping timeout: 252 seconds]
<razzy> Regenaxer: so funny :], you build picolisp from scratch, which makes you at least picolisp god :]
freemint has joined #picolisp
<Regenaxer> No big thing
<razzy> when you start closing up on god-like creatures, you start noticing differences
razzy has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 252 seconds]
orivej has joined #picolisp
razzy has joined #picolisp
alexshendi has joined #picolisp
<freemint> Regenaxer, do you have thoughts on TCL(/TK)?
<Regenaxer> Not really. I saw code, eg. in Rosetta, and it is not really the style I like
<freemint> It is way more complicated than picolisp, but it is used as scripting language in some interesting software and provides a native crossplatform gui and is known to have many bindings to other languages. If i were forced to implement a native gui in picolisp this would be my approach.
<Regenaxer> yes, makes sense
<freemint> I recently talked to guest professor on my university which develops "really complex system" simulation software. Normally a license cost 20.000€ a year but out university got a license server we stundents can use.
<freemint> This software is scriptable in tcl
<freemint> the software is used in the aviation industry.
<freemint> and NASA, and US Army and ...
groovy2shoes has quit [Ping timeout: 250 seconds]
<razzy> imho there is not better komplex simulation SW than lisp. CAD is good example
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
groovy2shoes has joined #picolisp
<Regenaxer> Agreed
ubLIX has joined #picolisp
<razzy> tcl is a lot like lisp
<razzy> from wiki page
<razzy> contractors and goverment agencies often need to have "special" everything to justify high costs
freemint has quit [Ping timeout: 252 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
freemint has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
_whitelogger has joined #picolisp
ubLIX has quit [Quit: ubLIX]
ubLIX has joined #picolisp
freeemint has joined #picolisp
freemint has quit [Quit: Leaving]
freeemint has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
freemint has joined #picolisp
Mayoi has joined #picolisp
Mayoi has quit [Quit: Ouch! Got SIGIRL, dying...]
Mayoi has joined #picolisp
Mayoi is now known as erkin
ubLIX has quit [Ping timeout: 252 seconds]
ubLIX has joined #picolisp
ubLIX has quit [Quit: ubLIX]
_whitelogger has joined #picolisp