Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
leshow
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
67 ms
·
721.
▲
by
leshow
9y ago
Either pay a ridiculous fee or wait a ridiculous amount of time for confirmation? Replace by fee is a thing, as long as the tx is unconfirmed it could be replaced. You're effectively saying the wait time is now 3 days unless you want t
722.
▲
by
leshow
9y ago
Should there be? Seems pointless to target every paper for entry level understanding, paper length would grow exponentially and it would quickly become unreadable.
723.
▲
by
leshow
9y ago
Maybe I'm not clear on how a btc debit works but that seems foolish. Maybe a few years ago when it could actually function as a medium of exchange. Now the transaction fees are exorbitant.
724.
▲
by
leshow
9y ago
Do you have any sources for those numbers or did it just feel right to type them?
725.
▲
by
leshow
9y ago
That's a silly distinction. It's also wrong. Rust 'binds data to methods and has a concept of "data.method()"' and is not OO by any meaningful definition. It's simply sugar for Trait::method(&data).
726.
▲
by
leshow
9y ago
light generics? C++ has very powerful generics and has had them for a long time, going under the name 'template metaprogramming'.
727.
▲
by
leshow
9y ago
Curious, what in your opinion is 'the right answer' in regards to parametric polymorphism?
728.
▲
by
leshow
9y ago
JS had first class functions from the beginning, which I think is one of the major things necessary for FP. Compare that with a language like Java, which did not, and I think still doesn't (lambda's aren't quite the same). JS
729.
▲
by
leshow
9y ago
I'd suspect the more exercise you do the more that number moves up, you'd be breathing harder. I'd hesitate to try and put a 'hard limit' on anything like this.
730.
▲
by
leshow
9y ago
How often do you see redux used with anything other than react? Or are you just talking about redux working with react alternatives like preact/inferno, etc? You're not wrong, but practically 99% of people pair it with react.
731.
▲
by
leshow
9y ago
Except we can't. If the last 50 years has shown us anything it's that we're utterly incapable of keeping drugs away from drug users. All we are doing is locking people with substance abuse problems up. We've proven over
732.
▲
by
leshow
9y ago
You can write type annotations in 3. The benefits there are the same that come with most optional typing. https://docs.python.org/3/library/typing.html
733.
▲
by
leshow
9y ago
It makes me smile that this type of programming is starting to influence so many things. You see it even in Swift with 'protocols' and 'extensions'. Typeclasses are a fantastic method of abstraction. I remember watching
734.
▲
by
leshow
9y ago
Not necessarily even html, you could write your HTML in a DSL of some sort, write functions that generate HTML, etc. Using that you could keep the backend homogeneous. For example, something like https://jaspervdj.be/blaze&#
735.
▲
by
leshow
9y ago
This is like moving from Kotlin to Java or something similar. Within the domain of languages, you haven't moved that much. You stayed with dynamic type system and a JIT or interpretor. Besides a little change in syntax, what else is th
736.
▲
by
leshow
9y ago
doesnt work on FF either
737.
▲
by
leshow
9y ago
I'd just like to comment that TEA (the elm architecture) has changed a bit now, and been baked into the langauge. They've made it very tedious to abstract any state away from global, and so those examples have been removed (if you
738.
▲
by
leshow
9y ago
Still, pretty odd. It'd be like calling Go "Haskell-zero"
739.
▲
by
leshow
9y ago
Events aren't stored by default. You can store them, and it sure makes creating those types of applications easier, but that's more because you've bought at least partially into referential transparency and pure functions in
740.
▲
by
leshow
9y ago
> This is called "constrained parametric polymorphism" The more common terminology is ad-hoc polymorphism AFAIK.
741.
▲
by
leshow
9y ago
his is a function that returns a function, i.e. you'd need to call atLeastTwo(x)(); to get a result, yours is just a function. in es6 the equivalent thing to what he wrote would be: const atLeastTwo = x => () => Math.max(2,
742.
▲
by
leshow
9y ago
From the documentation of Array for Swift it has the same behaviour as Rust's Vec (it's growable, it allocates double the capacity after reaching max length). I'd find it pretty odd if it didn't share the same 3 word len
743.
▲
by
leshow
9y ago
I don't know Swift, but non-mutable borrows are useful in a large number of languages. Are you sure a String is represented as a single reference? In Rust a String has a reference to the actual contents on the heap, a length, and a cap
744.
▲
by
leshow
9y ago
> (Swift operators are just normal functions with special call syntax.) Coming from Haskell and Rust it's nice to see this trend catching on. Is Swift planning to introduce a distinction between borrows and mutable borrows to the us
745.
▲
by
leshow
9y ago
what does & do in Swift then? And what's the purpose of even having inout and & if you can't count on the code to actually be an address?
746.
▲
by
leshow
9y ago
Isn't the mutable borrow ended after the end of the x += 1 line? leaving you free to read the contents of the ptr? I don't know swift at all. but from their document on swapAt() it looks like they are trying to prevent two fn(&
747.
▲
by
leshow
9y ago
You're rephrasing exactly what I said: > The Rust compiler inherently doesn't trust ffi calls. That doesn't mean necessarily that the call is actually unsafe.
748.
▲
by
leshow
9y ago
That's interesting, I always assumed parametric polymorphism was a requirement of ad hoc polymorphism. I suppose I'm using a more narrow definition. On the opposite end, Elm for instance, has parametric polymorphism: type Parametr
749.
▲
by
leshow
9y ago
I think calling Rust that would confuse people more than anything. They will look for their traditional inheritance style relationships and be frustrated that there is not really any support for it. Better to teach the features that Rust ac
750.
▲
by
leshow
9y ago
What kind of polymorphism? Traditional OOP is subtype polymorphism. You can't really do that in Rust. It's main polymorphism is parametric and ad-hoc polymorphism a la Haskell. If that's considered OOP then OOP is so broad it
More ›