News for hackers. Stuff that matters.

neilh23

Re:JS Paint – A web-based MS Paint remake on Thursday January 18, 2018 @06:04AM (#16176189)
If all you need to do is create a negative version of pre-existing image, you can use ImageMagick on the command line:

$ converge in.png -negate out.png

Pashin' it doon
Re:The Dark Art of Mastering Music on Monday May 23, 2016 @09:00AM (#11753547)
It's hard getting something that sounds consistently good in all listening environments - I've seen cases where music is offered in digital format either as 'play anywhere' loud .mp3s or 24-bit high dynamic-range .flacs for DJs, but most commercial music is mastered for the poorest environments (in the car, over the radio).

Getting a good master is very important - I'm reminded of a story I heard about an album that was mastered by the artist, and pressed to CD with a high-pitched whine over the top which the artist hadn't been able to hear - like Aphex Twin's Ventolin, but unintentional.

The shell '>' redirect will truncate the file first of all, for example:

  echo "foo" > message.txt ; ( sleep 3 ; echo "bar" ) > message.txt & echo "message: '$( cat message.txt )'"
will print "message ''", not "message 'foo'".

Interestingly, that means that the 'openssl' command might have been working with an empty signature.

Of course, he might have just aliased 'openssl' as 'echo "Verified OK"' ...

Vim's built-in encryption is pretty useful, although the default cipher is weak (you can override this in the vimrc).
I always liked the quantum bogo-sort algorithm:

1) Randomise list

2) if list not in correct order, destroy the universe

The universe that's left will have the correct answer.

Re:Why Go Still Foils the Computers on Friday January 01, 2016 @08:03AM (#10821778)
Yes - Go is full of concepts like 'aji' (lit. "taste"), thickness, influence, good and bad shape which are features that can only really be evaluated in terms of actual points dozens of moves later.

I think Go is particularly difficult for AI because you need fuzzy pattern matching and precise reading out of positions (life and death problems). as well as the judgement to know when to use which.

Re:Ask HN: Do you play Chess? on Tuesday August 04, 2015 @06:53PM (#10006829)
Yeah :-)
Re:Satoshi Nakamoto moves his 6.5 yr old bitcoins on Tuesday August 04, 2015 @12:55PM (#10004611)
According to Google - $14,281.50
Re:Ask HN: Do you play Chess? on Tuesday August 04, 2015 @11:16AM (#10003932)
I play Go a lot, and chess occasionally.

I think it's about mindset not skillset - games like these are about solving local problems ('tactics') to achieve a greater aim ('strategy'); people who are attracted to them are generally people who like the sort of problem solving that comes up in programming, hence the cross-over.

Your question, however was whether or not the skills translate - I don't think that solving daily chess problems or tsumego will do as much for your programming than solving programming puzzles (e.g. codewars), but the discipline of thinking through all possible paths ('reading') definitely helps.

Ask HN: Remote Working

I'm a senior engineer at a small company, and for family reasons I'm going to moving to a remote part of the country soon.My company have been accommodating and want to keep me on board, but it will be a culture shock working from home full-time.What is your experience with long-term remote working?What strategies and technologies do you find helpful for beating the feeling of isolation and...

( Read More... | 12 comments | 11 points | on HN )
Re:Show HN: Small C Program to Convert Photos to Audio on Tuesday June 09, 2015 @12:59PM (#9687041)
I got some very interesting results from feeding fractal images into a program like this a few years back - unfortunately, I don't have the resulting sounds, but you pick less busy images with filaments, and adjust the contrast - the result is very organic. Must have a go with this ...
Re:Ask HN: How do you log application events? on Monday April 27, 2015 @04:09AM (#9444913)
Do you really need to debug events from 3 and half years ago? Full logs only really need to stick around as long as you're likely to want to debug them. Log rotation is a must (I've seen debug logs nobody reads sitting in the gigabytes ...) Past that, you can cherry pick and store metadata about the events (e.g. X hits from userAgent Y on this day) with enough information you'll need to do trend analysis, although it's generally a good idea to keep backups of old full logs in case you need to reload the logs to find out that one thing you forgot to add to your metadata ... If you do genuinely need all of the data back that far, you should look at partitioning the data so you're not indexing over millions of rows - how you do that depends how you're intending on using the data.
Interestingly, that book has a review quote by Ken Thompson. I always wondered if the naming of Go(lang) was related to the game ...