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.
 
  • Locked thread
Posting Principle
Dec 10, 2011

by Ralp
vs 2012 would be great if it shipped with a functional compiler

Adbot
ADBOT LOVES YOU

Mr SuperAwesome
Apr 6, 2011

im from the bad post police, and i'm afraid i have bad news

Cocoa Crispies posted:

sublime is good because out of the box all you gotta do is pick a different color theme and it already works better than vim or emacs default config

i would have no problem paying $200 for an emacs config that worked as well as sublime defaults

different color theme? :getout3:

Shaggar
Apr 26, 2006

Jerry SanDisky posted:

vs 2012 would be great if it shipped with a functional compiler

I've never had a problem w/ it.

Elder Postsman
Aug 30, 2000


i used hot bot to search for "teens"

this client has terrible data so today i wrote a bad script to count annotations with bad geometry

code:
mxd = arcpy.mapping.MapDocument('Current')
layers = arcpy.mapping.ListLayers(mxd)

zerolength = 0

for lyr in layers:
	if lyr.isGroupLayer:
		if arcpy.Describe(lyr).featureType == "Annotation":
			arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION", ' "SHAPE_Length" = 0 ')
			result = int(arcpy.GetCount_management(lyr).getOutput(0))
			zerolength = zerolength + result
		
arcpy.AddMessage(zerolength)
it works, sort of

weird
Jun 4, 2012

by zen death robot
why would anyone use the default Emacs config

weird
Jun 4, 2012

by zen death robot

VanillaKid posted:

why would anyone use Emacs

double sulk
Jul 2, 2010

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Mr SuperAwesome posted:

different color theme? :getout3:

i have no idea what it ships with but i roll "Twilight" like some Team Edward motherfucker

CuddleChunks
Sep 18, 2004

OBAMA BIN LinkedIn posted:

same but replace 'text editor' with 'lovely 70 dollar program that does the exact same thing as programs 40 years its senior'

i'm mad as hell about sublime and i'm not gonna take it no more! :tizzy:


vim can suck a dick, BBEdit 4 lyfe! :c00l:

Squinty Applebottom
Jan 1, 2013

is bbedit retina yet

luchadornado
Oct 7, 2004

A boombox is not a toy!

Jerry SanDisky posted:

vs 2012 would be great if it shipped with a functional compiler

seems to compile my lovely code just fine, i dunno what this even means

uG
Apr 23, 2003

by Ralp
b-b-b-but i need an ide for my planggggggggggg

PleasingFungus
Oct 10, 2012
idiot asshole bitch who should fuck off

dur posted:

this client has terrible data so today i wrote a bad script to count annotations with bad geometry

code:
mxd = arcpy.mapping.MapDocument('Current')
layers = arcpy.mapping.ListLayers(mxd)

zerolength = 0

for lyr in layers:
	if lyr.isGroupLayer:
		if arcpy.Describe(lyr).featureType == "Annotation":
			arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION", ' "SHAPE_Length" = 0 ')
			result = int(arcpy.GetCount_management(lyr).getOutput(0))
			zerolength = zerolength + result
		
arcpy.AddMessage(zerolength)
it works, sort of

backseat scriptin'

code:
mxd = arcpy.mapping.MapDocument('Current')
layers = arcpy.mapping.ListLayers(mxd)

def layer_length(layer):
    arcpy.SelectLayerByAttribute_management(layer, "NEW_SELECTION", ' "SHAPE_Length" = 0 ')
    return int(arcpy.GetCount_management(layer).getOutput(0))

layer_lengths = sum(layer_length(layer) for layer in layers
                    if layer.isGroupLayer and "Annotation" == arcpy.Describe(layer).featureType)
arcpy.AddMessage(layer_lengths)
haven't worked with arcpy so not sure what's going on with the ' "SHAPE_Length" = 0 ' line, looks horrifying though

hth :tipshat:

fakeedit: this is a bad post but w/e :justpost:

Posting Principle
Dec 10, 2011

by Ralp

Helicity posted:

seems to compile my lovely code just fine, i dunno what this even means

it means Herb loving Sutter works for them and they still don't have initializer lists

FamDav
Mar 29, 2008
whenever someone is having compiler issues in CoC and they mention they're using vs i just roll my eyes into the back of my head and imagine i'm on a beach

Elder Postsman
Aug 30, 2000


i used hot bot to search for "teens"

PleasingFungus posted:

backseat scriptin'

code:
mxd = arcpy.mapping.MapDocument('Current')
layers = arcpy.mapping.ListLayers(mxd)

def layer_length(layer):
    arcpy.SelectLayerByAttribute_management(layer, "NEW_SELECTION", ' "SHAPE_Length" = 0 ')
    return int(arcpy.GetCount_management(layer).getOutput(0))

layer_lengths = sum(layer_length(layer) for layer in layers
                    if layer.isGroupLayer and "Annotation" == arcpy.Describe(layer).featureType)
arcpy.AddMessage(layer_lengths)

haven't worked with arcpy so not sure what's going on with the ' "SHAPE_Length" = 0 ' line, looks horrifying though

hth :tipshat:

fakeedit: this is a bad post but w/e :justpost:

yah it does


