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
jony neuemonic
Nov 13, 2009

camel book is legitimately funny and i'm still not sure how they pulled that off

there's supposed to be an update to Intermediate Perl soon, that should be decent

Adbot
ADBOT LOVES YOU

EMILY BLUNTS
Jan 1, 2005

jony neuemonic
Nov 13, 2009


one single page

that just says

"all of them"

Sapozhnik
Jan 2, 2005

Nap Ghost
If you develop Win32 software using anything whatsoever other than the WDK then you're doing it wrong

visual studio was good back in the Visual C++ 6.0 days and then it got overrun by stupid training wheels for baby languages

Sapozhnik fucked around with this message at 14:23 on May 27, 2012

MSPain
Jul 14, 2006
so far my impression is that having to use references is going to be a pain to get used to and the default variable $_ thing is going to gently caress with me and I will hate it until the day I decide it's awesome

if you can't tell i've been coddled by the likes of java and the other big web development languages

qntm
Jun 17, 2009
perl has some p good features but constantly encourages you to use them in bad ways

There's More Than One Way To Do It But Most Of Those Ways Are Terrible And You Should Never Use Them

JawnV6
Jul 4, 2004

So hot ...
i dunno if there's some faster path for "huh i wonder" to the computer working on w/e dumb poo poo i just thought up than perl but i also dont care

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp

MSPain posted:

so far my impression is that having to use references is going to be a pain to get used to and the default variable $_ thing is going to gently caress with me and I will hate it until the day I decide it's awesome

if you can't tell i've been coddled by the likes of java and the other big web development languages

i think its really nice but if you dont wanna use $_ you can do foreach my $butts (@tits) and then you can use $butts as the iterator


references own though after you wrap your head around them (im like 80% there)

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano
the arrow shorthand for dereferencing is p cool
$hashref->{'whatever'} meaning ${$hashref}{'whatever'}
$arrayref->[123] meaning ${$arrayref}[123]
$subref->('dick',69) meaning &{$subref}('dick',69)
then if you have refs to refs e.g. multidimensional arrays/hashes/whatever you can elide subsequent arrows e.g.
$ref->{'row'}{'column'} meaning $ref->{'row'}->{'column'} meaning ${${$ref}{'row'}}{'column'} or w/e

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

JawnV6 posted:

i dunno if there's some faster path for "huh i wonder" to the computer working on w/e dumb poo poo i just thought up than perl but i also dont care

just gonna say that ruby is way more orthogonal: you can put arrays in arrays without having to know "references" and everything is an object so you don't have to think about boxing integers like java or explicit self like python

it's more verbose than perl but it also doesn't have scalar and list contexts to confuse you

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Rufo posted:

the arrow shorthand for dereferencing is p cool
$hashref->{'whatever'} meaning ${$hashref}{'whatever'}
$arrayref->[123] meaning ${$arrayref}[123]
$subref->('dick',69) meaning &{$subref}('dick',69)
then if you have refs to refs e.g. multidimensional arrays/hashes/whatever you can elide subsequent arrows e.g.
$ref->{'row'}{'column'} meaning $ref->{'row'}->{'column'} meaning ${${$ref}{'row'}}{'column'} or w/e

why not hash['whatever']['row']['column']

MSPain
Jul 14, 2006

BonzoESC posted:

just gonna say that ruby is way more orthogonal

yeah I am actually teaching myself perl and ruby at the same time and it's a really schizophrenic experience.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
i think python is legitimately better than perl in about every respect but it's not like perl is bad

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

rotor posted:

i think python is legitimately better than perl in about every respect but it's not like perl is bad

i think perl is influential and important in the same way c is but just like c it's a bit too bare-bones and requires too many outside modules to be really powerful linguistically

not functional enough

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug
yeah it's cool that you can build an object-oriented system into it but instead of giving you the option of building one or having a half-dozen libraries for it why not build one in

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

BonzoESC posted:

i think perl is influential and important in the same way c is but just like c it's a bit too bare-bones and requires too many outside modules to be really powerful linguistically

not functional enough

wtf

jony neuemonic
Nov 13, 2009

rotor posted:

i think python is legitimately better than perl in about every respect but it's not like perl is bad

i'm a huge rookie but i prefer perl's syntax to python

that doesn't necessarily make it a better language, i just like writing it more

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

fidel sarcastro posted:

i'm a huge rookie but i prefer perl's syntax to python

that doesn't necessarily make it a better language, i just like writing it more

that's cool, whatever man, there aint no real right answer here.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
Your Favorite Language Is Just Fine

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
except for php, that poo poo sucks

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

rotor posted:

Your Favorite Language Is Just Fine


rotor posted:

except for php, that poo poo sucks

the syntax of an unexperienced idiot's view of perl combined with the safety of c

jony neuemonic
Nov 13, 2009

i know just enough about php to realize i don't want to know any more

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

MSPain posted:

so far my impression is that having to use references is going to be a pain to get used to and the default variable $_ thing is going to gently caress with me and I will hate it until the day I decide it's awesome
the key to using perl effectively is whenever it offers to do something implicit for you politely tell it no thanks

which is to say the only place you should be using $_ is in grep and map expressions

