rescript-sublime
proposal-pipeline-operator
Our great sponsors
rescript-sublime | proposal-pipeline-operator | |
---|---|---|
1 | 72 | |
7 | 6,334 | |
- | 1.4% | |
0.0 | 6.7 | |
about 1 year ago | 4 months ago | |
ReScript | HTML | |
MIT License | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
rescript-sublime
-
How I Switched from TypeScript to ReScript
ReScript devs did well on prioritizing the plugin for VSCode, which works really well. With the ReScript’s watcher running, you’ll see your Type errors underlined in red, with a descriptive bubble on hover. You also get type hints, formatting, and jumps to definitions. There’s also official support for Vim (both plain Vim and Coc Language Server) and Sublime.
proposal-pipeline-operator
-
A generically typed pipe function in TypeScript
This is quite elegant!
Direct link to the source of OP's pipe function and recursive type definitions: https://github.com/MathisBullinger/froebel/blob/main/pipe.ts...
On a related note, I've been frustrated by the slow progress on https://github.com/tc39/proposal-pipeline-operator - specifically the thread in https://github.com/tc39/proposal-pipeline-operator/issues/91 which has 668 comments over 4+ years and shows no meaningful sign of consensus.
The TC39 group is (justifiably) very concerned about backwards and future compatibility, and Typescript has a policy of not introducing syntax that is in scope for Javascript itself until the syntax has formally reached a stable state (see: https://github.com/Microsoft/TypeScript/issues/2103#issuecom...) - so we're far from having a pure operator for this.
But `pipe((n: number) => n.toString(), (a: string) => a+' ')(3)` is as clean as I've ever seen it get.
And to use it in an ad-hoc way for left-to-right readability (and for code that will be maintained by those who think curry is just a tasty dish), it's trivial to implement an applyPipe on top:
applyPipe('foo', strip, title, (s: string) => `${s}: bar`)
-
HypeScript: Simplified TypeScript's type system in TypeScript's own type system
> Switch statements
JS has had switch statements for a long time. Do you mean switch "expressions" that can be used inline? It's not pretty but JS has long supported that too using either eval() "hacks" or IIFEs: https://stackoverflow.com/questions/32451049/is-eval-the-onl...
Do you mean pattern matching? There are two Stage 1 TC39 proposals with different approaches to it:
More hands-on/direct: https://github.com/tc39/proposal-pattern-matching
More indirect: https://github.com/tc39/proposal-do-expressions
> list comprehensions
There are several libraries with strong Iterator support today that while not syntactically gorgeous do great jobs at allowing you to write simple list operations. Off the top of my head are IxJS and iter-tools, but also classic mainstays like up to date versions of lodash and Ramda.
There's a Stage 2 proposal to bring more of them into "the standard library": https://github.com/tc39/proposal-iterator-helpers
There's also a Stage 2 proposal for an operator to make the syntax generally nicer no matter the library: https://github.com/tc39/proposal-pipeline-operator
> array slicing
Array.prototype.slice() was added back in ES2015: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Array.prototype.at() was "just added" in ES2022 for unary "slice" (ability to use negative indexes): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
If you prefer syntax to function calls, there's a Stage 1 proposal still live for that: https://github.com/tc39/proposal-slice-notation
> better equality operators
That ship has probably sailed. Most projects at this point just have linter rules to standardize everything to the more reliable "triple equals" (===, and !==).
There are proposals for more structural equality functions in the standard library, though, for instance: https://github.com/tc39/proposal-array-equality
-
Function.memo and Object.pick / omit at Stage 1 This Week
Object.pick / omit are simple lens functions (e.g. Lodash get/omit), but having built into a language who mainly deals with Objects is super powerful, especially for Functional Programmers using it with Promises or pipeline operators.
-
Taking a Look at the New Pipe Operator in JavaScript
For more information on this see: https://github.com/tc39/proposal-pipeline-operator/wiki/Bikeshedding-the-Hack-topic-token/
-
The v9 JS SDK is a horrendous developer experience.
Please support the pipeline operator! https://github.com/tc39/proposal-pipeline-operator This would allow you to program again in natural order while keeping the benefits of functional programming.
- Upcoming ECMAScript features I'm excited about
-
JavaScript Evolutsiyasi Qisqa Satrlarda!
Pipeline operatori UNIXdagi pipe utilitasiga o'xshash asosan funksional tillarga tegishli bo'lgan mexanizmni JS fuksiyalarida ishlatish imkonini beradi.
-
Have you tried piping your javascript funtions?
Sources/Reads freecodecamp github
-
Advanced Programming Languages
So really monads are essentially an abbreviated syntax? Chaining functions, where (some of) the arguments are hidden from the language syntax and inserted by the compiler?
How does that relate to “pipe operator” as in https://github.com/tc39/proposal-pipeline-operator
Are monads also linear types? I mean, if I have a monad which represents system IO state, each value of system state can only be consumed once in actual execution, I can’t split the IO state in two and print different outputs on each branch. But I can do that in a conditional expression because only one branch is ever actually realised. For IO state, data branching is only allowed when guarded by control branching.
What are some alternatives?
FiraCode - Free monospaced font with programming ligatures
ramda - :ram: Practical functional Javascript
ionide-vscode-fsharp - VS Code plugin for F# development
content - The content behind MDN Web Docs
Statsd - Daemon for easy but powerful stats aggregation
proposal-partial-application - Proposal to add partial application to ECMAScript
proposal-function-helpers - A withdrawn proposal for standardizing some useful, popular helper functions into JavaScript’s Function object.
Gigablast - Nov 20 2017 -- A distributed open source search engine and spider/crawler written in C/C++ for Linux on Intel/AMD. From gigablast dot com, which has binaries for download. See the README.md file at the very bottom of this page for instructions.
You-Dont-Need-Lodash-Underscore - List of JavaScript methods which you can use natively + ESLint Plugin
playwright-dotnet - .NET version of the Playwright testing and automation library.
lodash - A modern JavaScript utility library delivering modularity, performance, & extras.