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
aw- has joined #picolisp
aw- has quit [Ping timeout: 246 seconds]
seninha has quit [Quit: Leaving]
aw- has joined #picolisp
aw- has quit [Ping timeout: 244 seconds]
isaneran has joined #picolisp
aw- has joined #picolisp
msavoritias has joined #picolisp
seninha has joined #picolisp
aw- has quit [Ping timeout: 240 seconds]
avocadoist has quit [Ping timeout: 240 seconds]
avocadoist has joined #picolisp
viaken has quit [Server closed connection]
viaken has joined #picolisp
isaneran has quit [Ping timeout: 240 seconds]
pablo_escoberg has joined #picolisp
<pablo_escoberg> I'm having a hard time with `redef`.  I would expect this:  `(redef rel Lst (pass rel ))` to work, but for some reason, the old `rel` is getting (I think) the active symbols as args rather than the original args.  Same happens if I do `(rel Lst).  What am I doing wrong?
<abu[7]> Hi pablo_escoberg! 'pass' makes sense only in functions with variable arguments
<abu[7]> i.e. having '@' as a formal parameter
<pablo_escoberg> well, ok, but I also tried '(rel Lst) and got the same result.
<pablo_escoberg> In fact, that's the only reason I used `pass`
<abu[7]> 'rel' is a FEXPR
<abu[7]> it does not evaluate its arguments
<pablo_escoberg> Right, so is my redef
<abu[7]> How should your 'rel' look like?
<abu[7]> (undef 'rel) (de rel Lst ... ? ...)
<abu[7]> i.e. do it explicitly first
<pablo_escoberg> Something like this:  `(redef rel Lst
<pablo_escoberg>   (if (and (num? any (tail 1 Lst)) (not (num? (tail 1 Lst))))
<pablo_escoberg>     (perms> (rel (head -1 Lst)) (tail 1 Lst))
<pablo_escoberg>     (rel Lst)))`
<abu[7]> rel is so simple, no need to redef
<pablo_escoberg> well, I need an extra parameter (for permissions)
<abu[7]> right
<pablo_escoberg> I was going to use `daemon` but need the extra arg
<abu[7]> do it explicitly
<abu[7]> (rel Lst) won't work
<abu[7]> as the old rel does not evaluate (FEXPR)
<pablo_escoberg> ok, why does that not work, and is there any way to make it work?
<pablo_escoberg> so I need to eval the Lst?
<abu[7]> You cannot call a FEXPR this way
<abu[7]> forget the redef
<abu[7]> (de rel Lst ... ? ...)
<pablo_escoberg> ok, I would love to.  I think it's kind of ugly the way I am doing this, but everything else I've thought of is even uglier.
<abu[7]> Or use 'daemon'
<abu[7]> (daemon 'rel (if (and (nu ...)) (perms> ...)))
<pablo_escoberg> yeah, I guess `daemon` could do the trick given the variable args.  I'll play around and see what I can do with it.
<pablo_escoberg> thanks as always for the help.
<abu[7]> But 'rel' is sooo short
<abu[7]> do it explicitly
<abu[7]> it is a single 'def' call
<pablo_escoberg> yeah, I looked at it with (vi), so I get what it does.
<abu[7]> yeah
<abu[7]> or (pp 'rel)
<abu[7]> But 'daemon' is also fine
msavoritias has quit [Remote host closed the connection]
pablo_escoberg has quit [Ping timeout: 245 seconds]
aw- has joined #picolisp
aw- has quit [Ping timeout: 246 seconds]
bjork1intosh has joined #picolisp
bjorkint0sh has quit [Ping timeout: 252 seconds]