r/javascript • • Mar 30 '18

TensorFlow.js

https://js.tensorflow.org/
471 Upvotes

101 comments sorted by

View all comments

62

u/Hcmichael21 Mar 30 '18

Big if true

44

u/TheLastMonster Mar 30 '18

if(true) big();

36

u/Knext Mar 30 '18
ReferenceError: big is not defined

11

u/Combinatorilliance Mar 30 '18
(function (isTrue) {if (isTrue) console.log("Big");}(true));

8

u/[deleted] Mar 30 '18
console.log((arg => (a => b => c => a(b)(c))(arg)('Big')('Small'))(a => b => a))

3

u/[deleted] Mar 31 '18

[removed] — view removed comment

5

u/AreYouDeaf Mar 31 '18

CONSOLE.LOG((ARG = (A = B = C = A(B)(C))(ARG)('BIG')('SMALL'))(A = B = A))

1

u/jodraws Mar 31 '18

VM16680:1 Uncaught ReferenceError: CONSOLE is not defined at <anonymous>:1:1

2

u/sad__frog Mar 31 '18

You need to interpret it backwards, then once in French and twice in Deutschland

2

u/spel3o Mar 31 '18

console.log((arg => (a => b => c => a(b)(c))(arg)('Big')('Small'))(a => b => a))

No joke, doing beta reduction on this comment has given me the best intuition to date as to why (a => b => a) represents "True" in lambda calculus.

3

u/NomNomDePlume for (;;); Mar 30 '18
if(",,"==new Array(3)){var z=[66];z.push(z[0]+39),z.push(z[1]-2),z.forEach(r=>{console.log(String.fromCharCode(r))})}

4

u/[deleted] Mar 30 '18

You don't know my package.json!

13

u/barter_ Mar 30 '18

Did you just assume my dependencies?

-3

u/[deleted] Mar 30 '18

let size = big; if (true) { return size; }

0

u/[deleted] Mar 30 '18

[deleted]

2

u/[deleted] Mar 30 '18

That's what I get for writing JavaScript on mobile :P