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
Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

AggressivelyStupid posted:

moral of this story is know how your language works?

like, I'm not saying JavaScript is an ideal language, just that maybe if you write code in a language maybe you should understand it first. there is weirdness in Javascript but there is far more consistency than some languages even if it's looseness means thing don't glue together quite as well as you expect them to.

Adbot
ADBOT LOVES YOU

necrotic
Aug 2, 2005
I owe my brother big time for this!
I mean that's fair but until MDN there was no good source of documentation.

AggressivelyStupid
Jan 9, 2012

plain javascript is really gross, I prefer to pretend it doesn't exist

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
you really gotta appreciate javascript for what it is and what its become. it's come a long way under some pretty ridiculous constraints.

JewKiller 3000
Nov 28, 2006

by Lowtax

MALE SHOEGAZE posted:

you really gotta appreciate javascript

no

no you do not

at all

VikingofRock
Aug 24, 2008




What's the yospinion on web assembly?

Bloody
Mar 3, 2013

Maluco Marinero posted:

it's only silently demonstrated because the JavaScript language matches arity with no strictness at all, all arguments are always optional. unless you propose to break this sort of fundamental language decision for the sake of a wrapping function.

idea: throw out the web and start over

AggressivelyStupid
Jan 9, 2012

Bloody posted:

idea: throw out the web

LinYutang
Oct 12, 2016

NEOLIBERAL SHITPOSTER

:siren:
VOTE BLUE NO MATTER WHO!!!
:siren:
it's kind of weird that a module system now exists in Javascript but nobody knows what the native browser implementation will behave like

so we have projects with 500 javascript modules, are browsers supposed to load all that poo poo asynchronously or what, nobody knows

JewKiller 3000
Nov 28, 2006

by Lowtax
1. the module system will require that your dependencies be arranged into a DAG, so that the implementation semantics are "concatenate all the modules in toplogical order, and proceed as before"
- OR -
2. modules are loaded the first time that anything within them is referenced at runtime

judging by the ~javascript community~, which one do you think will happen???

Shaggar
Apr 26, 2006

BiohazrD posted:

i thought about doing that, but you an control all zones, so i could do Amplifier[0].Volume = 50 and have it set all of the zones on the amp. idk, ill gently caress around with it some more

for something like that you would have your IEnumerable<Zone> Zones property on your controller that you can go thru to set the same command on all unless I'm missing something you should really ignore amps other than having them linked to the controller to give you their zone lists which you aggregate in the controller.

Is there anything the amps do that's special other than give you the zones you actually want to do things to?

Shaggar
Apr 26, 2006

Athas
Aug 6, 2007

fuck that joker

VikingofRock posted:

What's the yospinion on web assembly?

I was at a Google-hosted summit where a dude (Chandler Carruth) could explain the three primary current research problems in compiler engineering using maybe four slides, and some other guys used something like seventy slides to explain WebAssembly.

redleader
Aug 18, 2005

Engage according to operational parameters

Athas posted:

I was at a Google-hosted summit where a dude (Chandler Carruth) could explain the three primary current research problems in compiler engineering using maybe four slides, and some other guys used something like seventy slides to explain WebAssembly.

so it's good

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Athas posted:

I was at a Google-hosted summit where a dude (Chandler Carruth) could explain the three primary current research problems in compiler engineering using maybe four slides, and some other guys used something like seventy slides to explain WebAssembly.

is that compiler talk online?

aardvaard
Mar 4, 2013

you belong in the bog of eternal stench

sometimes i use node instead of bash

aardvaard
Mar 4, 2013

you belong in the bog of eternal stench

i never learned how to do like, any sort of logic in bash and the extraordinary power of pavascript is right there so :shrug:

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
i ran into a fun ruby thing at work that i wanted to share

Ruby code:
2.1.5 (main):0 > ['a' 'b' 'c']
[
  [0] "abc"
]
2.1.5 (main):0 > ['a', 'b,' 'c']
[
  [0] "a",
  [1] "b,c"
]

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



thats string literal concatenation, C & most of its descendants do it too

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



its so you can go

char *a = "this line is really long,"
" and continues here. "
"and still continues";

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
no poo poo, i don't think i've ever run into concatenation without an operator involved

Slurps Mad Rips
Jan 25, 2009

