Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sjrd
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
23 ms
·
211.
▲
by
sjrd
9y ago
In old-ish French (spoken by my grandparents' generation in some parts of Belgium), you can still hear "la demie de 2 heures" and "le quart de 7 heures", which directly translate to "the half of 2 hours" a
212.
▲
by
sjrd
9y ago
Is that right? The Scala.js compiler emits none of that "run-time metaprogramming" boilerplate that Prepack is good at optimizing away. In general, I would expect from a compiler to JS not to emit performance killers like that.
213.
▲
by
sjrd
10y ago
Very nice! I fed it one of my favorite commands: git branch --merged | grep -v master | xargs -n 1 git branch -d and it dealt with it reasonably well. The only part it couldn't understand was `branch -d` at the end. In other
214.
▲
by
sjrd
10y ago
Scala.js also uses GCC, of course. However, though it's definitely great at shaving off code size, we found that it can have a (sometimes significant) negative impact on runtime performance. Also, we seem to run into correctness bugs m
215.
▲
by
sjrd
10y ago
It's hardly "one dude", though. Don't give me too much credit. There were two others (@gzm0 and @nicolasstucki) who helped a lot on the core. But even more than that, the reason it's so popular and adopted is mostly
216.
▲
by
sjrd
10y ago
> Imagine using Scala.JS to write a NativeScript/React Native app. People do [1], and are very happy with it. [1] https://github.com/chandu0101/sri
217.
▲
by
sjrd
10y ago
Oh it does have pretty good performance, on par with hand-written JavaScript. But that's still 3x slower than Scala/JVM on our benchmarks, and those benchmarks are ported from the Octane benchmark suite used by V8 (so supposedly t
218.
▲
by
sjrd
10y ago
IMO the future of the JVM is highly multi-platform: JVM, native and JS.
219.
▲
by
sjrd
10y ago
Absolutely! I'm just pointing out that this need is so strong that people have reached for the slow throughput of Scala.js just to get its fast startup time. If we can have both, that's even better!
220.
▲
by
sjrd
10y ago
Actually, there are people using Scala.js to run Scala on AWS lambda, precisely for that reason. * https://github.com/tptodorov/aws-lambda-scalajs * http://underscore.io/blog/posts/2016/0
221.
▲
by
sjrd
10y ago
There is a small list under "Built with Scala.js" here: https://www.scala-js.org/community/ . And that's only for the public facing apps of companies who have explicitly sent a PR to the website to add th
222.
▲
Why You Shouldn’t Use ReactJS for Complex Projects
(infoq.com)
43 points
by
sjrd
10y ago
|
53 comments
223.
▲
by
sjrd
10y ago
Cool! I had completely misunderstood your earlier comment ;)
224.
▲
by
sjrd
10y ago
> Also didn't work out. Are you implying that Scala.js didn't work out? That would be denying the huge success it has within the Scala community. It is notably supported by most major Scala libraries. To back this by data, it a
225.
▲
by
sjrd
10y ago
npm support is now available through https://scalacenter.github.io/scalajs-bundler/ I agree with your analysis on breakpoints and step-by-step in Scala.js. Usually it's a good idea to disable the Scala.js optimize
226.
▲
by
sjrd
10y ago
I like that BuckleScript has chosen the module-by-module design, if only to explore more design space than what was previously done in Scala.js and ClojureScript. I do not think this is what makes the 150 KB tax of Scala.js, though. The dea
227.
▲
by
sjrd
10y ago
Re ctypes, I assume you are talking about https://developer.mozilla.org/en-US/docs/Mozilla/js-ctypes . On that page you can read: > js-ctypes is only available from chrome code; that is, ctypes is not avail
228.
▲
by
sjrd
10y ago
Yes, you emulate them with 32-bit numbers. It is a huge performance bottleneck if you do it naively, which most compile-to-JS languages that support 64-bit integers do. Emscripten even has a flag to let you choose between correct-but-slow 6
229.
▲
by
sjrd
10y ago
If that comment were relevant, then so would 100 other similar comments mentioning another typed language that compiles to JS. Do you really want to drown the interesting HN comments in a heap of "hey, my favorite language also compile
230.
▲
by
sjrd
10y ago
The problem with wasm right now is that it gives you very little in terms of interoperability with JavaScript. You simply cannot manipulate JS objects (including DOM objects) from wasm. Compiling a language like BuckleScript to wasm is ther
231.
▲
by
sjrd
10y ago
I added Scala.js in the comments.
232.
▲
by
sjrd
10y ago
"We want you to help us! [...] Ideas for real ES2015 performance test suite." * Take a language that compiles to JS, with the option to target either ES5.1 features or ES2015 features. For example, Scala.js. * Take a macro-benchma
233.
▲
by
sjrd
10y ago
Scala ( https://github.com/scala/scala ) is completely developed on GitHub with Pull Requests requiring reviews being the only way commits can enter master. Issues are in a separate JIRA instance, although there is curre
234.
▲
by
sjrd
10y ago
Or much simpler: do not allow merge conflicts to happen in the first place! Any Pull Request that shows with merge conflicts must be rebased on top of the target branch. Problem solved.
235.
▲
by
sjrd
10y ago
Not if you want to manipulate the DOM or use many of the browser APIs, AFAICT.
236.
▲
by
sjrd
10y ago
I guess my comment qualifies as bashing. It still is what I think, though. Look at your own code from https://github.com/kika/purescript-google-appsscript/tree/ma... There is more JS code than PureScript! Why
237.
▲
by
sjrd
10y ago
Scala.js is not only about making your Scala app run in the browser. It's also (and mainly) about letting you develop in Scala for the Web environment, which includes manipulating the DOM and calling any existing JavaScript library. Sc
238.
▲
by
sjrd
10y ago
No. To be more precise, it does a completely different job. As I said in another comment, it isn't actually a Scala compiler. Comparing it to Scala.js is nonsense to begin with.
239.
▲
by
sjrd
10y ago
> and dead simple FFI That's very accurate. So dead simple that as soon as you want to manipulate something else than primitive values and functions from JS, you hit a dead end. How do you read a field from a JS object? How do y
240.
▲
by
sjrd
10y ago
If you want to compile your Scala code to JavaScript, there's already a widely accepted and stable solution: https://www.scala-js.org/
More ›