Better HN
topnewbestaskshowjobs
Log inSign up

greenhouse_gas

1,066 karma · joined Feb 28, 2017 (9y ago) · 314 submissions

Submissions

comment 8y ago · link · parent

What I'd like to see is a memory safe JS interpreter (no JIT) - yes, it will be slow, but 90% of websites don't need JS go that fast, but JIT opens up a security can of worms.

So if I go to Google docs, I can toggle spidermonkey (or whatever Firefox's JS compiler is called nowadays), but if I go to $randomwebsite, I'll get a secure and usable web.

comment 8y ago · link · parent

>Actually solving a constraint graph is an NP-hard problem

How big of a deal is this IRL? Assuming you have 1000 modules, how long should it take to solve the graph?

comment 8y ago · link · parent

Are you sure? While its open source, your phone won't be (since the OS is MIT licensed, your OEM won't have to give you anything). Can you build a custom ROM without kernel sources?

comment 8y ago · link · parent

>Personally I think we’ll see Red Hat getting acquired in the next 5 years,

It would be interesting to see what would happen with linux after that, as they are one of the biggest (if not the biggest) donors to Linux, and while you'll still find Enterprise Linux for the Server (whether it's them or some successor), they are also responsible for things like Linux on the Desktop and FOSS in general, so projects which don't directly make money like Cygwin, gtk, gnome, gcc, and PulseAudio may be in danger.

comment 8y ago · link · parent

What happened there? In the 80s they were the next big thing. Then they finished their OS project (when the Linux kernel became available they finally had a FLOSS OS). But they never took off with their high priority projects. Is it that they can't find programmers? Is it that they pay so little that you might as well write your own code and host it on Git*.com?

comment 8y ago · link · parent

>Rewrite popular BSD-licensed software as GPLv3?

What do they rewrite? To the best of my knowledge, they have no problem using BSD licensed software, they just won't develop BSD license software[1] (mostly, though they do approve it here and there for new projects).

[1]. More accurately, they won't approve it for new projects. But the projects are fine.

comment 8y ago · link · parent

Just wondering how he must feel now!

comment 8y ago · link · parent

Why is gnome still the de-facto default DM? Is it just that gnome 2 was great, so gnome 3 (despite practically a new project with a new goal) inherited that position? And not just RedHat. I would expect Debian to ship with Cinnamon or xfce as the default.

comment 8y ago · link · parent

It's because the language was made to compile to JS, and competition to JS, so appropriate tradeoffs were made.

For example:

1. JS is single-threaded, with extremely heavy threads only recently made available. So Dart is single threaded, with extremely heavy threads available.

2. JS is weak-typed, so Dart was made optional typed. Remember, it was made before typescript, so they probably didn't expect that such type-heavy features as ADT would interest people.

