« first day (2087 days earlier)      last day (1627 days later) » 

10:22
@mcarton This code reducer work looks very exciting, I hope you'll announce it loud and clear when it's ready for public meddling.
Yes, for now I've only announced it here because I think it's already useful for SO, but before I announce it on other channels, I want to make it work on crates too
 
2 hours later…
12:11
@mcarton what does "work on crates" mean?
@Shepmaster cargo obelix would eat your crate and remove everything but the minimum code to reproduce the original error
What does it do now?
12:27
It works on a single .rs file
12:46
oh, you mean it doesn't really support modules in files at all?
13:00
> "C is still one of the top 10 languages," answered Torvalds. However, he said that for things "not very central to the kernel itself", like drivers, the kernel team is looking at "having interfaces to do those, for example, in Rust... I'm convinced it's going to happen. It might not be Rust. But it is going to happen that we will have different models for writing these kinds of things, and C won't be the only one."
2
@Shepmaster At the moment no. It would be pretty easy to support, but I wonder what the CLI should be. For single files, it just outputs on stdout, but for a full crate that wouldn't be convenient, even if it would inline all modules. And I feel that if it modified the current folder, I'd get a few angry comments of people who just lost days of work.
I was thinking it should either:
- check that everything is commited before running
- make a copy of the current folder, and work in that instead
13:13
@DenysSéguret Well, that comment could be interpreted however you like. We may replace things. We may not. We may use Rust for that. We may not.
@PeterVaro this looks like much to me. Linus was vehement against past suggestions to use C++ for example. And now he recognizes a language like Rust could start having its place. Now people have to try and build
@DenysSéguret Every sane person is against C++ -- there's no surprise there :D
@DenysSéguret Haven't they already tried and build, aka Radox
@PeterVaro Wait... programmers are sane????
I know what you mean btw, but still, that doesn't mean much to me at this point
@NebulaFox Fair enough, I stand corrected: Every slightly saner person..
It could be that Linus is turning soft. :>
13:21
@E_net4flagsheat Yup, microSOFT
Let it rain
@NebulaFox radox ?
You mean redox ?
It's not related to linux, is it ? It's a whole new OS, not an attempt to grow linux
13:23
IIRC It's not, it is an OS written from scratch
my point is, it proves it can be done
and rust and c are compatible
@NebulaFox Not necessarily: Redox is not production ready AFAIK and not battle tested either..
@PeterVaro I'm not saying redox replaces linux, I'm saying Rust is more than capable to being an alternative to C
Indeed it is, that's why we're in this chat room, aren't we? ;)
But kernel development is a different beast
there are so many other constraints you have to satisfy
and i'm saying that redox at least shows it can be done in Rust
@PeterVaro but its at least its not an echo chamber
13:27
..not an echo chamber
..chamber
..chamber
13:38
I like chambers.
2
@mcarton checking for dirty is reasonable; rustfix does the same (with a flag to allow overriding).
I also think that just inlining into one file is totally fine, except for the cases where the bug is because of separate files.
Obélix is more destructive though :D
I think I'll eventually support inlining as a default option, because it's nicer for MVE
14:14
Hi all!
@Jason o/
Haha, hey @Shepmaster! You just managed to beat me in answering that question on sha256 :-)
Ha, I was trying to look for the low hanging fruit on Stackoverflow, hopefully helping some and learning more about Rust and associated crates myself. I only recently learned about clap having support for "help headings" that way.
@Jason That's exactly why I'm here too <3
@Jason That's actually why I do a lot of the editing I do. It's part of actively reading the question / answer for me.
14:25
I noticed and it's appreciated! I'll try to do more of that as well.
14:39
No reason to force yourself to do the editing; just sharing how I go about it.
If you want to play FGITW, you can watch new questions or active questions.
Somehow I missed the fact that we have matches! now. I'd probably have used in some recent tests I made.
There's also unanswered questions, but I feel like a lot of those are poor-quality. You should feel comfortable downvoting questions that aren't answerable.
@E_net4flagsheat I use it for tests of SNAFU errors
@Shepmaster Now that's more star-worthy.
@Shepmaster Precisely what I had in mind: to test error cases.
assert!(matches!(foo, Err(MyError::Thing { .. })))
Ha, @E_net4flagsheat was that related to the question about optional values and checking for an Enum variant? Someone mentioned it there as well.
3
Q: Is there a shorthand for evaluating whether a refutable pattern matches?

allsey87As far as I can tell, refutable patterns can only be tested in match, if let, and while let expressions. To illustrate what I would like to do, consider the use of the => syntax from the match statement in the following context: let val = get_optional_value(); if val => Some(inner) { do_somet...

14:43
Speaking of SNAFU, I think I now know why my former attempts of migration did not go so well: I need to take a top-down perspective rather than bottom-up (as in, adjust the errors at a higher API level, and work my way down, rather than the opposite).
@Jason Pretty much related, yeah. :)
@E_net4flagsheat hmm, that's interesting. One thing I try to have (with or without SNAFU) is an error type at a module level
which makes transitioning easier, as you can move one at a time.
@Shepmaster Well, I suppose it's a bit far from just a migration, but an outright enhancement. Right now the error types are at crate level. And the main problem is that these errors have been wrapped around without context at higher level APIs, kind of like core -> encoding -> object
Thus making the process substantially heavy.
@E_net4flagsheat, it somewhat confused me :-), as from my understanding `.filter` only works on a collection, and it was named `get_optional_value().filter()`.

There's also the experimental [`.contains(...)`](https://doc.rust-lang.org/std/option/enum.Option.html#method.contains), which seems to be syntactic sugar for a `match` which returns a `bool`, but I think that'd be appropriate for a collection of `Option` and not a collection of their values?
@E_net4flagsheat It is possible to mimic that in SNAFU, to make it a smaller step.
@Jason filter is also implemented for Option, yes.
14:51
You'd have an error type that has a boxed version of itself as the source.
@Shepmaster On the other hand, considering the carpy error messages that I've occasionally had, I do want to make them more useful and informative.
@E_net4flagsheat oh, I'd suggest it as a step along the path, not the end goal
@E_net4flagsheat I also read it as "flag sheat"
@E_net4flagsheat, ah, I see! Thanks!
@Jason chat pro-tip: if you hover over a message, you can click the arrow on the far right to reply to a specific message; linking back to it
@Shepmaster Ha, that makes a lot more sense, thanks :-)
 
5 hours later…
19:38
Compile times became a hot subject lately.
19:56
@E_net4flagsheat catch the wave
20:31
What was that small alternative to serde?
Ah, miniserde and nanoserde. How could one miss that.

« first day (2087 days earlier)      last day (1627 days later) »