HNHacker News
TopNewBestAskShowJobs

genbattle

174 karma · joined March 31, 2011

New Zealand based Rust/C++ coder
submissionscomments
genbattle··on Things I like about programming in Go
Have you looked into using the built-in testing[1] library for unit tests; it seems very full-featured to me. In Go the flag[2] package contains the command-line argument parsing functionality.

Is it that you didn't know about these libraries, or that they don't meet your requirements? If the latter, what do you require from each of them that they do not already deliver?

[1] http://golang.org/pkg/testing/ [2] http://golang.org/pkg/flag/

genbattle··on Golang at CloudFlare
With other languages such as C/C++ if you link a library into your program statically, that library may dynamically load other dependencies. In Go, all dependencies have to be statically compiled into that package.

Rob Pike made a good point about this in one of the Go talks [1] (I think it was the "Meet the Go team" talk) when they were talking about package management and the static linking, and how in C++ you could get massive chains of useless includes (I think is came out of a question on the speed of the Go compiler). His reasoning was that all the code you need to compile a package should be in the one package binary. You shouldn't need to worry about having other 3rd-party packages that your dependency depends on installed on the target system.

[1] http://blog.golang.org/2012/07/go-videos-from-google-io-2012...

genbattle··on Dotcom search warrants declared illegal
NATO is the North Atlantic Treaty Organisation; New Zealand is in the South Pacific.

We haven't allowed any naval vessel carrying nuclear material (be it for weapons or power supply) to enter our waters since 1984. It's always been quite a point of contention with the US. It also happens to be a point of pride for the grand majority of Kiwis.

genbattle··on Unlearn, young programmer
Agreed. As the above type of eager young developer, I can say it has been rather disappointing the lack of mentoring and direction at my first job. Junior programmers are just assigned to a task and expected to complete it. Programmers that don't ask questions and bug other more experienced developers don't survive. Developers like myself learn the ropes after a while, but it's frustrating to have no real direction or encouragement.

I know this probably comes off as the comments of a naive young programmer, but I sort of expected that companies would have some level of formal or informal training. I thought I might even be sent to attend developer events or conferences. At the very least I expected there might be some sort of formal internal forum for knowledge sharing, presentations, etc.

Because of (what feels like) a lack of skill advancement, I spend the majority of my free time playing around with technologies I feel like I should be learning at work. But at most companies there seems to be this "We're not paying your to learn" attitude. It's very disheartening coming from a university environment. Plus it seems kind of self-destructive in some cases; if a company as a whole falls behind its competitors technologically, how can it be effective as a business in the technology sector?

I suppose by posting this i'm just making an argument for why i'm a nailgun/drywall saw type of guy. Hopefully the transition to a working environment will only get easier.

genbattle··on Go is amazing, period.
Go has utility called CGo that allows you to create interfaces to C libraries in Go. I've heard you can use some magic to get Go to talk to C++ by exporting functions back to C somehow (disclaimer: I'm not a C/C++ person).
genbattle··on Go is amazing, period.
Goroutines are multiplexed onto a set of threads defined by the Go program. They're not each a full thread; it's more like Stackless Python's version of threads. http://www.stackless.com/
genbattle··on Are game consoles dying? A 26 minute argument.
This is a really interesting perspective, and a very convincing argument. The decline of past media industries does show a trend that looks similar to the changes occurring in the current games media industry. These changes are never destructive (despite what the affected platform holders will say), merely transformative. It also presents an interesting argument for entrepreneurs; could old media formats like Arcade or Movie Theatres be bought back with some disruptive change element, just as PCs have recovered some ground with digital content (steam) and free2play models.

I think it's hard to say "Most game development is changing to mobile"; I think there's also a resurgence in PC gaming at the same time, but in a free2play/subscription model sense, without the restrictive policies of the console and mobile platform holders. With the launch of the PS Vita and the new technological advances on the horizon (A15, anyone?) I can definitely see mobile gaming and entertainment becoming a mainstay for most people. If gaming gatherings were as simple as bringing your phone/tablet/other misc. mobile device and meeting some people at a cafe or something to play together it would be a revolution. Imagine LAN parties with tablets + controllers or something. Self-contained portable gaming systems. This was sort of what I hoped the Vita would attempt; to make traditional gaming more social. To break down the physical barriers between gamers. But with the lacklustre games lineup and no real innovation in the platform, it appears mobile gaming is headed in a much more fruitful direction.

