Live data from Hacker News

What was the last breakthrough in computer programming? (2019)

quora.com

131–140 of 226 posts

Re: What was the last breakthrough in computer programming? (2019)

#131
post #25

There isn't so much in languages features themselves, but in their implementations. GC can be largely pauseless for many practical purposes and a GC language can be within 2x-3x the performance of C-like languages. Also the amount/cost of memory has improved so that we can use immutable datastructures and functional style in many contexts, which definitely feels like a 'level-up'. Concurrency has been getting easier…

It's nice to read a positive comment like yours occasionally, because the vast majority of the time, I'm just disappointed in how bad our programming tools (including languages) are. It's become a meme in my office that I'm the guy constantly bitching about how stupid our languages are. This week I was back on my soap box about the fact that almost zero mainstream (statically typed) programming languages can even let…

Perhaps via some monad, like Swift optionals?

Unless it isn’t a monad and I still haven’t understood those?

Re: What was the last breakthrough in computer programming? (2019)

#132

Earlier quoted context omitted.

Ada's good, but it will never win. The open source compilers are solid, but no one wants to learn it. It's (depending on who you ask): Too old, too verbose, BDSM programming, not Rust, not Haskell, not C. It has a lot of positive features going for it, but it is verbose. That verbosity is a major distraction for people who can't handle it, they want their very short keywords or, better, no keywords just symbols. Curl…

Give it a new syntax, and try again… It's not so difficult nowadays to write a "syntax-transpiler". The hard part, the language, would remain the same. People seem having done so successfully with OCaml, see ReScript.

The verbosity can only be removed at a superficial level. Many people object to begin and end, but they’d chafe even more if they got further. For good reasons (Ada leans toward explicit declarations in favor of implicit ones) you have to list each sub program you depend on in a module by name. Even if you don’t import it’s symbols. And you have to explicitly instantiate generics (like C++ templates) rather than the compiler inferring your intention. Things like that cannot be removed from the language so only a superficial improvement can be achieved, for what benefit?

Re: What was the last breakthrough in computer programming? (2019)

#133
post #107
post #94

Earlier quoted context omitted.

Right. And I look forward to advances in them. I can count how many times this would have actually helped my program, though...

Why do you think that? It might require a different mental model of types in order to see the benefits but I can't believe anyone is working on a project that doesn't have any sort of properties or 'business' logic that dependent types wouldn't help encode. Have you read anything about type-driven development? https://blog.ploeh.dk/2015/08/10/type-driven-development/

I didn't mean for that to read as dismissive as it clearly does. Should have waited till I had more to say. :)

I don't think the number of places dependent typing could have helped me is zero. Just like linear typing is nice. I just know that many of the dependencies I work with are much more dynamic in nature, such that getting them in static types has tough ROI to justify.

Bluntly, the hardest program failures I've ever seen have been second systems from people learning generics and higher kinded types. I'm convinced these techniques are worth learning. I'm not convinced that they provide the immediate return on effort that they are usually sold with.

Re: What was the last breakthrough in computer programming? (2019)

#134
post #130

Earlier quoted context omitted.

