Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
bjz_
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
34 ms
·
301.
▲
by
bjz_
10y ago
Rustler looks quite nice for embedding native code in Elixir btw: https://github.com/hansihe/Rustler - I had some issues getting it running at first, but the author was very responsive.
302.
▲
by
bjz_
10y ago
Ah, woops - didn't realise that Reason was such a thin syntactic layer over the semantics of OCaml. That approach makes sense then.
303.
▲
by
bjz_
10y ago
The difference between curried langs like OCaml and Haskell and languages like Ruby and Elixir are that the leaving out of parens actually means something, ie. all functions take one argument. If you wanted parens whilst maintaining the s
304.
▲
by
bjz_
10y ago
Would be nice to see modular implicits like those that are being proposed for OCaml. It's a shame to not have any form of ad-hoc polymorphism.
305.
▲
by
bjz_
10y ago
Why on earth would LDC use C when it has access to LLVM IR? Edit: A cursory look seems to suggest they do translate to IR: https://github.com/ldc-developers/ldc/tree/master/ir
306.
▲
by
bjz_
10y ago
C might be decent for the short term, but if your language is at the stage of trying to be adopted, I'd rather see some IR output with a C ffi. You have to take into account what semantics you are saddled with as you go through the tra
307.
▲
by
bjz_
10y ago
Interesting side-note: Rust's `HashSet<T>` is actually implemented by wrapping a `HashMap<T, ()>`. But because `()` is zero-sized (unlike a boolean), Rust can optimise a ton of stuff out.
308.
▲
by
bjz_
10y ago
For something that is in memory and throw-away, why go through a DB?
309.
▲
by
bjz_
10y ago
Is the plan to start advocating for using rustup on the homepage?
310.
▲
by
bjz_
10y ago
Tools are just band-aids over an unsafe type system, and they are all too easy to ignore or never use them in the first place.
311.
▲
by
bjz_
10y ago
the rust compiler is out of date :(
312.
▲
by
bjz_
10y ago
Despite some niceties like union types, Dialyzer is pretty limited. For example, here is example of something I would expect to be able to express in a modern type system but is not possible with Dialyzer (as far as I know): @spec foo
313.
▲
by
bjz_
10y ago
> From a high-level-language standpoint, static typing is a crutch I see types as a high-level design tool. They allow me to reason about a domain, and figure out how to structure things at a high level before delving into the implementa
314.
▲
by
bjz_
10y ago
> It does sacrifice a little expressiveness. But in languages that have dedicated syntax like ranges for iterating over sequential numbers, the ++ and -- operators end up pretty rarely used so it's no big loss. This is one of the bi
315.
▲
by
bjz_
10y ago
You should be hiding naked mutation/accumulation like that in some abstraction. ++ is a smell that alerts you to the fact that you should probably be thinking in a different way.
316.
▲
by
bjz_
10y ago
We've begun to use Elixir and Phoenix at work, and it's far nicer to work with than Rails - there's far less magic going on, and being functional, there is much less mutable state to keep in your head. That said, I still miss
317.
▲
by
bjz_
10y ago
Weird widgets that you don't normally see Cocoa OSX apps, like toolbars or non-standard file pickers. The worst offenders are those tabbed form widgets with the pill buttons: http://doc.qt.io/qt-5/qtwidgets-index.h
318.
▲
by
bjz_
10y ago
Great description, and makes me feel less handicapped for not having a very vivid mind's eye. I wounder though whether somebody with aphantasia could really understand that description. After all, they would have to actually visualise
319.
▲
by
bjz_
10y ago
I can definitely visualise things in my head, but it takes effort to resolve things into clearer detail. It's more hazy and abstract than normal vision. I've never really thought about it until now. I would be fascinated to know i
320.
▲
by
bjz_
11y ago
That's weather not climate. Be careful of making statements like that, because next year it might not be as cooler, and you'll have seemingly fueling the misguided arguments of the deniers. It's not just you though. Even the
321.
▲
by
bjz_
11y ago
I would say that it compromises between ML/Haskell-style FP and procedural. It doesn't have much to do with OO, bar trait objects, and the dot operator (which is almost entirely syntactic sugar). It's a gateway drug to ML
322.
▲
by
bjz_
11y ago
> Every time I give Ruby another chance (admittedly, not too often), I end up feeling angry. I use Ruby every day at work. I end most days feeling angry. You never have any real idea what is going on due to the layers and layers of metap
323.
▲
by
bjz_
11y ago
Do note that the sea ice extent has little to do with what the ice sheets are doing. From what I last heard (my information might be out of date), the slight increase in sea ice extent in the south pole could be due to changes in winds or o
324.
▲
by
bjz_
11y ago
Probably not that much. What worries me is feedback loops like the melting permafrost, and collapse of the Amazon ecosystem. Or the loss of ice causing more sunlight to be absorbed. Or a sudden overflow of the ocean's ability to store
325.
▲
by
bjz_
11y ago
Unfortunately no matter how much you say that weather != climate, it's damn hard to get past natural human tendencies. :(
326.
▲
by
bjz_
11y ago
Rust's traits were indeed inspired by typeclasses, so those coming from Haskell shouldn't have much difficulty with these kinds of errors. The tricky thing is trying to make it easier for those who don't have that experience.
327.
▲
by
bjz_
11y ago
It's a reasonably easy error to figure out if you are used to type systems like Rust's, but for those coming from dynamic languages or templated languages like C++ it might take a bit more of a leap to figure it out. It's now
328.
▲
by
bjz_
11y ago
Yeah, Elm has a far simpler type system at the moment (no ad-hoc polymorphism for example), so it cuts down on the difficulty of experimenting with new ways of displaying errors. Which I think is a good thing to do, especially seeing as one
329.
▲
by
bjz_
11y ago
> You are being protected against panics that might have resulted from passing vectors of non-printable types in. Not quite. Rust's generics are instantiated statically - the compiler generates code specific to the type parameters p
330.
▲
by
bjz_
11y ago
What were the drawbacks?
More ›