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

8:04 AM
Good morning, gang
 
8:15 AM
Morn
 
8:28 AM
Each time I see "Morn" here, with this font, I read "Mom"
(sorry if you were really speaking to your mom, I can't see the difference)
 
Hi Mom!
 
@DenysSéguret mmhhh ok. I can use morning, that can diffuse that motherly tension ... :D
 
 
1 hour later…
9:53 AM
@DenysSéguret hi old man :p
 
@Stargateur It is a well known problem, called 'multi-letter homoglyphs'
In orthography and typography, a homoglyph is one of two or more graphemes, characters, or glyphs with shapes that appear identical or very similar. The designation is also applied to sequences of characters sharing these properties. Synoglyphs are glyphs that look different but mean the same thing. Synoglyphs are also known informally as display variants. The term homograph is sometimes used synonymously with homoglyph, but in the usual linguistic sense, homographs are words that are spelled the same but have different meanings, a property of words, not characters. In 2008, the Unicode Consortium...
 
@PeterVaro You mean a hornoglyph.
 
@E_net4thecircusstopper ROFL
 
You mean havv havv?
(Let's stop here..)
 
10:04 AM
@Stargateur Hi kid
There should be automated font tests to check for hornoglyphs. Faulty fonts should be fixed
 
@DenysSéguret You can always override the fonts used on website in your browser. As in, your browser would ignore any font information (other than size, wight, and variant) and will use the one you specified.
I've never done this because it can ruin the "design" of a website
But from a readability PoV you could be far better off with a nicer, more legible font
 
I mean the existing fonts, should be tested and fixed
 
He, I just came across a very old question of yours @DenysSéguret, "WebP encoder/decoder in go"
 
@DenysSéguret Yeah, I got what you were saying, but that's impossible, moreover IMO impractical
 
Morning
 
10:09 AM
@PeterVaro Why impossible ? There's about 1000 couples of letters. We could check one million pairs of such couples with a tool looking at graphical similarity
@Jason Don't hesitate to answer if you have news about it
 
@DenysSéguret Because 1. it is not the combinations of the glyphs that matters, but kerning, the hardware rendering (i.e. rasterisation), etc. as well, 2. not all fonts meant to be legible (e.g. display fonts, *dings, etc.)
 
@PeterVaro all this can be tested: the idea would be to test rendered glyphs as images
It doesn't have to be fast as the goal is to check the font to fix it. If it takes 1 hour to check a font for black on white, that's OK
 
@DenysSéguret Unless you use a camera on a device that renders the font at a certain size with all the properties applied (even the the contrast between the foreground and background, not to mention the actual colours) then you could be able to make an informed decision, but purely on the software level it would be insanely hard if not downright impossible.
 
@PeterVaro keming
I think there was a keming subreddit that had images of bad kerning.
 
@Jason It is very hard to make that work properly, especially in conjunction with rasterisation AND subpixel font-rendering
These are insanely complicated issues.
 
10:16 AM
All this is purely software (including subpixel font-rendering) and goes down to an image. There are many tools for image similarity measurement today
 
@DenysSéguret Except when it is hardware accelerated.
 
I am aware :p
 
(Which I believe is the case with eBook readers for example)
 
@PeterVaro I don't care about this. The font is obviously faulty, and with about any renderer at common size it's hard to make the difference between "rn" and "m". Some other fonts don't have the problem.
 
@DenysSéguret TBF, it is not really the problem of the font, but the the latin letters we use.
Anyway, I don't want to be the one who stops you from spending years of your life developing something that would do these checks (even if I believe this is not practical, maybe not even possible)
 
10:23 AM
All should be monospaced.
Honestly, I don't think that would solve much either. It's really the letters themselves.
 
Just to be clear, even if I don't estimate this in years, I'm not interested enough in this problem to do it and I've already a few centuries of work in my TODO lists
I've just decided to do this evening a simple library to get the current and peak memory of a program, to log it in debug mode (I've made many changes related to memory consumptions in my programs recently and I want to measure that)
 
10:42 AM
@DenysSéguret This sounds nice!
I gave iai a short look, which seems somewhat related.
 
 
4 hours later…
2:56 PM
@Jason I was finishing my crate when I found out there was already one about the same: docs.rs/procinfo/0.4.2/procinfo
Its only problem is that the documentation makes you think the values are in kb while there are in KiB but that's not worth a new crate
ok no, there's another problem: it's dead and doesn't compile. But there's a newer one
 
3:19 PM
@DenysSéguret I see, the procfs crate.
 
Yes
I don't like it much. Over complicated for me. So I'll finish my small crate for my own usage. But I won't publish it
 
 
1 hour later…
4:43 PM
Mine:
//! let mem = proc_status::mem_usage().unwrap();
//! println!("Mem usage in bytes: current={}, peak={}", mem.current, mem.peak);
//! // prints something like
//! // Mem usage in bytes: current=1156, peak=138116
 
@DenysSéguret Oh, that seems really nice. I'm not that knowledgeable on how memory allocation works, but wouldn't such a report be useful during CI as well?
 
Maybe. Right now I'll just dump the info in my logs (for example rhit) to evaluate the impact of changes to peak memory (I don't like my programs to eat more than necessary))
 
