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
compuserved
Mar 20, 2006

Nap Ghost
jfc how did i go four years without seeing shaggar's masterpiece?

edit: nsfw

https://www.youtube.com/watch?v=kLO1djacsfg

Adbot
ADBOT LOVES YOU

Stringent
Dec 22, 2004


image text goes here
Would never have guessed Shaggar's real name is William Windows.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Stringent posted:

Would never have guessed Shaggar's real name is William Windows.

It seems obvious in retrospect, tbh

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
Resharing this truly hilarious trailer video, just because Java is really not one of my favourite languages (except for certain toy problems including GUI). And since this is Norwegian, I do happen to understand it without its subtitling. How about you?

Sapozhnik
Jan 2, 2005

Nap Ghost

56k milli posted:

jfc how did i go four years without seeing shaggar's masterpiece?

edit: nsfw

https://www.youtube.com/watch?v=kLO1djacsfg

i don't think i want to see any of the people in this picture naked so i'm gonna give it a pass

Stringent
Dec 22, 2004


image text goes here

Mr Dog posted:

i don't think i want to see any of the people in this picture naked so i'm gonna give it a pass

how wrong you are

https://www.youtube.com/watch?v=kLO1djacsfg&t=152s

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Mr Dog posted:

i don't think i want to see any of the people in this picture naked so i'm gonna give it a pass

it's not really nsfw, it just looks like it for a couple of seconds

ahmeni
May 1, 2005

It's one continuous form where hardware and software function in perfect unison, creating a new generation of iPhone that's better by any measure.
Grimey Drawer
is JavaScript supposed to be functional or just dumb
why is the "object" implementation so bad
why is for (index in array) so bad???
why does it iterate through all members of an object, making things like adding a function to an array prototype useles if you ever use it
who thought that would be useful
why is array[array.length] faster than array.push
why can I not pass by reference

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY

ahmeni posted:

just dumb

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY
if you've got a choice, use a wrapper language

(typescript is the best of the three ive played with, the other two being coffeescript and dart)

Sapozhnik
Jan 2, 2005

Nap Ghost
whatever happened to gwt anyway, that seemed like a good idea but apparently it's OMG like, soooo last Tuesday

wrap the worst language (JavaScript) by writing your code in the best language (Java) and then compiling down

(i think this-Tuesday is node.js because people somehow forgot that javascript is loving terrible, also because programming a webserver as if it was a microcontroller with only enough RAM for one stack is totally hardcore!!)

seiken
Feb 7, 2005

