Email or username:

Password:

Forgot your password?
5 posts total
Sam Schlinkert

wild story about how today's college students don't have a mental model for computer directory systems or the concept of files

theverge.com/22684730/students

Sam Schlinkert

surprised to find that one of the things I miss most from Rust that's apparently not in Python is ability to assign a new variable directly with a proper (multiline-if-necessary) if/else statement. It nicely ensures that the variable will have a value after it's done, right?

In Rust:
let bar = if foo { "something" } else { "something else" };

Craig Maloney ☕

@schlink Yeah, unfortunately I've done the following in python way too often:

bar = 'something else'
if foo:
bar = 'something'

Sam Schlinkert

> BookWyrm is a social network for reading, reviewing, and talking about books. BookWyrm is ad-free, anti-corporate, open-source, and federated.

bookwyrm.social/

h/t @darius @darius

Vex ♠☮♊⚣🌙

@schlink @darius @darius Looks interesting, even if it's not open at the moment. I'd certainly like to get away from GoodReads, that's for sure.

Sam Schlinkert

I'm getting a rather embarrassing Ruby error when I run this and can't figure out why...

solve.rb:1:in `what_colors_can_contain_this_color': wrong number of arguments (given 1, expected 2) (ArgumentError)

github.com/sts10/advent-of-cod

Eugen Rochko

@schlink You call the method recursively without specifying the 2nd argument (a_big_hash). I haven't read too much into it but you'll either want to pass on the hash from the outside or make the argument optional by defaulting it to an empty hash (def foo(optional_hash = {}))

Go Up