> conforming to the specification for email addresses You mean something that roughly matches this obvious regex: \A(?:[a-z0-9!#$%&'*+/=?^_‘{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_‘{|}~-]+)* | "(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f] | \\[\x01-\x09\x0b\x0c\x0e-\x7f])*") @ (?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])? | \[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3} (?:25[0-5]|2[0…

Thats propably because you are looking inlined assembly of definition. If you name and reuse all the partial patterns it become much more clear. Though regex is cool obfuscation method.

It would be than at least 3/4 of a page long I guess.

The fun part is this is not even the full truth. As the list of TLD isn't very static any more it's additionally difficult to determine whether a host name is valid. That is only possible with some dynamic list (or a regex that would grow indefinitely and ever change). The presented solution doesn't even take this into account.

The source page I've linked is a quite interesting read on that whole topic.

Re: What was the last breakthrough in computer programming? (2019)

#135

Earlier quoted context omitted.

Give it a new syntax, and try again… It's not so difficult nowadays to write a "syntax-transpiler". The hard part, the language, would remain the same. People seem having done so successfully with OCaml, see ReScript.

The verbosity can only be removed at a superficial level. Many people object to begin and end, but they’d chafe even more if they got further. For good reasons (Ada leans toward explicit declarations in favor of implicit ones) you have to list each sub program you depend on in a module by name. Even if you don’t import it’s symbols. And you have to explicitly instantiate generics (like C++ templates) rather than the…

It's difficult to design whole languages (you won't get anywhere close some adoption in production at important places under ten years I guess; if you're lucky of course). Having already something that proved its merit and strong foundations is for sure a good starter for a "new language" (as it would streamline the process to create such "new" language drastically).

People are carving for powerful, safe, fast languages. So there is a market.

If it's "only" about the verbosity and some cumbersome edges this could be fixed with some "overlay syntax".

To be honest I'm one of those people that looked a few times at Ada as it was said to be powerful, fast, and safe. But it looks so awkward in my eyes; even I know I should not judge languages by syntax! The look-and-feel is just a strong point. I guess it's not only me…

So I suspect a syntactic make-over could give new life to an old but powerful language. Just by making it look more "modern" (whatever this means).

Re: What was the last breakthrough in computer programming? (2019)

#136
post #130

Earlier quoted context omitted.

Thats propably because you are looking inlined assembly of definition. If you name and reuse all the partial patterns it become much more clear. Though regex is cool obfuscation method.

It would be than at least 3/4 of a page long I guess. The fun part is this is not even the full truth. As the list of TLD isn't very static any more it's additionally difficult to determine whether a host name is valid. That is only possible with some dynamic list (or a regex that would grow indefinitely and ever change). The presented solution doesn't even take this into account. The source page I've linked is a qui…

You propably would want to reuse referenced definitions like domain and IP which are not email specific. But yes all of our JS could be much shorter if we used APL but most of us like readability :P

I kind of not get why TLD should be validated. Does it matter anymore than if sub domain is not registered of if IP is not reachable. I think valid as potentially deliverable and actually deliverable should be distincted (like well formed XML and schema validated XML).

Re: What was the last breakthrough in computer programming? (2019)

#137
post #67
post #25

Earlier quoted context omitted.

It's nice to read a positive comment like yours occasionally, because the vast majority of the time, I'm just disappointed in how bad our programming tools (including languages) are. It's become a meme in my office that I'm the guy constantly bitching about how stupid our languages are. This week I was back on my soap box about the fact that almost zero mainstream (statically typed) programming languages can even let…

I'm not so sure that I sympathize with your example. Why not a type for even numbers? Odd, prime, not-prime, etc? You really are asking for a type that is "valid data." Commendable, but not a static property of data. As a fun example, what is a valid email address? Once established as valid, how long will it stay that way? If invalid, how long until it can become valid? Do I think better typing can be a boon? Absolut…

> Why not a type for even numbers? Odd, prime, not-prime, etc?

Those are not mathematical entities in the same way as are the sets W (whole numbers) or N (natural numbers, indices). It is reasonable to specify your domain closely, otherwise you end up with sqlite.

"Why not a type for datetimes or complex numbers?" would be a better question, as those are different kinds of things but not quite so frequently used in programming.

Re: What was the last breakthrough in computer programming? (2019)

#138
post #25

Earlier quoted context omitted.

It's nice to read a positive comment like yours occasionally, because the vast majority of the time, I'm just disappointed in how bad our programming tools (including languages) are. It's become a meme in my office that I'm the guy constantly bitching about how stupid our languages are. This week I was back on my soap box about the fact that almost zero mainstream (statically typed) programming languages can even let…

You're looking for refinement-types? Scala to the rescue: https://github.com/fthomas/refined And a new one: https://github.com/Iltotore/iron/ The latter will be zero overhead once a compiler ticket is closed. Both solutions will yield compile time checks where possible, and fall back to runtime checks when the data isn't statically known.

Related to refinement-types is the concept of "parsing, not validating":

https://news.ycombinator.com/item?id=21476261

https://news.ycombinator.com/item?id=27166162

Re: What was the last breakthrough in computer programming? (2019)

#139
post #67

Earlier quoted context omitted.

I'm not so sure that I sympathize with your example. Why not a type for even numbers? Odd, prime, not-prime, etc? You really are asking for a type that is "valid data." Commendable, but not a static property of data. As a fun example, what is a valid email address? Once established as valid, how long will it stay that way? If invalid, how long until it can become valid? Do I think better typing can be a boon? Absolut…

> Why not a type for even numbers? Odd, prime, not-prime, etc? Those are not mathematical entities in the same way as are the sets W (whole numbers) or N (natural numbers, indices). It is reasonable to specify your domain closely, otherwise you end up with sqlite. "Why not a type for datetimes or complex numbers?" would be a better question, as those are different kinds of things but not quite so frequently used in p…

I would question that primes are not mathematical entities.

Same for other sets like "not-primes", or the odd numbers.

Sets can be nicely approximated with types. (Some people say even that types correspond directly to sets).

Re: What was the last breakthrough in computer programming? (2019)

#140
post #25

Earlier quoted context omitted.

It's nice to read a positive comment like yours occasionally, because the vast majority of the time, I'm just disappointed in how bad our programming tools (including languages) are. It's become a meme in my office that I'm the guy constantly bitching about how stupid our languages are. This week I was back on my soap box about the fact that almost zero mainstream (statically typed) programming languages can even let…

> How many times did you write "int" when you actually only wanted a positive number? subtracting one from zero and getting max_uint can be its own brand of fucking horribly awful. having the language itself throw in that circumstance can also be exactly what you don't want.

Nah, unsigned ints are magical. Why check

   (i  n)
when you can just simplify it to

   (i > n)
after verifying that n < max_uint?
Post reply on HN