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
coaxmetal
Oct 21, 2010

I flamed me own dad

gucci void main posted:

so just backbone fits that profile then i guess, i remember when it was cool and now it's not

usually usuable and cool are opposite ends of a spectrum. Or at least hip new web garbage isn't usable or stable.

Adbot
ADBOT LOVES YOU

coaxmetal
Oct 21, 2010

I flamed me own dad

prefect posted:

semi-serious question: what's the serious engineer-scientist opinion of things like ip, tcp, and http? are those masterpieces of engineering design, or are there chunks of them that are the equivalent of spit and baling wire, things that work despite themselves?

tcp is pretty baller

luchadornado
Oct 7, 2004

A boombox is not a toy!

use backbone/knockout/angular/whateverthefuck.js and move on with it. if you're thinking about javascript so much you're getting mad at individual libraries you should probably spend more time coding

unless youre working in node - then youre right hosed

coaxmetal
Oct 21, 2010

I flamed me own dad
no, libraries are what define us as people. If we don't use the hip new ones we arent' cool. Sulk is right to check with this thread before using any framework or library. We are the arbiters of lovely code.

CuddleChunks
Sep 18, 2004

Ronald Raiden posted:

no, libraries are what define us as people. If we don't use the hip new ones we arent' cool. Sulk is right to check with this thread before using any framework or library. We are the arbiters of lovely code.

i'm teaching myself some python to automate a little task at home. i hope this isn't offensive to the code gods. :ohdear:

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

how 2012 of you, dart is the only allowed language (because no one uses it)

coaxmetal
Oct 21, 2010

I flamed me own dad
god is dead. But you are good, python is a good language for good people to use.

Elder Postsman
Aug 30, 2000


i used hot bot to search for "teens"

python owns

luchadornado
Oct 7, 2004

A boombox is not a toy!

Ronald Raiden posted:

python is a good language for good people to use.

hubris.height
Jan 6, 2005

Pork Pro

dur posted:

python owns

JewKiller 3000
Nov 28, 2006

by Lowtax
code:
>>> def python():
...   this_language = "su"
...   def broken(x):
...     this_language = this_language + x
...   return broken("cks")
... 
>>> python()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 5, in python
  File "<stdin>", line 4, in broken
UnboundLocalError: local variable 'this_language' referenced before assignment

hubris.height
Jan 6, 2005

Pork Pro
why not use += x

JewKiller 3000
Nov 28, 2006

by Lowtax
go ahead, you'll get the same error

and yes i know how to fix this but it still sucks

coaxmetal
Oct 21, 2010

I flamed me own dad
congrats! you found an edge case in a programming language where it doesn't behave as one might expect, if you don't understand how local variable scope works. that certainly invalidates the whole language.

actually if you really really want to do that, in python 3 you can say 'nonlocal your_shitty_variable' at the top of the function.

Elder Postsman
Aug 30, 2000


i used hot bot to search for "teens"

i made this today

code:
import arcpy

mxd = arcpy.mapping.MapDocument('Current')
layers = arcpy.mapping.ListLayers(mxd)
fishnet = arcpy.GetParameterAsText(0)

totalmiles = 0

for lyr in layers:
	if lyr.isGroupLayer and lyr.name == 'Mileage':
		for sublayer in lyr:
			if arcpy.Describe(sublayer).dataElement.dataType == "FeatureClass" and arcpy.Describe(sublayer).shapeType == "Polyline":
				arcpy.SelectLayerByLocation_management(sublayer, "INTERSECT", fishnet, "", "NEW_SELECTION")
				length = 0
				for row in arcpy.SearchCursor(sublayer):
					feature = row.shape
					length += feature.length
					totalmiles += feature.length
				arcpy.AddMessage(sublayer.name + ": \t" + str(length/5280))
		
arcpy.AddMessage("Total mileage: \t" + str(totalmiles/5280))
it saves a lot of time. could save more if i dumped it to csv but whatever

weird
Jun 4, 2012

by zen death robot
Python looks really bad with eight space tabs

uG
Apr 23, 2003

by Ralp
all you python scrubs are going to be programming perl6 in 10 years (if you havent killed urself by then)

AppleCobbler
Feb 8, 2003
remember that time I was just chilling out and definitely not having a massive meltdown? right guys? guys??? :laugh:

OBAMA BIN LinkedIn posted:

lmao if you are intimitely knowledgable about when and how your school's systems fail

my schools systems started failing me when i was in 2nd grade

X-BUM-RAIDER-X
May 7, 2008
just saying

JavaScript is a bad language

this is absolutely not up for debate

Bloody
Mar 3, 2013

uG posted:

all you python scrubs are going to be programming perl6 in 10 years (if you havent killed urself by then)

this but julia lang

BONGHITZ
Jan 1, 1970

textwrangler


more like textmangler, am i right?

Squinty Applebottom
Jan 1, 2013

BONGHITZ posted:

textwrangler


more like textmangler, am i right?

No. flick off. I can't. Relieve you thought that was a good idea to post.

Doc Block
Apr 15, 2003
Fun Shoe

BONGHITZ posted:

textwrangler


more like textmangler, am i right?

Nope, TextWrangler is a perfectly good text editor if you're somehow a Rule 36er (the non-poor best text editor is BBEdit, the paid version of TextWrangler)

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

polpotpi posted:

java is the only language versatile enough to be used on the fronted and backend. the goddamn internet runs on java. you can get paid to write code in java.

i dunno how anyone can not like shaggaring

dur posted:

python owns

JewKiller 3000
Nov 28, 2006

by Lowtax

