|
suffix posted:https://aphyr.com/posts/322-call-me-maybe-mongodb-stale-reads was gonna post this myself. another loving homerun from aphyr, i wish i was 10% as smart as him also lmao at the comments on the ticket he filed with them https://jira.mongodb.org/browse/SERVER-17975 "working as expected, wontfix"
|
# ? Apr 22, 2015 05:41 |
|
|
# ? Jun 1, 2024 09:23 |
|
read jira project name as SEVER there
|
# ? Apr 22, 2015 06:44 |
|
http://railsbird.tumblr.com/post/117076597115/existential-crisis-at-railsconf lol rails dev(s) slowly realizing now that rails has been dying for a while
|
# ? Apr 22, 2015 14:01 |
|
Plastic Snake posted:was gonna post this myself. another loving homerun from aphyr, i wish i was 10% as smart as him it's not that aphyr is smart. i mean, he is, but i don't think that's the key to the "call me maybe" work it's that aphyr works hard. really, really hard. he's built a huge toolbox of stuff specifically to work on these problems, himself, via relentless grind. if you look at the github committers, 50,000 lines of code changes came from aphyr alone. i'd really like to have even half the dedication that guy carries into his work
|
# ? Apr 22, 2015 16:04 |
|
triple sulk posted:http://railsbird.tumblr.com/post/117076597115/existential-crisis-at-railsconf waiter this omakase is stale
|
# ? Apr 22, 2015 16:37 |
|
Notorious b.s.d. posted:it's not that aphyr is smart. i mean, he is, but i don't think that's the key to the "call me maybe" work don't just count the lines of code. think of his posts too! and it's not filled with noise. that's quite a few "lines" in itself.
|
# ? Apr 22, 2015 16:40 |
|
his github picture sure is something
|
# ? Apr 22, 2015 16:42 |
|
Notorious b.s.d. posted:it's not that aphyr is smart. i mean, he is, but i don't think that's the key to the "call me maybe" work Yeah that's a great point. I also wish I had 10% of the drive he does. If I didn't already work 8hrs a day on code maybe I'd be more motivated to do it outside of work too.
|
# ? Apr 22, 2015 16:54 |
|
crazysim posted:don't just count the lines of code. think of his posts too! and it's not filled with noise. that's quite a few "lines" in itself. Yeah he's got a real knack for technical writing. And endless patience judging by the comments on that jira ticket
|
# ? Apr 22, 2015 16:55 |
|
endless patience is pretty much a prerequisite for good technical writing on complex topics
|
# ? Apr 22, 2015 17:38 |
|
Singapore Prime Minister Lee Hsien Loong says the phrase, "learn you a Haskell for great good" (a bit after 9:51:) https://www.youtube.com/watch?v=49YeHvJ6yZg sarehu fucked around with this message at 22:00 on Apr 22, 2015 |
# ? Apr 22, 2015 21:57 |
|
it's a shame BONUS stopped poasting
|
# ? Apr 22, 2015 22:02 |
Here's a cool article about the Option monad in Rust. It's nice seeing monads (and the clean code that they create) getting some play in imperative languages.
|
|
# ? Apr 30, 2015 06:13 |
|
im a monad
|
# ? Apr 30, 2015 07:41 |
|
get the monad, scholar scholar chill tall
|
# ? Apr 30, 2015 09:39 |
|
VikingofRock posted:Here's a cool article about the Option monad in Rust. It's nice seeing monads (and the clean code that they create) getting some play in imperative languages. looking forward to writing some slow python and php stuff in rust once it hits 1 or maybe 1.1
|
# ? Apr 30, 2015 11:01 |
|
VikingofRock posted:Here's a cool article about the Option monad in Rust. It's nice seeing monads (and the clean code that they create) getting some play in imperative languages. Please stop trying to make Rust look bad by associating it with that weirdo Haskell stuff
|
# ? Apr 30, 2015 12:02 |
|
no monads here guv, just putting a value inside a container and then accessing it with callbacks. completely different and not scary.
|
# ? Apr 30, 2015 12:12 |
|
a blog post about monad
|
# ? Apr 30, 2015 12:17 |
|
VikingofRock posted:Here's a cool article about the Option monad in Rust. It's nice seeing monads (and the clean code that they create) getting some play in imperative languages. as someone who knows nothing about rust, is the lambda here necessary? code:
code:
|
# ? Apr 30, 2015 13:23 |
|
HappyHippo posted:as someone who knows nothing about rust, is the lambda here necessary? i just tried it out and yes, your way works too
|
# ? Apr 30, 2015 13:29 |
|
fart simpson posted:i just tried it out and yes, your way works too partial application can be hard to read if you're not used to it, they probably just wanted to keep it simpler
|
# ? Apr 30, 2015 13:34 |
|
christ this is so stupidcode:
now you can simply write the thing you ACTUALLY want to write: code:
|
# ? Apr 30, 2015 15:42 |
|
i guess instead of having a NULL that's built into the language they created an Option<> type that isn't. About as good an idea as a non-built-in String type imo (i.e. not a good idea). Still this looks just like java.util.Optional<>, except "and_then" is called flatMap().
|
# ? Apr 30, 2015 15:47 |
|
Suspicious Dish mentioned that Red Hat has an employee whose surname is Null, and his name makes their HR systems gently caress up in entertaining ways this amuses me greatly
|
# ? Apr 30, 2015 15:50 |
|
Mr Dog posted:Still this looks just like java.util.Optional<>, except "and_then" is called flatMap(). is that bad?
|
# ? Apr 30, 2015 15:50 |
|
java.util.Optional is so stupid too worst new addition of java 8
|
# ? Apr 30, 2015 15:51 |
|
Mr Dog posted:i guess instead of having a NULL that's built into the language they created an Option<> type that isn't. About as good an idea as a non-built-in String type imo (i.e. not a good idea). Optional typing is much better than NULL, hth
|
# ? Apr 30, 2015 15:51 |
|
Optional typing is great but it should be built-in, just like strings should be built in, because both of those things are used constantly java.util.Optional<> is a band-aid for a language that already has null references in it, Rust shouldn't need an identical copy of it if they're starting from scratch. I use java.util.Optional in new code everywhere. It's clunky but it's a drat sight better than constant "hmm is this parameter nullable or not"
|
# ? Apr 30, 2015 15:55 |
|
what would be different in Rust if it were built in? can you not rely on its presence? is it just the dereference sugar that you miss?
|
# ? Apr 30, 2015 16:05 |
|
something like c# 4 (or is it 5?)'s conditional-dereference operator ?? or whatever would make the optional value gonad a lot less verbose. if you're focusing on a page of code then you shouldn't have a bunch of extra chaff in the way of the meat of the operation.
|
# ? Apr 30, 2015 16:07 |
|
hell, go one step further and bake some sort of generalization of the option type into the language. and then like, some special syntax for doing stuff i dunno i'm just an ideas guy.
|
# ? Apr 30, 2015 16:16 |
|
The worst part of java.util.Optional is that Eclipse still can't apply @NonNull and @Nullable to it. Java 9 had better bring those annotations into the language specification.
|
# ? Apr 30, 2015 16:24 |
|
rrrrrrrrrrrt posted:hell, go one step further and bake some sort of generalization of the option type into the language. and then like, some special syntax for doing stuff i dunno i'm just an ideas guy.
|
# ? Apr 30, 2015 16:28 |
|
Max Facetime posted:christ this is so stupid but what if get_shortest() returned null? then you need to build explicit null handling into every function? they could have written the option example like this code:
|
# ? Apr 30, 2015 16:29 |
|
Mr Dog posted:something like c# 4 (or is it 5?)'s conditional-dereference operator ?? or whatever would make the optional value gonad a lot less verbose. we could always make and_then into an operator like... Hmm, how about >>=
|
# ? Apr 30, 2015 16:31 |
|
Arcsech posted:we could always make and_then into an operator like... Hmm, how about >>= i like this idea, i wonder if there;s any languages out there that do it
|
# ? Apr 30, 2015 16:31 |
|
Arcsech posted:we could always make and_then into an operator like... Hmm, how about >>= making it infix seems pretty cool not sure about replacing a nice idiomatic "and_then" with gobbledygook symbols though
|
# ? Apr 30, 2015 16:36 |
|
fart simpson posted:but what if get_shortest() returned null? then you need to build explicit null handling into every function? they could have written the option example like this it also only works if you have existing functions with the right signature and behaviour, and don't require any fields to be extracted or anything to be computed specific to this application. still, I see the appeal of optional-friendly syntax. wonder why they didn't go there; too much "put it in the library"?
|
# ? Apr 30, 2015 16:39 |
|
|
# ? Jun 1, 2024 09:23 |
|
this all looks bad and worse than doing it in c#
|
# ? Apr 30, 2015 16:40 |