News for hackers. Stuff that matters.

wvs

Re:Three Useful Monads on Tuesday June 11, 2013 @03:18AM (#5860255)
Ahaha, I agree. Abstract monad derivations are quite a foreboding introduction.
Re:Three Useful Monads on Tuesday June 11, 2013 @02:59AM (#5860211)
"half 8 >>= half" might look a lot different from "half . half $ 8", but they're actually identical in underlying structure! The monad version is just using the wrong operator for visual comparison.

(.) composes two functions[1] but (>>=) composes a monad value with a monad function[2]. It'd be nice if we had an operator to compose two monad functions instead.

We can define that operator in terms of (>>=): "g <=< f = \x -> f x >>= g". You can check that the types work out[3]. Notice the great similarity to (.). (It's because they're both categorical composition operators of functions.)

Now we can write "half <=< half $ 8" and everything's dandy.

  [1]: (.) :: (b -> c) -> (a -> b) -> (a -> c)
  [2]: (>>=) :: m a -> (a -> m b) -> m b
  [3]: (<=<) :: (b -> m c) -> (a -> m b) -> (a -> m c)
http://www.impredicative.com/ur/ has a very strong type system that claims to statically prevent any kind of code injection outright.
Re:The Case for Singletons on Friday December 28, 2012 @01:56PM (#4978944)
The main issue I have with singletons is that any mutable global state prevents your application from being first-class within its own runtime environment.

This is of course useful for unit testing, but also reduces hidden state dependencies between submodules.

Re:HTTP 2.0 First Draft Published on Friday November 30, 2012 @01:47PM (#4854728)
The core issue is that encryption is useless without authentication. A MITM could just replace the original self-signed certificate with his own and read the decrypted plaintext while proxying the request so the user doesn't notice.
Re:Introducing the USB Stick of Death on Monday October 22, 2012 @01:56PM (#4684362)
Coming from a *nix background, it seems odd to me that a kernel null dereference would be exploitable from userland. Or that kernel functions be directly addressable from userland.

Is kernel memory mapped into user processes on Windows?

Re:A Cautionary Tale: Do not move or rename your iCloud folder on Wednesday August 22, 2012 @01:23PM (#4418437)
Most file references in Apple's frameworks track by both the target's path and inode, with the inode considered "more canonical". This is used in NSDocument apps where when you move a file with it still open, the app can tell where it went and continue working at the new path. Finder aliases (different from symlinks) also do this.
Re:Amazon Glacier on Tuesday August 21, 2012 @12:32PM (#4413431)
http://globulation2.org/ is an interesting RTS that tries to reduce micromanagement. It doesn't use a macro system, but a guidable AI.
Re:Captchas Are Becoming Ridiculous on Sunday July 29, 2012 @03:30AM (#4307800)
Finding dropped words in coherent sentences is trivially easy given a large enough corpus of the language. Just looking at the occurrence probabilities of the surrounding words would be enough for most cases.
Re:Using Spotlight from the OS X Commandline on Monday July 16, 2012 @01:38AM (#4249465)
At least there's full disk encryption with FileVault, if you want encryption.
The thing with round rect buttons is not that they're irreconcilably ugly, but that they're only meant to be used in pinstriped table views. It's rare to see them used correctly anymore since pinstripes are dead as a popular design style in third-party apps. (The original Tweetie 2 was a notable exception.)

Instead they just get used because they're the only freely placable styled button in Interface Builder.

Re:SASS vs. LESS on Thursday May 17, 2012 @02:40AM (#3985776)
That looping construct in LESS is rather reminiscent of C++ template metaprogramming. Or ML/Haskell without higher order functions.
Only if they're unsustainable. If they are sustainable, then that's disruption.
Re:Encrypt Everything on Sunday April 01, 2012 @09:34PM (#3785797)
Privacy doesn't, but encryption does. You don't want to set up Tor or I2P only to find out later that traffic you thought was encrypted actually wasn't.
Re:Why Objective-C is Hard on Tuesday March 06, 2012 @03:27PM (#3672699)
Key-value accessors aren't exactly the shining moment of verbose method names (It's even been leaked that 10.8 has dict[key] sugar), but for methods with more parameters, it's much nicer than positional. e.g.:

connection:didReceiveResponse: addObserverForName:object:queue:usingBlock: drawAtPoint:forWidth:withFont:minFontSize:actualFontSize:lineBreakMode:baselineAdjustment:

Re:Why Objective-C is Hard on Tuesday March 06, 2012 @02:57PM (#3672568)
You may already know this, but properties are just sugar for messages and instance variables. Their only difference is a shorter syntax.

(...plus some extra runtime data, but you don't usually notice that.)

Re:Growl's response to Notification Center on Saturday February 18, 2012 @12:58AM (#3606050)
Disable new version checks in the preference pane (on the About tab).
Re:Back on Linux (after one year of Apple and OS X) on Monday February 13, 2012 @10:40PM (#3588515)
The private memory column is likely a better measure when looking for memory hogs.
Licensing most likely. Apple's runtime is under their own custom license (APSL) which is GPL-incompatible.
Re:Steve Jobs has passed away. on Thursday October 06, 2011 @02:47AM (#3079304)
Later, Steve. May your vision live on.