« first day (1736 days earlier)      last day (1752 days later) » 

5:30 AM
I already had, and my fail logs used to print "Process terminated by signal", but that doesn't help me understand why it's happening, and if a signal where that signal is coming from and why it's being sent. — Andrew Mackenzie 4 hours ago
stay calm...
 
5:54 AM
@Stargateur It's not certain he knows how to use the extension trait. You should provide the necessary code in your answer
 
 
3 hours later…
8:34 AM
> Is BufReader a class or just an object that was constructed with the new keyword like in javascript?
Does someone understand this question?
 
@FrenchBoiethios kind of. In Javascript you can do weird things with objects
And it's not clear to me when to use new in javascript and when not... it's kind of confusing I think
 
@hellow what weird things ? I know JS very well (unlike Rust) and I don't see what he's asking
 
function Person(first, last, age, eyecolor) {
  this.firstName = first;
  this.lastName = last;
  this.age = age;
  this.eyeColor = eyecolor;
}

var myFather = new Person("John", "Doe", 50, "blue");
var myMother = new Person("Sally", "Rally", 48, "green");
@DenysSéguret ^
 
what's weird here ?
 
how does one come up with calling new on a function ^^
 
8:39 AM
@DenysSéguret Is changing the prototype of a native object a weird thing?
 
@FrenchBoiethios it's frowned upon. It's not really weird when you know how new works and how the prototype chain works (both are very simple)
The beauty of the prototype based OOP is that it's so simple. There's no "class" construct
(skipping about the new ES6 things)
@hellow well, new is just an operator which does a few basic things like creating an object and passing it as this at function call.
 
@DenysSéguret weird to me ;)
 
9:01 AM
@DenysSéguret If that's what you like about JS, you should try io. Much cleaner, simpler, more elegant.
 
Does it have compile time type checks ? Strict generics ? Static memory management ? Pattern matching ?
 
@PeterHall Hey, I didn't know it! Thanks for sharing
 
@DenysSéguret typescript is so much better than javascript
 
@Stargateur Probably. But if I replace JS in my workflow it will be with something which has at least the qualities of Rust
 
@DenysSéguret switch to typescript is quite easy and smooth
 
9:07 AM
Not interested. I'll go directly to Rust/Wasm
BTW io might be interesting, not to use it but I'm curious. Too bad their site kills my eyes...
 
outch they go from grey to white screen
 
The juniors don't know about SQL nowadays 🙄
 
@Stargateur -10 points in one hour? New record for you? ^^
 
"What irritates me is that it groups only consecutive elements" Hu ?
 
9:16 AM
@hellow probably ^^'
 
you got my upvote... just as a hug
 
@DenysSéguret french love x)
-12
 
I'm sure "I don't like question where there is no fucking single link to explain what you are talking about, it's me who must search what the behavior of groupe_by() of Scala !" would have had more success with a more friendly phrasing
 
Nah everybody understand GROUP BY
 
@DenysSéguret yeah he is quite right about the "frustated" part I have see so many bad question that I become upset too fast
@DenysSéguret I think he want partition()
but I'm too little to tell him
 
9:19 AM
You mean this ?
 
you are fast to find troll image :p
 
@DenysSéguret Can you actually read that?
 
ok, seriously, am I missing something here ?
@FrenchBoiethios Me ? Not at all. I can't even play the triangle
 
@Stargateur Lol, now, just read about the comparison in PHP :P
 
9:24 AM
@Stargateur In the rare cases you really want to do conversions, they're mostly useful. If your code contains unwanted conversions... well you're doomed past redemption and you shouldn't say that it's the language's fault
 
@PeterHall "code is a runtime modifiable tree": so many horrible things can be done :3
Actually, IMO, the inheritance system is much better in JS than in "classical" OO languages.
 
@DenysSéguret I do not agree, language must help the programmer to code better and if they don't they must have a good reason. That why I hate no strictly typed language. javascript code have bug that could be avoid with better language, ofc that doesn't include all bugs. That why I like Rust it's try to avoid bug instead of just blaming the programmer. They is no gain for me to all their strange conversion of javascript.
 
