« first day (1624 days earlier)      last day (1847 days later) » 

12:47 AM
I shouldn't have started to look to rust issue ;) github.com/rust-lang/rust/issues/59154
 
12:59 AM
🎉 SNAFU 0.2 released 🎉 /cc @DenysSéguret
2
@FrenchBoiethios the real question I'd have is what's the difference? The two styles should be isomorphic
@Stargateur WTF?
The OP started by saying they might use chunks. Did they just need someone to agree with them?
 
I didn't understand too
maybe they wasn't able to understand how use it
I answered before read the question I just read the tittle and the code xd
 
2:35 AM
@Stargateur could. I’m not the biggest fan of it though. Feels annoying to have the if and the None
There’s cases where it’s the right choice though.
 
 
6 hours later…
8:46 AM
@Shepmaster The exceptions "jump" over the code, and with a IoC framework huge enough, you have no idea of the error source.
 
 
1 hour later…
9:57 AM
@Shepmaster Here's what a noob (asking for a friend) would like to see in the documentation of snafu:
- what's exactly `context` ? A kind of unwrap decorator ? How exactly is it added ?
- what's the added cost (unwrapping complexity, structure creation before errors) ?
- what are the limits and problems of snafu ?
- how does it compare to other approachs (for example custom_errors) ?
- does the Error enum automatically implement Display ?
- are there facilities to display the stacktrace on error ?
 
"asking for a friend" I see what you did there 😏
 
10:23 AM
The terminal libraries landscape in rust is a mess
Only two seem to try to really cover both unix and windows, and they're very uncomplete
 
@DenysSĂ©guret I like cursive
 
not really compatible windows (you need to install either a terminal or ncurses), right ?
I'm not interested in the high level parts of TUI. I'd be happy with something low level like termion, crossterm or pancurses, but not too buggy and really cross-platform...
I guess I should try and contribute to crossterm :\
!!afk
 
@DenysSĂ©guret hmm, no. On all my business machines I didn't need to install anything. I think it uses pancurses on windows
 
11:06 AM
@DenysSéguret hopefully you’ll help me improve the docs.
@DenysSĂ©guret cause the Backtrace and display questions are answered.
I’m always hesitant to show comparisons. By default I won’t be a neutral party and I don’t want to slander other libraries
@FrenchBoiethios isn’t this true for ? as well though? It jumps over all the code because there is an error.
 
11:53 AM
@hellow are you using recent windows 10? IIRC it has a Unix-compatible terminal now.
 
@Shepmaster yes I do. But afaik you have to use it explictly by using bash. But I'm not an expert ^^
 
12:12 PM
@Shepmaster That's true. I cannot put the finger on the why, but when I use the Rust error system, it feels much easier that the one of the DOTNET ecosystem.
 
12:40 PM
why so much strange thing for a log system
 
article 13 has been accepted :/
 
@FrenchBoiethios I agree with you, but I really can't figure out what the difference is
I wrote the Rust cuba bindings, and I know it's not perfect. I didn't find a better way to get some form of memory safety other than letting the user use the core id that the C cuba library hands over. Do you think the issue is in the bindings or in the way that Cuba handles its multithreading? — Ben Ruijl 34 secs ago
wellllllp
 
12:57 PM
this was unexpected I was reading the source of the lib
found it very small for a cuda binding
 
@Shepmaster x)
 
Eh, that's a beginning
 
1:16 PM
> Windows users: Cuba 3 and up uses fork(2) to parallelize the execution threads.
...
 
... what?
 
haha
that explain why the log is random
Rust handle IPC ?
 
2:18 PM
@Shepmaster always get me when `Err(e) => {
println!("Error: {}", e);
}`
why not eprintln! ?
 
@Stargateur Because I'm still not used to it — it's too new!
;-)
 
 
3 hours later…
4:51 PM
This mutex Q has a surprising # of upvotes for something so low level
 
5:46 PM
> This is a uncommon setup, where that images not are from the END-user but for the company that setup the data for THEIR users.
Is that actually any different than the other way around?
 
6:00 PM
That.. also doesn't seem uncommon? I was under the impression that most images I see in a day were put there by someone who built or owns the app.. not by me.
 
@Zarenor putting it like that reminds me that web browsers tend to display images
 
XD
It just seemed really odd to me that someone would think that the 'common' way an app works is that a user chooses the images that are displayed.
That's not even true of most screens of a photos app. Like, yeah, I took all those photos. But all the control icons? Not mine. And not customizable.
How your source the images/icons/photos? That's a data problem. Doesn't seem like a UI problem to me.
 
6:17 PM
@Zarenor well, in most of those cases the images can be baked-in to the executable
and don't need to come over the net
 
Right. That's true, but my point is that from memory (preloaded in the executable), or from disk, or from net.. as far as a UI is concerned, should be the same (modulo error-handling)
If you have a way to report on it's loading status, you could display that, I guess.
 
Actually, I call example() from main itself. The codebase is huge and it's almost impossible to create a basic version on play.rust-lang.orgAnkit 3 mins ago
hoooo boooy
 
