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
Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

Shaggar posted:

no one needs a lisp

Adbot
ADBOT LOVES YOU

MononcQc
May 29, 2007

Gazpacho posted:

Every js function that has a fixed arity of 1 is compatible with JS's map, parseInt is not such a function and there is nothing inherently wrong about that

The problem is that people reasonably expect map to pass only one argument because every non-js language in the world pretty much does it that way so that if you use a default argument, it won't get overwritten by garbage.

parseInt is a function with two arguments, but that doesn't mean all other >1 argument functions do not use default arguments. If you're so disappointed with parseInt being used, use, say 'Array' as a constructor to turn a bunch of items into arrays:

JavaScript code:
>>> ["abc","def"].map(Array);
[["abc", 0, ["abc", "def"]], ["def", 1, ["abc", "def"]]]
Yay! gotta wrap it in function(x) { return Array(x); } to do it!

If it turns out Array has a signature that conflicts there (by default it accepts a length but it looks happy to use a string and wrap it), define your own function that may or may not use more than one arguments for options and get the mistake shown to you.

Either be strict about the arities of stuff you expect, or make a map that is not confusing compared to every other language.

MononcQc fucked around with this message at 17:23 on Mar 19, 2014

JewKiller 3000
Nov 28, 2006

by Lowtax

MononcQc posted:

JavaScript code:
>>> ["abc","def"].map(Array);
[["abc", 0, ["abc", "def"]], ["def", 1, ["abc", "def"]]]

holy poo poo

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
again the Array constructor is working as documented, which admittedly is problematic because the length constructor is poorly isolated from the varargs constructor, but RTFMDN and you won't have that problem

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
advance cultural marxism throughout programming, overthrow the bourgeois assumptions of metropolitan academics, let type and arity confusion reign

MononcQc
May 29, 2007

or you know, just write a map function that isn't retarded in the first place.

MononcQc
May 29, 2007

"hm yes surely people who want to apply a function to every element of an array also need an index and the list of all elements passed in the array most of the time, despite what decades of prior art in functional programming proved." -- JS people who implemented maps.

"Agreed, great choice!" - Gazpacho

Shaggar
Apr 26, 2006
if you ever use or have to think about the map function in javascript you are doing things wrong

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

MononcQc posted:

"hm yes surely people who want to apply a function to every element of an array also need an index and the list of all elements passed in the array most of the time, despite what decades of prior art in functional programming proved." -- JS people who implemented maps.
agreed, great choice

jiggerypokery
Feb 1, 2012

...But I could hardly wait six months with a red hot jape like that under me belt.

Will Go tell us what page of this thread python stopped being relevant?

Bloody
Mar 3, 2013

has python ever been relevant?

Shaggar
Apr 26, 2006
no

HORATIO HORNBLOWER
Sep 21, 2002

no ambition,
no talent,
no chance

Shaggar posted:

im still running tomcat 7 + java 6. probably never going to upgrade either since most of my stuff is moving to c#

i think i'm going to be doing java for the rest of my life. oh well could always be worse

Shaggar
Apr 26, 2006
yeah I like java and c# but vs has dark color theme and eclipse doesn't and that's like 99% of my decision to use c# over java right now.

Shaggar
Apr 26, 2006
although intellisense is total loving garbage

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Shaggar posted:

although intellisense is total loving garbage

Jesus christ you inhuman loving piece of poo poo.

gently caress you.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

e: not the games thread

Shaggar
Apr 26, 2006
its seriously so bad. I refuse to buy resharper or codeassist or whatever to add basic functionality to vs.

HORATIO HORNBLOWER
Sep 21, 2002

no ambition,
no talent,
no chance

Shaggar posted:

yeah I like java and c# but vs has dark color theme and eclipse doesn't and that's like 99% of my decision to use c# over java right now.

recogneyes theme for eclipse theme plugin is the best

my eye literally burn every time i go over to a coworkers machine and they have the default black on white color scheme. poo poo is completely loving illegible

Notorious b.s.d.
Jan 25, 2003

by Reene

Gazpacho posted:

again the Array constructor is working as documented, which admittedly is problematic because the length constructor is poorly isolated from the varargs constructor, but RTFMDN and you won't have that problem

if your language differs from everything else on the planet without adding anything, nobody loving cares about your documentation

whether or not your perverse fuckup snowflake is documented is not the core problem

the problem is that it is badly designed. correctly documenting the bad design is just strapping a helmet to your special needs child

Notorious b.s.d.
Jan 25, 2003

by Reene
i mean, it could be worse. php is badly designed AND the documentation is frequently misleading or wrong.

i guess js is still beating somebody on the short bus

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Shaggar posted:

yeah I like java and c# but vs has dark color theme and eclipse doesn't and that's like 99% of my decision to use c# over java right now.

seriously, try intellij. it's good and has a dark theme

it's called "darcula"

Shaggar
Apr 26, 2006

HORATIO HORNBLOWER posted:

recogneyes theme for eclipse theme plugin is the best

my eye literally burn every time i go over to a coworkers machine and they have the default black on white color scheme. poo poo is completely loving illegible


theres a vs dark theme for eclipse that colors text like vs but the problem is it only themes text and then also only in some controls. so you end up with bright rear end window chrome and then bright rear end project explorer and dark code window or whatever. its awful so I just use the defaults. the ironing being that eclipse swt spent so much time binding all its themes to native controls that it looks like a native app, but that also means you cant customize it. whereas vs they just said gently caress it we're doing it in .net gently caress your ui guidelines.

