Better HN
topnewbestaskshowjobs
Log inSign up

killercup

940 karma · joined May 12, 2012 (14y ago) · 212 submissions

I'm @killercup on twitter.
Submissions

comment 8y ago · link · parent

Or (American) Fuzzy Loop

comment 8y ago · link · parent

Please reformat your comment so it's more readable. Adding 4 spaces in front of a line will make it monospace.

comment 9y ago · link · parent

Yeah, that's something I always forget about when talking to people from the US: I don't have any student loans. A semester at a university in Germany costs around 250€ (plus housing and food), so it's hard to get to a point where you need 10 years to pack back loans. I had a part time job all through university and even saved up a reasonable amount of money.

comment 9y ago · link · parent

Just a heads up: The numbers for Germany on that page include all social security contributions, including health insurance (4.7k€) and pension contributions (6k€). (Not sure if you accounted for these in your number for Maryland.)

comment 9y ago · link · parent

Absolutely, yeah. Having a real linker will help with that as well. Until then, you can also compile with

    [profile.release]
    opt-level = "s"
(i.e., optimizing for size), to get it down to 23kB gzipped.

comment 9y ago · link · parent

This Rust code [1] heap allocates some things (e.g., a string with `String::from`), and results in this [2] WASM file, which is 65kB, or 25kB after `gzip -9`.

[1]: https://github.com/killercup/wasm-experiments/blob/bf3b30eed...

[2]: https://github.com/killercup/wasm-experiments/blob/bf3b30eed...

comment 9y ago · link · parent

Yes, once [1] lands, you can add it with `rustup target add wasm32-unknown-unknown` and then you can `cargo build --target=wasm32-unknown-unknown`.

You should note that it's not as simple as that, though. Depending on the context you want to run WASM you might need to do additional steps. E.g., when running this in a browser, you might not be able to use the std lib to spawn threads just yet.

[1]: https://github.com/rust-lang/rust/pull/46115

comment 9y ago · link · parent

There's a difference between having numbers and having specific numbers to commit to… If you want raw numbers, some are tracked at http://perf.rust-lang.org

Also, incremental compilation is making very good progress. More fuzzy numbers: I'm currently working on a mid-size Rust project, where the app crate has around 10k lines. `env CARGO_INCREMENTAL=1 cargo run --release` takes 2-3 seconds depending on what I changed.

comment 9y ago · link · parent

You can write Rust in a quite functional matter, but as a language it works quite differently from Haskell or Scala. There's been a lot of discussion [1] around extending the type system to support something akin to higher-kinded types. The current result is the RFC you can find in [2], as well as a work-in-progress implementation of a new trait-resolution system for use in the compiler [3].

[1]: http://smallcultfollowing.com/babysteps/blog/2016/11/02/asso...

[2]: https://github.com/rust-lang/rfcs/pull/1598

[3]: http://smallcultfollowing.com/babysteps/blog/2017/01/26/lowe...

comment 9y ago · link · parent

Good question! It was merged quite close to the release, so it's hard to guess if it landed in beta already. So, let's have a look at [1]! And yep, it's in the beta branch.

This means it's in 1.23, which'll be released in 6 weeks.

[1]: https://github.com/rust-lang/rust/commits/beta

comment 9y ago · link · parent

I'm a big fan of doing fancy things on CI, so I'm always looking for cool ideas there. This talk seems to mostly be about tooling around dependencies, though, so your comparison to Rust is interesting: Rust's cargo is all-around wonderful IMHO and seems to support everything DO needed and built themselves (incl. multiple versions of dependencies, tooling for mono-repo workspaces, etc.).

comment 9y ago · link · parent

From https://wiki.archlinux.org/index.php/systemd-timesyncd :

> In contrast to NTP implementations such as chrony or the NTP reference server [systemd-timesyncd] only implements a client side, and does not bother with the full NTP complexity, focusing only on querying time from one remote server and synchronizing the local clock to it.

comment 9y ago · link · parent

There are two NTP parsers already if you want to get started: https://crates.io/search?q=ntp

comment 9y ago · link · parent

I would assume because their VM/bytecode version is very fast at rendering updates and smaller in size than a "represent the bytecode as JS" version.

comment 9y ago · link · parent

Interestingly, just yesterday this was trending on HN: https://shitcoin.com/storj-not-a-dropbox-killer-1a9f27983d70

comment 9y ago · link · parent

Entirely possible: The paper's author has actually given lectures on game theory.

comment 9y ago · link · parent

It's funny that Lidl, the store in the picture at the top of the article, is one of the stores I always pay with debit card in Germany. They have great NFC support and don't give a damn if I pay my 79¢ bread with card.

comment 9y ago · link · parent

Yes, I learned about the Weimarer Republik and it's economic issues in school in Germany. (I guess it was in 8th or 9th grade and that history class was mandatory.)

comment 9y ago · link · parent

There are some details in https://github.com/diesel-rs/diesel/pull/747

comment 9y ago · link · parent

It's currently dependent on implementing traits for very large tuples, so you could argue it's a language feature we are waiting for (cf. open RFC #1935 [1]). (There was a PR on Diesel to use HLists but it's no longer pursuit.)

[1]: https://github.com/rust-lang/rfcs/pull/1935

comment 9y ago · link · parent

If the compiler gives you an error with a suggestion "You probably need to add `extern crate foo;`" (and it already does in some cases), RLS (i.e., your editor plugin) will be able to automatically add it for you (soon™).

comment 9y ago · link · parent

That was actually specific to the IE 5.5 feature set and that era's Microsoft in general. Microsoft has been doing some amazing stuff in the last years, with many of them being open source and community-driven.

comment 9y ago · link · parent

https://github.com/dflemstr/rq seems to be something like that

comment 9y ago · link · parent

Yes. They seem to mean "Rails-style translation files that happen to be in YAML format" when they say "YAML".

comment 9y ago · link · parent

I don't know about general-purpose, but I've seen Prolog implementations for specific logic problems. Most recently, chalk [1], a Prolog interpreter designed to be used in the Rust compiler's trait system. So I wouldn't say it's not popular, but the areas it's used in are probably not what most programmers deal with every day.

[1]: https://github.com/nikomatsakis/chalk

comment 9y ago · link · parent

There are some crates that add a derive for errors, but most people tend to use error-chain or quick-error. Both give you the boilerplate pretty much for free, with various other advantages. E.g., using error-chain, you can just write the above code as

    error_chain! {
        foreign_links {
            Io(io::Error);
            Parse(ParseIntError);
        }
    }
and it'll even generate an aliased `Result` type as well as fancy chaining support.

comment 9y ago · link · parent

Very nice:

> Zero-copy deserialization

> […] The semantics of Rust guarantee that the input data outlives the period during which the output struct is in scope, meaning it is impossible to have dangling pointer errors as a result of losing the input data while the output struct still refers to it.

comment 9y ago · link · parent

I know many German companies require you to store data on servers also located in Germany. (But I have no idea if it's similar in other countries.)

comment 9y ago · link · parent

Plugins don't run on the UI thread IIRC
12345
8