Bwaltow!

Athas posted:

I was at a Google-hosted summit where a dude (Chandler Carruth) could explain the three primary current research problems in compiler engineering using maybe four slides, and some other guys used something like seventy slides to explain WebAssembly.

everytime i saw one of the talks about wasm half the slides appeared to be dedicated to defending their decision to write the reference implementation in OCaml, and then another third of the slides were dedicated to complaining that they were having trouble getting people to contribute and then that last little sliver was the actual important stuff that sounds kind of alright, but then has weird design decisions like 64-bit signed integers as the largest number type but 32 bit unsigned integers as the largest unsigned integer type.

Blinkz0rz posted:

no poo poo, i don't think i've ever run into concatenation without an operator involved

python does this too.

Python code:
>>> 'dick' 'butt'
'dickbutt'

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
yeah i realized it exists basically everywhere but i dunno i've never seen anyone use it in practice. imo it's just a Bad Idea.

MononcQc
May 29, 2007

I've only used it for long literal strings that I want to fit indentation structure and need to break on multiple lines.

Cybernetic Vermin
Apr 18, 2005

speaking of inheriting things, possibly unwisely, from c, i'll just note:

printf("%f\n", atof("3.14"));
printf("%f\n", atof("1.2.3.4"));
printf("%f\n", atof("monkeys"));

3.140000
1.200000
0.000000

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

CommunistPancake posted:

sometimes i use node instead of bash

same except Python and it's not sometimes it's always

Bash is aggressively bad to write in for me

Workaday Wizard
Oct 23, 2009

by Pragmatica

Thermopyle posted:

same except Python and it's not sometimes it's always

Bash is aggressively bad to write in for me

same and i hate python

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
bash scripting is good for very short scripts with no significant logic imo

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Symbolic Butt posted:

bash scripting is good for very short scripts with no logic at all imo

akadajet
Sep 14, 2003

VikingofRock posted:

The fun javascript thing that I learned today is this masterpiece:

['10', '10', '10', '10', '10'].map(parseInt)
=> [ 10, NaN, 2, 3, 4 ]

well... yeah. if you just pass random functions into map without knowing their signature you deserve what's coming to you.

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

Symbolic Butt posted:

bash scripting is good for very short scripts with no significant logic imo

im responsible for a 2000 line bash script that runs on mainframes

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

akadajet posted:

well... yeah. if you just pass random functions into map without knowing their signature you deserve what's coming to you.

ideally an error

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

carry on then posted:

im responsible for a 2000 line bash script that runs on mainframes

how much do you drink?

Cybernetic Vermin
Apr 18, 2005

Symbolic Butt posted:

bash scripting is good for very short scripts with no significant logic imo

nah, i mean, yes, but you invite a future where complexity keeps building in that script despite the initial wisdom

tcl really should have played a far bigger role in the road to modern unix. not only because it was a vastly superior alternative for simple scripts (clean and simple for the truly trivial scripts, while making it possible to do advanced things if needed, but also makes it easy to dress those advanced things in dsl-like simplicity so anyone can update config and launch scripts). but also because tk was somehow as good as unix gui programming got for a long time

tef
May 30, 2004

-> some l-system crap ->
node.js is our generations aolserver

Moreleth
Jun 11, 2001

lego my eggo

tef posted:

node.js is our generations aolserver

Keep writing that C you smelly grognard

the talent deficit
Dec 20, 2003

self-deprecation is a very british trait, and problems can arise when the british attempt to do so with a foreign culture





MononcQc posted:

I've only used it for long literal strings that I want to fit indentation structure and need to break on multiple lines.

i do it all the time for strings i want formatted with no newlines but with newlines in my source code, ie:

fun(_) ->
"this is a "
"string with no newlines "
"even tho it's spread "
"over multiple lines".

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



http://atp.fm/205-chris-lattner-interview-transcript#rustmemory

Aquarium of Lies
Feb 5, 2005

sad cutie
:justtrans:

she/her
Taco Defender

the talent deficit posted:

fun(_) ->
"this is a "
"string with no newlines "
"even tho it's spread "
"over multiple lines".

burma-shave

Adbot
ADBOT LOVES YOU

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum
if you don't write your distributed map reduce scripts in zsh I don't even

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