Better HN
topnewbestaskshowjobs
Log inSign up

staticassertion

13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions

@insanitybit
Submissions

comment 5y ago · link · parent

Have you compiled the Linux kernel before? I doubt Rust will be the bottleneck, it's a massive project - a tiny fraction being in Rust will be a blip.

comment 5y ago · link · parent

Yes, I suppose my judgment was too harsh, sorry - I don't have a better solution, I just think it's an extremely difficult problem, perhaps not one that's solvable in a financial system like what exists today.

comment 5y ago · link · parent

> They pay like $10k to test their patent.

Cool, so patents are (even more so) for rich people exclusively. Also, what you're describing soudns a lot like the existing system to me, but with more upfront money.

comment 5y ago · link · parent

So how do I know if a function will return a list or a string? Will it be "get_things_list" ? Or maybe 'get_things', it's got an s, so therefor it's many things? Or at least an iterable thing? Or maybe an object that contains some values? If there are many things can I index into it, or just iterate over it? If I have to guess, will that force me to use a List over an Iterable, even if that's the wrong abstraction?

At some point you have to convey the type or I have no idea wtf you're giving me, and I'd rather have you convey the type in a way my computer can understand than have you convey it through the godawful way that people name things.

That people manage to do so is no endorsement. Humans managed for quite a while without antiseptic but I don't hear anyone endorsing going around with shit on their hands.

Honestly, I've been programming in both typed and untyped languages for ages and it I am asking how you manage this problem, because I find IDEs radically less effective in dynamically typed languages, I find that I have to ask more questions, do more manual work, etc. In typed languages these things become trivial.

comment 5y ago · link · parent

Agreed, must be nice. A testament to the space, I think.

comment 5y ago · link · parent

Python is like a 40 year case study of how not to build a programming language.

comment 5y ago · link · parent

I have no idea how people program effectively without types.

`x = call_some_function()`

What can I do with x now? Does it have methods? Which ones? Is it sometimes null? Sometimes a list?

In a typed language I can just look up the type definition, and just as importantly, my IDE will know what I can do as well.

comment 5y ago · link · parent

There's a massive difference between exposing SQL as your API and exposing the database over a proxy. Your exposed SQL may have a separate model, or a more limited model, than what's actually in your database.

comment 5y ago · link · parent

I think, basically, yes. What GraphQL really solves is letting the frontend compose complex, yet specific, queries. SQL lets you do the same thing. But REST APIs and gRPC-based APIs generally do not.

I guess what I would argue against in this post is that SQL is the right language for this. The post starts off with the assertion that we're just using SQL on the backend anyways - not so, in fact my company doesn't have a single SQL database.

But I think the overall point remains - if you want powerful clients you can't beat a query language.

Apache Calcite comes to mind: https://calcite.apache.org/

comment 5y ago · link · parent

> Once downloaded, the JS and wasm bytecode must now be parsed. The JS interpreter starts parsing and running. Meanwhile the wasm code is pre-compiling into native code so it can start execution.

I thought wasm's format was specifically designed so that parsing and compiling could be performed in a streaming fashion, so that you don't have to wait for the download to finish.

comment 5y ago · link · parent

Where can I read more about this?

comment 5y ago · link · parent

The assumption here is that the attacker controls a domain A, and the victim is visiting A. The victim is also logged into a benign site, with domain B. A's CORS policy is irrelevant, the attacker can "disable cors" for A, but it will accomplish nothing, B has CORS enabled.

The attacker could make an HTTP request to B and set 'no-cors' or whatever, but then it couldn't include credentials (if you're using HTTP cookies), and again, B would still just reject the request.

So I'm not sure what you're saying is true. This isn't my area of security, happy to hear if I'm mistaken.

comment 5y ago · link · parent

I disagree entirely. Parsers are an excellent plays to start using Rust - this would allow them to move that code back in-process, improving performance, without compromising on security.

It's exactly the sort of thing this post is talking about. I'm not advocating for a wholesale rewrite, that would be ridiculous - but there's very obviously certain areas of attack surface that are harder to sandbox and are great candidates.

Besides, Firefox is even older than Chrome, and at least as complex, and they began the process of replacing core attack surface. Google could put 10x the devs on such a thing.

comment 5y ago · link · parent

