« first day (2327 days earlier)      last day (1155 days later) » 

6:32 AM
Did you know that after 5000, GH doesn't tell you the number of stars anymore ? I didn't
 
 
3 hours later…
9:27 AM
/me sees Jason again
 
@DenysSéguret it's at 5003 now.
Haha, good morning
 
How do you know how many stars there are ?
I don't see that information on GitHub. I know you're right, though.
 
The ARIA label seems to list the total amount of stars
<a class="social-count js-social-count" href="/Canop/broot/stargazers" aria-label="5003 users starred this repository">
    5k
</a>
 
ok, didn't know about that one. I was using starry to get the count
 
10:19 AM
@Jason Ah, you become a true :p
 
Good morning @Stargateur! :-) What does a "true" mean in this context?
 
I don't think I used the best word, maybe "you are a real one", it's some french to say you begin to think like us :p
 
Ah, cool, got it! Thank you.
If I get to be a boolean, I'd like to be true.
2
 
10:35 AM
@Jason If one must be a boolean, one might as well be true. I prefer to be an Option though: you always have to check me if I have anything to offer!
2
 
If I would be a programming concept I would be a tail recursive function. You would never known when I'm gonna return the result but you know I'm safe to use.
 
If one must be a Result, you'd better be Ok.
2
 
@Stargateur That's cool as well, although in that case, I would like to be mutually-recursive functions with the two sides of myself (both good and evil) invoking each other. You won't be able to optimise me in any ways.
@E_net4wantsmoreflags Err.. I don't know ;)
 
@PeterVaro pure evil
 
10:50 AM
@Stargateur :see_no_evil:
 
11:01 AM
2
Q: Rust pattern match on a reference of Option one way working but the others way not (borrow checker not pass)

