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
CPColin
Sep 9, 2003

Big ol' smile.
code:
StringBuilder documentation = new StringBuilder();

documentation.append("This is the documentation for the "
   + (first ? "first" : "second")
   + " thing or whatever."
   + " This isn't a real thing; it's just an example."
   + getAdditionalDocumentation());

documentation.toString();
Uh, that's not the point of using a StringBuilder.

Adbot
ADBOT LOVES YOU

Zaxxon
Feb 14, 2004

Wir Tanzen Mekanik

CPColin posted:

Might not even need to keep track of a set; just remember or look up the last value you added to the merged list.

yeah that just dawned on me.

Shaggar
Apr 26, 2006

CPColin posted:

code:
StringBuilder documentation = new StringBuilder();

documentation.append("This is the documentation for the "
   + (first ? "first" : "second")
   + " thing or whatever."
   + " This isn't a real thing; it's just an example."
   + getAdditionalDocumentation());

documentation.toString();
Uh, that's not the point of using a StringBuilder.

lol. pretty sure the compiler optimizes those concatenations but lol all the same

syntaxrigger
Jul 7, 2011

Actually you owe me 6! But who's countin?

Soricidus posted:

if he has any sense, he's stopped using js entirely

Is dart viable now?

https://www.dartlang.org
Because typescript is annoying to use and coffee script seems like a joke.

e: ugh awful app

more like dICK
Feb 15, 2010

This is inevitable.
use clojurescript obviously

Careful Drums
Oct 30, 2007

by FactsAreUseless

syntaxrigger posted:

coffee script seems like a joke.


let me tell you about the real fix for coffeescript, iced coffee script! https://maxtaco.github.io/coffee-script/

Soricidus
Oct 21, 2010
freedom-hating statist shill
don't write a web frontend.

in one of the most pathetic failures of all human history, after 20 years of constant effort, there is still no sign of any good way to build an app that runs in a browser. do whatever it takes to avoid having to work in this field. if all else fails, i suggest committing a major felony and then turning yourself in; better to spend life in jail than to spend one hour working on web frontends.

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

qntm posted:

has he just stopped using OO entirely because that list leaves him with a very small range of options

he's using Object.freeze now

JavaScript code:
function constructor(spec) {
    let {member} = spec,
        {other} = other_constructor(spec),
        method = function () {
            //member, other, method, spec
        };
    return Object.freeze({
        method,
        other
    });
}

Stringent
Dec 22, 2004


image text goes here

Soricidus posted:

don't write a web frontend.

in one of the most pathetic failures of all human history, after 20 years of constant effort, there is still no sign of any good way to build an app that runs in a browser. do whatever it takes to avoid having to work in this field. if all else fails, i suggest committing a major felony and then turning yourself in; better to spend life in jail than to spend one hour working on web frontends.

well, but in full disclosure you don't actually mind sucking dicks or tossing salads so other people's milage may vary

syntaxrigger
Jul 7, 2011

Actually you owe me 6! But who's countin?

Soricidus posted:

don't write a web frontend.

in one of the most pathetic failures of all human history, after 20 years of constant effort, there is still no sign of any good way to build an app that runs in a browser. do whatever it takes to avoid having to work in this field. if all else fails, i suggest committing a major felony and then turning yourself in; better to spend life in jail than to spend one hour working on web frontends.

:laffo:

i can't think of a better note to make my exit on

Luigi Thirty
Apr 30, 2006

Emergency confection port.

what's the js framework of choice this week? didn't they just redo angular to have some kind of templating language because js sucks or something so it changes hourly what people actually use

Shaggar
Apr 26, 2006
use knockout.js. 3.2 came out recently and has component templates.

Stringent
Dec 22, 2004


image text goes here

Luigi Thirty posted:

what's the js framework of choice this week? didn't they just redo angular to have some kind of templating language because js sucks or something so it changes hourly what people actually use

what do you want to do?
the best answer is none of them. if you really need to make something that requires a javascript framework, back up and rethink what you're doing because you're probably loving up.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Stringent posted:

what do you want to do?
the best answer is none of them. if you really need to make something that requires a javascript framework, back up and rethink what you're doing because you're probably loving up.

nothing, I am trying to provoke more JavaScript rants

