« first day (1927 days earlier)      last day (1544 days later) » 

12:28 AM
god I would go sleep
 
something in particular is preventing that?
 
my stupidity, but I said that because I completely fail an answer XD
I forget how to rust
 
awww :P an answer here on SO?
 
just for you :p
I should have read warning
 
... yeah I should invest some effort and get to 10k already :P
 
12:31 AM
I wrote this:
const R: std::ops::RangeInclusive<u8> = 0..=9;

fn main() {
    let r = R;
    match 0 {
        0..=9 => (),
        r => (),
        _ => (),
    }
}
doing two thing at the same time and going sleepy is terrible
 
I feel you (in a totally non-obtrusive and weird way)
 
I know some english thing ^^
 
I receive recently a google trad scam, very funny
 
unrelatingly, why are you not currently enjoying an totally acceptable bottle of wine which you'd pay like 3 euros?
(speaking now is totally not my great jealousy at the state of wine in France vs here)
 
12:36 AM
well french have not the best territory for wine but in the south of the France they produce good wine, also, I do not drink a lot just socially, and as a man of the north I drink beer most of the time.
Everything taste good in France so we have choice ^^
 
and I'm not being chauvinist here it's simply true, and trust me I'm the first to critic my country but food is fucking too good here
 
Oh, I have no problem with that
even if you were a bit chauvinist, it's really not a trait of character that's worth a quarrel that much
that being said, you are wrong. You guys don't have poutine.
 
we have... but that like pizza every one have its recipe :p
 
12:41 AM
we don't have maple production :p
 
I only recently understood how maple were unique, tbh
 
but don't worry even in a small shop you can buy it
 
recently like, last 5 years
before that, I thought they grew like, everywhere on earth
 
well there don't grow every where like grape for wine :p
 
@Stargateur a month ago I don't know what got into me, but I bought two gallons of maple syrup.
 
12:43 AM
@FélixGagnon-Grenier you can use it as sugar
 
I don,t know how I'll ever get through all that, but it's awesome
 
in tea, coffee
 
@Stargateur oh yeah :)
... my pride is a bit hurt that I'd never think of using that to sugar my coffee, but I also never put sugar in my coffee
 
Well, I love maple ^^
 
:)
@Shepmaster You have some nice canned comments, I must say
did you create some userscripts to get buttons in your UI or do you paste them by hand?
 
12:46 AM
@FélixGagnon-Grenier Thanks! I've refined them over years and Carol has also reviewed them.
441
Q: AutoReviewComments - Pro-forma comments for SE

Benjol No more re-typing the same comments over and over! This script adds a little 'auto' link next to all comments boxes. When you click the link, you see a popup with 6 configurable auto-comments (canned responses), which you can easily click to insert. This script was inspired by answers to thi...

 
wow :) that's wayy too useful
 
@Shepmaster BTW maybe worth sharing the source with hackmd.io
 
@Stargateur my specific comments or the link to the script?
 
@Shepmaster your comments, that could be useful for everyone
If I remember auto correctly you can easily do that
 
1:05 AM
hmm.. I don't really get the error here: I constrained the blanket implementation of both A and B to be Wrapper and the Wrapped of the Wrapper should be A or B respectively -- so why does it continue looking into T which is not Wrapper?
 
 
4 hours later…
5:07 AM
2
Q: Does the Rust standard library have a Min/Max trait?

Hossain AdnanI want to initialize a variable of type T with its minimum value like T::min(). Is it possible in Rust 1.40.0 without needing an external dependency? An alternative approach is to set the variable to be None, but this introduces an overhead of None checking each time I want to increment the var...

damm
this question sux cause OP obviously doing something wrong
but +2 xd
 
 
4 hours later…
9:36 AM
so, umm, since we don't have negative traits, how could one express a generic and a more specific (more constraint) implementation of a trait without running into the issue of conflicting implementations?
trait A {}
trait B {}

struct X<T>(T);

impl<T> A for X<T> where T: B {}
impl<T> A for X<T>  {}
 
@FrenchBoiethios awesome let me dig into it!
 
I'm almost finished with the first one, give me a few
 
9:58 AM
grr.. clunky and hacky..
but thanks for this nonetheless
 
10:36 AM
Of course, the real solution is to wait for specialization :P
 
