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
_whitelogger has joined #picolisp
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 260 seconds]
orivej_ has joined #picolisp
aw- has quit [Quit: Leaving.]
aw- has joined #picolisp
orivej_ has quit [Ping timeout: 265 seconds]
rob_w has joined #picolisp
orivej has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
rob_w has quit [Ping timeout: 240 seconds]
<beneroth> Regenaxer, you like to have my help with the DNS issue?
<beneroth> probably your domain points to multiple servers?
<beneroth> hmmm
<beneroth> you have two nameservers, and both give the same response. so that part is good.
<beneroth> I get one IPv4 and one IPv6 A record
<beneroth> maybe they don't point to the same single machine?
<Regenaxer> No idea. I sent an mail to domain factory support, usually they answer soon
<Regenaxer> I looked into /etc/resolv.conf
<Regenaxer> It says "domain servers.jiffybox.net"
<Regenaxer> servers.jiffybox.net does not exist
<Regenaxer> I don't know where else DNS is configured
<Regenaxer> Let's see what they answer
<beneroth> mail servers are MX entries
<Regenaxer> Support was always good so far
<beneroth> they point to smtpin.rzone.de
<beneroth> ok
<Regenaxer> Not mail server
<Regenaxer> I use exim
<Regenaxer> I have problems with *every* connect from that machine to the outside world
<Regenaxer> Takes 10 secs or so
<beneroth> hm
<Regenaxer> So exim gives tons of errors and freezes the mails
<beneroth> I see
<beneroth> and yes, fits the problem
<Regenaxer> yeah
<beneroth> mail sending from your server
<beneroth> not to it
<Regenaxer> right
<Regenaxer> Was OK all the years
<Regenaxer> no idea what they changed
<beneroth> never touch a running system etc.
<Regenaxer> :)
<beneroth> well hosters have to change a few things sometimes
<Regenaxer> true
<Regenaxer> And it works, just seems to try first the wrong name server
<Regenaxer> I did things like "time ncat -w2 -z heise.de 80 && echo OK"
<Regenaxer> takes 8 secs
<Regenaxer> raw IP addr is very fast
<Regenaxer> so it must be DNS
<beneroth> T
<beneroth> good test
<beneroth> best way to test for not-nil in pilog is really (not (nil @Var)), right?
<beneroth> e.g. when @Var is bound to a object property via (same)
<Regenaxer> I would prefer (^ @ (-> @Var))
<beneroth> I could do (bool @T @Obj property) first maybe
<beneroth> ok
<beneroth> why not having it in the standard?
<Regenaxer> cause "no value" does not exist in Prolog
<beneroth> :P
<beneroth> ok, not-nil than
<Regenaxer> it is a Lisp thing
<beneroth> opposite of nil/1
<beneroth> I see, in prolog NIL is just a specific value
<Regenaxer> I still wonder if any rule is necessary at all
<beneroth> then again, same thing in lisp ;-)
<Regenaxer> ah!
<beneroth> well.....
<Regenaxer> we have bool/2, no?
<Regenaxer> I use it in DB queries
<beneroth> yes, but that is property access
<Regenaxer> bool/3
<beneroth> it says it compares truth value, so it can be used to compare NIL to NIL and T to 'any
<Regenaxer> yes, but how about property zero?
<Regenaxer> i.e. value access
<beneroth> you still need object, no?
<Regenaxer> yes, but not necessarily DB, but right, it is different
<beneroth> ah right
<beneroth> property 0
<beneroth> you are right
<Regenaxer> But there must be a direct way
<Regenaxer> Let me check again
<beneroth> : (? (equal @X 5) (not (nil @X)))
<beneroth> -> NIL
<beneroth> : (? (equal @X 5) (bool @X))
<beneroth> @X=5
<beneroth> -> NIL
<beneroth> : (? (equal @X 5) (bool @X 0))
<beneroth> @X=5
<beneroth> -> NIL
<beneroth> (bool @Var 0) works
<beneroth> not sure if this is extremely elegant or rather ugly :D
<Regenaxer> yeah
<beneroth> I guess I tend to elegant
<beneroth> but should be nicer than (not (nil)), correct?
<beneroth> maybe not as readable
<beneroth> but than again... pilog is quirky to read anyway :P
<Regenaxer> in any case faster
<beneroth> faster is better
<beneroth> less parenthesis is faster is better
<Regenaxer> (^ @ (-> @Var)) is the fastest though
<beneroth> ok
<Regenaxer> not necessarily in Pilog
<Regenaxer> unification is very expensive
<Regenaxer> lots of pattern matching
<Regenaxer> A Lisp call is a lot faster :)
<beneroth> I already had
<beneroth> (be has-value (@Var)
<beneroth> (^ @ (val (-> @Var))) )
<beneroth> but now I think the (val) here is completely unnecessary
<Regenaxer> it is one more indirection
<Regenaxer> same as '0'
<beneroth> so
<beneroth> this would be the way to go:
<beneroth> (be has-value (@Var)
<beneroth> (^ @ (-> @Var)) )
<beneroth> I just had a funny pilog moment
<beneroth> (same @Var @Obj list-property) (member @Foo @Var)
<beneroth> if the list-property of @Obj is NIL, then obviously pilog tries to generate it from @Foo and it matches always :D
<beneroth> therefore I need a not-nil check here ;-)
<beneroth> I believe I grokked pilog now, except for recursion and cut operator. I will get to that, too. For now I have what I need.
<Regenaxer> ok
<Regenaxer> Still this NIL thing is unsatisfactory
<beneroth> yeah!
<Regenaxer> NIL is a normal value for Pilog, not "false" as in Lisp
<beneroth> when you have nil/1 in the standard, than there should be any/1 in the standard too
<Regenaxer> False in pilog is "non-provable"
<beneroth> technically it is a value in lisp too, just loaded with additional meanings
<beneroth> the prolog way would be to have neither nil/1 nor any/1 in the standard
<beneroth> then again this are often used things, so makes sense to have syntax sugar for them instead of having to define them yourself
<Regenaxer> yeah, 'nil' also calls Lisp
<Regenaxer> : (rules 'nil)
<Regenaxer> 1 (be nil ("@X") (^ @ (not (-> "@X"))))
<beneroth> haha
<beneroth> I see
<beneroth> you should any/1 to the standard library :P
<Regenaxer> 'any' has a different meaning in Lisp
<beneroth> *add
<Regenaxer> should be 'nonNil' or so
<Regenaxer> ugly
<beneroth> hm..true
<beneroth> well its 'any in the function documentation syntax
<beneroth> but yes, completely no relation to the picolisp (any) function
<Regenaxer> No, the any type includes also NIL
<beneroth> then define it as any?/1 ?
<beneroth> it does? hm
<Regenaxer> any value
<beneroth> ok
<beneroth> then true/1 ?
<Regenaxer> It is outside of Pilog
<beneroth> true/0 already exists
<Regenaxer> yes
<beneroth> unsure if true/1 would be elegant or not so much
<Regenaxer> (nil @Var) T (fail)
<Regenaxer> is probably the Pilog way
<beneroth> the prolog way. too long for picolisp/pilog way
<beneroth> what about
<beneroth> some/1
<beneroth> ?
<Regenaxer> reads if it is NIL, then fail and don't backtrack
<beneroth> nice example for cut operator
aw- has quit [Quit: Leaving.]
<Regenaxer> No, should not be in the standard I think. It is too foreign ;)
<Regenaxer> hmm
<Regenaxer> then (equal @Var NIL) ?
<beneroth> I agree when we talk about prolog. I disagree for pilog, I don't believe you don't require (^ @ (val (-> @Var)) in any advanced pilog program :P
<Regenaxer> did not test
<beneroth> then why does nil/1 exist? :P
<Regenaxer> yeah
<beneroth> works
<beneroth> : (? @X NIL (equal @X NIL))
<beneroth> @X=NIL
<beneroth> :
<beneroth> -> NIL
<Regenaxer> cause NIL is a normal value
<beneroth> : (? (equal @NotDefined NIL))
<beneroth> @NotDefined=NIL
<beneroth> -> NIL
<beneroth> :
<beneroth> T
<beneroth> so why is nil/1 in the standard then :P
<beneroth> you make arguments for my case, not yours :D
<Regenaxer> So better remove nil/1 ?
<beneroth> it is too foreign, too :P
<beneroth> I'm for adding both, both are syntax sugar not essentials, but I would say you need them in nearly every pilog program
<beneroth> as in nearly all pilog program you want to work with pilDB and lisp data, and then you need it certainly
<Regenaxer> I never needed to check for non-Nil
<beneroth> really?
<beneroth> I have a hard time believing this :D
<beneroth> well ok granted, I do something rather innovative here, if I may be so smug.
<beneroth> how often are using nil/1 then?
<Regenaxer> I still believe there is a more "correct" way
<Regenaxer> for non-Nil
<Regenaxer> i.e. a no-op
<beneroth> yeah.. but then it must into the pilog vm, no?
<Regenaxer> non-unified vars is in the vm
<beneroth> you cannot use @Var without a clause around it, not like (and @Var ...) in picolisp, can you?
<Regenaxer> you can and do
<beneroth> nvm, my last message is bullshit
<Regenaxer> in any place
<Regenaxer> it is always expanded and matched
<beneroth> well yes but NIL does not equal (fail) in pilog
<Regenaxer> also in nested patterns etc.
<beneroth> or?
<Regenaxer> NIL means not unified
<beneroth> sure?
<Regenaxer> sure about what?
<beneroth> hm yes
<beneroth> you are right
<Regenaxer> I use @Var for a complete sub-expression sometimes
<Regenaxer> Pilog simply expands it
<Regenaxer> and the result is used further
<Regenaxer> (or ((nil @Var) T (fail)) (something-true))
<beneroth> I'd be interested in some examples of that
<beneroth> might teach me the missing piece for recursion
<Regenaxer> The most complex I find:
<Regenaxer> http://ix.io/2Qvf
<Regenaxer> hmm, no, not a sub-expression
<Regenaxer> forget that one
<Regenaxer> I used 'nil' only is such cases (very few):
<Regenaxer> http://ix.io/2Qvh
<Regenaxer> i.e. decide which var to use at all in a query
<beneroth> thanks!
<beneroth> maybe I use same/3 wrong
<beneroth> why is @List here nil?
<beneroth> : (? @Obj (new NIL NIL 'foo (1 2 3)) (same @List @Obj foo))
<beneroth> -> NIL
<beneroth> @Obj=$177367302674000 @List=NIL
<beneroth> :
<Regenaxer> 'same' does not unify
<Regenaxer> like all those DB predicates
<Regenaxer> It just *succeeds* if the same
<beneroth> ah ok
<beneroth> I want to do check if a @Var is in a list property of an @Obj
<Regenaxer> I ended up always with (; (-> @Obj) foo)
<beneroth> I see
<Regenaxer> Pilog has no concept of properties
<Regenaxer> so we need Lisp
<beneroth> prolog hasn't. pilog kinda has, as it has a concept of get algorithm
<beneroth> ok
<Regenaxer> I was thinking to extend '->' in pil21
<beneroth> yeah I missed the bit about not unyifing
<Regenaxer> but did not
<beneroth> extend for?
<Regenaxer> i.e. (-> @Obj NIL 'foo)
<Regenaxer> but thats not helpful
<Regenaxer> additional args for '->'
<Regenaxer> (; (-> @Obj) foo) is clearer
<beneroth> not really needed
<beneroth> exactly
<Regenaxer> yeah
<beneroth> I fully agreee
<Regenaxer> cause the second arg for -> is already used
<beneroth> ah
<Regenaxer> a number
<beneroth> currently I have an (or ((()) which compares a string @Var with multiple properties of an object
<beneroth> so I should better create a single rule for that, and do the or in picolisp, not in pilog, eh?
<Regenaxer> I think 'or' should be avoided
<beneroth> yeah it creates branches
<beneroth> I see
<beneroth> makes sense
<Regenaxer> I use it only in select filters
<Regenaxer> to make them in one place
<beneroth> it is a about a select filter, T
<Regenaxer> ok
<Regenaxer> multiple 'be' are better and are the same
<beneroth> (select (@Org)
<beneroth> ((id +Org))
<beneroth> ((same @Name @Org main-name))
<beneroth> ((same @Name @Org short-name))
<beneroth> (or
<beneroth> ((same @Aliases @Org aliases)
<beneroth> (member @Name @Aliases) ) ) )
<beneroth> will do a rule for it
<beneroth> thanks!
<beneroth> (above code is wrong, because same is not unifying, the member always matches)
<Regenaxer> I think you can use a single 'member' here
<beneroth> how?
<beneroth> that was my big issue on the weekend
<beneroth> how to generate a list of values into/for a single pilog variable
<Regenaxer> Sorry, mistake
<Regenaxer> cause of the properties
<beneroth> ok
<Regenaxer> I meant something like
<beneroth> yeah I know how I can generate values with member/2 :)
* beneroth listens
<Regenaxer> (or (same @Name @Foo) (same @Name @Bar) (member @Name (a b c)))
<Regenaxer> -> (member @Name (@Foo @Bar a b c)))
<beneroth> aaah
<Regenaxer> So not useful with the above get's
<beneroth> thanks, that just teached me how to do a list in pilog :)
<beneroth> T
<Regenaxer> T
<Regenaxer> always expands
<Regenaxer> or substitutes
<beneroth> what do you think of that?
<beneroth> (be org-has-name (@Org @Name)
<beneroth> (^ @
<beneroth> (or
<beneroth> (let? Name (-> @Name)
<beneroth> (with (-> @Org)
<beneroth> (= Name (: main-name))
<beneroth> (= Name (: short-name))
<beneroth> (member Name (: aliases)) ) ) ) ) )
<Regenaxer> this is surely the fastest
<beneroth> and not considered ugly (not talking about the property names ;-) )
<beneroth> ?
<beneroth> is there a best practice for the ordering of parameters for pilog rules?
<Regenaxer> I find it ok, as dropping into Lisp is always ugly kind of
<beneroth> yeah I understand
<beneroth> no way around it here, I think
<Regenaxer> The ordering is even more a matter of taste perhaps
<beneroth> yes. what would be good taste?
<beneroth> is there one?
* beneroth has no pilog/prolog taste, lack of experience
<Regenaxer> It depends on the English reading
<beneroth> ok
<Regenaxer> (likes @A beer)
<Regenaxer> or (likes beer @A)
<beneroth> as I named the rule "org-has name" I went with @Org first
<Regenaxer> yes, good
<beneroth> has-name might be more prology
wineroots has joined #picolisp
<beneroth> or even mabye (named)
<beneroth> but I have other entities besides orgs, so I guess I want it in the rule name
<beneroth> or I have to do (isa) within picolisp
<Regenaxer> T
<beneroth> I know about the effects of symbol name length in picolisp and database
<beneroth> how about in pilog?
<Regenaxer> Which effects do you mean?
<beneroth> or is it all pointers during evaluation anyway? so only of interesting in the reading step as with picolisp?
<Regenaxer> storing multiple times?
<Regenaxer> all is pointers
<beneroth> using shorter/longer names for pilog variables or pilog rules
<beneroth> ok
<Regenaxer> yes
<beneroth> so the normal picolisp stuff applies, but nothing pilog-specific :)
<Regenaxer> the serialied form
<beneroth> makes sense
<beneroth> thx :D
<Regenaxer> the rules are not stored, right?
<beneroth> no
<Regenaxer> and if, only once
<beneroth> hardcoded in a file, loaded when needed
<Regenaxer> yeah
<Regenaxer> so no problem
<beneroth> T
<Regenaxer> can be verrry long
<beneroth> the names or the bodies?
<Regenaxer> all of them
<beneroth> or you mean the result T property values :D
<beneroth> aye
<beneroth> naturally
<beneroth> did/do you store pilog rules in db? you came never actually around to do/need it, I understood?
<Regenaxer> yes, never did in a project so far
ym has joined #picolisp
<beneroth> ah btw. my pilog environment I use here is fully namespaced :)
<Regenaxer> but might make sense
<beneroth> yeah
<Regenaxer> cool!
<beneroth> it's really cool
<beneroth> a few interfacing picolisp functions
<beneroth> to change/reset state
<Regenaxer> I like namespaces more and more
<beneroth> and pilog rules to reason about data
<Regenaxer> after getting used
<beneroth> yeah
<beneroth> I have similiar feelings about them as I have with C++ templates: extremely powerful, need to be fully grokked (half-assed knowledge just burns you), and rarely needed but when then it makes impossible things easy
<Regenaxer> exactly
<Regenaxer> a bit frighening ;)
<beneroth> and as so often with picolisp, the relation to the mainstream understanding of the concept of the same name is uncanny at best :P
<beneroth> like C++ templates vs. java generics. looks similiar, technically a similiar concept also under the hood, but function very differently, with very different pros and cons
<Regenaxer> I don't know both well
<Regenaxer> especially Java generics
<beneroth> C++ templates are generators for classes, sames as classes are generators for structures + related functions
<Regenaxer> yes
<beneroth> java generics are just generalized containers, usually handling all their elements as pure Object class (the class everything inherits from).
<beneroth> so generics don't generate, they are only generalized implementations
<Regenaxer> I see
<beneroth> which means they sometimes do non-obvious casting
<beneroth> which results in non-obvious and sometimes non-deterministic performance behavior
<beneroth> or so was my knowledge 10 years ago, possibly that java got better at this, but I'm not sure if it did.
<Regenaxer> The best feature of pil21's namespaces is the 'priv' namespace used in (private)
<Regenaxer> it behaves specially
<Regenaxer> it is *searched* first
<beneroth> no need for long (local) declarations
<Regenaxer> but is *not* inserted
<beneroth> so far I like to have explicit namespaces, so I can switch into them, useful for debugging
<beneroth> can you switch into a private namespace?
<beneroth> e.g. in repl
aw- has joined #picolisp
<Regenaxer> not a long time
<Regenaxer> it is like transients cleared
<beneroth> ok
<beneroth> so you can access it if you get symbols handed out of it, somehow
<Regenaxer> But you can access the symbols with vip
<beneroth> but not really :)
<beneroth> oh okay
<Regenaxer> yes
<beneroth> yeah same as you can access transients, if you have a function which returns them
<Regenaxer> they exist in 'priv' until the next (private) call
<Regenaxer> (all 'priv)
<beneroth> ok
<Regenaxer> yes
<beneroth> not affected by (load) like transient scope is?
<Regenaxer> (all T)
<Regenaxer> it is affected
<beneroth> :(
<beneroth> so explicit namespace is still needed if one wants to do intermediate loads
<Regenaxer> But saved and restored
<beneroth> ah ok
<Regenaxer> Transients are saved now too
<beneroth> ah that changed?
<Regenaxer> seems so
<Regenaxer> pil21/src/io.l
<beneroth> so transients in a single source file are in the same scope, even if there is a (load) in the middle of the file. (load) is no longer same thing as (===) ?
<beneroth> you removed (===) right?
<Regenaxer> http://ix.io/2Qvo
<Regenaxer> this is 'repl' code
<Regenaxer> yes
<Regenaxer> (====)
<Regenaxer> only in @lib/compat.l
<Regenaxer> if needed
<beneroth> yeah it's no longer in the reference even :)
<beneroth> oh
<Regenaxer> T
<beneroth> compat.l is new.
<beneroth> it is about?
<Regenaxer> just for emergency
<beneroth> ah compat stands for "compatibility" ?
<Regenaxer> right
<beneroth> sometimes your naming is too short, really :P
<Regenaxer> I think "compat" is common
<Regenaxer> libcompat
<beneroth> T.yeah right. it's the common abbreviation, seems so.
<Regenaxer> android.support.v4.app.ActivityCompat;
<Regenaxer> such things ;)
ym has quit [Ping timeout: 246 seconds]
<beneroth> T
* beneroth falsely read it as "Combat"
<Regenaxer> yeah, close
<beneroth> Android Activity Combat makes sense :P
<Regenaxer> T
<beneroth> cannot let become the user active in a meaningful way
* beneroth says sorry to English for treating it that bad
<Regenaxer> :)
<tankf33der> Hi all
<tankf33der> regenaxer: how would you generate numbers from 1 till 1million where all digits are odd?
orivej has joined #picolisp
<Regenaxer> I think with (for (I 1 (> 1000000 I) (+ I 2)) (printsp I))
<Regenaxer> But if you can use self-modifying code, this is cute:
<Regenaxer> (do 500000 (printsp (inc (-1) 2)))
<Regenaxer> scnr ;)
<tankf33der> What is scnr?
<Regenaxer> Sorry could not resist (old netnews speak)
<Regenaxer> you can of course also (let I -1 (do 500000 (printsp (inc 'I 2))))
<Regenaxer> still smaller and faster than 'for'
<Regenaxer> or, how about this?
<Regenaxer> (for I 500000 (printsp (dec (* 2 I))))
<Regenaxer> also nice
<Regenaxer> but slow due to '*'
<tankf33der> I see
<tankf33der> I meant before: all digits of than resulting number are odd
<Regenaxer> oh :)
<tankf33der> not resulting number itself
<tankf33der> :)
<Regenaxer> I see
<Regenaxer> Perhaps start with (1 1 1 1 1 1)
<Regenaxer> The CAR is the lowest digit
<Regenaxer> (prinl (flip L))
<Regenaxer> then (inc L 2)
<Regenaxer> if it is 11, dec by 2 and inc (cdr L)
<Regenaxer> But there must be a better way, directly on numbers using arithmetics
<tankf33der> I see
<Regenaxer> not sure
<Regenaxer> one digit is trivial
<Regenaxer> after 5 steps add 10
<beneroth> :D
<beneroth> Regenaxer, what is the @ in (^ @ ...) ?
<beneroth> parameter list for the anonymous lisp function?
<beneroth> also removing the picolisp (val) from
<beneroth> (be has-value (@Var)
<beneroth> (^ @ (val (-> @Var))) )
<beneroth> changed the behaviour
<beneroth> pilog sometimes found it matching when it had no value
<Regenaxer> yes, the var to bind
<Regenaxer> (^ @N (* 3 4))
<beneroth> ah
<beneroth> so kinda like a return value
<Regenaxer> *kind* of ;)
<beneroth> I see
<beneroth> any ideas about my problems with has-value ?
<beneroth> maybe I use it wrong, well possible ;-)
<Regenaxer> hmm, did not find any time
<beneroth> ok
<beneroth> it's not important now
<beneroth> we can look into it another time
<Regenaxer> :)
<beneroth> thank you :)
<Regenaxer> sorrys
<beneroth> np, all good
<Regenaxer> :)
<beneroth> I appreciate you telling me having no time instead of not responding or disappearing ;-)
<Regenaxer> Busy day today
<beneroth> good!
Seteeri has joined #picolisp
ym has joined #picolisp
ym has quit [Remote host closed the connection]
ym has joined #picolisp
<Regenaxer> So a 'value' predicate could be
<Regenaxer> (be value (@Var @Val) (^ @Val (val (-> @Var))))
<Regenaxer> (? (value {123} @X))
<Regenaxer> gives @X = (+Cls) in this example (DB object)
<beneroth> val/3 already exists
<beneroth> 0 property topic again
<Regenaxer> yes, just as an example
<beneroth> Regenaxer, I was talking again/still about the non-nil predicate
<Regenaxer> for (^ @Val
<beneroth> so it is a /1 predicate
<beneroth> not for unifying
<beneroth> I removed the (val) in my definition, and then I got wrong results
<beneroth> even when the variables in question were clearly NIL
<Regenaxer> I still don't understand why you need it
<Regenaxer> to the example
<beneroth> I have a list of picolisp variables, some have a value, some are NIL
<Regenaxer> (^ @Val (val (-> @Var))) expands to
<Regenaxer> (^ @Val (val (-> {123}))))
<Regenaxer> So '->' is a fexpr
<Regenaxer> Pilog substitutes
<beneroth> my @Var binds to global picolisp variables, e.g. 'foo
<beneroth> which might be NIL (on purpose)
<Regenaxer> Can you give a short example?
<Regenaxer> yes, and NIL is a value like 7
<beneroth> yes
<Regenaxer> not special in Pilog
<beneroth> (setq foo 512 bar NIL) (? @Params '(foo bar) (member @Var @Params) (has-value @Var)) -> find all variables which are not NIL
<beneroth> (the real case is a bit more involved, but I need this)
<beneroth> (be has-value (@Var)
<beneroth> (^ @ (val (-> @Var))) )
<beneroth> that one works fine (with (val ..))
<beneroth> if I remove the (val) from (val (-> @Var)) then it succeeds sometimes even when it should not
<Regenaxer> I would do just (? @Params '(foo bar) (member @Var @Params) (^ @ (val (-> @Var))))
<beneroth> yeah
<Regenaxer> So it is just a naming problem?
<beneroth> I use the has-value at multiple places, so I like to keep it just for readability. I'm aware I could hardcode it
<beneroth> no, I'm wondering why
<beneroth> (? @Params '(foo bar) (member @Var @Params) (^ @ (-> @Var)))) is not working
<Regenaxer> yes, the body is (^ @ foo)
<beneroth> ah yes
<beneroth> makes sense
<beneroth> of course
<beneroth> thx
* beneroth feels stupid now xD
<beneroth> would (^ @ (bool (-> @Var)) be any better than (^ @ (val (-> @Var)) ?
<beneroth> I'd guess (val ...) is better
<Regenaxer> hmm
<Regenaxer> bool is perhaps better
<Regenaxer> expresses what you mean
<Regenaxer> In which cases does it work without 'val'?
<beneroth> (bool) doesn't work, I guess because it gets substituted into (bool 'foo)
<beneroth> so with bool it would need to be (^ @ (bool (val (-> @Var)))
<Regenaxer> right
<Regenaxer> needs val in any case
<beneroth> so I stay with (val) :)
<beneroth> that I don't care about the result is visible from the @ in (^ @ ...)
<Regenaxer> we needed Lisp *only* to access the value
<beneroth> exactly
<Regenaxer> yes, the value itself is not needed here
<beneroth> that is the use case I use pilog here for: checking if globales have a value, and in some cases setting their value depending on which other globales have one or not
<Regenaxer> ok
<beneroth> I use it for a complex autocompletion process :)
<beneroth> a bit unusual use of pilog, but perfect
<beneroth> my pilog stuff is the rules which values/variables can autocomplete which other variables under which circumstances
<Regenaxer> cool
<beneroth> I find it extremely cool :D
<Regenaxer> :)
<beneroth> and very useful & needed for my use case here
<Regenaxer> So the 'val predicate works too:
<Regenaxer> : (? @Params '(foo bar) (member @Var @Params) (val @ @Var 0))
<Regenaxer> @Params=(foo bar) @Var=foo
<Regenaxer> Perhaps better use that?
<Regenaxer> 'set' is not there though
<Regenaxer> bbl
<beneroth> yep (val @ @Var 0) fits my needs
ym has quit [Ping timeout: 265 seconds]
<Regenaxer> ret
Nistur has quit [Ping timeout: 246 seconds]
<beneroth> ret
<beneroth> wb Regenaxer
<beneroth> Regenaxer, I actually think this is the fanciest meta programming thingy I ever did, the stuff I did with pilog here
<beneroth> using pilog rules to determine which pilog code is to do some stuff with the database
<beneroth> so it kinda involves most things picolisp offers: pilDB, pilog, and most importantly: code is data
<beneroth> I cannot imagine how to implement this in another language/stack. possible, but horrible.
Nistur has joined #picolisp
Nistur has quit [Ping timeout: 260 seconds]
<Regenaxer> beneroth, sounds indeed fancy!
<Regenaxer> So we have the "killer" application?
<beneroth> not yet, but the ingredients
<beneroth> as Fred Brooks said, code is only 3% of a software product, polishing, documentation and fancy looks do the selling
<beneroth> most software products actually sell well without any good code in it :P
* beneroth looks at SAP
<Regenaxer> haha
Nistur has joined #picolisp
Nistur has quit [Ping timeout: 256 seconds]
Nistur has joined #picolisp
enchijl has joined #picolisp
justJanneQk has joined #picolisp
enchijl has quit [Remote host closed the connection]
justJanneQk has quit [Remote host closed the connection]
Stroghl has joined #picolisp
Stroghl has quit [K-Lined]
Code_RedmJ has joined #picolisp
Code_RedmJ has quit [Remote host closed the connection]
Omnious has joined #picolisp
Omnious has quit [K-Lined]
icasdrihy has joined #picolisp
icasdrihy has quit [K-Lined]
eth2bg has joined #picolisp
eth2bg has quit [K-Lined]
Seteeri has quit [Ping timeout: 272 seconds]