The shape length = 0 thing just selects features from layer that have no geometry. The total count of those features (from like 25 different feature classes) should equal the number of errors I'm getting from this other process. it does so that's real good.

Dirk Pitt
Sep 14, 2007

haha yes, this feels good

Toilet Rascal

Jerry SanDisky posted:

vs 2012 would be great if it shipped with a functional compiler

:what:

Squinty Applebottom
Jan 1, 2013

VS2012 + C# + Resharper is literally the holy triumvirate of programming

coaxmetal
Oct 21, 2010

I flamed me own dad
when did sulk start thinking he had any ground to stand on? Looks like hes been talking some poo poo in this thread. Who is in charge here? Someone needs to clean up this mess.

Squinty Applebottom
Jan 1, 2013

coaxialcable for mod

Stringent
Dec 22, 2004


image text goes here
safe zone, no mods allowed :twisted:

Nomnom Cookie
Aug 30, 2009



Ronald Raiden posted:

when did sulk start thinking he had any ground to stand on? Looks like hes been talking some poo poo in this thread. Who is in charge here? Someone needs to clean up this mess.

someone gave him a paycheck so his ego got all puffy. inflamed zit ego

Stringent
Dec 22, 2004


image text goes here

Nomnom Cookie posted:

someone gave him a paycheck so his ego got all puffy. inflamed zit ego

it's ok, he's hating on ruby and cheering for the bruins so he's p much got his bases covered as far as yospos is concerned

Squinty Applebottom
Jan 1, 2013

ya except ruby owns and rails is the best web framework

Stringent
Dec 22, 2004


image text goes here
oh now you've done it

Posting Principle
Dec 10, 2011

by Ralp

perfectly cromulent code doesn't compile because microsoft is years behind apple and foss neckbeards

C++ code:
int main() {
	auto foo = vector<string>{"visual", "c++", "doesnt", "work"};
	copy(begin(foo), end(foo), ostream_iterator<string>{cout, " "});
}

Shaggar
Apr 26, 2006

Jerry SanDisky posted:

perfectly cromulent code doesn't compile because microsoft is years behind apple and foss neckbeards

C++ code:
int main() {
	auto foo = vector<string>{"visual", "c++", "doesnt", "work"};
	copy(begin(foo), end(foo), ostream_iterator<string>{cout, " "});
}

that's not valid code

Nomnom Cookie
Aug 30, 2009



Jerry SanDisky posted:

perfectly cromulent code doesn't compile because microsoft is years behind apple and foss neckbeards

C++ code:
int main() {
	auto foo = vector<string>{"visual", "c++", "doesnt", "work"};
	copy(begin(foo), end(foo), ostream_iterator<string>{cout, " "});
}

what is this you posted. is it vomit

Shaggar
Apr 26, 2006
wahhh wahhhh wahhhh Microsoft doesn't use my highly specific special needs compiler!! wahhh im autistic wahh wahhh I cant use c# cause im a dumb baby wahhh wahhh

Posting Principle
Dec 10, 2011

by Ralp

Shaggar posted:

that's not valid code

according to a microsoft architect it is

Nomnom Cookie
Aug 30, 2009



shoulda used autotools

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Nomnom Cookie posted:

someone gave him a paycheck so his ego got all puffy. inflamed zit ego

did he ever get a paycheck for nyc money or is he still working for alabama php money?

Stringent
Dec 22, 2004


image text goes here

Cocoa Crispies posted:

alabama php money

mods

Bloody
Mar 3, 2013

Cocoa Crispies posted:

alabama php money

excellent three of my trigger words

Legitimate Pape
Sep 6, 2012

by T. Finninho

Cold on a Cob posted:

i'm a terrible coder but everyone i work with is worse (i don't work at google or apple btw)

pretty much me too

X-BUM-RAIDER-X
May 7, 2008

OBAMA BIN LinkedIn posted:

we have 2 platforms that our c++ code has to compile on before it gets into production, one of which uses an ancient gcc extension that still complains if u don't specify a compile time const value when u initialise arrays.

holy poo poo

bad programmer (me) expose time

C++ standard requires compile time constants for all arrays wow this is embarassing gently caress u g++ for misleading me for years

Mr SuperAwesome
Apr 6, 2011

im from the bad post police, and i'm afraid i have bad news

polpotpi posted:

VS2012 + C# + Resharper is literally the holy triumvirate of programming

Mr SuperAwesome
Apr 6, 2011

im from the bad post police, and i'm afraid i have bad news
this new xamarin + parse stuff looks amazing, brb building a million generic CRUD apps a second all in C# :toot:

Posting Principle
Dec 10, 2011

by Ralp

OBAMA BIN LinkedIn posted:

holy poo poo

bad programmer (me) expose time

C++ standard requires compile time constants for all arrays wow this is embarassing gently caress u g++ for misleading me for years

fortunately c++ is a bit more lenient about what it considers a constant expression

Adbot
ADBOT LOVES YOU

X-BUM-RAIDER-X
May 7, 2008
c++14 has VLAs and std::dynarray as a wrapper around VLAs but implementations don't have to allocate them on the stack

must be cool not knowing whether your vla has been declared on the heap or not

C++14 is bad

  • Locked thread