Readit News logoReadit News
verdax_1 commented on Ask HN: How would you turn Twitter around?    · Posted by u/bsvalley
Godel_unicode · 9 years ago
Why is exactly 140 still the right length? Why not 145, or 73, or 280? Answer cannot contain words "always", "traditional", or "nostalgia".

There's a large distance between 140 and infinitely long.

verdax_1 · 9 years ago
Maybe the code base contains a bunch of edge cases where they assume 140 and trying to do anything else causes crashes or other poorly defined misbehavior. (Not what you were talking about but also a legitimate but unfortunate answer)
verdax_1 commented on Getting Past C   blog.ntpsec.org/2017/01/0... · Posted by u/ingve
ketralnis · 9 years ago
This sounds a lot like "why clean up my room when the heat death of the universe is coming anyway?", but if you do think that AI is going to supplant all of programming then be the change you want to see in the world! Get building and we'll see which one happens first.

I honestly don't know who I'd put my money on between "AI takes over the world" and "programmers stop writing buffer overflows"

verdax_1 · 9 years ago
My guess is that if they make a general purpose programming AI then all other jobs will also be nonexistent besides being famous and doing YouTube reviews of movies. My thought is that the problems in the way of AI programming are more difficult and can be generalised to enough other jobs that programming is going to be the last job automated.
verdax_1 commented on Getting Past C   blog.ntpsec.org/2017/01/0... · Posted by u/ingve
steveklabnik · 9 years ago
> there's nothing stopping the compiler from optimizing the GC out.

I don't know of a single language that comes with a GC that does this, do you?

> He was comparing against what you'd get if you dropped down to ye olde C or Assembly and wrote the same algorithm there, without redundant work or waste.

Right. I agree with this.

But basically, we are arguing over an extremely fine semantic, which is "should you even want bounds checks in the first place." If you don't, then don't use a method that has bounds checks. The one that does will have them. They'll both cost the exact same as writing it in C or assembly.

verdax_1 · 9 years ago
I think something like this actually happened with one of the first scheme implementations, but that was because they wrote the GC in scheme so they had to do it that way for a very small subset of the system (is the GC code). But yeah other than that I can't think of any examples (and my example is kind of the exception that proves the rule).
verdax_1 commented on In 2017, learn every language   blog.bradfieldcs.com/in-2... · Posted by u/adamnemecek
jghn · 9 years ago
Can you explain why you see R as an exemplar for rank polymorphism?
verdax_1 · 9 years ago
I don't see it as one. It just happens to be the one I encountered that had the feature. Please suggest better, I wasn't that fond of R.
verdax_1 commented on In 2017, learn every language   blog.bradfieldcs.com/in-2... · Posted by u/adamnemecek
kensai · 9 years ago
"It’s about understanding the common paradigms and implementation patterns so as to be confidently language agnostic."

Essentially, which are these few common paradigm languages that teach you more than 90% of what's out there? My guess would be to include something like C and LISP, but is that enough?

verdax_1 · 9 years ago
Haskell for lazy FP, pattern matching, and monads; ocaml for strict FP and a crazy expressive module system; C# for industry OO; lua for dynamic language and prototype inheritance; ruby for runtime meta programming; lisp for macros; forth for stack language; erlang for actor module, byte pattern matching, and dynamic unification pattern matching; prolog for logic programming; c for low level; c++ for templates and destructors; rust for linear types; idris for dependent types; R for rank polymorphism. After that languages started to seem like variations of things I've seen before.
verdax_1 commented on The Resurgence of C Programming   oreilly.com/learning/the-... · Posted by u/ingve
bluejekyll · 9 years ago
Maybe I missed it in the article, but it alludes to this: C is the least common denominator. It's not a great language, but it works everywhere and will work in the most restricted of environments.

As the article states, it's resurgence is bc of restricted small devices, but that's not because it's a great language. Debugging memory issues is horrible, having strange things happen because of randomness between compilers, no fun.

I had a recent desire to get back to baremetal, but I didn't go back to C; I have too many battle scars. I went to Rust, and have never looked back or regretted it. The FFI between Rust and C is pretty easy too for any cases where I need it.

verdax_1 · 9 years ago
It seems that a few years ago several big name tech companies found themselves at the limit of what they could do with the c#/java style languages. But they weren't willing to go back to c/c++. Facebook started experimenting with D, apple created swift, google created go, Mozilla created rust, Microsoft had a rumored system language that never seemed to materialise, and even c++ is trying to get away from itself.

It is sort of looking like the industry as a whole is starting to see if there isn't a better way to do things and I think we will see how things shake out in the next five years or so.

verdax_1 commented on An Introduction to the Lambda Calculus (2015)   learningclojure.com/2015/... · Posted by u/tosh
syncopatience · 9 years ago
Does learning about the Lambda calculus have any take-aways for programming in modern languages, or is it more of a cool toy/mostly of interest for language designers and academics?
verdax_1 · 9 years ago
I actually found myself factoring my code differently after learning lambda calc. It at the very least seemed to result in better code (c#) so I would say there is practical benefits.
verdax_1 commented on How to find size of an array in C without sizeof   arjunsreedharan.org/post/... · Posted by u/ashishb4u
Namrog84 · 9 years ago
1. An appropriate named macro shouldn't cause you to need to investigate it unnecessarily

2 most IDEs allow simple hover over and see macro definition without having to break much flow.

verdax_1 · 9 years ago
I might go a step further and append "an appropriately implemented macro". Just because something has a good name doesn't mean it's not filled with crazy.

Otherwise I totally agree with your point.

verdax_1 commented on How to find size of an array in C without sizeof   arjunsreedharan.org/post/... · Posted by u/ashishb4u
mannykannot · 9 years ago
If you are only looking at probability and cost-to-fix you are overlooking something important - the cost if/when it happens.
verdax_1 · 9 years ago
This is really emphasized in things like dmfea and other failure mode analysis documents or regulated industry. They want you to document the likelihood, your ability to recover from the failure, as well as the cost o the failure. You can say that you didn't want to pay for someone fixing some unlikely fail mode but that's small consultation to the people whose lives your product is ruining.
verdax_1 commented on How to find size of an array in C without sizeof   arjunsreedharan.org/post/... · Posted by u/ashishb4u
Dylan16807 · 9 years ago
>he "how likely is it, really?" response to questions of technical correctness has always bothered me.

But the question is important in another context: language design. Why is this undefined behavior something that exists in the first place? Objects larger than PTRDIFF_MAX could just not be allowed! This avoids the problem and makes code easier to reason about, with pretty much no downside.

verdax_1 · 9 years ago
I like the way you're thinking, but that sort of thing probably doesn't get past a committee. "Hey we might not be able to think of an application but that doesn't mean our users won't have a legitimate reason for doing it ... Motion passed."

u/verdax_1

KarmaCake day39December 27, 2016View Original