5:50 PM
@Jason I've published it: crates.io/crates/proc-status
But anybody needing this should probably have a deeper look at procfs
 
@DenysSéguret Lovely!
 
There's something fishy here:
 
@DenysSéguret The all time downloads and chart being out of sync?
 
yes
I mean, it doesn't seem so hard to sum all the one hits
and I doubt anybody downloaded it yet. I'm still using it by local path
 
That is odd. I'd expect it to make use of the same data, but it pulls from crates.io/api/v1/crates/proc-status, which has downloads at 0 while crates.io/api/v1/crates/proc-status/downloads has it at 1.
I guess some kind of caching issue :shrug:
It could perhaps be a bot?
I'll leave it be. I get way too invested in these mysteries.
 
6:05 PM
it's buggy. We should rewrite it in rust
 
6:25 PM
hi guys!
does anyone know why many people use fully qualified syntax when cloning `Arc`s and `Rc`s?
is it "preferred" to write `Arc::clone(&foo)` or `foo.clone()` and if it's the former, why?
I tried googling for answers on SO, but I couldn't find anything, and the question would probably be (rightfully) closed as opinion-based.
the [docs](https://doc.rust-lang.org/std/sync/struct.Arc.html#deref-behavior) are careful to state that "some people prefer [one], while others prefer [the other]".
 
@user4815162342 That seems related to what @E_net4thecircusstopper was speaking about sometime ago chat.stackoverflow.com/transcript/message/51697838#51697838
2 days ago, by E_net4 the circus stopper
"The Rc::clone(&from) syntax is the most idiomatic because it conveys more explicitly the meaning of the code. [...] this syntax makes it easier to see that this code is creating a new reference rather than copying the whole content of foo."
 
posted on March 04, 2021 by Ryan Levick

The Rust 2021 Edition working group is happy to announce that the next edition of Rust, Rust 2021, is scheduled for release later this year. While the RFC formally introducing this edition is still open, we expect it to be merged soon. Planning and preparation have already begun, and we're on schedule! If you're curious what features Rust 2021 will introduce or what the timeline for getting th

 
@Jason thanks, I figured that might be the reason.
what's the verdict of the common usage? do you use the fully-qualified syntax or the ordinary method call?
 
@user4815162342 The quote above is from the documentation for Rc.
I personally agree with it, for what it's worth. :-)
 
so do I, I was just wondering about the usage in actual code out there.
but if the docs advertise the fully-qualified syntax, that's good enough for me.
(I didn't find it because I was looking at the type documentation instead of the module-level docs.)
 
7:29 PM
@user4815162342 Those are the rare cases which Rust has no solution for: if it wouldn't implement std::clone::Clone, then the type could've force the associated function invocation to be used all the time over the method one by providing a specific implementation itself, but then of course it couldn't be used where Clone is required. So now we have a convention, that is not enforced by anything.
On the one hand I understand the reasoning of the documentation, on the other though I do not necessarily agree with it, because it forces one to treat Clone for Rc as if it would be any different tahn Clone for X albeit it is not.
It would be nice if one could express this kind of thing to the compiler, if we really think this is necessary.
Until then remains confusion and ambiguity.
 
"confusion" is too strong a word, at least for me personally
I was just curious about the idiom which I understood on an intuitive level, and was looking for an "official" recommendation, which in fact turned out to exist
 
8:00 PM
My work here is done?
 
8:13 PM
 
8:47 PM
Ah, you beat me to the punch @user4815162342 :-) I'll delete mine.
 
9:08 PM
@Jason sorry about that :))))
 
@user4815162342 Ha, I thought it was funny that we came up with the same answer. The bit about a generic implementation is nice!
 
thanks; I consider that an "added value" to make the answer not too trivial.
 

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