|
coffeetable posted:"why is the sky blue?" "because ants have six legs" unless it's a keyword or an operator, everything in ruby is an object, including numbers. so you can do bizarre stuff like call a method on a number: 10.between?(0,50) #=> true but the result is that if you just evaluate 0? it will return true because 0 exists. i had a programming teacher in school who said that if he had the choice, he would introduce newbies to programming with ruby, and i'm not sure if that is a decent idea or totally retarded. i like how flexible it is, and that could make things easier at the start, but people are going to be so confused when they have to start doing stuff with strict typing. or any typing at all
|
# ? Jan 24, 2014 20:36 |
|
|
# ? May 18, 2024 09:35 |
|
prefect posted:really? that seems wrong to me. is there a reason for it? no, theres no reason to be learning ruby
|
# ? Jan 24, 2014 20:37 |
|
Sagebrush posted:it will return true because 0 exists.
|
# ? Jan 24, 2014 20:43 |
|
prefect posted:really? that seems wrong to me. is there a reason for it? you have three choices when defining booleans in yo lang 1. Only booleans are true/false (this is especially good when objects are never nullable) 2. booleans are true/false, null objects are false, and everything else is true (this is good when your bitch rear end lang has easily nullable objects) 3. special case things like 0, the empty string, etc. etc. because youre a dumb gay baby
|
# ? Jan 24, 2014 20:47 |
|
Sagebrush posted:i had a programming teacher in school who said that if he had the choice, he would introduce newbies to programming with ruby, and i'm not sure if that is a decent idea or totally retarded. i like how flexible it is, and that could make things easier at the start, but people are going to be so confused when they have to start doing stuff with strict typing. or any typing at all ruby is a fun lang for precisely the same reasons its a bad beginner lang (and bad for anything large/serious): it lets you do just about anything you can imagine, regardless of how useful or destructive it is. jsut inject some code into a base class, who gives a gently caress who else uses it its free jazz
|
# ? Jan 24, 2014 20:52 |
|
FamDav posted:you have three choices when defining booleans in yo lang my dumb brain can't figure out if Java is 1 or 2, since java booleans are primitives and can't be null but other objects can
|
# ? Jan 24, 2014 20:54 |
|
Java doesn't auto-coerce poo poo to booleans, which is probably a good idea.
|
# ? Jan 24, 2014 20:55 |
|
yeah. java does booleans right
|
# ? Jan 24, 2014 20:56 |
|
FamDav posted:you have one choice when defining booleans in yo lang ftfy
|
# ? Jan 24, 2014 21:00 |
|
i like it when there are boolean keywords true and false, but they evaluate internally to 0x1 and 0x0. microcontroller background i guess.
|
# ? Jan 24, 2014 21:04 |
|
i like it when there are two reasonable ways of laying out a conditional statement in asm, and you encode information in the assembled binary by picking one or the other
|
# ? Jan 24, 2014 21:07 |
|
lol rms is mad at llvm because it's too good and actually useful http://www.phoronix.com/scan.php?page=news_item&px=MTU4MjA
|
# ? Jan 24, 2014 21:13 |
|
Shaggar posted:no, theres no reason to be learning ruby i have to know some of it because chef i really wish some super sperglord would rewrite chef so that it used groovy or python or something other than ruby, but whatchagonnado?
|
# ? Jan 24, 2014 21:15 |
|
imagine if all that tremendous sperg had been pointed at curing cancer or making a warp drive or something that literally anyone anywhere cares about at all
|
# ? Jan 24, 2014 21:16 |
|
Arcsech posted:lol rms is mad at llvm because it's too good and actually useful http://www.phoronix.com/scan.php?page=news_item&px=MTU4MjA hmm, its almost as if not being cancerously copylefted encouraged people and companies to contribute all the neat stuff llvm has
|
# ? Jan 24, 2014 21:21 |
|
FWIW, other languages have different values for true and false, Forth being a notable one. -- true is -1 (all bits set), and false is 0, starting with Forth-83
|
# ? Jan 24, 2014 21:26 |
|
Sagebrush posted:imagine if all that tremendous sperg had been pointed at curing cancer or making a warp drive or something that literally anyone anywhere cares about at all this would be the result https://www.youtube.com/watch?v=bQVc79FE5Bo
|
# ? Jan 24, 2014 21:28 |
|
prefect posted:i have to know some of it because chef salt/ansible not doin it for you? Malcolm XML fucked around with this message at 21:31 on Jan 24, 2014 |
# ? Jan 24, 2014 21:29 |
|
puppet is neat until you have to extend it
|
# ? Jan 24, 2014 21:30 |
|
holy loving loly i read rms's actual statementquote:. The values of free software are fundamentally different from the values of open source, which make "better code" the ultimate goal ... Therefore, we had to take care to prevent that. quote:For GCC to be replaced by another technically superior compiler ... is a terrible setback for our community precisely because it is not copylefted jesus christ then again this is a guy who uses a chinese netbook and wgets http pages to read them so i suppose "usability" or "efficiency" or "suitability to the real world" isn't even on his radar
|
# ? Jan 24, 2014 21:46 |
|
quote:If GCC were to change from a free compiler into a platform for nonfree compilers, it would no longer serve the goal of freedom very well. Therefore, we had to take care to prevent that. loving lol considering the ps2 toolchain was a hacked up gcc distributed with a special license exemption direct from the fsf
|
# ? Jan 24, 2014 22:13 |
|
Malcolm XML posted:salt/ansible not doin it for you? last i checked, salt was relatively immature (or at least not widespread enough to get it past the bosses) and ansible didn't do windows
|
# ? Jan 24, 2014 22:29 |
|
I think rackspace has put a lot of backing into Salt if that means anything to you or your bosses
|
# ? Jan 24, 2014 22:39 |
|
has anyone ever considered how weird it is that people just release libraries for stuff for free? almost any special function that you need in your program, someone has probably made a library and posted it online for anyone to use at no cost. that's loving weird. but imagine how different programming would be if, like, you wanted to send a tcp packet, and your only choice was either to buy a license to someone' library or to roll your own code from the ground up
|
# ? Jan 24, 2014 22:40 |
|
Hard NOP Life posted:I think rackspace has put a lot of backing into Salt if that means anything to you or your bosses my bosses hate rackspace like crazy -- i guess they didn't like some of the treatment they were getting at some point (before my time)
|
# ? Jan 24, 2014 22:41 |
|
gucci void main posted:everything in ruby is an object. blocks are not objects.
|
# ? Jan 24, 2014 22:48 |
|
prefect posted:i have to know some of it because chef it would be just as bad in python if not worse if it were written in groovy, cj types would go "eww java" and refuse to use it
|
# ? Jan 24, 2014 22:49 |
|
groovy is cool as long as you write it more java like than p-lang like
|
# ? Jan 24, 2014 22:53 |
|
Sagebrush posted:has anyone ever considered how weird it is that people just release libraries for stuff for free? almost any special function that you need in your program, someone has probably made a library and posted it online for anyone to use at no cost. that's loving weird. but imagine how different programming would be if, like, you wanted to send a tcp packet, and your only choice was either to buy a license to someone' library or to roll your own code from the ground up its beneficial for companies to open source things, because it helps keep up a culture of open source things that are free to use. as long as the code isnt something that gives a big advantage to your company, its advantageous to promote a culture of open source libraries so you dont have to pay coders you employ (or other companies) to duplicate effort also its a good way to show off your skills if youre a student or looking for work also making software development easy to get into for free allows education of more coders, so salary costs go down Arcsech fucked around with this message at 23:05 on Jan 24, 2014 |
# ? Jan 24, 2014 23:01 |
|
Sagebrush posted:imagine if all that tremendous sperg had been pointed at curing cancer or making a warp drive or something that literally anyone anywhere cares about at all The cancer curing society is as bad as the programming society (if you discount self-proclaimed rockstar programmers, ninja programmers, disrupters, etc). There's several cancer curie vectors of attack that are not being looked at because personalized medicine and genomics are in right now. what i'm saying is everything's poo poo.
|
# ? Jan 24, 2014 23:35 |
|
although i guess the end result is still better than recreating IRC messaging for the googelth time. It'll just be benefiting the 0.1% richest before anyone else. And genetically enhanced rich children are gonna be here way before curing cancer for poors eating carcinogenic poor's food.
|
# ? Jan 24, 2014 23:38 |
|
did it make it sound like there was any other true option but 1
|
# ? Jan 25, 2014 00:41 |
|
MeruFM posted:although i guess the end result is still better than recreating IRC messaging for the googelth time. It'll just be benefiting the 0.1% richest before anyone else. And genetically enhanced rich children are gonna be here way before curing cancer for poors eating carcinogenic poor's food. rich people get cancer too, in fact it's been termed the "rich man's disease" because generally speaking if you're poor you don't live long enough to get it, or by the time you get it you're dealing with some other more pressing issues
|
# ? Jan 25, 2014 00:43 |
|
also, you know, having cancer is expensive as hell, so there's that
|
# ? Jan 25, 2014 00:43 |
|
If you're a scripting language and like Ruby and everything evaluates to a nullable object reference, having nil act like false and everything else like true doesn't seem too bad. nil != false is still a thing, it's not a coercion or anything weird.
|
# ? Jan 25, 2014 01:05 |
|
its good for dumb langs that do it but the problem is nullable should never be the default. When I'm writing java and every single bit of input has to be checked to make sure that it isn't secretly null thus causing an awesome runtime exception is, well, dumb. A String isn't null. A String is a list of bytes/codepoints/whatever that roughly correspond with what we'd call text.
|
# ? Jan 25, 2014 01:15 |
|
Sagebrush posted:i'm trying to learn ruby and it bugs the crap out of me
|
# ? Jan 25, 2014 01:58 |
|
p much, but i'll need to refactor a rails thing someone else wrote fairly soon and ugh
|
# ? Jan 25, 2014 02:20 |
|
FamDav posted:its good for dumb langs that do it but the problem is nullable should never be the default. to be fair this is more depressing in a statically typed language than in a dynamically typed one in like python, the thing you expect to be a string might also be a Cheeseburger object, so the fact that it might also be None is not as big a deal but in java, I mean, poo poo dudes, if I wanted my inputs to be random things I didn't recognize I'd be writing python
|
# ? Jan 25, 2014 02:22 |
|
|
# ? May 18, 2024 09:35 |
|
FamDav posted:its good for dumb langs that do it but the problem is nullable should never be the default. the proper way to do things is to write your code so that it means the same thing whether something is null or false or "" or "0" or 0, and then just go "if ($butt)" or "if (!$butt)"
|
# ? Jan 25, 2014 02:27 |