News for hackers. Stuff that matters.

takle

Re:A difference between Haskell and Common Lisp on Monday December 21, 2015 @10:49AM (#10771601)
I agree with you. I'm going to write a post about function application and composition (right-to-left / left-to-right) so other communities can stop discussing non-essential matters.

I do like the fact that the `pipe operator` is often mentioned along the bash '|' which is used in a pointfree style.

Well it might make sense sometimes, so its good to know one's options :)

  p x y z = f (g x y) z
  p       = ((.) f) . g
Re:A difference between Haskell and Common Lisp on Monday December 21, 2015 @10:04AM (#10771344)
One could also change the Haskell. Data.Function (&); Control.Arrow (>>>)

  -- the pipe operator seems to be all the rage these days
  (|>) = (&)
  
  -- forward application + forward composition
  xs |> (drop 3 >>> filter p >>> take 5)
Only function application

  xs |> drop 3 |> filter p |> take 5
Re:ES7 Proposal: The Pipeline Operator on Monday December 07, 2015 @04:12PM (#10692738)
# Why not ## Lodash `_.flow(b,c,d)(a)` // left to right `_.compose(d,c,b)(a)` // right to left `_.flowRight(d,c,b)(a)` // right to left `_.backflow(d,c,b)(a)` // right to left

## RamdaJS `_.pipe(b,c,d)(a)` // left to right

# But why are we inventing so many ways of doing forward, backward function application and composition.

Aside: I've never found an application of lodash `_.chain` that couldn't be expressed in a better way.

Re:JavaScript best practices on Sunday July 05, 2015 @01:08PM (#9834137)
On the subject of testing, I think it's important that people don't follow testing methodologies blindly.

In the 1960s, Djikstra said "Testing shows the presence, not the absence of bugs", which is true.

Testing is a good tool to prevent regressions. A form of testing that I find quite interesting - and wish more people would look into - is property based testing. A good example of this can be found here http://fsharpforfunandprofit.com/pbt/. Scott Wlaschin is also quite good at teaching across coding paradigms, not just functional.

Re:Bling – the $ of jQuery without the jQuery on Monday June 15, 2015 @10:00AM (#9719290)
Hehe, You're welcome – I do take golfing very serious ;)
Re:Bling – the $ of jQuery without the jQuery on Monday June 15, 2015 @05:53AM (#9718397)
(var | let | const) $ = ::document.querySelector;

with experimental ES7 syntax :D https://github.com/zenparsing/es-function-bind