Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Sagebrush
Feb 26, 2012

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

Adbot
ADBOT LOVES YOU

Shaggar
Apr 26, 2006

prefect posted:

really? that seems wrong to me. is there a reason for it?

no, theres no reason to be learning ruby

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY

Sagebrush posted:

it will return true because 0 exists.
okay now i get it ty

FamDav
Mar 29, 2008

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

Breakfast All Day
Oct 21, 2004

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

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

FamDav posted:

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

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 :confused:

Sapozhnik
Jan 2, 2005

Nap Ghost
Java doesn't auto-coerce poo poo to booleans, which is probably a good idea.

Shaggar
Apr 26, 2006
yeah. java does booleans right

JewKiller 3000
Nov 28, 2006

by Lowtax

FamDav posted:

you have one choice when defining booleans in yo lang

1. Only booleans are true/false

ftfy

Sagebrush
Feb 26, 2012

i like it when there are boolean keywords true and false, but they evaluate internally to 0x1 and 0x0. microcontroller background i guess.

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip
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

Arcsech
Aug 5, 2008
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

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

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? :shrug:

Sagebrush
Feb 26, 2012

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

Breakfast All Day
Oct 21, 2004

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

MononcQc
May 29, 2007

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 :toot:

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

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

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

prefect posted:

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? :shrug:

salt/ansible not doin it for you?

Malcolm XML fucked around with this message at 21:31 on Jan 24, 2014

Posting Principle
Dec 10, 2011

by Ralp
puppet is neat until you have to extend it

Sagebrush
Feb 26, 2012

holy loving loly i read rms's actual statement

quote:

. 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

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

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

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

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

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe
I think rackspace has put a lot of backing into Salt if that means anything to you or your bosses

Sagebrush
Feb 26, 2012

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

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

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) :shrug:

Notorious b.s.d.
Jan 25, 2003

by Reene

gucci void main posted:

everything in ruby is an object.

blocks are not objects.

Notorious b.s.d.
Jan 25, 2003

by Reene

prefect posted:

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? :shrug:

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

Shaggar
Apr 26, 2006
groovy is cool as long as you write it more java like than p-lang like

Arcsech
Aug 5, 2008

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

MeruFM
Jul 27, 2010

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.

MeruFM
Jul 27, 2010
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.

FamDav
Mar 29, 2008

did it make it sound like there was any other true option but 1

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

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

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
also, you know, having cancer is expensive as hell, so there's that

Vanadium
Jan 8, 2005

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.

FamDav
Mar 29, 2008
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.

lol if you
Jun 29, 2004

I am going to remove your penis, in thin slices, like salami, just for starters.

Sagebrush posted:

i'm trying to learn ruby and it bugs the crap out of me

Sagebrush
Feb 26, 2012


p much, but i'll need to refactor a rails thing someone else wrote fairly soon and ugh

nrook
Jun 25, 2009

Just let yourself become a worthless person!

FamDav posted:

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.

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

Adbot
ADBOT LOVES YOU

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

FamDav posted:

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.

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)"

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply