HNHacker News
TopNewBestAskShowJobs

tomn

368 karma · joined November 12, 2009

hn@tomn.co.uk

https://www.tomn.co.uk/

https://github.com/tomjnixon

submissionscomments
tomn··on Poor man's VPN via ssh socks proxy
Ah yeah, thanks, that makes a bit more sense.
tomn··on Poor man's VPN via ssh socks proxy
That's interesting. IIRC tsocks doesn't emulate the select-style system call interface that chromium likely uses for its networking.

I'm a bit surprised to find that it works with Firefox; I generally prefer to configure proxies where possible as tsocks is a horrible (albeit very useful) hack.

tomn··on Python: Generators, Coroutines, Native Coroutines and Async/Await
True, though with multiple functional units there is some parallelism. Just thought it was an interesting comparison.
tomn··on Python: Generators, Coroutines, Native Coroutines and Async/Await
> programs are DAGs, and instructions are only run when their inputs are ready, rather than when a program counter reaches them.

At a low level, that's exactly what modern CPUs do.

https://en.wikipedia.org/wiki/Out-of-order_execution

tomn··on Silicon Brain: 100,000 ARM cores [video]
That's mostly front-end stuff for using the machines; the actual code running on the custom hardware is generally a lot lower level.
tomn··on How to Fold a Julia Fractal
Thanks for adding more information, but that's a perfectly cromulent use of the word they.
tomn··on Make: Theory and Practice
I've used SCons for processing audio files recently and it has worked pretty well for me; multiple targets are handled just fine.

I did have one percieved speed problem, but this scons calculating file checksums to see if it needed to re-build targets; this is usually a good thing, but if you're working with large files it might be better to use the MD5-timestamp Decider instead.

tomn··on An Introduction to Unix (2014)
Using find with -exec works well and avoids this kind of problem, though that may well be a gnu specific thing.
tomn··on Microsoft Acquires Calendar App Sunrise for North of $100M
I'm using cyanogenmod 11 on my galaxy nexus, which still has the email and calendar applications with exchange sync. It looks like contacts sync should work too.
tomn··on Npm install could be dangerous
The signing used by pacman (on arch) seems relatively nice, in that individual packages are signed by the maintainer rather than the repository.

Whether or not this buys you any extra security, I'm not sure. In reality I don't think many users check maintainer keys when asked if they want to trust them, but they could.

tomn··on The sad state of Linux Wi-Fi
NetworkManager doesn't relay any error information to the interface at all, but it's log files are quite detailed.

At least on systemd based distributions (tested on arch), running

  journalctl -fu NetworkManager
will show you the live logs of NetworkManager interleaved with the logs of it's subprocesses; this has lots of juicy information that i've found quite usefull for debugging.
tomn··on Learning Modern OpenGL
I used to feel like this with OpenGL; the ammount of complexity to get my head around was so large that most of it had drained out of my ears between projects.

I've been working on something recently using modern OpenGL though, and i've found it a lot more manageable. Because there's no longer a fixed pipeline -- you have to write your own shaders to be able to do anything 3D graphics related, the pltform is vastly simpler, to the point of being relatively easy to understand, if still a little complex to use.

The API is still quite crusty; there's little in the way of abstraction, and you often have to make quite a few calls to do simple stuff, but it's conceptually a lot cleaner.

tomn··on Ask HN: How does Sway app know where I work and crush?
For what it's worth, i recieved one of these spams this afternoon, addressed to the unique email address on my github account, and containing the organisation name listed there.
tomn··on Drone Flies Into an Active Volcano [video]
Does it really matter if it's dubstep or not? I happen to quite like whatever that was, but generally dislike most dubstep i've come across.

Maybe it would have been better without sound, but calling something "awful" or of "poor taste" just because you don't like it is a bit much, especially for something as subjective and personal as musical taste.

tomn··on Cypherpunks 2.0
To view this kind of thing in vimperator, press insert or shift-esc to ignore all keys.

It works quite nicely after that (Firefox on Linux).

tomn··on Callbacks as our Generation's Goto Statement
It's not clear if you know or not, but it's the common name of http://en.wikipedia.org/wiki/List_of_cognitive_biases#Freque...
tomn··on Pink Floyd: Pandora's Internet radio royalty ripoff
"The band is just fantastic, that is really what I think. Oh by the way, which one's Pink?"
tomn··on Shepard tone
Autechre did something similar, but getting slower rather than faster, and less subtle:

