Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Skinney
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
33 ms
·
331.
▲
by
Skinney
9y ago
How do you know when you're using a SPA and when you're not? Seems to me, a well designed SPA is indistinguishable from a regular HTML site unless you're actively looking at the network tab. Could it be that you have a bad im
332.
▲
by
Skinney
9y ago
Technically, in a SPA, the browser isn't waiting. Clicking the link just triggers a function call.
333.
▲
by
Skinney
9y ago
I know, react is pretty big. Preact is great if using Javascript, otherwise Elm is pretty awesome as well.
334.
▲
by
Skinney
9y ago
How hard it is to get things right? It's not hard at all. It's builtin with frameworks like Ember or Angular, and for React you got react-router which does things correctly by default. It's just bad programming. I don't
335.
▲
by
Skinney
9y ago
The original post did not make that claim. It said Elm made you handle errors where they can happen. It said nothing about handling it well. Typescript will not remind you every where an error will happen, and so it is very likely that you
336.
▲
by
Skinney
9y ago
The difference here, is that a lazy programmer, when forced to handle this particular case, would use "Debug.crash 'should not happen'", which causes the Elm application to crash at runtime. The TypeScript program doesn&
337.
▲
by
Skinney
9y ago
It's not different from Elm. My point was that Elm forces you to do it, there's no way around. With Javascript+Flow or TypeScript, you need discipline to end up with code that is as reliable as Elm. Me, personally, I take short-cu
338.
▲
by
Skinney
9y ago
> ... it will still be a runtime exception ... No. > The only difference in your example probably is that Elm will force you to handle the case where your interface doesn't match the response object Which means that no exception
339.
▲
by
Skinney
9y ago
Not sure what you mean. It's normal that different packages have their own version of a given function, like List.map3, Json.map3 etc. But the implementation is different, so it's not copy-paste. It has to be this way in cases whe
340.
▲
by
Skinney
9y ago
Cool! Does it enforce third-party libraries as well? A thing that typescript and/or flow doesn't support, is JSON. What if a JSON object doesn't match the type? This can cause sneaky bugs later :/ I'm not saying tha
341.
▲
by
Skinney
9y ago
json.loads('foo.json') (what is that? python?) requires that the json matches your types exactelly. This, at least for me, is rarely the case. And yes, it is. Here is code from my own project: Json.map3 HintTemplate
342.
▲
by
Skinney
9y ago
Why? Elm has generics.
343.
▲
by
Skinney
9y ago
And Go has an entire book on how to use the database/sql package. Does that mean the database/sql package is hard? Is React difficult because there is online courses? Is Bootstrap? Of course not.
344.
▲
by
Skinney
9y ago
I used several FP languages before coming to Elm, like F# and ClojureScript. I prefer Elm, been using it for about two years, and haven't missed something like interfaces at all. Then again, I'm also one of those wierdos who think
345.
▲
by
Skinney
9y ago
I've used both Typescript and Flow, and this breaks down in practice. At least, it did for me. Problem with both Typescript and Flow is that it requires discipline from you, your team, and those who provide third party libraries. If so
346.
▲
by
Skinney
9y ago
Or that the documentation can be improved, or the API could be improved, or a number of other things. But really, JSON encoding/decoding in Elm boils down to specifying what the type of an object's field is. If that is difficult,
347.
▲
by
Skinney
9y ago
> I have yet to see a FRP library that allows you to just use a component without introducing boilerplate. Given all the benefits of Elm, 6 lines of boiler plate (one line added in model, 5 lines added in update) is a small price to pay
348.
▲
by
Skinney
9y ago
1) I don't see a problem with this. If you have stale state, but no one sees it, who cares? Same thing regarding cleaning it up, if no one notices when, who cares? The great thing about storing all the data in a top-level datastructure
349.
▲
by
Skinney
10y ago
Direct use of the storage medium for everything would negate the advantages Datomic offer. The beautiful part of Datomic is that you can perform an expensive query without having any effect on other peers. Since Datomic also stores datoms i
350.
▲
by
Skinney
10y ago
clojurescript still requires clojure for macros, no?
351.
▲
by
Skinney
10y ago
Distributed systems is the goal for the next milestone of Eve. Remember that Eve is still in early alpha.
352.
▲
by
Skinney
10y ago
Html.App used to be a namespace, I suspect you mean Program? In any case, how is that any more, or less, magic than Signals? Considering that the compiler has removed syntax in later versions, later versions of Elm has less magic than earli
353.
▲
by
Skinney
10y ago
When targeting an ES6/ES2015 compatible runtime like node or electron (which VS Code runs on), typescript essentially just strips away the type information. It only generates boilerplate when the underlying runtime doesn't support
354.
▲
by
Skinney
10y ago
Yes, but that's not new in 0.18
355.
▲
by
Skinney
10y ago
> The more stuff that becomes compiler magic the worse the language is going to get IMO. Not sure what you mean here. Elm 0.18 has less compiler magic, not more.
356.
▲
by
Skinney
10y ago
Http does allow you to get the raw data and treat it as you will. It also isn't that much code. Check out the custom requests section of the documentation.
357.
▲
by
Skinney
10y ago
Yeah, but it's more difficult to teach others Haskell (what's a monad?) than Go. I know all three languages, I mostly prefer Go for backend work because it's easier for others to join in on. Point is that they all have their
358.
▲
by
Skinney
10y ago
It's compiled to erlang bytecode, yes, but not to machine code. You do have the option of doing that, but I do believe you miss out on live updates? Not sure. Erlang is great though, especially Elixir, but for some use cases Go is bett
359.
▲
by
Skinney
10y ago
Erlang isn't necessarily better than Go in this regard. Since Erlang is interpreted and everything has to copied between processes, Go is bound to be faster than Erlang, especially when it comes to parallelism. Go is also statically ty
360.
▲
by
Skinney
10y ago
Here's how I view our conversation thus far. I said "Evan doesn't feel the need to add typeclasses right now." You said "He is thinking about maybe adding it in the future." Then I said "I know, that'
More ›