Live data from Hacker News

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

quora.com

161–170 of 226 posts

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

#161
post #56

Earlier quoted context omitted.

Your comment kind of galvanizes my view that most of us suffer from Stockholm Syndrome with respect to our programming languages. As another commenter said, some statically typed languages give you unsigned numbers. Maybe most of them do. But definitely not some of the most popular ones. And out of the ones that do, they are often really unhelpful. C's unsigned numbers and implicit conversions are full of foot-guns.…

> We don't even need empty strings (or collections, really) if we have null. This feels exactly backwards to me: I almost always want my sequence-like types to have a well-defined zero-length element, and I almost never want to allow a NULL value for a variable. NULL is so much worse than [] or ''. Think about concat(). When the trivial members of a type support most of the same behaviors as the nontrivial ones, that…

Of course you're right! That statement was intended to be hyperbolic. I'm not actually suggesting that it would be a good idea to NOT have zero-sized collections.

I'm just exasperated that most of these modern, statically typed languages, give us TWO ways to write "nothing" (null and empty) and ZERO ways to write "must have something".

You COULD, theoretically, write a concat() that takes multiple, nullable, non-empty strings and returns a nullable non-empty string. Of course that's not ideal and would be horribly unergonomic. But you COULD do it. But how do you write a concat() that statically guarantees that if any of its arguments are non-empty that its output will be non-empty? You pretty much don't.

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

#162
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.

> subtracting one from zero and getting max_uint can be its own brand of fucking horribly awful.

Agreed. Silent wrap-around on overflow is also a really terrible idea.

> having the language itself throw in that circumstance can also be exactly what you don't want.

Then you have to check before you do it. Or call a special overflowing function. The default should absolutely be a crash. That wouldn't even really be anything new: what happens when you divide by zero in most languages? Index an array with an index > length? Should the array index just wrap around and give you the element at length % index?

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

#163

Earlier quoted context omitted.

YouTube. My son learns a lot of his programming from searching YouTube and watching videos. Doesn't seem like it would be high density, but I'm amazed that there are really good videos/tutorials on pretty obscure topics. And since all YouTube videos have dates, it's actually easier to find current tutorials.

Are those tutorials good because they're videos, or despite being videos? I'm inclined to believe the latter. What sort of content is there in programming lessons that wouldn't be better presented as text?

They are probably better as videos. For example for Roblox Studio, the content in videos is better as it is clear exactly what you need to do.

More importantly the content is easier to produce as a video, which allows a lot more content to be generated.

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

#164
post #64

SAT solvers applied. You can now solve unsolvable problems, like practical formal verification in big C/C++ codebases. There's no need anymore to write test cases, as formal verification tries all possible input values, not just a few selected. It also checks all possible error cases, not just the ones you thought about.

Could you expand on what you mean by this? Because it sounds like a level of hype bordering on nonsense. 1. How is a SAT solver going to do formal verification? How do you turn a formal verification into a SAT problem? 2. You can only formally verify what your formal verifier can handle, which is usually somewhat less than "everything". Can your SAT-driven formal verifier verify that the worst case response time of t…

Lookup what CBMC does.

SAT solvers will also be also be applied in traditional compilers soon.

The remaining problem with formal verification and compilation is proof of termination, which is not a SAT problem.

Running all test cases via cbcm is magnitudes faster than writing 100% coverage (only line cov, not covered values) tests. It's like one day vs one month. And I've never seen code with full value test coverage.

For guaranteed timing you need special tests, not a SAT solvers. The solver just helps with the proofs.

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

#165
post #133
post #107

Earlier quoted context omitted.

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…

That's fair, I somewhat agree - especially regarding the ROI to begin with :)

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

#166
post #28

So if Pizza Hut wants a checkout cart they need to rent a supercomputer to plan the implementation?

