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
rob_w has joined #picolisp
stux has quit [Server closed connection]
stux has joined #picolisp
aw- has quit [Server closed connection]
aw- has joined #picolisp
fuxoft has joined #picolisp
<fuxoft> Hello there.
<abu[7]> Hi fuxoft
<fuxoft> When I enter the following in REPL, it freezes because of cyclical reference, I think I understand that: (set 'X 'Y 'Y 'X) (X)
<abu[7]> T
<fuxoft> But why doesn't this one freeze in the same way? (set 'X 'X) (X)
<abu[7]> The interpreter checks that to a certain level
<abu[7]> To get cases like (T ...) or (NIL ...)
<abu[7]> A full check would be expensive
<fuxoft> OK, makes sense. I thought I was missing something basic.
<abu[7]> :)
<fuxoft> I thought there was a PicoLisp function to seek back while reading the opened file but now I am unable to find it in the docs...?
<abu[7]> There is indeed none
<fuxoft> OK, that was a hallucination then... :)
<abu[7]> Yeah :) It would be difficult due to the buffering, and would also need a function to obtain the position first
<abu[7]> The DB *does* seeking of course
<fuxoft> I've not even started looking at DB, I need to better understand the basics first...
<abu[7]> There is (rewind), but this is for outbut files
<abu[7]> *output
<fuxoft> Yeah, I found that.
<fuxoft> As a mini-project to learn PicoLisp, I want to create a library for Parsing Expression Grammar of text files.
<fuxoft> So I guess when I need to "rewind back", I will just keep cached what I've already read from the file and "seek back" inside that.
<abu[7]> Yes, (in F (make (while (read) (link @]
<abu[7]> Or (line) etc.
<fuxoft> Great
fuxoft has quit [Quit: Client closed]
pablo_escoberg has quit [Ping timeout: 250 seconds]
fuxoft has joined #picolisp
<fuxoft> Is there an "usual" way to call function with lots of (optional) named arguments? Something like this? (parseFile "file.txt" ('format , "XYZ") ('mode . "rw") ('maxSize 99999) (errFd . 666) (outputFormat . 'list))
<abu[7]> There is no standard. An assoc list is good, but I think it is more convenient and efficient to pass the list as a single argument
<abu[7]> Via varargs you end up with consing all the time
<abu[7]> Then it is better to do (foo 'a 1 'c 333 ...)
<abu[7]> BTW, no quote like ('format ...
<fuxoft> Oh yes, because it will be defined as (de foo Args ..., not (de foo (X Y Z) ...
<abu[7]> then (foo a 1 c 33) ?
<beneroth> hi fuxoft
<abu[7]> or do you mean (de foo @ .. ?
<beneroth> passing arguments: when the arguments are anyway local variables in the caller context, you could also not pass them and use them via the dynamic binding of picolisp (when a variable does not exit locally, it is looked for the in the next higher context)
<beneroth> such functions are usually prefixed with underscore _ in picolisp
<abu[7]> T
<beneroth> so you can see from the name that it makes additional assumptions about its environment
<abu[7]> Else eg. (de foo @ (while (next) (casq @ (a (x (next))) (b (y (next))) ...
<beneroth> I often use that when doing complex parsing, using dynamic binding instead of handing around many parameters, it results in more readable code and should also be faster because all the extra scoping/binding isn't done.
<abu[7]> Anyway, I never found named args useful
<abu[7]> beneroth, yes, me too
<fuxoft> Maybe they are not useful in PicoLisp, I yet have to get into the right "mindset"....
<beneroth> abu[7], I think they can be useful when a function takes many arguments and the arguments are not obvious from the type.
<abu[7]> I meant, I never needed them
<beneroth> but then again, maybe a function should not have too many parameters anyway, else make it a full FEXPR
<abu[7]> If needed, I would go with the above "(while (next) (casq .."
<beneroth> yeah
<abu[7]> Double interpretation ;)
<fuxoft> The difference between (case) and (casq) is what exactly?
<abu[7]> casq user pointer equality '=='
<fuxoft> With case, 'b equals "b", with casq it does not?
<abu[7]> No
<abu[7]> Ah
<abu[7]> ye
<abu[7]> s
<abu[7]> I
<abu[7]> case does a full compare oft the names
<abu[7]> Why exactly do you need such a function call? Instead of 10 cases you could simply write 10 functions with the names of the keys
fuxoft has quit [Quit: Client closed]
rob_w has quit [Remote host closed the connection]
geri has joined #picolisp
<geri> hey, I've been notified that apparently first versions of picolisp used forth-like syntax and it's written that it was "more flexible and expressive"
<geri> how does that work? :D
<abu[7]> Not first versipns, It was a separate language called "Lifo"
<geri> > In some previous versions, a Forth-like syntax was also implemented on top of a similar virtual machine (Lifo).
<abu[7]> [1 2 3] mapcar inc .
<geri> guess its rather ambigious
<geri> it was stack based?
<abu[7]> T
<geri> it's same as (mapcar inc (1 2 3)) right?
<abu[7]> yes
<geri> okay
<geri> and how is it more flexibple and/or expressive?
<abu[7]> Lists and numbers push themselves
<abu[7]> syms execut
<abu[7]> Long story ;)
<geri> im curious :<
payphone has quit [Server closed connection]
payphone has joined #picolisp
<abu[7]> More than 25 years ago
<geri> a long while for sure
<abu[7]> Example http://pb1n.de/?cee3a2
<geri> looks scary :D
<abu[7]> I used it for a few projects, but then found dealing with the stack all the time too tedious, and went back to Lisp syntax
<geri> ah, so it was "a phase"
<abu[7]> Yeah, a few years
<geri> were there any upsides to going stack-based?
<abu[7]> The machine is simpler and faster
<abu[7]> No var binding
<geri> aw
<geri> i thought itd be closer to hardware
<abu[7]> Real Forth is so
<abu[7]> But this is Lisp with Forth semantics
<abu[7]> and syntax
<geri> ah okay
<geri> (sounds like an abomination)
<abu[7]> It is kind of beautiful in its pureness
<beneroth> geri, we reserve abomination for bloated clusterfucks
<abu[7]> Like Forth too
<beneroth> I prefer lisp syntax :)
<abu[7]> It is easier to track
<abu[7]> Lisp
<beneroth> yeah
<beneroth> a disadvantage: also easier to build abominations :)
<geri> xd
<abu[7]> T
<geri> i remember someone saying forth has very little syntax...
<geri> doesn't look very much like it, but lisp has ' and ` and , etc usually too, not just lists and symbols
<abu[7]> Both have only a minimal syntax
<geri> and are the first 2 high level programming languages ever created, coincidence? :D
<abu[7]> The other one is Fortran, not Forth
<abu[7]> Forth came in the early 70s iirc
<geri> wait, isn't forth just shortened from "fortran" ~w~
<abu[7]> Not at all
<geri> very confusing
<beneroth> Forth and Fortran are not related
<geri> they sound so similar tho ;-;
<beneroth> Fortran is the oldest programming language still in use - and it will not go away because many mechanical and physics libraries are written in it. And you don't rewrite them easily.
<beneroth> second oldest still in use would then be the lisp family, in a way
<abu[7]> "Fortran" means "formula translator", while "Forth" should be "fourth generation language", but that machine Chuck Moore used could handle only 5 chart iirc
<abu[7]> *chars
<beneroth> ah! hahaha xD
<abu[7]> Chuck was inspired by Lisp (repl I think), but it is a very different beast
<beneroth> I think his main thing was to run Forth on his own chip designs, no?
fuxoft has joined #picolisp
<abu[7]> You can have a full Forth system with interpreter, compiler, editor, debugger and multitasker in 2 (!) KiB !!
<abu[7]> Forth hardware came later, yes
<geri> why have both an interpreter and a compiler?
<abu[7]> Lisp has too
<abu[7]> (nonPil)
<beneroth> geri, for debugging and faster development
<abu[7]> The interpreter is the repl
<abu[7]> : foo 3 + ;
<abu[7]> This compiles 'foo'
<geri> afaik both sbcl and chez scheme are compiled only
<abu[7]> a "word" which adds 3
<beneroth> haha, Chuck made some great quotes
<beneroth> "I like the observation that Forth is an amplifier: a good programmer can write a great program; a bad programmer a terrible one. I feel no need to cater to bad programmers."
<beneroth> "It was a very academic environment. That became frustrating because there was no pressure for results. I thought commercial applications would be more rewarding. But since then I’ve met too many people who want to make a career out of a project instead of completing it. That’s life."
<beneroth> both very true :D
<abu[7]> 👍
<beneroth> geri, nah they can run in interpreter mode too, afaik
<abu[7]> yep
<geri> chez compiles in real time in "interpreter mode"
<geri> afaik
<beneroth> I think that is the worst of both worlds :)
<abu[7]> yeah
<geri> nah repl is pretty quick
pablo_escoberg has joined #picolisp
<beneroth> hi pablo_escoberg o/
<pablo_escoberg> hey beneroth et al :)
<abu[7]> Hi pablo_escoberg
<pablo_escoberg> howdy
fuxoft has quit [Quit: Client closed]
<geri> how much slower is compilation than interpretation if you dont do any optimizations?
<geri> ig compile + run
<geri> vs interpret once
<abu[7]> I have no such experiences
<beneroth> geri, very much depends on the use case and actual software
<beneroth> compilation requires certain things in a programming language, if the compilation should be somewhat optimal
<beneroth> and some functionality is impossible to compile and can only be done in an interpreter
* geri looks at eval
<beneroth> look at FEXPRs
<beneroth> functions which decide themselves if/when/how to eval their arguments - so basically an interpreter in itself
<beneroth> compilation is the reason most lisps removed FEXPRs and make use of macros instead
<geri> yeah, i remember
<beneroth> compilation asks for typing of variables to optimally allocate memory
<beneroth> (pil does not type variables, variables in pil are always symbols, pil does type values)
<beneroth> in some way you always end up with interpretation, as the CPU is arguably an interpreter for machine code :)
<geri> yee
<geri> but one's in hardware, another one's in software
<beneroth> software is hardware configuration
<beneroth> (and hardware is physics configuration?)
<geri> xdd
<beneroth> wanan go more mindfucked?
<geri> sure
<beneroth> technically you and me are software simulations implemented on monkey hardware
<geri> :D
<geri> we're physics
<beneroth> I believe we're not. well depends what you refer to with 'we'.
<geri> okay, physics configuration*
<beneroth> I don't think I'm my body, I'm a mind, a personality, which happens to control over it.
<abu[7]> But the mind is just recored info in the wetware
<beneroth> yeah, software.
<geri> second time hearing word "wetware"
<geri> both this week and ever
<abu[7]> Conciousness is just a recursive memory
<beneroth> T
<beneroth> or worse
<beneroth> well no, you are right
<beneroth> conciousness is the illusion based on remembering being conciousness
<beneroth> xD
<abu[7]> Exact
<beneroth> some people have quite other views. ok for them.
<abu[7]> T
<beneroth> but this model explains a lot of stuff other ideas cannot explain at all.
<abu[7]> I think so too
<geri> like what beneroth
<abu[7]> but we have very many illusions
<beneroth> e.g. disassociation personal disorder (a thing some people have after trauma), in this model it is actually switching from one personality/mind to another
<beneroth> basically evolution discovered control systems. at start simple ones like our thermostats (= kybernetics), when a certain measurements crosses a threshold, do action, until measurements becomes closer to preferred range
<beneroth> e.g. single-celled water animals wiggling around until they end up in a more nutritious water stream
<beneroth> then next those cells started eating each other -> useful to have a control system which can model the environment and other agents in it
<beneroth> rinse and repeat
<beneroth> so in that sense we're physical primate bodies, which have a brain to model agents, simulating how it would be to have a personality because that would be useful. and simulating models of other agents, opponents and friends which allows social constructs.
<beneroth> 'I' am the simulation in this brain which was granted access to some of the controls of this body. My brain runs also simulations of you geri, abu[7] and others.
<geri> cells are biological robots :)
<beneroth> because our symbol indexing (ontologies, what means what etc.) are similar enough we can communicate :)
<geri> i dont get the simulation part
<beneroth> living cells are turing computers
<beneroth> they can implement arbitrary computing.
<beneroth> you can use the term "software model" instead of simulation
<geri> thats probably more accurate
<beneroth> so if you and I (our minds) are agents (agent software models) implemented on a stratum of many smaller simpler computers (neurons et al)...
<geri> random question - does ed store the whole text file in memory
<beneroth> then social constructs like communities, nation states, religions etc. are agents implemented on top of multiple human minds.
<beneroth> geri, ed: I think so, not sure
<beneroth> vip does
<geri> no wonder i like programming, im literally made out of it
<abu[7]> ed perhaps not, as memory was small back then
<abu[7]> Editors on CP/M did not
<abu[7]> wordstar and wordmaster
<geri> also i remember someone saying hackers gotta know ed in case system is too weak to run vi
<abu[7]> Or use 'sed' ;)
<geri> fake ed!
<geri> ed is nice for editing in scripts, like sed
<geri> ex is okay too
<beneroth> emacs is a nice lisp OS :P
<geri> it do be lovely
* geri is an emacs enjoyer
* beneroth uses and loves paredit
<geri> )
<geri> although writing your own language and writing an editor in that is way more metal
<abu[7]> Emacs is a good environment, but it lacks an editor
<geri> it has evil mode, ie full vim emulation
<geri> :)
<abu[7]> T
<abu[7]> I used
<geri> hell yeah
<beneroth> :)
<geri> only thing more customizable than emacs is writing your own editor from scratch
<geri> btw i realized from some articles today that you can use ` as a generic read macro
<abu[7]> When computers still had a few hundred kilobytes of RAM, I heard of Emacs as "Eight megabyte and constantly swapping"
<geri> like, its useless but you can "implement" a quote reader with `(quote things)
<geri> yeah its hilarious abu[7]
<abu[7]> ;)
<geri> now it uses less memory for 100 buffers than chrome for one tab...
<geri> s/chrome/chromium/
<abu[7]> even Vim probably
<geri> huh
<abu[7]> (not sure)
<geri> probably depends on config
<geri> my emacs starts up in half a second
<geri> but yeah, you can write read macros in cl, right?
<geri> you can do p much the same thing with backtick + function
<geri> itll look different but same effect
<geri> disgusting
<beneroth> disgusting is doing your own computing! do it on googles computers! now!
<geri> 🔫
<beneroth> and stop using programming languages which give control to programmers!
<geri> lishhp
<beneroth> programmers are weird, often very individualistic!
<beneroth> not good to control
<geri> is it really often?
<beneroth> well okay, here breaks the satire. Google managed very well to herd programmers.
<beneroth> geri, often: well, programmer is used quite inflationary now.
<geri> what's getting inflated?
<geri> 😳
<beneroth> xD
<beneroth> the title of 'programmer'
<geri> like its more than it actually is?
<geri> s/its/it is treated like/
<beneroth> like people are called programmer (or call themselves programmers) when they can't even fizzbuzz
<geri> i did fizzbuzz when i didnt consider myself a programmer
<beneroth> being able to use ChatGPT to create a bug-ridden PHP script based on wrong answers in stack overflow is programming, no?
<geri> i wrote a (bad) lisp, 3 parsers, like 5 cli games and i still dont feel like a programmer
<geri> lol
<geri> also 3 api's and a frontend from scratch
<geri> also my job title is officially a "computer programmer"
<geri> still dont feel like one xd
<beneroth> job titles are BS
<geri> yeah, im actually devops
<geri> B)
<beneroth> so a programmer who took over admin tasks because corp didn't want to pay for an admin?
<pablo_escoberg> wow, that title didn't even exist when I was in the corp workforce.
<geri> nah im a linux nerd originally
<beneroth> pablo_escoberg, inventing new job titles is easier profitable than creating real stuff :)
<geri> so an admin who's learned programming starting with bash
<beneroth> ah, one of these damn 'nerds' :) <3
<geri> less than three indeed!
<beneroth> I started out as programmer and learned admining to get stuff done.
<geri> stuff's literally more fun than video games more than 50% of the time
<beneroth> I cannot understand how some people are happy being admins without programming skills.
<geri> yeah, so much stuff not automated
<beneroth> completely dependent on the crap programs and configuration hell they're given by so-called programmers
<beneroth> geri, well video games got worse :P
<pablo_escoberg> not sure how things are now, but it was very common ~20 years ago
<geri> not automating? pablo_escoberg
<pablo_escoberg> it was assumed that a systems administrator cannot even code a simple shell script
<pablo_escoberg> so automation was left to "systems programmers"
<geri> beneroth: indie games are fire, but hacking emacs is often more exciting for some reason
<geri> pablo_escoberg: and now everyone expects full stack devops
<geri> (like me B)
<geri> )
<pablo_escoberg> I imagine it's an improvement
<beneroth> and when they say "full stack" they mean SQL ORM (not real SQL) and the bullshit javascript framework flavour of the month, no?
<geri> well, it's jack of all trades master of none for a reason
<beneroth> I always saw myself as a generalist
<geri> angular + typescript for frontend, orms for databases in both backends but i had to actually connect to the db to insert data
<geri> and automate putting it in place
<geri> (test data)
<beneroth> specialization is for insects. the human special skills are sweating and generalized adaptability.
<geri> eh
<geri> you do lose efficiency by not specializing
<geri> but id rather increase general survivability
<beneroth> less dependency
<geri> all the coolest stuff is probably done by best of the best in one way, shape or form
<beneroth> too adapted to a nice you are dependent on the environment. like Koalas. or ActionScript/ColdFusion programmers who never learned something else.
<beneroth> The cobol niche is still highly profitable because hardly anyone wants to settle in such a harsh neglected environment.
<geri> i want a lisp job some day :<
<beneroth> geri, the secret is that even the big big companies in the end outsource the core of the core of their work to a few individuals who are generalists :P
<geri> languages are slowly converging towards it so i can do a lot with my lispy skills but its still not all
<beneroth> T
<geri> like python has closures and first class functions/hofs, so i can do a bunch of cool functional stuff
<geri> not the prettiest, but its nicer than [C]
<beneroth> python is the new java
<geri> hello world in python isn't 30 something loc
<beneroth> a better one, granted
<geri> so no
<geri> okay thats more like it
<geri> and what's javascript then
<beneroth> geri, fun story for you: https://news.ycombinator.com/item?id=23039197
<beneroth> geri, javascript is a weekend tragedy
<pablo_escoberg> or perhaps javascript is what happens when the entire world uses the output of an otherwise pretty neat weekend project.
<beneroth> nah, could have just used lisp instead
<beneroth> javascript is an abomination
<beneroth> or better: don't put turing complete language in a browser!
<beneroth> evaluating untrusted source is just plain dumb
<pablo_escoberg> Well, there are many issues, but basically it works most of the time.  The alternative is a LOT less functionality
<pablo_escoberg> Not even sure we'd be better off with a real lisp.  The problem is more the programmers than the language.
<beneroth> suddenly one of the very few people wo know both CPU design and javascript figure out side-channel attacks and BUMM every website you visit gets your SSH key and admin password if you keep the page open for longer than N seconds.
<pablo_escoberg> hasn't happened yet, AFAIK...
<beneroth> it has xD
<pablo_escoberg> damn...  missed it! :)
<beneroth> the 'fix' was removing timing functionality from javascript
<geri> js is fakelisp
<pablo_escoberg> when was this??
<pablo_escoberg> fake scheme, to be pedantic :)
<geri> nah, inaccurate
<geri> picolisp is also single namespace, but is not scheme
<beneroth> 2017
<beneroth> meltdown and spectre
<geri> same with clojure and some others
<pablo_escoberg> beneroth ok, I missed those.  I was in prison at the time.  Must have been interesting :)
<beneroth> and 2015, rowhammer also worked in JS
<geri> damn, for being a drug lord? pablo_escoberg
<pablo_escoberg> Yup.  5 years hard time.
<geri> :(
<pablo_escoberg> yeah, it sucked.
<pablo_escoberg> Sucked so bad I was stuck coding in VB :D
<pablo_escoberg> VBA even :)
<geri> but yeah, arbitrary code execution in a browser is horrible
<beneroth> did you at least do some real bigtime crime or was it just a half-smoked joint?
<geri> and people do abuse it
<geri> pablo_escoberg: you were able to code anything? :o
<beneroth> geri, yeah js shouldn't have been turing complete
<pablo_escoberg> beneroth details here:  https://www.wikiwand.com/en/The_Farmer%27s_Market
<pablo_escoberg> and yes, I managed to get my hands on an old PC (contraband of course) and code up a scheduling system for the adult education program.
<beneroth> a right, I forgot xD
<beneroth> my privacy settings work pretty well
<pablo_escoberg> sadly, the computer was discovered and confiscated after a year
<geri> :(((
<geri> gotta code on paper
<pablo_escoberg> yeah, but it doen't run very fast :)
<geri> of course
<beneroth> I also coded on paper when I first started :)
<geri> sounds like school informatics class
<beneroth> nah I always learned more on my own than ever in school. I made a programmer education. We had C in school (without pointers) and java (most students had most issues with NullPointerException error)...
<beneroth> only a few of the cohort could really program when we finished. but most got a certificate.
<pablo_escoberg> LOL, these certificates are basically participation trophies these days
<geri> i dont have formal education either
<beneroth> which certificates aren't?
<geri> still making laps around most people with ed at my work xd
<geri> linux is power
<pablo_escoberg> not sure about now, but back in the day, you REALLY had to know your shit to get a Cisco cert
<beneroth> geri you now telnet? you know how to test a TCP connection with telnet? congrats you are better then most networking 'experts'.
<beneroth> pablo_escoberg, well why use cisco? right, because the alternatives are backdoored too.
<geri> i know that telnet is pretty much just unencrypted ssh, nver used it tho
<beneroth> for a while every 2 weeks there was a cisco fix for a "forgotten undocumented admin user" ...
<geri> oh wait, actually i think i used it once to test connection at work xd
<beneroth> telnet is raw TCP
<geri> isnt netcat that
<geri> i remember you can use it as a very bad IRC client
<geri> but its still amazing
<pablo_escoberg> beneroth not saying Cisco itself doesn't suck (it really, really does), but back in the day, if you were a CCIE, you knew what you were doing.
<beneroth> I heard the same
<beneroth> but..
<beneroth> I've come to learn the last 2 years that the internet is practically run by 3 kinds of people: 1) few bigcorps (the Tier 1 carriers), 2) then mostly small -medium companies constantly on the brink of bankruptcy overlapping with interested hobbyists and mentally-ill wannabes 3) a few capable people who actually know the full stacks. 1) often outsource to 3).
<beneroth> it's more luck than design/skill that stuff doesn't break more often
<beneroth> then again the Internet (not the web) was designed by geniuses and made to handle constant breakings
<beneroth> it's madness that our modern civilization is based on that.
<pablo_escoberg> It sure feels that way.  But our luck has lasted longer than seems plausible.  I suspect your 3rd group is doing a lot more heavy lifting than they're generally given credit for.
<beneroth> T
<geri> poor guys
<beneroth> generally they get paid well afaik.
<beneroth> much better then the poor few guys keeping OpenSSH et al running. See also the xz drama recently.
<beneroth> T
<beneroth> not a joke, it's the literal truth
<pablo_escoberg> I thought of the exact same comic.
<pablo_escoberg> lots of truth in xkcd
<beneroth> men of culture!
<beneroth> or minds/dogs/whatever
<beneroth> pablo_escoberg, T
<beneroth> xkcd is brilliant
<geri> im not a furry...
<beneroth> how can I tell? on the internet nobody knows if you are a dog!
<geri> tap-tap-tapping with your paws
<geri> imagine a dog typing away at a split keyboard
<beneroth> abu[7] new keyboard can surely be used for that :)
<abu[7]> ;)
<geri> test it on your cat!
<geri> aight i gotta finish my cards and commit head pillow
<geri> laters
<abu[7]> cu :)
<abu[7]> New trouble with LLvm optimizer :(
geri has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.3)]
<abu[7]> Obviously moved a check for signals out of a loop
<beneroth> :(
<abu[7]> I wondered why fuxoft's case
<abu[7]> (setq X 'Y Y 'X) (X)
<abu[7]> could not be interrupted by ^C
<abu[7]> The check is moved outside the tight loop which dereferences the symbols!
<beneroth> oh!
<beneroth> and that is done by the LLVM optimizer?
<abu[7]> T
<beneroth> T, in pil61 ^C interrupts and gives error handling repl
<beneroth> *pil64
<abu[7]> Exactly
<abu[7]> The low level signal handlen increments a memory location
fuxoft has joined #picolisp
<abu[7]> So it might chance even in a tight loop
<abu[7]> The optimizer does not know
<abu[7]> thinks the check can be moved out of (before) the loop
<abu[7]> s/chance/change
<fuxoft> Hi abu, regarding your question from 12:18:
<fuxoft> I am probably still not in the right PicoLisp mindset, but let's say I call my function that runs something complex, e.g. a webserver.
<fuxoft> Webserver usually requires a long config file but I'd prefer for all parameters to be supplied directly by calling the (webserver) function. Lots of them are optional, some are simple, some are complex lists or functions.
<abu[7]> Hi fuxoft! Seems we have different time zones
<fuxoft> I am in Prague, Czech Republic
<abu[7]> ok, hmm
<abu[7]> could not find 12:18:
<abu[7]> ah
<fuxoft> Sorry my mistake. The log has wrong time zone :)
<abu[7]> UTC probably
<abu[7]> Your other questior caused me to search all this afternoon ;)
<abu[7]> Just now found the reason
<abu[7]> LLVM optimizer
<fuxoft> The one about 'X and 'Y? I've read the chat log.
<abu[7]> T
<abu[7]> I tried and wondered why it cant be interrupted
<abu[7]> like in older Pils
<abu[7]> Not sure what to do, perhapt something with volatile
<beneroth> is there not some way to mark the loop for LLVM to tell it that it must not optimize it?
<fuxoft> Is it a real world problem that it happens?
<abu[7]> beneroth: probably
<abu[7]> fuxoft: Not sure where else it breaks
<beneroth> fuxoft, not really, but in older picolisp editions you could interrupt a infinite reader loop with Ctrl + C
<fuxoft> As you can probably guess, I can offer zero help with this :)
<beneroth> that this isn't possible on current pil21 is a bug we weren't aware of
<beneroth> there might be other loops in picolisp which get optimized by LLVM when it must not be changed...
<abu[7]> I dig into llvm's 'volatile' keyword
<abu[7]> T
<beneroth> thanks abu[7]
<abu[7]> I must extend @src/lib/llvm.l to output the 'volatile' keyword
fuxoft has quit [Ping timeout: 250 seconds]
fuxoft has joined #picolisp
<fuxoft> I posted this before, it seems it disappeared (it's not in the log):
<fuxoft> So back to my last question: What is the "systemic" way to call this webserver fun of mine? I am not sure how you meant "Instead of 10 cases you could simply write 10 functions with the names of the keys"
<abu[7]> Instead of (foo 'a 1 'b 2) you might call (a 1) and (b 2)
skyjuice has joined #picolisp
<skyjuice> HE
<skyjuice> *Hello All
<abu[7]> Hi skyjuice
<skyjuice> Hi abu
pablo_escoberg has quit [Quit: Client closed]
<fuxoft> And those functions would set the values of relevant symbols which would then be accessed from the main (webserver) function which I'd call in the end and which would also reset the values of those symbols to allow them being called again in the future?
<abu[7]> Works!!
<abu[7]> Perhaps, but this is not a general, "systemic" way
<abu[7]> It depends a lot on the situation
<abu[7]> beneroth: Workt now, I introduced a 'volatile' functip
abu[7] has left #picolisp [#picolisp]
abu[7] has joined #picolisp
<abu[7]> brb
abu[7] has left #picolisp [#picolisp]
<skyjuice> re: picolisp webdev, when a change is made in the source does the server need to be restarted for the changes to occur place in the page?
abu[7] has joined #picolisp
<skyjuice> *to occur in the page
<abu[7]> Some files are loaded at startup
<abu[7]> libs and er.l
<abu[7]> The rest is usually loaded upon each click
<abu[7]> And also the libs you can 'load' in the repl
<abu[7]> Only "er.l" I never reload
<abu[7]> Instead ^D^C and restart the server
<skyjuice> by "click" are you referring to a browser refresh?
<abu[7]> Yes
<skyjuice> Got
<skyjuice> it
<skyjuice> With the following setup after editing the css classes, saving the file and refreshing the browser
<skyjuice> the changes are not updated in the page.
<skyjuice> (load "@lib/http.l" "@lib/xhtml.l")
<skyjuice> (setq *Css "tachyons.min.css")
<abu[7]> Ah, if CSS changed, you need to Shift-Reload the browser
<skyjuice> (de home ()
<skyjuice>     (html 0 "test" *Css NIL
<skyjuice>       (<h1> "bg-green ma4 pa5 white" "hello" ) ) )
<skyjuice>     (de go ()
<skyjuice>     (server 8080 "!home"))
<abu[7]> The browser caches CSS for 24 h
<skyjuice> ah great, good to know, I'll give that a try
<skyjuice> thx
skyjuice has quit [Ping timeout: 250 seconds]
inara has quit [Quit: Leaving]
<beneroth> abu[7], congrats!
<abu[7]> ☺
<beneroth> that was fast
<beneroth> I'd estimated it would need more than zero walks ;-)
<beneroth> the volatile goes on the loop?
<abu[7]> In fact I found the reason for the strange behavior while walking
<beneroth> ha! :D
<abu[7]> It is a 'load' attribute
<abu[7]> I made a new function
<abu[7]> (val $Signal) became (volatile $Signal)
<abu[7]> is @src/dec.l where the inline fun 'simChk' is
<beneroth> small change. the work is in where to do make it.
<abu[7]> T
inara has joined #picolisp
pablo_escoberg has joined #picolisp
skyjuice has joined #picolisp
<skyjuice> shift reload doesn't work for me, ie page contents remain unchanged between css and html updates
<skyjuice> I've also tried  Shift+F5, and Ctrl+Shift+R without success
<skyjuice> on two different firefox based browsers
fuxoft has quit [Ping timeout: 250 seconds]
skyjuice has quit [Ping timeout: 250 seconds]
pablo_escoberg has quit [Quit: Client closed]
beneroth has quit [Ping timeout: 260 seconds]
beneroth has joined #picolisp
beneroth has quit [Read error: Connection reset by peer]
beneroth has joined #picolisp
theruran has quit [Server closed connection]
theruran has joined #picolisp