[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

This is JavaScript, programming language of the future, bound

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 25
Thread images: 4

File: javascript_logo.png (72KB, 300x300px) Image search: [Google]
javascript_logo.png
72KB, 300x300px
This is JavaScript, programming language of the future, bound to replace majority of other languages. Say something nice about it.
>>
>>60194358
>Say something nice about it
Modern JavaScript engines have exceptionally good JIT compilers.
>>
>>60194358

It's bascially LISP light.
>>
>>60194358
It exposes normies to functional programming.
>>
>>60194429
No it's basically C of the nineties except C was actually usefull and designed unlike js.
>>
>>60194482
>he thinks it is basically C because it has C-like syntax

Brendan Eich literally wanted to make a Scheme for browsers when he designed ECMAScript/JavaScript/Mocha/LiveScript
>>
It's basically a systems programming language now that browsers are most of your OS.
>>
>>60194511
>he thinks js is basically scheme because it has lambdas
JS like C has actually terrible portability. C has it bad because the standard library is too small js just has really poor implementations.
>>
>>60194482
The mechanics are based on LISP.
The syntax is based on C.
>>
>>60194543
>hurr durr lambdas does not make it functional
No, but higher-order functions, currying and lexical scoping makes it so.

I mean, JS is NOTHING like C except for the syntax.
>>
>>60194551
JS doesn't have:
call/cc
macros
homoiconic syntax
list as basic datastructure

There really is nothing lispy in JS.
>>
can someone post the qt js anime grill?
>>
>>60194581
>call/cc
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call

>list as basic datastructure
Objects are basically associative lists though

Also, see >>60194580
>>
>>60194580
>higher-order functions, currying and lexical scoping makes it so
Holy shit JS is basically SML or Haskell!
>>
File: IMG_9137.jpg (130KB, 889x1279px) Image search: [Google]
IMG_9137.jpg
130KB, 889x1279px
I'm creating a content locker with jquery, but running into issues with keep track of the users state. If the user clicks the offer, I want to make sure they follow through before I give them the content. Is this possible with jquery guys?
>>
>>60194358
I like that arrays have built in functional style methods (like map, reduce and filter).
>>
function test() {
try {
return "expected";
} finally {
return "whut";
}
}

test() // returns "whut"
>>
>>60194674
Doing any content locking 100% client side is retarded.
Don't even load the content you are locking until they have clicked an offer/completed it.
>>
rate my js

function fillQtyShipped()
{
let itemCounter = document.querySelectorAll("#allItems
.eachItem").length;
for (var x = 0; x < itemCounter; x++)
{
let qtyOrdered = document.getElementById("qty_ordered" +
x).value;
document.getElementById("qty_shipped" + x).value = qtyOrdered;
}
}
>>
File: 31554.jpg (46KB, 640x480px) Image search: [Google]
31554.jpg
46KB, 640x480px
>>60194725
Okay thanks pal
>>
>>60194647
>Holy shit JS is basically SML or Haskell!
Not quite, but dismissing JavaScript as not being functional is just ignorant.

Here is an example of how to do partial bind, for example.
Function.prototype.cutoff = function (argc) {
var ref = this;

return function () {
return ref.apply(this, [].slice.call(arguments, 0, argc));
};
};

Function.prototype.rbind = function () {
var ref = this;
var args = [].slice.call(arguments);

return function () {
return ref.apply(this, [].slice.call(arguments).concat(args));
};
};

var print = console.log.cutoff(1);
var parseHex = parseInt.rbind(16).cutoff(1);

Array(4).fill('a').map(parseHex).map(print);
>>
>>60194848
Pretty based
>>
>>60194674
>jqueery

Fucking kill yourself.
>>
File: 42131.jpg (47KB, 640x480px) Image search: [Google]
42131.jpg
47KB, 640x480px
>>60194998

Have any other recommendations?
>>
>>60195060
ES6 is what jquery was aiming for before jquery became shittier than native javascript.
Thread posts: 25
Thread images: 4


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.