@coriander goblins have better things to than work on esoteric programming problems
@lapis Mario and Peach are Fucking With Bowser
@vaporeon_ I tried rewriting it with let and const and there was no real impact on the speed
@vaporeon_ I don't know Go. I said I would probably like it, but that is a gut instinct based on, like, reading Wikipedia. I've never actually used it at all.
If I ever learn Go I will happily share horrendous code I make with it to
@vaporeon_ Array is the ordinary JavaScript array. using the constructor is abnormal but I know the exact size of the array so it is (probably) slightly more efficient to use the constructor so I can initialize it to an exact size.
in my experience var runs faster than let/const and its goofy scoping rules let me make the code more golfy. (I declare m in the first for loop and the return statement uses m! its terrible and i love it!!!!!!)
@vaporeon_ it is 100x slower than the optimal solution and it is Worth It
@Taweret David Lynch presents: Muppets Drive
@vaporeon_ look at this beauty:
var change = function(amount, coins) {
for (var i = 0, m = new Array(coins.length); i < coins.length; ++i) m[i] = new Array(amount + 1).fill(0), m[i][0] = 1;
for (var r = coins.length - 1; r >= 0; --r) for (var c = 1; c <= amount; ++c) for (x = r; x < coins.length; ++x) if (c - coins[x] >= 0) m[r][c] += m[x][c - coins[x]];
return m[0][amount];
};
@vaporeon_ @aescling explain to me why we don't have the confused psyduck emojo
@vaporeon_ C++'s type system, since it always make me feel like ![]()
@lapis that one made me giggle uncontrollably when I added it to the poll
@vaporeon_ According to the standard, every expression belongs to exactly one of the fundamental classifications lvalue, xvalue, or prvalue.
A prvalue is an expression that 1) when evaluated, initializes an object, or 2) computes the value of an operand of an operator, as specified by the context in which it appears, or 3) has type cv void.
An expression is an xvalue if it is 1) a move-eligible id-expression, 2) the result of calling a function, implicitly or explicitly, whose return type is an rvalue reference to object type, 3) a cast to an rvalue reference to object type, 4) a subscripting operation with an xvalue array operand, 5) a class member access expression designating a non-static data member of non-reference type in which the object expression is an xvalue, or 6) a .* pointer-to-member expression in which the first operand is an xvalue and the second operand is a pointer to data member.
An expression is an lvalue if it satisfies both of the following conditions: 1) it is not an xvalue, and 2) its evaluation determines the identity of an object or function.
I don't think there is a human being on the planet who understands every detail of these definitions.
@vaporeon_ @amy holy shit she's even smaller now
@vaporeon_ @aescling tell me who hates Go so I can report them
@amy it's the amy!!
@sidd_harth0_5h4h @vaporeon_ what if we comprise and
gets a second ice cream with the meal?
i go by Clodsire, Clodboy and Catwin.
videogame enjoyer. mathematics hobbyist and recovering physicist. software engineer. professional wonk. prophet of The Truth. the walking embodiment of "not diagnosed, but somethings wrong". i like animals that wear cowboy hats.
number of fat cock awards received: 56
header is by @vaporeon_
"i regret ever allowing him here" ~aescling
"oh you're one of those weird movie likers" ~Ti
"the thing you need to understand about @wallhackio is that he is utterly sick in the head. this is partially a compliment. but not entirely" ~aescling
30+
he/him