I'm not discussing whether a strongly typed language is better or not, just saying that in the context of a loosely typed one, the conversion choices of JavaScript are mostly good
And the normal type errors you get in a well designed JS program are not related to primitive types, mostly to missing values in fields, or badly shaped objects
 
@DenysSéguret There is nothing "better" between strongly and weakly typed languages. As usual, it depends on the usage.
 
Well, your words are comming from experience, and I don't have much with javascript, but I see that a lot of people try to avoid javascript, typescript and dart coming from microsoft and google is a big clue that must be a need for these tools. Wasm is also a great exemple, I agree that code in "the language you like" and compile it to wasm is just so much better than anything :p
 
9:47 AM
@FrenchBoiethios Like I said, it's a nicer Javascript :P
 
@Stargateur I wouldn't refer to dart as something good. That's the same perpetual shit. A clone of C, with null pointers and switch blocks, but for the browser. As if there has been no progress in the meantime.
 
@FrenchBoiethios yes dart is a big failure, even google said typescript was way better, but they still want do a v2
 
Sure, typescript is a nice language. They even have the sum types!
@PeterHall There are already so many "nicer JS". I stick with Elm, for now.
 
@FrenchBoiethios Yes, I'm just trolling
Elm is nice. Purescript is nicer - if only they would drop bower
 
Ah, I cannot see the sarcasm in the text, sometimes.
 
9:53 AM
why are you guys arguing about a javascript replacement, when there's rust? I'm disappointed
 
I'm not arguing. I already stated that I'll use rust/wasm to replace JS
 
@Stargateur I don't have the impression that they remove the Nulls from the V2, or that they add the sum types.
 
10:49 AM
@DenysSéguret there's a dup for NLL :) not sure if that question is really a dup of that, but you could at least link it ;)
 
I already voted to close (as soon as I've seen your comment)
 
kk
 
funny that
fn main() {
    let mut s = String::from("hello");
    let r1 = &mut s;
    let r2 = &mut s;
    println!("{}, {}", *r2, *r1);
}
in this case, technically there are no two borrows at the same time
but I guess "breaking" and "resuming" the borrow is too complex or downright impossible
 
> marked as duplicate by hellow, Denys Séguret, Community♦
I'd like to know how "Community♦" works...
 
@DenysSéguret OP has marked it as dup
if somebody closes it as dup, OP will be shown a message where it says, that somebody thinks that [this](...) is a dup of your question, do you think so as well?
if he clicks yes, it will be Community:diamond:
 
10:56 AM
oh cool
never got that when asking questions
 
@BartekBanachewicz there are, why do you think there aren't two mut borrows? clearly r1 and r2 are two mut borrows to s
 
Technically println doesn't ask for mutable borrows... could the mut be automatically removed when checking ?
 
waffles
 
@hellow I mean: could the borrow checker determine there's no problem as it's not really a mutable borrow ?
 
dbg! takes values by value ^^
 
10:59 AM
Is "take by value" part of the Rust spec/semantic ?
 
@DenysSéguret but how should it do so? println! is a macro, expanding to something like this:
std::io::_print(format_args_nl!($($arg)*));
 
Oh yes, I forgot it's a macro. It might be a little more complex then
 
and then it goes on and on and at some point it's a function call with two mutable references to the same value
boom, problem
the borrow checker doesn't check the actual behavoir of a function if it modifies a value or not, just the signature
 
yes of course, but my question was for when the function doesn't ask for a mutable borrow
(I'm not sure it's an interesting question in practice... I'm not used to have mutable references when not needed)
I wonder if my answer is exact in this specific case. Is it really due to NLL or were references already bound to the enclosing statement ?
@hellow @PeterHall Can you please confirm there's absolutely no NLL here and that we choose the wrong dupe target ?
 
11:21 AM
@DenysSéguret NLL
op@VBOX /t/t/foo> rg edition Cargo.toml
5:edition = "2015"
op@VBOX /t/t/foo> rustc --version
rustc 1.32.0 (9fda7c223 2019-01-16)
op@VBOX /t/t/foo> cargo rustc -- -A unused_variables
   Compiling foo v0.1.0 (/tmp/tmp.uMbrdkV8Fi/foo)
error[E0499]: cannot borrow `s` as mutable more than once at a time
 --> src/main.rs:4:19
  |
3 |     let r1 = &mut s;
  |                   - first mutable borrow occurs here
4 |     let r2 = &mut s;
  |                   ^ second mutable borrow occurs here
5 | }
  | - first borrow ends here
 
@DenysSéguret The example in question fails to compile in pre-nll builds
 
@PeterHall Are you sure ?
 
op@VBOX /t/t/foo> rg edition Cargo.toml
5:edition = "2018"
op@VBOX /t/t/foo> rustc --version
rustc 1.32.0 (9fda7c223 2019-01-16)
op@VBOX /t/t/foo> cargo rustc -- -A unused_variables
   Compiling foo v0.1.0 (/tmp/tmp.uMbrdkV8Fi/foo)
    Finished dev [unoptimized + debuginfo] target(s) in 0.68s
@DenysSéguret see my two blocks
 
11:23 AM
@hellow I mean with fun1(&mut name)
 
@PeterHall --target=armv5te-unknown-linux-gnueabi? ^^
 
I know it's NLL when you explicitely declare the references as let r1 = &mut name. The question is when you have an anonymous reference
 
@hellow weird. Doesn't change anything though, does it?
 
@PeterHall no, but I was wondering why you had the target in there ^^
 
@hellow Because it remembers from previous usage. I didn't clear it
 
11:26 AM
but this work with 2015: play.rust-lang.org/…
 
but it is planned to enable NLL in 2015 as well but 1.36.0 enabled NLL for 2015 as well
x) upsi
@DenysSéguret use rust.godbolt.org if you want a specific compiler
 
