HNHacker News
TopNewBestAskShowJobs

crowhack

64 karma · joined November 16, 2011

submissionscomments
crowhack··on The Ethereum merge is done
True, there are not many (or any) that will be as profitable but some still exist such as ergo, https://ergoplatform.org/en/get-erg/#Mining .
crowhack··on Why Zig when there is already C++, D, and Rust?
Cool trick, I did not know this, but it makes sense.
crowhack··on Why Zig when there is already C++, D, and Rust?
"I have to carefully make sure that each resource has been freed/closed (but not too soon!)"

You can use defer keyword to free right after allocating and it won't be called until the function/program completes. You can use debug or testing allocators to ensure no memory is left unfree'd or double free'd. The std lib has a large selection of custom allocators that you can use depending on your needs. One great one is an "Arena Allocator" which is just a linked-list of allocations that can be free'd at one time, versus tracking all these individual allocations. And if none of these allocators fit your needs, the interface to define one is pretty easy to implement. https://ziglang.org/documentation/0.7.1/#Choosing-an-Allocat...

"I'm not mutating or holding onto anything I'm not meant to"

Not really sure Zig can help you with this one. With great power comes great responsibility, or something like that.

"that I've accounted for every exception that I can result from a given call"

Zig does not have exceptions, but it does have error types which functions can return. From the function definition you usually can determine all the errors that can possibly be returned, unless the function definer use'd the catch all ! error type. Regardless, it is still much better than regular exceptions because

- you know by the function def that an error could be thrown, the compiler forces the caller to account for a possible error by "unwrapping" the return value

- an error happening just passes back a different type to the caller and in combination with the above, you can never "miss" an error https://ziglang.org/documentation/0.7.1/#Errors

Also Zig switch statements without an else ensure you handle every possible value so if you forget to handle one possible error (based on the type), it will throw a compile error. https://ziglang.org/documentation/0.7.1/#toc-Exhaustive-Swit...

crowhack··on Game Boy Advance “Hello World” Using Zig
Check out the Zig standard library and the tests for examples on doing some basic stuff with the language. Tests are generally at the end of files, you can search for "test".

0.5.0 Documentation https://ziglang.org/documentation/0.5.0/#Introduction

root std library https://github.com/ziglang/zig/tree/master/lib/std

examples of writing and reading to a file https://github.com/ziglang/zig/blob/master/lib/std/event/fs....

There are also a ton of projects that the creator has done with Zig, you can check those out for more examples as well.

https://github.com/andrewrk?utf8=%E2%9C%93&tab=repositories&...

Looks like he has an advent of code repo too.

crowhack··on Show HN: Strife, a 2D game library for Go
Yeah that's true but I disagree it's a good idea. Most AAA shops still use non-GC languages because they need the full control/cannot waste ms on random GC pass.
crowhack··on Show HN: Strife, a 2D game library for Go
Thanks for this link.
crowhack··on Show HN: Strife, a 2D game library for Go
How low latency are we talkin? 1ms , 10ms ?
crowhack··on Show HN: Strife, a 2D game library for Go
Rendering text at 60fps is a far cry from rendering a dynamic scene at 60fps.

Any examples of this being used for something non-trivial? I'm generally curious because I figured Golang would be a no-go due to the GC...

crowhack··on Racket v6.8
small world. im happy Clements is still teaching! his programming languages course with Racket was my one of my favorites.
crowhack··on Omnisense - Join the new humanity
What exactly is this? A chip you put in your wrist? A contact lens?
crowhack··on Show HN: Tool to turn your HTML into a collapsible tree
Yeah won't even open the tables for me, and wow 38.1kb.
crowhack··on The Eudyptula Challenge
I've been looking for an excuse for more C programming and less web dev. This seems like a great learning experience. Can't wait to start this!
crowhack··on From a Frat Social Network to a GPU Compiler for Hadoop
Enjoyed this :)
crowhack··on Show HN: Dpadd, Goodreads for games, is now open to all
Looks great. Probably too many features for my taste, as I deal with enough social networks in my life.

For the past couple years I've been using http://www.backloggery.com/ to keep track of what I am playing.

