HNHacker News
TopNewBestAskShowJobs

gfxmonk

222 karma · joined March 15, 2010

submissionscomments
gfxmonk··on Piep: bringing the power of python to stream editing
somewhat, although that seems fairly heavily geared towards clusters of machines, which I've not really tried to address with piep. I've used gnu-parallel and cluster-ssh in the past for that sort of thing, though I'd likely prefer a pythonic way of doing it.
gfxmonk··on Piep: bringing the power of python to stream editing
Why is that sad? Because it goes against python community norms, or some other reason?
gfxmonk··on Piep: bringing the power of python to stream editing
It's inspired by a similar tool called `pyp`, which I considered extending but ended up going my own route instead. Here's some more information on why: http://gfxmonk.net/2012/03/28/why-piep.html
gfxmonk··on Fixing the callback spaghetti in node.js
Imagine function a calls b() and function b calls c(), and they're all sync.

Now, let's say c() changes and needs to call someAsyncFunction() and provide a callback. Which means c itself needs to take a callback. Which means b needs to provide a callback, so b needs to also take a callback, so a needs to provide a callback. And so forth.

Callbacks are infectious - once anybody in the call stack needs one, everybody needs one even if they just pass it on down the stack. Unless you don't need to do anything with return values, but that's fairly rare.

gfxmonk··on Fixing the callback spaghetti in node.js
Looks concise, but doesn't much help with the fundamental problems of callback code - exceptions don't work right, and "callbacks all the way down" whenever something starts having any async computation.
gfxmonk··on Fixing the callback spaghetti in node.js
got a link? I'd be interested to know how it deals with errors / exceptions, for example.
gfxmonk··on Fixing the callback spaghetti in node.js
Addressing the same problem (and more) in both node and the browser, via compiling-JS-to-JS: http://onilabs.com/stratifiedjs

(disclaimer: I am the guy who worked on the now-defunct `defer` support in Coffeescript, and am now working with the onilabs folk on the stratifiedJS runtime)

gfxmonk··on Rbenv, an unobtrusive rvm replacement
Yes.

I don't know if it was due to a weird environment variable or something, but when I installed RVM it got itself into an infinite loop sometimes when I did `cd`.

I reported a bug, but the author couldn't reproduce or fix it. So now I recommend anyone who asks me not to use rvm, because it's utterly ridiculous.

gfxmonk··on I turned gnome-shell into a tiling window manager
A few differences, yeah. You get to keep the gnome bling (eg the overlay window). It also supports direct manipulation (mouse moving / resizing) and overlapping windows. Oh, and compositing works.

Plus, the floating mode isn't bad ;)

gfxmonk··on I turned gnome-shell into a tiling window manager
The layout behaviour in both shellahape and bluetile is per-workspace.
gfxmonk··on I turned gnome-shell into a tiling window manager
https://launchpad.net/screenkey/

Had to hack it up a bit to show the shift key, and only the most recent keypress.

And gnome-shell-list has built in screen recording.

gfxmonk··on Defer: Taming asynchronous javascript with coffeescript
Regarding transformations of returns, the initial implementation added an anonymous callback argument and converted returns into using it. But that takes the option of using the callback out of the programmer's hands, and is entirely non-obvious for someone calling the function (the number of parameters required is one more than those listed in the function definition)

I plan to write a follow-up shortly that discusses possible approaches of doing this sort of thing, and your suggestion is one of the ideas I'm going to explore. Thanks for reading & commenting :)

gfxmonk··on Defer: Taming asynchronous javascript with coffeescript
I'd like to see an example of nontrivial asynchronous code that isn't at least a little awkward.

continuations may well be inefficient, it depends on the runtime. `defer` does not implement real continuations, so that's largely irrelevant - there is no runtime overhead that you don't already have by writing your own callback functions.

As for ugly, do you refer to the compiled output, or the source code? gcc outputs some pretty ugly assembly code; does it matter?

gfxmonk··on Defer: Taming asynchronous javascript with coffeescript
Thanks, good point. I actually meant to reference scheme, not smalltalk - as I believe that's where continuations were first done. I believe it is provided by the runtime in scheme (but still, not the compiler). I've corrected the post now.
gfxmonk··on Password Chart
If you're worried about browser security, there's a command-line reimplementation in python that a friend and I wrote:

http://github.com/gfxmonk/supergenpass

Less convenient, but much less likely to leak your passwords via the browser...

← PreviousPage 2 of 2