I don't find the "Run" button...
 
@DenysSéguret there's no run, just compiling
 
ok, so it's not NLL
as fun1(&mut name); fun2(&mut name) works with 1.28
 
error[E0499]: cannot borrow `name` as mutable more than once at a time
 --> <source>:6:19
  |
4 |     let r1 = &mut name;
  |                   ---- first mutable borrow occurs here
5 |     fun1(r1);
6 |     let r2 = &mut name;
  |                   ^^^^ second mutable borrow occurs here
7 |     fun2(r2);
8 | }
  | - first borrow ends here
 
11:30 AM
We're ok I refer to OP's code
 
@DenysSéguret it is! ^
 
This is OP code:
fn main() {
    let mut name: String = String::from("Devashish");

    // assume that fun1 was called from a new thread
    fun1(&mut name);

    // fun1 and fun2 are being executed in parallel at this point
    fun2(&mut name);
}

fn fun1(re: &mut String) {
    println!("From fun1: {}", re);
}

fn fun2(re: &mut String) {
    println!("From fun2: {}", re);
}
 
that works
 
11:44 AM
@DenysSéguret NLL is implemented for edition 2015 since Rust 1.36
 
@PeterHall thanks (hellow found it first)
BTW what's the reason for this change to the 2015 edition ? Are there new applications developed for the 2015 edition ? Why ?
 
@DenysSéguret It's a backwards-compatible change. It was always planned to add it there
Also, there were some bugs in the old borrow checker, which actually accepted invalid programs. So the new checker fixes those
 
12:15 PM
I really feel like stackoverflow.com/q/57048384/3650362 is a dupe of something but I couldn't find it.
 
Where is shep btw ? Doesn't he live in the country without holidays ?
 
@DenysSéguret probably on a beach
 
 
1 hour later…
1:24 PM
The date for RustFest has finally been announced! 9th to 12th November. twitter.com/RustFest/status/1151025173207797767?s=20
 
@E_net4isoutofcommentflags My wife wants to go. Maybe I'll be there :P
Is that children-friendly?
(I mean are they allowed?)
 
@FrenchBoiethios That's a good question for the organizers.
 
I've no Twitter account :(
 
@E_net4isoutofcommentflags I send you my energy from my "don't want to move so far away !"
@FrenchBoiethios open an issue ! github.com/RustFestEU/barcelona.rustfest.eu/issues XD
 