genbattle··on Ubuntu for Android
Exactly. It would be great to be able to use an Optimus Prime or something as a mobile development machine. My dream for android development is definitely to be able to build and deploy on a single device.

Of course there's a way to go for that. The range of devices that support mobile docks is very small; I would prefer support for tablets with attached keyboards/mice. If they managed to get this working on tablets, I would definitely consider something like the transformer prime to replace my netbook.

genbattle··on Double Fine raises $1m in less than 24hrs on Kickstarter
We can only see their kickstarter funding. They also have the higher-tier funding brackets they've been advertising on their site. My guess is they've probably had another $50,000-$200,000 put in at that upper bracket (one or two people are probably crazy/rich enough).

It's interesting that crowdfunding could really be a sustainable model for game development going forward; Double fine basically have all their development costs paid up front, so any extra sales on steam or whatever will be pure profit. I don't think it's a model that would work for every game, but it could be an interesting direction for small-medium studios like double fine to pursue; say once every 6-18 months they come up with another game they want to put out there, see if they can get it crowd funded, then if it gets funded they can go ahead with it. They can still do their more mainstream XBLA games etc. as their bread and butter, and use these games to keep the studio busy in between more traditional games.

The other interesting point is the "pay what you want" part of the model: people can put in $1 and just see how the game turns out, or they can put in $15 to get a copy of the game or release, or the really dedicated fans can pay more to get extra bonuses like lunch with Tim. This is a huge change from the traditional "one price for all" game pricing. It's also great that basically all of the money raised is going towards the game and the studio that made it.

genbattle··on How Your Cat Is Making You Crazy
This is a repost of an earlier submission at http://news.ycombinator.com/item?id=3573447

(It was probably posted previously before that)

genbattle··on How Your Cat Is Making You Crazy
I've heard this theory a couple times, and I have to say it's kind of unsettling to think that my personality and termperment may be just as much a product of which infectious organisms my body contains as the behaviors I have picked up from the people around me.

I've had cats all my life (outdoor cats), and I match the description of most of the personality effects described. That said, the author also felt she matched alot of the symptoms of the infection, but ended up being clear. I guess in the end it's just one of those things where you have to push it out of your mind and just get on with living life.

genbattle··on RasberryPi release date February 20th
There are a number of peripherals which are intended to be controlled by the GPU. These are omitted from this datasheet. Accessing these peripherals from the ARM is not recommended.

I can understand them not wanting you to access the GPU peripherals from the ARM processor, the GPU can handle out-of-order data access, but the ARM core cannot (although it sounds like you can get around it with some careful programming).

At this stage i'm happy we got anything out of them at all, limited as it may be. A datasheet for the GPU would be great though. But given the progress of Open Source drivers from the groups working with AMD and Nvidia (who are much more forthcoming than the embedded graphics vendors), I can't say I would prefer to wait 3 years for a functioning driver that can handle OpenGL ES 2.0 and accelerated video playback. You'll still need a binary blob in the meantime. And it's not feasible for them to just give away their driver source for free in the meantime, for the same reasons it was never feasible for nvidia or AMD to just open up their proprietary drivers.

I think in time the situation will improve, but you can't expect Raspberry Pi to reverse standard industry practices in a single leap and bound. Give it time, and see this release for what it is: progress.

genbattle··on Modern Language Wishlist
Wow, i didn't know any language had something like that. Can't say I'm surprised that it's a feature of Scheme/Lisp.

If OP said "Numerical Tower" in the first place I'd probably have looked it up and understood what he was talking about. Thanks for the info anyway. Learn something new every day on HN.

genbattle··on Why, oh why, do those nutheads use vi?
I think this is a case of not being able to have your cake and eat it too; you can make something easier to use, but it usually comes as a compromise to more expert users because you have to simplify the interface, remove functionality, reduce configuration options, etc. Conversely, adding more power will usually mean increasing the difficulty for beginners; if you require that users are comfortable with using a semi-programming language to write configuration files, you get more options and more power than you could via a simple and straightforward gui.

In the end I don't think either approach is better, just different. To address your first statement, I think editors can either choose to become better for experts in a particular domain, or they can choose to be easier to learn for beginners, or some compromise between the two. I have yet to see an application that manages to do both.

