« first day (1794 days earlier)      last day (1915 days later) » 

 
3 hours later…
04:26
You have all my upboats
 
3 hours later…
07:16
@Stargateur "Free" healthcare. LMAO. More than half of that I earn goes in taxes. There is nothing free.
+ the public services in France are so shitty that I always pay for private hospitals anyway.
There's a name for that: losing in every way
 
1 hour later…
08:19
France is special on that
I'd still rather have that than US healthcare
@SébastienRenauld Well, the USA are a special case: they pay high taxes AND they don't have any real public healthcare :P
08:34
@FrenchBoiethios French healthcare is shittier and shittier every year but it's still better and cheaper than the US one and about nobody in France goes bankrupt because of a stupid accident or disease being source of astronomical healthcare costs
@FrenchBoiethios free by no matter what you have, you will have healthcare
08:46
0
Q: Why do I need to collect to a Vector here?

Nick LongI'm working on project Euler 96 to teach myself rust: https://projecteuler.net/problem=96 I've written this code to read in the file and convert it into a vector of integers. let file = File::open(&args[1]).expect("Sudoku file not found"); let reader = BufReader::new(file); let x = reader ...

I didn't fint anyway to have a into_iter for string
this sux
I don't see why we couldn't have one
09:05
@DenysSéguret Sure, I'm not against that, but the whole efficiency of the system is terrible.
How do you fix this "borrowed s" iterator problem ? Is there another solution than using plain for loops ?
(I mean without resorting to building dumb intermediate strings or vectors)
09:22
@DenysSéguret I think it should be fixed in std
I don't get what exactly happens here
vec implement into_iter
but not string
@Stargateur There should be a RFC about that. I remember being blocked by that, too
Chars doesn't own the string, so another struct would be needed.
09:38
This question should have received more upvotes. It's one of the best ones we got recently IMO
well the question itself is badly written
but it's a good question I agree :p
09:52
I would remove the Rust tag from this question. You all agree?
Done already
he might be generating his wasm with rust, but it itself has no relevance to rust
the answer is off-topic anyway
AMP doesn't allow WebWorkers and therefore wasm
@SébastienRenauld yep
@SébastienRenauld Uhm, I don't follow this logical conclusion. WASM works without web workers, right?
Not AFAIK
you can emulate wasm in pure JS using stuff like rollup
but that also isn't allowed in AMP pages
09:56
I'm pretty sure you can just call wasm functions from any context, i.e. also without webworkers. Also load a wasm module.
But I would also guess that AMP doesn't allow it
What you're thinking of is instantiate
I don't follow you. You need instantiate(Streaming) to start wasm in a browser, right ? And there's no webworker involved in wasm unless you want it
That is extremely interesting
I thought it was limited to running in the WW sandbox
learn something new every day
@SébastienRenauld I wrote no JS for this: dystroy.org/wasm-tictactoe
That circular buffer question
the point of a circular buffer isn't to store varying-length types
of course you're going to get fragmentation if you do that
since you're only storing pointers to the actual data
10:30
Not sure whether to answer the circular buffer question or to just flag as too broad/OT
there's some interesting stuff but in reality you just use VecDeque<u8> and wrap something on top to handle missing lines
@SébastienRenauld I don't think there is a clear defintion
anyway this question is off topic
11:13
There was a sort of definition in the last paragraph before the code in his question
the "real" question is how to deal with clipping elements in a circular buffer
11:36
When people update some of my programs, they call me because of errors and I tell them to do rustup update. Is there a standard way to tell cargo to fail with a proper error when the local rust install is too old ?
@DenysSéguret Which one?
@DenysSéguret sadly no
3
Q: Why do I need to collect into a vector when using `flat_map`?