I wasn't that motivated, but my wife wants to go to Barcelona
@Stargateur In fact, there's already the information: barcelona.rustfest.eu/parents
 
1:34 PM
@FrenchBoiethios Nice
 
@Stargateur U sirius.
 
I'd come if it weren't more than one hour by foot
 
Not trying to be Capt Obvious, but you are often expected to take a plane to an international conference.
 
well I still don't have a job :p
everybody is on vacancy
 
1:45 PM
You might be able to grab a low-cost flight if you book it early.
 
well plane are not good I prefer train they are so much eco friendly
 
Well, France has TGV lines alright. Too often however, any other means of transportation other than by plane would be unreasonable.
 
@E_net4isoutofcommentflags seat61.com/CO2flights.htm, no
not even close
 
2:00 PM
@Stargateur Still unreasonable. I'm not taking a 12 hour trip when it can be done in 2 hours.
 
@E_net4isoutofcommentflags I do because I think it's should be ilegal to take a plane when its can be avoided
illegal == forbidden
 
@Stargateur from that reasoning, you should ban all flights that are not between either of Europe/Asia, Australia, the Americas, or other islands.
 
@Stargateur now do that again from hamburg to barcelona please
 
It is unreasonable to expect everyone to take the train across countries.
 
@E_net4isoutofcommentflags that the idea yes
 
2:03 PM
I'm with you when it's about innner country flights, although I can understand why you don't want to spent 6 hours in a train to get from hamburg to munich when it can be done in 2 hours
 
@E_net4isoutofcommentflags it is unreasonable to think we can continue to destroy the environment
 
@hellow Train is less stressful and there is more room to get your laptop out, less distractions and disturbances
 
@PeterHall Personally I find it more stressful to have to switch trains multiple times to reach a destination, than take one flight and find myself almost near it.
 
@hellow to you ask about to Co2 cost comparaison ?
 
@Stargateur that webpage is mostly about flights in the UK, that doesn't sound like a fair comparision
that's from hamburg to barcelona
Sorry, but I won't spent 20 hours in a train (with at least 4 times changing it) when I can get into a plane and can be 4 hours later in spain
yes I know, that's somewhat selfish, but I don't own a car, so I get that going for me ;)
 
2:09 PM
well, that my politic view I don't expect you share it :p
@hellow the last table is very unclear
 
I have to side with hellow here, we can't expect attendants to put up with excessively long and overly complicated trips to conferences. I've seen some researchers choosing to attend less conferences instead.
 
also look like their calcul are only based on german stats
 
@E_net4isoutofcommentflags Oh. I was assuming one train. Changing is a dealbreaker
 
@PeterHall Yeah, there will almost always be multiple transportation lines until we reach the final destination. But when we speak of international conferences, we're avoiding a lot of complexity with a flight.
 
also, there are problem that can be solve by puting more money into train networking
 
2:19 PM
Here's another concrete example of mine. I went to Avignon last September. A trip by train would have taken me 19 hours.
 
at some point to save our environment we must do sacrifice
 
I vaguely try to motivate other devs in Lyon to run a meetup... and I'd probably take the train for a "fest" in Paris
 
I did one travel to paris to meet some core dev team at mozilla
their building are full of luxury. This was a old building from king time
don't need to worry about the height of the ceiling
but their didn't buy enough pizza - -
 
2:47 PM
Organizers' major mistake: always order more pizza than you think you'll need. ;)
 
@E_net4isoutofcommentflags well, they didn't expect so much people to come but there was Alex Crichton (If I remember...) and Niko Matsakis who was coming :p. They live in US so this was an event for french rust lover ^^
 
3:40 PM
@Stargateur Never said I flew on business class. X)
 
