« first day (734 days earlier)      last day (2766 days later) » 

3:54 PM
It feels like a Monday alright
 
 
4 hours later…
7:59 PM
Ill
 
8:58 PM
@LukasKalbertodt I think your comment was more interesting than the question
 
@Shepmaster Thanks =D I really want to ask that question as a new question :P Maybe later
 
@LukasKalbertodt I think the answer there is going to be because mutex and cell are implemented differently
 
@Shepmaster Do you think it's ok to ask my comment as question already? Or is it too likely that both questions get very similar answers?
 
9:22 PM
@LukasKalbertodt I'd probably wait to see what kind of answer that gets
especially cause your comment might prompt people to answer it with respect to Ref::map
My gut says that the answer will be something like "you can't", but hopefully with some more background, perhaps exactly what you want
and to be clear, TIL about Ref::map
 
9:52 PM
@Shepmaster ^_^ very nifty feature :)
But yes, I will wait, you are right
 
Wait, since when does A<S>: Debug require S: Debug. :s
 
10:03 PM
@E_net4 Whats that exactly? Like trait A<S>: Debug?
 
@LukasKalbertodt Actually something like trait A { type S: ?Sized + UnrelatedTrait; }
...No wait!
Never mind.
The trait should indeed not affect this.
So now I'm confused.
 
I am confused now, too, because I don't really know what confuses you :P
 
impl<S: Read + ?Sized> MyTrait for MyStruct<S> { ... } yields E0277 unless I add the constraint S: Debug..
 
My Little Oxide: Traits Are Magic
 
:o
What is bound checking all about?
 
10:14 PM
If you don't know what sth is about, it's about money
 
@E_net4 Does MyTrait requires Debug? Maybe you could post a minimal example? (or maybe I'm too tired and can't think; in that case: ignore me :P)
 
@LukasKalbertodt I'll make a minimal example in an actual SO question, and only if this issue gets out of control. But until then, I'll just rant in chat. :P
As a matter of fact anyway: yes, the trait requires Debug. However, I derived Debug in MyStruct and all fields impl Debug.
Ok, fine. An SO question it is.
Because this seems like an inappropriate behaviour.
 
10:32 PM
jfc why are [T; n] impls (a) manual and (b) up to 32
 
@E_net4 I ran into that issue recently, pretty funny reason
Not sure if it's already on SO. If not: ask, I can answer ^_^
 
@LukasKalbertodt All right, should be done in a few minutes. :)
 
@E_net4 Make sure there isn't that exact question already!
 
@LukasKalbertodt Couldn't find it, srsly...
 
Also, I'm still fighting with the question about MutexGuard::map >_<
 
10:38 PM
@набиячлэвэли O rite, that's because n isn't a generic compile-time number. Rust doesn't support that (yet).
 
@E_net4 So annoying, that is
 
@набиячлэвэли I know. I wonder if there's a proposal for this.
 
16
A: Why does println! work only for arrays with a length less than 33?

Lukas KalbertodtSadly, Rust does not support integers as generic parameters yet. Therefore it's not easy to implement a trait (like Debug) for every array [T; N]. Currently, the standard library uses a macro to easily implement the trait for all length up to 32. To output the array, you can easily convert it to...

@E_net4 Yep, there is this "const type system" RFC .. give me a sec
github.com/rust-lang/rfcs/pull/1657 "const dependent type system". The RFC is about way more than just "integer generics", but also introduces a kind of dependend type system
Which is awesome, dependent typing (to some degree) in Rust, would be <3
 
I figured.
 
dependent typing sounds like FP cancer to me :v
 
10:41 PM
Indeed, once we have that, we can even make neat iterations in compile-time.
 
@E_net4 Literally C++ templates
Calculating factorials at compile-time
 
@набиячлэвэли That or pure D functions. Either way, it's a nice feature.
 
D is bad, too
<insert dick joke here>
 
@набиячлэвэли "Either way, it's a nice feature."
 
@E_net4 Nice job, copypasting that
 
10:43 PM
@набиячлэвэли shucks
 
@набиячлэвэли Nah, more type safety. That's a good thing. If you don't share that opinion, I wonder why you are programming in Rust :P (no offense, but I would indeed be surprised)
 
@LukasKalbertodt I've only ever heard about it when rightfold or Bartek were boasting about how good it is
 
Who are those people? nvm
 
They are self-proclaimed FP fanboys therefore their opinions are based on faulty premises by default
Oh, right, you're not a Lounger, you wouldn't know
rightfold is also a freak that implements about 5 languages a month
 
Making the line thinner, eh?
 
10:48 PM
And the more you talk about the Lounge, the more I think that it's a good thing that I'm not a Lounger ;-)
 
It is indeed
 
In other news, my question is up. I was hoping the question feed would be faster.
There it is. :P
 
@E_net4 Sorry :( I'm an idiot! I should have searched before
So sorry, but I think it is a duplicate to the question I linked below
If you think its different enough, just say so
Sorry, my bad :/
 
"below"
Where is it?
 
@E_net4 Sorry, should be there now
Damn, I didn't think I asked that on SO 0.o
 
10:52 PM
Well...
 
So in short: #[derive(Debug)] for a type Foo that has a template parameter T generates impl<T: Debug> for Foo<T>
 
I understand. So my hunch was nearly there.
The derived impl is doing some crazy carp
But heh, it would've been hard to find your question, since it mentions Clone instead of Debug.
 
Yip... it usually makes sense, but not always
@E_net4 Yep, now we have another sign post :)
@Shepmaster I kinda understand something about the issue now, I think. Still not enough to definitely say whether it's possible with Mutex. Could be... somehow
 
So yeah, I will mark my question as a duplicate.
 

« first day (734 days earlier)      last day (2766 days later) »