« first day (2054 days earlier)      last day (1417 days later) » 

7:15 AM
Just released broot 0.14.0. With panels
 
7:34 AM
@Stargateur I don't get this :/ (I mean I'm aware of the push back of the launch, but how is this meme supposed to be funny?)
 
it's a "waiting" meme
and I post it just because some people was watching the launch here
 
@Stargateur riight, so not only I wasn't aware of this meme, but I also couldn't care less watching the show either :D
@Stargateur why don't you?
 
@PeterVaro well rocket launch is quite boring when you already watch and know about it :p
I doesn't hope the launch fail and no reason to fail so why watch :p
 
7:54 AM
Just because you know the possible outcomes that doesn't mean it is not exciting or worth watching. And I'm saying all this as someone who genuinely believes Musk is yet another false american idol, in fact a downright fraud, but that does not change the fact that the engineers and designers behind this project are not, nor that this is indeed an exciting moment to look forward to (even if it is not as historic as the media wants us to believe it is).
 
well He is funny but yeah he is not a idol for me :p
at least as a bussness man he go on future thing
@DenysSéguret your site is very good
 
@Stargateur Thanks :)
 
 
1 hour later…
9:12 AM
This is crazy... so much better than expected. I spend half an hour with a kid on lap and another one giving directions and requirements and we added ice dragons in the Lapin game while I was vaguely explaining things like files, compilation, difference between vim and sublime text, TTY codes, syntax error under a fire of questions... and the ice dragon is now officially part of Lapin
And both kids are now on their computers making new levels with dragons
 
 
1 hour later…
10:17 AM
@DenysSéguret you make me envious :p
> Oh rust why oh why can't you iterate property? I have a matrix with 2 cols.
55k user
 
@Stargateur Must be a bug in Rust itself. it is UNACCEPTABLE that BASIC iteration in a loop is COMPLETELY BROKEN IN RUST. I can't believe I am the first person to run into this MASSIVE BUG.
 
@PeterHall the KAREN version of SO
 
10:34 AM
@PeterHall Did you comment on some issues on my projects ? This style looks familiar
(about that, I got the opposite yesterday: github.com/Canop/broot/issues/233 and I consider asking my company to change my title from "Innovation & Development Manager" to "Paradigm Shifter")
 
@DenysSéguret I don't think so. If was one of my other personalities then the style would have been different.
 
@DenysSéguret that not really a good issue
 
@Stargateur The user forgot to give steps to reproduce, expected/actual outcomes, system information....
Should be insta-closed
 
10:52 AM
bug: I can't believe it
Step: open windows, use it for 2 hours
open broot, you should see the "paradigm shifting way"
@Stargateur thanks your advice. You seem to be very wise human. Is there any more advice you can provide? Please elaborate more. I want to know more about your infinite wisdom. Cleary you don't know the solution either. Total Fail dude. — Tampa 46 secs ago
I know one who doesn't sleep well this night
 
BUG: Broot is deleting my files

Steps:
1. create a directory with 6 files in it
2. run `broot /path/to/directory`

Expected results:
The directory should have 6 files in it. Broot should not be deleting files without asking.

Actual results:
There are only 4 of my original files! Broot has DELETED two of them and created a weird file called "2 unlisted".
 
PS... I am done with StackOverflow. You guys are loosers — Tampa 1 min ago
 
@DenysSéguret Well, as I said before many times: you must be a great dad.. It is fascinating how malleable and capable children are in the right hands! Well done, mate, really, keep up the good work of shaping the next generation of engineers ;)
 
the real fun is that question get closed by 2 c++ curator and 1 haskell curator
so he can't blame rust community xd
 
@Stargateur That's actually interesting. I wonder how they came upon it
@Stargateur "that 101% a bug from your code" -- that's obviously ridiculous. Only about 10% of his code is causing the problem.
 
11:04 AM
@PeterHall I forget the word chance
101 is due to float precision
 
@Stargateur 10.0% + 10.0% + 10.0% + 10.0% + 10.0% + 10.0% + 10.0% + 10.0% + 10.0% + 10.0% == 100.9999999999995412%
 
12:04 PM
@Stargateur So that's what triggered the heat detector.
 
12:18 PM
@E_net4theRustacean such a hot day... like 42C in france ^^
 
1:03 PM
@Stargateur are you hanging out on Discord now?
 
 
1 hour later…
2:31 PM
sometime
 
2:52 PM
@Shepmaster there is a lot of traffic so I don't go too often here
only when I'm waiting something
like on transport
 
 
1 hour later…
4:09 PM
I want to store byte buffers and pass them off to a function that takes generic Read trait objects. how can I make this work?
I don't want to tie the receiver's lifetime to the sender's so I'm thinking I should use Arc. have the function accept read: Arc<dyn Read>
then the byte buffers could be stored as bytes: Arc<[u8]>? that almost works, except Read isn't implemented for [u8], only &[u8]
so my call to func(bytes.clone()) fails with "the trait std::io::Read isn't implemented for [u8]"
 
can you expend with some code ?
 
I managed to get it working by storing Vec<u8>s and cloning the vecs, but I don't want to have to clone huge byte buffers to share them
 
your function stock the buffer ???
 
pub struct MockFileSystem {
    files: BTreeMap<PathBuf, Arc<[u8]>>,
}
 
just you have this MockFile that stock buffer
for whatever reason you want use func
well, just do a normal func wihtout any Arc
 
4:18 PM
impl File {
    fn new(path: &Path, read: Arc<dyn Read>) -> Self;
}
 
and pass it the &[u8]
 
