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
double sulk
Jul 2, 2010

Dr. Honked posted:

computer programming owns. i'm not sure how i would survive if i couldn't do it. chew twigs or something? i'll program anything in any language idgaf

would you even use Semicolon???

Adbot
ADBOT LOVES YOU

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp
SHUT UP SULK

Dr. Honked
Jan 9, 2011

eat it you slaaaaaaag
gently caress off sulk

blorpy
Jan 5, 2005

Jonny 290 posted:

SHUT UP SULK

Dr. Honked posted:

gently caress off sulk

Quebec Bagnet
Apr 28, 2009

mess with the honk
you get the bonk
Lipstick Apathy

Dr. Honked posted:

i used to know a guy who was trying to write a 3d renderer in sql "just to piss everyone off"

dude rewrote his raytracer to use linq which is sort of the same thing

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
cool

skeevy achievements
Feb 25, 2008

by merry exmarx

Markov Chain Chomp posted:

heh seriously though learn some python

is there a meaningful difference between python, ruby and groovy these days, in terms of the languages themselves

is python considered a superior choice because google's sort of a de facto sponsor while the others are hippie open source projects by guys out in the weeds

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.
groovy is kinda sorta sponsored by vmware, by virtue of them buying most of the dudes who made it and grails

0xB16B00B5
Aug 24, 2006

by Y Kant Ozma Post
python's standard library is poo poo.
Ruby has like a dozen of creepily named libraries for any single task you may want to do

Dr. Honked
Jan 9, 2011

eat it you slaaaaaaag

tinselt0wn posted:

python's standard library is poo poo.
Ruby has like a dozen of creepily named libraries for any single task you may want to do

roo is very good for parsing spreadsheets

Dr. Honked
Jan 9, 2011

eat it you slaaaaaaag
gem install nihondo_piss_gargle

TiMBuS
Sep 25, 2007

LOL WUT?

perl 6 is cool.

FEEDS:
code:
> 1,2,3,4,5 ==> map(* + 10) ==> grep(* % 2) ==> say();
11 13 15
BACKWARDS FEEDS:
code:
my $dblvar <== map(* * 2) <== prompt("gimmie a num: ");
AND BECAUSE ITS PERL:
code:
>say() <== 1,2,3,4,5 ==> map(* + 10)
11 12 13 14 15
go laern it.

penus de milo
Mar 9, 2002

CHAR CHAR
gem install

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

Toad King posted:

tbc what do you think of php's use as a general scripting language? like for non-web stuff?

well it's not as ideally suited to the environment as it is for the web but it works just fine. i wrote a desktop app using php-gtk once and it turned out ok

skeevy achievements
Feb 25, 2008

by merry exmarx

trex eaterofcadrs posted:

groovy is kinda sorta sponsored by vmware, by virtue of them buying most of the dudes who made it and grails

did not know this

if I worked in a mixed OS environment I'd probably look at it harder, as a portable language with syntax and features designed for conciseness, tons of convenience methods for dealing with file system/properties files/xml/rdbms, and full java lib interop sounds a hell of a lot better than the bash scripts we use

Shaggar
Apr 26, 2006
yeah java is basically the best

MSPain
Jul 14, 2006
I'm leaving my job where I do a lot of java development
I wish eclipse was a physical thing so i could burn it in the driveway

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.

Internaut! posted:

did not know this

if I worked in a mixed OS environment I'd probably look at it harder, as a portable language with syntax and features designed for conciseness, tons of convenience methods for dealing with file system/properties files/xml/rdbms, and full java lib interop sounds a hell of a lot better than the bash scripts we use

it's ok, i used to be a real groovy fag but now i just use it for xml processing and grails (i did write an edi builder in it that was pretty bad rear end, it was good for that too)

it has some syntactic and semantic idiosyncrasies from when the language was young that have carried into the 1.8 release that are supposed to get fixed by 2.0. little edge case-y poo poo that will burn your rear end. its got some pretty leaky abstractions and once i saw clojure i was like "welp sorry groovy"

Shaggar
Apr 26, 2006

MSPain posted:

I'm leaving my job where I do a lot of java development
I wish eclipse was a physical thing so i could burn it in the driveway

eclipse owns. sorry ur dumb or w/e

Toad King
Apr 23, 2008

Yeah, I'm the best

Tiny Bug Child posted:

well it's not as ideally suited to the environment as it is for the web but it works just fine. i wrote a desktop app using php-gtk once and it turned out ok

quote:

A Year Later...

[5-Aug-2010] Dropping by to let the PHP-GTK community know that development is still happening!

rofl

edit: oh hey lets see what wonderful apps people have made using php-gtk

Shaggar
Apr 26, 2006
Eclipse chat: Poked around in the new eclipse4 rcp api. Some ok ideas still totally crippled by SWT. they should just switch to xaml or another mvvm.

Shaggar
Apr 26, 2006

php and gtk: bringing you the absolute worst combination possible.

Sapozhnik
Jan 2, 2005

Nap Ghost
So I just learned that Python iterators throw an exception to indicate end of sequence

what the gently caress kind of amateur hour horse poo poo is this

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.

Shaggar posted:

eclipse owns. sorry ur dumb or w/e

