Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
GeZe
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
GeZe
5y ago
FYI, it would not be accurate to say that "The Flow people moved on to ReScript".
2.
▲
by
GeZe
5y ago
Another example would be the difference between their enum features: https://medium.com/flow-type/typescript-enums-vs-flow-enums-... "TypeScript Enums vs. Flow Enums"
3.
▲
by
GeZe
5y ago
Flow also supports "discriminated unions" [0], and did so before TypeScript (Flow's announcement in July 2015: https://flow.org/blog/2015/07/03/Disjoint-Unions/ , TypeScript's ann
4.
▲
by
GeZe
5y ago
Here are the docs for exporting/importing enums: https://flow.org/en/docs/enums/using-enums/#toc-exporting-en... - works fine with the new export/import syntax. Docs for enums compilation/
5.
▲
TypeScript Enums vs. Flow Enums
(medium.com)
7 points
by
GeZe
5y ago
|
8 comments
6.
▲
Scaling Flow to tens of millions of lines of JavaScript with Types-First mode
(medium.com)
1 points
by
GeZe
6y ago
|
0 comments
7.
▲
by
GeZe
10y ago
You can similarly search/replace JS code, but using pattern matching and CSS style selectors instead of writing code, with Grasp. It's usable from the command line like sed. http://www.graspjs.com/ For instance ch
8.
▲
by
GeZe
12y ago
For a tool dedicated to searching and replacing JS in this way (AST aware), check out http://graspjs.com You can use both CSS style selectors, and pattern matching, to both search and replace your code.
9.
▲
by
GeZe
13y ago
Self was one of the inspirations behind JavaScript, particularly its prototype system. http://en.wikipedia.org/wiki/Self_(programming_language)
10.
▲
Refactoring your JavaScript code with Grasp
(graspjs.com)
1 points
by
GeZe
13y ago
|
0 comments
11.
▲
by
GeZe
13y ago
Looks like someone has started one: https://github.com/joneshf/sublime-grasp
12.
▲
by
GeZe
13y ago
Cool project! As monjaro mentions, the two examples are not equivalent however - the grasp example replaces every binary expression (alias: bi) with an addition operation with the right and left hand sides switched. This is a very trivial e
13.
▲
by
GeZe
13y ago
I plan to add support for both LiveScript and CoffeeScript to grasp in the future. PS. If anyone has any questions about grasp please let me know!
14.
▲
by
GeZe
13y ago
If you are looking for a syntax closer to Haskell's, you can take a look at LiveScript ( http://livescript.net/ ) eg. getUserFriends = (userName) -> user <- findUser userName friends <- findFri
15.
▲
by
GeZe
13y ago
More specifically, this has to do with the Big Mac Index by The Economist. http://en.wikipedia.org/wiki/Big_Mac_Index http://www.economist.com/content/big-mac-index
16.
▲
by
GeZe
13y ago
LiveScript allows partially applied operators, including property access. You can do: totals = map (.total), orders http://livescript.net/
17.
▲
by
GeZe
14y ago
For those who don't want to wait for the book, I've written a brief article covering some concepts of functional programming in JavaScript: http://livescript.net/blog/functional-programming-in-javascr... It covers first class and higher o
18.
▲
by
GeZe
14y ago
This syntax already exists in LiveScript ( http://livescript.net/#backcalls ) which compiles to straightforward JS. a <- doFirstThing() b, c <- doSecondThing(a) doFinalThing(b + c)
19.
▲
by
GeZe
14y ago
The name is a joke, the project is not. "LiveScript was one of the original names for JavaScript, so it seemed fitting. It's an inside joke for those who know JavaScript well." (from the site) LiveScript hasn't been used as a name for Java
20.
▲
by
GeZe
14y ago
Try learning Haskell. The concepts I discovered while learning it were very influential in my approach to other languages, even if I don't use Haskell itself all the time. I would suggest http://learnyouahaskell.com/
21.
▲
by
GeZe
14y ago
LiveScript compiles almost 1 to 1 to JavaScript and has no runtime, making it easier to debug and comprehend for JavaScript programmers. You can access and use any JavaScript library without having to resort to a special syntax. For JavaScr
22.
▲
by
GeZe
14y ago
For those interested in functional programming, but with a desire for something a bit more pragmatic (and highly compatabile with CoffeeScript), you can check out LiveScript http://livescript.net Functional Programming in JavaScript using
23.
▲
by
GeZe
14y ago
60 character solution in LiveScript[0], without using 'if's, also easily extensible! [1 to 100]map(->[s for s,n of{Fizz:3,Buzz:5}|it%n<1]*''||it) [0] http://gkz.github.com/LiveScript/
24.
▲
by
GeZe
14y ago
If they like Python, maybe they should have tried LiveScript ( http://gkz.github.com/LiveScript/ ) - a descendent of CoffeeScript. Unlike CoffeeScript, but like Python, it has proper list comprehensions `["#x#y" for x in [\a \b] for y in [1
25.
▲
by
GeZe
14y ago
LiveScript has many features over CoffeeScript that may not exactly be as in Haskell, but are inspired by it. You can define curried functions, use partially applied operators (addTwo = (+ 2)), use operators as functions (sum = fold1 (+)),
26.
▲
by
GeZe
14y ago
Part 1: http://gkz.github.com/LiveScript/blog/functional-programming... Part 1 discussion on HN: http://news.ycombinator.com/item?id=4135616
27.
▲
Functional Programming in JavaScript using LiveScript - Part 2
(gkz.github.com)
11 points
by
GeZe
14y ago
|
1 comments
28.
▲
by
GeZe
14y ago
If you are interested in this you might want to check out http://gkz.github.com/prelude-ls/ - it has almost all the functions included in Udon as well as about 60 more based off of Haskell's Prelude module.
29.
▲
by
GeZe
14y ago
This is an interesting idea - I will look into it. It does not seem to conflict with the current syntax. Thanks for the suggestion!
30.
▲
by
GeZe
14y ago
Hi Brian, thanks for creating Roy, it's very cool! I've underlined LiveScript functional features in this blog post, but like JavaScript, LiveScript also supports imperative and object-oriented programming. One could port a JavaScript progr
More ›