I was honestly shocked to see the recent discussions about sandboxing being ineffective due to the escapes, or the statements that this was somehow new, or unexpected, or an open question. Sandbox escapes are as old as sandboxes, they're extremely well understood.

Of course the approach is not a catch-all. A web browser that cares about performance isn't going to want to spawn a process for every bit of JSON it wants to parse, etc. Spectre has made this even worse, since now isolates/VMs are no longer considered boundaries - now every single site has to be isolated from every other (as is addressed in Chris's talk), or you need some sort of heuristic, or whatever.

There's also a massive gap between basic sandboxing and what Chrome does. Seccomp is very hard to maintain, but broader sandboxing like Windows Integrity or DAC on Linux, Apparmor, etc, are quite simple both to implement and to maintain.

What's notable about the ITW attacks is really just that

a) Chrome really owns the market now, and attackers know it's worth the time to exploit

b) Attackers have likely incorporated enough research and tooling to more cost effectively find vulnerabilities in Chrome

c) As the article points out, a lack of memory safety is extremely costly to try to make up for using just one other approach, even a great approach like sandboxing.

From the OS, which provides the sandboxing primitives, up to the broker, and into the renderer, we have memory unsafe languages. Shocker that sandbox escapes occur.

Sucks that Google is so invested in C++, it's obvious that organizational inertia has kept Rust out of Chrome.

comment 5y ago · link · parent

Just to give clarification:

a) We're a small tech startup. We use Chromebooks exclusively because it makes corpops/corpsec and compliance trivial.

b) Why not Firefox? Maybe Firefox could work, but I'm not sure - with GSuite we can manage Chrome extensions via policy, we can manage Chrome versions, Context Aware Access, etc.

comment 5y ago · link · parent

Sucks, but I'm pretty locked into Chrome. I use GSuite for management, ChromeOS, etc. Maybe it means that uBlock Origin can't protect me as well, but it's pretty hard for me to give up the benefits from all of those other things.

I don't see Firefox competing. Mozilla doesn't seem to believe that monetizing a browser is possible, whereas I pay thousands of dollars a year at my company because of Chrome's integrations with these other systems.

Until Firefox can compete like that, and maybe they just can't, I can't switch.

comment 5y ago · link · parent

https://lostechies.com/jimmybogard/2013/06/06/acid-2-0-in-ac...

If you can build a system with ACID 2.0 life gets really easy. You can reason about your system without worrying about ordering, time, 'exactly once' semantics, etc.

Idempotency is usually one of the simplest pieces to implement, and you definitely get a ton of benefit right off the bat - it's worth designing systems from scratch with it in mind.

comment 5y ago · link · parent

I'm not disagreeing, but I am curious if you have anything specific you would point to with regards to Guido's role being successful. I'm just ignorant really, it's not intended to be a leading question at all.

comment 5y ago · link · parent

I think the time has passed, both in terms of there no longer being a BDFL, as well as Python passing a point where the call can be made.

comment 5y ago · link · parent

Well, Python did set up a standard - pyproject.toml. And it's what poetry uses. It's just, uh, "light".

comment 5y ago · link · parent

I feel like the entire point of a BDFL is that they can just ignore this sort of thing and make the hard call, but it never happened.

comment 5y ago · link · parent

I completely agree. Elsewhere we see sanity by default, in Python there's still open questions and hopeful but early stage projects.

comment 5y ago · link · parent

TBH as someone trying to use Python professionally it is extremely frustrating that basic things with regards to package management are something you have to iterate towards, as opposed to just being obvious and default.

comment 5y ago · link · parent

I have the memory monitor on and intellij barely uses any of the memory I'm giving it - I recently upped the memory further and it didn't help at all.

comment 5y ago · link · parent

The author actually addresses this in a reddit topic.

https://www.reddit.com/r/rust/comments/mk2nz8/ordering_reque...

"NCQ does it's best to order all of the outstanding commands at a moment in time (so maybe 32). This is instead submitting the commands in the optimal order to start with."

The thread contains more details.

comment 5y ago · link · parent

The reason why people react negatively to those who have been bringing up this sort of thing is that it always comes with this nonsense at the end:

> They are hiding, scared, waiting for the government to officially announce that it is once again safe to return to the world.

If it were a leveled discussion of facts, without the obvious agenda and judgment attached, people would not react so negatively.

1
101102103
164