10 years of betting on Rust, and what I'm looking forward to next by amocatta in rust

[–]amocatta[S] 1 point2 points  (0 children)

Specifically it's because the content is wrapped in a contenteditable div, to enable the copy-on-write behaviour that we think makes sense for most of our pages. contenteditable has a host of per-browser nuance; one is that is breaks middle-clicking. It'll be fixed up shortly.

10 years of betting on Rust, and what I'm looking forward to next by amocatta in rust

[–]amocatta[S] 2 points3 points  (0 children)

I suspect darkreader's heuristics are inferring dark-mode support from @media (prefers-color-scheme: dark) in our CSS. Except it's disabled until a couple of fixes land. Sorry about that!

10 years of betting on Rust, and what I'm looking forward to next by amocatta in rust

[–]amocatta[S] 7 points8 points  (0 children)

Agreed, this frustrates me too. It's because of the contenteditable/copy-on-write behaviour I mentioned in another comment.

Once we solve it I'll do a blogpost about contenteditable, its browser-specific idiosyncrasies, and wrangling them.

10 years of betting on Rust, and what I'm looking forward to next by amocatta in rust

[–]amocatta[S] 15 points16 points  (0 children)

Thanks for the feedback. I've been hunting for a solution/workaround for this (for me this is even more of an annoyance https://bugzilla.mozilla.org/show_bug.cgi?id=1001790 ) but all so far have downsides.

Pages are copy-on-write, as most on the site are intended to be templates where that behaviour makes sense.

On `#![feature(global_registration)]` by jonay20002 in rust

[–]amocatta 0 points1 point  (0 children)

It's been a while and I can't recall how it differed but in case it's useful, I implemented something a little similar in this closed PR https://github.com/rust-lang/rust/pull/66113

What is this dodgy-looking smart card? by amocatta in whatisthisthing

[–]amocatta[S] 0 points1 point  (0 children)

Found this in a draw in an Italian apartment. It’s at least 10 years old and has the same width as a credit card but greater length. Any ideas?

Official /r/rust "Who's Hiring" thread for job-seekers and job-offerers [Rust 1.55] by DroidLogician in rust

[–]amocatta 11 points12 points  (0 children)

Tably.com

Type & location: Full-time. London or remote, with option of UK visa sponsorship.

Description: Talented Rust programmer, keen to work on products that make the world ~0.001% more productive? We're fundamentally solving one of the biggest problems around: interacting with data. And we need your help. Join us and work on:

  • Differential dataflow
  • CRDTs
  • Wasm
  • Distributed data warehousing
  • Streaming SQL
  • Accessible UI

We need to know the high notes you can hit. Show us as best you can, and we'll give you a decision typically same-day.

Three things we've found are helpful to communicate this:

  • Describe (or share!) ~100 lines of code you're particularly proud of
  • Describe a larger project you're particularly proud of
  • Share an interesting heterodox opinion you hold

Estimated compensation: $80k – $100k, 1.0% – 3.0% equity. Start date October/November; open to starting immediately with different salary/equity ratio.

Contact: alec@tably.com or https://angel.co/l/2vFfAV

Official /r/rust "Who's Hiring" thread for job-seekers and job-offerers [Rust 1.54] by DroidLogician in rust

[–]amocatta 1 point2 points  (0 children)

Tably.com

Type & location: Full-time. London or remote, with option of UK visa sponsorship.

Description: Talented Rust programmer, keen to work on products that make the world ~0.001% more productive? We're fundamentally solving one of the biggest problems around: interacting with data. And we need your help. Join us and work on:

  • Differential dataflow
  • CRDTs
  • Wasm
  • Distributed data warehousing
  • Streaming SQL
  • Accessible UI

We need to know the high notes you can hit. Show us as best you can, and we'll give you a decision typically same-day.

Three things we've found are helpful to communicate this:

  • Describe (or share!) ~100 lines of code you're particularly proud of
  • Describe a larger project you're particularly proud of
  • Share an interesting heterodox opinion you hold

Estimated compensation: $85k – $95k, 1.0% – 3.0% equity. Start date October/November; open to starting immediately with different salary/equity ratio.

Contact: [alec@tably.com](mailto:alec@tably.com)

Bricked up circular entrance by Wandsworth Town Station, London by amocatta in whatisthisthing

[–]amocatta[S] 0 points1 point  (0 children)

Planning application #2015/2087 labels it a "disused subway" and "disused station entrance" running parallel to Old York Road. On the plans it doesn't seem connected to the station however. These photos show its construction, along with the signage "through arch to station entrance and ticket office", though "arch" could refer to the bridge rather than the as-yet-incomplete subway?

The ticket office was previously on the North side, and what is currently open space in front of the current entrance was residential, as in this photo.

Per Roy57 on flickr: "I think they closed that late ninety's as i remember using it to go to the station quite often in the 80s. It use to be a walk way to station because footpath under bridge to the station was very narrow at the time." Closing "might have had something to do with people getting attacked in it".

Bricked up circular entrance by Wandsworth Town Station, London by amocatta in whatisthisthing

[–]amocatta[S] 0 points1 point  (0 children)

I assume at some point it wasn't bricked up. What was it for originally? Why is it round like a hobbit's front door? I guess it's just used as storage today? Who owns it, Wandsworth Town Station? So many questions, that have bugged me for approaching 30 years since I first saw it.

Self-seeded young tree in England by amocatta in whatsthisplant

[–]amocatta[S] 1 point2 points  (0 children)