@LukeSkywalker I can't as the question is closed — Denys Séguret 16 secs ago
I'm not sure we answered the real question ^^
(well, I'll answer as comment)
my "answer" would have been better with const generics
 
I think I found a funny type inference bug.
Actually, even simpler: play.rust-lang.org/…
 
3:59 PM
@PeterHall and you don't even close the dup I spend 20 minutes to find stackoverflow.com/questions/57060393/… !
@PeterHall I think the compiler is on a infinite recursion
 
What's exactly a unit struct ? Is it some kind of unique symbol ?
 
it's exactly like a empty enum just a sort of flag
zero sized type
 
Ok, so... spot the difference:

1. https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=97ae162879efe2bdf1545daf598a91c3
2. https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=550492f0997cdf79ed62bb53203127bc
Breaks with u8: From<T>. Works with T: Into<u8>
 
 
1 hour later…
5:14 PM
@E_net4isoutofcommentflags all of those are valid points -- do you mind if I edit my answer based on those?
(or do you want to post your own?)
 
@PeterVaro Yes, please do fix your answer. :)
Hope you got my concerns: in 2, I emphasize that transmute should be avoided (I also believe there's a Clippy lint for this); and regarding 3, my playground example was modified to enclose i in a shorter lifetime, yet the program compiles and runs. Showing the intended output is only a coincidence.
Changing the i32 to a non-Copy type might show something weird at run time.
 
all of them make sense, and if I didn't answer this question while I was working, I probably would've paid more attention to these..
although, I think the third point is irrelevant, because whomever is going to use something like this should know that if the thing you are pointing to does not live long enough then you just have a dangling pointer/reference
 
I know that do this in C is totally UB
for me the true question is why on earth you want do that
 
@Stargateur exactly
 
5:33 PM
@Stargateur > This answer provides a way to achieve what the OP asked for which doesn't mean this should be used for anything else than academic/experimental purposes :)
I felt obliged to add this comment to my answer..
 
 
2 hours later…
7:09 PM
-1
Q: Remove all whitespaces from string

MagixRemoving whitespaces in a string is a simple task, and many solutions are possible, like using loops or regular expressions, but in Rust they are not as straight-forward as one could think. What are the simple ways to remove all whitespaces from a string in Rust ?

pffffffffffffffffffffffffffffffff
pffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
 
@Stargateur I would avoid Rust and use C++ instead for this difficult task.
 
@trentcl why do you insist on linking to a question answered with NLL when OP's code was valid long before NLL ? The only reason I voted to close as NLL was because I've initially read the code too fast
 
@DenysSéguret which question?
 
1
Q: We can have multiple mutable references of the same data in the same scope, can't we?

Devashish JaiswalFrom Rust documentations: mutable references have one big restriction: you can have only one mutable reference to a particular piece of data in a particular scope. The example in the docs does support this statement: let mut s = String::from("hello"); let r1 = &mut s; let r2 = &mut s; prin...

I'm not asking you to vote to reopen, it's not important. It's just about the comments
 
7:31 PM
I'm unsure
the question itself is unclear
 
As I understand it (and I thought it was clear), OP wants to know why fun1(&mut name); fun2(&mut name); is valid. From there it might be unclear why OP thinks it should not. The first example he refers to makes me think he thinks the two references live a the same time. The second problem is related to the fact you can't pass the reference to another thread (and I didn't much handle this part)
It's not a terribly good question, this I agree, that's why I don't insiste on having it reopened
 
Is it sound to cast a *mut T to a *const T?
I'd like to share a pointer from a boxed data.
 
@FrenchBoiethios No
Well... it depends
 
More precisely, I'd like to transform a Box<T> to a &T to allow a self-referential struct
Is it ok if I do that carefully?
i.e. by dropping the fields in the correct order
 
use pin for that
disclaimer I still didn't dig into it
 
7:40 PM
Anyone here knows actix-web ?
 
I didn't try, but I think that I cannot pin it since I'd like to do that in a constructor.
 
fn new() -> SelfReferentialStruct
 
@FrenchBoiethios The thing you have to be careful of that *mut T can be aliased
 
It cannot be pinned, AFAIK
 
7:41 PM
@DenysSéguret you read the blog post too ? I just started it. I agree that the author is quite... strange
 
@Stargateur no, just looking at the last question
 
@PeterHall What do you mean? What is the issue?
 
what blog post ?
 
@DenysSéguret ayh... 64.github.io/actix
 