http://grooveshark.com/#!/s/06+Fold+4+Wrap+5/47EDV6

tomn··on Hijack - iPhone Sensors Thru Audio Jack
I don't know the theory behind this stuff, but here it goes:

Headphone jacks tend to have a capacitor in-line with the output terminals to get rid of any DC bias -- this can cause problems like battery drain, lots of noise when you plug headphones in, and damage to the driver coil of headphones -- not good!

I like to think of a capacitor like a shock absorber, with the length of the shock absorber being like the voltage it's currently storing. If you push on one end of a shock absorber, the larger the force (current), the larger the rate of change of voltage (length), so this analogy might be useful.

Imagine holding on to one end of the shock absorber while someone else tries to move it back an forth at a given frequency. If they try to move it back and forth slowly, the maximum force (current) is going to be low, and so the total energy will be low and you won't get shaken much -- the shock absorber will just change length (voltage).

If they try to move it back and forth quickly, the force (current) will be much higher, and so you can extract a lot more energy from it.

I believe it's the same reason portable devices have poor bass response.

tomn··on Simple SAT Solver in Haskell
Yeah, sorry about that... I totally missed the ' in "f = formula s'" and "f = record s'"!

In that case, I would probably turn the whole thing into a case on "unitpropagate s", and get rid of the outer where, but my advice is clearly best taken with a pinch of salt.

tomn··on Simple SAT Solver in Haskell
As one of my algorithms teachers said, "I don't know how it could have possibly taken four people to come up with DPLL; it's so simple!"

Anyway, nice work! A few comments on the Haskell:

- Line 16 isn't necessary; that if/then/else is handled by the previous case.

- You can change line 16 to "dpll s@(SolverState f r) =". This both pattern matches the argument (so binds f and r), and binds the whole argument to s. This allows you to remove lines 26 and 27.

- Line 22 can be written as "let n = negate l". Further, that entire do block is unnecessary -- you could replace the whole thing with a let or a where if you liked.

tomn··on Vim anti-patterns
Ah, I meant subtracting the current line number from the target line number to get the number of lines to jump, instead of just guessing.
tomn··on Vim anti-patterns
That, or subtracting ;)

I swear the entire UI of Vim is made to make the user feel like a ninja.

tomn··on Vim anti-patterns
These kind of articles always have a few new things in them, even of most of it is familiar -- I guess everyone just has a slightly slightly different set of indispensable tricks.

The most most useful Vim trick I've seen recently is "set relativenumber". This makes Vim show line numbers relative to the current line. This is awesome, because it lets you easily jump to any line you can see. eg. you can get to a line marked "9" above the cursor by pressing "9k".

It can be slightly tricky to get used to if you're used to absolute numbers (have to use gg more), but for me it's worth it.

tomn··on Show HN: I made a tool to open files from git in one line. Useful?
If you use vim and git, you should check out Fugitive, which adds loads of really useful Git integration into Vim:

https://github.com/tpope/vim-fugitive

The last five vimcasts go through what this plugin can do, and are really worth the time:

http://vimcasts.org/episodes/archive

tomn··on How JavaScript Timers Work
I believe this is commonly called the 'Reactor pattern':

http://en.wikipedia.org/wiki/Reactor_pattern

tomn··on Morph C++ into Javascript
Now all we need is a gratuitous regular expression to get rid of the extra bits of syntax...
tomn··on Google Tech Talks: "All Questions Answered" by Donald Knuth
I was lucky enough to see him in Manchester a few months ago, and the people who weren't expecting the stuttering were quite put off. Still, it was an incredible experience.
tomn··on Don't touch me, I'm British
Oddly, in Britain this kind of thing happens quite a lot -- most older men certainly aren't shy about showering naked in public after swimming, for example.

Thinking rationally, being shy about our bodies doesn't really make sense -- are there any logical reasons why nudity isn't ok?

tomn··on The frontpage with a threshold of 100 points
This doesn't really work, because things with high points can be anywhere on the page after they've stopped getting votes -- if you look at the front page, the stories aren't in point order by any means.

Although this would be bad for the community (people need to see the low-point articles for them to get voted on), you could have a page that sorts all stories by number of points, and allows you to remove them either by clicking on them, or marking them as uninteresting. It would solve the 'problem' of missing articles when I'm away at least.

I guess you could have some kind of mix of new and highly voted articles, which could be interesting?

← PreviousPage 6 of 7Next →