« first day (2125 days earlier)      last day (1362 days later) » 

 
2 hours later…
2:59 AM
> (Please dont close as a being a subjective question - I am asking for advice from fellow travelers on the 'discovering rust idioms' track)
1
Q: asking for suggestions on modelling the data structure of my PDP emulator

pm100(Please dont close as a being a subjective question - I am asking for advice from fellow travelers on the 'discovering rust idioms' track) I am porting my PDP11 emulator from c++ to rust. I am trying to get the right data structures. Logically a PDP11 system consists of a CPU, a bus (that owns al...

 
 
7 hours later…
10:03 AM
Experimental generators! github.com/withoutboats/propane
This is also an opportunity to make a generator utility library and call it propane-accessories.
 
And do we need generators? I mean, what is, that you can't achieve with an Iterator today, that you can with a generator? If the answer is "but using the yield keyword is so convenient and short.." then I believe we don't need them and Rust would be better without the ambiguity of when to use one over the other..
 
10:30 AM
@PeterVaro Are we dismissing convenience and doing the same thing with less code?
 
@E_net4staysawayfromMeta I beg your pardon?
 
Writing a state machine in an imperative fashion can make a substantial difference. I have plenty of iterators in DICOM-rs which would have been made much nicer with generators.
And this wouldn't be the first time new constructs were introduced for convenience.
 
10:46 AM
At this very moment I'm working on a parser (for quite some time now) so as you can imagine how many layers of state machines I have -- and I'm not missing the generator syntax, which I got used in Python
Besides, the convenience of this syntax does not outweigh the negative effects of the ambiguity introduced into the language
I prefer that Rust is very minimal yet completely functional and in 95% of the cases very convenient to use (especially considering that it is a system programming language)
What it really needs is GAT not silly syntax shorthands, am I right, or am I right?
@PeterVaro *how many -> the number of; and -> and yet; used -> used to
(Dear SO, please pull your fucking shit together and make the chat useable, in this case, reconsider the editing timeout)
 
 
1 hour later…
11:57 AM
Ah, the GAT card. Wins every argument. :)
 
Quick question: What's the thing you write before extern crate test_crate to make it only available for tests? I can't seem to find it on Google or in the rust book
Is it #[cfg(test)] extern crate test_crate?
 
@simeg Have you tried it? :)
 
I wasn't sure how to assert if it worked or not, but seeing as it didn't compile any other dependency after adding that line I guess it worked :D
 

« first day (2125 days earlier)      last day (1362 days later) »