Live data from Hacker News

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

quora.com

171–180 of 226 posts

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

#171
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…

There is nothing wrong with null if your language supports nullability in its type system.

In such languages (e.g. Kotlin), null is perfectly safe to use whenever you need to represent an absent value.

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

#172

I'd say being able to program GPUs as general purpose compute devices & general SIMD vectorization in high level language is pretty significant. it has opened up many applications like machine learning previously unavailable. IMO some C++20 features like coroutines rank pretty high in introducing new ways of programming.

I have a question about that, and despite asking in several places, and reading lots of documents, I've ever been able to find an answer that makes sense. Maybe you can help me. I have an algorithm that I used to run on a SIMD machine. It's a single, simple algorithm that I want to run on lots of different inputs. How can I run this on a GPU? From what I read about GPUs it should be possible, but nothing I've read ha…

I think you'd be better served by using something like OpenCL. especially if it was already running on simd core then it should be relatively straightforward to port to openCL. the mental model to follow would be to think of a gpu as a collection of identical simd machines that are programmed in simplified version of C.

thinking further, if you have never programmed gpgpu processors you may be better off porting your code using NVIDIA CUDA (assuming you are targeting desktop graphics). it had better tools and overall a better ecosystem.

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

#173
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…

So... why NOT a type for even numbers? Or prime numbers? I'm not asking for someone to supply these things in the standard library of $FOOLANG. I'm saying that very few languages offer the tools to define such things without it being very cumbersome and often incurring significant runtime overhead. I know it's possible to do better because I've read up a bit on Ada. I've used Rust and written my own "newtypes" with t…

My point was that focusing on an empty string as the hill to die on was a touch artificial.

My argument for why not, is that I don't think it pays off for most uses. You will wind up putting a ton of logic into the types, but then you have to do a ton of logic to correctly serialize into the types you have.

Do I think there are times/places this could pay off? I'd hope/expect so. But where the data hits the wire is likely not where you can set many of these constraints such that your type system can really help with them.

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

#174
post #136

Earlier quoted context omitted.

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…

The TLD part matters as some part of the email format is defined through the format of a valid host name. "something.com" is a valid host name, but "something.something" isn't currently a valid host name. So an email address "something@something.something" isn't a valid email address (currently). But at the end of the day this is all moot, imho. The "only" sane test to check the validity of an email address when some…

OT but i like your username.

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

#175
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…

Common Lisp can do that CL-USER> (defun non-empty-string-p (string) (and (stringp string) (plusp (length string)))) NON-EMPTY-STRING-P CL-USER> (deftype non-empty-string () `(satisfies non-empty-string-p)) NON-EMPTY-STRING CL-USER> (typep "" 'non-empty-string) NIL CL-USER> (typep " " 'non-empty-string) T

Mumble, Greenspun, smthing somethng

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

#176
post #58

Earlier quoted context omitted.

I used Clojure on a project while spec was still alpha/beta or something, so I never used it. It does sound interesting, but I'm skeptical. Even the way you described it- I'm still just writing a function to validate my data, aren't I? Is that truly any different than just calling `validateFoo()` at the top of my functions in any other language?

'Maybe Not' is a great talk on this subject matter. https://m.youtube .com/watch?v=YR5WdGrpoug

https://m.youtube.com/watch?v=YR5WdGrpoug

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

#177

Earlier quoted context omitted.

> I've written a number of RESTy/CRUDy APIs and I can't count the number of "check that username isn't empty" checks I've written over the years. But you do it only once, thereafter you have hopefully some "Username" type of object which is guarantied to contain a valid username.

Correct. But, the reason I'm bitching about it is because, in most languages, you then cannot use your Username type in place of a "native" string, where some third-party or standard library function just expects a string. So now you have to convert back and forth. And if this is a language like pre-record Java, fucking forget it. Define the class, implement equals(), implement hashCode(), write a getter for the wrap…

Have you worked with Kotlin yet? Since 1.5 Result is a valid return type. Inline classes are thin wrappers and compiled out. Data classes automatically give you a toString method. With sealed classes you can implement ADTs.

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

#178

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 more easily accessible via one interface, instead of sifting through search engine results.

Disclaimer: prefer text myself

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

#179
post #7

I think Kay's complaint about engineering rigor ignores the explosive growth of programming. Sure, bridge-builders have rigor; there's also probably about the same number of them today as there were 50 years ago. The number of programmers has grown by at least two, maybe three orders of magnitude over the last half century. And more importantly, almost anyone can do it. A kid whose closest approach to structural engi…

...the rigor Kay is suggesting would kill the software industry as we know it. You say that like it's a bad thing. Anyone's plans to make software sane would kill the software industry as people love and hate it. A substantial portion of this industry involves supporting horrific abortions of a system that seem to live far too long. That includes the functional programming people and anyone who believes some method o…

> the rolling a 1000 pounds of jello up a hill jobs are safe

I know that is frowned upon here but boy was that funny.

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

#180
The biggest shift lately is probably on the ops side. The role sysadmin or DBA hardly exists anymore as full-time jobs. With the goals of containerization and avoiding snowflaking giving lots of positive spill-over effects for the developer side as well.

Today i can snapshot the volume of my containers, completely format my computer, download and reinstall Ubuntu from scratch. Download and install any IDE and all tools i need, clone a project from github, npm install thousands of dependencies, spin up a docker-compose network with a distributed nosql database and a a few services, commit and push a MR giving relevant test results back from github CI and someone reviewing the code - All in one day. 10-15 years ago (without even considering the difference in download-time) every step here would be at least a day each, involving complicated configurations and often causing non revertible modifications to the host system.

Containerization and sandboxing can also be seen as being big enablers for the mobile app stores and untrusted browser applications being able to deploy to clients instantly.

I'd also say UI frameworks are a big deal. Both Windows, Android, iOS and the Web have much more powerful tools than say Win32 or whatever old baseline one wants to compare with. Especially declarative web front end frameworks like React and Vue. Some might call these fad-frameworks, but i for sure can write better web-apps with less than half the number of lines, and with much less spaghetti, compared to what we used to do in 2005 (just close one eye for the webpack complexity), if that's not a paradigm shift i don't know what is. Unfortunately this hasn't always resulted in much better applications for end users when looking at the average app, probably due to lower barrier of entry and race to the bottom.

Programming languages, IDEs and tooling overall are miles better than before, even if it's hard to pin any specific milestone to where the shift happened, all small gains add up to a big deal on all fronts. C++ is still C++ and Java is still Java but even there a lot of the verbose boilerplate is reduced giving much better ergonomics. Then you've got things like Kotlin, Typescript and other hybrid-dynamic/static + hybrid-OO/functional languages getting improved and more widespread, Async everywhere, Rust bringing something on the table to finally replace C/C++, package managers used by everyone really enabling code-reuse. You now also got almost all popular languages converging and being equally capable doing everything, not one language per use-case.

Then there are tons of other cools things like GPGPU, machine learning, big data, EBPF, crypto and security. It's just too much to grasp.

Post reply on HN