I agree that someone's subjective opinion of editors other than the one(s) they use is not very useful, but i don't think that was the point of the post you replied to. He was simply stating what I stated above; an app that is good for a beginner is not necessarily the best for an expert, and in the end you have to find some compromise between the two.

EDIT: For the record, I think vim has a pretty good learning curve; vimtutor is great, and you only really need to know the most basic parts of modal switching for gvim to be used like any other text editor. Once you gain some mastery of things like movement command, macros, markers, etc. you can really start to accelerate your workflow. I'm not one of those people that started using hjkl from day one.

genbattle··on Modern Language Wishlist
I also had the same weird feeling (see my post elsewhere in the thread).

I think Go's just still too immature for most people to invest deeply in. Production code can have a lifespan measured in years or even decades, so you want to use a language that's stable and mature, and you want to know that it's going to be around at least as long as your application. Things will change once the 1.0 Stable release rolls around, and people will really start dipping their feet in (and those people who have been dipping their feet might take a dive).

genbattle··on Modern Language Wishlist
Yea he mentions language features like interface-based polymophism, garbage collection, namespaces, first class functions, closures, etc. But then he goes on to talk about I/O methods, string manipulation, CSV output, etc. By which I think he means standard library features. The post really should have been split into language features + standard library features to make it clearer.

I may be influenced by the fact i'm into Go at the moment, but i think it covers most of the "features" he talks about, as well as many of the "libraries" (some may not be part of the standard library, but will be available through 3rd party packages). If the author is reading this, I encourage him to have a good honest look at http://golang.org/

I don't know if i like his discussion of "math-oriented types" vs. "machine-oriented types". At least as far as I see it (and according to wikipedia[1]), in maths whole integers (Z) are a subset of rational numbers (Q). When in your high-school maths class you say 3 + 2.5 = 5.5, you're really doing an implicit conversion to 3.0 + 2.5 = 5.5 or 3/1 + 5/2 = 11/2. Most languages allow you to also get rid of the bit-size of numbers by just defining "int" or "float" numbers that default to some predetermined bit-width (e.g. 32-bit). Most languages also have libraries or mechanisms (see Go and Python) for large precision numerical calculation so you can have your theoretically infinite size "no-overflow" situation; but that comes at the cost of speed, so we only use these types when it is specifically needed. It's not impossible to use them in all cases, but it is impractical.

In the end, a language can't do everything. Most languages focus on providing a good core, along with mechanism for users to extend functionality in any way they see fit. In this case I think the author wants the language to just do everything for him out of the box, without any pesky libraries, and without being bloated or slow. _That_ most certainly _is_ impossible. There is a good reason why no language implements _all_ of these "features".

[1] http://en.wikipedia.org/wiki/Set_(mathematics)

Ed: Z is a subset of Q.

genbattle··on The Internet wins: SOPA has been shelved, but we must remain vigilant
The timing of this withdrawal seems to fully indicate that the politicians involved have just tried to flush out their opposition and force them to play their hand.

Now Reddit, Wikipedia et al. will go dark, but they will not generate the support they could have if SOPA was still under debate. Now when someone sends a letter to their local politician, that politician will just send an automatic reply of "This isn't as issue, we're not even debating this right now, I don't know what you're talking about.", further confusing the public.

This is just a delay tactic being used to crush the groundswell around the current SOPA/PIPA bills. They'll come back when all opposition has faded away to a distant memory. Plus it gives the politicians who were involved plausible deniability on both sides; they're not dropping it, but they're not currently pursuing the matter either.

genbattle··on Raspberry Pi: We’ve started manufacture
But what about the extra 128MB of ram, and the extra USB port?

Also, You'd be hard pressed to get a USB Wifi Stick for less than the cost of the whole Raspberry Pi board in my country. Plus as you add more devices Wifi can get very saturated. Installation and configuration of USB Wifi adapters under Linux is a bit of a challenge. Ethernet on the other hand is practically plug and play.

There are also plenty of ideas which can use wired networking. Ideas from home automation to set-top boxes to microservers are all going to benefit from a more stable and high-bandwidth wired connection.

For general tinkering I would rather pay the extra $10 or whatever and get more options in terms of the hardware.

