VR's Big Surprise: 3-D Worlds Have Little Appeal - <AUTHOR> https://www.technologyreview.com/s/602353/vrs-big-surprise-3-d-worlds-have-little-appeal/ <comment><USER2> Totally disagree. Vive owner, btw.

There is a huge lack of content in the VR space. It's a total blue ocean and anyone with a computer and a platform to dev on can strike gold on every try right now, especially on the PC-based ones like Oculus and Vive. The lack of VR content means people is just consuming whatever that is available--Youtube, Netflix, and so on. It's not that they aren't interested in 'real' VR content, it's that there aren't any VR content to be interested in.

<comment><USER3> Part of the content problem is that the market/platform is very much immature. It's like being a web developer in 1993. The total market is small, I think there are slightly more than 100k vives. That's tiny. The tools aren't terrible, but they're not great... they're mostly designed for traditional game development, and VR is tacked on top. Libraries are sparse... It's just really early.

<comment><USER4> Well, that's part of the appeal. I'm amazed to see chinese VR headsets on sale everywhere (I live in Uruguay, South America). I know very little people who actually own one, but a lot are getting curious.

I thought it would be the boom the past Christmas, but they actually might be either this Christmas, or, more likely, the next few Christmases.

This might be either good or bad... if there's no killer app (or game), a Super Mario for the VR platform, people who get burned might be reluctant to invest in VR in the future.

</comment></comment></comment><comment><USER5> I've heard that part of what made Citizen Kane so amazing at the time was the use of special effects and camera angles. Prior to Citizen Kane movies were treated like a recording of live theater, rather than it's own medium. Orson Welles treated film as it's own medium.

I feel like that's happening with VR right now. There's a new medium available and some people are simply porting what works in other mediums over. The real breakout hits of VR are going to be experiences that are native to VR and simply wouldn't work in any other medium.</comment>


WINE 1.9.4 Released - <AUTHOR> https://www.winehq.org/announce/1.9.4 <comment><USER2> Hilarious to see a fix specifically for Ultima IX in this release - [https://bugs.winehq.org/show_bug.cgi?id=13683](https://bugs.winehq.org/show_bug.cgi?id=13683)

Ultima IX, apart from being a terrible, awful end to a great series was renowned for being buggy as hell.

Kudos to the wine developers, if you're fixing things like this, you have an unbelievable attention to detail!

<comment><USER3> Reading the messages on this bug shows you how much of a hunt it was. It turned out to be undocumented messaging behavior in user32.

<comment><USER4> The Win32 documentation is sometimes best treated as historical fiction with an unreliable narrator. This is why Wine has a massive suite of test cases.

<comment><USER3> That's a clever way of perpetuating vendor lock-in: write shitty documentation that is still helpful for application developers but also simultaneously makes life VERY hard for interop layer developers (like the WINE project).

<comment><USER2> And given MS's business practices in the past (seem a very different company these days) it's actually pretty believable at least some of this was on purpose.

Certainly when you take into account all the undocumented API functions used by office et al.

</comment></comment></comment></comment></comment><comment><USER5> Funny, I just spent a couple of hours trying to get a game (that my girlfriend loves) working with Wine on Mac OS X. Wineskin proved to be very useful and after playing with some settings the game now works perfectly! Kudos to the Wine contributors :)

</comment><comment><USER6> Out of curiosity: Is there any Windows killer app in 2016 I need WINE for?

<comment><USER7> Photoshop. The only reason i am still running OSX is Photoshop.

<comment><USER8> If you aren't doing painting you should look into Nuke.

<comment><USER9> Do you mind Nuke costs 5x more than Photoshop? Otherwise completely agree.

</comment></comment></comment></comment><comment><USER10> I'm always curious with releases of Wine about specifically what new software can be run that couldn't be run with the previous version(s).

It's been a _long_ time since I've done anything with Wine, but I'm pleased to see that they have a rather comprehensive wiki/application compatibility database at [https://appdb.winehq.org/](https://appdb.winehq.org/) that includes detailed instructions for getting things running. The last time I had a need for Wine, I ended up buying Crossover Office after nearly causing myself a bald spot trying to get an application working[1]. It's nice to see such a comprehensive source of help for those of us who are unfamiliar with the ins and outs of Wine.

[1] IIRC, the setup file was not possible to "just run", whereas Crossover gave me a "point it at the CD and launch the wizard" approach, though at a $60 cost. I'm not against spending the money, especially since they are actively involved in contributing to the success of Wine, but it's nice that it's looking like the product is becoming a lot less necessary for newbs like me. I guess I'll see how far the mileage goes when I get Ubuntu going on the laptop I'm currently loading.

</comment><comment><USER11> I never used wine too much but lately have been utilising it with the playonlinux configuration front-end (hint: games for kids) and it's great. I will also test next week one of Minolta's Windows only colorimetric drivers. Right now, even virtual box didn't do well and we have to use separate box just for the spectrometers.

</comment><comment><USER12> I wonder if they have any plans on implementing DirectX on top of Vulkan to make things faster.

<comment><USER13> There wouldn't really be a big advantage to that I think. The whole point of Vulkan is to give more control to the application developer (submit work from multiple threads, etc).

<comment><USER3> The statelessness is the advantage, in which case there is a nice mapping onto DirectX12. Otherwise you'd have to calculate and do Delta state changes yourself.

Then for DX11 and earlier, the state would be the draw calls themselves so to speak. You'd be shocked at how many game engines horribly mismanage state.

</comment></comment></comment><comment><USER14> Can anyone tell me if latest Adobe CC (2015) Cloud'n'stuff™ works on WINE? Namely how Premiere, After Effects, Illustrator, AME, and Photoshop behave in contrast to Windows? If they work at all.

<comment><USER10> Some do and some don't. I haven't personally tested any of these, but according to the application database, only Photoshop CC 2015 has reached "Gold" level of compatiblity.

Photoshop CC 2015 will work with some issues on Arch Linux[1], After Effects support is limited to version 7[2], Premier CS3 appears to be the only version with any support at all (Bronze)[3], Illustrator CS 6 is the latest supported at Silver level[4]

