These are chat archives for gkz/LiveScript

15th
Jun 2018
Daniel Rodríguez Rivero
@danielo515
Jun 15 2018 06:35
Hello, is ls community alive?
Cerem Cem ASLAN
@ceremcem
Jun 15 2018 08:13
Eh, not much
Jo-Herman Haugholt
@huyderman
Jun 15 2018 08:42
A shame, I really wish LS had higher adoption :/
Cerem Cem ASLAN
@ceremcem
Jun 15 2018 08:53
@huyderman me either... I'm visiting LS issues and stuff to understand what caused this. @vendethiel had some dissappointments, but I don't know the exact reasons
Jo-Herman Haugholt
@huyderman
Jun 15 2018 08:55
I really enjoy working with LiveScript, the syntax is so nice and when I got the hang of it I felt so much more productive than with plain JavaScript.
Daniel Rodríguez Rivero
@danielo515
Jun 15 2018 10:52
Glad to see there is people still using it
But the repository seems pretty stalled
All the comments are one year old
Cerem Cem ASLAN
@ceremcem
Jun 15 2018 11:27
I'm using Livescript for 3 years now and I still prefer using it in our very active project, ScadaJS, despite the stall. btw, @vendethiel is actively working on types, AFAIK
Daniel Rodríguez Rivero
@danielo515
Jun 15 2018 11:33
How do you handle curried functions ?
Cerem Cem ASLAN
@ceremcem
Jun 15 2018 11:37
What do you mean by "handling a function"?
Daniel Rodríguez Rivero
@danielo515
Jun 15 2018 11:42
How do you call curried functions ?
add (1) (2)
Cerem Cem ASLAN
@ceremcem
Jun 15 2018 11:46
As livescript.net says, just like normal functions if you supply all arguments and just like factory functions, if you supplied the arguments partially:
add = (a, b) --> a + b 
add-five = add 5
add-five 3  # => 8
add 4, 7  # => 11
add 4 7   # => 11
but I never use curried functions. they scares me out.
what is your exact use case issue?
Daniel Rodríguez Rivero
@danielo515
Jun 15 2018 12:05
Almost all my functions are curried
ONLY curried
I mean, you can not make add(1,2) and add(1)
I don't want automatically curried functions
Just unary ones
This will be the actual signature add = a -> b -> a + b
This works
add = a -> b -> a + b 

(add 1) 3
but the calling is ugly as hell
:smile:
Cerem Cem ASLAN
@ceremcem
Jun 15 2018 13:21

but the calling is ugly as hell

do you mean (add 1) 3 is ugly? if so, why not simply write add 1 3?

Daniel Rodríguez Rivero
@danielo515
Jun 15 2018 17:12
Just look at the function declaration, I can't call it that way ecause it actually returns a function, it does not takes two arguments
Cerem Cem ASLAN
@ceremcem
Jun 15 2018 19:39
hm, correct. why do you avoid add = (a, b) --> a + b declaration?
Daniel Rodríguez Rivero
@danielo515
Jun 15 2018 23:05
Because the root of all evil, optimization :smile:
I want to avoid the overhead of curry