crowhack··on Microsoft looking to release Office for Linux in 2014
ahahahahahAHAHAAHAHAHAHAHAHAHAHA

I can't fully understand why I find this so funny but I am just falling out of my seat laughing.

While I find this extremely comical, I am excited to see the consequences of this for desktop linux. The way I see it, the more people who use linux the better it will become :).

crowhack··on Netflix releases House of Cards
they actually ported it to linux, let me find it for you.

edit: here it is http://lifehacker.com/5963726/netflix-finally-comes-to-ubunt...

crowhack··on Netflix releases House of Cards
I had the same problem with my blu-ray player. I had to go online and add it to my instant queue. Then I was able to access it on blu-ray player through my queue. I don't know why it doesn't show up on other interfaces besides web. Anyone else having this problem with other interfaces besides blu-ray and apple tv?
crowhack··on Netflix releases House of Cards
I really enjoyed the first 2 episodes. I wasn't sold after the first episode but after the 2nd I became a fan. The character development and pacing is great. It has this sense of foreboding and everything is always moving quickly. Since they expect you to binge watch there are no catch ups. If you're a fan of breaking bad you'll love house of cards.
crowhack··on C++ Grandmaster Certification
This looks awesome! Now to read about compilers....
crowhack··on Google-Asteroids – Arcade Style Search
If the search results just went to the side I think I would have enjoyed it more. Still fun but with constant break in the action it becomes annoying :/

Cool idea though!

crowhack··on Actual Facebook Graph Searches
My 'irrational' fear exists because of facebook's constantly changing uses of our data. When they began and we all started liking things we didn't know these same likes would be used for marketing purposes. We didn't know they would be used to sponsor ads. They went from a social network for people to a social network for companies. I agree with you and I do understand that I choose what is public, yes that's great; but how about the average user? Facebook makes money by selling it's users' data to companies. If everyone was private they wouldn't make any money.

This open graph search will be great for marketing purposes, and a silly tool for us users. I guarantee there are going to be some serious consequences of companies/governments having the power to instantly search and sort billion's of users' data. And maybe you'll say that some great findings can come from this search; maybe we can learn more about humans and societies with this tool? Maybe, but I believe the cost outweighs the benefits.

crowhack··on Actual Facebook Graph Searches
Yes I do but when I joined facebook I didn't realize they would create a super search engine to easily sort and categorize all of their users' data for more efficient targeted advertising. They sell likes, they have my friends sponsor ads they've never sponsored, they used 5 of my friends pictures to try to manipulate me into not deleting my account. We aren't their main customer but are there just to be targeted. Sounds like we are being used.

This graph search is just the last straw. It is terrifying the repercussions this search engine could have, and I believe this blog post shows some great examples.

crowhack··on Actual Facebook Graph Searches
Just did the same. I've had enough of being used.
crowhack··on BananaBread: 3D first person shooter game compiled to JS+WebGL
tried it in chrome windows 7, got error pointer lock/mouse is missing, any ideas?
crowhack··on Show HN: My 1-year project, iPad IDE with GitHub and Heroku integration
So I'm all for IDE's on the ipad, but why would you want to code on an ipad?

but regardless of my question, looks good man

crowhack··on The 501 Developer Manifesto
Personally programming defines me. It is a discipline that can only be mastered through dedication and time. I go through the entire day thinking about programming, I go to sleep thinking about programming. Just because I do it as a job as well does not take away from that. I realize that I am extremely lucky to be so passionate about what I do but it isn't stopping you to do what you want to do...go do it.
crowhack··on HOLY CRAP Wasteland 2 kickstarter
It's been very entertaining watching the pledge amount go up every couple of minutes. I really hope this gets funded!

What a stacked dev group as well!!

crowhack··on Pinterest’s first investor explains the secret to the startup’s success
Article didn't say much. Waste of time.
crowhack··on Dartendo lets you play your nintendo games in browser
has anyone got it working?
crowhack··on The dawn of a new era: Bastion now available on Chrome for free
Not really. OnLive is the future for gaming not games in a browser....

Edit: Hmm a question, does the game use your hardware? Or is it rendered elsewhere?