He was speaking as if it was still 1980s. Now we have cloud based ML doing the optimization finding. ML will (eventually) be able to generate biz logic code, and most assuredly infrastructure config (a cloud API has a limited set of possible configs of value to our sorting patterns), UI code (we gravitate towards a limited set of UX it seems), to solve much of our daily programming work. ML can’t invent future ideas,…

> ML can’t invent future ideas, it can’t evolve itself without us making new hardware for it. But it will implode the blue collar dev job market eventually.

I have doubts about that. Open source code seem to achieve a large part of the same function as ML (implement "boring" code for the Xth time) but it only has increased the number of blue collar devs. On the other hand, some no-code tools are opening programming to a large number of people (Excel, actions with your iPhone, things like that). Programming is one of those things that everyone would benefit from knowing, but time is limited, so anything to lower the barrier of entry will just lead to more programming. And more programming means even more programming (someone has to develop the no-code tools, the cloud infrastructure, etc).

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

#167
post #28

So if Pizza Hut wants a checkout cart they need to rent a supercomputer to plan the implementation?

He was speaking as if it was still 1980s. Now we have cloud based ML doing the optimization finding. ML will (eventually) be able to generate biz logic code, and most assuredly infrastructure config (a cloud API has a limited set of possible configs of value to our sorting patterns), UI code (we gravitate towards a limited set of UX it seems), to solve much of our daily programming work. ML can’t invent future ideas,…

> But it will implode the blue collar dev job market eventually.

There is no “blue collar dev job market”, and the end of the dev kob market that has a hint of a bluish tinge in the collar is the end that is continuously being by tooling progress. But that just expands the scope to which it is useful to apply software development, increasing jobs and wages in software.

> ML will (eventually) be able to generate biz logic code, and most assuredly infrastructure config (a cloud API has a limited set of possible configs of value to our sorting patterns), UI code (we gravitate towards a limited set of UX it seems), to solve much of our daily programming work.

Its not “machine learning”, but we already have tools that develop code in all of those domains from higher-level descriptions that what previous generations of coders supplied to them. And each generation of that tooling just serves as a progressively greater output multiplier on time devoted to developing software.

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

#168

Earlier quoted context omitted.

> almost zero mainstream (statically typed) programming languages can even let you write down that you want a non-empty string. Today D will fulfill your dreams! struct MyString { private string s = "error"; alias s this; this(string s) { assert(s.length); this.s = s; } } void main() { MyString ms = "hello"; test(ms); MyString mserror = ""; // runtime assert fail } void test(string s) { }

Would it be possible to have a static assert? In that case I would expect it to fail at compile time, not run time.

No.

If D had unlimited access to C code at CTFE then maybe you could implement refinement types at compile time as a library but for now you are stuck with what Walter has posted. I implemented a sketch of the API for this ages ago but the actual type checking had to be done at module load time because was of aforementioned (justified) restrictions to CTFE

Dependant types are a whole other monster.

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

#169
post #68

Earlier quoted context omitted.

Clearly, C is not a functional, array language. Nobody said it is. What is your point?

And I didn't say C is a functional, array language either, so we're agreed on that. I'm lost about what your objection is at this point, so I'm happy to drop this.

Have a great day!

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

#170
post #56

Earlier quoted context omitted.

Mmmh... these are not very convincing examples. Statically typed languages give you u8/i8 types of numbers. Maybe having a non empty string, or non empty list, type is useful now and then, but in practice, just have your code work just as well on both empty and non empty values, and you're good to go. I'm pretty happy with the languages we have today overall (Kotlin and Rust at the top, but C#, Swift, and Java get an…

Your comment kind of galvanizes my view that most of us suffer from Stockholm Syndrome with respect to our programming languages. As another commenter said, some statically typed languages give you unsigned numbers. Maybe most of them do. But definitely not some of the most popular ones. And out of the ones that do, they are often really unhelpful. C's unsigned numbers and implicit conversions are full of foot-guns.…

> ...shortcomings of Kotlin...

I'd read that newsletter.

Post reply on HN