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 joined #picolisp
orivej has quit [Ping timeout: 272 seconds]
aw- has quit [Quit: Leaving.]
freemint has left #picolisp ["Leaving"]
orivej_ has quit [Ping timeout: 268 seconds]
aw- has joined #picolisp
orivej has joined #picolisp
ubLIX has quit [Quit: ubLIX]
orivej has quit [Ping timeout: 272 seconds]
aw- has quit [Read error: Connection reset by peer]
aw- has joined #picolisp
pointfree has quit [Ping timeout: 250 seconds]
gko has quit [Ping timeout: 250 seconds]
pointfree has joined #picolisp
gko has joined #picolisp
_whitelogger has joined #picolisp
<razzy> phew, i like when comunity has some wastefull overhead (i.e catpictures). It feels more human, imho. i read your opinions, i conform (in a good way).
<razzy> also, good morning :]
<Regenaxer> Good morning razzy
<Regenaxer> Yeah, no worry :)
rob_w has joined #picolisp
anddam has left #picolisp ["WeeChat 2.3"]
<beneroth> Good morning
<Regenaxer> Good morning beneroth
freemint has joined #picolisp
<freemint> razzy, it's ok but see it as a warning. I think i've never seen cat pictures before in this chat. So i was very shocked and when it seemed like you were trying to split the community i got defensive for the community how i like it.
tankf33der has quit [Quit: Connection closed for inactivity]
<freemint> Good Morning, Regenaxer, beneroth
<Regenaxer> hi freemint
<beneroth> hi freemint
<freemint> What have you been working on recently?
<freemint> (afk) have to reboot
freemint has quit [Remote host closed the connection]
freemint has joined #picolisp
freemint has quit [Remote host closed the connection]
<wuehlmaus> hello, picolispers, greetings from the north of germany
freemint has joined #picolisp
<freemint> wuehlmaus, grüße aus dem Mittelgebirge
<wuehlmaus> oh nett :-)
f8l has quit [Read error: Connection reset by peer]
jibanes has quit [Ping timeout: 272 seconds]
jibanes has joined #picolisp
orivej has joined #picolisp
rob_w has quit [Quit: Leaving]
razzy has quit [Ping timeout: 244 seconds]
aw- has quit [Quit: Leaving.]
tankf33der has joined #picolisp
orivej_ has joined #picolisp
orivej has quit [Ping timeout: 268 seconds]
<wuehlmaus> is there something like in clojure (->), i like it very much because now you don't have to read from inner to outer functions
<wuehlmaus> it's more sequental
<wuehlmaus> sequential
<Regenaxer> I think this question was here some while ago
<Regenaxer> I dont remember well, is is a macro?
alexshendi has joined #picolisp
<wuehlmaus> could very well me
<wuehlmaus> i don't remember the right vocable 'anaphoristic' or similar
<Regenaxer> I forgot, I wrote a conversion back then, but don't have it any more
<Regenaxer> I think it is like this:
<Regenaxer> : (->> (range 0 9) (mapcar inc) (filter even?))
<Regenaxer> -> (2 4 6 8 10)
<Regenaxer> Which is in pil:
<Regenaxer> (filter even? (mapcar inc (range 0 9)))
<Regenaxer> You *can* write a transformer quite easily, but I think it is not a good thing
<Regenaxer> Fancy, but obfuscating
<Regenaxer> Such syntax tricks are a bad design decision in my opinion
<wuehlmaus> i think it helps readability a great lot
<Regenaxer> I think the opposite
<wuehlmaus> but nicer to read than from inner to outer function IMO
<Regenaxer> The nice thing in Lisp is it orthogonal syntax
<Regenaxer> The above looks like '->>' takes three args, evaluated from left to right
<Regenaxer> Why break this beauty without need?
<Regenaxer> The expression is longer (takes more space), and is a *lot* slower
<Regenaxer> only to look fancy
<Regenaxer> : (size '(->> (range 0 9) (mapcar inc) (filter even?)))
<Regenaxer> -> 11
<Regenaxer> : (size '(filter even? (mapcar inc (range 0 9))))
<Regenaxer> -> 9
<Regenaxer> I always prefer smaller code. *This* is more readable in the long range
<Regenaxer> Anyway, this works (at least for the above example):
<Regenaxer> (de ->> Lst
<Regenaxer> (let Res (++ Lst)
<Regenaxer> (eval
<Regenaxer> (while Lst
<Regenaxer> (setq Res (append (++ Lst) (list Res))) ) ) ) )
<Regenaxer> I don't know the syntax in general
<Regenaxer> Still, I think it is a bad idea. Giving up simplicity for fancyness
<Regenaxer> Ah, it needs 'even?' of course:
<Regenaxer> (de even? (N)
<Regenaxer> (not (bit? 1 N)) )
<Regenaxer> Ha! It just occurs to me that you CAN write in that left-to-right style in normal PicoLisp syntax, without violating anything, and without loosing execution speed by transforming expressions:
<Regenaxer> (and
<Regenaxer> (range 0 9)
<Regenaxer> (mapcar inc @)
<Regenaxer> (filter even? @) )
<Regenaxer> Voila :) This gives (2 4 6 8 10)
<Regenaxer> And much more general, cause the '@' does not need to be at the end of each sub-expression
<wuehlmaus> oh nice
<Regenaxer> The example is a bit silly
<Regenaxer> it is never good to build a list with 'range', then immediately build a new one with 'mapcar' just to 'filter' it then
<Regenaxer> A single function '((N) (and (bit? 1 N) (inc N))) is better
<Regenaxer> i.e.
<Regenaxer> (extract
<Regenaxer> '((N) (and (bit? 1 N) (inc N)))
<Regenaxer> (range 0 9) )
<Regenaxer> This builds only a single list from the argument list
<Regenaxer> But as I said, this is silly and not a real-world example
<freemint> Regenaxer, i recall the debate but i want to call it o not ->
<freemint> Since circlo (approx: o) is the mathematical symbol for concatination "Verkettung" of functions
razzy has joined #picolisp
<Regenaxer> I think it is ->> in Clojure
<Regenaxer> But 'o' is indeed a more nice name ;)
<Regenaxer> Anyway, as I said, I don't like such syntax-obfuscation
<freemint> You made that clear back then
<freemint> and it is reasonable in the typical code you write
<freemint> *for the
<freemint> 'o becomes a good idea getting the order of your functions right is harder than getting the arguements right
<freemint> In your lisp code that is almost never the case
<freemint> If all functions had one arguement that syntax would be worth thinking about
alexshendi has quit [Ping timeout: 250 seconds]
lodsw_ has joined #picolisp
lodsw has quit [Ping timeout: 268 seconds]
<Regenaxer> T
orivej_ has quit [Ping timeout: 250 seconds]
<Regenaxer> But the point is, the strength of Lisp is its extremly simple, uniform syntax. With such gimmicks you destroy it.
ubLIX has joined #picolisp
orivej has joined #picolisp
<freemint> Regenaxer, That is a good principle
<freemint> however i do feel like it is not as uniform as it could be but that is another debate
<freemint> I just noticed that concatination in mathematics works the other way around: (->> (range 0 9) (mapcar inc) (filter even?))) would be (o (filter even?) (mapcar inc) (range 0 9))), just a correction
ubLIX has quit [Ping timeout: 250 seconds]
libertas has quit [Remote host closed the connection]
libertas_ has quit [Remote host closed the connection]
ubLIX has joined #picolisp
libertas has joined #picolisp
ubLIX has quit [Ping timeout: 250 seconds]