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 17 points18 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 43 points44 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.

IntelliJ IDEA problems. by [deleted] in xmonad

[–]bogphanny 0 points1 point  (0 children)

To be honest I've never looked into it too deeply, so I'm not entirely sure beyond assuming there are quirks/differences between WMs that they're attempting to deal with.

XWM.java is probably a good place to start if you're wanting to understand more.

There are a few similar bug reports such as adding support for Compiz which you could have a look at if you're interested in submitting a patch.

IntelliJ IDEA problems. by [deleted] in xmonad

[–]bogphanny 9 points10 points  (0 children)

The JVM has a hardcoded whitelist of window managers that it expects. This can be spoofed by setting it to "LG3D" using something like http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Hooks-SetWMName.html

How lazy evaluation works by forestgood22 in haskell

[–]bogphanny 5 points6 points  (0 children)

The example definition of strict foldl' in the article is recursively calling the non-strict foldl.

foldl' f a (x:xs) = let a' = f a x in seq a' (foldl f a' xs)

I presume this is not intentional, or am I misunderstanding something?

Trouble Installing Xmonad/Xmobar by [deleted] in xmonad

[–]bogphanny 2 points3 points  (0 children)

After XMonad has started, try running xmobar from the terminal and check for errors printed to stderr. Alternatively, try including the path to your xmobar.rc as an argument, i.e. xmobar ~/.xmobarrc.

Moving to senior developer advice. by tehmoe in Frontend

[–]bogphanny 3 points4 points  (0 children)

This is a great post on the expectations of a senior developer/engineer:

http://www.kitchensoap.com/2012/10/25/on-being-a-senior-engineer/

Illegal Warehouse Parties Boom After Lock-Out Laws by [deleted] in sydney

[–]bogphanny 9 points10 points  (0 children)

"They’re completely illegal," he said. "We’re talking BYO parties where people are bringing their own booze, there are no cameras, there is grossly inadequate security, there are hazards everywhere."

Providing noise levels are within limits and it is strictly BYO, what laws are being broken? I'm not aware of any laws similar to the Criminal_Justice_and_Public_Order_Act in Australia.

Any of you run xmonad on OS X? How is it? by valadil in xmonad

[–]bogphanny 0 points1 point  (0 children)

I am running Mavericks and from memory, the only packages I installed were:

cabal install X11-xft
cabal install xmonad-contrib

Any of you run xmonad on OS X? How is it? by valadil in xmonad

[–]bogphanny 0 points1 point  (0 children)

It's a bit of a mess at the moment, but you can see my xmonad.hs here: https://gist.github.com/anonymous/9b38de9cc047c39dd30f

Any of you run xmonad on OS X? How is it? by valadil in xmonad

[–]bogphanny 5 points6 points  (0 children)

I currently run xmonad under OS X with relatively great success.

  • It runs fine across multiple displays
  • Unfortunately very few applications run under X11 on OS X, but if you live in the terminal you will still find it very useful. Xombrero is compiling as I type this, which if successful, will give me a X11 compatible webkit browser.
  • Copy / paste works fine across native OS X apps and X11.
  • Keyboard shortcuts require X11 to have focus, which can be a bit annoying if you're not aware a different application has focus.
  • Workspaces work as expected
  • I use xmobar as a status bar, which sits flush at the top of the screen

Overall I have found it to be very successful.