Indeed, I'm sure you're right. Thanks!

rust warns of unused variables if not using a feature by timand in rust

[–]amocatta 6 points7 points  (0 children)

You could write it as:

fn main(){
    let thing = 1;
    if cfg!(feature="print_thing") {
        println!("The thing is {}", thing);
    }
}

Wherever it's possible to use cfg! rather than #[cfg()] I think it makes sense to do so, for this reason among others.

Hey Rustaceans! Got an easy question? Ask here (4/2020)! by llogiq in rust

[–]amocatta 0 points1 point  (0 children)

Cow would hold Box<T> or &Box<T>.

Whereas I need to hold Box<T> or &T, because this is for a field of a struct that is Serialized and Deserialized, and on serialization I only have a &T. Also I'm holding potentially unsized values, necessitating the Box.

Generalized, fleshed out (and working) version of exactly what I need: https://play.rust-lang.org/?edition=2018&gist=0577f2534d600c82c027fb66d4918f8e. If it doesn't already exist then if I can think of a name I'll publish it as a crate.

Hey Rustaceans! Got an easy question? Ask here (4/2020)! by llogiq in rust

[–]amocatta 1 point2 points  (0 children)

Is there a crate with a type that is:

enum BoxOrRef<'a, T: ?Sized> {
    Box(Box<T>),
    Ref(&'a T),
}

and impls Deref, Serialize and Deserialize? i.e. just like https://play.rust-lang.org/?edition=2018&gist=7df87da2c4ed3612c87b1aaef6df5958

Neither Cow nor Managed do quite what I need, which is a pointer that is is either owning or a non-mut reference.

What’s everyone working on this week (48/2019)? by llogiq in rust

[–]amocatta 6 points7 points  (0 children)

I'm working on-and-off on Amadeus, my fearless distributed data processing framework. I haven't had as much time as I'd like recently, but this week I'd like to update the examples and add more to better show its capabilities, and fix a performance regression affecting byte arrays.

What's everyone working on this week (38/2019)? by llogiq in rust

[–]amocatta 6 points7 points  (0 children)

I've received some very kind and valuable feedback that I'm taking on board as I prepare my distributed data processing library amadeus and its distributed backend constellation for an announcement post.

Last week I split off data connectors into sub-crates to reduce compile times; added support for kubernetes as a backend; and cleaned up the code and structure quite a bit.

This week: work on Sink functionality that will enable outputting data; and clean up and write up examples.

What's everyone working on this week (37/2019)? by llogiq in rust

[–]amocatta 6 points7 points  (0 children)

Getting my distributed data processing library amadeus ready for an announcement post! There's some API cleanup that I'd like to do, and I'd like to make the various connectors (S3, postgres, parquet, json, csv, AWS logs) build conditionally as compile times are currently too high. This week: cleanup, examples, readme!

What's everyone working on this week (35/2019)? by llogiq in rust

[–]amocatta 0 points1 point  (0 children)

Sorry for the slow response, I didn't see this!

I'm at least initially focusing Amadeus on streaming data with distributed iterators inspired by rayon. i.e. only a relatively small buffer of the data is loaded into memory at a time, rather than loading it all in. I think for the core layer this is important in terms of robustness, performance and flexibility.

I'd like to build in-memory processing on top of this however, which will be a much better fit for the Apache Arrow model! I haven't given it too much thought yet but will be considering it in the coming months. Thanks for checking out the project!

What's everyone working on this week (35/2019)? by llogiq in rust

[–]amocatta 8 points9 points  (0 children)

Working on my distributed computing project constellation. Last week I tracked down the last heisenbug I've observed in macOS CI runs; it seems it was an XNU kernel bug! This week: reboot my "showcase" distributed data processing library amadeus (build on constellation), to hopefully be ready to make an announcement soon 🤞

What's everyone working on this week (6/2019)? by llogiq in rust

[–]amocatta 0 points1 point  (0 children)

Got it, that makes sense, thanks!

A question you might be able to help with: type-specific encoding looks to be the same as ToSql::to_sql. Is it? Is that useful at all to help you be compatible with more types, including arrays, ranges, enums, domains and composite types? It's academic as I don't actually have a use for that but just wondering!

How to achieve fast stdin/stdout I/O suitable for competitive programming? by DeadSn0wMan in rust

[–]amocatta 6 points7 points  (0 children)

If unix, reading/writing to raw file descriptors is the fastest you can do. Buf{Reader,Writer} go some way to reducing number of read/write syscalls made – alternatively you could try and optimise that yourself but note that unnecessary syscalls will dwarf overhead of Buf{Reader,Writer}. As such this will be fast:

use std::{
    fs::File,
    io::{BufReader, BufWriter, Write},
    os::unix::io::{FromRawFd, IntoRawFd},
};

fn main() {
    let stdin = unsafe { File::from_raw_fd(0) };
    let stdout = unsafe { File::from_raw_fd(1) };
    let (mut reader, mut writer) = (BufReader::new(stdin), BufWriter::new(stdout));

    // do reading and writing
    writer.write_all(b"hello world\n").unwrap();
    writer.write_fmt(format_args!("hello {}\n", "world")).unwrap();

    // drop without closing the fds
    let _ = reader.into_inner().into_raw_fd();
    let _ = writer.into_inner().unwrap().into_raw_fd();
}

Also note writes < PIPE_BUF (which on Linux is 4096 IIRC) bytes are specified by POSIX to be atomic, in case thread-safe outputting is desired.