OBAMA BIN LinkedIn posted:

just saying

JavaScript is a bad language

this is absolutely not up for debate

you are correct, but javascript did get closures right, and if you're only gonna do one thing right in your programming language, that's a good one to pick

therefore javascript is better than python. ofc it is still a bad language

BONGHITZ
Jan 1, 1970

polpotpi posted:

you thought

lol

Bloody
Mar 3, 2013

JewKiller 3000 posted:

javascript is better than python

lol way to set the bar high

Doc Block
Apr 15, 2003
Fun Shoe
hey guys this honorary p-lang is better than that actual p-lang!

coaxmetal
Oct 21, 2010

I flamed me own dad
not sure whats wrong with one programming lang being better than another. Though javascript isn't better than python. Javascript isn't really better than anything. Except PHP I guess.

MeruFM
Jul 27, 2010
sorry python is the master messiah language
all are below it

especially C-langs unless they're used in python modules

JewKiller 3000
Nov 28, 2006

by Lowtax

Ronald Raiden posted:

not sure whats wrong with one programming lang being better than another. Though javascript isn't better than python. Javascript isn't really better than anything. Except PHP I guess.

python and javascript are basically the same language with slightly different syntax. hurrr let's make an object oriented language, where by "object" i actually mean "hash table mapping string keys to arbitrary values, with a pointer to a parent hash table"

when comparing two pieces of unmitigated dynamic garbage such as python and javascript, to find a meaningful contrast, it is necessary to consider details like whether or not lexical scoping is implemented properly. or, as you put it, "edge cases"

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

JewKiller 3000 posted:

Shaggar was right

coaxmetal
Oct 21, 2010

I flamed me own dad

JewKiller 3000 posted:

python and javascript are basically the same language with slightly different syntax. hurrr let's make an object oriented language, where by "object" i actually mean "hash table mapping string keys to arbitrary values, with a pointer to a parent hash table"

when comparing two pieces of unmitigated dynamic garbage such as python and javascript, to find a meaningful contrast, it is necessary to consider details like whether or not lexical scoping is implemented properly. or, as you put it, "edge cases"

ok, i'll bite. If you think they are they same language, you have probably never used either, and also

actually, gently caress it. If you are dumb enough to say that who the gently caress cares. Consider me trolled.

JewKiller 3000
Nov 28, 2006

by Lowtax
thanks for the engaging conversation! i hope you continue to post

Nomnom Cookie
Aug 30, 2009



go does closures properly *and* has a really novel and useful take on OOP. you can think of it as "C done right" or alternately "javascript made by people who have a clue"

it even has language support for maps (that's a computer scientist way of saying "hash table" for you p-langers) so if you're coming from a bad language you can just dive right in and poo poo out code like nobody's business

JewKiller 3000
Nov 28, 2006

by Lowtax
if you want to recommend languages made/used by people who have a clue, i don't think you're welcome in this thread :colbert:

coaxmetal
Oct 21, 2010

I flamed me own dad

JewKiller 3000 posted:

if you want to recommend languages made/used by people who have a clue, i don't think you're welcome in this thread :colbert:

that explains why you tried to run me out when I mentioned python

JewKiller 3000
Nov 28, 2006

by Lowtax
you're welcome to your opinion, but loving say something, not just "HURR PYTHON GOOD LANGUAGE DURR SPAM EGGS HEIL PEP 8"

perhaps you could list the things you like about the python language that other languages do not provide?

tef
May 30, 2004

-> some l-system crap ->

prefect posted:

semi-serious question: what's the serious engineer-scientist opinion of things like ip, tcp, and http? are those masterpieces of engineering design, or are there chunks of them that are the equivalent of spit and baling wire, things that work despite themselves?

the best design decision in tcp was to split it into ip and tcp. tcp itself is a good idea: pretend a packet switching network is really a phone network, and making calls between computers, but early tcp also caused network collapse (congestion control), it was vulnerable (syn flooding) and has a number of just unused or broken features (tcp urgent).


the real problem with tcp is that it is fossilized. now it's hard to change tcp because of nat shitboxes + smart routers, as well as being burnt into kernels, instead of in userland. applications can't control tcp flow or congestion, so many flock to udp to get what they want (like not saturating bandwidth)

tcp is really a stream atop of messages, but people tend to send messages over tcp, so they kinda end up reimplementing flow control + acks + timeout over tcp. many attempts to shoehorn a message protocol over tcp also suffer from a lack of multiplexing as well as head of line blocking too. tcp in some ways is too high an abstraction for messaging protocols.


for example: http and websockets. http can't be multiplexed, and pipelining isn't great as a substitute. websockets has to implement acks, timeout and flow control atop tcp too. http itself isn't really a masterpiece of design as implemented, but the intentions behind it are rather neat.

instead of abstracting things as special sockets, or a series of weird and ad-hoc methods, http works more like a filesystem, and through this allows proxies, caches, loadbalancers, as well as gateways to non http services. http is a a badly implemented protocol that makes the web work so well. still, it has weird things like line folding and a series of workarounds for older versions.


meanwhile in opposition to tcp/ip there is this idea of named data networking/content addressable networks, the idea that sometimes getting a file is more important than talking to a specific computer. bittorrent makes an excellent example of doing this end-to-end/at the application layer without having to have new routers. instead of asking for a file on a given computer (i.e a url), you ask nearby computers for the file you're after.

Adbot
ADBOT LOVES YOU

tef
May 30, 2004

-> some l-system crap ->
http/tcp/ip is just the most recent in a long line of good ideas executed badly and misused

  • Locked thread