11:01 AM
@FrenchBoiethios yeah, very confusing.. it doesn't matter where I put my references, this thing doesn't want to work..
(and ideally the solution would work for arbitrary traits and wrappers in arbitrary order..)
(and no, I don't want to use this in production ;))
I know that the key to this, is to somehow use recursive types (which I do here), with a bottom breaking type (which is the unit-tuple here) and to use autoref to "inherit" the wrapped properties.. Yet, I'm unable to make this work properly :(
 
why make life complicated ?
 
@Stargateur I don't want to, this is a "bonus, very tricky, extra" task for a job interview test
but I already spent hours on this and I couldn't make it work, so I'm just going to give up on this
as I'm not progressing on it anymore..
(unless someone here has a good idea on how to make it work.. or what I'm missing..)
 
@PeterVaro What is the concrete problem that you're trying to solve?
 
11:16 AM
@FrenchBoiethios I need to define traits and wrapping structs, the former should provide a way to access a specific data, the latter should store the specific data. the wrappers should be arbitrarily nested and could even come from the outside world, and the functions which are working on them should only define the bounds of the traits
in other words: there could be as many Number, Boolean, Xyz, Foo, Spam, etc. as you like
with their corresponding N, B, X, F, S, etc. structs
and I should be able to have N<B<X<F<S<()>>>> or B<N<X<()>>>, etc
and I should be able to define a function f<T: Number + Xyz>(t: T) { t.number(), t.x() }
and should be able to pass those wrappers to it
 
I'm not good for this kind of problem
 
this is the 4th and last, truly bonus challenge of my "homework", which I find interesting as a problem, even though I hope no one in their right mind is going to use anything like this in the real world..
@Stargateur me neither -- because this kind of thing rarely (if ever) comes up in real life scenarios
 
@PeterVaro I think my brain just don't want to work on boring thing :p
but I don't see why you would need any lifetime for your problem or any specialisation need
 
Yeah, my brain has tried to leave when I read your problem
But you explained it well, though. Hope for you that someone will give you a hint
 
 
3 hours later…
2:28 PM
I can't help but think "am I a joke to you?" considering that I also designed an endianness-aware byte reading and writing API in byteordered.
Don't mind my tone, though. I ought to chill.
 
 
4 hours later…
6:11 PM
it's... BIG... brain Time : forum.unity.com/threads/…
 
6:23 PM
> We currently only support Python 2.7 as many studios have not ported all their tools to more recent libraries. Python 3 support is in the works.
> 4. I'm not particularly attached to the naming of these methods. It's mostly that alternatives that I came up with, such as ByteOrderedRead, seemed really long. If this ever makes it to an RFC, the naming of traits is something might need to be reconsidered. ←
you don't like concurrency ? :p
 
7:01 PM
@Stargateur That is the name of some symbol in another proposed API, not my byteordered crate.
It's also odd that so many people are ignoring the possibility of run-time dependent byte orders. Sure, the inventors of certain protocols should probably know better, but they do exist.
@Stargateur *facepalm*
 
 
2 hours later…
8:53 PM
error[E0271]: type mismatch resolving `for<'r> <for<'_> fn(&AsyncSandboxCache, std::option::Option<std::string::String>) -> impl core::future::future::Future {AsyncSandboxCache::crates} as std::ops::FnOnce<(&'r AsyncSandboxCache, std::option::Option<std::string::String>)>>::Output == _`
/me stares
if you gaze too long into the error message, the error message stares back
 
9:04 PM
that why I don't like complicated code
I think the type mismatch * fly away *
I think that for<'_> fn(&A should be for<'_> fn(&'r A
or something
 
> Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it? -- Brian Kernighan
2
(One of my favourite quotes about practical software engineering)
 
but that a compile error not a bug :p
and I'm very good solving bug
 
I was just responding on the "clever" and "complicated" code part
not the actual problem Shepmaster was talking about
 
KISS
 
@Stargateur until you are not -- when you have to debug a large C or C++ code with long years of legacy baggage and an awful lot of dependency..
that my friend is the deepest bottom of hell
there's a reason why very talented devs talking about days of debugging sessions..
 
9:16 PM
 
I don't, I'm just practical.
 
but yeah bug in dependency are so evil
 

« first day (1927 days earlier)      last day (1544 days later) »