Better HN
topnewbestaskshowjobs
Log inSign up

devit

4,235 karma · joined Sep 10, 2015 (11y ago) · 1,525 submissions

Submissions

comment 5y ago · link · parent

So what are we doing about all the maintainers that initially approved these commits that were later found to be incorrect?

comment 5y ago · link · parent

Applications should not have security issues or critical bugs to begin with.

comment 5y ago · link · parent

All you need is to run the build in a VM (a container/chroot also works almost always since the Linux kernel maintainers are committed to not breaking userspace).

It's not done usually because it's also very useful to take advantage of new language and library features and all software is supposed to not break compatibility with new versions, so if there is an issue due to upgrading it's because an incompetent maintainer failed at their job.

comment 5y ago · link · parent

"Parse don't validate is suboptimal"

What you ideally want is a first step that "validates", i.e. creates a representation from text that is easy to use but also succeeds for any input, and then a further "parsing" step that converts it to another representation such that the parsing only succeeds for valid input and is invertible for any value of the representation type, and then finally code that checks constraints that aren't captured by the type system.

This way you can support IDEs that need to edit partially incorrect code.

comment 5y ago · link · parent

Use a crate that provides safe functions implemented with unsafe code to do that, like https://docs.rs/splitmut/0.2.1/splitmut/

comment 5y ago · link · parent

It's the only language existing that is memory safe and provides zero cost abstraction to the CPU capabilities (i.e. no mandatory GC, values don't need to be boxed, ability to mutate memory).

The only limitation that may not eventually be removed is the lack of dependent types (although you can kind of emulate them by lifting terms to the type level and using lifetimes to represent variables).

C++ is not memory safe, Lisp has no type system and Haskell has GC, all values are boxed in a closure and it cannot mutate memory safely, so none of these languages are even in contention.

comment 5y ago · link · parent

Because Cloudflare for no clear reason allows them to require captchas for pages that are cached anyway and thus where DoS is not a problem, and also in cases where the website is not actively being DoSed at that moment.

[of course captchas do nothing against targeted attacks]

comment 5y ago · link · parent

That's the number of times per second the main update code runs and it has nothing to do with the number of clock cycles or instructions per second the CPU can run (other than the fact that the chip needs to be fast enough to have the update code finish before the next time it needs to start).

comment 5y ago · link · parent

You can run the workloads on (possibly partial) replicas of the production database running on another set of machines.

comment 5y ago · link · parent

No, as in a the graph starts from nodes corresponding to sensor inputs, with edges going to nodes that represent computations based on those, to further computations, to the outputs that drive actuators.

If only one sensor input changes then intermediate computations that don't depend on it don't need to be updated.

comment 5y ago · link · parent

You could abstractly structure the computation as a graph (there are many concrete approaches to that) and only recompute the parts that change due to changed input or changed intermediate results.

If you have multiple outputs you can also have a scheduling/prioritization system for the subtasks.

And yes, use interrupts or multiple timers to detect only changed parts without having to compare current input to previous input.

It's basically the same problem as updating a browser DOM in response to application state changes.

comment 5y ago · link · parent

It seems interesting but rather inefficient since you can just do things faster than explaining them to someone and having them do them.

It seems like it would only be good on tasks where having your partial work continuously reviewed is very valuable.

comment 5y ago · link · parent

Maybe the real lesson of the whole thread is to require customers to pay in advance with a non-reversible wire transfer, or at least via an escrow service contingent on delivering the goods. Or alternatively, somehow buy insurance against the customer failing to pay.

comment 5y ago · link · parent

None of these are relevant for users.

comment 5y ago · link · parent

Yeah, that only applies if the build process of the dependents does not actually use the shared library itself (other than for linking to it).

comment 5y ago · link · parent

Seems like they only should depend on the parts of dependency that actually get incorporated in the dependent.

For instance:

- Changes to C source files of a shared library should not require a rebuild of dependents (assuming you don't LTO with shared library bitcode)

- Changes to an executable in a dependency that you run as a child process during usage but not at build time should not require a rebuild of dependents

comment 5y ago · link · parent

Yeah, feels like they should use the Haskell IO monad "do" notation style where the await is implicit unless you use let.

This would require the scripts to no longer be vanilla JavaScript, but it seems easy to extend sucrase/babel to do that transpiling.

comment 5y ago · link · parent

It's bad for the other photographers, but good for those looking to acquire photography services.

comment 5y ago · link · parent

Seems like prions only "infect" the same kind of protein, so a misfolded spike protein that the vaccine might produce would only cause other spike proteins to misfold, and they almost surely don't occur naturally in human tissue so there should be no risk at all.

comment 5y ago · link · parent

Being written in TypeScript and not Rust seems quite a big liability that might see Rome never be popular or lose out quickly due to inferior performance.

There is already RSLint and SWC as JavaScript tools written in Rust and I would expect such tools to take over, with a good choice of it happening before Rome is ready.

comment 5y ago · link · parent

Because society results in companies being incentivized to babysit users rather than cutting off those who are unable to learn simple technical skills like optimally encoding a video respecting a maximum bitrate requirement.

comment 5y ago · link · parent

Not sure if it applies to the US, but generally municipalities could use taxpayer money to fund it and make the service free, which beats any corporation, since it's equivalent to making it mandatory to be a customer.

comment 5y ago · link · parent

That would imply that "foo(x: int)" is a string rather than a function.

Haskell doesn't use that notation either, it uses -> both for the parameter list and for the return type, and separates argument names (arguably, these are poor choices, since currying is not an efficient CPU-native operation and not intuitive so distinguishing between multiple arguments and returning closures is useful, and argument names are useful for documentation).

comment 5y ago · link · parent

You can't do that, assuming that it was set up properly (i.e. they either set up CloudFlare immediately without disclosing the server IPs in the first place, or blocked all non-CloudFlare traffic on the firewall).

comment 5y ago · link · parent

The Facebook app on my Android device doesn't do this.

comment 5y ago · link · parent

It's pretty trivial to make such a CPU: just execute instructions in order and with no cache.

The challenge is more how to make a fast CPU like that.

comment 5y ago · link · parent

You can use a macro instead of copy and pasting.

You can also do this:

  struct Vehicle
  {
    speed: f32,
    type: VehicleType
  }

  enum VehicleType
  {
    Car(...),
    Bicycle(...)
  }
Or this (although this is the least common):

  struct Vehicle
  {
    data: VehicleData
    type: Box<dyn SpecificVehicle>
  }

  struct VehicleData
  {
    speed: f32,
  }

  trait SpecificVehicle
  {
    fn quack(&self, data: &VehicleData);
  }

  impl SpecificVehicle for Car {...}
  impl SpecificVehicle for Bicycle {...}

comment 5y ago · link · parent

You don't need much understanding in advance to develop a novel backend, since you are forced and guided to learn the whole language as you try to write the backend and start pattern matching on the data structures.

comment 5y ago · link · parent

They should also have tested hand-coded parallel implementation.

From the paper it's not clear how much of the overhead is fundamental and how much is due to the frameworks being just terrible (many of them are written in Java, so they can't be good since no decent programmer would use Java for efficient algorithmic code instead of Rust or C++ before Rust was available).

1
171819
51