I want my File objects to continue living even if the MockFileSystem is dropped
 
expect for very specific case where function need to have an Arc don't give a function an arc
I don't get it your function is async ?
 
yeah it's async
 
so you spawn it ?
or just call it
 
4:21 PM
you're suggesting I should not make that a goal?
 
well, depend, if the function is spawned it need an arc
but if the function is call, MockFileSystem can't go out of scope
so the first question is do func really need an arc
if yes we can work on fixing your problem ;)
 
let's say I'll be spawning. I'm not sure exactly how I'll need to use this. I haven't written my unit tests that'll be using it yet
 
well let me try
 
BTW is there an easier way to unit test code that reads files? I'm creating a `FileSystem` trait and requiring all my code that deals with files to take in an `&impl FileSystem`. dependency injection, essentially.

I found the [filesystem crate](https://docs.rs/crate/filesystem/0.4.4) which does exactly this but it isn't async
 
I'm starting to master Rust
@JohnKugelman isn't read trait already enough ?
 
4:37 PM
@Stargateur for low level functions that use Read yeah, but there are higher-level ones that use AsRef<Path> or similar
or use paths internally. I have a function that searches various paths for config files, for instance: it looks at /etc/app.conf, /etc/app.d/*. I want to test that it searches the correct system locations
@Stargateur use it like this?
let mut buf = Vec::new();
(*read).as_ref().read(&mut buf).unwrap();
 
should work
 
groovy
 
and it compile time no dyn
 
4:57 PM
@JohnKugelman that (*read) looks suspicious
 
@Shepmaster have to dodge Arc's as_ref()
 
@JohnKugelman hmm. at that point I think I'd be explicit. something like
Read::as_ref(&read)
 
I'm still churning on this. I think I was wrong to want the function to take an Arc. It really ought to take a Read directly.
impl File {
    fn new(path: &Path, read: impl Read) -> Self;
}
I think it's correct to start with an Arc<[u8]> or Arc<Vec<u8>> though, and then try to build a Read that owns a clone of the Arc
like this?
struct MockFileReader(Arc<[u8]>);

impl Read for MockFileReader {
    ...
}
That way all the Arc business is confined to the mock code and the generic File code is none the wiser that there's sharing going on
...Back to my bigger question though: do you all ever write tests for code that touches the filesystem, and if so, how?
 
@JohnKugelman depending on how much I care...
use scratch::{Facade, StandardLibrary, FileFacade};

mod scratch {
    use std::{io, fs::{self, File, OpenOptions}, path::Path};

    pub trait Facade: Clone {
        type File: FileFacade;

        fn open_file_for_read(&self, path: &Path) -> io::Result<Self::File>;
        fn open_file_for_write(&self, path: &Path) -> io::Result<Self::File>;
    }

    pub trait FileFacade: io::Read + io::Write {
        fn sync_all_and_rename(self, from: &Path, to :&Path) -> io::Result<()>;
    }

    #[derive(Debug, Copy, Clone)]
 
5:12 PM
The other approach I've considered is making these integration tests and using Docker containers to setup testing sandboxes. Plus: It would avoid the need to inject all this mocking code. Minus: A lot further removed from the code being tested.
 
I started down that path (but we didn't think it was currently valuable, so I didn't finish)
basically create my own middle-ground interface
 
My goal was to make it so that I could drive the tests with property-based testing
so it would be able to inject failures in a reproducible manner
 
you know what I try to sort my collections on mongodb, implementing it, work well, then some time passed, I rename @timestamp to timestamp and pop my program don't work
you would say normal you sorted on @timestamp, nono in fact I sorted on timestamp, I miss the name of the variable... so now mongodb really sort my timestamp
yes it doesn't report any error if my field doesn't exist...
now why my program assert fail... because I inverted asc and desc 1 and -1...
and so the whole time I never sorted my data but I was lucky that it was already all sorted
and I search I didn't find a way to report error if I try to sort on a missing field
 
5:29 PM
insert traditional mongo joke here
 
well, it make sense because document doesn't have to be identical and sort can be done on many field by priority
but ... that leave me how can I say to mongo, error is field doesn't exist
 
6:00 PM
report an issue on their issue tracker is a pain in the ass
remind me OBS stupid workflow
and that of course the number 1 reason why I would never participate to llvm gcc or any old open source project
Feature request: Use github issue or gitlab issue or any real issue manager not issue manager that are older that windows NT
 
6:16 PM
o/
 
6:29 PM
@FélixGagnon-Grenier \o
 
7:15 PM
GUYS I have an hard question
mod sync;
mod async;
how do I name my modules????
 
@JohnKugelman one of those is disallowed
so; easy question
 
compiler's being a jerk
 
3
Q: What are the use cases of raw identifiers besides new keywords?

Tim DiekmannAs in Rust 2018, we now have raw identifiers: This feature is useful for a few reasons, but the primary motivation was inter-edition situations. For example, try is not a keyword in the 2015 edition, but is in the 2018 edition. So if you have a library that is written in Rust 2015 and has a ...

 
sync is for syncronisation
I don't see why a module should be named async
 
reqwest has Client and blocking::Client
 
7:19 PM
mongodb have a sync for blocking client
 
make async first class?
 
pollen is killing me please tell it to stop.
 
`mod r#async`?
/r/madlads
 
"I will find you and I will kill you !" - the next dev who will take your project
2
 
mod r#sync;
mod r#async;
it's fine
 
7:24 PM
use r#async as john_is_a_monkey;
 

« first day (2054 days earlier)      last day (1417 days later) »