Gazpacho fucked around with this message at 20:14 on May 27, 2012

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
i dont think ive said "lua ftw" today. so, lua ftw

double sulk
Jul 2, 2010

perl seems pretty cool

MSPain
Jul 14, 2006

ahhh spiders posted:

i dont think ive said "lua ftw" today. so, lua ftw

we had a guy apply to a programming job, but the only programming experience he had was making WoW plugins in lua. As far as I know that's all lua is for and you aren't going to convince me otherwise.

he didn't get the job btw. dude literally had a neck beard.

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

MSPain posted:

we had a guy apply to a programming job, but the only programming experience he had was making WoW plugins in lua. As far as I know that's all lua is for and you aren't going to convince me otherwise.

he didn't get the job btw. dude literally had a neck beard.

you still had him in for an interview

jony neuemonic
Nov 13, 2009

MSPain posted:

dude literally had a neck beard.

your loss. that's where programmers get their strength

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

MSPain posted:

he didn't get the job btw. dude literally had a neck beard.

lmao

"this programmer nerd actually had a neckbeard! can you believe that poo poo? what a fuckin poindexter. we hired the guy in the pukka shell necklace, he was hella chill."

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
if i wasn't a complete failure & actually had the power to hire someone i would only hire bro nerds

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

ahhh spiders posted:

if i wasn't a complete failure & actually had the power to hire someone i would only hire bro nerds

same except only girls with huge tits

MSPain
Jul 14, 2006
interpersonal skills are more important than technical skills in most companies these days.

I didn't mean to offend you, your choice in facial hair is your right I guess.

NeoHentaiMaster
Jul 13, 2004
More well adjusted then you'd think.
Read Modern Perl first. Pretty much has all you need to know about which features to use and which to ignore. Also brings you up to date on everything thats changed in the past few years which is good cause there are a lot of a lovely outdated tutorials out there.

skeevy achievements
Feb 25, 2008

by merry exmarx

MSPain posted:

we had a guy apply to a programming job, but the only programming experience he had was making WoW plugins in lua. As far as I know that's all lua is for and you aren't going to convince me otherwise.

all lua developers are wow players yes

like my buddy who owns a gambling gaming software company and can't seem to understand why his as3 engine that interprets lua scripts at runtime is a bitch for his developers to test

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
lua ftw

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
Get your jimmies rustled on Lua.org

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

BonzoESC posted:

why not hash['whatever']['row']['column']

the short answer is "because you have to, because youre forced to handle references yourself, because of the way perl works"

specifically

1. perl flattens arrays. ((1,2),(3,4)) means (1,2,3,4). this includes @_, the array of parameters received by a subroutine. so good luck passing two arrays, or anything more complicated, without the help of references

2. perl passes everything by value (when youre passing a reference youre still just passing a scalar by value)

point #1 sounds like youre just working around a limitation of the language. arguably true but its not exactly hard to use [[1,2],[3,4]] or whatever. [] gives you a reference to an anonymous array. similarly the -> operator takes the pain out of dereferencing

id actually say #2 is a positive thing. you dont have to think wtf is happening when you call a subroutine. you know its all by value.

i only know a small amount of python but im reliably informed that

quote:

the following types, and their subclasses, pass by reference:
list, dict, object (this includes all "new-style classes"), ClassType ("old-style classes")
and set
and functions

whereas these pass by value:
int, bool, tuple,
string,
unicode,
and a smattering of others

which sounds fuckin horrific and a recipe for disaster/defensive copying hell tbqh

skeevy achievements
Feb 25, 2008

by merry exmarx
yeah that seems dumb but iirc it's based on mutability, so I imagine you'd figure it out quickly

Adbot
ADBOT LOVES YOU

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Rufo posted:

the short answer is "because you have to, because youre forced to handle references yourself, because of the way perl works"

specifically

1. perl flattens arrays. ((1,2),(3,4)) means (1,2,3,4). this includes @_, the array of parameters received by a subroutine. so good luck passing two arrays, or anything more complicated, without the help of references

2. perl passes everything by value (when youre passing a reference youre still just passing a scalar by value)

point #1 sounds like youre just working around a limitation of the language. arguably true but its not exactly hard to use [[1,2],[3,4]] or whatever. [] gives you a reference to an anonymous array. similarly the -> operator takes the pain out of dereferencing

id actually say #2 is a positive thing. you dont have to think wtf is happening when you call a subroutine. you know its all by value.

i only know a small amount of python but im reliably informed that


which sounds fuckin horrific and a recipe for disaster/defensive copying hell tbqh

it was a rhetorical question, i'm just saying $ref->{'whatever'}{'row'}{'column'} is objectively worse than ref['whatever']['row']['column'], especially if the former is a world where "$arrayref->[123] meaning ${$arrayref}[123]" is true

that said, ref['whatever']['row']['column'] is just syntactic sugar for ref.[]('whatever').[]('row').[]('column') which is itself equivalent to ref.send(:[], 'whatever').send(:[], 'row').send(:[], 'column') because [] is just a method

also 5 + 6 is just syntactic sugar for 5.send(:+, 6) because everything in ruby is pass-by-reference-to-object and some classes of object (Symbol, Numeric, TrueClass, FalseClass, NilClass) just happen to not be mutable

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