both eclipse and rcp are loving terrible holy poo poo never again

Shaggar
Apr 26, 2006

Mr Dog posted:

So I just learned that Python iterators throw an exception to indicate end of sequence

what the gently caress kind of amateur hour horse poo poo is this

python

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.

Mr Dog posted:

So I just learned that Python iterators throw an exception to indicate end of sequence

what the gently caress kind of amateur hour horse poo poo is this

in my head i thought "no way"

sure enough:

http://docs.python.org/library/stdtypes.html#iterator-types posted:

iterator.next()

Return the next item from the container. If there are no further items, raise the StopIteration exception. This method corresponds to the tp_iternext slot of the type structure for Python objects in the Python/C API.

guido....

Shaggar
Apr 26, 2006
yeah but its not like anyone seriously considers python anything more than the hobbyist language it is.

Sapozhnik
Jan 2, 2005

Nap Ghost
It wouldn't have been hard to retrofit a non-retarded behaviour in Python 3, either, just add a has_next or __has_next__ or whatever method to the iterator protocol and then keep the existing StopIteration behaviour as a genuine "you did something you weren't supposed to do, bonehead" exception, albeit a poorly named one. Even a __boolean__ coercion, while kinda terrible, would have been better than just leaving that wtf in its current form.

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

trex eaterofcadrs posted:

in my head i thought "no way"

sure enough:


guido....

can't you just pass a block to the iterator instead of doing scrub poo poo like writing your own loops?

code:
i = (1..5).each #=> #<Enumerator: 1..5:each>
i.each {|n| puts n }
# prints:
# 1
# 2
# 3
# 4
# 5

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.

BonzoESC posted:

can't you just pass a block to the iterator instead of doing scrub poo poo like writing your own loops?

code:
i = (1..5).each #=> #<Enumerator: 1..5:each>
i.each {|n| puts n }
# prints:
# 1
# 2
# 3
# 4
# 5

idk poo poo about python cause i went ruby instead but wouldn't that use the same "feature" just under the covers?

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

http://gtk.php.net/apps/?key=rating posted:

Applications : Highest Rating

There are not any applications in this category.

Maybe you'd like to add one?

nope, no thanks

Shaggar
Apr 26, 2006

BonzoESC posted:

can't you just pass a block to the iterator instead of doing scrub poo poo like writing your own loops?

code:
i = (1..5).each #=> #<Enumerator: 1..5:each>
i.each {|n| puts n }
# prints:
# 1
# 2
# 3
# 4
# 5

this syntax is so gross

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"

Mr Dog posted:

It wouldn't have been hard to retrofit a non-retarded behaviour in Python 3, either, just add a has_next or __has_next__ or whatever method to the iterator protocol and then keep the existing StopIteration behaviour as a genuine "you did something you weren't supposed to do, bonehead" exception, albeit a poorly named one. Even a __boolean__ coercion, while kinda terrible, would have been better than just leaving that wtf in its current form.
It's not possible to implement a has_next() method on an iterator, because whether there is a next value cannot be determined until you try to calculate it.

A better solution would be to have next() return a wrapper with .value and .has_value attributes, but this would have broken backwards compatibility.

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Shaggar posted:

this syntax is so gross

lots of that is comment

code:
i = (1..5).each
i.each { |n|
  puts n
}
groovy's the same but with more syntax
code:
i = (1..5).iterator()
for (n in i) {
  println n
}
yeah yeah i know shaggled again

tef
May 30, 2004

-> some l-system crap ->

BonzoESC posted:

can't you just pass a block to the iterator instead of doing scrub poo poo like writing your own loops?

code:
i = (1..5).each #=> #<Enumerator: 1..5:each>
i.each {|n| puts n }
# prints:
# 1
# 2
# 3
# 4
# 5

I heard you liked duals so I put an observer in an iterator so you can observe with you iterate

GameCube
Nov 21, 2006

lol @ the existence of groovy

tef
May 30, 2004

-> some l-system crap ->

Mr Dog posted:

It wouldn't have been hard to retrofit a non-retarded behaviour in Python 3, either, just add a has_next or __has_next__ or whatever method to the iterator protocol and then keep the existing StopIteration behaviour as a genuine "you did something you weren't supposed to do, bonehead" exception, albeit a poorly named one. Even a __boolean__ coercion, while kinda terrible, would have been better than just leaving that wtf in its current form.

you must just be learning python because exceptions are used for things like this all the time.

Janin posted:

It's not possible to implement a has_next() method on an iterator, because whether there is a next value cannot be determined until you try to calculate it.

A better solution would be to have next() return a wrapper with .value and .has_value attributes, but this would have broken backwards compatibility.

basically, option types would be nice, but they aren't there, so deal with it.

multigl
Nov 22, 2005

"Who's cool and has two thumbs? This guy!"
If your python code isnt full of try/catch/finally blocks you're doing it wrong and making Guido cry.

Shaggar
Apr 26, 2006

tef posted:

you must just be learning python because exceptions are used for things like this all the time.


basically, option types would be nice, but they aren't there, so deal with it.

lol python is litterally the worst

Adbot
ADBOT LOVES YOU

tef
May 30, 2004

-> some l-system crap ->
you call next() repeatedly until there is an error


deal with it

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