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
penus de milo
Mar 9, 2002

CHAR CHAR
Perl is a pretty sweet glue language if you use it for what it's intended for, tiny little scripts for when bash isnt powerful enough

trying to use it for actual programming is a no-no

mathsnype: 78 is a triangular number, and its factorization makes it a sphenic number. As a multiple of a perfect number, 78 is itself a semiperfect number.

Adbot
ADBOT LOVES YOU

TiMBuS
Sep 25, 2007

LOL WUT?

ive made large apps in perl and its not bad. ive found the main culprit blocking any maintaining/refactoring is thee abuse of hashes as datastores. e: especially for keeping state in a GUI
basically: use moose. use moose. use Moose;

Stringent
Dec 22, 2004


image text goes here

TiMBuS posted:

pff yea epic facepalm, code that avoids unneeded copying and also avoids actoin-at-a-distance ref fuckery is totally a bad idea.

i saw it as avoiding unneeded copying at the cost of enabling action-at-a-distance ref fuckery, but hey ymmv

TiMBuS
Sep 25, 2007

LOL WUT?

Stringent posted:

i saw it as avoiding unneeded copying at the cost of enabling action-at-a-distance ref fuckery, but hey ymmv

umm did u miss the part about where the default is a readonly ref. also perl5 lets you modify @_. my mileage does vary. i have a honda civic with a strange engine

Stringent
Dec 22, 2004


image text goes here

TiMBuS posted:

also perl5 lets you modify @_.

and i had to pass it off as a readability issue to get them to stop doing that...

is there a switch to get it to default to pass as copy?

Stringent fucked around with this message at 12:44 on May 28, 2012

Sapozhnik
Jan 2, 2005

Nap Ghost
perl is awful, never write anything new in perl that doesn't fit on your screen

TiMBuS
Sep 25, 2007

LOL WUT?

Stringent posted:

is there a switch to get it to default to pass as copy?

in perl6? um, no? no. there is no such switch. i dont see why you want this, but if yuo have a good reson ill tell it to larry and he can explain to me why its a dumb idea and ill pass it on back to you.

Zombywuf
Mar 29, 2008

TiMBuS posted:

Perl code:
sub add-one-readonly ($z) {
    $z = $z+1; #Error. cannot modify readonly value
}


sub add-one-ref ($z is rw) {
    $z = $z+1; #Cool.
}
my $a = 0;
add-one-ref ($a)
say $a; #It's now 1.

add-one-ref(5); #But this will fail.


#If you prefer the Old Way
sub add-one-perl5 ($z is copy) {
    $z = $z+1; 
}
Good poo poo! go get perl 6!!

Old news.
C++ code:
void add_one_readonly(const int &z) {
  z = z + 1; // static error, why wait till run time?
}
void add_one_ref(int &z) {
  z = z + 1;
}
void add_one_copy(int z) {
  z = z + 1;
}
Why other languages make such a meal of this I dunno.

NeoHentaiMaster
Jul 13, 2004
More well adjusted then you'd think.

Char posted:

Perl is a pretty sweet glue language if you use it for what it's intended for, tiny little scripts for when bash isnt powerful enough

trying to use it for actual programming is a no-no

People honestly think this. I think it stems from outdated information. Maybe 5+ years ago it sort of made sense. I have no idea.

Zombywuf
Mar 29, 2008

NeoHentaiMaster posted:

People honestly think this. I think it stems from outdated information. Maybe 5+ years ago it sort of made sense. I have no idea.

It stems from the days when people thought that a clean looking syntax made programming easy.

People still think this :smith:

right, I gotta go fix a UnicodeDecodeError, an exception being swallowed causing a misreporting of success, a persistant db timeout and a data loss bug.

TiMBuS
Sep 25, 2007

LOL WUT?

Zombywuf posted:

Old news.
C++ code:
void add_one_readonly(const int &z) {
  z = z + 1; // static error, why wait till run time?
}
void add_one_ref(int &z) {
  z = z + 1;
}
void add_one_copy(int z) {
  z = z + 1;
}
Why other languages make such a meal of this I dunno.

woosh

Zombywuf
Mar 29, 2008


Is Perl6 ready yet?

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano

Zombywuf posted:

Is Perl6 ready yet?

go back to "trolling" d&d

Stringent
Dec 22, 2004


image text goes here

TiMBuS posted:

in perl6? um, no? no. there is no such switch. i dont see why you want this, but if yuo have a good reson ill tell it to larry and he can explain to me why its a dumb idea and ill pass it on back to you.

i have a reason, but it's probably not a good reason per se

TiMBuS
Sep 25, 2007

LOL WUT?

it would make sense if chomp and s/// etc worked like perl5's (which btw is terrible). but they don't so..

anyway the perl6 guys said a couple people have asked for a 'default copy' pragma, but most just realized they didnt need to modify their poo poo in place and stopped asking. idk. they might put it in if enough people complain

skeevy achievements
Feb 25, 2008

by merry exmarx

Zombywuf posted:

It stems from the days when people thought that a clean looking syntax made programming easy.

People still think this :smith:

right, I gotta go fix a UnicodeDecodeError, an exception being swallowed causing a misreporting of success, a persistant db timeout and a data loss bug.

how does using an obtuse syntax make those problems easier to solve or go away altogether

Stringent
Dec 22, 2004


image text goes here

Internaut! posted:

how does using an obtuse syntax make those problems easier to solve or go away altogether

theoretically the same way that :10bux: does

tef
May 30, 2004

-> some l-system crap ->

Zombywuf posted:

It stems from the days when people thought that a clean looking syntax made programming easy.

i bet u miss those heady days of apl

tef
May 30, 2004

