Better HN
topnewbestaskshowjobs
Log inSign up

wvs

28 karma · joined Jun 8, 2011 (15y ago) · 21 submissions

Submissions

comment 13y ago · link · parent

Ahaha, I agree. Abstract monad derivations are quite a foreboding introduction.

comment 13y ago · link · parent

"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)

comment 13y ago · link · parent

http://www.impredicative.com/ur/ has a very strong type system that claims to statically prevent any kind of code injection outright.

comment 13y ago · link · parent

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.

comment 13y ago · link · parent

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.

comment 14y ago · link · parent

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?

comment 14y ago · link · parent

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.

comment 14y ago · link · parent

https://tahoe-lafs.org/

comment 14y ago · link · parent

http://globulation2.org/ is an interesting RTS that tries to reduce micromanagement. It doesn't use a macro system, but a guidable AI.

comment 14y ago · link · parent

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.

comment 14y ago · link · parent

At least there's full disk encryption with FileVault, if you want encryption.

comment 14y ago · link · parent

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.

comment 14y ago · link · parent

That looping construct in LESS is rather reminiscent of C++ template metaprogramming. Or ML/Haskell without higher order functions.

comment 14y ago · link · parent

Only if they're unsustainable. If they are sustainable, then that's disruption.

comment 14y ago · link · parent

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.

comment 14y ago · link · parent

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:

comment 14y ago · link · parent

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.)

comment 14y ago · link · parent

Disable new version checks in the preference pane (on the About tab).

comment 14y ago · link · parent

The private memory column is likely a better measure when looking for memory hogs.

comment 15y ago · link · parent

Licensing most likely. Apple's runtime is under their own custom license (APSL) which is GPL-incompatible.

comment 15y ago · link · parent

Later, Steve. May your vision live on.