hah ha ha
GWT turned out to be a horrendous frustrating nightmare for a bunch of a reasons

  • whether or not you think Java is a good language (it's not), it's certainly a poor choice for compiling down to Javascript, because it wasn't designed for that and nothing really maps cleanly. there are language features and huge swaths of libraries that aren't compatible with GWT for whatever reason so you can't use them in any code that the frontend needs access to
  • the Java boilerplate and protracted Java -> Javascript compile time means you don't really get fast iteration speed any more which is generally the only thing that makes frontend development bearable
  • don't like debugging Javascript because it doesn't make sense as a language? have fun debugging the insane results of running whole bunch of wankery Java code through the Javascript compiler

multigl
Nov 22, 2005

"Who's cool and has two thumbs? This guy!"
sorry you can't hang with the grown ups, javascript is the past, present and future

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Mr Dog posted:

whatever happened to gwt anyway, that seemed like a good idea but apparently it's OMG like, soooo last Tuesday

wrap the worst language (JavaScript) by writing your code in the best language (Java) and then compiling down

(i think this-Tuesday is node.js because people somehow forgot that javascript is loving terrible, also because programming a webserver as if it was a microcontroller with only enough RAM for one stack is totally hardcore!!)

GWT is still going strong. You just can't expect the HN community to get excited about Java. It's also a terrible idea.

Shaggar
Apr 26, 2006
gwt was a good idea at the time cause no developer wanted to subject themselves to javascript. now theres an unending pool of web "developers" you can contract to excrete some javascript as you need it so gwt isn't needed.

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

ahmeni posted:

is JavaScript supposed to be functional or just dumb
why is the "object" implementation so bad
why is for (index in array) so bad???
why does it iterate through all members of an object, making things like adding a function to an array prototype useles if you ever use it
who thought that would be useful
why is array[array.length] faster than array.push
why can I not pass by reference

it was designed in 10 days

actually when you consider that it could have been much worse

Shaggar
Apr 26, 2006

ahmeni posted:

is JavaScript supposed to be functional or just dumb
why is the "object" implementation so bad
why is for (index in array) so bad???
why does it iterate through all members of an object, making things like adding a function to an array prototype useles if you ever use it
who thought that would be useful
why is array[array.length] faster than array.push
why can I not pass by reference

nothing related to any of those questions was a consideration during the development of javascript. javascript was created to pop up windows and close windows and to make alert messages appear. then a bunch of people started abusing it to do other stuff it was never intended for.

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?
everyone look up wmlscript and imagine if that was what we had to work with

ahmeni
May 1, 2005

It's one continuous form where hardware and software function in perfect unison, creating a new generation of iPhone that's better by any measure.
Grimey Drawer

HappyHippo posted:

everyone look up wmlscript and imagine if that was what we had to work with

everything related to WAP is basically the worst and i lust for its death

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

iirc, the visibility of prototype properties comes out of how the first DOM bindings were written (computed or reflected properties were only defined on the prototype to save memory). like many things in JS, it was then frozen by success. somewhere in mozilla's bug system there is a record of the carnage I wrought when I accidentally made them not enumerated under the JIT, for a couple of days. (sure sped up the benchmark I was targeting, though!)

also like many things in JS, it got better over time, so you can defineProperty non-enumerate things on the prototype, and Object.keys to just get the directly-defined properties, or hasOwnProperty to filter inside a classic for-in loop. ES6 (and its shims) provides better iteration sugar, at long last. we had them in firefox in 2007, but it was too big a bite for the rest of ES5-né-ES3.1's committee to swallow.

ahmeni
May 1, 2005

It's one continuous form where hardware and software function in perfect unison, creating a new generation of iPhone that's better by any measure.
Grimey Drawer
when is es6 coming
this language is just too close to the metal for me

MrMoo
Sep 14, 2000

ahmeni posted:

why is array[array.length] faster than array.push

it isn't in v8, there is tedious micro-benchmark somewhere.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
I used to be really excited about ES6, but now I'm disappointed in it. It's a big spec, nobody's sure what's going to happen to it, and it's being plonked into the biggest web runtime of all time.

I wish we had an ES5.2 that had iterator sugar, destructuring assignment, and let/const bindings. And the updated stdlib with Map, WeakMap, Promise, Proxy and proxy. And then maybe generators. Really, that's all I need.

The rest of ES6 is insane. Module system is overcomplicated and will mean we get CommonJS modules alongside ES6 modules alongside AMD modules alongside Google modules, alongside blah blah it's not a good idea. Templated strings seem cool, but they might be a bit too much on the sugar or magic side of things.

Make one of those cool transpilers, then get a team inside Yahoo and a team inside Google to dogfood templated strings. I don't want that poo poo in direct-to-spec garbage when nobody's written code that uses it yet, and nobody knows how it might be the next JS feature everybody rants about.

R&D is R&D. R&D helps you develop a product, but don't confuse R&D output with the product.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

MrMoo posted:

it isn't in v8, there is tedious micro-benchmark somewhere.

if Array methods aren't self-hosted, the thunk out to the host ABI and function overhead usually dominate. if they are self-hosted, then a good compiler can see through the function call and then they're basically equivalent.

you can also just specialize if you're about to call that native, but it's hard to actually optimize away the whole difference: you need to perform or fake the scope traversal, and unless you hoist that guard out of the loop you'll incur some overhead, even if small.

it would be surprising if it were the other way around, certainly, since push has to do strictly more work as defined, and can't possibly do less.

Suspicious Dish posted:

Make one of those cool transpilers, then get a team inside Yahoo and a team inside Google to dogfood templated strings. I don't want that poo poo in direct-to-spec garbage when nobody's written code that uses it yet, and nobody knows how it might be the next JS feature everybody rants about.

quasi-literals have been in demand for a long time, and not just because they address the format string lack and provide much-needed sugar for localization. I don't know what a transpiler for es6 syntax would really tell you that isn't well known. there have been libraries doing substitution along these lines (though clumsily) for some time, more modern transpilers like the react team's jsx (which is very much used in high-volume production), and even lesson from other mainstream languages like C++11's custom literals. if it makes IBM shut up about syntactic support for decimal it's worth the price of admission right there.

I agree that the module design might be trying to thread too many needles, but I think the language needs modularity support at a core level, so I don't know that it's avoidable.

at least nobody is trying to bring back E4X! (right?)

Subjunctive fucked around with this message at 04:45 on Sep 10, 2014

gonadic io
Feb 16, 2011

>>=
code:
interface TheInterface {
    static int theField = 0;
    static void theMethod() {}
}
 
class TheClass implements TheInterface {
    static {
 
        // Works since Java 1.0
        int i = theField;
 
        // Doesn't work
        theMethod();
 
        // Do this instead
        TheInterface.theMethod();
    }
}

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

well you see, that makes sense when you consider that

cowboy beepboop
Feb 24, 2001

AlsoD posted:

code:
interface TheInterface {
    static int theField = 0;
    static void theMethod() {}
}
 
class TheClass implements TheInterface {
    static {
 
        // Works since Java 1.0
        int i = theField;
 
        // Doesn't work
        theMethod();
 
        // Do this instead
        TheInterface.theMethod();
    }
}

uhhh

Zaxxon
Feb 14, 2004

Wir Tanzen Mekanik

Suspicious Dish posted:

I wish we had an ES5.2 that had iterator sugar, destructuring assignment, and let/const bindings. And the updated stdlib with Map, WeakMap, Promise, Proxy and proxy. And then maybe generators. Really, that's all I need

The rest of ES6 is insane.

coroutines look pretty nice.

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Zaxxon posted:

coroutines look pretty nice.

unlike your posting!

Brain Candy
May 18, 2006

AlsoD posted:

code:
interface TheInterface {
    static int theField = 0;
    static void theMethod() {}
}

error: modifier static not allowed here
static void theMethod() {}

trap sprung, i guess

gonadic io
Feb 16, 2011

>>=

Brain Candy posted:

error: modifier static not allowed here
static void theMethod() {}

trap sprung, i guess

oh i didn't test it :/ i even removed the link to the article because it turned into shilling for their java library or preprocessor or whatever within a paragraph.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

other than that, though, it was a great post

brap
Aug 23, 2004

Grimey Drawer
an interface with static members :psyduck:

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
hosed around in the lab experimenting today instead of working on either of my projects and wound up fixing two bugs by accident :toot:

Ghaz
Nov 19, 2004

Blotto Skorzany posted:

hosed around in the lab experimenting today instead of working on either of my projects and wound up fixing two bugs by accident :toot:

my boss calls this galumphing

ahmeni
May 1, 2005

It's one continuous form where hardware and software function in perfect unison, creating a new generation of iPhone that's better by any measure.
Grimey Drawer

fart simpson posted:

well you see, that makes sense when you consider that

interfaces are meant to be implemented

PleasureKevin
Jan 2, 2011

I have been learning swift and I guess the language itself is no problem but iOS is a pretty big learning curve from web poo poo

FamDav
Mar 29, 2008

PleasureKevin posted:

I have been learning swift and I guess the language itself is no problem but iOS is a pretty big learning curve from web poo poo

why

Notorious b.s.d.
Jan 25, 2003

by Reene

PleasureKevin posted:

I have been learning swift and I guess the language itself is no problem but iOS is a pretty big learning curve from web poo poo

iOS and objC are both bad poo poo from the 1980s

web poo poo is at least 1990s turds

Adbot
ADBOT LOVES YOU

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

ahmeni posted:

is JavaScript supposed to be functional or just dumb
why is the "object" implementation so bad
why is for (index in array) so bad???
why does it iterate through all members of an object, making things like adding a function to an array prototype useles if you ever use it
who thought that would be useful
why is array[array.length] faster than array.push
why can I not pass by reference

javascript isn't object oriented it just renamed hash as object

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