|
every thread is the bad programmer thread
|
# ? Jun 6, 2015 22:30 |
|
|
# ? Jun 11, 2024 00:19 |
|
MALE SHOEGAZE posted:if you have to do it, you can try and make refinements work for you: in this case the class that's getting monkey patched doesn't even need to be aware of the poo poo that's being patched into it, so best thing is to keep it all in the module that would actually use it and leave the original class alone MALE SHOEGAZE posted:the team here at redhat seems to like ruby a lot. I'm excited to see whether that's because ruby is OK when used responsibly, or whether that's because they haven't gone very far down the rabbit hole yet. here's hoping it's the former. i like ruby as long as nothing i'm using abuses the hairer language features too much (qv our last few posts) that's probably true of any language, though. especially dynamic ones
|
# ? Jun 6, 2015 22:30 |
|
MALE SHOEGAZE posted:ruby seems great at first. the hash syntax seems really nice, the higher order functional methods are nice and work well, yield syntax is legitimately pretty great. lol if ur hash keys are strings instead of symbols
|
# ? Jun 6, 2015 22:32 |
|
MALE SHOEGAZE posted:sure i can do that if i'm implementing a new thing I am free to do that, or just use like something besides restclient (i mean lol at not using faraday anyhow), but that doesn't fix all of the things using restclient where I know the people who implemented them had no idea the money patches existed but were using the patches anyhow. it means i have to go and track all of those people down and be like 'hey did you know all calls to restclient sometimes have a timeout of 100s and sometimes have a timeout of 0s, depending on whether or not this code has been sourced??? what should i Do?? sorry for your interfaces and bad coworkers
|
# ? Jun 6, 2015 22:59 |
|
the real question isn't if operators should be surrounded by whitespace but whether the full unicode category for spaces [Zs], including the OGHAM SPACE MARK ( ) such that a-b is an identifier but a - b is actual subtraction
|
# ? Jun 6, 2015 23:49 |
|
a - b is an identifier, a − b is subtraction.
|
# ? Jun 7, 2015 00:11 |
|
Also a – b is a closed range, a — b is a half-open range.
|
# ? Jun 7, 2015 00:13 |
|
foo: :butts is a loving horrid syntax and putting it in was an even more horrid idea
|
# ? Jun 7, 2015 00:14 |
|
the only good languages are the ones that allow the poop emoji in identifiers
|
# ? Jun 7, 2015 00:21 |
|
Soricidus posted:the only honest languages are the ones that allow the poop emoji in identifiers
|
# ? Jun 7, 2015 00:23 |
|
MALE SHOEGAZE posted:the team here at redhat seems to like ruby a lot. I'm excited to see whether that's because ruby is OK when used responsibly, or whether that's because they haven't gone very far down the rabbit hole yet. well it's dynamically typed, so
|
# ? Jun 7, 2015 01:06 |
|
Soricidus posted:the only good languages are the ones that allow the poop emoji in identifiers php wins again
|
# ? Jun 7, 2015 01:07 |
Back on the topic of unary minus, my biggest Haskell pet peeve is the difference between map (+1) [1,2,3] and map (-1) [1,2,3].
|
|
# ? Jun 7, 2015 01:36 |
|
There's a simple workaround: map ((0-) . (+ 1) . (0-)) [1,2,3]
|
# ? Jun 7, 2015 01:56 |
|
sarehu posted:There's a simple workaround: map ((0-) . (+ 1) . (0-)) [1,2,3] this is incredibly ugly and its not at all obvious what it does. map (+ (-1)) [1,2,3] is much better
|
# ? Jun 7, 2015 02:52 |
I think the best workaround is map (subtract 1) [1,2,3] (no symbolic operators; shoutout to NBSD!). Still pretty annoying IMO.
|
|
# ? Jun 7, 2015 03:15 |
|
actually, the best workaround is to use a real language
|
# ? Jun 7, 2015 03:44 |
|
Bloody posted:actually, the best workaround is to use a real language actually the best workaround is realizing computers are for nerds.
|
# ? Jun 7, 2015 03:48 |
|
ah true
|
# ? Jun 7, 2015 03:52 |
Bloody posted:actually, the best workaround is to use a real language Out of curiosity, what would the equivalent idiomatic C# be?
|
|
# ? Jun 7, 2015 04:16 |
|
I have no idea, because that indecipherable pile of rear end appears useless
|
# ? Jun 7, 2015 04:33 |
|
VikingofRock posted:Out of curiosity, what would the equivalent idiomatic C# be? code:
|
# ? Jun 7, 2015 04:34 |
comedyblissoption posted:
Ah interesting, thanks. I've never really used C# and I was wondering how much functional stuff has creeped into it in recent years. What you posted seems fairly functional-esque to me.
|
|
# ? Jun 7, 2015 05:08 |
|
imo functional stuff owns the hardest when injected into a non functional context
|
# ? Jun 7, 2015 05:14 |
|
lodash?
|
# ? Jun 7, 2015 07:51 |
|
VikingofRock posted:Ah interesting, thanks. I've never really used C# and I was wondering how much functional stuff has creeped into it in recent years. What you posted seems fairly functional-esque to me. code:
|
# ? Jun 7, 2015 14:32 |
|
the "correct" way to monkey patch poo poo in ruby is to use ruby 2.1 "refinements." it's like a monkey patch, scoped to files that include the refinement the evaluation order and behavior are predictable, and it can't gently caress up code that isn't yours
|
# ? Jun 7, 2015 15:29 |
|
Notorious b.s.d. posted:the "correct" way to monkey patch poo poo in ruby is to use ruby 2.1 "refinements." it's like a monkey patch, scoped to files that include the refinement yeah but they're useless for any class that you dont instantiate directly, eg. most classes.
|
# ? Jun 7, 2015 16:25 |
|
MALE SHOEGAZE posted:yeah but they're useless for any class that you dont instantiate directly, eg. most classes. you shouldn't be altering classes you don't/can't instantiate make a wrapper instead i guess
|
# ? Jun 7, 2015 16:30 |
|
Notorious b.s.d. posted:you shouldn't be altering classes you don't/can't instantiate
|
# ? Jun 7, 2015 16:37 |
|
Bloody posted:actually, the best workaround is to use a real language
|
# ? Jun 7, 2015 16:38 |
|
Notorious b.s.d. posted:the "correct" way to monkey patch poo poo in ruby this is like talking about the "correct" way to cook feces, or the "correct" way to commit bestiality the problem isn't so much how you're doing the thing, it's that you're trying to do it at all
|
# ? Jun 8, 2015 00:40 |
|
Soricidus posted:the "correct" way to commit bestiality mrhands.mpg
|
# ? Jun 8, 2015 00:58 |
|
b0lt posted:mrhands.mpg
|
# ? Jun 8, 2015 01:21 |
|
b0lt posted:mrhands.mpg there's a right way and a wrong way to accomplish any task
|
# ? Jun 8, 2015 02:45 |
|
java lol
|
# ? Jun 8, 2015 03:10 |
|
|
# ? Jun 8, 2015 07:58 |
|
is that "suppress and approve" or "suppress and decline"
|
# ? Jun 8, 2015 08:24 |
|
Wheany posted:is that "suppress and approve" or "suppress and decline" decline i assume you were asking a legit question and not being sarcastic because oracle
|
# ? Jun 8, 2015 09:39 |
|
|
# ? Jun 11, 2024 00:19 |
|
trying to write some R in a hurry without previous exposure is torture is their a reason R is so weird?
|
# ? Jun 8, 2015 18:31 |