« first day (741 days earlier)      last day (2738 days later) » 

12:43 AM
Is there a cargo subcommand or cargo install argument to update all installed execs?
Something less crude than just
cargo install --list |  awk '/:/ {system("cargo install -f " $1)}'
 
1:05 AM
OH I KNOW, I'LL MAKE IT :O
Rust: BE THE CHANGE YOU WANT TO BE IN THE WORLD
 
stage 1: exhuberance
 
@LucDanton I rightfolded a bit there
But that's the secret
That and being angry /obscure-rap-reference
 
 
12 hours later…
12:56 PM
@E_net4 @набиячлэвэли if you were using the real playground, Clippy would have told you about map_or
oh WTF. why doesn't it in this case
why is it default allow
That's silly
 
ker
1:09 PM
@Shepmaster: there were complaints about the lint
 
@ker Yeah, I found the commit after a bit, which didn't link to the issue
so I was all mad
I can't imagine dealing with that aspect of humanity
thousands of yes/no decisions
and every. single. person. has a different preferred setting
 
ker
:) there's clippy.toml
 
yeah, but you still have to have a default
and people are going to complain about the default
@ker there's no way to refer to / package up the clippy.toml for reuse across machines, is there?
 
ker
hmm... that's not a bad idea
 
for example, ESLint has the Google and Airbnb and ... presets
that you can inherit from
 
ker
1:14 PM
oh, presets are easy, but we don't have any that users can configure
we do have clippy and clippy_pedantic
 
well, Google and Airbnb publish those separately from eslint proper
you shouldn't need to merge something from me so I can change my preset ;-)
 
ker
maybe we should be doing the same thing cargo does... go up the dir chain until we find a clippy.toml
 
1:45 PM
@ker Would still put the onus on me to check that out
I'd love to be able to add clippy-shepmaster-preset = "0.55.3" to my Cargo.toml in dev-dependencies
 
ker
@Shepmaster: I added a few issues to clippy to discuss the various things like adding inheritance to clippy.toml
@Shepmaster: we can't be modding the Cargo.toml, there's no custom data field
oh wait
now I grok what you want
but I don't think cargo will allow it
I mean... we depend on that preset crate, but where do we get the settings from?
 
@ker I don't know yet :-)
I'm just telling you the magic I want :-)
 
ker
I know ^^
and I'm thinking that it could work... cargo clippy uses cargo metadata, so we can iterate through the direct dependencies
 
2:22 PM
@ker nothing I like better than making someone else have fun thinking about a problem I'd like to see solved
 
 
1 hour later…
3:47 PM
@набиячлэвэли Watching my projects, are we? :P
 
@набиячлэвэли does that
 
5:00 PM
@E_net4 Indeed, you are
 
@E_net4 HKTs. I wondered about that for a long time, too. But Rust had more container-related traits before 1.0. But because those traits were not really good without the use of HKTs they were removed. is_empty() could be a trait method, too, for example. But yeah, somehow HKTs bla blub
 
@LukasKalbertodt Downvoting is a good tack. Your comment is also a good idea, although I've been bit by revenge downvoting so I'm skittish to always comment.
 
@Shepmaster Mh ok... thanks for that advise.
 
@LukasKalbertodt FWIW, my guess is that they've moved the customer into a different vector
so the error is gonna be "use of moved value"
 
I actually thought that it's because new_Customer is not mutably bound...
 
5:15 PM
We should make a betting pool
 
Right below the question. Then OP see's that we indeed don't have a clue :P
 
 
2 hours later…
7:03 PM
So what code snippets could better exhibit Rust's elegance?
 
7:15 PM
@E_net4 compared to what? I'd say it's highly audience specific
 
@Shepmaster Indeed, that could be a problem. This one's aimed towards computer science/engineering students, who might know Java, C++, Python, JavaScript, etc.
 
@E_net4 <insert any chunk of Rust code here>
 
I'm in love with iterators, personally
Also I've done some verbose / readable code for Arduino that compiled down to like one or two assembly instructions
2
that made me happy
 
@набиячлэвэли let bullshit: u32 = lines.next().unwrap().trim().parse().unwrap();
@Shepmaster And to think so many people out there don't believe in zero cost abstractions... sigh
 
"zero cost abstractions" are a C++ thing, m8
Y'ain't impressing anyone
 
7:27 PM
@набиячлэвэли again, depends on the audience
 
@набиячлэвэли And yet many people out there think it's a utopia.
 
your python / JS crowd might appreciate ZCA
 
Sure C++ did it first, but lots of technologies don't have that.
 
and the C++ crowd might appreciate not shooting yourself in the foot
 
Which makes people care about the difference between using iterators and a classic for loop.
Indeed!
That's about the whole point of Rust. There's something to like for everyone.
Btw, can't that real playground fetch macro crates?
 
7:34 PM
Allowing arbitrary crates would be a security hole
Because of build.rs
Also it would make caching and quick response a lot harder.
Right now, I build all the dependent crates in a container
and so when you click run, all that is compiled is your code.
And the official playground still has 1.12 .0
how strange
 