Notorious b.s.d.
Jan 25, 2003

by Reene

Symbolic Butt posted:

he's using Object.freeze now

JavaScript code:
function constructor(spec) {
    let {member} = spec,
        {other} = other_constructor(spec),
        method = function () {
            //member, other, method, spec
        };
    return Object.freeze({
        method,
        other
    });
}

functional javascript?

tef
May 30, 2004

-> some l-system crap ->

Careful Drums posted:

let me tell you about the real fix for coffeescript, iced coffee script! https://maxtaco.github.io/coffee-script/

on the plus side there is someone in javascript land doesn't want to do continuation passing style by hand

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
I think whatever mainstream language you want is fine, the problem is that poo poo keeps changing and new responses are required. there is too much change, and too fast. we have built our houses on sand.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
we keep solving and re-solving the same problem in different and exciting ways and there is a lot of motion and precious little progress.

Bloody
Mar 3, 2013

if your language name starts with "c" and has 3 or fewer characters in it you're probably fine.

Arcsech
Aug 5, 2008

Bloody posted:

if your language name starts with "c" and has 3 or fewer characters in it you're probably fine.

coq

Stringent
Dec 22, 2004


image text goes here
cum

JewKiller 3000
Nov 28, 2006

by Lowtax

Bloody
Mar 3, 2013

Bloody posted:

you're probably


my homie dhall
Dec 9, 2010

honey, oh please, it's just a machine

Nice!

Brave GNU World
Nov 1, 2013

by Cyrano4747

Luigi Thirty posted:

what's the js framework of choice this week? didn't they just redo angular to have some kind of templating language because js sucks or something so it changes hourly what people actually use

in the past week there's been like 20 articles on Why AngularJS Sucks, so the new hot framework is react+flux.

Soricidus
Oct 21, 2010
freedom-hating statist shill

Brave GNU World posted:

in the past week there's been like 20 articles on Why AngularJS Sucks

it's the JS bit, hth

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Soricidus posted:

it's the JS bit, hth

it's the browser

Luigi Thirty
Apr 30, 2006

Emergency confection port.

it's you

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Brave GNU World posted:

in the past week there's been like 20 articles on Why AngularJS Sucks, so the new hot framework is react+flux.

people realized that changing the dom and triggering repaints is awful so now they program a js replcement and double buffer it in

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
there's nothing particularly terrible in js, it's got about as many warts as most, the problem is that it's crammed into into the browser talking http to everything, which is about the worst possible platform for complex applications.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
worse is better and web browsers are like the most successful things ever so what does that tell you

Notorious b.s.d.
Jan 25, 2003

by Reene

rotor posted:

worse is better and web browsers are like the most successful things ever so what does that tell you

it tells me the rest of my career is gonna be spent on unfucking people's 1980s shell script while simultaneously writing javascript that sucks even worse

z0rlandi viSSer
Nov 5, 2013


:toot:

karms
Jan 22, 2006

by Nyc_Tattoo
Yam Slacker
im still not sure what nodejs actually does that is uniquely good at

i mean the whole "lightweight" "data driven" "real time" "distributed" doesnt mean jack about a language environment. thats framework talk

Notorious b.s.d.
Jan 25, 2003

by Reene

KARMA! posted:

im still not sure what nodejs actually does that is uniquely good at

runs js

Luigi Thirty
Apr 30, 2006

Emergency confection port.


out of bln?

Soricidus
Oct 21, 2010
freedom-hating statist shill

rotor posted:

there's nothing particularly terrible in js

the terrible part is what isn't in js. such as, e.g., any concept of libraries or modules or namespaces or anything, anything at all, that isn't pasting files together and praying they use compatible tricks to pretend the language supports libraries or modules or namespaces.

MeruFM
Jul 27, 2010
every internet company is trying to make js run as fast as possible, might as well take advantage of it.

AWWNAW
Dec 30, 2008

Dude on my team with seniority is pushing for it for some reason, I think just to put it on his resume

we have a perfectly fine REST setup already that is actually maintainable and debuggable

Adbot
ADBOT LOVES YOU

Stringent
Dec 22, 2004


image text goes here
if i saw node on someone with seniority's resume i'd be wanting to hear a p good story about what alignment of forces drug them, kicking and screaming, into using it.

  • Locked thread