[1] [https://appdb.winehq.org/objectManager.php?sClass=version&iI...](https://appdb.winehq.org/objectManager.php?sClass=version&iId=32438)

[2] [https://appdb.winehq.org/objectManager.php?sClass=version&iI...](https://appdb.winehq.org/objectManager.php?sClass=version&iId=32438)

[3] [https://appdb.winehq.org/objectManager.php?sClass=version&iI...](https://appdb.winehq.org/objectManager.php?sClass=version&iId=32438)

[4] [https://appdb.winehq.org/objectManager.php?sClass=version&iI...](https://appdb.winehq.org/objectManager.php?sClass=version&iId=32438)

<comment><USER14> Ah, thanks. Damn, I use those applications daily in heaviest of workloads imaginable. I guess it's not for me then. Adobe's applications are the only thing keeping me on Windows, and I can't live without them.

</comment></comment></comment><comment><USER15> I always wondered how safe is it to run something in Wine? (E.g. Steam games)

<comment><USER16> What do you mean by safe?

<comment><USER15> Well, in Windows if you have an Antivirus you will get at least some notification that something is suspicious. But in Wine you don't have an Antivirus.

I am just not sure about the worst case scenario.

<comment><USER17> I wonder if Wine ever led a windows virus to infect a linux installation

<comment><USER18> Yes, viruses in Wine actually happened.

That is the reason I'm still dependent on VMs. I don't want to compromise my main OS.

For further information: [http://askubuntu.com/questions/562388/do-wine- viruses-only-w...](http://askubuntu.com/questions/562388/do-wine-viruses-only- work-while-wine-is-running)

<comment><USER15> I guess if I only use it for 1 Game on Steam I will be fine. The game doesn't work in a VM.

</comment></comment></comment></comment></comment></comment><comment><USER19> has anybody any experience with running the evernote desktop client using wine ?

</comment><comment><USER20> Nitpick: I just don't like seeing the name written out butchered, but it's Wine not WINE (and the latter looks a lot worse IMO)

<comment><USER21> Given that it was originally an acronym, and the logo of the official website uses block-caps, it's hardly butchering to write it as WINE.

<comment><USER20> True. Originally yes. If I were them I'd look into changing their logo but alas.</comment></comment></comment>


Xhyve – Lightweight Virtualization on OS X Based on Bhyve - <AUTHOR> http://www.pagetable.com/?p=831 <comment><USER2> This runs boot2docker pretty well out of the box. I made the required edits to xhyverun.sh as found in this gist: [https://gist.github.com/bruienne/d1053df883b47822c6e](https://gist.github.com/bruienne/d1053df883b47822c6e)

It requires that you copy the vmlinuz64 and initrd.img files from the B2D ISO to a local filesystem location. As of right now enabling networking requires root privileges. Not sure if the Hypervisor framework has user-level accommodations for that.

<comment><USER2> Blegh, [https://gist.github.com/bruienne/d1053df883b47822c6e0](https://gist.github.com/bruienne/d1053df883b47822c6e0)

<comment><USER3> thanks! what about volume mounting and port forwarding, are supported already?

</comment></comment></comment><comment><USER4> Really glad to see someone using Hypervisor.framework, looks like it has a lot of potential. Fusion/Parallels always seem far too heavyweight to me.

<comment><USER5> Not to mention they're paid solutions, closed source and are horrible for battery life. Their only advantage is nice set of GUI tools and tight OS X integration.

<comment><USER6> VMWare Fusion is, in my experience, everything but horrible for battery life. I frequently spin up VMs with Vagrant, do something with them and then switch to other tasks. More often than not, I forget to shut them off, mostly because their impact on the battery life is so minimal that I don't notice them until I run `vagrant global-status`.

<comment><USER7> This probably depends greatly upon whether your machine has discrete graphics or not. On Macbook Pros with nVidia graphics like my 2014 higher-tier Macbook Pro, there is a dramatic loss in battery when the discrete graphics kicks in. However, most Macs sold now don't have discrete graphics because the Intel integrated graphics is honestly pretty decent nowadays for most tasks. The difference is 3 hours of battery and 8+ for me.

Google Chrome, similarly, tends to drain my battery a lot, and that alone has encouraged me to go to Safari on Macs.

<comment><USER8> Or just use gfxCardStatus to lock your machine to the integrated GPU all the time

<comment><USER4> Can anyone tell me why this isn't an inbuilt feature of OS X? Preferably in the 'Energy Saver' pane of System Preferences, e.g. while on battery power, only use integrated graphics.

<comment><USER9> There was a discussion that sometimes it is better to run a task quick on GPU than to run it for longer time on CPU. Would be cool if someone could try to prove this or inverse. :)

<comment><USER4> Maybe it'll be different in Metal-backed El Capitan, but my experience so far has been that the discrete GPU universally degrades my battery life. I'm glad I have it though; sometimes I need it, but it'd be nice if I could just disable it completely most of the time.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER10> This is great, is it possible to make it work with Docker?

Edit: Yes, it is.

Edit2: It is possible, but whether is it worth it or not is still a question. xhyve is a supervisor after all, you still need to boot a vm to use Docker. So if you like me, thought for a second that this can make containers in OSX a reality, don't get excited too early.

<comment><USER11> Not sure how useful OS X containers would be. Are you deploying on OS X?

<comment><USER10> The benefit for me would be quick, isolated development environments. I want to boot a contained swarm of services connected to each other in a single command, and shut them down in a single command as well

<comment><USER12> And installing docker / docker-compose / machine, etc. using one brew command would be a great addition in order to ease introduction of the tool to the whole team.

<comment><USER13>
        brew install docker docker-compose docker-machine
        open https://kitematic.com/download/

Kitematic might even come with docker, docker-machine. It will then set up a docker machine for you and you're ready to go.

<comment><USER14> Yes, Kitematic does install docker-machine automatically which also sets up docker.

For CLI, in Kitematic menu there is a button where you can install the binaries.

</comment></comment></comment></comment></comment></comment><comment><USER15> Definitely time to add Hypervisor.framework to the list of interesting things on OS X to check out. Related: I'd love to see a Vagrant provider for Xhyve, may have to hack on that a bit later.

</comment><comment><USER16> OK. That's freaking awesome. I like seeing FreeBSD technology being brought into the mainstream in OS X. (I don't even use OS X, but this is cool.)

</comment><comment><USER17> I guess this is pronounced "X-hive" and "B-hive"?

Initially I thought it was "zive" and "bive", like "bive" was a foreign word from somewhere. Bhyve, the muse of unit tests!

<comment><USER18> Ten-hive :D

<comment><USER19> But nobody I know pronounces Xcode as ten-code.

<comment><USER20> Never thought to. I am starting today.

</comment></comment></comment></comment><comment><USER21> Fair warning, this may cause a Kernel panic. I've contributed to the bug with my trace, but it's definitely something to keep in mind when checking it out.

I really want this to work, though. It would be a great replacement for VirtualBox.

<comment><USER22> I honestly wouldn't notice. 10.10 kernel panics on me about once a day. It's the WORST EVER release of OSX by an amazing margin.

</comment></comment><comment><USER23> I wrote a quick set of scripts to get CoreOS booting under xhyve as a container host. The defaults will expose SSH and a docker client port and drop you directly into a shell. Some quick getting started info here:

[https://github.com/coreos/coreos-xhyve#coreos-- xhyve](https://github.com/coreos/coreos-xhyve#coreos--xhyve)

Lots of GitHub issues filed for next steps in exploring this technology. Really exciting to see a simple CLI driven virtualization option on OSX. Patches accepted. :)

</comment><comment><USER24> This project is awesome. No more vmware fusion for me. Props to netapp for funding and driving the bhyve project. FreeBSD was desperately in need of native virtualization capabilities.

<comment><USER25> Note that apart from bhyve (available today), FreeBSD 11 will also come with Xen Dom0 support.

<comment><USER26> Great news. That will allow ZFS in a FreeBSD driver VM, providing storage for other guests, even with a Linux dom0. Is FreeBSD 11 expected this year?

<comment><USER27> Next year in july: [https://www.freebsd.org/releases/11.0R/schedule.html](https://www.freebsd.org/releases/11.0R/schedule.html)

</comment></comment></comment></comment><comment><USER28> Ran the script. Hit Ctrl-D instead of sudo halt and it hung, had to kill the proc from another shell.

But, compiled clean, test vm started fast. Will look at again.

<comment><USER11> Looks more like an issue with the VM rather than xhyve. Serial console does not seem to get respawned.

</comment></comment><comment><USER12> It would be great if Docker integrated / embedded that instead of forcing users to download / configure VirtualBox + boot2docker.

<comment><USER28> I'm not sure docker would want to do this or if that's even an appropriate feature to integrate.

I'd rather see it supported by vagrant, which would seem an appropriate tool to manage them with.

<comment><USER29> Docker has a huge interest in making it easy for the legions of Mac-toting developers to use it easily without first telling you to get complex, fragile external tooling like vagrant or virtualbox working.

I doubt it'd go in the mainline product but I'd be shocked if in a year or two there isn't a Docker.app one-stop option which makes it trivial to run popular Linux apps.

<comment><USER28> > use it easily without first telling you to get complex, fragile external > tooling like vagrant or virtualbox working.

I won't get into virtualbox. But I haven't found vagrant very fragile at all since Mitchell moved to omnibus (quite a while back). Most of the issues I had with vagrant were directly related to virtualbox, not vagrant itself.

> Docker has a huge interest in making it easy for the legions of Mac-toting > developers

Well, sort of. They have a product that is inherently linux based. Getting a nice setup working on OS X is pretty trivial, takes a developer maybe a couple of hours one time to have something working.If they use someone else's solution, it takes minutes.

Here's an ansible task I use to configure an ubuntu machine[1]. It's all of 24 lines. If you're running it against a VM, you just forward the 2375 port to your host. Then the workflow looks like:

        vagrant up
        docker build -t jkyle/awesomeness .

Course you can get fancier. Ansible can pull down docker projects using git, build, and run them for you as well.

[1] [https://gist.github.com/jameskyle/b8e573d63da4dbaaf31a](https://gist.github.com/jameskyle/b8e573d63da4dbaaf31a)

<comment><USER29> Yeah, I know many people who use and like vagrant but I've heard a too many people mention it as a major impediment when they were just getting starting. Sure, someone with a bit of sysadmin experience can usually get it working fairly quickly but I've seen entire meetups where 90% of the people used a Linux instance on EC2 rather than try to debug it.

Anything which makes that process easier for newcomers is welcome, particularly for non-specialists like front-end specialists, scientists, data- analysts and other technical professionals for whom figuring out a toolchain is a road-block to their job rather than the job itself.

</comment></comment></comment></comment></comment><comment><USER26> Hopefully Apple will add Hypervisor.framework support for Intel's hardware- virtualized graphics, [https://01.org/zh/blogs/skjain/2014/intel®-graphics- virtuali...](https://01.org/zh/blogs/skjain/2014/intel®-graphics- virtualization-update?langredirect=1)?

</comment><comment><USER30> I'm curious why there is a restriction of 2010 or newer mac. Is it something in the CPU that's needed? I've 10.10.3 installed on a non supported mac and wanted to use this, but getting errors when I try the test Linux

<comment><USER24> You need a CPU that supports Intel's virtualization instruction set. Specifically VT-x. You can check if your CPU supports it with: sysctl machdep.cpu.features

You're looking for VMX. Here's an example from mine (highlighted the flag you're looking for):

machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL * VMX * SMX EST TM2 SSSE3 FMA CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC MOVBE POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C

<comment><USER31> Most Macs have had VT-x enabled since.... 2007?

The critical hardware feature they _didn 't_ all have is EPT[1], which may be required here in addition to VT-x.

[1] [https://en.wikipedia.org/wiki/Second_Level_Address_Translati...](https://en.wikipedia.org/wiki/Second_Level_Address_Translation#EPT)

<comment><USER32> This (missing) EPT must be the reason my MacBook Pro from 2009 is crashing when running it. Thanks for pointing that

</comment></comment></comment></comment><comment><USER33> That's really great! I had to rebuy VMware at work and Parallels at home when Yosemite came out because of the new hypervisor framework modifications that these two needed under Yosemite (I presume).

I don't really use the OSX integration of both systems, other than file mapping/sharing (I run Linux and Windows VMs).

Glad to see this, many thanks!

<comment><USER29> I don't know about Parallels but VMWare Fusion 6 runs just fine on Yosemite – there's almost no reason to upgrade unless you want new icons.

That said, I'm completely with you on the value of Hypervisor.framework for people who are e.g. running Linux test instances and not really seeing much benefit from the UI integration but who still want to avoid the performance / stability problems caused by using virtualbox.

<comment><USER33> I had been making do with VMWare Fusion 5, so it truly refused to work on Yosemite. (I also had Parallels 8 at home, which refused to work).

Hopefully the upgrades will be only necessary every two years.

Stability problems with VirtualBox are very real. I haven't touched that for years.

<comment><USER34> > Stability problems with VirtualBox are very real. I haven't touched that for > years.

What issues do you have? I've been running VirtualBox on OS X for 6+ years and have never had stability issues. I usually have a few VMs running at a time via vagrant.

<comment><USER33> Under Snow Leopard (yes it was that long ago) it would frequently kernel panic so I stopped using it. I have never had VMware kernel panic on me; Parallels has crashed once or twice but never kernel panicked.

I did use VirtualBox for running Windows 95 the other month though. I am not complaining about VirtualBox or advising against its use, just I had some issues on OSX.

Under Windows and Linux it ran fine, just OSX was dodgy for me.

</comment></comment></comment></comment></comment><comment><USER5> The title is a bit misleading, it could say 'Xhyve – Lightweight Virtualization for OS X based on FreeBSD's Bhyve'

<comment><USER35> Bhyve is FreeBSDs...? I don't follow how it is misleading.

<comment><USER5> It is in fact - it is called The BSD Hypervisor [1] and so far it exists only on FreeBSD, and this is where it was born. There are some forks to port it to other platforms (like Joyent's SmartOS) but they're closed and not out yet.

I consider technology awareness, competition and diversity a very good thing, therefore I think its important to mention FreeBSD in this case (and other BSD's too in other cases).

By the way, have you donated to FreeBSD [2] and OpenSSH [3] yet? ;)

[1] [http://bhyve.org/](http://bhyve.org/)

[2] [https://www.freebsdfoundation.org/donate/](https://www.freebsdfoundation.org/donate/)

[3] [http://www.openbsd.org/donations.html](http://www.openbsd.org/donations.html)

<comment><USER35> I've been buying OpenBSD CD's since 3.4 and a long time friend has commit bits with the FreeBSD project. I am a big BSD supporter :)</comment></comment></comment></comment>


Is Git Compliant with GDPR? - <AUTHOR> https://email@example.com/ <comment><USER2> > _But if the aforementioned interpretation was assumed, the git authors could > be held responsible for non-compliance._

No. The Git authors do not collect, control, or process personal data. They don't even have these data.

Any personal data contained in a Git repo are controlled by whomever owns the repo. Git is just the software tool.

Considering how specialised Git is, I think it is fair to assume that anyone that configures their real name and email address in Git know what they are doing and what it is used for, which is to identify them as author of a commit, and they do it voluntarily.

To me it does not seem different from sending an email to someone or to a distribution list: The sender provided their name and email address to the recipient(s). This is used to identify the sender, but that does not give the recipient(s) to do more than that with the data. And when someone configures their email account they understand what the purpose of inputting their name is.

On the other hand, if someone want to use these data for another, additional purpose they would require specific consent.

<comment><USER3> Git asks for Name and Email to do it's job. That's allowed under GDPR. It's voluntary which is what GDPR requires.

You don't have to share it (push to a remote). If you do, that's a decision you made. The person who has that data then is not the authors of Git but whoever owns the remote.</comment></comment>


Ask HN: For those in 20s or 30s who retired, what do you do all day? - <AUTHOR> <comment><USER2> For those that think retirement is the best, think again. I know of a few people that had plans for what they would do if they could retire. When they got the opportunity they started strong but from what I've seen they are just drifting. They don't have to do anything so they don't. They have enough money to live a middle-class life and they just hang out most of the time. They don't have any real goals or the pressure to create them. Dreams are great but if you don't have the pressure to make them come true it's easy to just give up. They have 30+ years at least of what they call retirement.

Is it good? Is it bad? That's up to each to decide.

</comment><comment><USER3> If I could retire, I would work on my own projects.</comment>


I Am Going to Take Bitcoin and Cryptocurrencies Mainstream - <AUTHOR> I am the founder of a very new bootstrapped startup called BitYOLO. BitYOLO is started with a very simple goal of getting people in the habit of using bitcoin. Just like any national currency, once people have bitcoin in their wallets and hands, they are bound to use it. And once they use it and understand how easy it makes their life, they will spread the message, getting more people to use it. And for that, I believe giving people Bitcoin as rewards is the best way to go forward.
BitYOLO is an online service that earns you Bitcoin everytime you shop, search, find, listen, learn, subscribe online. The website is www.bityolo.io We do this by sharing a part of our earnings, usually 40% to 82% with our users.
We earn money through affiliate earnings from our partner online stores. As of right now, we have pre approval from 200+ online stores which will be LIVE on on our service. Right now, we are in testing phase of our product. BitYOLO will go LIVE in november 2019. For expenses, I have spent all of my savings in the development of this project.
I am the sole full-time team member as of now, based out of Singapore & India, Apart from me, I have some friends and previous colleagues who are working with me on Pro-Bono basis and some freelance developers who are creating the platform. My name is Shamik Sharma, you can check my LinkedIn here: https://in.linkedin.com/in/nameshamik.
Our Early Access Program is a multi referral program. In which you earn money in bitcoins for taking part in the program and referring your friends.
All of the amounts in BTC will be transferred to the user's wallet of choice.
We are also LIVE on product hunt at www.producthunt.com/posts/bityolo
I urge all of you to please ask me questions and any doubts you may have.
Due to 2000 character limit on Hacker News, cannot post more details, please ask below. <comment><USER2> So it's affiliate commission cash back like dozens of others but you only pay out in bitcoin.

<comment><AUTHOR> Hey LuckyLion yes. But, not like others since we are sharing a majority of our earnings with our users. Also, the main reason for me to create this project was because I live in india, where the space is not cryptocurrency friendly. But, since my main focus was in Blockchain space as a project manager I wanted to do this only. I simply want to make Bitcoin the main currency. Getting people to use it.</comment></comment>


Ask HN: Help me become a great hacker - <AUTHOR> Esteemed HN crowd,
I have always had an affinity for all things computer/technology related since the age of 11 or so. Almost every day, I would run home, after being dropped off by the bus, to watch an hour or two of ZD/TechTV, learn a few registry 'hacks', and spend the rest of the night tinkering with my precious e-machines rig.
Entering junior high, I knew I had a future in computer science and soon developed a love for business as well. However, being born into a very traditional family, my path had already been set for me. To them, I was already destined to being a dentist, pharmacist, or doctor. After many failed attempts at convincing the parents, throughout high school, that comp sci/business was my true passion, I was forced into pursuing a medically oriented major.
And here I am, about to graduate university, and I am fairly certain that a medically oriented career is not for me. After years of lurking HN, reading TC and all things web/tech, I've come to realize that the flame my parents have tried so adamantly to put out is shining brighter than ever. However, seeing as I've been caught up with studies over the past years, and lacked parental support to pursue my path of choice, I have little knowledge of all things programming.
So I come to the community filled with intelligent, creative, and knowledgeable hackers to help me begin my journey in becoming one. I've skimmed python and ruby books, but that is the extent of my programming knowledge. So as an absolute beginner, what resources, books, tips, tricks, etc. etc. do you have so that I may start forging my own path?
I want to become a great hacker. <comment><USER2> We should really develop a ceremony. A sort of Hack Mitzvah. We could have an eminent member of the open source community dress up in a big ceremonial robe covered in surplus electronic parts, and people could approach one by one to be handed a tiny gold-plated lambda and have the ceremonial blessing pronounced: "Today, you are Free. Go Forth and Build Something People Want."

I'm not sure I'm kidding. The time after one leaves school can be very stressful. Especially if you're trying to cope with parental pressure. So it feels kind of boring, perhaps even harsh, to just come right out and tell you: There's no secret. Just build something. You do not need our permission, and we will give you contradictory advice anyway [1], and all the tools you need are in front of you [2]. Stop flipping wistfully through the Ruby book and dive in to Ruby! If you need help being silly go visit _Why's site!

<http://shoooes.net/> [3]

You may also find the presence of actual humans helpful. They can be good for one's morale. Are there any tech-related gatherings in your town? If not, is there a better town you could move to?

Oh, and be sure to watch this Ira Glass video:

[http://www.youtube.com/watch?v=-hidvElQ0xE&feature=relat...](http://www.youtube.com/watch?v=-hidvElQ0xE&feature=related)

There may come a dark time when you need to watch this video daily. Hang in there.

\---

[1] We're all working on different things, which require different technologies. We have different preferences. And, even if you get everyone to agree on the problem, nobody really knows what the best solution is, or whether the best solution will remain the best beyond next week.

If you _really_ want a recipe: Linux, emacs, Rails, jQuery, Web app. For furious debate about every single element of that list... see all the rest of the posts on HN.

[2] Well, okay, technically that's not true. You are going to need a lot of time. And food. And the occasional break. Get a day job! You can practice subtle career-path misdirection if you manage to get a day job that combines medicine with a smattering of technology. There are lots and lots of those. You might even like one of them.

[3] This was going to be hacketyhack.net but it is currently... "transforming".

<comment><USER3> I'm with mechanical_fish on this one. I am far from being a "true" hacker but I've learned along the way that programming (hacking) can really only be refined through practice.

Believe me, I used to think that reading books/tutorials/articles made me a better programmer, but, honestly, building something is the best way to learn.

As for steps, I'd say go in this order:

1\. Do some (quick) research about some languages you're interested in.

2\. Decide on the language that is most intriguing to you and that you think you'd stick with.

3\. Find an idea for an app that will be useful to you. Be sure to set the goal of your first app properly-don't try to take on too much (mathetica clone) or too little (Hello World) with it.

4\. Build the darn thing. This is the point where you'd start looking up tutorials/etc in order to figure out _how_ you'll actually do things with the language.

</comment></comment><comment><USER4> Don't forget that great hackers didn't become great by wanting to be so. They started working on a problem -- just like any other entrepreneur -- but their abilities to make machines do what they wanted was what set them apart. Technology is leverage.

Start small. Make a website or write a tool for some idea you have, and your development will grow out of there organically.

<comment><USER5> > Start small. Make a website or write a tool for some idea you have, and your > development will grow out of there organically.

That's probably the best advice for would-be hackers I have seen for a while. kudos.

</comment></comment><comment><USER6> A good start would be: try not to waste what you've learned. A starting point would be to imagine ways to improve medicine via computing. There are always ways that our information systems can be improved. It doesn't have to be an impressive field or anything, even a small problem will work. Design what you think a solution might be. Learn enough to do coding experiments with said solution. You'll iterate over it a ton. If the problem turns out to be big you will probably find yourself exploring things far off from the original problem and eventually, maybe years out, discover you've hit on something new. It might be viable as a business, or just a ground-breaking concept. Either way you will hit on it if you keep exploring.

(This is from the perspective of doing mostly non-commercial programming. In commercial work you are mostly cleaning up other people's messes; there is little of interest and few learning opportunities after a certain baseline.)

</comment><comment><USER7> You might find _The New Hacker's Dictionary_ to be useful for establishing some background history and terminology.

For programming material, maybe take a look at _Structure and Interpretation of Computer Programs_ , and see if it looks like a good fit for you. _The Little Schemer_ would also be a good read.

Most important is to start hacking. Pick a language (Python, Ruby, or Scheme might be good starting places), learn how to write some trivial programs, and start expanding, seeking out more books and reference materials as you need them.

</comment><comment><USER8> Offtopic, but maybe not: You're a great writer.

<comment><USER9> I'll throw my support behind this: you've got a knack for writing and keeping attention.

That's a useful thing to be able to do: not for programming, perhaps, but the same tricks that keep people interested in long blocks of writing can be used to make a program appealing and engaging.

</comment></comment><comment><USER10> For basic motivation and direction, try Don Lancaster's site and books.

Reading programs is just as important to the budding (and expert) hacker as writing them. As goofy as it sounds, I found lots of inspiration trying to convert BASIC game programs (as in Ahl's 101 Computer Games) to Python. First time through try to get it to run. Then try to get it to work with fewer lines. Then add some features. You'll be surprised how much you learn.

Good luck.

</comment><comment><USER11> "And here I am, about to graduate university, and I am fairly certain that a medically oriented career is not for me. After years of lurking HN, reading TC"

Sorry, what's TC?

<comment><USER4> TechCrunch

<comment><USER11> Oh, thanks. :)

I personally never thought TechCrunch to have that great of reading material. For me HN, proggit, /. and a few blogs do it (Coding Horror, Zuckerman's "My Heart's in Africa", etc.). I hope I'm not missing on much else.

</comment></comment></comment><comment><USER12> How do you know that programming is your true passion if you've never built a program? Try it and see if you really like [rogramming.</comment>


ApsaraCache: A Redis branch originated from Alibaba Group - <AUTHOR> https://github.com/alibaba/ApsaraCache <comment><USER3> Hi all, I'm here in Hangzhou and had the pleasure to have a meeting with the team working at that. It's a great team and we'll work into merging stuff into upstream Redis when it makes sense. It's cool that companies other than Redis Labs are starting to contribute to the development!

Note that this branch is based on Redis 2.8 so of course porting stuff requires some work.

<comment><USER4> >Note that this branch is based on Redis 2.8

Hmm. The Github repo says it's based on 4.0: "ApsaraCache is based on the Redis official release 4.0" (from [https://github.com/alibaba/ApsaraCache/blob/develop/README.m...](https://github.com/alibaba/ApsaraCache/blob/develop/README.md))

<comment><USER3> Oh probably I mistaken other patches I discussed that will need to be ported. Thanks for the reply.

</comment></comment></comment><comment><USER5> Reminds me of HHVM: a specific solution developed by a specific team for their specific problem.

Might help Redis on the long run though: some ideas might be brought back to Redis, or at least it will bring some challenge to the devs.

Meanwhile, keep calm and use Redis ;-)

<comment><USER6> Agreed, though HHVM went on to be deployed at some other small websites [1]. Maybe this will too.

1\. [http://hhvm.com/blog/7205/wikipedia-on- hhvm](http://hhvm.com/blog/7205/wikipedia-on-hhvm)

<comment><USER7> On the other hand, Wikipedia is going to have to migrate back _off_ of HHVM now that Facebook is planning to break compatibility with PHP and focus totally on Hack [0]. So hopping on board someone else's solution can bite you if their priorities change.

[0] [http://hhvm.com/blog/2017/09/18/the-future-of- hhvm.html](http://hhvm.com/blog/2017/09/18/the-future-of-hhvm.html)

<comment><USER8> > Facebook is planning to break compatibility with PHP and focus totally on > Hack

Ok...

> Wikipedia is going to have to migrate back off of HHVM

Why?

<comment><USER9> For years, HHVM had a significant edge in performance and a significant handicap in compatibility. Today, PHP7.1+ is ~at parity in performance but the community still has not fully embraced HHVM. In fact, some flagship projects like Symfony even _stopped_ on purpose. Increasingly, the main reason remaining for running PHP on HHVM is if you really want static typing - <USER2> this is not a natural preference for most PHP teams.

</comment></comment></comment></comment></comment><comment><USER10> 30% faster by which measurements? Not much info on the docs....

<comment> 0T-T0 yeah, one of the few red flags

> In short connection scenario, ApsaraCache makes 30% performance increase > compared with the vanilla version.

sounds like a cherry picked case to me

<comment><USER11> Cherry-picked IMHO isn't necessarily the right label for that. They don't claim they made an universally 30% faster redis, they clearly say one of the things they did improved performance for a specific case.

If anything, the OP here is misleading by quoting it as a general improvement.

</comment></comment></comment><comment><USER12> This looks pretty interesting to me. But it leads to a lot of questions that are unanswered on the webpage.

The claims of 30% faster for a particular workload are reasonable, but what configuration is needed and what exact workload are we talking about? I'd love to see some benchmarking code.

What are the limitations imposed by running in memcached mode? Can you still do clustering?

What other changes are they planning? Site just says "many". Are we talking about memory allocation or persistence changes? Maybe additional interface compatibility modes? It's hard to bet on this when we don't have any idea what else it will bring to the table.

Where possible, I'd really like to see these improvements factored into distinct redis modules and made available as plugins to the core.

</comment><comment><USER13> _Goals: For both support Redis and Memcached protocol with no client code need to be modified. For highly stable and efficient in production environment._

At face value it appears to be a NIH driven development. It is not only a redis fork it is also a _persistent_ memcached port, which is _only_ selectable on launch. Maybe there is a catch, but lack of a roadmap and/or design document certainly doesn't really help.

<comment><USER14> I remember some time ago Alibaba was the largest Memcached user on the planet, may be they wanted to smooth the operation and use Redis whenever possible?

</comment></comment><comment><USER15> Why forking instead of submitting pull requests to Redis?

<comment><USER16> The readme states they have a few extra unreleased features.

I'm guessing their changes are for internal use and may be out of scope for redis or simply they want to share their internal fork and get feedback/help.

I know you didn't say anything to the contrary but I feel it needs to be said: forks aren't inherently bad, they're a sign of a mature and healthy open source ecosystem.

And I'm sure if it's worth it to someone, perf improvements will eventually get upstreamed.

</comment></comment><comment><USER17> I wonder if Redis throughput is even a problem in practice. People usually add nodes to get more capacity (memory).

<comment><USER18> For most use-cases, Redis nodes will saturate network IO before CPU, but it should be noted that Redis is single-threaded so YMMV.

<comment><USER19> We do heavy pipelining and tend to max out the single thread, so we run multiple redis instances per host.

</comment></comment></comment><comment><USER20> One of the most useless FAQ I saw. I would have been more interested in knowing the improvements or changes made when compared to Redis. I had some trouble with large scale master slave Redis configuration. I was hoping if they have solved the issues.

<comment><USER11> They list the two things they changed compared to redis in the readme.

<comment><USER20> I went back and read again. "ApsaraCache is based on the Redis official release 4.0 and has many features and performance enhancements" \- I could find only memcache and performance improvement. Now Membache has nothing to do with Redis, its something not improving Redis, and 30% performance improvement is very vague statement with no other supporting benchmarks and documents. When they say many, I can't see any other than these two.

<comment><USER11> They implemented the memcached protocol on top of redis.

Also,

> _There are many features in ApsaraCache, the following two are included in > this release and the other features will be gradually released in the > subsequent, so stay tuned._

</comment></comment></comment></comment><comment><USER21> I think they are also working on: [https://github.com/fastio/pedis](https://github.com/fastio/pedis) (redis implemented on top of seastar-framework / scylladb )

<comment><USER22> any experience using it in production? looks promising results

<comment><USER21> still missing many features so I don't think it's ready, you should ask on their issue queue

</comment></comment></comment><comment><USER4> Diffs of what they changed in /src from Redis 4.0: [https://github.com/asaradiffs/apsaradiffs](https://github.com/asaradiffs/apsaradiffs)

</comment><comment><USER23> documentation and readme of alibaba projects are scary. Have anyone use this or any alibaba open source projects for production?

</comment><comment><USER24> Does it still run on only one thread?

</comment><comment><USER25> This project is some kind of a joke;

Look at the commit history; [https://github.com/alibaba/ApsaraCache/commits/develop](https://github.com/alibaba/ApsaraCache/commits/develop)

15 are "writing of README / adding my copyright", and 2 are actual feature (and not long)

<comment><USER26> I think this is what you are missing: [https://github.com/alibaba/ApsaraCache/commit/07518063b17b13...](https://github.com/alibaba/ApsaraCache/commit/07518063b17b13c12d4f3b2426cb26e38a2d049b)</comment></comment>


AsyncAPI – OpenAPI-like specification for event-driven architectures - <AUTHOR> https://github.com/asyncapi/asyncapi <comment><USER2> I would love if the definition of websockets would be added to OpenAPI [https://github.com/OAI/OpenAPI- Specification/issues/523](https://github.com/OAI/OpenAPI- Specification/issues/523)

<comment><USER3> What would be the advantage of that? OpenAPI is designed for HTTP-based APIs; I'm sure an equivalent can be done for WebSockets?

<comment><USER2> I would be able to document websockets side by side with "normal" requests and then use the same tooling for code generation or validation.

<comment><USER4> That use case would seem to be better served by creating a new standard that references the other standard for its IDL and serialization format, and general semantics, while having a separate standard for any websocket-specific details.

That avoids having to amend the original standard for each new variation. If you get enough variants (probably in the neighborhood of 2-4), then it makes sense to go back and supersede the original standard by breaking out the high- level layers each into their own standard that's designed for inclusion in other standards. That way, for instance, your async-Bluetooth standard doesn't have to refer to any document that gets bogged down in HTTP/1.1-specific messaging semantics. It's not worth re-factoring your standards stack the first time you reuse a standard, but you don't want some big spaghetti tangle of standards, either.

</comment></comment></comment></comment><comment><USER5> We already have lots of languages for describing event-driven applications such as Message Sequence Charts, Statecharts as well as a myriad of other types of specifications languages part of UML but also simple DSL syntax.

Why reinvent the wheel? What does this add to the current state of the art? I can't even find a "Related Work" section on their site.

<comment><USER6> The idea itself is sound, having an agreed specification allows others to build tools around this specification. (i.e. auto-generation, integration). In theory, this makes development easier. OpenAPI achieved this and is now widely used in various tools including Amazon API Gateway.

The types of diagrams you listed above are great for describing software in useful ways, but none of them are rigid enough to spec out an async API.

I still need to review this spec to fully understand it, so I'm not promoting AsyncAPI. I like the motivation behind it.

edit: typo

<comment><USER7> I don't quite get it. Why can't I just enforce schema validation in my pub/sub handlers?

I see the YAML example completed here: [https://www.asyncapi.com/docs/getting- started/servers/](https://www.asyncapi.com/docs/getting-started/servers/)

        asyncapi: 2.0.0
        info:
          title: Hello world application
          version: '0.1.0'
        servers:
          production:
            url: broker.mycompany.com
            protocol: amqp
            description: This is "My Company" broker.
        channels:
          hello:
            publish:
              message:
                payload:
                  type: string
                  pattern: '^hello .+$'

This looks like a thin wrapper around sending a message to a message queue. What's the gain?

Where do you define what to do as a subscriber?

<comment><AUTHOR> you have 2 operations in the spec, publish and subscribe.

above example already tells you what to do as a subscriber, as the document you shared describes an application that publishes a message

</comment></comment></comment></comment><comment><USER8> Adding YAML to a problem will always make it worst.

<comment><USER9> [https://cuelang.org](https://cuelang.org) has something to say about this

<comment><USER10> This looks vaguely relevant so figured I'd ask the question here.

I'm working on what can be pretty well reduced to an AST builder. I have nodes of certain types which come with a set of relevant properties as well as the set of types that you're allowed to nest. I'm looking for a markup language to express these schemas so that I can generate the UI components (given parent node X, generate a widget with a form that can be used to submit legal children) and perform validation (given AST tree coming from the client, validate it server-side before persisting it)

Currently using JSON schema but it's very verbose. Any ideas?

<comment><USER9> cuelang is great for this, I highly recommend spending some time. It's not the easiest to on board yet, jump in slack though and we'll be happy to help.

The project we are building on top of cuelang may be of interest: [https://github.com/hofstadter-io/hof](https://github.com/hofstadter-io/hof)

</comment></comment></comment></comment><comment><USER11> This is really interesting. I only knew of OpenAPI, but my project's going to have both HTTP / REST APIs and WebSockets. I didn't even know this existed. Thanks so much for sharing!

</comment><comment><USER12> It's wild that this has been around since at least the middle of last year. I went searching for a way to define service boundaries for event driven systems and settled on a YAML structure that looks very similar.

I ended up trashing it and going for something more fluent, which I think could easily generate AsyncAPI YAML. Maybe I'll add that to the list of issues on my little side project.

<comment><USER13> It's been around for 3 years already hehe! And yes, crafting my own format was how it all started. Happy to hear more about your project!

</comment></comment><comment><USER14> Perhaps GraphQL could be used instead for some use cases. It's already got a specification that's been in use for several years, and has an execution model that goes beyond the basic request/response model. [https://graphql.org/learn/execution/](https://graphql.org/learn/execution/)

</comment><comment><USER15> Shameless plug: A guy on my team wrote a Node.js library for validating messages against an AsyncAPI spec.

[https://github.com/WaleedAshraf/asyncapi- validator](https://github.com/WaleedAshraf/asyncapi-validator)

<comment><USER13> Waleed is awesome. I wonder why he didn't call it asyncapi-waleedator though :P

</comment></comment><comment><USER16> [http://open-rpc.org/](http://open-rpc.org/) is another OpenAPI-like specification for JSON-RPC based architectures.

JSON-RPC is simple, transport agnostic, can support any transport like Websockets, HTTP, even PostMessage.

</comment><comment><USER17> What about gRPC?

<comment><USER18> I'm surprised many people don't understand your comment - I had the same thoughts. gRPC provides a very nice way to describe event driven microservices using their "stream" keyword. It allows the implementation to be async, blocking, or future based. You get access to a very rich ecosystem such as bazel's grpc \ proto rules, junit rules, grpc-web for streaming to the browser, out of the box support from istio / envoy, etc.

<comment><USER13> You're right. My fault here. It should actually be possible to define a gRPC streaming API (never tried). The only missing thing for me is the protobuf compatibility though.

</comment></comment></comment><comment><USER19> Anybody knows the main differences with [https://cloudevents.io/](https://cloudevents.io/)?

</comment><comment><USER20> So is this specifically for stateless event messages? I don't really understand how you would define required state or conditional message validity.

</comment><comment><USER21> How this is different from Rx and Reactive Streams[1] [https://www.reactive- streams.org/](https://www.reactive-streams.org/) ?

<comment><USER22> This is the difference between inner application and external application.

So, similar difference between a Dictionary and a Database.</comment></comment>


Notch trying jsFiddle - <AUTHOR> http://jsfiddle.net/uzMPU/ <comment><USER2> Awesome implementation, actually no advanced feature is used, this code could easily ported even to assembler in any device where you can set pixels in RGB format.

And indeed it is pretty impressive how fast the rendering happens given that the code operates at such lower level... Even selecting the color of every pixel requires non trivial work in the inner loop.

AWESOME code.

<comment><USER3> I would argue that this is terrible code. It's not using the appropriate tools (webGL), it's badly structured, uncommented and unmaintainable (seriously, why on earth would anyone name their variables zd, _zd and __zd?). The Minecraft source code is also of notoriously poor quality. I honestly don't understand how you came to your conclusion.

<comment><USER4> The code is a direct port of Minecraft4k[1], it's optimised for space considerations.

[1] <https://twitter.com/notch/status/275329867984302081>

<comment><USER3> But that directly backs up my argument. From the horses mouth:

"Code is awful due to the nature of the project"

</comment></comment></comment></comment><comment><USER5> Such a great example of what can be done in javascript/canvas. As it is, I was completely blown away by how _little_ code it actually took to do that. My only gripe would be, why couldn't he have used descriptive variable names, so I can better go through and understand it? :-)

<comment><USER2> This code uses zero canvas / javascript specific functions. It is using basic trigonometric functions and is using canvas only to write RGB pixels. Canvas are much more powerful and high level than that, but this is not a good example as Notch just needed to set pixels.

<comment><USER6> Having watched Notch write Prelude of the Chambered (which I then ported to JRuby) it seems he really loves this direct pixel manipulation style - as do I!

The sad part, though, is it doesn't particularly scale well with canvas (yet) and using sprites, shape primitives, or even WebGL is way to get full speed at a regular resolution. (Imagine a 640x480 pixel field of randomized colors, you can get hundreds of FPS for that in Java without a sweat. Not so in the browser and most certainly not in JRuby.. my PotC port struggled to hit 12fps with equivalent code.)

The title of "ChamberedTest" here makes me wonder if notch is planning to use JS and canvas in the forthcoming Ludum Dare 25 (the gamedev contest where he created Prelude of the Chambered). I hope so!

<comment><USER7> For those interested, here are the first three hours of the "Prelude of the Chambered" stream.

[http://www.youtube.com/watch?v=rhN35bGvM8c&t=10m05s&...](http://www.youtube.com/watch?v=rhN35bGvM8c&t=10m05s&hd=1)

<comment><USER7> An hopefully ad free version will soon be available here (I trimmed the first ten minutes where nothing was happenning but infringing audio):

[http://www.youtube.com/watch?v=xYRBBXq3s6c&hd=1](http://www.youtube.com/watch?v=xYRBBXq3s6c&hd=1)

<comment><USER7> Please disregard. Other copyrighted stuff was instantly detected.

</comment></comment></comment></comment></comment></comment><comment><USER6> I've recorded a screencast that digs into how the programmatic texture generation works in this code: <https://www.youtube.com/watch?v=WaZvDCmlERc>

<comment><USER8> Thanks a lot for taking the time! Any chance you can do one for the game loop and the rest of the code?

</comment></comment><comment><USER6> Here's a rendering of the texture map so you can see what it generates directly: <http://jsfiddle.net/cXvKa/>

</comment><comment><USER9> Notch has made a couple of comments on reddit :

[http://www.reddit.com/r/programming/comments/146v69/how_notc...](http://www.reddit.com/r/programming/comments/146v69/how_notch_procedurally_generates_minecraft/c7aelxz)

        Please do NOT write code like this. It was originally written for the Java4k
        competition, which focuses on executable code size, and is as a result almost
        intentionally poorly written. It got even worse when I ported it to JS.
        It was mainly meant as a test for me to see what HTML5/JS can do, and an
        exercise in porting code over.

[http://www.reddit.com/r/programming/comments/146v69/how_notc...](http://www.reddit.com/r/programming/comments/146v69/how_notch_procedurally_generates_minecraft/c7aflnm?context=3)

        It would run a bit smoother if it was written in C++ (mainly due to not having
        to rely on the GC, and having it precompiled gets rid of the warmup time), and
        modern OpenGL would help quite a lot as well. A lot of the stuff done in CPU
        now could be moved to a shader, which both makes code simpler, and gets rid of
        the slow JNI calls required now.
        The main reason why Minecraft is slow is mainly 1) There's a LOT of polygons,
        combined with 2) The difficulty of making an efficient culling algorithm in a
        dynamic world.
        If someone solves #2, very interesting things could be made with a game similar
        to Minecraft.

[http://www.reddit.com/r/programming/comments/146v69/how_notc...](http://www.reddit.com/r/programming/comments/146v69/how_notch_procedurally_generates_minecraft/c7afwjp?context=3)

        No, they don't get merged because the textures are all pulled from the same atlas
        to avoid texture swapping. With GLSL, they could be merged, saving quite a lot of
        polygons. For a while, I did attempt switching the atlas from a 16 x 16 grid to a
        1 x 256 grid and merging horizontal runs of the same texture, but the resulting
        texture size was to tall some graphics cards (on low end computers) would
        automatically downsample it.
        The problem with the occlusion culling is not about knowing what parts are static,
        but rather figuring out what occluders there are. It would be very beneficial not
        to have to render caves under ground below the player, for example, or not to
        render the entire outside when a player is inside a small closed house. Figuring
        this out in runtime on the fly as the player moves around is.. expensive.

</comment><comment><USER10> This would be a great demo to see running in a responsive programming environment, ala Bret Victor's amazing Inventing on Principle talk (<http://vimeo.com/36579366>). I want to be able to click on hex values and get a color picker that updates the demo in realtime, and be able to click on various magic numbers and drag a slider to change them.

Incidentally, Bret Victor's talk was the starting point for Khan Academy's CS curriculum that John Resign led (<http://ejohn.org/blog/introducing-khan- cs/>).

Edit: I managed to get this running in livecoding.io, which does some of what Bret Victor was talking about (basic sliders and color pickers): <http://livecoding.io/4191583>. Not sure why it's running so much slower though...

<comment><USER11> Thanks for the livecoding link. I assume there's some overhead in constantly checking for and applying code changes - that's probably the reason for the lower frame rate.

<comment><USER10> Good point, I hadn't thought about the fact they might be polling for changes. Might be better if livecoding used an event based model to check for updates...

<comment><USER12> Or if it works at all like Scrubby (<http://nornagon.github.com/scrubby/>) which was on HN a couple days ago, it might rewrite all constants into global lookup table indexes, which surely wreaks havoc on performance.

</comment></comment></comment></comment><comment><USER13> Correct me if I'm wrong but does this procedurally generate the textures for each block. I can't see any code for loading assets and the init function, has some quite complicated color code. If so that is awesome!

<comment><USER2> Yes, the procedure generates the texture of every "type" of block, the first loops after the init() function. 16 different types of blocks are generated.

Then a random map is created, with the "center" that is set to empty blocks with high probability. Finally a function traces the map on the screen at every tick of the clock.

<comment><USER14> Ok, that's pretty cool :P

<comment><USER6> I've recorded a video explaining how it works: <https://www.youtube.com/watch?v=WaZvDCmlERc>

<comment><USER15> This was incredibly helpful - thank you.

</comment></comment></comment></comment></comment><comment><USER16> I enjoy that everything is procedural generated. The software rasterizing is pretty cool too. I don't mind that he uses short variable names, sometimes it's nice to have multiple lines line up perfectly. But this is just silly...

        for ( var x = 0; x < w; x++) {
            var ___xd = (x - w / 2) / h;
            for ( var y = 0; y < h; y++) {
                var __yd = (y - h / 2) / h;
                var __zd = 1;

                var ___zd = __zd * yCos + __yd * ySin;
                var _yd = __yd * yCos - __zd * ySin;

                var _xd = ___xd * xCos + ___zd * xSin;
                var _zd = ___zd * xCos - ___xd * xSin;

<comment><USER17> Can you explain why?

<comment><USER16> I don't enjoy comparing the length of relatively similar lines. Why not use xa, xb, xc, etc... instead of xd, _xd, __xd, ___xd, yd, _yd, __yd, ___yd, zd, _zd, __zd, ___zd?

<comment><USER18> I think the underscores standout better.

</comment></comment></comment></comment><comment><USER19> I'm shocked and pleasantly surprised that js/canvas can putpixel fast enough for this. It must be around as fast as assembly on a 486!

Part of me can't decide if that's awesome or tragic.

</comment><comment><USER20> Very cool, but a few notes to anyone getting their hopes up on the powers of Canvas:

As you may have anticipated, this demo runs at less than 1 frame per second on my Nexus 7. :/

In terms of per-pixel manipulation of a Canvas, it is very slow, even with javascript's (not very well supported) typed arrays. Simply put, multidimensional loops (unrolled or not) will always kill performance in JS with any significant dimensions. I learned this the hard way by trying to write a pixel-based GUI, and even that (with some crazy optimizations) could not render fast enough for all devices. If you are just doing blits, Canvas works very well (especially since this operation often uses the GPU).

For now, I think the best option is still WebGL, even though it is not widely supported yet, mobile devices are beginning to pick it up (Blackberry, for example).

<comment><USER21> Runs about 6-7 fps on my iPhone 5.

<comment><USER20> Nice :) Shows you how fast ARM is progressing...

<comment><USER21> But only 4-5 fps on my iPad 3. Hmmmph, thought that'd be faster.

<comment><USER22> My iPhone 5 is considerably smoother and faster than my iPad 3. That's surely also related to the iPad's insane pixel count, but the iPhone also loads and switches apps faster, before CPU-based rendering is a factor.

</comment></comment></comment></comment></comment><comment><USER23> Obligatory flash port: <http://wonderfl.net/c/sqL5>

<comment><USER24> That's faster than the JS demo (even the improved one) in any browser. It's sad that browsers still don't have at least the same performance as flash :(

<comment><USER25> It's faster because he made the Flash version use strongly-typed arrays.

</comment></comment></comment><comment><USER26> Can anyone explain how this works? I never have got to grips with 3D.

<comment><USER27> Looks like he's ray casting it, no 3D code implemented, just the illusion itself.

<comment><USER2> Well... actually the code contains a minimal 3D engine, it is not an illusion, you have the observer variable and could use it to navigate inside the map created in the initialization function. What is more 3D than that? :-)

</comment></comment></comment><comment><USER28> While this is cool, isn't this exactly what WebGL is for? I know drivers/support is an issue, but Chrome also ships with a multicore software renderer (SwiftShader) which can probably get a lot further than a JS putImageData engine.

<comment><USER18> It's just a demo. It's for fun.

</comment></comment><comment><USER29> Can someone dissect this code and explain what it does?

<comment><USER30> The first set of three nested loops is procedurally generating texmap, which is a multidimensional Array(16 * 16 * 3 * 16). 16x16 pixel textures, one for each the top, sides, and bottom, and then 16 of those. The inner loop tests against i, which is the current block "type" and performs customizations to the procedurally generated textures.

The next set of three nested loops is generating a random "world" with a tunnel cut out of it.

The renderMinecraft function is performing a minimal perspective projection <http://en.wikipedia.org/wiki/3D_projection> for a single ray cast into the world. Each pixel is cast and then, for each object hit by the ray cast, the closest is found, and a texture mapped pixel is calculated and written into the frame buffer.

<comment><USER2> It is worth to note that lightning model is trivial and only maps given directions of faces to given amount of bright. But other than that the bright is adjusted by distance.

It is pretty cool to see how a trivial lightning model like that can produce a pretty looking result.

If you want to see just the brightness of faces without texture to see more easily how light is used, just change the line:

        var cc = texmap[u + v * 16 + tex * 256 * 3];

Into:

        var cc = 255+(255<<8)+(255<<16);

To also remove the "distant is less bright" effect just add:

        ddist = 255;

Before:

        var r = ((col >> 16) ...

</comment></comment></comment><comment><USER31> <http://jsfiddle.net/uzMPU/3165/>

using window.requestAnimationFrame just because we can!

<comment><USER32> Wow! This is incredibly smoother here on Firefox 18! (slow machine)

</comment></comment><comment><USER33>
        setInterval(clock, 1000 / 100);

Is there any reason for writing 1000/100 instead of 10?

edit: Thanks guys!

<comment><USER34> It just makes it clearer that he wants it to run at 100FPS: (1000ms / desired FPS)

The usefulness is more obvious when you want 60FPS, which is not easily represented without rounding.

</comment></comment><comment><USER35> Tooting my own horn here, but here's my own little "Minecraft" renderer in Neja, circa 2005 ( [http://www.youtube.com/watch?feature=player_detailpage&v...](http://www.youtube.com/watch?feature=player_detailpage&v=0JB66fttJXY#t=143s) ). Over 4 years before Minecraft, and even then that was nothing new. It was kinda cool for JavaScript, in 2005, but all things considered, it was pretty lame compared to Ken Silverman's voxlap for instance.

The "cool" thing about this demo, was that Canvas was not widespread back then so I generated all the chunky effects on the fly as 24bits BMP image, then made a data: URI and update an IMG tag.

</comment><comment><USER36> "Notch coding in JS" is a bit more descriptive than "trying jsfiddle", specially since it looks like code posted after the fact. A minecraft-like env rendered on canvas with it's own mini-3d-engine is amazing nonetheless :D

<comment><USER37> To be fair, that's the description notch used in his tweet: <https://twitter.com/notch/status/275331530040160256> :)

<comment><USER38> "Trying jsfiddle.net" was in reference to his previous tweet, the previous host he used crashed under the load from his twitter link. He wasn't "trying jsfiddle.net", he was "trying jsfiddle [as an alternative to the previous host that crashed]"

</comment></comment></comment><comment><USER39> This is actually quite fluid on iPhone 5. I asked a co-worker to try this on his Galaxy S3(quad-core, no lte) and it was really slow there. And in Chrome it was even slower than that on the S3.

Doesn't any web browser on Android use a JIT?

<comment><USER40> I believe Firefox for Android does, and as far as I know so does the stock Android browser! Perhaps the pixel writing that Notch is doing is not well optimised on Android?

</comment></comment><comment><USER41> Why is the framerate poor even when I shrink the viewing area down 10x10? It seems to have the same stutter as the original large view. Is it because it's doing the same calculations but just showing fewer pixels?

<comment><USER25> Part of the reason it's slow is that it doesn't use typed arrays. This may be much faster for you: <http://jsfiddle.net/uzMPU/1573/>

<comment><USER42> Yes, at least 2x here. I'll pull up Chrome's FPS display later.

</comment></comment></comment><comment><USER43> Funny how he writes it so much like Java. I see so many different styles with JavaScript.

</comment><comment><USER44> There's been quite a bit of analysis as to what's happening here, if anyone could do a breakdown (or provide good examples) it would be awesome for people like me who are amazed by the power of the maths involved here.

</comment><comment><USER45> Interesting for an untrained programmer to tweak and see what happens each time - changing colours, speeds, sizes, reversing the flow, changing textures, etc. Accomplishes so much with such concise code.

<comment><USER46> its a good exercise to work out how to stop it from moving "forward" and get the mouse to control the camera. Its a little tricky, but you can do it with about 10-20 more lines of code.

</comment></comment><comment><USER47> Almost straight port here to luajit - <http://github.com/malkia/ufo/blob/master/samples/notch.lua>

</comment><comment><USER48> Here is the code in an App Studio project:

<http://blog.nsbasic.com/?p=1060>

Runs fine on an iPhone 5!

</comment><comment><USER49> Why is init called twice? Once at the end of the js and then again in the html.

<comment><USER48> The one in the html should not be there.

</comment></comment><comment><USER50> who the heck is Notch?

<comment><USER51> Notch created a popular pc game called minecraft where you mine blocks and build things. It became very popular and made him a multi-millionaire.

This demo has a little bit of minecraft in it. :)

<comment><USER52> thank you very much!

</comment></comment></comment><comment><USER53> So cool.

</comment><comment><USER54> Interesting, and pretty damn cool!

</comment><comment><USER55> This shows how far the browser has to go....was it just me, or did your browser start to choke while rendering this?

It rendered it fine, but I could tell that the DOM was being abused heavily. I don't mean that in a bad way, but it just felt very 'heavy'.

On the flip side, this is awesome that the browser can do this - and it's awesome that browsers can do this.

<comment><USER56> The DOM is not being heavily abused; it's just a canvas element and nothing else. The demo is so CPU intensive because the code is drawing the rasterized image pixel by pixel on the canvas, instead of relying on the GPU and using WebGL which would, AFAIK, result in much better performance.

One positive effect of doing this is that the code is _very_ portable and doesn't require any crazy feature in the browser or the PC (for example, i'm able to see the demo on my work computer even though WebGL doesn't work on it because of lack of drivers).

</comment></comment><comment><USER57> I showed it to my mom, and she was like ":Ooohh mother fucker"</comment>


The Reliability of Go - <AUTHOR> http://andrewwdeane.blogspot.com/2013/05/the-reliability-of-go.html

<comment><USER2> I would like to hear more about the technical implementations from the author on how he managed to improve performance. He mentions: "Due to the complex nature of the system this script could take up to three minutes to scan nodes and process the results" but how does Go solve this complex system that Python couldn't? 3 minutes to 1 second is a superb improvement.

The second paragraph reads like: replacing a relational DB with a (in memory?) key value store resulted in more throughput. He implemented it in Go, but he could have implemented it in any other language.

What I want to know is how he convinced management to use Go? Where did he find the programmers? I work in a similar environment and I don't see my firm adopting Go any time soon, although I wished they had as I'm a big fan of Go and believe it has a place especially server side processes (e.g. algo trading, market data feeds) where concurrent connections are prevalent.

<comment><USER3> Can anyone explain why exactly a script written in one language would stall, while the same script in another wouldn't? Is there that much inherent instability in Python? Can it be assumed that the scripts in this case aren't comparable?

<comment><USER4> > Can anyone explain why exactly a script written in one language would stall, > while the same script in another wouldn't?

It stalls in Python because the author is not acquainted with non-blocking system programming (the select()-call, which has been around since at least the eighties and has been a part of core Python since a very long time).

As to why a software developer who did not invest some minimal time into learning basic system programming feels qualified to write a blog post about this topic is another question.

<comment><USER5> It's funny how people who learn evented programming in scripting languages like Python feel like they've discovered some new hidden concept. No competent systems developer fails to understand what select() does. Suggesting that the author was't "acquainted" with select says more about this comment than about the author of the post it comments on.

</comment></comment></comment></comment><comment><USER6> We moved a huge chunk of our code from Python to Go. We have one simple Go binary that just listens on a certain port and API requests from our Django app are proxied to the Go instance running. No issues, no panics, no memory leaks. It's pretty amazing to see a long running process never growing in memory (well, if you're coming from the Python world at least, I'm sure the JVM is pretty solid at keeping it's place nice & tidy).

Folks - Go ain't a fad, it's a great language if your problem domain benefits from concurrency AND if you need to deploy to multiple locations and love being able to just drop a single binary and walk away.

<comment><USER7> How good is Go, as a replacement for Java?

<comment><USER8> What do you mean "replacement for Java"? It's a completely different language:

* no classes (only structs and embedding)

* no VM, only a run-time (cross-compiling is trivial though)

* hardly anything is an object

* no exceptions

* concurrent by design

It's quite possibly the most distant language from Java in the procedural world, which I think is a good thing. It forces you to rethink your data and their interactions.

I think Go is a great language and works in most of the spaces where Java lives, except maybe GUIs, but Java was never any good at that anyway. It's more suited for the server, but it can work well for computationally-intensive tasks as well.

Go is better thought of as a replacement for whatever server stack you have than a replacement for a given language.

<comment><USER9> >> I think Go is a great language and works in most of the spaces where Java lives, except maybe GUIs, but Java was never any good at that anyway.

Eclipse is the world's most popular IDE it's written in Java, Minecraft one of the most popular Indie games ever made was written in Java. What gives you the impression that Java isn't good for GUI's? It's great for GUIs and it's cross platform from the start.

<comment><USER10> If you want to make the argument that Java is good for GUI's, feel free, but you just picked the two worst examples I could possibly think of. As a Mac user, the UI for Eclipse is such a huge turn-off that it soured me on Java as a whole (back before I really knew anything about Java; today, there's plenty of other stuff to dislike besides the GUI toolkit). And Minecraft? That's not a UI, that's an OpenGL game. Nothing about the custom OpenGL-based UI it presents to users says anything about Java, or has any bearing on other Java apps you might write.

<comment><USER9> Ok, you have a good point. I'll instead list Open Office and LibreOffice and Symphony and Lotus Notes. Those are hugely complex GUI's and work as good as or better than anything proprietary out there in the same class pf products.

<comment><USER11> Actually, LibreOffice is trying to get rid of the Java dependency for a while now[1].

[1]: [http://www.developer.com/open/libreoffice-3.3-frees-open- sou...](http://www.developer.com/open/libreoffice-3.3-frees-open-source- office-suite.html)

<comment><USER9> Interesting, it sounds like LibreOffice is becoming a mish-mash of technologies (search this page for Java):

[http://www.libreoffice.org/download/4-0-new-features-and- fix...](http://www.libreoffice.org/download/4-0-new-features-and-fixes/)

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER12> I'm sorry, but the world does not need another company-controlled, corporate programming language. .Net (Microsoft), Java (Oracle) and now Go (google).

All of these compilers or JIT interpreters are implemented in C or C++ (which are open languages with ISO standards).

It bothers me to no end to see corporations taking control of the fundamental building blocks (programming languages) of technology and then to see technologists and developers go on and on about how wonderful and better these corporate languages are.

With C and C++ and Python and Ruby and Perl we have freedom. With Go, .Net and Java, etc. we do not.

Google already control your search, your browser, your phone, your email and in some cases your OS (Chrome) why would you want them to control you programming language as well? The idea boggles my mind.

I wish others felt as strongly about this as I do. If you want to control your future, then use C or C++ or some other ISO standardized language with lot's of free compilers available, do not use a corporate controlled programming language.

There is a reason go compilers are C and C++.

<comment><AUTHOR> Go is completely open source. The primary devs just happen to work at Google. That is all.

If anything, the Google name attachment may only serve to help convince management that Go is a safe, long-term bet. If you don't like the Google attachment, you are entirely free to fork the language and make it your own.

<comment><USER13> Plus there exists not one, but two implementations that fully conform to the spec. So you're not even bound to one specific compiler implementation.

<comment><USER14> Soon to be three, llgo is getting closer!

</comment></comment></comment></comment><comment><USER15> I remember some time ago a complaint about Go having some bugs on 32-bit machines (something related to the GC)

So yes, if you have control over your environment it may be a better choice

But the biggest issue with 'less than mainstream' languages are libraries. Things like DB connectors, protocol libraries (SOAP for example - yes, unfortunately this is necessary for some 3rd part services), etc

Heck, even for Python 2 (not to mention P3) this is an issue sometimes

<comment><USER16> Why, oh why, would anyone be running x86 hardware in this Year of Our Lord Two Thousand and Thirteen? It's been what, 10 fucking years that we've had AMD64 now, you can get free 64-bit systems from the curbside, just toss that goddamn PIII and get with the 21st century. Maybe then people can stop posting "Well, Go on 386 architecture has bugs, so don't use it for anything."

<comment><USER17> Intel fuses off x86-64 on some chips it sells for reasons of market segmentation.

<comment><USER18> They have stopped doing this for quite some time iirc.

still a stupid move on their behalf (as is the market segmentation of AES-ni stuff)

</comment></comment></comment></comment><comment><USER19> If I had been at that conference, I would have asked the same question.

Thanks for the data point (Yes, fine for production AFAYCT).

What does Go do when it segfaults ? Simply saying it has not-yet-segfaulted is but one factor of production-readiness.

Does Go leave just a coredump ?

One thing I like about java in a production sense is that if the JVM exits unexpectedly it writes an hs_err_pid file that has a dump of what the threads are doing at the point of failure.

<comment><USER20> Go programs don't segfault because Go is a memory safe language (unless you use unsafe). They can segfault in the runtime, but that never happened to me. Nevertheless, what happens when you segfault is a property of the system, not of the language implementation. It will happen whatever happens to C programs that segfault.

Go programs can panic but that doesn't produce a core dump, only a stacktrace.

<comment><USER19> Well Java doesn't generally segfault either... until you start referencing external libraries ( freetype.dll , serial_comms.dll, swt.lib )

I presume Go ( CGO ) will have to deal with segfaults too, and I'd like to understand what it does.

<comment><AUTHOR> As a practical example to 4ad's answer, here is the result of NULL-pointer dereference on the C code on my system (Arch Linux 3.9.2-1-ARCH). It does yield a SEGFAULT:

<http://play.golang.org/p/uoBKsRIJB7>

<comment><USER19> Thanks exch, that's really decent of you to construct an example.

I wonder that if there are multiple threads / goroutines are their callchains also printed ?

<comment><AUTHOR> It seems it doesn't go into a lot of detail as to the call-chain for each running goroutine, but this example may just not be very suitable to properly test it. Either way, here is the same deal with a bunch of running goroutines.

<http://play.golang.org/p/GQxdXpWdZD>

</comment></comment></comment></comment></comment></comment><comment><USER21> Somewhat off-topic but are there any data on the penetration of Go outside Google, a few other companies [1] and weekend hack projects on Github? Thanks to its unfortunate name, even searching for Go developer positions is challenging [2].

[1] <http://go-lang.cat-v.org/organizations-using-go>

[2] <http://www.indeed.com/jobs?q=go+developer>

<comment><USER22> Use the keyword 'golang' instead. :)

<comment> why-el This could have been a better name in my opinion. One should stay away from frequently used English words.

<comment><USER23> Maybe they wanted the name to symbolize the syntactical terseness of the language, and every other two letter name had already been taken by unix utilities.

</comment></comment></comment></comment><comment><USER24> "Excellent tooling"; from the article.

What does he mean? I've searched the Go websites but it seems all Google gives you is the Go compiler and a tour.

<comment><USER25> go doc, go fmt, go fix, go vet, go build, go run, go test, go get, go install, ... and present!

</comment></comment><comment><USER26> first I saw go I thought meh but with so many people saying good things about it makes go inevitably more interesting day after day. however I just feel like it's going to be like mongo. when it first got popular, people all moved to mongo as it miraculously solving all the problems. same thing happening with go now and after sudden disappear of all the mongo evangelists, this makes me doubtful about go obviously.

<comment><USER27> IMO, people like hype, and a lot of the time, they are not aware of what better alternatives exist. If Go did not have Google or Ken or Pike as names behind it, do you think it would have gone anywhere? It doesn't really offer anything special compared to more expressive and safer languages like Scala and Rust for instance.

You can see it right here in the comments: someone said that Go is a memory safe language. It is not any more safer than Java is in that regard. We need languages that are safer than Java and Go.

</comment></comment><comment><USER28> What happens if Google decides to send Go the way of the RSS reader, the SMS search, and the dinosaur?

<comment><USER29> Nothing, it's not a service. The code is already out there along with the documentation and language spec. The worst they can do is:

1\. Cancel their future contributions.

2\. Create a closed source fork (is this feasible with the license if they don't control what others have contributed?)

In the worst case, if there aren't enough go enthusiasts it goes the way of other niche languages. Since the supporters seem to be active enough, I doubt that'll happen.</comment></comment>


Ask HN: How to do intensive mental work without long chunks of free time? - <AUTHOR> Those of you who work on side projects whenever you find a short bit of free time, how do you do it? How can you do deep/intensive mental work when you do not have long chunks of time available without distractions?<p>I recently started doing two things:<p>- clocking in and out of some small tasks in my org files<p>- run a small app that will make a sound every three minutes. It reminds me to or be working towards my goals or take a short  break (3 to 6 minutes) from too much work (which aligns with my goals). <comment><USER2> Depends on the project.

I have a small notebook with me, always. Anytime I have five minutes, I review what I did last, and look to expand on it.

It generally takes me about six months for the idea to be fully formed and detailed. And usually less than that to implement the idea, because of the groundwork I've laid.

Now, if it's meant to be a profitable side project, that startup time isn't always acceptable. The pomodoro method might fit better.

</comment><comment><USER3> you might consider the Pomodoro technique, i.e. working in chunks of 25 minutes with 100% focus, then taking a 5 minute break. [http://pomodorotechnique.com](http://pomodorotechnique.com)</comment>


Land a Rails Job with No Experience - <AUTHOR> http://codeulate.com/2010/06/land-a-rails-job-with-no-experience/

<comment><USER2> Unless I'm reading this wrong, one takeaway is that the pool of people with RoR experience is so low that anyone with some time to spare can sweet talk their way into a developer position

...or that interviewers are schmucks and will hire just about anybody who took the time to read through a book and hack out a demo app.

</comment><comment><USER3> tl;dr version.

Learn rails. Write some demo apps. Read other people's code on GitHub.

Appears like a useful article but half way through it turns into an advertisement for why you should hire the author as a consultant at $150 an hour to help you land a job.</comment>


The Most Common Mistakes People Make On Their Resumes For Tech Companies - <AUTHOR> http://www.forbes.com/sites/quora/2012/07/12/what-are-common-mistakes-that-applicants-make-when-writing-their-resumes-for-tech-companies/

<comment><USER2> I really like the last point about leaving out cool stuff because its not resume material. When learning about resumes in school, it seemed like the teachers would always try to have me recreate the "standard" resume basically from a template because it was the "right way to do it". In reality, a resume is just a way for the company to get to know you and your abilities/accomplishments and as long as the resume is clean and understandable, you should feel free to anything that could help your case.

<comment><AUTHOR> Yes, exactly. The nice thing about tech companies is that they're very casual, and really not caught up in "rules" about resumes. (That said, many resume rules do exist for good reason.)

List the stuff that makes you look better!

</comment></comment><comment><USER3> Nice article.Very useful</comment>