Ask HN: How do I best learn Java in order to build a multiplayer game? - <AUTHOR>

I have an idea for a project I'm really interested on working on. It's a pretty large mass multiplayer game, based mostly on text with some minimal graphics.
I have some coding knowledge, some barely remembered C, slightly more ruby and php, and a bit of processing (which is based on Java, I guess).
Basically, I want to start from scratch, but do it right. I don't want to hack this game together, I want to make it work. How would I go about that? Could I do it as I build the game?
Also, which aspects of Java, and possibly what other tools would I need to build a multiplayer game? Are there any libraries geared towards this stuff?
Thanks! <comment><USER2> So have you ever used Java before?

I ask because if you haven't that the logical place to start is with learning the basics, followed by the building blocks to a multiplayer game.

If I were to start building a multiplayer game (preface: the main language I write in is Java, due to it being the main language in my high school's cs classes and my current cs course), I would start with building a really simple single player game. Start with just the world and one player.

After getting a single player game working (as best you can with just one player if the game is designed solely for multiple players), start trying to decouple the world from the gui, start making the world a server and the gui a client.

After that, you've got most of the pieces you need to start adding more players.

\----

Additionally, I was in a class where the final project was to create a very simple multiplayer world. Our process in leading up to that project was simply working with the individual aspects of the project beforehand and adding it together for the final.

We started off the class working with graphics, making a ball bounce using relative gravity on the screen, animating sprites, creating and modifying images (taking a jpeg with the color white meant to be transparent and making it transparent on the screen, fading an image in and out, really simple sounding things that would be used to form the basis of more complex, fun things).

The second part was mostly networking. Starting with reading and writing text files (which was done before the graphics, to let us read and write images) and moving towards sending and receiving text from other machines. One of the more complex projects in the class started with our teacher building a number guessing server: his computer would pick a random number from Integer.MIN_INT to Integer.MAX_INT, and we would have to guess it. The first of the three projects with the random number server involved creating a simple client that would have users enter a number. The second part required us to automate the server. The third had us take the server and add user authentication to it.

After the random number projects, we moved on to sending and receiving objects over the network, specifically images, and having them show up on another computer's screen.

All of that lead into the final project, which had us build a server that received icons from a computer, give each of those icons a position, and track changes in position. The client for the server would pick an image, send that image to the server, and move the icon around using the arrow keys. The client would also display other icons from other clients connected to the server. Essentially a really simple multiplayer game.

\----

In my current class, there was just an assignment requiring us to use both the observer and proxy design patterns for a simple blogging application. Using the observer and proxy patterns would probably be beneficial to you when you get into the server/client part of the game. I don't really have any good resources for leaning about those because it was mostly a lecture coupled with an assignment and lab problem.

\----

I'm not sure if that answered your questions, but I hope it helped give you an idea of where to start. I also acknowledge that I put down a lot in this comment, but I personally think it's at least somewhat helpful.

<comment><AUTHOR> It's very helpful, thanks :) Since I don't have a CS course at my disposal anytime soon, do you know of any books or online courses that could cover the basics? I'm not just looking for syntax, but design patterns, as you said.

Thanks again!

<comment><USER2> I would provide you with book suggestions, but as I said, most of what I've learned is due to lectures and examples.

If you've got to have a book, I've heard that O'Reilly's _Head First Design Patterns_ is pretty good for the patterns themselves (heard the same for most of the Head First series). That book uses Java.

As for when I come across a problem, I've found that if you search for your problem on Google you'll generally get a good result. You could also check out the Stack Exchange networks, specifically Stack Overflow, try under the Java tag over there.

While I've never really looked, you might be able to find a nice Open Course Ware class on learning Java, but again, I don't know if they exist or not.

The documentation for Java is also really nice and fairly easy to understand.

</comment></comment></comment><comment><USER3> It's an ambitious undertaking, but your timing is good. Stanford's Programming Methodology class is free online and teaches Java:

[http://see.stanford.edu/see/courseinfo.aspx?coll=824a47e1-13...](http://see.stanford.edu/see/courseinfo.aspx?coll=824a47e1-135f-4508-a5aa-866adcae1111)

There are many technology specific classes at JPassion.com. It used to be free, so I'm not sure whether a subscription is required.

As for libraries, there are over 5,300 games written in Java on sf.net:

[http://sourceforge.net/search/?q=&fq%5B%5D=trove%3A198&#...
I subscribe to their newsletter and Arianne and FreeCol are often listed as top projects, so you'll want to check them out.
BTW, Steve Yegge did something similar with Wyvern:
http://en.wikipedia.org/wiki/Wyvern_(video_game)
I believe that contained hundreds of thousands of lines of Java. Given his bent towards dynamically typed languages these days, I don't think he'd do it in Java again.
(Note: I am in no way affiliated with any of the above resources/people.)</comment>


A problem worse than Zoom? - <AUTHOR> https://lapcatsoftware.com/articles/zoom.html <comment><USER2> I posted about another macOS app called "Dropshare.app" a few days ago [1].

I didn't bother to write a blog post about it because my English is not good enough.

Basically, anyone who uses this app is vulnerable to cross-infection and data leaks. Assume that user John installed this app, then hacker Alice tricked John to visit their malicious website. In this website, they added code that sends requests to "[http://localhost:34344/upload"](http://localhost:34344/upload") to upload malicious files to any of the services that John's computer is connected to via Dropshare, this includes private servers via SSH, Amazon S3, Rackspace Cloud Files, Google Drive, Backblaze B2 Cloud Storage, Microsoft Azure Blob Storage, Dropbox, WeTransfer, and custom Mac network connections. The port number is also static, saving the hacker the need to run a port scanner.

I already contacted Dropshare's developers to fix the issue, but got not response.

[1] [https://news.ycombinator.com/item?id=20399551](https://news.ycombinator.com/item?id=20399551)

<comment><USER3> >> I didn't bother to write a blog post about it because my English is not good enough.

Basically everyone who says this has better English than most American technical developers. We appreciate your modesty, but please, write it up :)

<comment><USER4> Communicating in a non-native language is difficult even if you know it well. It doesn't come naturally and is taxing on the brain

<comment><USER5> Certainly. I'm a non-native speaker myself and although the end result looks somewhat convincing, it takes me an inordinate amount of time to write, look up words and proofread the text. I'd guess a native would come up with a comprehensible text at the first try, and it'd take a few tweaks until it looks immaculate. The reason non-natives seem to write better is that we simply spend more time working on it, and fix a lot of mistakes.

Just now, writing this, I had to look up if the saying went "inordinate amount" or "unordinate amount". The difference between "pristine" and "immaculate". It really adds up when writing longer texts.

<comment><USER6> Regularly consulting reference materials and editing your work are hallmarks of a good writer. It enables continuous improvement.

For what it's worth, I think your examples are nuanced questions about fairly sophisticated terms. I look up similar things all the time, and I am a native English speaker, have a first-class education, and write regularly for my day job.

Don't sell yourself short!

</comment></comment></comment></comment></comment><comment><USER7> > The major browsers I've tested — Safari, Chrome, Firefox — all allow web > pages to send requests not only to localhost but also to any IP address on > your Local Area Network! Can you believe that? I'm both astonished and > horrified.

I'm sorry but WtF who is this guy, every web developer will know this, and every developer should expect it since it's just an extension of basic networking knowledge applied to web browsers. It's not horrifying, it's basics, a great many things have depended on this fact to function for a very long time.

Yes functionality can work against you when abused, no this is not a special case.

<comment><USER8> This is Hacker News. We all know this. That's not the point. The point is: is it reasonable in 2019 that websites you visit can make requests to devices on your local network? To be honest I'm not sure. But I sure think it's a relevant discussion to have.

<comment><USER9> There's no uniform criteria for "local network". I can create a local device at any address I want. These days most are within 192.168 and 172.17 and 10., but not all.

As an example of legitimate use, Ubiquiti routers have a web app at ubiquiti.com that opens connections to manage your local routers. It's all authenticated with cookies. It seems like a good design.

<comment><USER10> > There's no uniform criteria for "local network". I can create a local device > at any address I want.

Certain subnets are _always_ private [1], and thus may safely treated as "local". But, of course, non-private addresses could also be local, but that's less common in a non-enterprise setting.

[1] [https://en.wikipedia.org/wiki/Private_network](https://en.wikipedia.org/wiki/Private_network)

<comment><USER11> This isn't a local network issue though, this is a cross origin issue that Browsers definitely need to patch.

A script from the internet should not be allowed to interface with a script from local network (localhost, local intranet e.t.c)

The browser should have strict sandboxes. This is like when you load a site over https, browsers scream at you if you load a http resource saying it's insecure.

<comment><USER9> Cross-origin is based on the domain name. It offers no protection against an attacker poking your local IP addresses.

You can have multiple IPs for a domain name, so if I set "hack.tlb.org" to include both a server I control and 192.168.1.1, I can repeatedly do fetches from "hack.tlb.org" until one of them gets your router instead of my server. And they're in the "same origin" for CORS purposes.

</comment></comment></comment></comment></comment></comment><comment><USER12> This complaint is real cute, but the trite answer is that this is how things have worked for a long time. Awareness of it is spreads for a while whenever high-profile events receive media and blog coverage, and perhaps the exploitability of this has increased compared to several years ago when products that opened up various HTTP-accessible servers were less common (or secured by obscurity).

This isn't necessarily an excuse to not explore mitigations through consensus in future browser behavior -- after all, that process of loose but eventual consensus of incremental UX and airquote "security" improvements is how SOP and CORS and C-S-P came about [1] and the cookie saga evolves [2][3].

But consider that legitimate uses of cross-domain requests to localhost exist (e.g. an OAuth callback endpoint), while also keeping in mind that users from all walks of life are, perhaps unbeknownst to them, are managing LANs of computing devices running dozens of servers, often with modern encryption such that communications between the program and the remote server are becoming harder to intercept and oversee, and lack a comprehensive capability to monitor, analyze, blacklist, whitelist, or snipe traffic in a way that's not cumbersome or borderline user-hostile. Such is the world where we've arrived. Etching away on one or two widely deployed corners of it won't fix the overall landscape, even if it may significantly reduce the change of "drive-by" exploitation through websites accessed through commonly used browsers.

[1] [https://news.ycombinator.com/item?id=12408328#12408680](https://news.ycombinator.com/item?id=12408328#12408680) [2] [https://news.ycombinator.com/item?id=13689697#13691022](https://news.ycombinator.com/item?id=13689697#13691022) [3] [https://news.ycombinator.com/item?id=19853090#19855518](https://news.ycombinator.com/item?id=19853090#19855518)

</comment><comment><USER13> > I believe that Apple also exempts Radar, its internal bug reporting app used > by Apple engineers.

Safari whitelists a number of URL schemes used by its first-party and internal apps:

      adir
      applenews
      applenewss
      itms
      itmss
      itunes
      itms-books
      itms-bookss
      ibooks
      macappstore
      macappstores
      rdar
      radr
      radar
      udoc
      ts
      st
      x-radar
      icloud-sharing
      help
      x-apple-helpbasic

</comment><comment><USER14> First, I think this is right and that websites shouldn't be able to hit any localhost or private address spaces.

But this leads to a bigger question, what makes private address space special? Not really all that much. Running an internal network using public addresses isn't super common these days but isn't uncommon by any stretch. Does it make any sense that any website on the internet is allowed to hit any other site accessible by your machine that uses a public address? There is definitely a security boundary being crossed here.

Say for example I run a web service that's private to my work's office. So spin up a machine on my VPS account, give it a public address, and lock down the firewall to my office's address range. Someone running Spotify in browser shouldn't have to worry about a malicious page hitting a potentially sensitive internal service.

Does it make any sense for me have to establish a VPN connection to my VPS for the sole purpose of giving it a private address so browsers will block it? Ew. I could also configure a CORS policy but we're talking about a service that used a trick to bypass this protection -- and plus nobody knows how to set that up right anyway.

<comment><USER15> By default, browsers _do_ block sites from doing dangerous things to other sites, like sending authenticated API requests; they only let by stuff that is supposed to be harmless, like hotlinking images. And then they have a mechanism called CORS that lets those services say "this particular site can make API requests and such".

The problem is that Zoom, since they didn't understand CORS, and yet did want to allow their site to make API requests, turned what should have been an harmless action (GET an image) into a dangerous one.

Browsers could block everything, but all I think would happen is that Zoom would just find some other silly (and potentially more dangerous) way of doing the same thing, because they _want_ the site to be able to talk to the service.

If you're writing your own service to be used on an internal network, you don't need a VPN or anything. Just don't accept unauthenticated requests that make changes, and ignore CORS.

<comment><USER16> > Just don't accept unauthenticated requests that make changes, and ignore > CORS.

The problem here is that it's really pretty trivial to scan a local network and get valuable metadata about the router and other devices on the network, just using JavaScript and xmlhttprequest. It's not that the local services are at risk of being exploited, but the whole (average, unhardened home-) network could be compromised by identifying devices with known exploits and, well, exploiting them.

Now I'm trying to come up with a non-PITA way of isolating browsing from my local network while still allowing direct access to my local network!

<comment><USER17> > Now I'm trying to come up with a non-PITA way of isolating browsing from my > local network while still allowing direct access to my local network!

UMatrix will protect you from most of this (with the exception of DNS rebind attacks).

I don't necessarily disagree with people who are frustrated that their browser can do this, but I also think it's completely reasonable to make it easy for browsers to send requests on an intranet. There are multiple devices in my house that wouldn't work with that capability.

The "problem", to the extent that there is a problem, is that securing these devices relies on developers doing the right thing -- and developers are untrustworthy. Theoretically, it would be better to put users in control. But that's not a specific problem with Intranet requests, that's a problem with CORS in general as it applies to the entire Internet.

<comment><USER18> > it's completely reasonable to make it easy for browsers to send requests on > an intranet

Agree. But shouldn't we distinguish a request that originates from the local user's input into the browser from one that originates from a remote entity? I'm slightly ignorant here; maybe this isn't technically possible?

</comment></comment></comment></comment></comment><comment><USER9> It's always been the case, back to NCSA Mosaic in 1993, that web pages could hit URLs of local web servers. Before javascript, you had to use an embedded image, like:

](http://192.168.1.1/cgi- bin/reboot-router">)

And it didn't have to be port 80 -- you could try fuzzing someone's X server with

](http://127.0.0.1:6000/lsjdfjlk23jlrkj">)

Fortunately, most protocols bail out on the first 4 bytes "GET ". One of the reasons that Gopher support was phased out was that you could make a gopher request contain more or less arbitrary bytes and attack many local servers.

Servers have always had the burden of defending against this.

<comment><USER19> I believe some networking equipment let you go to "www.routercompany.com" that loads up the router's config webpage without having to remember its lan IP.

<comment><USER20> That's just them hijacking DNS

<comment><USER21> Yes but do browsers do their own DNS resolution? Would a browser know if a domain resolved to a local ip?

I could pretty easily set up 1234.mymaliciousdomain.com to resolve to your local network.

</comment></comment></comment></comment><comment><USER22> How do you differentiate between a valid and invalid request to localhost / the LAN?

Lots of websites will link to something like `[http://localhost:9200`](http://localhost:9200`) (e.g. Elasticsearch) in the documentation.

So you decide to make it impossible to load that page in the context of a page loaded from a public IP address. Great.

What is stopping them from tricking you into clicking it (or filling out a fake form), which is basically the same thing?

You haven't really solved the problem. You've just made it slightly more difficult.

The solution is:

a) fix your applications so that they do not expose unsafe endpoints that can cause unintended side-effects merely by navigating to them

b) stop using session cookies (at least stop using them alone) to authenticate actions. Use token-based authentication (like CSRF tokens)

Edit: and before you say "check the referer header!", no, that will not solve the problem. The bad web page can simply not include the referer with something like `rel="noreferrer"`

<comment><USER23> > How do you differentiate between a valid and invalid request to localhost / > the LAN?

With the same origin policy? I think the post advocates for something like allowing localhost and private IP addresses only from those very same addresses or from the URL bar. Any other page shouldn't be able to access them.

This will probably break something but what's the case for a web app to legitimately access local host? Maybe access to some local service installed by the user and managed "from the cloud".

<comment><USER22> Define "access". The SOP does not stop a page from initiating a request to any other origin, it stops it from _interacting with it_ , so that, e.g. attacker.com cannot steal your session cookies from banking.com

You can do all kinds of things that don't violate the SOP but initiate a request:

\- Link to another site

\- Redirect someone to another page using Javascript

\- Link an image from another site

\- Put a form that submits data to another site

\- Embed video/audio from another site

\- Embed an iframe from another site

Do you propose disallowing all of those things?

There are plenty of legitimate use cases for all of these things.

If you wanted to do this you would have to disallow _any_ type of links to local servers.

<comment><USER24> Every one of those are solved by CSP/X-Frame-Options headers, CORS headers with content-type (non-normal form content-types) checks and proper handling of HTTP Methods. DNS rebinding is solved by https, and if you are doing something sensitive over a network (even a local one) I'm going to assume https is the proper way.

We have ways of handling these things, they just require a bit of reading/implementation and are unfortunately non-default.

<comment><USER22> Which is sort of exactly my point. There is no need to have a blanket ban on any linking between local/non-local sites. You just need to make sure they are set up to handle requests securely.

</comment></comment></comment></comment></comment><comment><USER25> Great article.

There are legitimate reasons to open a webserver locally. However, the benefits from these restrictions are great not to consider some sort of protection. Perhaps there could be an authorization request the user could allow (similar to how we got rid of the pop-ups) in the most natural way possible (we don't want to break intranets, for example).

Another security-related bad pattern that annoys me is how some of this authorization stuff steal your focus making it impossible for you to ignore them (like, you cannot move to another tab before deciding to allow or not something).

Another thing is how sometimes it is not completely clear if something is an element of a website or your browser or system. For example, imagine you have to type your user password for a random update to complete, but you are browsing some website... Suddenly you see a prompt with your username and a password field matching your system's... However, you can only know for sure this isn't phishing if you try to cmd+tab and it is still there. Heck, the system should try to detect you are on a window showing unsigned/unsafe content and paint something out of the frame (like coming from the top address bar) so you can easily identify it's legit (because a website shouldn't be able to print a portion of your screen outside of 'window').

</comment><comment><USER26> > In my opinion, web pages should not be allowed to make requests to LAN > addresses unless the user has specifically and intentionally configured the > browser to allow this.

Is there a way to know definitively if an address is "local" rather than "wide"? Should that be more granular, e.g. host, LAN, WAN? How does that work with bridged networking and such?

If I'm already browsing something on the LAN, it seems reasonable to be able to browse other sites on the LAN. But then that seems like an overly broad definition of LAN would allow privilege escalation.

If I saw a private IP (192.168, 10, etc) or a .local domain, I'd assume that was a LAN address, but that's a convention and depends very much on routing being set up properly.

<comment><USER27> > If I saw a private IP (192.168, 10, etc) or a .local domain, I'd assume that > was a LAN address, but that's a convention and depends very much on routing > being set up properly.

This convention on the address is actually backed by RFCs. eg. rfc 1918. There is similar for ipv6.

However, blocking traffic to private IPs without careful consideration seems like it could block some legitimate use. So one does have to tread carefully when special-casing those.

</comment></comment><comment><USER28> I knew that localhost could be accessed, but the fact that local IP addresses on the LAN can be accessed is actually quite surprising to me. I suppose it makes sense, but it definitely makes me much more concerned with the security of local devices on my home and office networks now.

Are there any best-practices for keeping things locally safe (i.e. LAN devices like printers, testing boxes, tvs etc.) , beyond just treating them the same way you would an external facing machine?

<comment><USER29> > and office networks now

Yeah, forget about home, this is a nightmare. Who knows how many devices are in a corporate network. Internal networks are usually not as well protected as the perimeter.

<comment><USER30> And yet you'd be surprised how many companies rely on a VPN (basically a glorified office network). Good read: [https://cloud.google.com/beyondcorp/](https://cloud.google.com/beyondcorp/)

</comment></comment></comment><comment><USER31> Jonathan Leitschuh shared the same complaint in his original writeup of the Zoom Zero Day, but also mentioned CORS-RFC1918 – a proposal to obtain permission from the user before allowing a public website to access a resource that DNS lookup reveals to be hosted on the private or local address space as defined by RFC1918:

[https://wicg.github.io/cors-rfc1918/](https://wicg.github.io/cors-rfc1918/)

</comment><comment><USER32> Wait wait WAIT! It is much more complicated than that.

You can make XHR (aka ajax) requests only if the CORS policy allows it (concretely, this local web server you are trying to access is answering with a specific HTTP header saying "I authorize the website xyz.com to send XHR request to me via the web browser of the client of xyz.com).

Now for everything outside of XHR(ajax), you can send different type of requests :  but this let you only load js files.  but this lets you only load images, you can't really do much other than try to load images with that.

So if you get into the detail of each "web api" (XHR, ,


2020 Ig Nobel Prize Winners - <AUTHOR> https://www.improbable.com/ig-about/winners/#ig2020 <comment><AUTHOR> Ars coverage for a more readable summary:

[https://arstechnica.com/science/2020/09/bellowing- alligators...](https://arstechnica.com/science/2020/09/bellowing-alligators- and-frozen-poop-knives-the-2020-ig-nobel-prizes/)</comment>


Planning, Cheating and Faking Your Way Through JavaScript Tests - <AUTHOR> http://msdn.microsoft.com/en-us/scriptjunkie/gg649850.aspx

<comment><USER2> Thanks, this was really useful. I saved it in Delicious.

<comment><USER3> Glad you liked it! :)</comment></comment>


Ask HN: is Hacker News is monitored by the NSA? - <AUTHOR>

Access to hard disks, email addresses?  Hosted by a cloud provider that gives NSA access? <comment><USER2> Tracert it and see if any servers are seperated between continents, and you get your answer.</comment>


I wanted to like this book - <AUTHOR> https://www.amazon.com/review/R2I0T26SV0ELPP/ <comment><USER2> Relevant context: Jeff and MacKenzie Bezos filed for divorce today. (that Amazon Reviewer is indeed her account; if you check the history you'll see reviews from 2001)

[https://www.washingtonpost.com/arts- entertainment/2019/01/09...](https://www.washingtonpost.com/arts- entertainment/2019/01/09/jeff-bezos-announces-divorce-mackenzie-bezos-after- years-together/)

<comment><USER3> Further context: Note that the date on the review is 2013.

<comment><USER4> Any context on why it was posted damn near 6 years ago and no one noticed???

Edit: I guess they did

<comment><USER5> People did notice.

[http://articles.latimes.com/2013/nov/04/entertainment/la- et-...](http://articles.latimes.com/2013/nov/04/entertainment/la-et-jc- mackenzie-bezos-amazon-review-everything-store-20131104)

[https://www.telegraph.co.uk/technology/amazon/10426865/Wife-...](https://www.telegraph.co.uk/technology/amazon/10426865/Wife- of-Amazon-founder-Jeff-Bezos-posts-one-star-review-of-husbands-biography.html)

[https://www.theguardian.com/books/booksblog/2013/nov/05/mack...](https://www.theguardian.com/books/booksblog/2013/nov/05/mackenzie- bezos-one-star-amazon-review-book-jeff)

</comment></comment></comment></comment><comment><USER6> Counterpoint - "I did like this book" by an early Amazon employee

[https://amazon.com/gp/customer- reviews/R3J863C5ZP53BA](https://amazon.com/gp/customer-reviews/R3J863C5ZP53BA)

</comment><comment><USER7> Tl;dr - This is an Amazon review of a book about Amazon, by the founder of Amazon's wife.

<comment><USER8> Off topic, but the wording of your sentence amusingly sounds like the book was written by the person that founded the wife of Amazon.

</comment></comment><comment><USER9> "As our family and close friends know, after a long period of loving exploration and trial separation, we have decided to divorce and continue our shared lives as friends,"

What does loving exploration mean?

<comment><USER10> I've seen this divorce story posted, flagged, and taken down from the front page maybe 3-4 times now. And rightly so: it's a private matter that seems out of place on an aggregator for tech news. The level of discourse in those flagged submissions never rose above the level of a TMZ gossip column.

Dragging this submission out and using it as a pretext to discuss the divorce just seems perverse.

<comment><USER11> Perverse? The poster was simply wondering what a phrase Bezos used in his own public announcement might mean. And I think developments in the private life of one of the world's richest men, CEO of a near-trillion dollar corp and operator of the world's largest cloud platform, are fair game on HN.</comment></comment></comment>


Beringei – A high performance, in-memory storage engine for time series data - <AUTHOR> https://github.com/facebookincubator/beringei <comment><USER2> I wonder how it compares to kdb+ in terms of performance. Obviously it wins on price..

</comment><comment><USER3> metrics? benchmarks?

</comment><comment><USER4> Aka `std::vector`?</comment>


[Paywalled] - Endowing cells with logic and memory - <AUTHOR> http://www.nature.com/nbt/journal/v31/n5/full/nbt.2573.html

<comment><AUTHOR> Sorry everyone, but unfortunately this is paywalled, and it looks like a really cool paper!! Does anyone know where we can get a pdf or something? Is it OK to ask something like this here? If not, lemme know and I'll delete this post</comment>


Hyper-G Organizes the Web (1995) - <AUTHOR> https://much.isds.tugraz.at/projects/hyper-g/9.htm/ <comment><USER2> Hyper-G was no protocol, it was a better web/www. The protocol was called HTP (Hyper Text Protocol) as far as I remember. It promised link consistency, rich clients (Amadeus was the windows browser/editor, even with VR interfaces), and support for immediate search.

But www/httpd won because it was free and it demanded no session storage on the server, only in the client. Their protocol was session-free, which enabled scaling httpd to millions. Hyper-G was better, but didn't scale that well, and the javascript rewrite was a failure.

I had to write my first webpages in Hyper-G but then eventually jumped ship and we installed our own competing linux webserver on the TU-Graz, which soon overtook the official ones in traffic and usability.</comment>


IOS 4.2 golden master brings final iPad tweaks before release - <AUTHOR> http://arstechnica.com/apple/news/2010/11/ios-42-golden-master-brings-final-ipad-tweaks-before-release.ars <comment><USER2> If you're going to try it, note that it requires iTunes 10.1 if you want to be able to use your iPad again.</comment>


It's not innovation that leads to success. It's execution. - <AUTHOR> http://www.codesimplicity.com/archives/45

<comment><USER2> While I have to agree with the author that execution is very important and that without great execution you're invention probably won't work out (at least for you), I have to disagree that innovation is a "social disease". The United States and capitalism in general are very innovation driven. Innovation is very rarely a bad thing.</comment>


Drink coffee – for your health - <AUTHOR> http://qz.com/282337/drink-coffee-for-your-health/

<comment><USER2> [http://www.dvdtalk.com/reviews/images/reviews/265/full/13540...](http://www.dvdtalk.com/reviews/images/reviews/265/full/1354043354_1.jpg)</comment>


Who leads the Java parade? - <AUTHOR> http://radar.oreilly.com/2011/07/java-community-oracle-google-vmware.html

<comment><USER2> Who among Oracle, Google, and VMWare is going to pick up the mantle of Java leadership (no mention of IBM)? I get the feeling that none has any real interest in leadership, so Java will drift along with microfeatures being added, but with no biggies like type inference or anything else that can cut down on the sheer volume of typing or cutting and pasting.</comment>


Kim Dotcom Can See [Only] One File Of 22 Million Says FBI - <AUTHOR> http://www.stuff.co.nz/technology/7222754/Dotcom-can-see-one-file-of-22-million-says-FBI <comment><USER2> _Dotcom said he was in the process of creating a website to publish all the information, so the public could see for themselves._

Looking forward to that. His big mouth strategy should make that quite an entertaining journey.

</comment><comment><USER3> "I would like the contents of /dev/sda" :)

</comment><comment><USER4> The case before the New Zealand courts is ONLY if there is if there is cause for extradition. It's not the trial of his guilt or innocence on the charges. While I think he should have access to the files against him, those files will be disclosed if he faces trial in the US under discovery rules. However, the extradition case is more like a grand jury proceeding, deciding only if there is enough evidence to proceed, or in this case, extradite. Dotcom having access to all of the evidence against him has no influence on the decision to extradite.

If there is a complaint about the extradition process itself, there's nothing he can do about it as those rules are established by the Extradition Treaty. If he were worried about extradition, it would have been smart to locate himself in a non-extraditing country, or better yet, not building a company that facilitated massive-scale piracy. I know that all of MegaUpload traffic wasn't criminal, but I also know that Dotcom certainly wasn't ignorant of what was being trafficked across his servers, in fact he profited from it immensely.

But, this issue is one for the courts, and not just the ones in the US: his arrest was at the behest of Hong Kong, the Netherlands, the UK, the US, Germany and Canada.

He has a long criminal history relating to trafficking credit card numbers, insider trading and embezzlement. It's entirely logical that his arrest was completely warranted given the evidence and his history.

He isn't Kevin Mitnick, that's for sure.

<comment><USER5> Given that both sides are entering arguments, and that a failure to compromise is going to delay the extradition process, It seems likely that the legal implications of the treaty and intricacies of the extradition process are far more complex than you describe. If they were not, the requests by the defense would have been thrown out already.

Furthermore, considering the high quality council retained by Mr Dotcom, it would seem doubtful that they are missing something that an armchair analyst is able to discover and present in an online forum.

<comment><USER6> I don't think briandear was suggesting that he discovered something that Kim Dotcom or his council missed. I'm sure they understand what's going on... but much of the commentary about this case seems to be based on the misunderstanding that Kim Dotcom's guilt or innocence is currently being evaluated by the court.

<comment><USER7> It _is_ being evaluated, just with _vary_ low standards. If he could prove beyond a shadow of a doubt that the vary idea he commit-ed the crime was ludicrous then he could avoid extraction. If for example that he could demonstrate that 99.5% of the files on his site larger than 50mb where home movies then the primary use was not large scale copy-write infringement of movies.</comment></comment></comment></comment>


Ask HN:  Ideas for monetizing a website I am developing? - <AUTHOR>

Hi all-
I posted this before, but only got one (insightful nonetheless) comment.  So I figured I'd give it one more shot.
I currently am working on a site that is similar to one techcrunch posted a few days back. I have a super duper early demo if you want to take look available here:
onedatedaily.heroku.com
The concept is this: Each day (eventually each hour) a new dater of each sex will be featured on the front page. People will then be able to get some basic information, and if they like the featured dater, they can send them an email through our site. This will likely be form based and require certain elements to reduce spam and stalkers (also we don't reveal the dater's email to avoid stalkers and weirdos). If the dater likes what the person has to say, they can email them back.
The question is how to monetize. I have a couple ideas and was wondering what you all thought:
1) Force anyone who wishes to email the dater to pay 1$ per email (some of this could be used to "pay" the dater for listing themselves. A kind of incentive to get more daters)
2) Graduated scale emailing. The first 50 free, then 1 dollar for the next 50, then 3$ for the next 50 etc.
3) Force the featured dater to pay per email from vetted emailers. .10 an email or whatever
4) Freemium model -- Get more information and more tools by signing up with us. Email of the day etc.
Thanks for looking guys, all suggestions welcome for both monetization and user experience stuff. The UI is pretty suck, but I'm working on it. I think the idea is decent, I'm just sorry I got beat to the punch by that one tech crunch had which looked, tbh, also sucky. <comment><USER2> The problem with monetizing dating-style sites is the same as trying to make money with health care. Your system is at its best when people have one short trip and don't come back. This lack of repeat use means that it has to work so phenominally well that success stories are regularly referring their friends, or you need a unique method to suck as much money over that time period as you can (not to sound bad about it, but it's the truth).

The ideal method would be to charge money upon "success", but there's no good way to measure a successful matchup. Thinking about this...I think a reverse charge system may work (note, I haven't tried this and if you do go with it, be prepared for flaming fireball of doom, it's an off-the-cuff, not thought out idea, just top of the head thing). Most sites seem to either charge a monthly fee, or they charge for communications. Now, rather than charging someone money for TRYING to talk to someone, why not charge them based on people ACTUALLY responding. Say, I have 5 message points. I send a message to 10 people. I still have 5 message points. Let's say 3 respond. I can use a message point to read each message, or I can just not read it. If I don't have enough points to read a message, I only see that I received one. Now, this should only count for messages that are from someone I sent a message to previously.

This way, initiating contact is free, and responding to initial contact is free for the contacted. The lack of needing up-front costs to start trying to meet people is likely to drive people to sending that initial message, and if they get a response, they now need to spend money to read it...and it really is a response from the person, so they most likely really want to read it.

</comment><comment><USER3> I had to find your article, make it free to post to other users, but have two type of in-box, one for premium users and another for everybody else,

how to make money, if you subscribe monthly you can post to anybody in box and they will receive it, along with 1000's of others, if you want to be notice you will be put in the premium box (premium box); charge to add features to your site like, color, multiple colors and the use of WYSIWYG editor, have everybody else use a simple editor no frills. If you want to discuss it email me: mykalmorton at gmail dot com

</comment><comment><USER3> also like recommendations on linkedin, have people comment on a person, (like i dated her and she was a real ____* ), a feature,

but don't charge people on sending info,

for example i will not pay $1 to say hi, and if i do, i would just give my email address out to that person, and you only made $1; thus subscription $.99 month for instant is reasonable, will not hesitate in sign-in up, 1000 ppl a month = approx $1000

</comment><comment><USER3> add a feature to sell things, a user, for instant a person wants to sell a watch a person can, need to make a hybrid of something else, cause dating is already done.</comment>


Death of Esteemed CS Researcher Likely a Result of Health Insurance Malignance - <AUTHOR> http://www.torontosun.com/news/columnists/michele_mandel/2010/01/14/12471531.html

<comment><AUTHOR> _None of his friends wanted to speak about his personal life, but at least one confidant, angry at some callous comments on a tabloid website, aimed to set the record straight: "The financial pressures on this couple were severe: They had already used up all insurance benefit limits, and burnt through their own personal savings with their retirement savings following rapidly," a source posted on the New York Daily News website.

"We should put the blame for Sam's death where it belongs. We have the technology to keep little girls like that alive. We have a society that pretty much insists upon doing so. But we put the financial and organizational and emotional burden entirely on the parents."_</comment>


Es: a shell with higher-order functions - <AUTHOR> http://wryun.github.io/es-shell/ <comment><USER2> I find rc shell to be much more logical than a normal sh, but nowadays it's only used by a few people, so for the new users there is little sense of learning it - most people haven't even heard of rc!

I think that are two ways to change this situation:

1) For normal CLI users - let's pick the most up-to-date implementation (tobold's rc, es, inferno's sh, suckless' rc...) or write one from scratch if that would be easier. Then think about writing plugins for git, for colorful prompts, for autocomplete, for common development tasks etc. Since rc language is easier and cleaner than bash - writing plugins and extensions for it should be easier. Of course, many blog posts must be written showing how superior it can be comparing to bash in some cases and how easier it is to learn. Once the resulting rc gets into every linux distro and mac and there will be known repositories like ohmyzsh - people may start switching from bash to rc, not from bash to zsh.

2) For embedded systems - from my experience sh scripting is normally done not for the desktop, but for tiny embedded systems, where busybox is a definite winner - maybe an alternative can be made by using rc shell and Plan 9 set of utilities? So we get a single static binary (again, rewrite rc in Go?) and a small set of tools, that might even work on windows. I think it could be smaller, like toybox, but with a usable shell interpreter.

Since most implementations of rc are now unmaintained (correct if I'm wrong) - probably it would be better to rerite it in some modern language (Go, Rust, maybe C++), cover with tests and start promoting it. If so - I would be happy to join the development (I started it once, ended up with just yacc-generated AST parser, but I though it might become a huge project that nobody is interested in, so I suspended the development).

<comment><USER3> [https://github.com/rakitzis/rc](https://github.com/rakitzis/rc) is the official location of byron's rc, and is now actively maintained by Toby Goodwin.

Please don't reinvent the wheel - rc compiles down to a correct nice little binary without a bug I've run into in the while I've been running it (since I've worked with byron). And busybox is nothing to hold up, what it lacks in disk usage it also lacks in correctness.

<comment><USER2> Thanks for the link! I like how the sources look (much cleaner than the original plan9 rc), I like the way the addons work with this rc implementation and in general the project makes good impression. Sad that it doesn't have many stars on github, and doesn't have a nice readme yet (I see it is about to be added in the developer branch).

I find doubtful the support of multiple readline-like libraries (and no linenoise though) though. I would rather prefer to have one, but fully supported (with custom completion etc like in zsh). I still need to check how this feature could be added.

<comment><USER4>
      > I find doubtful the support of multiple readline-like
      > libraries (and no linenoise though) though. I would
      > rather prefer to have one, but fully supported (with

I myself wanted linenoise, so I took it as a minor challenge and put up a pull-request with the feature. The multiple line edit versions is a _feature_ since there are many non-Linux systems out there where readline was not present, supplanted by the native one, or was a pain in the neck to build. A small, statically-linked shell with rational syntax is very nice.

</comment></comment></comment></comment><comment><USER5> I remember liking es from a long time ago - definitely more function-capable than the other shells of the time.

On the other hand, gray-on-white for the website's text is a questionable choice from a legibility perspective. Contrast is good.

</comment><comment><USER6> Can someone point out what is nice about this shell? I love higher order functions in general, and would love them in my shell, but have too much shell inertia to really consider switching at this point.

Could someone show some quick demonstrations of the possible power and/or elegance of this shell's syntax and functionality so I can appreciate what I'm missing out on?

EDIT: this is of course apart from the man page[0], which, while a lot nicer than most man-pages I've ever seen hasn't served to demonstrate the "big picture" ideas that are going to captivate me.

[0] [https://wryun.github.io/es- shell/manpage.html](https://wryun.github.io/es-shell/manpage.html)

<comment> vezzy-fnord From the GH repo (raw b/c the syntax highlighting is messed up, damned Linguist): [https://raw.githubusercontent.com/wryun/es- shell/master/exam...](https://raw.githubusercontent.com/wryun/es- shell/master/examples/cdpath.es)

It's nothing special, it's just one of the earlier examples of a "better than Bourne or C" Unix shell, alongside Plan 9's rc. I believe es made it into Inferno, but I'm not sure. It's over 22 years at this point, though. In an alternate world, it might have made people more accepting of shell as a serious language.

</comment></comment><comment><USER7> Wow, this is interesting to see, as I just finished installing 9Front in VMWare Fusion (which uses rc, from which es is derived).

By the way, 9Front works pretty well in Fusion.</comment>


I don't need prejudice in online dating, too - <AUTHOR> https://www.washingtonpost.com/news/soloish/wp/2015/10/12/black-women-face-prejudice-every-day-i-dont-need-it-in-online-dating-too/ <comment><USER3> And guess what if you male you will receive less messages than if your female... online dating on average is a indicator of the fickle. but, you don't have to care if you get less messages than someone else. at the end of the day you only need to meet one person. online dating is not that different to offline dating. use whatever platform or situation to try and meet someone you like and get on with your life.

</comment><comment><USER4> The title "Black woman face prejudice ... in online dating too" is entirely ignorant of the fact that black women discriminate against every race but their own, according to OKCupid studies [http://blog.okcupid.com/index.php/race- attraction-2009-2014/](http://blog.okcupid.com/index.php/race- attraction-2009-2014/)

But besides that, what kind of wacky world is this where it's now frowned upon to have a preference in who you want as a partner? It's not racist to personally find one race statistically more attractive than another _to you_. I don't want to date gay men, does that make me homophobic?

<comment><USER5> _I don 't want to date gay men, does that make me homophobic?_

I am assuming it makes you a heterosexual male. While it is possible to be heterosexual and not be homophobic, it is not possible to exclude people based on race and not be racist. That is a form of racism, albeit one we cannot legislate out of existence because whom one wishes to sleep with is very much a private matter. You are entitled to want only female sexual partners. It doesn't make you homophobic. You are equally entitled to only want sexual partners who are not black. However, if that is a preference, you are, in fact, racist.

<comment><USER4> Let's be very clear here, you're stating that every race is "technically" racist when it comes to race preference, because they all exhibit this behavior in the data.

Like I said elsewhere, I concede that according to the dictionary definition of racism, it is racist. However, in the real world, calling someone a racist means that a person should feel guilty and ashamed for their wrong choices. Are you telling me that a person (indeed, the vast majority of all people included in those studies), because they're "technically" racist, should feel ashamed for finding one race statistically more attractive than another? If you're not saying it's a bad thing, then you're saying that that form of racism is ok, in which case I'd wonder why you're arguing this at all.

<comment><USER5> I think a) there is a difference between "I just happen to date my race more" and "I actively exclude people based on their race." b) I think there is a difference between "I happen to be heterosexual" and "I am homophobic."

Homophobic goes well beyond "I don't have sex with people who are my gender" and into "I don't like people who do that, I think they are doing something wrong, etc.."

Just because people date a lot more of their own race doesn't necessarily and automatically mean they _intentionally exclude_ people not of their race.

This is something I have thought a great deal about. I have a genetic disorder. I am white. It is a predominantly white disorder. I was diagnosed late in life. I did not know I had it when I was younger. I grew up in the racist deep south and I married a white man, who was a carrier, so one of our children also has the disorder. I got diagnosed in my thirties and later divorced. Following my diagnosis, during my divorce, the idea of ending up accidentally pregnant by someone who was a carrier really freaked me out and so I went through a period where I actively discriminated against white men, not because I don't like sleeping with white men but because it is a quick and dirty genetics test. (I have blogged about this, if you want the link.)

Anyway, during my divorce, I intentionally went out of my way to not signal to men what my dating/relationship history had been because I did not want to repeat the mistakes of my past and I was very aware that if I told men that my ex husband was, for example, blond, then blond men felt more confident about approaching me and non-blond men felt like I was suggesting I was not interested in them and were more reluctant to pursue me. Even with actively trying to eliminate that sort of bias from men who might be interested, I found that if you analyzed the data, I tended to date more of certain kinds of men. However, I cannot say WHY that was.

One possible explanation was that I simply had more opportunity to date men of certain categories. For example, I have tended to have more relationships to men who were in the military or former military. On the one hand, my father and ex husband were both career military, so I tend to more readily get along with people with a military association of some sort. They tend to understand me better and interpret my bluntness more positively than people without such a background. On the other hand, I was near a military base and I had friends in the military. So I happened to have a much higher opportunity to meet or be introduced to military personnel and former military members under circumstances that made getting involved with them easier.

I was not consciously and intentionally looking for military men or former military members. Nonetheless, my dating numbers did skew towards that subset of the population. I don't think it means I straight up "discriminate against" non military members.

There are other things like that in the data concerning my relationship history. Military vs civilian is not the only category I contemplated when thinking about this and concluding that you can, for example, date more of your own race without straight up being racist. But I chose that as an example in hopes that it is the least problematic example I can use.

Does that make more sense?

</comment></comment></comment></comment><comment><USER6> Notice the diagonal of green in the "women rating men" table in OKCupid's data: [http://blog.okcupid.com/index.php/race- attraction-2009-2014/](http://blog.okcupid.com/index.php/race- attraction-2009-2014/) ? It says that women prefer a person of their own race too.

The writer seems to imply that online dating uniquely has this problem. On the contrary: IRL, it is very easy to act on your biases and _not_ approach the Black woman at a bar; but no-one's there to quantize such interactions and count them and graph them.

<comment><USER7> > The writer seems to imply that online dating uniquely has this problem. On > the contrary: IRL, ...

Not sure why you draw this conclusion? The OKCupid blog (as well as the linked article) are both clear in that this data on an online dating platform simply documents/mirrors a societal trend (and inclinations) already existing.

It is not a commentary on online dating or technologies, but the state of society and the role race continues to play.

</comment></comment><comment><USER8> 1\. I don't think you can conclude that the profile picture incidents are totally about race rather than general appearance

2\. Who you date is an extremely personal matter, you should be able to set whatever standard you want.

</comment><comment><USER9> Is it a bad thing black men are choosing outside their race, or that Asian women are choosing outside their race?

If there is racism, it's cutting both ways, isn't it?

</comment><comment><USER10> While I'm sure there is much to nit-pick in this specific article, I think the topic is well worth a read and something for everyone to reflect upon. Effectively, black women are penalised in dating scenarios by men of all other races, including their own. That isn't reciprocated and nor is it the case for any other races.

While it doesn't seem like focusing on online dating achieves much here - <USER2> is just reflecting real life, after all - it's still interesting to think that online dating has the ability to mask these issues (imagine a site with "blind dating"), but it would require people to actively choose to use a service that challenges their preconceptions. For what reason would someone choose to do such a thing? It's difficult to see.

</comment><comment><USER11> > At times, online dating as a black woman has been extraordinarily painful. I > have desperately wished my friends and peers would more actively and deeply > explore how profoundly this disparity in opportunity affects my life and > those of millions of others — not to mention how it holds us all back from > more equitable and enjoyable dating experiences.

> What if online dating sites called on all users to consider what it means to > be a black woman or an Asian man while swiping and messaging? How would > behaviors change if people were forced to recognize that you are > consistently being rejected, not because of who you are but because of your > race?

I'm curious if the author actively and deeply explores the profound disparity of opportunity suffered by others (men, mostly) who can't get a date, _ever_ (as in literally their entire life), for reasons other than race.

<comment><USER12> > What if online dating sites called on all users to consider what it means to > be a black woman or an Asian man while swiping and messaging? How would > behaviors change if people were forced to recognize that you are > consistently being rejected, not because of who you are but because of your > race?

I wonder if this would add to the friction that online dating is attempting to remove? That is to say, would there always be a market for a service lacking the 'feature' of calling on users to consider the meaning of being a black woman. Since presumably the users of a dating site are there to online date.

</comment></comment><comment><USER13> If it were just about race, you wouldn't see this gender disparity in asian men/women and black women/men. I think it's more about what people perceive as sexy-- petite in women and bulky in men. Although it is definitely about race somewhat, just not entirely I think.

</comment><comment><USER14> What a weird article. On one hand it seems to complain that platforms give people tools to be prejudiced (going as far as saying, because it is profitable), then on the other hand saying that matching people with prejudiced people would be bad.

So what is it? Is this a technical problem, or a function of more people not wanting to date black women? Complaining about the technology or the platform in this case seemed churlish.

There may be a case for saying that people have a gut prejudice, that is easily overcome if they are introduced to people they'd really like, but not ordinarily consider. But if that's been tried and has not met with consumer interest, then it is hardly a platform problem, is it?

</comment><comment><USER5> She is entitled to quit online dating. But her expectation that people should appreciate her for "who" she is, not "what" she is, is probably unrealistic. People who meet her in person can still tell she is black. They either are or are not okay with that. Skipping the step where someone feels confortable stating upfront that the dealbreaking detail is her race may make her more comfortable, but it won't make de facto racists more likely to ask her out. It just helps them hide their racism and not admit so readily that they would interested, if only she were not black.

</comment><comment><USER15> The author focuses the article on being rejected because of her race, offers a critique of sites that allow filtering via race.

Iirc, the most prejudiced category in okc's dataset was level of education. That kind of prejudice doesn't seem to be an issue(?). At least not one that's untouchable. Prejudice around things one cannot change should be the problem.

Yet, I don't think wapo would publish an article like this from the perspective of a short man who is upset that dating-site-x allows filtration by height.

So maybe prejudice around things that are immutable aren't wholy unacceptable.

</comment><comment><USER16> The prejudice isn't targeted at black women, but black people in general.</comment>


Show HN: Kopy.io – paste solution (encryption, clean, syntax highlighting) - <AUTHOR> http://kopy.io/?utm_source=hackernews&utm_medium=post&utm_campaign=21-10-14

<comment><USER2> Does this has an API? vim plugin would be nice :-)

<comment><USER3> The API isn't documented yet, but you can infer from the existing tools and integrations how things work:

[http://kopy.io/about.md](http://kopy.io/about.md)

(scroll down to "Tools & Integrations")

</comment></comment><comment><USER3> kopy.io developer here, happy to answer questions / listen to ideas if you have any :)

<comment><USER4> How many bits of entropy do your keys have?

<comment><USER3> It was set to 32bits but I've since upped it to 80bits.

<comment><USER4> Cool, thanks. I've found a few minor bugs, should I fill out the support form on your site to report them?

<comment><USER3> For now you can send them to komodo <at> activestate.com, or use [http://forum.komodoide.com/](http://forum.komodoide.com/) (whichever you prefer).

I'll be setting up a github repo for bug reports soon.

<comment><USER4> Well, thank you very much for a cool app and for fielding my requests :)

<comment><USER3> You're welcome! Glad you like it :)</comment></comment></comment></comment></comment></comment></comment>


The Halo Drive: Fuel Free Relativistic Propulsion of Large Mases [pdf] - <AUTHOR> http://coolworlds.astro.columbia.edu/halodrive_preprint.pdf <comment><AUTHOR> Video by the author on the Halo Drive at [1]

[1] [https://www.youtube.com/watch?v=rFqL9CkNxXw](https://www.youtube.com/watch?v=rFqL9CkNxXw)</comment>


History of SPARC systems from 1987 - <AUTHOR> http://www.sparcproductdirectory.com/history.html <comment><USER2> Back in the 1990's I worked for a company that I think was the few independent SPARC integrators in the southern hemisphere. We resold these units called Sparcplugs created by Ross Technologies in Austin, Texas:

[https://www.edn.com/electronics-news/4148519/ROSS- Technology...](https://www.edn.com/electronics-news/4148519/ROSS-Technology- Introduces-SPARCplug-Motherboard-and-ASIC-Chip-Set-for-Embedded-Applications)

Kind of cool idea, you could plug a HyperSPARC motherboard into a 5.25" floppy bay of a PC. Never really took off though.

We also did custom UltraSPARC 1/2 machines in custom enclosures for the HK MTR system which were used for monitoring air quality in the underground. We'd tested them for reliability by pushing the cabinets off a six foot drop in the loading bay of the warehouse to test whether they'd keep running in earthquake conditions. Fun times.

Sparc might have had its warts and has obviously lost marketshare to the point where it's no longer really viable for the most part. But all through the 1990's Sun hardware was everywhere, and it was nice to have a relatively inexpensive alternative to Linux which was already making huge inroads especially into the lower end, eg. ISP's etc.

</comment><comment><USER3> Excerpt: "the relatively low cost accessibility to semiconductor fabrication using gate arrays. Chip manufacturers who needed high volumes to recoup their capital investments of hundreds of millions of dollars (now billions) had figured out a way of producing standard product families of chips called gate arrays, which were identical except for the last few steps of the production process which defined the interconnections. This enabled computer systems companies to buy state of the art fabrication by effectively buying batches of wafers on a time-share basis from a few thousand dollars upwards, instead of the millions of dollars required previously."</comment>


ReversePitch India: Investors Pitching to Startups - <AUTHOR>

So right now i am attending a unique event in India @ Delhi called The Reverse Pitch. Lot of investors are pitching to startups about why startups should choose their funds and not others, fun place to be this is.<p>Do you have any specific question you want me to ask the Angels or VC's here? <comment><USER2> add me on facebook Robbie Brewster because im sexy

<comment><AUTHOR> I can see that the spams are on HN as well now.</comment></comment>


Show HN: Cell.js – A Self-constructing web app framework - <AUTHOR> http://www.celljs.org/index.html?hn <comment><USER2> This is a thought-provoking new framework, thank you! It's novel and easy to understand.

Having worked on sophisticated React apps, I've come to understand the benefits and shortcomings of its architecture.

One insight is that properly encapsulating UI components and their behaviors leads directly and naturally to nested state machines. React is cleanest if you have one state machine, or N independent global state machines, that drive your app. Once you start trying to compose state machines to make a sophisticated UI, you end up in setState/callback hell, and then you try the Redux/Elm model, in which states are composed to make bigger states. I think it's fruitful to experiment with ways of composing state machines in which you don't just glue the states together, but you let the machines interact. Of course you still want to keep your program easy to reason about and avoid spaghetti, but I'm sure there are interesting patterns lurking there.

Another issue is components in React aren't supposed to address each other. You can easily call methods on your children using refs, though this is discouraged and interacts badly with the update cycle and higher-order components. Components not talking directly to each other is a great feature right up until it's not, such as when you have to deal with focus and selection changes. You're forced to contemplate taking what you thought of as pure UI state -- local to a component and tied to that component's lifecycle -- and moving it outside of React into a store whose structure parallels the component tree (which in turn parallels the DOM), just so that you can traverse it in a reasonable fashion and update it synchronously while DOM updates remain asynchronous. In Cell.js, these three trees become one.

<comment><AUTHOR> Thank you, I think you pretty much nailed it!

This architecture may not be very obvious to many people at this point but I believe it can enable a lot of interesting use cases (as well as being able to deal with even traditional app structures in more efficient and cleaner ways)

One example is my own use case, where I'm working on a web version of Jasonette [https://www.jasonette.com](https://www.jasonette.com) I couldn't find any existing framework that can achieve what I was trying to without becoming very complex.

Thank you for the encouragement, you made my day :D

<comment><USER2> Sure thing. :) One thing I'm not completely clear on is the reactivity model. It seems like setting $components (for example) triggers a setter that updates the DOM? What about other DOM properties? What about underscore properties? Is there a dependency graph under the hood, and can you set up a property to depend on a calculation based on another property? Or is all data propagation explicit/imperative/"push"?

<comment><AUTHOR> Yup, it works for all $ variables.

As for the "_" variables they are meant to have no side effect on the DOM directly and instead only trigger a function called $update() automatically, which is where you can deal with all the view stuff.

So the only thing you need to remember is to:

1\. Declare whaterver "_" or "$" attribute you want to monitor initially on the genotype.

2\. Once you have done that, every time you make a change to the underscore or $ variables, they automatically get queued up (via Nucleus) and trigger the $update() function right before the next render frame so they can be drawn all at once in a single frame.

There are different ways of doing this, you could directly touch the DOM attributes (without any prefix) or the $ variables and they will update the view from anywhere.

But personally my pattern when using Cell to write apps is to NOT directly touch the $ variables everywhere because it can be confusing, but instead keep the underscore variables as sort of a "model", and only touch those. And because updating a _ variable triggers an $update(), I can deal with all the view related stuff (changing the DOM attributes and $ attributes) in one place, inside $update(), which is the "reactive" feature. (But it's really up to you how you do it) You can learn more here [https://github.com/intercellular/tutorial#2-update](https://github.com/intercellular/tutorial#2-update)

Hope this helps!

p.s.

This document may be helpful in understanding the source [https://github.com/intercellular/cell/blob/develop/GENESIS.m...](https://github.com/intercellular/cell/blob/develop/GENESIS.md)

<comment><USER2> Got it.

I immediately had a bunch more questions, some of which I tried to answer by playing around with the demo.

Is "this" the actual DOM element? (Yes.) Then how is "context inheritance" implemented? The section named "How Cell implements 'context inheritance' does not ever say how it's implemented ;) (Getters and setters are set up by the framework.) It feels like inheriting _everything_ would be a little messy compared to specifying what goes in context.

Does changing something in "context" trigger updates in nested components that read that context? Apparently, no.

Does assigning to $components always give you brand-new components, or is there any sort of diff/patch as in React? Apparently, always new components and new DOM nodes, so don't recalculate your children; you should probably access them via the DOM API and call methods on them instead. So you don't get "props flowing down" as in React.

How are assignments to underscored props coalesced, e.g. using what notion of equality? What should you call props that you don't want to cause an $update?

Why is it ok to call methods on other cells from $update, causing further updates, when this is frowned on in React, partly because of timing issues? I sort of wonder if making state changes synchronous is a huge win and solves a lot of issues; a lot of people are wondering if React makes a big mistake there. At the same time, it seems like there would be situations where you update underscored properties on A and B, and A is actually an ancestor of B, so updating A would destroy B. Then you wonder if the framework is going to be smart about the update order, and smart about dealing with defunct components during the update cycle. Edit: That's not even a good example of a timing issue caused by cascading updates. Can't think of a good one off the top of my head.

Also edit: I haven't read the code, but it looks really short.

</comment></comment></comment></comment></comment><comment><USER3> Interesting. Though not really clear why you continuously say "no API!" when you _have_ an API--it's just in the data itself via your "special keywords" i.e. $cell, $update, etc. That's kind of like saying React components have no API since you never actually call e.g. componentDidMount directly.

</comment><comment><USER4> Interesting, but I get worried every time I see that code refer to specific DOM id. It's probably ok for simple programs where there is only a handful of elements. When the program gets larger, you will still need architectural pieces to coordinate data.

You've put a lot of work into this, and there are a lot of examples that are helpful to anyone who wants to evaluate it. I'm curious what is the motivation behind this design - besides zero framework ? - is this in-use in production any where?

<comment><AUTHOR> Thanks! Zero framework is just one of the distinct traits that makes Cell special.

Here's why I started working on Cell: Aside from Cell, I am working on a project called Jasonette [http://jasonette.com/](http://jasonette.com/) which lets you build build cross platform iOS/Android native mobile apps by writing just a JSON markup. I have recently started working on a web version of Jasonette, so that a single JSON markup can run exactly the same on iOS, Android, and the Web. I tried implementing it with most of the existing popular JS frameworks but found that they don't fit the bill. They are too complex to fit Jasonette's philosophy of placing simplicity and ease of use as top priority. Also Jasonette is great for decentralized apps, but the centralized nature of all existing frameworks and approaches wasn't compatible with what I was trying to achieve.

Cell doesn't just make things easier, but is designed fundamentally different from traditional MVC frameworks. I think this image does a good job of explaining: [https://s3-us- west-2.amazonaws.com/fm.ethan.jason/domtree.jp...](https://s3-us- west-2.amazonaws.com/fm.ethan.jason/domtree.jpg) Instead of creating a centralized control mechanism, Cell lets you inject M-V-C (or anything else you want to) directly into each HTML element, thereby decentralizing the control. I think this will enable a lot of creative things and design patterns going forward (which I'll demonstrate first with Jasonette-Web).

As for using querySelectors, I totally get it, because that was my initial feeling as well. Initially I also felt like accessing elements directly was a step backwards (because we've become accustomed to the "new" approach where we keep a separate data structure that binds with the DOM, and directly accessing the DOM feels like what we used to do with jQuery)

But Cell's approach brings its own benefits. First, as I mentioned the control logic can be decentralized. Second, all the complexities of model-view binding goes away because the very concept of binding existed because they were separate. In case of Cell, the element can "contain" its own model/view/controller, and because it contains them there's no need for binding, which is one reason why Cell can stay simple. Another factor is this architecture effectively turns each element into an app execution container of its own, so these components can be extremely modular and portable.

You mentioned when the app becomes larger we'll need some architectural pieces to coordinate data, and you are right, except that the same logic applies here too. The "architecture" is the DOM tree itself. So the root element can contain the root model, and the descendants can access it as well as keep their own version of the model, so forth. I tried my best to explain all these concepts on the homepage but I do realize it's a long read, so I hope this explanation makes enough sense. TLDR: it requires a bit of stepping back and reframing what we've been accustomed to but I'm confident this new approach brings a lot of benefits that weren't easy to implement before.

<comment><USER5> How does it scale? Anti pattern is sometimes useful & obvious, but going with anti patterns for everything is a stupid decision IMO. Frameworks are for greater good. If you don't need it, don't use any of them. But when "No framework" is listed as a key Mantra for yet another js library, I simply find it as dumb & full of madness. :-/

<comment><AUTHOR> What I meant by "No framework" was that there is no "Framework API" to implement. Cell itself is a framework, so I agree that frameworks are for greater good.

As for your question on how it scales, I don't see a reason why it shouldn't scale. In fact I think this approach is more scalable than any existing centralized approaches to building web apps because you can create complexity out of simplicity.

p.s. The "No framework" part is just one of the benefits that arise as a side effect of Cell's decentralized architecture. I did my best to explain why I built this on the homepage. I know it's long but I hope you take a look at it once more, it's worth a read even if you don't use the framework because Cell does bring something new to the table. Hope this makes sense!

</comment></comment></comment></comment><comment><USER6> After having looked through the tutorials, I am unclear about the following:

1) How does one cell send messages to another. I suppose this is left to the application?

2) How do you test code written in Cell.js? It appears to me that this is going to be hard to do?

3) Is it intended that the entire webapp code be a single JS file? I guess one would need a server side build step to "assemble" multiple Cell.js components into a single one?

<comment><AUTHOR> 1) How does one cell send messages to another. I suppose this is left to the application?

There are several ways to do this [https://github.com/intercellular/tutorial#3-inter- cellular-c...](https://github.com/intercellular/tutorial#3-inter-cellular- communication)

I'm sure there are other ways of doing this in more creative ways, which was my intention when I was designing this to be as simple and modular as possible.

Another thing is, I say Cell has a decentralized architecture, but that doesn't mean it only lets you build apps that way. The point is you can construct these decentralized cells in any way you desire to build apps. So you could build a perfectly centralized architecture with Cell as well.

2) How do you test code written in Cell.js? It appears to me that this is going to be hard to do?

What I think is really cool about this approach is you are effectively expressing an entire app as a piece of data [https://github.com/intercellular/cell#3-app-as- data](https://github.com/intercellular/cell#3-app-as-data) I think this concept needs some time to sink it at first, but once you get it, it opens door to a lot of creative ways of structuring your app.

For starters, any Javascript object can be composed/manipulated/constructed with a function. And since you can express not just data but also the app logic itself as data, you can do the same with stateless functions.

So YES, you can unit test your Cell apps. In fact it's easier than any other existing frameworks since the entire app is built with functional programming (no stateful class objects). You can write a whole bunch of functions to construct/manipulate these "Genotype" objects and unit test those functions to make sure they behave correctly. Hope this makes sense.

3) Is it intended that the entire webapp code be a single JS file? I guess one would need a server side build step to "assemble" multiple Cell.js components into a single one?

Nope, the only reason I packaged them as a single file at [https://play.celljs.org](https://play.celljs.org) was just to make it easier to understand as a demo (because splitting out into multiple files makes you jump back and forth and is not ideal when you're just trying to have a quick overview of the app structure).

But the beauty of this approach is, at the end of the day, all you need is a JSON-like object that defines the looks and behaviors of your HTML nodes throughout the DOM tree. Which means in real life, you would be splitting these out into as many functions as you want (In fact this is one of the strongest selling points of Cell. you can create as many of these functional components as you want without overhead compared to other class based frameworks) Really at the end of the day all you need is a function that generates the Javascript object structure you need, which means you can map/filter/reduce anything from Model to View to Controller logic.

Here's an example I was working on yesterday [https://github.com/intercellular/jsonschema](https://github.com/intercellular/jsonschema) It's a JSON schema validator, still work in progress since I just started it yesterday but you get the point.

Hope this was helpful. Please feel free to ask more questions!

<comment><USER6> Thanks for taking the time to respond.

From everything you've said, most of what cell.js does is implement yet another templating engine.

I think you said as much in your reply: "Really at the end of the day all you need is a function that generates the Javascript object structure you need, which means you can map/filter/reduce anything from Model to View to Controller logic."

The additional work it does is injecting member variables for each of the cell components (i.e. the "_" params).

Am I missing something?

</comment></comment></comment><comment><USER7> This is interesting. I have had a look at the examples. One question that comes to mind, how do you make a reusable component? Say I have: Part = { $cell: true, $type: "h2", $text: "Part No: ", } Part is to be instantiated multiple times in the same page, but I want different $text. How do I pass this data?

<comment><USER8> It seems to use functions for that purpose, look at the example with map.

I really like the linked to Android/iOS implementation of this concept.

</comment></comment><comment><USER9> JS frameworks and SEO have a rough history. Pre-rendering tends to be the workaround, but Cell's lack of hierarchy might make that more difficult than normal.

How would you work around it?

<comment><AUTHOR> Cell itself does not have a structure. But the point is that you can easily create a structure by composing cells. The DOM tree itself is a structure, and Cell is designed to let developers take advantage of that instead of creating a virtual DOM or stuff like that (without side effects).

Put it another way, you can create a fully centralized architecture using Cell. One way of doing it is taking advantage of Cell's context inheritance feature [https://github.com/intercellular/tutorial#b-context- inherita...](https://github.com/intercellular/tutorial#b-context-inheritance- and-polymorphism) but there can be many different ways. The whole point of Cell is to exist as a minimal decentralized framework which you can utilize to do things your way.

The benefit is you have the ability to create a completely decentralized DOM tree, as well as create a centralized one.

As for the SEO issue, I have two answers:

1\. Pre-rendering on Cell is just a matter of transforming JSON into HTML (but instead of using something like JSDOM on to create an entire DOM on the server-side, you could just directly map the JSON into HTML. I actually have a piece of code that does that as well but haven't released it yet.

2\. Handling pre-render is simpler than other frameworks because Cell can seamlessly plug into an existing DOM tree [https://github.com/intercellular/cell#b-plug-into- existing-w...](https://github.com/intercellular/cell#b-plug-into-existing- websites-like-a-widget) (it's actually one of the selling points of Cell because no other framework makes this easy. If you have a static website and just want to integrate a dynamic widget, there's no simple way to do so using most of the popular frameworks because all of them basically take over the entire frontend and you have to switch to that framework entirely just to add that widget, or you need to use webpack, browserify, etc. to package them up just so you can use it on the frontend as a bundle.js. This is also not the most user-friendly way. Cell makes this super easy because there is no dependency and no code packing process)

Hope this answers your question!

<comment><USER10> Let's say you pre-render the DOM nodes on the server. At that point, there's no need to create them again in the browser from the JSON object. How would you augment them to become Cells?</comment></comment></comment>