|
Quote: I was born on the 2nd of August, exactly 33 years before my father was born. The first sentence of that link reads oddly to say the least.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
I thought all bloggers were given a time machine? Did you not submit a Form 125/AC/TM/776(a) to the Mekon?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
What!? I'm always the last to know!
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
It's my daughters birthday today, I'm contemplating to get her a baby chair at the restaurant tonight.
|
|
|
|
|
If I had been born on this day I would have been part of the Lewis and Clark expedition.
"Ten men in the country could buy the world and ten million can’t buy enough to eat." Will Rogers
PartsBin an Electronics Part Organizer - Release Version 1.3.1 JaxCoder.com
Latest Article: EventAggregator
|
|
|
|
|
some sort of calculated joke!
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
I got fired from my job at the calendar factory for taking a day off.
I was already wearing my coat.
|
|
|
|
|
I don't mind these at all. Rather enjoy them. Thank you kindly.
|
|
|
|
|
It feels like you were just waiting for an extra day to tell this one...
Hogan
|
|
|
|
|
|
For one more on topic but still funny, DEC received a Software Problem Report (SPR) from someone who thought there was a bug in OpenVMS relating to Feb 29, 2000. Here's the link.
HP OpenVMS systems - Year 2000
|
|
|
|
|
I'm reminded of the significance to OpenVMS of 2:48:05.47am on 31st July 31086 [^]
|
|
|
|
|
good one!
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Good morning CodeProject!
I’ve decided to teach myself something new - apparently it’s important for older people to do that to stop them going mental. So behind the back of my loving, dependable and reliable C# I’ve been having a risqué affair with Rust. Turns out that developing in Rust is about 30% expressing your intention in code and 70% arguing with a bad-tempered bureaucratic compiler for who simply nothing seems good enough.
I decided my first project would be a Suduko solver, which is done and it works, but there was an interesting point in the development where different runs would dish out differing results. I was using a HashSet internally, and like in .NET you shouldn’t make any assumptions about the order of the items if you iterate over it. Fair enough, but I would expect it to be consistent in that ordering between say releases of the .NET framework.
Not so in Rust. Here’s a Rust program:
use std::collections::HashSet;
fn main() {
let mut set = HashSet::new();
for n in 0..5 {
set.insert(n);
}
for n in set {
println!("{}", n);
}
}
And here’s the output from running it twice:
0
3
2
1
4
and
0
2
1
3
4
Interesting huh? Something non-deterministic is going on. I haven’t debugged the HashSet yet to find out, but I’m presuming it’s using some random number or aspect of time somehow. I spoke with 'Gemini' about it yesterday and it agreed it's interesting, so thought I'd share it.
Regards,
Rob Philpott.
|
|
|
|
|
Interesting indeed. My guess is that the Rust folks will say that that behaviour is by design, to stop you relying on assumptions about implementation details.
In other words to encourage (probably can't go as far as 'enforce') robust algorithms.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
You know, I hadn't thought of that. By design, so that weirdness comes out early rather than later. Sounds like something the Rust brigade would do - good thinking!
Regards,
Rob Philpott.
|
|
|
|
|
Rob Philpott wrote: apparently it’s important for older people to do that to stop them going mental
Using Rust to de-rust your mind.
|
|
|
|
|
Rob Philpott wrote: Something non-deterministic is going on. I haven’t debugged the HashSet yet to find out, but I’m presuming it’s using some random number or aspect of time somehow.
According to the docs[^], this is done to prevent HashDoS[^] attacks.
|
|
|
|
|
Aha! I should, perhaps, read the documentation sometimes, what with it being the first sentence and that.
The crazy lengths we are forced to go to stop mitigate people attacking our software...
Regards,
Rob Philpott.
|
|
|
|
|
He looked at my license and said "you're supposed to be wearing glasses."
I said I have contacts.
He said he didn't care who I know.
I'll get my coat.
|
|
|
|
|
I also got pulled over and he asked me if I had any ID.
I said about what?
"Ten men in the country could buy the world and ten million can’t buy enough to eat." Will Rogers
PartsBin an Electronics Part Organizer - Release Version 1.3.1 JaxCoder.com
Latest Article: EventAggregator
|
|
|
|
|
Just heard the news that some guy was stealing wheels off of police cars.
The police are working tirelessly to catch him.
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
They can't prove a thing.
"Ten men in the country could buy the world and ten million can’t buy enough to eat." Will Rogers
PartsBin an Electronics Part Organizer - Release Version 1.3.1 JaxCoder.com
Latest Article: EventAggregator
|
|
|
|
|
And someone stole all the toilets from the stalls at the police station.
They're investigating, but so far they have nothing to go on.
|
|
|
|
|
good one.
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|