Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
uryga
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
55 ms
·
511.
▲
by
uryga
8y ago
The JVM Haskell is called Eta (I also heard of another similar project, Frege). Idris is Haskell-ish, but it has Dependent Types - the "new" typing hotness - which offer typing even more advanced/fine-grained than Haskell[1].
512.
▲
by
uryga
8y ago
> Python has examples like `foo += bar` being sugar for `foo = foo + bar`. Nitpick, but I don't think that's true – AFAIK they translate into different method calls. `foo + bar` →`foo.__add__(bar)` `foo += bar` → `fo
513.
▲
by
uryga
8y ago
I think that the timescale on which humans live matters here. The year field doesn't change often, so for the everyday usecase it's kind of redundant – it's probably the current year, so specifying it first is kind of noisy
514.
▲
by
uryga
8y ago
To be honest I just repeated back stuff I read about K, as I haven't gotten into K enough to hit these limits. Commentary from someone with actual experience is great, thanks!
515.
▲
by
uryga
8y ago
IIRC, the K language's interpreter is/was really fast because it's tiny and fits in the processor's cache.
516.
▲
by
uryga
8y ago
"both are using vector instructions (these registers are shared between the two hyperthreads)" So I guessing GP meant there's going to be contention for those registers, and thus no speedup?
517.
▲
by
uryga
8y ago
with a tinfoil hat on, you could say that this is a very convenient rebranding ;)
518.
▲
by
uryga
8y ago
Well, there's K, along with its flagship database KDB which lets you write SQL-like queries and, from what I've heard, integrates very nicely with the language. idk how good their FFI story is. Unfortunately, you need to pay for c
519.
▲
by
uryga
8y ago
That's the feeling I got from the readme, but GP sounds like this particular decision was made not so much for 'philosophical' reasons, as because Black-ing a file twice might give different results. I was curious why :)
520.
▲
by
uryga
8y ago
> Black would sometimes change its mind about its own formatting and a second pass would cause a different formatting than the first Why not? I mean, I never built a formatter so idk about the complexity involved, but to me it seems that
521.
▲
by
uryga
8y ago
Another comment in this thread mentioned a similar project, a Swing "napkin" theme, which managed a rough look as normal styling. So I guess Swing did something better than HTML/CSS - from skimming the comments i gathered t
522.
▲
by
uryga
8y ago
> your render will never finish with physically correct subsurface scattering did you mean "will take a very long time", or "won't actually terminate"? if the latter, why? that sounds really interesting!
523.
▲
by
uryga
8y ago
Noooo, it's "fnn"!
524.
▲
by
uryga
8y ago
Wow, kivy's material theme improved a LOT since I last saw it a few years ago.
525.
▲
by
uryga
8y ago
I didn't mean to say GT has understanding, quite the opposite ;) I meant to use it as an example of how translating without understanding doesn't go too well in many cases. I think I might have misunderstood your original comment
526.
▲
by
uryga
8y ago
Correct me if I'm wrong – are you saying that one doesn't need to understand something to be able to translate it? Because that'd be a strange argument to make, looking at the state of Google Translate.
527.
▲
by
uryga
8y ago
Also, thinking about it further, it's relatively easy to "lift" a function `String → Baz` to operate on structs like `{x: Int, y: Int, z: String}` (see Haskell's Lens), but it's not really possible to do it the othe
528.
▲
by
uryga
8y ago
You're right, but it can still make it obvious to the reader that you don't actually use all of the struct in a function. I think GP meant something like this: (Haskell syntax) -- struct with three fields data Bar = Bar {
529.
▲
by
uryga
8y ago
I've been thinking about this recently. I like passing a struct if all/most of its attributes are used. But if the struct has, say, six attributes, and the function uses only two, it might be clearer if the function only took thos
530.
▲
by
uryga
8y ago
> Some Bitcoin users have become so wealthy that they are donating millions to charities Couldn't you say that about anything that ever profited anyone? > The mining industry is pushing so hard for low electricity prices Does it
531.
▲
by
uryga
8y ago
What threads do you mean? (The only thing that comes to mind is HoTT stuff, but that's kind of over my head for now)
532.
▲
by
uryga
8y ago
I'm using the type annotations from `typing` in a Python 3.5 project I'm working on, but only as a form of documentation. Unfortunately mypy doesn't work for me – the project heavily uses a namedtuple-style sum type library,
533.
▲
by
uryga
8y ago
True! That was just off the top of my head. I suppose you could imagine some kind of really smart dynamic analyzer which looks at the list length before starting the reduce and goes "oh, I'm going to repeat this over 500 times,
534.
▲
by
uryga
8y ago
Haven't tested it (or even read the article :) ), but maybe some kind of JIT optimization kicks in the 1000 element case (ie afer the "loop" ran enough times) but not in the others?
535.
▲
by
uryga
8y ago
Thanks! I'll dig into it later, as I've been looking for a tool like his, and it so happens that the details are interesting to me :) (I built my own namedtuple-style library for sum types, go figure). It didn't seem like th
536.
▲
by
uryga
8y ago
I don't see a contradiction here. (speaking as a Python and Haskell user): 1 - dynamic languages, while granting great freedom, make it easy to shoot yourself in the foot with simple typing bugs, so we cope by adding type checking 2 -
537.
▲
by
uryga
8y ago
I'd be happy to be corrected on this, but the documentation seems a bit... bare? I've used mypy, and I'm interested in types more complicated than `foo() -> int`. I'd like to see how pyre handles generic stuff, unions
538.
▲
by
uryga
8y ago
Nobody said it's easy to implement :) I'm curious - what differences do you have in mind?
539.
▲
by
uryga
8y ago
This isn't censorship...
540.
▲
by
uryga
8y ago
my favorite snack is "" ! (pronounced " ")
More ›