@FrenchBoiethios So you must take care that you know where all of the possible aliases are and that you do not mutate T while the *const T is in use
Ok, so I will take back my original comment. There is nothing specifically unsound about the cast
 
7:43 PM
@PeterHall I don't want to do anything with T at all. It is only in a field because I must take its ownership.
If I get an infamous segfault, I'll drop a warning here :P
 
@FrenchBoiethios The segfault will not be from the cast
 
I know. That would be too simple
 
@FrenchBoiethios that exactly the use case of pin
 
I can use an Rc, maybe it would be better semantically: unsafe { &*Rc::into_raw(Rc::clone(context)) }
 
@Stargateur I agree with you this is a little fishy. Those problems seem minor and would be better discussed in a forum than just the reason to leave actix
 
7:45 PM
@Stargateur Ok, I'll try that, then.
 
(this article seems useful, though, and I wasn't aware the benchmark was so bad)
 
@FrenchBoiethios Box::leak()
 
@PeterHall Hum, I cannot recover the memory in this case, IIRC. The size of T is very small, but I don't want to leak the memory in a lib. It is a matter of principle
@Stargateur In fact, my usecase is more complex: I'm returning a future. A pined future is not useful, I think
 
@FrenchBoiethios I think pin have been invented for futures, but I think futures use then internally
 
@FrenchBoiethios Arena?
 
7:48 PM
not very sure of myself here
 
@Stargateur a -> Pin<Future<Output = SomeStruct>> doesn't make much sense, IMO
 
well, yes, but if you need a self referentiel struct you probably need pin
@FrenchBoiethios doc.rust-lang.org/std/pin/struct.Pin.html#impl-Future pin itself implement future
I bet there is a link :p
 
@Stargateur Or some carefully crafted unsafe code. Pin makes the struct immovable, and I don't want to make an object immovable in my lib. That is too much a burden for the user
 
@FrenchBoiethios well object that need self reference need to not move...
 
@Stargateur If the reference points to the stack, yes. The point is that I'll put the referenced data in the heap.
 
7:55 PM
@DenysSéguret the bench of artix ? it's beat every other lib ^^'
 
Yes, I mean I wasn't aware there was so much open cheating in the bench
But looking deeper, it does look like some of the problems of actix are deep enough to justify legit worry
 
8:28 PM
I think this is a good question. This isn't a duplicate (closest is stackoverflow.com/q/37792471/1896169 , which you could argue this is a duplicate of, but it's clearly hard to find this one if you search for terms in this question), and at the least, it is a clear, concrete problem. Also, this is definitely not "too broad." It's a very clear defined problem, and a single problem. — Justin 32 mins ago
a challenger
 
8:42 PM
All right speak up. Who insta-upvoted my Meta answer? :P
 
8:55 PM
not me
and I didn't find duplicate
 
9:24 PM
@DenysSéguret I say the question is fundamentally "Why does this work?" With lexical lifetimes, the answer was because the scope of a temporary is only a single line, and therefore the lifetimes do not overlap. Since NLLs, lifetime overlap is defined by the call graph and not by lexical scope, so the answer is just that the borrows don't overlap because they aren't alive at the same time.
Saying that it works because the scope of a temporary is a line suggests that lifetimes are still defined with regard to lexical scopes, which they aren't
 
9:35 PM
Waffles.
 
posted on July 12, 2019 by Chris McKenzie

I consider myself an advanced beginner in Rust. There is still much I’m wrapping my head around–and I still get caught off guard by the “move” and “mutability” rules Rust enforces. However, in keeping with my personal emphasis, I’ve devoted my efforts to learning how to create automated tests in Rust. The below guidelines are not exhaustive, but represent my learning so far. Feedback is welcome!

posted on July 12, 2019 by Leonora Tindall

I’ve seen a lot of misconceptions around what the unsafe keyword means for the utility and validity of Rust and its marketing as a “safe systems language”. The truth is a lot more complicated than a single pithy tweet can possibly sum up, unfortunately; here it is as I see it. Basically, the unsafe keyword does not turn off the advanced type system that keeps Rust code honest. It only allows a