I seriously wish Microsoft had gone w/ the vs or zune styling for UI chrome in win8 but instead its like a weird inbetween the vs theme and class windows.

^if I were doing more java I might consider it. according to their webzone intellij doesn't do javaee in the free version so I'd have to convince the bossman to shell out some cash for it. eclipse works well enough aside from the theme stuff so its not really worth it.

FamDav
Mar 29, 2008

Shaggar posted:

theres a vs dark theme for eclipse that colors text like vs but the problem is it only themes text and then also only in some controls. so you end up with bright rear end window chrome and then bright rear end project explorer and dark code window or whatever. its awful so I just use the defaults. the ironing being that eclipse swt spent so much time binding all its themes to native controls that it looks like a native app, but that also means you cant customize it. whereas vs they just said gently caress it we're doing it in .net gently caress your ui guidelines.

I seriously wish Microsoft had gone w/ the vs or zune styling for UI chrome in win8 but instead its like a weird inbetween the vs theme and class windows.

^if I were doing more java I might consider it. according to their webzone intellij doesn't do javaee in the free version so I'd have to convince the bossman to shell out some cash for it. eclipse works well enough aside from the theme stuff so its not really worth it.

lol if your boss aint droppin hundos on you because you bring in millions

Notorious b.s.d.
Jan 25, 2003

by Reene

Shaggar posted:

^if I were doing more java I might consider it. according to their webzone intellij doesn't do javaee in the free version so I'd have to convince the bossman to shell out some cash for it. eclipse works well enough aside from the theme stuff so its not really worth it.

istr the free version will do a ton of stuff with java ee. it just won't help you with context-sensitive autocomplete in your spring xml etc

but that was a long time ago

it is worth trying anyway

more like dICK
Feb 15, 2010

This is inevitable.

Shaggar posted:

theres a vs dark theme for eclipse that colors text like vs but the problem is it only themes text and then also only in some controls. so you end up with bright rear end window chrome and then bright rear end project explorer and dark code window or whatever. its awful so I just use the defaults. the ironing being that eclipse swt spent so much time binding all its themes to native controls that it looks like a native app, but that also means you cant customize it. whereas vs they just said gently caress it we're doing it in .net gently caress your ui guidelines.

I seriously wish Microsoft had gone w/ the vs or zune styling for UI chrome in win8 but instead its like a weird inbetween the vs theme and class windows.

^if I were doing more java I might consider it. according to their webzone intellij doesn't do javaee in the free version so I'd have to convince the bossman to shell out some cash for it. eclipse works well enough aside from the theme stuff so its not really worth it.

https://marketplace.eclipse.org/content/eclipse-moonrise-ui-theme I use this when I'm using eclipse (for Ada)

Shaggar
Apr 26, 2006
yeah ive tried that but I get the blue/white window chrome in spots like the file menu where the color is determined by the OS

more like dICK
Feb 15, 2010

This is inevitable.
Oh right, Windows.

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison
i use solarized dark in intellij and it's nice

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison
also i should have listened to shaggar before, java is great

Sapozhnik
Jan 2, 2005

Nap Ghost

uncurable mlady posted:

also i should have listened to shaggar before, java is great

ya it really is

Cybernetic Vermin
Apr 18, 2005

groovy is p. dubious though and he undermines his argument a bit by tossing that out the same breath. clojure really is a better way to go

Shaggar
Apr 26, 2006
lisp is terrible. groovy is what normal people should be using because you can pretty much just write java in it.

Shaggar
Apr 26, 2006
like if your need is a scripting language for java, using groovy is a no brainer. its exactly what 99.99999% of java developers will want.

if your needs are special cause of autism then go ahead and use clojure.

b0lt
Apr 29, 2005

Shaggar posted:

like if your need is a scripting language for java, using groovy is a no brainer. its exactly what 99.99999% of java developers will want.

if your needs are special cause of autism then go ahead and use clojure.

"I can honestly say if someone had shown me the Programming Scala book by Martin Odersky, Lex Spoon & Bill Venners back in 2003 I'd probably have never created Groovy."

Bloody
Mar 3, 2013

dark text + light background gives superior comprehension and less eye strain and poo poo, stop using 1337 h4x0r color schemes they are bad for you in every way

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Bloody posted:

dark text + light background gives superior comprehension and less eye strain and poo poo, stop using 1337 h4x0r color schemes they are bad for you in every way

are you sure you're not insane? big bright backgrounds make my eyes hurt

corran__horn
Aug 19, 2013

Notorious b.s.d. posted:

if your language differs from everything else on the planet without adding anything, nobody loving cares about your documentation

whether or not your perverse fuckup snowflake is documented is not the core problem

the problem is that it is badly designed. correctly documenting the bad design is just strapping a helmet to your special needs child

mysql_real_escape_string is obviously how you should handle screwing up string escapes. Why would you ever think that you should use mysql_escape_string? Also database parametrization is hard, so screw that.

Nomnom Cookie
Aug 30, 2009



Notorious b.s.d. posted:

istr the free version will do a ton of stuff with java ee. it just won't help you with context-sensitive autocomplete in your spring xml etc

but that was a long time ago

it is worth trying anyway

free version doesn't support WARs. i just spent the money for intellij, its worth it and screw convincing every boss to buy me intellij

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

prefect posted:

are you sure you're not insane? big bright backgrounds make my eyes hurt

lower ur brightness

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