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
orivej has quit [Ping timeout: 252 seconds]
cobax has joined #picolisp
AngryBeaner8 has joined #picolisp
AngryBeaner8 has quit [Remote host closed the connection]
<cobax> the folks at #chicken were praising picolisp today
aw- has quit [Quit: Leaving.]
<cobax> ok, I'm new when it comes to programming with dynamic bindings. after reading through the Picolisp docs for a few days it seems there are no serious downsides to dynamic bindings. I remember reading a lot of FUD about it
Skainet has joined #picolisp
Skainet has quit [Remote host closed the connection]
Archwyrm15 has joined #picolisp
Archwyrm15 has quit [Remote host closed the connection]
buckley31023 has joined #picolisp
buckley31023 has quit [Remote host closed the connection]
erkin has joined #picolisp
<cobax> Is there more to read on the VM design besides the tutorial, the source, and this? http://software-lab.de/doc64/structures
gth740k has joined #picolisp
gth740k has quit [Killed (Unit193 (Spam is not permitted on freenode.))]
freemint has quit [Ping timeout: 252 seconds]
freemint has joined #picolisp
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
freemint has quit [Ping timeout: 260 seconds]
erkin has quit [Remote host closed the connection]
freemint has joined #picolisp
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #picolisp
alexshendi has quit [Ping timeout: 252 seconds]
rob_w has joined #picolisp
applejack20 has joined #picolisp
applejack20 has quit [Remote host closed the connection]
blahdeblah7 has joined #picolisp
aw- has joined #picolisp
blahdeblah7 has quit [Remote host closed the connection]
<aw-> cobax: indeed it's a lot of FUD for dynamic bindings. Learn how to code safely and you can avoid the "dangers" it presents
<Regenaxer> yeah. The two problems I'm aware of are https://software-lab.de/doc/faq.html#problems
<aw-> hi Regenaxer
<Regenaxer> Hi aw- :)
alexshendi has joined #picolisp
freemint has quit [Ping timeout: 272 seconds]
freemint has joined #picolisp
orivej has joined #picolisp
freemint has quit [Ping timeout: 260 seconds]
<Nistur> mornin'
rob_w has quit [Quit: Leaving]
freemint has joined #picolisp
<beneroth> Hi cobax, aw-, Regenaxer, Nistur ~(rest)
<Regenaxer> Hi beneroth + Nistur
<beneroth> cobax, I had not to learn any rules or habits to program safely with dynamic bindings, I think. It does not really require any consciousness effort.
<Nistur> o7
<beneroth> you don't have to pass big argument lists nor structs/objects (as parameter container), you can just relate to variables in higher levels, that is pretty handy (in picolisp those are called inline functions, prefixed with underscore _)
<beneroth> very handy when this mechanism can be used. actually in most cases not necessary.
<beneroth> the other thing it relates to is the implementation of FEXPRs (used for similar things as macros in other languages, but more powerful), very handy to implement a DSL (e.g. @lib/xhtm.l). this is a bit tricky but there a good examples to learn from.
alexshendi has quit [Read error: Connection reset by peer]
<freemint> good morning
<freemint> I got some questions how to 'match properly
<freemint> (match (1 @d 4 5) (1 4 4 5)) (fill (1 @d 4 5)) is (1 (4) 4 5) not (1 4 4 5)
friden29 has joined #picolisp
<freemint> is there away to scope the binding locally when you do not what patters are being matched against
friden29 has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 252 seconds]
<beneroth> freemint, let and use
<beneroth> wait, I have to read the question properly
Tornevall11 has joined #picolisp
Tornevall11 has quit [Remote host closed the connection]
<freemint> beneroth i get a "unknown" list with patterns and match against it. I want to know whether these is a way to "contain" pattern bindings locally without having to parse the list of patterns
pierpal has quit [Ping timeout: 272 seconds]
razzy has joined #picolisp
<beneroth> (match (1 @d 4 5) (1 4 4 5)) -> binds a list to @d
<beneroth> fill just replaces the symbol with its value, so (1 (4) 4 5) is correct
<beneroth> a @symbol within a pattern list in (match) binds one or multiple list elements to that @symbol. so its always a list
<beneroth> : (match '(@Domain ~(chop ".com")) (chop "picolisp.com"))
<beneroth> : @Domain
<beneroth> -> ("p" "i" "c" "o" "l" "i" "s" "p")
<beneroth> -> T
<beneroth> I don't understand your "contain" locally question.
<beneroth> usually one does (use @d (match ...)) or (let @d NIL (match ...))
<beneroth> then @d is a local variable
<beneroth> (and should therefore start with a capital letter)
orivej has joined #picolisp
<freemint> beneroth but i do not yet know whether the contains @d or @fizzlebiddlebuff
<beneroth> T
alexshendi has joined #picolisp
<freemint> Hi alexshendi
<beneroth> freemint, maybe just your (fill) is wrong? maybe you would like to do (make (link 1) (chain @d) (link 4 5))
<beneroth> warning: (chain) destroys @d (chain is destructive)
<beneroth> hi alexshendi :)
<alexshendi> Hi freemint! How are you?
<freemint> Fine i got a huge project but fine otherwise
<alexshendi> Hi beneroth. (and all others).
<freemint> beneroth does not really do it for me. I guess i just specify what patterns can be used
cherti7 has joined #picolisp
fl_015 has joined #picolisp
fl_015 has quit [Remote host closed the connection]
cherti7 has quit [Remote host closed the connection]
<Regenaxer> ret
<Regenaxer> freemint, you mean you do not know which pattern variables are in the pattern?
<Regenaxer> 'curry' handles this, for example, with (filter pat? "X")
<Regenaxer> Then you can use 'bind' on it (instead of 'use' or 'let' as suggested by beneroth)
<freemint> let me look at those functions
<Regenaxer> eg (let L (filter pat? ..) (bind L ... (match ...)
<freemint> ohhh
<freemint> damn picolisp is do dense
<Regenaxer> Perhaps 'fish' instead of 'filter' if the pattern is not a flat list
<Regenaxer> hehe
<Regenaxer> : (fish pat? '(a @B (c @D) x @E f))
<Regenaxer> -> (@B @D @E)
<freemint> mhh the list is flar
<freemint> there is still one thing that annoys me
<freemint> for (match '(@P) (5)) @P is (5) and not 5 as i would wish
<Regenaxer> I always returns lists
<freemint> 1. why? 2. is there an more elegant way than (car @P)
<Regenaxer> you can easily post-process
<freemint> ok
<beneroth> as explained, the symbols returned in a match are always lists
<Regenaxer> A pattern var always matches zero, one ore more elements
<freemint> mhh *knirsch* it s fine
<Regenaxer> you may want to check if it is indeed only 1
<Regenaxer> (unless (cdr @P) (car @P))
<Regenaxer> (and (cdr @P) (quit ...
<freemint> I can assume that. I got full control over the input at this stage
<Regenaxer> ok
<freemint> is there a 'default but for 'This
<Regenaxer> ?
<freemint> (dm T (do_stuff that might set x) "(unless (: x) (=:
<freemint> x 5 ]
<Regenaxer> I see
<Regenaxer> I think there is none
<freemint> I am really annoyed by =: i think it is the wrong way and should be :=
<Regenaxer> I would do (dm T (or (do_stuff) (=: x 5]
<freemint> not compatible with my do stuff
<Regenaxer> they all *end* with ':'
<Regenaxer> : (what "@:")
<Regenaxer> -> (: :: =: db: var:)
<freemint> "(X =: 5)" is just irritating. From mathematics i am used to "(X := 5)"
<freemint> but that is a good reason /heuristic
<Regenaxer> agreed, it is confusing
<Regenaxer> Perhaps because I never used Pascal or related langs
<Regenaxer> In math I don't remember to have seen it
<beneroth> freemint probably never used a prefix calculator from HP :)
<Regenaxer> :)
<beneroth> they're not much used anymore, except for older mechanical engineers etc.
<freemint> Regenaxer it is more common in America. The idea is to separate assignment and equality
<alexshendi> beneroth: are they prefix or postfix?
<Regenaxer> freemint, yes, but I grew up with C
<freemint> Regenaxer the write byte to memory will be really helpful
<freemint> This way i can write RAM for my virtual CPU (if i want to push my disassembler a little) with ease
<Regenaxer> Where do you need it?
<Regenaxer> ok
<beneroth> it was also used in the infamous 4gen languages, := for assignment and = for comparison. 4gen langs were when some believed we just have to use plain english words instead of special letters in our programming languages and then non-programmers (the guys with the business knowledge) are able to program. turned out wrong.
<freemint> Byte addressable is perfect for that
<alexshendi> beneroth : that pages says it's postfix.
* alexshendi has one of those.
<beneroth> "Polish notation, usually in postfix form," T
<beneroth> the one I saw in use where prefix, I'm pretty sure
<beneroth> s/where/was
<beneroth> my english module is failing
<Regenaxer> I still have a HP 29 C, but it does not run any more
<Regenaxer> RPN = reverse polish notation
<Regenaxer> postfix
<freemint> Regenaxer i kinda find the thought scary to implement a CPU in PicoLisp let's see if i can get that far
<freemint> Also: What would you say if Linux would boot on it?
<freemint> booting Linux in PicoLisp ;)
<Regenaxer> Wow, big task!
<freemint> (running PicoLisp?)
<aw-> freemint: i've implemented a CPU in PicoLisp, you can do it
<freemint> aw- can it run Linux?
<aw-> no
<aw-> it's 8bits
<aw-> lol
<freemint> Ok
<aw-> freemint: is this a school project? or personal?
<Regenaxer> afp
<beneroth> aw-, school afaik
<beneroth> aw-, apparently it is https://en.wikipedia.org/wiki/TRON_project
orivej has quit [Ping timeout: 252 seconds]
orivej_ has joined #picolisp
freemint has quit [Ping timeout: 260 seconds]
freemint has joined #picolisp
<aw-> yeah i saw
<aw-> fun school project
pierpal has joined #picolisp
freemint has quit [Ping timeout: 245 seconds]
freemint has joined #picolisp
<razzy> beneroth: is tron any significant?
<razzy> i mean, architecture- wise
<freemint> aw- personak
mwoodson5 has joined #picolisp
orivej_ has quit [Ping timeout: 240 seconds]
pierpal has quit [Ping timeout: 260 seconds]
mwoodson5 has quit [Remote host closed the connection]
<razzy> in your opinion?
Attoy20 has joined #picolisp
<freemint> it is significant to me and it's historic offshoots are relevant in Japanese embedded programming
Attoy20 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
orivej has joined #picolisp
<beneroth> what freemint said. I don't know anything abaout TRON.
<beneroth> apparently it was used a lot in electronic devices for some time.
freemint has quit [Ping timeout: 252 seconds]
freemint has joined #picolisp
pierpal has joined #picolisp
psyolus24 has joined #picolisp
vinzentm16 has joined #picolisp
pierpal has quit [Quit: Poof]
psyolus24 has quit [Killed (Unit193 (Spam is not permitted on freenode.))]
pierpal has joined #picolisp
vinzentm16 has quit [Remote host closed the connection]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #picolisp
freemint has quit [Remote host closed the connection]
freemint has joined #picolisp
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #picolisp
alexshendi has quit [Remote host closed the connection]
pierpal has quit [Ping timeout: 252 seconds]
violet21 has joined #picolisp
violet21 has quit [Remote host closed the connection]
Gronghon has joined #picolisp
Gronghon has quit [Ping timeout: 252 seconds]
grp has joined #picolisp
pierpal has joined #picolisp
orivej has quit [Ping timeout: 252 seconds]
<razzy> why not more?
orivej has joined #picolisp
freemint has quit [Ping timeout: 260 seconds]
<Regenaxer> Hi all JavaScript gurus
<Regenaxer> I found a bug in @lib/form.js and need help
<Regenaxer> I want to write
<Regenaxer> document.getElementsByName(fld.name).indexOf(fld)
<Regenaxer> but this gives an error
freemint has joined #picolisp
<Regenaxer> "indexOf is not a function"
freeemint has joined #picolisp
freemint has quit [Ping timeout: 272 seconds]
freeemint has quit [Ping timeout: 252 seconds]
<beneroth> "Basically indexOf() is a method belongs to string(array object also), But while calling the function you are passing a number, try to cast it to a string"
<beneroth> ah
<beneroth> it should be an array
<beneroth> hm
<beneroth> maybe its nil?
* beneroth is not a javascript guru
<Regenaxer> Sorry, found a solution
<beneroth> why sorry? :D
<Regenaxer> I simply iterate the list
<beneroth> good :)
<Regenaxer> sorry for disturbing ;)
<beneroth> you are not.
<Regenaxer> I found this bug now despite it is there all the time
<beneroth> good
<Regenaxer> occurs only if more than one form is on the page, and the second one has a checkbox at the same position as another field in the first form ;)
orivej has quit [Ping timeout: 240 seconds]
<beneroth> uh
<beneroth> name clash?
<Regenaxer> yeah
freemint has joined #picolisp
<Regenaxer> The component names are generated
<beneroth> maybe there is a way to improve the generator
<Regenaxer> I think not, cause the GUI operates on the global *Gui variable
<Regenaxer> so the names are "*Gui:1", "*Gui:2" etc in each form
<Regenaxer> Normally no problem, as JS does not use the names
freeemint has joined #picolisp
<Regenaxer> *only* in checkboxes
<Regenaxer> So now I simply do
<Regenaxer> for (var i = 1; i < lst.length; ++i) │···············
<Regenaxer> if (lst[i] == fld) │···············
<Regenaxer> lst[i - 1] = val;
<Regenaxer> instead of the (wrong) document.getElementsByName(fld.name)[0].value = val
<Regenaxer> ie the [0] is wrong
<Regenaxer> I have to find the field, and then take the one *before* that
<Regenaxer> Never mind, now it should work
freemint has quit [Ping timeout: 240 seconds]
tomato13 has joined #picolisp
<Regenaxer> Hmm, however, syntax error
<Regenaxer> semicolon missing?
<Regenaxer> ok, found
<Regenaxer> Already too late today ;)
tomato13 has quit [Remote host closed the connection]
<beneroth> js is mess.
<Regenaxer> indeed
freemint has joined #picolisp
freeemint has quit [Ping timeout: 252 seconds]
freemint has quit [Ping timeout: 245 seconds]
freemint has joined #picolisp
freeemint has joined #picolisp
freemint has quit [Ping timeout: 252 seconds]
freeemint has quit [Ping timeout: 240 seconds]
freeemint has joined #picolisp
freeemint_ has joined #picolisp
freeemint has quit [Ping timeout: 252 seconds]
freeemint_ has quit [Ping timeout: 245 seconds]
orivej has joined #picolisp
freemint has joined #picolisp
yogako20 has joined #picolisp
yogako20 has quit [Remote host closed the connection]
freeemint has joined #picolisp
freemint has quit [Ping timeout: 252 seconds]
freeemint has quit [Ping timeout: 252 seconds]
dwts12 has joined #picolisp
freemint has joined #picolisp
freeemint has joined #picolisp
dwts12 has quit [Ping timeout: 246 seconds]
freeemint_ has joined #picolisp
freemint has quit [Ping timeout: 260 seconds]
freeemint has quit [Ping timeout: 252 seconds]
freeemint_ has quit [Ping timeout: 252 seconds]
freemint has joined #picolisp
orivej has quit [Ping timeout: 260 seconds]
viaken has quit [Quit: reboot]
viaken has joined #picolisp
<cobax> beneroth: hi beneroth, and thank you, I had not run across "inline functions" prefixed with underscore yet, I'll look for them now.
<cobax> beneroth: I also think your characterization of 4gl is focused on just one detail and hence wrong because of its being too narrow.
<cobax> nothing beats 4gl when it comes to having an integrated environment for rapid application development, hence why 4gl companies are millionaire companies
<cobax> beneroth: I'm not sure I understand how someone like you who understands the mess that is web dev and is a picolisp programmer still believes those often repeated tales of 4gl failures.
<cobax> most mission-critical environments I can think of use 4gl successfully (circuit design, industrial robotics, hospital software, shipping container software)...
<cobax> And thinking non-programmers can code in simplified environments is an error that not just 4gl suffered in the past but technologies today suffer from as well
libertas has quit [Ping timeout: 240 seconds]
libertas has joined #picolisp
libertas has quit [Ping timeout: 260 seconds]
<beneroth> I worked many years with 4gl system Navision
<beneroth> with wrong I meant the hypothesis that it's more efficient to let non-programmers program
<beneroth> I totally agree with you that they are often very nice integrated systems.
<beneroth> sorry if I didn't explained my point better, thanks cobax :)
libertas has joined #picolisp
<cobax> beneroth: ah ok, I just wanted to make sure I was not missing anything... y'know, in case there is a better idea than 4gl :)
<beneroth> afaik 4gl is also a set of languages from a certain timespan, no?
<beneroth> I saw a presentation from Alan Kay (on video). I try to find it again... I can't recall the name of the system (CS work) he showed
<beneroth> interactive programming, mostly visual, but not the native visual programming à la UML etc
<beneroth> still searching, but ha this Alan Kay line is golden, especially in picolisp context
<beneroth> Alan Kay: "I'm not against types, but I don't know of any type systems that aren't a complete pain, so I still like dynamic typing."
Tene0 has joined #picolisp
<beneroth> ah agree, based on my personal experience.
<cobax> beneroth: I think 4gl definitely is a set of languages from a certain timespan, but also that that fact robs us of good terminology
<cobax> because if that is all 4gl is then now I don't have a term to describe integrated programming systems
<beneroth> wikipedia states
<beneroth> While the definition of 4GL has changed over time, it can be typified by operating more with large collections of information at once rather than focusing on just bits and bytes. Languages claimed to be 4GL may include support for database management, report generation, mathematical optimization, GUI development, or web development. Some researchers state that 4GLs are a subset of domain-specific languages.
<beneroth> so picolisp with pilDB and form.l falls into 4gl :)
<beneroth> I need to go
<beneroth> just write more, if you like
<beneroth> bbl
<beneroth> btw. c++, python, java, etc fall all unter 3gl
<beneroth> thats not disputed
krav_29 has joined #picolisp
<cobax> beneroth: I would agree with that. I would also agree with this excerpt from c2 wiki:
<cobax> "4GL began as a technical term but was emptied of all meaning by marketroids back in the 1980s, so it currently tends to be considered to be marketing fluff unless proven otherwise"
<cobax> beneroth: even all the web frameworks du jour fall under 3gl
<cobax> we agree there
<cobax> beneroth: I actually would call MUMPS 4gl and it's from 1966 well before that term came into existence
<cobax> I would also say dBase is 4gl and I don't usually see dBase in 4gl lists including the wikipedia list unless I missed it
Tene0 has quit [Ping timeout: 252 seconds]
<cobax> as a matter of fact I have discovered picolisp while looking for a 4gl solution to the web
krav_29 has quit [Ping timeout: 245 seconds]
<cobax> had I not found picolisp I would probably have settled for Seaside
<cobax> aw-: it is also interesting that other dynamic lisps seem to have found different solutions for the so-called "dangers" of dynamic binding < sis mom
<cobax> sorry, mistyped, please ignore
pyvpx24 has joined #picolisp
orivej has joined #picolisp
pyvpx24 has quit [Ping timeout: 245 seconds]
ubLIX has joined #picolisp
orivej has quit [Ping timeout: 272 seconds]
grp has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
erkin has joined #picolisp
f8l has quit [Remote host closed the connection]
f8l has joined #picolisp
erkin has quit [Ping timeout: 252 seconds]
rick42 has quit [Ping timeout: 252 seconds]
Blunt8 has joined #picolisp
erkin has joined #picolisp
rick42 has joined #picolisp
Blunt8 has quit [Ping timeout: 245 seconds]