Ohhh man. Like, we can just.. see what the issue is across three compilation units?
 
@Zarenor The thing is, I'm pretty sure I know what it is
but I'm not spending 30-40 minutes to guess what their setup is
 
I have...a guess or two. But it's just as likely that they're wrong guesses. And I won't know that without trying to set up three compilation units as they vaguely describe.

My suspicion is to do with the dynamic library having a different (in-memory, not necessarily in behavior) version of the rlib? Probably something to do with differences in linking processes?
 
6:26 PM
@Zarenor yeah. They even think about linking, but then neglect to actually specify how they are linking.
 
Yeah. Dynamically loading the dylib. That's it. The static is loaded by the bin and the dylib separately, probably. Not sure how reliant libloading is on the OS facilities for this, so the behavior may even change from system to system.
I could be mistaken, but I seem to remember some differences in behavior between *nix and windows w.r.t. static libraries linked by dynamic ones. I know I'm not familiar enough with the minutiae to point at where though.
I'd guess the OP is used to more-managed languages, though, to not expect this behavior (or simple link setups).
 
I always just want to reply with an equal amount of effort as the OP
fn () {
   / this fizes it
   dylib();
}
 
Probably a good policy.
fizes?
real stellar
That's just, peak low-effort answer.
👍💯👍
 
user6564029
'fizes' is fine, a single '/' instead of a comment start is more fun, though.
 
6:52 PM
Waiting to see if anyone sees the thing that really drives me up the wall
 
user6564029
actually this reminds me an old joke about a word with three letters being misspelled in four places. this thing has no name. anything else I'm missing?
 
You were pretty peeved about it being a unnamed fn earlier.
Or in the Q? Just their whole demeanor has me annoyed. Like they have a right to be given the right answer and you're denying them that right.
 
hah, I stole the unnamed function from them, but there's something simpler that makes this Not True Rust
And remember that I fix all the Rust code
@Zarenor I don't really get that exact feeling from them. Just that they are lazy and hoping they can get by on that laziness
 
7:41 PM
1
Q: Distributed build system for Rust

wb9688I'm looking for a distributed build system for Rust that: Is free, gratis and opensource Is cross-platform and cross-compiles (from ARMv6, ARMv7, i386 and amd64 Linux and amd64 Windows for amd64 Linux and preferably also ARMv8 Android) Has low impact on my network Does what cargo build does but...

heh, you also want a pony?
 
user6564029
so this is the great SO in the sky for "recommend a library" questions, eh?
 
The real question here is, what's the difference between free and gratis?
Also, I think I stumbled upon a use case where even GATs cannot solve. :s
You can't have type constructor parameters, right?
(inb4usehaskell)
 
@E_net4 please rejoin us here on Planet Earth
 
7:56 PM
:[
enum Foo<T> {
    One(T),
    Collection(Vec<T>),
    FooCollection(Vec<Foo<T>>),
}
I can't generalize over the collection Vec.
 
@E_net4 is there more?
I don't understand
 
OK, imagine this one now:
enum FooRef<'a, T> {
    One(T),
    Collection(&'a [T]),
    FooCollection(&'a [Foo<T>]),
}
If I had a type constructor parameter, I could have a single Foo for both.
 
> We create a parallel enum that is composed of only references, so it's lightweight to create. It's important that we define the same variants and in the same order as the primary enum so they will hash the same.
12
Q: How to avoid temporary allocations when using a complex key for a HashMap?

Craig M. BrandenburgI'm using a complex key for HashMap such that the key comprises two parts and one part is a String, and I can't figure out how to do lookups via the HashMap::get method without allocating a new String for each lookup. Here's some code: #[derive(Debug, Eq, Hash, PartialEq)] struct Complex { ...

So I guess I could have made use of that
enum FooRef<'a, T> {
    One(T),
Not One(&'a T) ?
 
@Shepmaster Right now, not really. But I think it could be.
 
8:30 PM
wazup my homeys, do maps have iterators in rust
 
user6564029
yup‌​. unless non-std maps?
 
coolio my rust peeps :)
 
 
2 hours later…
11:00 PM
This OP just does not want to put in any effort
 
@Shepmaster who?
I think your answer better, upvoted.
you put more effort in the answer then they did in the question lol
 
-1
Q: Why is a mutable static variable value not updated when it is inside a dylib?

AnkitThere are three Rust modules in this setup: A rlib name crte (cargo new crte --lib) A dylib name ext (cargo new ext --lib) A bin directory with the main program; name main (cargo new main --bin) In the rlib, a mutable static variable is defined and later updated based on some logic. pub stat...

like, the core of the question is reasonable
 
11:23 PM
Well, maybe not — why would you ever want to link to the same thing both statically and dynamically?
I guess it could happen organically; a common dependency has a global...
 
11:46 PM
@Shepmaster it's possible to handle stdin in the palyground ?
something simple not interative
just text that will write on stdin
 

« first day (1624 days earlier)      last day (1847 days later) »