These are chat archives for ramda/ramda

13th
Feb 2016
James Forbes
@JAForbes
Feb 13 2016 04:21

do you guys know how to call an arbitary command in bash for each entry in a stream. Like seq 10 | run command

kind of like R.times? I tried xargs, but it just passed the entire sequence to the command

barring a for loop of course
Keith Alexander
@kwijibo
Feb 13 2016 06:39

https://github.com/ramda/ramda/issues/1638#issuecomment-183568161

Please rename ramda-fantasy to something else? The name itself, regardless of whether it is an implementation of a fantasy-spec, is at odds with any developer that likes to be firmly grounded in the real world.

I disagree; even the most prosaic software development is highly fantastical and unreal.

However ramda-adt might be more of a "does what it says on the tin" name
Raine Virta
@raine
Feb 13 2016 10:24
@JAForbes yeah, xargs
seq 10 | xargs -n1 echo
seq 10 | xargs -n1 bash -c 'echo $(($0 + 1))'
James Forbes
@JAForbes
Feb 13 2016 13:19
weird, I was piping it into an npm run command, and it didn't work, thanks though @raine I'll keep digging
Raine Virta
@raine
Feb 13 2016 13:29
you can pass -t to xargs to see what's happening
Sebastien Daniel
@SebastienDaniel
Feb 13 2016 15:04
gmornin, all
Slađan Ristić
@sladiri
Feb 13 2016 15:46
When I use set(lensPath) on an array, the array is converted to an object. Is there a configuration to prevent this?
obj = { a: 1 } becomes { a: {2} } after set(lensPath(['a', 0]), 2, obj)
{ a: { 0: 2 } } I think
Scott Sauyet
@CrossEye
Feb 13 2016 15:52
You'd probably have to compose a lensProp and a lensIndex to get that behavior instead of using lensPath.
Slađan Ristić
@sladiri
Feb 13 2016 15:56
@CrossEye I would want to pass a path into an object containing nested objects and array though, so the compose would have to be dynamic or I would have to switch to objects exclusively. Thank you for the hint.
Slađan Ristić
@sladiri
Feb 13 2016 16:56
It is funny, Falcor does the same basically, they convert every array to a map, because they need the arrays only for the paths.
*"same"
Raine Virta
@raine
Feb 13 2016 21:00
R.assoc
Raine Virta
@raine
Feb 13 2016 21:15
@ram-bot R.map(R.inc, S.Just(1))
ram-bot
@ram-bot
Feb 13 2016 21:15
Just(2)
Stefano Vozza
@svozza
Feb 13 2016 21:29
nice...
Tobias Pflug
@gilligan
Feb 13 2016 22:12
Cool
@raine i want that bot in my company slack! ;)
@raine is that bot on github?
Raine Virta
@raine
Feb 13 2016 22:17
@ram-bot source
Nedal Kouissi
@NedalKouissi
Feb 13 2016 22:23
hey guys, anyone here ?
Tobias Pflug
@gilligan
Feb 13 2016 22:32
@raine could you provide any info on how to set this up perhaps? Never looked at hubot before.. Would be cool
Raine Virta
@raine
Feb 13 2016 22:42
@gilligan yeah so you're going to need a slack adapter for hubot, like the hubot-gitter2 but for slack. it allows your bot to communicate with the service. and then you'll need to update /bin/hubot.
that should be it pretty much
or you can just make a new bot from scratch and take scripts as dependencies
Tobias Pflug
@gilligan
Feb 13 2016 22:48
@raine cool. Thanks
Scott Sauyet
@CrossEye
Feb 13 2016 23:00
You'd probably have to compose a `
Sorry. Stupid Web client.
Nedal Kouissi
@NedalKouissi
Feb 13 2016 23:14
Guys i wanna be good at hard functional programming in JS, is there any good step by step tut ?
Risto Stevcev
@Risto-Stevcev
Feb 13 2016 23:46
Why is there an IO Monad in ramda-fantasy? Isn't the event driven JS approach essentially referentially transparent?
since it's using the hollywood principle "don't call us we'll call you", IO gets dealt with in an async manner and the result calls the function itself
the callback function
And wasn't it implemented in Haskell to deal with it's lazy nature? since ramda (and purescript for that matter) is strict, it doesn't seem like it should be there. Maybe I'm not understanding the underlying reasoning
Raine Virta
@raine
Feb 13 2016 23:49
but in that case IO is not a value
Risto Stevcev
@Risto-Stevcev
Feb 13 2016 23:50
but keeping things pure could essentially be dealt with in a callback approach
Scott Sauyet
@CrossEye
Feb 13 2016 23:55
@IDSFN: I don't know of one. Play around with pure functions, immutable data structures, etc. and you're well on your way.
@Risto-Stevcev: I guess I don't understand. FP is about values. What value does a readFile function return?
Risto Stevcev
@Risto-Stevcev
Feb 13 2016 23:59
@CrossEye Looks like someone was on the same page as me: http://cycle.js.org/