Nick LongI'm working on Project Euler 96 to teach myself Rust. I've written this code to read in the file and convert it into a vector of integers (Playground). let file = File::open(&args[1]).expect("Sudoku file not found"); let reader = BufReader::new(file); let x = reader .lines() .map(|x| x....

@Stargateur thanks
@FrenchBoiethios which what ?
That FnMut question
so many wrongs in so little time
11:51
I was ready for the swimming pool with friend, hopefully, I checked the schedule
12:01
The most important point in this answer is that callback based designs aren't suitable to Rust. Just don't try to apply those patterns to Rust. — Denys Séguret 11 mins ago
There should be a Q/A about that.
Is there a way to get a channel going in pure (no dependency) rust, though?
a channel would require an executor and futures at the very least
Side note, just took a deep dive into the mongodb crate
get a slow mongo server (they exist) and you can block the main thread of your app
fun times
Fair point, although it introduces a thread ;-)
@SébastienRenauld Yep, the OP was right about that, but that's easy to put in place in Rust.
Really amazed actually
the webscale database has a fully blocking driver
 
1 hour later…
13:34
@Shepmaster play.integer32.com has an issue
@Stargateur re stackoverflow.com/questions/57903579/…, I don't believe OP wants an enum. His approach seems fine. He just hasn't bothered to read the serde docs AT ALL.
13:45
@PeterHall wut
I didn't know serde_json could do that
but this seem stupid to do
a array should not have a fixed size like this in json
Json formats are usually stupid
and you often just have to use what you're given
Sometimes, authors use ordered arrays instead of named fields, to make the file smaller
it's pretty pointless for most HTTP data, since it's going to be compressed
but websocket frames aren't usually compressed
Why is it pointless to remove names ? Compression isn't going to erase those names
(disclaimer: I don't remove names in my huge JSON files, but I keep them short)
@Shepmaster That's not entirely correct
if the client sends Sec-WebSocket-Extensions: permessage-deflate they can support deflate per message
all modern browsers do
it's just not implemented on most websocket stacks because, let's face it, most websocket messages are short
(Also, the websocket library is typically decoupled from the request before UPGRADE)
@DenysSéguret names are more convenient. If you have a 1 million rows, the effect of name length will be negligible if compressed
That depends on the size of your names vs. the size of your data
13:57
@PeterHall If you have a very deeply structured JSON files (ie not just a few arrays), name lengths matter
(source: did a lot of tests, also tried protobufs, messagepack, etc. for my heavy applications (ws or not))
@DenysSéguret with compression, not really. The names are effectively stored once and then referenced by index thereafter
@PeterHall if the structure is simple enough
Conjoncture: A question starting with "Well, " is always bad.
He's asking to reimplement a reader/writer for a proprietary format that nobody has managed to fully reverse-engineer yet
in rust doesn't make it any more feasible :-)
14:00
@SébastienRenauld He might be. It's actually quite unclear to me
if he clarifies it, so he just needs to get some small, specific piece of data from the file, then I think it's an OK question
obviously, as-is it's not a question at all
"Animation data" is the binary part of the file
the bit that the blender foundation has been trying to crack open for 4 years now
if he knows exactly what and how to access it, and it's already covered, then yeah, maybe
judging by the question, though, that's highly unlikely
14:14
@DenysSéguret I see but in this case it's must be transparent
and the array must not have extra size
and should not be documented as an array
14:49
Maybe asking this silly but I really doubt what I am doing now:
Why it does not include the dead code into test ,instead it understands "link-dead-code" as custom attribute?
I am calling test as following:

`cargo test link-dead-code`
 
1 hour later…
16:12
I like it when I see questions like this: stackoverflow.com/questions/57909252/…
It means, if I am ever in the position of considering hiring the poster, I will know not to
16:23
@PeterHall thanks for the explanation on the &Box<S> question
learned something else today
I always thought this case was due to the reference itself
16:45
Too many things are called "key" in English...
@SébastienRenauld Glad to have helped!
17:07
200m of swimming, I'm dead
17:36
@FrenchBoiethios Thanks! "No space left on device"
 
1 hour later…
18:55
I"m sure there's a dupe for this stackoverflow.com/questions/57912253/…
It just seems easier to give them a fix than find the dupe
 
1 hour later…
20:14
So they didn't choose Discord because of privacy reasons, but Slack is in the race? Are they complete idiots?
@PeterVaro *gasp* the i-word!
@E_net4 ?

« first day (1794 days earlier)      last day (1915 days later) »