News for hackers. Stuff that matters.

anom9999

Re:Details of UK website visits 'to be stored for year' on Wednesday November 04, 2015 @12:37PM (#10508155)
It's very sad to read this. Often you read comparisons from Westerners comparing UK privacy laws to China's and it's easy to brush it off as being sensationalist. But to hear that from someone living in China is really worrying.
Re:Show HN: Universal Pause Button on Wednesday June 10, 2015 @03:51AM (#9690579)
Only yesterday I was raging at Flash for continually chewing up my CPU and RAM. I hadn't even considered setting limits on the processes. So thank you for the suggestion.
Re:Show HN: I rendered the Go gopher using Go on Friday February 06, 2015 @08:01PM (#9012595)
You know, that's entirely possible. I was playing around with different methods of passing data between goroutines for increasing performance and I knew one of the methods I was testing wasn't idiomatic Go. However since I wasn't getting race conditions normally i assumed that the GOMAXPROCS fault wasn't down to my shonky code.

The weird thing is I thought I'd read somewhere that said Go defaulted to a process per CPU core (like the OP has hardcoded ib this project). I'm guessing that isn't the case then? It sadly wouldn't be the first time I've misread something! :(

Re:Go for C++ Programmers on Friday February 06, 2015 @03:31PM (#9011348)
Whichever you're most competent in. Any of those languages (and many others) would be a suitable option, so it boils down to what you are most proficient in.
Re:Show HN: I rendered the Go gopher using Go on Friday February 06, 2015 @03:12PM (#9011241)
I'm interested in more information about why you decided to alter GOMAXPROCS and what your results were from testing.

I've had a play with this myself and found that it cause sporadic and unpredictable crashing (very different style of application though - I was building a webserver). However this was an earlier iteration of Go (possibly Go 1.1 but likely 1.2) so things may have improved since then, or you might have found a saner way of tweaking it.

Re:Shellcheck: a static analysis tool for shell scripts on Thursday February 05, 2015 @06:07PM (#9006762)
> You are missing the part about manipulating other applications or controling GUI elements, like Powershell kind of allows via DLL interop and OLE Automation.

There are lots of command line hooks for GUIs. Want to copy data to the clipboard from the command line? xclip. Want to pop up a notification in your desktop environment's notification bar? notify-send "hello world!" etc

> As for /proc/sys, not all UNIXes have such features.

That example of mine was clearly taken from Linux - so it goes without saying that most UNIXes would behave different in that specific regard. Even so, they'd still have command line tools for doing the same thing (and to be fair, Linux does too, even with a vaguely-Plan 9 virtual file system)

> In Oberon I could pipe selected text from any application into any command that had a GUI aware type signature, for example.

Well like I said, I'm not trying to say that all REPL's are equal, but most of what you're describing is still possible in at least Linux. I'm not saying it's as intuitive nor "pretty" as it would have been on the Oberon, but it's certainly possible.

To be quite honest, most of what you've been posting on this topic has really just been elitism. And I do actually sympathise with your point as working in Bash can be a complete hateful mess at times (even without comparing it to the old Lisp machines). But that doesn't change the fact that Bash is a REPL environment.

Re:42 as a Service on Thursday February 05, 2015 @11:48AM (#9004204)
Now someone needs to set up another Heroku app to find the question.
Re:A little thing to love about Perl 6 and COBOL on Thursday February 05, 2015 @11:41AM (#9004154)
Exactly.

Arguing that one is better than the other is like arguing over which colour the best. Which is why I get so utterly sick of Perl being compared with Python - they are all going to have their strengths and weaknesses so at the end of the day, the "better" language / syntax boils down to personal preference.

Re:Shellcheck: a static analysis tool for shell scripts on Thursday February 05, 2015 @11:19AM (#9004004)
You don't need support for complex data types for a shell to be described as "REPL".

REPL is just a Turing-complete real time interpreter. Which means even the VBA "Immediate" panel in (as seen in MS Office) is REPL. And it means Bash is REPL too.

The question you're raising is whether all REPLs are equal. Lisp machines definitely had more control over the host than VBA does. But that doesn't mean that VBA's immediate panel isn't REPL just because a more powerful example exists.

As for Bash, that's a bit of a weird one because Bash wouldn't be much without the accompanying GNU / POSIX userland. But if you're willing to include a UNIX / Linux userland into scope then Bash has just as much control over the host as Lisp did on Lisp machines. But even without the aid of forking additional executables, Bash can still modify the state of the kernel directly. eg

    echo 0 > /proc/sys/vm/swappiness
    echo 3 > /proc/sys/vm/drop_caches
(For those who may not have been aware, echo is a built in command in Bash)
Re:A little thing to love about Perl 6 and COBOL on Thursday February 05, 2015 @04:23AM (#9002360)
Perl's pseudo-objects are, in my opinion, one of the weakest aspects of Perl. So I'm not going to disagree with you that many other languages do that one thing better. But it's not always appropriate to nest your objects that deeply anyway (in any language, that can quickly become a mess).

In my personal opinion, I prefer C-style braces over whitespace formatted blocks. Which means I find reading function and iteration blocks much easier to read in Perl than I do in Python. I'm not saying one is "better" than the other, but just offering a counter argument for how subjective language aesthetics really is.

Re:A little thing to love about Perl 6 and COBOL on Wednesday February 04, 2015 @07:07PM (#9000947)
I hear this argument time and time again and it's simply FUD. Bad Perl is no different to bad C++ or any other language with a flexible syntax. But it's also the same visa versa.

The problem with Perl is most times people are exposed to it, it's either from code golfing sessions were code is deliberately obfuscated; or when it's basically been used as a shell scripting language and thus often written by aging Perl hackers who don't care much for code cleanliness. And sometimes people just run away screaming because they simply don't understand all the regular expressions (but to approach Perl without an understanding of Regex is a little like trying to code Java without understanding classes then moaning about the weird surplus boilerplate code)

I'm not trying to say that Perl doesn't have it's faults. It has a great many problems. But to state that Perls syntax makes it impossible to write clean code, is just a daft flamewar argument.

Thank you for the recommendation. I will definitely schedule a visit some point soon.
I know this is possibly the saddest thing anyone has ever said, but the computing museum is one of my favourite places on earth.

It's a joyful place with so much old technology yet a refreshingly hands on attitude. I don't think there was a single exhibit that wasn't interactive by one method or another - which really matters when you're talking about technology that is largely at an age where kids are too young to have grown up with so it gives them a chance to play with the predecessors to their much loved consumer hardware - and it gives us adults a chance to do more than just reminisce about the fun days experimenting with emerging technologies.

I'd highly recommend that museum on it's own merit; let alone spending the day exploring the site and Bletchly Park as well.

Re:Windows 10 for Raspberry Pi 2 on Monday February 02, 2015 @08:47AM (#8984094)
> I consider myself a technical person and while I think it's fun to use Linux, it's certainly not productive.

Should read: "...I'm certainly not productive."

Just because you struggled with the Linux paradigm, it doesn't mean that it's an unproductive platform.

Re:Windows 10 for Raspberry Pi 2 on Monday February 02, 2015 @08:42AM (#8984077)
> I would also recommend it for studying operating systems

Perhaps not if you plan of contributing code to any open source OS. Practices like this can leave projects exposed to intellectual property violations.

This is why reverse engineering usually requires more people, each who isn't privy to the previous persons source material.

Re:Windows 10 for Raspberry Pi 2 on Monday February 02, 2015 @08:33AM (#8984041)
> Sigh. I think I preferred it when Ballmer was in charge and Microsoft seemed clueless :-/

It's funny you say that because I used to joke that Ballmer did more to aid the adoption of Linux than Shuttleworth had.

Re:Windows 10 for Raspberry Pi 2 on Monday February 02, 2015 @04:57AM (#8983468)
It's not that surprising news. NT has supported ARM for a few years now and the Raspberry Pi 2 is a pretty beefy board - all things considered.
Re:Hoax call to David Cameron prompts security review on Monday January 26, 2015 @08:52AM (#8946956)
Because enough members of HN found this interesting enough to up-vote the article.

The criteria is as simple as that.

Re:Mosh – a robust, responsive replacement for SSH on Thursday January 22, 2015 @08:30AM (#8929001)
It can do if you configure it to
Re:WebVR lands in Firefox Nightly on Wednesday January 21, 2015 @08:35AM (#8922974)
Oh I didn't think it would replace HTML. For me the appeal was because VRML was the closest thing we had to the 3D rendered remote mainframe logins that Hollywood hacker films loved to show off.

Running around a VR modelled web page made me feel like the Lawnmower Man or Joey hacking into the Ellingson Mineral Company supercomputer (well, maybe not Joey specifically because he was a n00b)

Re:WebVR lands in Firefox Nightly on Wednesday January 21, 2015 @07:42AM (#8922791)
The hardware has been ready for 15 years already (just think of all the 3D multi-player games and Second Life clones out there).

What we had to wait for was the technology to be reinvented a dozen times before client side web languages finally reached the same point that desktop software development was 20 years previously (and let's not forget the prolonged stagnation in web technologies as pioneered by the dominance of IE6).

Re:WebVR lands in Firefox Nightly on Wednesday January 21, 2015 @04:27AM (#8922250)
For all it's faults, I used to love writing VRML. In fact it was probably the last time I got giddy with excitement when talking about the internet as everything since has just been a case of trying to get web applications to catch up with desktop application.

I also agree that the world just wasn't ready for VRML. It was so far ahead of it's time that it even pre-dated 3D hardware accelerated graphics chips coming as standard on desktop PCs!

Just out of interest, what other reasons do you use Jails for?
Re: Outrageous HSBC Settlement Proves the Drug War is a Joke on Monday December 23, 2013 @09:24AM (#6954330)
> "Actually Clinton is allergic to smoke, and was well known on campus for making hash cookies which is why he said 'never inhaled' because he ate weed instead."

UK != US. So it stands to reason that I wasn't talking about Clinton specifically. But it's amusing to see the same stories happening on both sides of the pond.

Re: Outrageous HSBC Settlement Proves the Drug War is a Joke on Monday December 23, 2013 @07:24AM (#6953964)
The moment you push any kind of culture underground you automatically make it harder and more expensive to control. So the smarter move would be to legalise the less harmful drugs but create a safe, controlled environment for sale and usage.

While some of the more conservative people out there might disagree with people taking drugs, the fact remains that people do want to get high and thus those people will always find way to do so. To me, it makes more sense not to turn those people into outlaws and instead concentrate your efforts on tackling those who turn to drugs for non-recreational reasons (eg resolving addiction and/or peoples dependency on stimulants for escapism. Those individuals usually have other real life issues and -wrongly- turn to drugs as their "fix").

This will never happen though because drugs are given such a bad connotation in the press as the roots of all evil. Not all drugs are equal; whose which are proven to be relatively harmless compared to tobacco or alcohol are given the ridiculous label of "gateway drugs" - as if anyone who smokes two puff of a joint will automatically end up on the streets shooting heroin. If we want people off the harder drugs then we have to teach kids that not all drugs are equally bad - and to do this we need governments to send a saner political message about their stance on drugs.

From a personal perspective, I've done a few "magic mushrooms" at festivals in my younger years. They made me a little giddy but at no point did I rape, steal nor murder. In fact I was more pleasant company than when I've been drinking (and I'm not a rude drunk by any means). Yet since then, the UK government has made magic mushrooms illegal. It's just absurd to think that my previous actions, which were entirely harmless at the time, are now illegal. And when kids experiment (as many kids often do) they too will learn that government legislation is broken towards "softer" drugs. Which will make then re-evaluate their opinion about their governments stance on all drugs. So the government are really just wasting their own time and our public money by continuing on this charade that all recreational chemicals are evil.

The most hypocritical thing of all though, is I bet a great many of those in power have smoked weed at some point when they were teenagers / young adults (as we saw in the UK with the amusing yet frustrating confessions a few years back where several politicians came forward and admitted to "smoking but not inhaling". sigh