posted on July 12, 2019 by Lup Yuen Lee 李立源

I gotta admit — Embedded Programs are getting darned hard to code on modern microcontrollers, sensors and networks. Faced with the ultra-daunting task of coding a readable, reusable, open-source NB-IoT application for STM32, I asked myself… Could Visual Programming with Embedded Rust solve this problem? Like this…

posted on July 14, 2019 by Ralf Jung

This post is about uninitialized memory, but also about the semantics of highly optimized “low-level” languages in general. I will try to convince you that reasoning by “what the hardware does” is inherently flawed when talking about languages such as Rust, C or C++. These are not low-level languages. I have made this point before in the context of pointers; this time it is going to be about un

 
10:09 PM
funny how your meta post is connected to the string question XD @E_net4isoutofcommentflags
 
10:30 PM
@Feeds finally a superb, deep, straight to the point article! I learnt a lot from it, and it turned out I was one of those guys mentioned in the third paragraph who thought about uninitialised memory in a certain (and certainly wrong) way.
 
10:45 PM
on the contrary the third paragraphe is wrong about C rule
and wrong to use "C/C++"
and more wrong to say "I hope the C/C++ committees will eventually follow suit."
"My interpretation of the rules in C/C++, and my proposal for the rules in Rust, is that any operation working on the “value” of an integer (arithmetic and logical operations, comparisons, conditional jumps) is undefined behavior if any input is uninitialized." this is false for C
it's depend if the value have trap behavior
copy type should be ok unless used for wrong value like bool
and as integer don't have anything special in Rust they should be ok
C have a rule that you must at least take the address of such integer
 
@Stargateur I think the author is using it correctly. At the beginning the article distinguishing between the two properly and only later on it groups together as a group that is different from Rust
@Stargateur why?
 
@PeterVaro they are not the same committee
 
@Stargateur which part?
@Stargateur that's why it is plural
 
ahhhhhhh
 
sorry to say this, but in this article the author really knows their shit :)
 
10:58 PM
C have become to be much much more different from C++ specially since C++11, there don't have the same rule from the very beginning C89 and C++98. Rule about Uninitialized in C and C++ differs so group them is a mistake
@PeterVaro yeah ralfj is very good, but not in C :p
well not he is very good in C
but commit some classic mistake to mix C and C++
that a lot of very good dev also do
for example, "Maybe the most important lesson to take away from this post is that “what the hardware does” is most of the time irrelevant when discussing what a Rust/C/C++ program does" I agree a lot
 
I disagree with you -- this article's point wasn't to make the distinguishing between all the differences of all the lower level languages. The point was, to build a proper mental model for Rust devs
and in that regard grouping the others together is not a mistake -- at lest not for me
 
but we could add "Maybe the most important lesson to take away from this post is that “what C++ does is not what C does is not what Rust does” is most of the time irrelevant when discussing what a Rust/C/C++ program does"
 
but what you are suggesting would ruin the entire article
you would have to make this excuse after almost every sentence
 
???
 
it is from the article's perspective is an irrelevant detail
maybe I'm focusing too much on the big picture -- what the article is actually all about
and what it tries to achieve
for me, it was clear from the beginning that the author knows perfectly what's the difference between the two languages
 
11:03 PM
well if you look the issue discusion on github their are talking about these details and on this kind of thing details are all it's matter. Copy type don't really have a reason to be UB just by being create. Even have a bool Uninitialized should not be enough, use it maybe but say Uninitialized bool is insta UB is a bit hard. Even C don't do that.
@PeterVaro maybe but the reader is not
 
@Stargateur I like his motivation and I couldn't care less what C does -- I was obsessed and trapped (pun intended) with C long enough..
I like the idea of having a strict (sometimes overly strict) abstract machine first
and lets aim towards that
instead of worrying about the hardware too much and allow it to leak into our abstraction
IMO that's the main message of the article
 
well, we have maybeunit now but I would not have agree not so long ago
 
11:18 PM
RalfJung have the same concern than me
the decision is not so easy
 

« first day (1736 days earlier)      last day (1752 days later) »