@Shepmaster Care to elaborate? Are you compiling outside the container?
@E_net4 What the others said. And: take a look here
 
@LukasKalbertodt Thinking about it some, I might be able to download the crates, then disconnect from the network, then compile them.
But then I have to actually start two containers / one container twice
which means there will be state
 
@E_net4 What are you asking for? Just today I held the first lecture of my Rust course and it contained a "Why Rust?" section. It's really hard to address everyone in a room with similar things. I might talk about how Rust guarantees that there are no use after free and the Java, Python, Ruby folks say "use after what?", while the C folk is astonished. Similar thing with "modern Rust features". Ruby users are used to pretty much every cool Rust feature already.
@Shepmaster I think I don't quite understand. What security stuff are you expecting? And why is a build.rs of an arbitrary crate more dangerous than a nightly compiler plugin?
 
$cat build.rs
how to i add newlines lol
as
 
@LukasKalbertodt I'll be giving a 20-minute talk about Rust to college students across the country. It's not like they hold enormous anticipation, but you never know.
And to address the Java/Python/Ruby folk, you'll have to mention "no garbage collector". :P
 
7:44 PM
$ cat build.rs

fn main() {
    loop {
        ::std::mem::forget(::std::net::TcpSocket::new("dns.dyn.com"));
    }
}
 
@E_net4 Which might not even work. They love their GCs :P just tell them that GCs only fix one kind of leak, but totally ignore the others (and make it harder to deal with them)
 
ITYM "no garbage collection pauses"
also other resources
 
@LukasKalbertodt Indeed, resources involve a lot more than just memory.
 
@E_net4 I enjoyed this talk about that topic. With German accent <3
 
@LukasKalbertodt I'll be sure to watch that. x)
 
7:46 PM
@E_net4 90% of modern languages will disagree with you
 
@E_net4 @LukasKalbertodt from our rustbridge this last weekend rustbridge.integer32.com
 
@Shepmaster But can't you do that in a compiler plugin, too?
 
And will actively fight against you if you think so
 
@набиячлэвэли Will they disagree, or simply ignore the fact? :P
 
@E_net4 See: Java/C#
 
7:47 PM
@набиячлэвэли I've had quite the share of Java myself, mind you.
 
@Shepmaster Uhm... what buttons do I have to press? :P
 
@LukasKalbertodt well, there's still the point about arbitrary crates. The playground only allows a fixed set. I trust / assume that list doesn't act malicious at build time.
And right now, build time allows network access
Maybe I should say "dependency build time"
the code you submit is built then, without access to the network
 
Ah I see, that makes sense
 
@LukasKalbertodt that's just an index page. click a link and then use the arrows
c and p bring up notes and split the screen for multi monitor
i forget which is which
Hello @PraveenAngyan !
 
@E_net4 I'm not entirely sure, but I think in 20 minutes you can't convince fans of every kind of language that Rust is cool. Just show some fun, short code snippets that do cool stuff. rayon is a nice library for that. Multithreading, for example, is usually considered hard but everyone knows there are multiple CPU cores
@Shepmaster but was your link referencing a previous discussion? :P
Oh and @набиячлэвэли , I promised to send you the slides in which I "quote" you ;-) click (German, as warned!)
 
7:53 PM
@LukasKalbertodt Just another recent thing introducing programmers to Rust. Might have things to steal from
 
@LukasKalbertodt And some of them are actually multiple cores themselves!
 
@Shepmaster Ah, ok, I will take a look.
 
> "non-shit" Infrastruktur (crates.io)
gneiss
 
@набиячлэвэли the lecture is also recorded, maybe I can even show you a video of me saying it, if you need more proof :P
 
I don't into Deutsch so meh
 
7:55 PM
@Shepmaster is there a recording of the talk "Intro to Rust" as well?
@набиячлэвэли Thought about translating my lecture and creating a video series in English...
 
@LukasKalbertodt No recording. We had ~15 programmers working through all the slides and doing their first Rust program. Took from 9AM - 2PM (and a lunch in there)
then we made the web scraper
 
@Shepmaster Mhhhh. I had to give a crash course on Rust twice already and am really happy that I have a lot more time now *_* "your" slides seem to be a crash course as well...
 
Well, my presentation's subtitle "At a glance" seems to be well justified then. :P
 
@LukasKalbertodt BridgeTroll is an organization for giving these things repeatably. You might have heard of RailsBridge or ClojureBridge
The slides I linked are going to have the feedback incorportated and theres a repo where they will live
 
@Shepmaster Yeah I heard that before... sounds like those organizations have a nice goal, I guess...
 
 
1 hour later…
9:23 PM
ISTR there being a manual to doing cargo SUBCOMMAND extensions, 's anyone have a link?
 
9:40 PM
@Shepmaster Yes, very nice, cheers
 

« first day (741 days earlier)      last day (2738 days later) »