-> some l-system crap ->
personally I think people who talk about optimising syntax from the perspective of writing code, as opposed to reading it, are petulant. it's plainly obvious which activity happens more.


:emote:

Stringent
Dec 22, 2004


image text goes here

tef posted:

personally I think people who talk about optimising syntax from the perspective of writing code, as opposed to reading it, are petulant. it's plainly obvious which activity happens more.


:emote:

skeevy achievements
Feb 25, 2008

by merry exmarx
yeah I may have mentioned it already itt but watching that intern use idea was pretty impressive, he knew all the shortcuts and code generators and whatnot so it was like watching a video of a regular text editor on 8x fast forward

and of course the code produced, verbose as it was, was extremely readable so in summation pick your platform based on tooling good day :tipshat:

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Internaut! posted:

yeah I may have mentioned it already itt but watching that intern use idea was pretty impressive, he knew all the shortcuts and code generators and whatnot so it was like watching a video of a regular text editor on 8x fast forward

and of course the code produced, verbose as it was, was extremely readable so in summation pick your platform based on tooling good day :tipshat:

verbose code is hard to read simply because there's more of it

compare dr. seuss and harry potter

Zombywuf
Mar 29, 2008

I miss not being able to deduce whether I am dealing with a reference or a value by the syntax surrounding it and having to go chasing all over the code to find out.

Maybe I should learn APL, then I can create a frankensteinien combo of APL and COBOL. It will be the most powerful most readable thing ever.

tef
May 30, 2004

-> some l-system crap ->
don't use values, problem solved.

put that in your box and smoke it.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Zombywuf posted:

Maybe I should learn APL, then I can create a frankensteinien combo of APL and COBOL. It will be the most powerful most readable thing ever.

challenge: write a function to convert a standard steamid (STEAM_0:0:xxxxxxxx) to a 64-bit steamid (a longass number) in a language created before 1972

skeevy achievements
Feb 25, 2008

by merry exmarx

BonzoESC posted:

verbose code is hard to read simply because there's more of it

compare dr. seuss and harry potter

barring that harry potter is presumably much richer linguistically than dr seuss how verbose is java these days

I haven't used it since ehhhh 1.4? but I know there's generics and concise iteration syntax and autoboxing and whatnot now which would have saved me a lot of code, ymmv

if the biggest pain points left are idiomatic builder.strategy.patternpatternpattern frameworks, well don't use those I guess?

edit, I haven't used java since old times

skeevy achievements fucked around with this message at 18:54 on May 28, 2012

rotor
Jun 11, 2001

classic case of pineapple on pizzadog derangement syndrome
I have zero problems with verbose code. code should be stupid obvious, not a bunch of stuff done in the background as a side effect of how iterators unroll or how things are passed or whatever and if just typing out a bunch of poo poo to make all that poo poo explicit is what it takes, so be it. if the manual act of typing is your big complaint, get hosed.

Zombywuf
Mar 29, 2008

Luigi Thirty posted:

challenge: write a function to convert a standard steamid (STEAM_0:0:xxxxxxxx) to a 64-bit steamid (a longass number) in a language created before 1972

No fair, you excluded Prolog.

Zombywuf
Mar 29, 2008

rotor posted:

I have zero problems with verbose code. code should be stupid obvious, not a bunch of stuff done in the background as a side effect of how iterators unroll or how things are passed or whatever and if just typing out a bunch of poo poo to make all that poo poo explicit is what it takes, so be it. if the manual act of typing is your big complaint, get hosed.

What I can't stand is masses of typing that achieves very little, i.e. Java and COBOL. This is why I want to add the power of APL to COBOL.

rotor
Jun 11, 2001

classic case of pineapple on pizzadog derangement syndrome

Zombywuf posted:

What I can't stand is masses of typing that achieves very little

why? what problem does highly meaning-dense code solve?

Sniep
Mar 28, 2004

All I needed was that fatty blunt...



King of Breakfast

rotor posted:

why? what problem does highly meaning-dense code solve?

lower LoC universally gets recognized as being better code / higher output value yup yup

rotor
Jun 11, 2001

classic case of pineapple on pizzadog derangement syndrome
obvious code is good code and meaning-dense code is typically not obvious.

EMILY BLUNTS
Jan 1, 2005

less thinking and mental filtering while reading the code becasue there aren't as many things all over the place

should be easier to debug too when the computer isn't able to figure out what

rotor
Jun 11, 2001

classic case of pineapple on pizzadog derangement syndrome
I mean not YOUR code zombywuf, I'm talking about those other people

rotor
Jun 11, 2001

classic case of pineapple on pizzadog derangement syndrome

Resplendent Spiral posted:

less thinking and mental filtering while reading the code becasue there aren't as many things all over the place

should be easier to debug too when the computer isn't able to figure out what

the work has to get done somewhere and my position is that it should be done out in the open, and if the price you pay for that is verbosity, who fuckin cares

skeevy achievements
Feb 25, 2008

by merry exmarx

rotor posted:

I have zero problems with verbose code. code should be stupid obvious, not a bunch of stuff done in the background as a side effect of how iterators unroll or how things are passed or whatever and if just typing out a bunch of poo poo to make all that poo poo explicit is what it takes, so be it. if the manual act of typing is your big complaint, get hosed.

where does as3 fall on the verbosity scale

iirc it looked a lot like java

vapid cutlery
Apr 17, 2007

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

Internaut! posted:

where does as3 fall on the verbosity scale

iirc it looked a lot like java

. . . seriously?

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
how verbose is english

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Mr Dog posted:

perl is awful, never write anything new in perl that doesn't fit on your screen
every new program fits on the screen at first

Adbot
ADBOT LOVES YOU

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Gazpacho posted:

every new program fits on the screen at first

thanks to subpixel rendering, so can your penis

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