genbattle··on Why there might not be enough Raspberry Pi to go around
Looking at the Beaglebone, it seems to have a very different target market to the Raspberry Pi; judging from the single USB port, the lack of display adapter and the large number of GPIO pins, one would say the Beaglebone is primarily aimed at hackers, particularly hardware hackers. The Pi on the other hand is aimed at getting people into programming and teaching general computer skills to those who otherwise couldn't afford a computer.

I couldn't see my parents figuring out how to get a Beagleboard hooked up to their TV and surfing the net, but I could definitely see them doing this with a Raspberry Pi unit.

I'm sure I have heard of another board recently that was neither the Pi nor the Beagleboard that had similar specs to the Pi in terms of design, but used the same A8 as the beagleboard, clocked at 1.5GHz or something. But that project was just in its infancy, so won't be available till next year. I'm somewhat sceptical because they're throwing around specs like >1GB of NAND flash, >1GB DDR3-800, etc. for 40% less cost than the Pi.

EDIT: Someone linked it below, Rhombus Tech, using some Chinese-manufactured chip.

genbattle··on John Carmack's .plan file

  For me, while I do take a lot of pride in shipping a great product, the achievements along the way are more memorable. I don’t remember any of our older product releases, but I remember the important insights all the way back to using CRTC wraparound for infinate smooth scrolling in Keen (actually, all the way back to understanding the virtues of structures over parallel arrays in apple II assembly language..). Knowledge builds on knowledge.
Gems like this really show why Carmack has been such a successful developer. I found his week-long getaways an interesting concept; I can definitely relate to distractions often seeming like a really big problem in terms of momentum. These days with the internet I think it would take much more to isolate yourself and still be productive.
genbattle··on $100 Novo7 tablet: Android 4.0, 7" capacitive screen, USB 2.0, HDMI
I completely agree on the overpriced gadgets front.

For example, here in New Zealand an IPad will set you back about NZD$800-$1300 depending on your model (16GB Wifi->64GB Wifi+3G). Our currency is currently trading at around 87 US cents, so someone is making a huge amount of money off gadgets in this country.

If tablets reached our shores at something like a reasonable price, people might buy them. Plus this tablet would make a nice testing/development tablet if it can deliver decent performance for the price.

genbattle··on Ubuntu: Wake up and smell the Unity against you
I think the problem alot of people have is that Cannonical isn't listening to user input on Unity. They have their design brief that they've come up with, and their target (OS X). Meanwhile, traditional Ubuntu users are being displaced by the lack of community input and feedback.