Fuyang LiuIn Rust if a structure is like this struct Node { next: Option<Box<Node>>, } Then to implement a method to find the tail and add a new node on it might look like this fn add1<'a>(mut node: &'a mut Node) { while let Some(next) = node.next.as_deref_mut() { node = next; } no...

don't we have duplicates for that ?
We need a list of link with all linked list question in rust xd
 
@Stargateur You mean the one literally in the chatroom description?
Oh, you mean specifically for linked lists? That would be too specific a list. :P
We have a comment: "Mandatory reading: Rust with too many linked lists"
It would be a more useful comment than the one you just posted.
 
@E_net4wantsmoreflags well, it's hard to find a good duplicate they is so many linked list question and there are all bad
I would like a sheet with "problem x in linked list" => duplicate
@E_net4wantsmoreflags I getting tired of this, people all wanting to start rust by doing linked list
 
I've had this conversation more than once, even with colleagues at work. They expect linked list construction to be a basic Programming 101 exercise regardless of the language. :[
And the truth is: in Java and similar, it's only easy because of GC. In C and C++, it may seem relatively simple, but it's easy to shoot yourself in the foot.
In Rust, writing a linked list that is efficient and safe is hard, as it's supposed to be in its memory model.
But heh, now I'm just preaching to the choir.
 
I already try to write a circular list in Ocaml, It was really funny to have the code right and compiler say to me <insert meme "We don't do that here">
 
Linked list based structures in java or c++ are only easy until you try to use them in production. They're all sources of bugs and of bad performances
You may have ten pages of unit tests and you'll still discover later a bug
 
11:13 AM
I did all my school using linked list at Epitech xd, a old student say recently "I never used linked list outside Epitech" :p
 
(one of my cache structure was used during 15 years in production before I found a bug, and I was lucky enough to have enough data dumped in log to precisely understand it)
 
It's ridiculous how much schools and universities emphasize the linked list data structure when it is so often not the right data structure for collections.
Programming II (second semester in my CE course), they had to cover singly-linked, doubly-linked, circular, and hash maps with linked list buckets. And the outcome? Just use List/Map and ArrayList/HashMap from the standard library.
 
Well, they look pretty to somebody with a pure mathematical mind. For the same reason you find so many people thinking with recursion while recursion is also a common source of ridiculously slow algorithms
 
@E_net4wantsmoreflags That's where the problem is: the outcome is wrong, not the fact that they require you to know these data structure.
In reality knowing all these will give people a really good understanding on fundamental problems in CS
But not teaching why certain models / structures are outdated is bad.
Yes, I believe everyone should implement all the basic data structures at least once in their lives, and yes, I also believe they should understand why some of them makes very little, or no sense at all anymore.
 
Hard to teach because it's "practical". You can reason with linked lists with just some pen and paper, but the reason why they're bad is related to computer, cpu, memory. It's hard to discuss in a pure theoretical cursus without doing benchmarks and tests
 
11:21 AM
@DenysSéguret Which is exactly why 90% who came out from unis (CS) are not good engineers at all. At least, this is my experience, regardless of the uni.
Software engineering is very tricky subject, because albeit it requires the knowledge of an insane amount of theory and abstract thinking
at the same time it is insanely hands-on, practical, and pragmatic "science" as well
Just as you put it @DenysSéguret above.
 
@DenysSéguret linked list are not bad, they have use case, just these use case is "well, kernel need it there is not array..." or "well garbage collector need it, there is also no array", they are also nice if you want to split your array into smaller array and be able to remove sub array really fast.
@PeterVaro funny how that true
 
@Stargateur I do use many structures of the linked list family, for caches,sort, etc.
 
A bit tangential, but I also love it when we sometimes see these "beautiful" implementations of quick sort in their favorite functional programming language, but in practice it is only so when picking the worst sorting pivot.
 
@E_net4wantsmoreflags that why I prefer merge sort ^^
 
Why did I engage into trying to implement copy-pasting in rust on android ?
 
11:32 AM
you really crazy
 
11:44 AM
I've had crazier people telling me that broot was their favorite file manager on android. So I'm trying to make it feature complete, including copypasta
and I think it can work, in fact
 
12:30 PM
reading clipboard works - crate incoming
This might be my most niche crate ever, which isn't a small achievement given that I'm already the sole user of most of my crates
 
that how all crates started
 
 
1 hour later…
1:48 PM
@E_net4wantsmoreflags Type unsafety of method decorators, or in fact any kind of decorators. And using them is a colossal PITA, thanks to the leaking abstraction of the non-class nature of JS classes :sob:
(This is something I had to deal with today, the scars are rather fresh on my mind..)
 
Decorators? Aren't those still experimental?
 
Sure they are, but they are working, they've been for years.
I mean Angular is actually using them for years.
(I'm not using Angular or anything, I'm just telling you, that's a "production ready" framework used by thousands)
 
Whelp, never used those seriously. Although there was a time a babel transform provided decorators that would just map the definition through it and reassign the object.
 
TypeScript has them, but they're not part of the spec, yet.
Last I checked at least. It's been a while. I never used Angular, but I think it used TypeScript as well, no?
 
each time someone talk about decorator in my mind: amkashop.com/imgtous/blog/200906/deco-emission-m6.jpg
 
2:07 PM
@Stargateur And what's that ? A TV show ?
 
@DenysSéguret it was a tv show on M6
sometime I was force to watch it xd
it's bad memory like decorator in python
 
@Jason Decorators never even reached stage 3 in ECMAScript, so trying to stabilize them in TypeScript would be risky.
 
2:42 PM
@E_net4wantsmoreflags No disagreement here at all :-)
 
quality of two last questions make me sick
it's like the question is trying to be a "explain as badly as possible the plot of a movie"
 
3:09 PM
On a completely unrelated subject, in case someone still thinks performance in a web application is rarely important, imagine trying to upload 4000 files and the browser freezing for more than 7 seconds on each one.
 
what are you doing ? xd
 
QA.
This effectively happened.
 
Imagine you have a crate called "broot" with two optional features called "clipboard" and "termux".

When the "clipboard" feature is enabled, you want to use the dependency "terminal-clipboard" (which is a crate).

When the "termux" feature is enabled too, you want to use the dependency "terminal-clipboard" with its feature "termux".

It looks like there's no way to make it work in Cargo. Is that right ?
 
If "termux" = ["terminal-clipboard", "terminal-clipboard/termux"] doesn't work, then I don't know. :[
I don't even know if the first "terminal-clipboard" is necessary.
 
@DenysSéguret I think it's possible
 
3:20 PM
Hum... maybe it works in fact, the cargo error was due to a typo
must try (which will be long)
 
# Features can be used to reexport features of other packages. The `session`
# feature of package `awesome` will ensure that the `session` feature of the
# package `cookie` is also enabled.
session = ["cookie/session"]
I'm the doc master
 
I had found this. The problem is in combining several versions of the crate depending on the feature combination
But I'm currently trying to interpret Cargo errors...
 
@DenysSéguret wow maybe using doc.rust-lang.org/cargo/reference/… but you ask a lot here :p
why not just use the same version xd
you ask for trouble here
 
By version I mean the crate with or without the subfeature. Some functions are changed with the feature
Using this:
terminal-clipboard = { path = "../terminal-clipboard", optional = true }
I get this
Isn't the message strange ?
 
try cargo clean ?
 
3:33 PM
same error
 
@Stargateur doc who? (<-- This might be too much of a British reference for you vOv)
 
@PeterVaro It's a bigger reference on the inside than on the outside.
 
@E_net4wantsmoreflags <3 <3 <3
 
@PeterVaro Not too British: even me who never watched it (I never watch TV nor movies), I've been forced to see so many references to it
 
@DenysSéguret Sorry you had to bear yet another one then ;)
 
3:42 PM
This error is really frustrating
Caused by:
  failed to read `/terminal-clipboard/Cargo.toml`
 
@PeterVaro I don't like this show much
@DenysSéguret well that an absolute path
I'm trying to help ok !
 
@Stargateur Yes, And I've no idea where Cargo finds it
I've cleaned the cached registries
 
well, I could git clone broot and you do a gist with the cargo.toml and I could try to help you
 
If I try with an absolute path, it fails to read the right file
I did a copy paste for the "cat"
 
@Stargateur I don't like it anymore either. Not since Capaldi took over (and the show runners burned out), which was a long time ago. And Whittaker (and the new show runners) made a terrible job on reinventing the show and the characters again. But before these, it was a FANTASTIC show!
 
3:47 PM
@PeterVaro but before is a bit too old for my taste, like star trek, I find it very hard to watch very old show
 
I agree that David Tennant and Matt Smith played the role well. Nothing serious against Capaldi though.
 
@DenysSéguret I have broot and terminal-clipboard ready, give me the changed code ! :p
 
@E_net4wantsmoreflags Not personally against him, I liked his look the most of all, and I truly wanted to have a grumpy, cruel, dark, old Doctor. But mainly Steven Moffat burned out IMO. So despite the fact that he is a talented actor, he couldn't do anything with the rubbish script, apart from a handful of great episodes, the majority were mediocre.
 
@Shepmaster having fun doing hashmap thing ?
 
Oh, I get it
The problem is related to cargo cross, which fails to read the relative path
I forgot this specific target was compiled with cargo cross, and thus in docker
 
3:56 PM
docker ruin everything
 
/me closes 50 tabs
 
/firefox keep using the memory anyway
 
It's Chrome and I won't fight over my browser choice
 
Once again I try to read book.amethyst.rs/book but it's so badly written and unclear. Also totally boring
@DenysSéguret whatever
I'm using curl
 
@Stargateur Just fixing some memory unsafety
 
4:05 PM
posted on February 26, 2021 by The const generics project group

After more than 3 years since the original RFC for const generics was accepted, the first version of const generics is now available in the Rust beta channel! It will be available in the 1.51 release, which is expected to be released on March 25th, 2021. Const generics is one of the most highly anticipated features coming to Rust, and we're excited for people to start taking advantage of the in

4
 
@Shepmaster that what we do :p
@Feeds wow wow wow
it's about time
 
I WANT CONST GENERICS! GIMME!
 
old news
been in beta for weeks now
 
Gief GATs plz
 
I can only use stable. It's already hard enough to tell users that they can't compile my code with clamp because they have an antique version of rustc
 
4:07 PM
@Shepmaster that you who are old !
@DenysSéguret so I must not have my rust update because broot ask me nightly to compile xd
 
What ? broot compiles perfectly on any not too old stable
(of course it's a little old when the compilation finishes, though)
 
@DenysSéguret well I have rustc 1.49.0 and it's require 1.50.0 and nightly is 1.51.0 xd
clamp is stable since 1.50.0
 
"well I have rustc 1.49.0" ... This is oooooolllllllddddd
 
@DenysSéguret yeah like the last year "rustc 1.49.0 (e1884a8e3 2020-12-29)"... :p
so, "not too old" mean current - 1 xd
 
4:12 PM
TBH other people find this a little too recent too...
 
@DenysSéguret I don't think that, it's totally ok for me
I love thing that follow update
stable is stable
 
With lots of horses.
 
the number of people using broot is impressive
 
@Stargateur Probably but I have no idea of that number
 
@DenysSéguret more than one, presumably, less than 6.5B
 
4:17 PM
well, I'm guessing people that star it must have use it at least a little
@Shepmaster in 100 years that would have been more that 6.5B humans that have been alive :p
 
I'm sure I closed issues by at least 100 different users
 
notice he doesn't say "solve issues" but "close"
 
I've about 40 downloads per day on my server and last time I tried to estimate this was about a fifth of the downloads I could find (other being GH, apt, and a dozen rarely used repositories)
@Stargateur I this precise case it's about the same amount
crates.io counts 30k installations but doesn't tell me how many are reinstallations
Sometimes people tell me they downloaded it on strange places, like 01.net
 
@DenysSéguret I was here... 3000 years ago
 
All in one I'd say there's between 5000 and 20000 users. I might be wrong but that's my estimate (I assume some users install it but don't use it)
 
4:26 PM
well, at least 20000 persons that have try it
 
I'd say more like 50k to 100k (I had spikes on my server) and probably 10% to 50% keep it
 
@DenysSéguret what are you using in broot for terminal manipulation ?
 
@Stargateur For most things it's crossterm
(if I understand your meaning)
The very first versions were based on termion but there were too many bugs, mainly one preventing the use of stderr to run the TUI on alternate (and thus making it impossible to output a result on stdout for a calling application)
 
4:48 PM
@DenysSéguret here the pr is done, bonus remove unsafe keyword :p
 
@Stargateur Why don't I find this method in the documentation ?
 
@DenysSéguret I'm doc master
 
Oh thanks. Did you test ?
 
@DenysSéguret nope I'm having issue installing it
i can try to run cargo test... 10 passed one fail but that seem unrelated to my fix
Oh I don't need to install it
@DenysSéguret what broot is expected to do if the output is no a tty ?
broot can output thing ?
 
When writing to a file, if --color is auto, then I remove the style
@Stargateur Yes, you can for example do br -c :pt
but to a file
Right now I'm trying to determine while my compile tool didn't tell me there was a problem on windows
 
4:59 PM
@DenysSéguret and I will work on why your option color doesn't work at all :p
even with --color no
 
It works for me (with the unsafe code)
 
@DenysSéguret allow me to doubt
it's not my code so It hard to be sure but github.com/Canop/broot/blob/master/src/print.rs#L85
it's doesn't look like you remove color output
like you pass &con.ext_colors
oh oh oh
ok
no not ok
okay that just power shell bullshit
all work
it's good
no not good
oups
 
I confirm that 1.2.5 confirm for me using cargo cross :\
 
wait plz
why in the hell my editor is vim
 
5:14 PM
it looks like a sane choice
 
not for me
anyway, you invert your function is call is output piped, so it's the opposite of is_tty...
hate you
 
libc::is_atty is supposed to be present on windows
 
yes it compile and everything, but doesn't work well on powerwell
work on bash
 
powershell sux too much
 
5:19 PM
Could you please rewrite your issue for clarity ?
The title is "does not compile"
 
I don't know what to write
 
You noticed that the pipe detection didn't work correctly on powershell ?
 
@DenysSéguret well, that another problem
the real problem was it doesn't compile
 
But it does compile
 
@DenysSéguret without my commit no
PS C:\Users\Star\git\broot> git checkout ee7c3198e1ec99246926f3
HEAD is now at ee7c319 documentation shows most parts both in Hjson and TOML
PS C:\Users\Star\git\broot> cargo build
   Compiling broot v1.2.5 (C:\Users\Star\git\broot)
error[E0425]: cannot find value `STDOUT_FILENO` in crate `libc`
  --> src\cli\mod.rs:78:33
   |
78 |     unsafe { libc::isatty(libc::STDOUT_FILENO) == 0 }
   |                                 ^^^^^^^^^^^^^ not found in `libc`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0425`.
@DenysSéguret It make sense that this code doesn't compile on windows cause windows doesn't have file descriptor
I think your check tool have a problem :p
this line compile using gnu
 
5:27 PM
I think I'll just decide auto is "yes" on windows
 
@DenysSéguret why ? my commit fix the problem :p
and powershell is just having problem with encoding, not at related with color problem
it doesn't like utf-8
 
@Stargateur Does it ? I mean does it have the right behavior regarding enabling the colors depending on piping ?
 
@DenysSéguret it doesn't like the character used to represent the tree
but it's was perfectly without the pipe
it's the Out-File powershell that doesn't work
 
I'll try your PR
 
28
Q: PowerShell out-file: prevent encoding changes

PeteI'm currently working on some search and replace operation that I'm trying to automate using powershell. Unfortunately I recognized yesterday that we've different file encodings in our codebase (UTF8 and ASCII). Because we're doing these search and replace operations in a different branch I can't...

this is pure nightmare
FINALLY
6
A: How to configure the encoding for Powershell console?

MartinHave a look at this post Current Encoding: [Console]::Out Set Encoding (UTF8): [Console]::OutputEncoding = [System.Text.Encoding]::UTF8

it's work perfectly
 
5:47 PM
@Stargateur I don't know whether those problems are common on windows but just in case this page might be in need of a PR: dystroy.org/broot/common-problems
 
Eek. Another example of people using that nearprotocol thing without trying to learn actual Rust.
 
what's the "nearprotocol thing" ? The blockchain thing ?
 
yeah, the doc literaly write "you need to set permision but I didn't bother explain how"
 
6:26 PM
I feeling like this have take out all my energy
 
Apero did that to me
 
 
3 hours later…
9:43 PM
I must say it: the rules language tying targets (and their 4 parts), features and dependencies is totally broken
 
@DenysSéguret examples?
 
10:03 PM
o/
I seem to be writing a bunch of matches
 

« first day (2327 days earlier)      last day (1155 days later) »