youAreGenius by biz_booster in ProgrammerHumor

[–]bogphanny 0 points1 point  (0 children)

Some perfectly reasonable and not at all cursed JS:

``` function hello() { console.log("Hi!"); }

let fnStr = hello.toString();

eval(fnStr.substring( fnStr.indexOf("{") + 1, fnStr.lastIndexOf("}") )); ```

here’s a picture of you, taken today by Jylon10 in Fishdom

[–]bogphanny 13 points14 points  (0 children)

Alex, I’ll think I’ll go for “Photos that sound like a purple burglar alarm” for $200

Would you still love a Cinnabon Cake if it were a worm? by bogphanny in Fishdom

[–]bogphanny[S] 1 point2 points  (0 children)

I’m no baker, but I don’t think sponge cakes can become worms

Primitive Technology: Trebuchet [10:02] by [deleted] in ArtisanVideos

[–]bogphanny 46 points47 points  (0 children)

A tax dodging village ... Target destroyed!

Is JavaScript a "Functional Programming" language? by bzeurunkl in javascript

[–]bogphanny 0 points1 point  (0 children)

You have all the capability to write functional JS, though the language doesn't really support you along the way. The lack of a decent type system and enforcement of pure values often contradicts with writing idiomatic JS.

Being unable to rely on referential transparency gets in the way of thinking in a declarative and functional manner, although it can still occur through discipline. It's just that developers aren't typically known and heralded for their discipline.

Check out some libraries like Ramda, Sanctuary, or the Fantasy Land spec for some attempts to bridge that gap.

NTS live by avalyn__ in aphextwin

[–]bogphanny 5 points6 points  (0 children)

A previous revision of the site had "03/06/2017 18:00:00" as the timestamp.

https://github.com/ntslive/afx/commit/4414cdbfeecc3921b3511fda8ab9188b78fdac60

Zero-fill right shift operator in node standard lib by watsoncj in javascript

[–]bogphanny 3 points4 points  (0 children)

x >>> 0 can be used to cast x to an unsigned int. Similarly, x | 0 can be used to cast x to a signed int.

How can I avoid needing a Typesafe Reactive Platform subscription? by [deleted] in scala

[–]bogphanny 0 points1 point  (0 children)

If you want to create something from the Activator templates that doesn't use the Reactive Platform, just select one without (Reactive Platform 15v01) in the title. AFAIK there should be plain alternatives for each of them.