In this way, Unity could end up hurting Ubuntu's growth much more than it helps it. Judging from comments online, many people are recommending Linux Mint to family members where they would have once recommended Ubuntu. There's no real evidence of this happening yet (distrowatch isn't a definitive source), but I think Canonical is playing a dangerous game in how it is interacting with it's community on unity and the issues around it. Some of the uglier public conversations/posts by Mark Shuttleworth and others only highlight the danger.

genbattle··on SOPA Hearing is Streaming Live
This makes no sense especially given that even a human observer could not tell instantly just by looking at a piece of content whether the content is properly licensed. As others have said, there no reasonable way to 100% correctly detect and filter restricted or copyrighted content based purely on the content itself.

Just look at the mess that is the patent system... even "experts" in a field or art are making huge mistakes when it comes to judging obviousness and originality. Why do people think a machine will do as well, let alone better when trying to judge legality of a piece of content?

I think what it comes down to is the content industries wanting to force technology companies to fight piracy for them. Technology companies know that trying to fight something like this (past a certain point) just leads to an arms race with huge amounts of collateral damage on either side. Media companies are throwing in the towel, they just want companies like Google to fight for them, and in doing so bear all of the responsibility and cost (while gaining zero benefit).

genbattle··on The Art of Touch by Microsoft
The site is mainly promoting Microsoft's new magic-mouse-ish touch mouse range. It doesn't even work properly with touch; a pinch to zoom operation in chrome simply zooms the page content, it doesn't scroll you through the content like the mouse wheel does.

The drawing tools are very cool though, considering how simple they are to use.

genbattle··on The Go Programming Language turns two
Go is possibly easier to get into production than something based on a hefty VM, because it compiles down into one relatively small executable (except for any dynamically linked libraries being used through cgo). If you've compiled a binary executable for the target platform all you have to do is put the executable on the production machine and run. No additional runtimes, no extra libraries or vm extensions. Everything you need is right there in that executable.

I find this to be a big advantage for using Go over something like Python or Java. You still need any dynamically linked DLLs, but all the Go code itself and the runtime is statically compiled and linked into the executable produced by gc.

As for the concerns about it not being used in production, there's Heroku: http://blog.golang.org/2011/04/go-at-heroku.html

All this is completely ignoring the fact that the language itself has a really nice syntax, and some excellent concurrency support. Nothing it does is particularly new, but I think Go is greater than the sum of its parts.

genbattle··on Why everybody love/hate Java?
The huge upside/downside for me is the sheer power of Java.

It has a huge amount of capability and speed, and it forces you into a very structured programming model that works well for large projects. The same applies to eclipse.

But for small projects it really is a ten ton hammer. The overhead of setting up full class hierarchies, GUIs, etc. for even the simplest application is huge. Again, the same more or less applies to eclipse.

genbattle··on College Kids
I definitely agree with the sentiments of everyone else on getting into a better College/University/Whatever. Also, the way things are going, and with your talent and drive, I would really recommend you consider doing a full Engineering degree. It may be another year of your life you spend in University, but even the smallest amount of extra investment counts when you're competing with millions of other graduates with diplomas/bachelor's degrees, and as qualifications they are recognized all over the world.

Of course it sounds like you're definitely struggling financially, so you may not have much choice in institution or program. Here in New Zealand we all get interest-free government loans to cover the costs of tertiary education, so in one way I've been lucky just because of where I was born. It is very hard to suggest what you should do, because the systems in place here are so very different to in the US.

If in the end you can't do much about your situation, make the best of it. Ace every assignment, tweak them with your own extensions which add extra functionality or go beyond the criteria of the assignment. If you are not being challenged by your study program, challenge yourself. Class is a very small overall part of your education; go out to user groups or other social group meetings (after all, who you know matters just as much/more than what you know), build things that teach you something new. You will learn more from these people and by yourself than you will from any test or assignment. Never in the rest of your life will you have the time, energy or resources to push yourself as far as you can while studying.

If you show passion and intelligence, people will believe in you.

genbattle··on What I Learned from Watching Notch Code
I don't think there's too much danger in going off-topic if the conversation is interesting and has some substance.

Yea I think lag in touchscreen interaction is a huge problem. I think this is largely a result of hardware. We've had to ship on atom-based hardware with 2003-era DX9 graphics. Even the latest Intel chips with DX10 are horridly slow when it comes to graphics.

The other side is actual touchscreen hardware. The machine used in the video is an HP Touchsmart, which uses an optical touchscreen panel. These panels have a latency of around 100-200ms, and that's before we even start processing the touch event information. Capacitive touch sensors are much better, but the're expensive to manufacture above about 10 inches.

In the end lag/accuracy is a reality of the low-cost hardware OEMs use, and there will always be some trade-off between hardware cost and performance.

genbattle··on What I Learned from Watching Notch Code
I'm not sure I would be allowed/qualified to say much about our financials. From what I can gather we are profitable, with ongoing contracts for clients such as Dell.

http://www.unlimitedrealities.com/blog/video-the-dell-stage-...

Those issues I mentioned are examples of things that we have actually run into.

edit: Our specialization in touchscreen development is really what drives the company, but hardware accelerated graphics are also a huge draw.

genbattle··on What I Learned from Watching Notch Code
This is the difficulty for the company I work for. We make a range of desktop applications including launchers, productivity apps, media apps, games, etc.

Because all of these apps are based on a game engine, we get the complex and hard to test bugs that games get (texture cache corruption, null pointers in the scene tree, etc.). There's much more serialization and pressure than with pure games (but still not as much as with enterprise applications) because we're dealing with transactions with 3rd party services, or because a screw up could corrupt a user's whole music collection, or because users don't expect their music player to crash every 4 hours.

The game engine adds a huge amount of extra variability to our applications; we have to not only watch out for obscure bugs in our custom script code (which the engine silently tries/fails to execute anyway), but also in the (C/C++ based) game engine it is driving. The upside to using an engine with a simple scripting language is the shorter development times to get things off the ground and the high-performance/shiny visuals, but I feel it costs us much more down the line in terms of stability and extensibility.

← PreviousPage 2 of 4Next →