Kotlin does the same (for example, internal immutability would be much nicer, but since the JVM doesn't support that, neither does Kotlin).

comment 8y ago · link · parent

Or languages that compile to JS (like TypeScript). Maybe one day we'll get languages compiling to Dart[1].

[1]. Although it'll be a pity. JS is stuck as a compilation target because it's a standard, and it's old, and even then wasm may one day take over JS. Flutter could have been a library, and one could have written in Go or Rust or Java with Flutter bindings. As it is now, I don't know if its possible.

comment 8y ago · link · parent

The thing is that the longer you wait, the harder it will be to migrate, as the codebase size grows (and once you leave beta, people assume that the language is finalized and won't be too happy being forced to refactor their code when Dart 3 comes out). But as it is, I doubt that the nice parts of Kotlin will ever make it to Dart.

comment 8y ago · link · parent

Unfortunately, I kind of feel torn: On one hand, I love flutter as a concept[1]. It removes a lot of the baroque from mobile development (no need for the whole RecyclerViewer construction for every list! No Fragments! Doesn't require Android Studio to start working!) but I hate the language (dart). After using Kotlin (let alone Rust), It feels like moving back to Java (no non-nullable types) and in some ways it's actually worse than Java (threads are extremely heavy weight, every interaction with native code is async and slow).

I wish there was:

1. A good Kotlin language server (unlikely, as the company behind the language is an IDE company).

2. A good reactive Kotlin GUI library (meaning, with the ergonomics of Flutter (as in, I don't have to work with Fragments and their lifecycles, just use views)).

3. A good JVM interpreter (to speed up Kotlin/Java compilation)

[1]. No I don't use Flutter to "write two apps for the price of one", as most (of my) apps are just a front-end over a back-end server, so they don't have any special logic worth saving between iOS and Android. I just find Flutter easier to work with relative to Android.

comment 8y ago · link · parent

>As the oxidize projects continue to land this email will become more and more obsolete. There's simply no way for C++ to compete with Rust,

Not everything is fixable with rust. JS, for one, is JIT compiled, so Rust wouldn't help much there (it's one of the reasons it's not being oxidized).

"Also, Rust’s memory safety only applies to code written in Rust, but a JIT compiler also generates machine code and then jumps to it. That generated code does not benefit from rustc’s static analysis."[1]

[1]. https://www.reddit.com/r/rust/comments/8ptnfr/servo_to_upgra...

14.

Do modern tech companies ever move to mainframes?

5 points · by greenhouse_gas · 8y ago · 9 comments

comment 8y ago · link · parent

FFI is actually quite bad. You can't talk to native (C, C++, Go, Rust) code directly. You have to talk to Java, and if you need, from Java to Native.

You also communicate to Java through serialization, rather than through shared memory.

Oh, and any communication goes through a Future, which is annoying.

comment 8y ago · link · parent

The secret ingredient is cash.

comment 8y ago · link · parent

>If they'd named it sfo07s13-in-f14.google.com, then browsing to that URL sends google cookies. If it's some server from a recent acquisition that may not be up to Google's level of security, that's dangerous.

Sorry, I'm slightly confused.

I browse newproduct.google.com. My browser calls the DNS, asking for the IP. The IP comes back as 192.168.0.1 [1]. It connects to 192.168.0.1. Gets hit by an XSS, and sends your cookie value to evildoer.example.com.

How would it help you that the reverse-IP of 192.168.0.1 issfo07s13-in-f14.1e100.net? The browser doesn't know that. It thinks its going to newproduct.google.com.

[1]. Yup, that number is just an example.

comment 8y ago · link · parent

Better than than silently ignoring an if guard preventing an overflow, and then overflowing anyways on addition.

comment 8y ago · link · parent

>It's undefined because in the majority of situations, it is the result of a bug,

1. If it's a bug, it should overflow or crash (implementation defined, not undefined), or do what Rust does, crash on -o0 (or, if it's illegal to change defined behavior based on optimization level, create a --crash-on-overflow flag) and overflow on everything else.

2. There is plenty of code where it's intentional (such as the infamous if(a+5<a)).

comment 8y ago · link · parent

The real issue isn't that C doesn't have a standard int overflow, but that it's undefined.

What they could have done is made it implementation defined, like sizeof(int), which depends on the implementation (hardware) but on the other hand isn't undefined behavior (so on x86/amd4 sizeof(int) will always be equal to 4).

comment 8y ago · link · parent

How does it feel having your "life's work"[1] becoming big enough to be noticed, but ignored by the mainstream?

You created the first "better C" out there to get any traction, it had a perfect name (B -> C -> D), but due to factors that were partially [2] outside your control [3], D's niche got eaten by Go and Rust.

[1]. The D programming language. [2]. I've seen people blaming the D to D2.0 transition, but D was a niche language before too. I've also seen people blame D for not having an Open Source compiler for years, but neither did Java, and it took off anyways. [3]. Such as Sun's marketing, or the general push to scripting languages between 1995-2010 (such as perl, tcl, PHP, Ruby, Python and Node)

comment 8y ago · link · parent

>Vi is on every unix system

Except Debian's install CD. They only have nano.

comment 8y ago · link · parent

>Last year, afer a firejail local root exploit got released

Is it worse than running Firefox without firejail?

comment 8y ago · link · parent

> i can with zero effort and 100% confidence run any old Go code i have lying around. that's pretty awesome.

I think you can do that in Rust too (post 1.0). What's more impressive is that canonical go code from five years ago is still canonical.

comment 8y ago · link · parent

They can and do. For example, you can get Marshmallow on the Samsung s2, which didn't officially didn't get even Lollipop.

comment 8y ago · link · parent

The real problem is that you can't get a phone [1] which can run upstream kernel. So while there's postmarketOS and Replicant (both trying to port regular Linux (for lack of a better word[2]) to phones), very few phones work properly (and most are fairly old and not sold anymore, IIRC Replicant's newest phone they support is the European S3 - guess how old that thing is).

So now, for each device, you have to port desktop Linux [3] to whatever generation kernel it came with.

Debian, in contrast, can assume that you're using the standard modern kernel.

[1]. I mean that it should work as a phone, not just a small tablet. So if it can't make phone calls, it ain't a phone. All the more so if you want a working GPS and Camera.

[2]. I would have said Gnu/Linux but postmarket is based on Alpine which is based on busybox/muslc and not gnu.

[3]. Anything which issues syscalls is fair game, so, for example, if your oldest phone you want to maintain is six years old, then you have to back port every single program (and library!) to work on a random seven year old kernel.

Even back porting android user space (which is mostly Java and doesn't interact directly with the kernel) is a huge pain (and sometimes is actually that hard that the maintainers just give up). Porting back Debian?

comment 8y ago · link · parent

Downside: 1. Do you really know what your apps are doing? You can't compile from source.

2. You may only use apps Apple approves. So no Firefox for you.

12345
11