Show HN: Gun v0.1.0 – The Easiest Database Ever - <AUTHOR> http://gundb.io/#step1 <comment><USER2> From the blog:

> Because gun is not a database (NoDB), it is a persisted distributed cache.

This I believe.

> The fatal flaw with databases is that they assume some centralized > authority. While this may be the case initially when you are small, it > always ceases to be true when you become large enough that concurrency is > unavoidable.

Partially true. Though that's not necessarily a "fatal flaw", and calling it such is troubling. Yes, concurrency is unavoidable when you become large enough but you also want your data to be, well, consistent and persistent, but then you go on...

> No amount of leader election and consensus algorithms can patch this without > facing an unjustified amount of complexity. Gun resolves all this by biting > the bullet - it solves the hard problems first, not last.

Where in the code, pray tell, is it solving these problems? The fact that you also claim to be an AP system (and conflate this with ACID) makes me strongly wonder what your notions on Consistency actually are.

"Just a cache" needs some consistency as well, I'll point out, but you may not care as much about stale reads.

> It gets data synchronization and conflict resolution right from the > beginning, so it never has to rely on vulnerable leader election or > consensus locking.

From what I'm starting to understand you're, at best, shuffling that off to S3 or "other storage engines" \-- you've still got to pay the cost. You can't really claim to do linearizability without, well, actually doing linearizability.

So, maybe it's a cache, sure. And you seem to like to work on the developer API, nothing wrong there. But there's nothing new under the sun and I'm really skeptical that hard distributed database problems are solved in one large JS file.

<comment><AUTHOR> Clarification, I said GUN is NOT acid compliant from your "usual" understanding of the term, since GUN is AP. Most people assume acid means CP.

ACID is very vague though, and I'd like to explore it more by writing tests to either confirm or deny whether GUN supports it or not (would you be interested in helping build those tests?). I also want to get some Jepsen like tests up as well.

Data convergence (data sync) is guaranteed by the Hypothetical Amnesia Machine algorithm, which is completely deterministic and idempotent. There is some details on it in the wiki, let me know if you have any questions. I also did a tech talk on it.

In NO way does gun rely on S3 for consistency. That would be horrible. Check out the algorithm and slam me with questions/critiques. Thanks for looking. :)

<comment><USER3> Is the Hypothetical Amnesia Machine algorithm backed by any scholarly research, or can you at least cite some papers with similar techniques? Blog posts and javascript are nice, but I have a certain fondness for LaTeX- generated PDFs whenever data integrity is involved, e.g. HyperDex's pretty excellent papers:

[http://hyperdex.org/papers/](http://hyperdex.org/papers/)

<comment><AUTHOR> No papers yet, but I've been working on building up connection with academics and hiring them. So hopefully expect to see something published, but the process takes a while.

Meanwhile I'm actively working on building towards a simulation system and an actual high-scale deployable battle testing environment. Think of these as taking the theory from scholastic research, and actually implementing them in practical settings that anybody can run.

I'd also like to get a TLA+ specification going. If you have any experience in this stuff, please please please contact me firstname.lastname@example.com because this is important to me.

<comment><USER4> When I read your responses, I can't shake the feeling I'm talking to some snake oil salesman in a nice suit.¹

And to be honest, GUN's docs sound similar. Heavy on how to use, and how awesome everything is, but as soon as one tries to understand stuff, it's either WIP or "team up with me/us!". _eyebrow rises_

And the claim of "building up connection with academics and hiring them" falls perfectly in line with this. Why the hell can't you describe what you did by yourself? If it's so awesome, why don't you just _die_ to explain it to everyone who asks? Or, $DEITY forbid, should the "academics" lend some credibility to GUN, even if it's with just their title? What's this HAM about?

Maybe it's just me, but all this with a rather complex naming convention (souls...) and code...

eh, I'll go with "show us teh algoz". Or describe it.

¹) To illustrate: « I'm actively working [...]» – I'd like to see you passively working.

<comment><AUTHOR> Have you looked at the Wiki?

[https://github.com/amark/gun/wiki/Conflict-Resolution- with-G...](https://github.com/amark/gun/wiki/Conflict-Resolution-with-Guns)

[https://github.com/amark/gun/wiki/How-to-Create- GUN](https://github.com/amark/gun/wiki/How-to-Create-GUN)

[https://docs.google.com/presentation/d/1VIOJc0bdzUNs7yXMLKCc...](https://docs.google.com/presentation/d/1VIOJc0bdzUNs7yXMLKCcgwU8ZZqMh-G4XDJt8JRtvSA/edit#slide=id.g6c37d5900_0378)

No snake oil. It is a state machine operating over a boundary function. However words like that sound super jargony which sounds vague, despite the fact that people spend their entire lives working on just these problems sets and their nuances.

I'm happy to discuss the workings, and I'd encourage you to try and use GUN and see if it can withstand your concurrency attacks. Challenge accepted?

Edit: This person (in the comments below, please upvote him), and my reply, best addresses the most important questions: [https://news.ycombinator.com/item?id=9077969](https://news.ycombinator.com/item?id=9077969)

<comment><USER5> You're happy to discuss the workings? How about writing them down somewhere...? All your documentation, such as it is, describes things using terms that you never actually define or explain. Your code is just as bad. Worse in fact, because it introduces yet further terms that are not in the documentation.

Your Conflict-Resolution-with-Guns page simply says 'see gun.HAM' for the explanation. No indication where this can be found. It isn't in the source repository and it isn't in the wiki. A google search reveals nothing.

The 'algorithm' presented on How-to-Create-GUN is meaningless because you don't define any of the return values. I can see how it maps some input values to some output values, but nowhere do you say what any of those return values actually mean, what I should do with them, or why they are useful.

e.g. return {amnesiaQuarantine: true} ... what does this mean? What should be done with that return value? What is an amnesiaQuarantine?

e.g. return {quarantineState: true} ... what does this mean? How does it differ from amnesiaQuarantine: true? What is a quarantineState? How should I react to receiving this return value?

Your documentation says a lot, but doesn't actually define anything, and is ultimately meaningless. This is why people are giving you a hard time and asking so many questions.

Most people reading will not know: what amnesiaQuarantine is, what amnesiState is, what the Hypothetical Amnesia Machine thought experiment is, what a boundary function is (there are multiple definitions - what are you using?), what 'converge: true means', what 'incoming: true' means, what state: true means (given that you say other ' _state ' variables are _times* -- how the hell does a boolean represent a time, what 'you have not properly handled recursion through your data' means. What is a 'soul'? What happens to the data when particular values are stored? Where are things stored? What is the data flow? How are things shared? How does sync happen?

Imagine you don't know what any of your terminology means - like everybody reading your documentation. Treat each term like an undefined variable. Now try to understand your document. You can't. Those undefine terms are never 'set' anywhere. It doesn't make any sense. As soon as it gets close to actually explaining anything it just handwaves, or leaves you with undefined terminology.

You don't define what kind of persistence you implement or what consistency guarantees (worse: your explanations do not seem consistent). You don't define how your conflict resolution works (the 'explanation' given is tantamount to Star Trek technobabble). You don't define how data is transferred. Your slides are useless without any notes.

In your code you say that ACID is vague. It really isn't. Your explanation of how you meet ACID _is_ extremely vague however, using what appear to be truisms and contradictions, and yet more undefined terms that seem to have little to do with anything mentioned in the documentation. Your code is poorly structured, and badly commented. It uses 'cool' sounding gun-related terminology ('shot', 'roulette', etc.) without defining what the hell those things mean. There is nothing in the code that actually seems to do anything with consistency

Your HAM algorithm - the very crux of your system as stated in your documentation, remains unexplained, and WORSE.. has a TODO: comment noting that it might not work and needs further investigation. This comment also mentions rollbacks.... yet nowhere else in the code or documentation says anything about rollbacks, and it's not clear why rollbacks would even be needed according to the (vague) explanation of HAM.

Your further explanations in these comments STILL do not actually describe precisely what HAM is or how it works. If you cannot do this in a simple and elegant manner, then NOBODY will be able to use or trust your database system.

If you want anybody to take you seriously, you must write a simple and concise explanation of HAM, including definitions of all your terms.

Frankly, it is so vague, and so unclear how it works that I am starting to think this is the product of some kind of mental illness...

Sorry to be so harsh, but nobody seems to be getting through to you.

EDIT: I'm reminded of Einstein's quote: "If you can't explain it simply, you don't understand it well enough."

<comment><AUTHOR> Terms, defined here: [https://github.com/amark/gun/wiki/semantics](https://github.com/amark/gun/wiki/semantics)

Explanation of the conflict resolution in simple terms, here: [https://news.ycombinator.com/item?id=9077969](https://news.ycombinator.com/item?id=9077969) .

Return values, with comments explaining their purpose, here: [https://github.com/amark/gun/wiki/How-to-Create- GUN](https://github.com/amark/gun/wiki/How-to-Create-GUN) (I know you referenced this already, but did you read the comments explaining each return value? Edit: upon further reading your comment, it looks like you did, you just didn't like them. Perhaps I should make them more concise)

Slides (no audio/video unfortunately) on what operations to apply given the HAM return values, here: [https://docs.google.com/presentation/d/1VIOJc0bdzUNs7yXMLKCc...](https://docs.google.com/presentation/d/1VIOJc0bdzUNs7yXMLKCcgwU8ZZqMh-G4XDJt8JRtvSA/edit#slide=id.g6c37d5900_0378)

Persistence, currently S3 or localhost-testing-only disk. Persistence is a plugin.

ACID: Please link me to your favorite explanation of ACID that is clear and concise. I'll try and base my reply off that. I haven't found any good ones. GUN is AP, not CP.

People are taking me seriously, enough that I have contributors and funding. Some people don't take me seriously, and I'm trying hard to open up to them and be honest.

Do I need better documentation? Yes. Do I have documentation? At least some, yes.

What else can I handle for you?

<comment><USER5> You still have not described HAM except in the vaguest of terms. You have addressed very few of my questions.

What is the Hypothetical Amnesia Machine thought experiment? Where have you described this, or where can a description be found? What do the return values mean? The comments are very little help. What situations do they cover?

How does this relate to your algorithm? Please explain the algorithm in simple terms, with precise definitions.

Your slides provide NO USEFUL INFORMATION WHATSOEVER. If you cannot see that someone who doesn't already know what HAM is will be TOTALLY UNABLE to understand your slides, then you have a serious problem seeing things from another's point of view and should get somebody else to do your documentation for you.

Believe me, it's not from lack of trying on my part. I'm not stupid. I'm an experienced developer and familiar with the internal workings of many different database systems. It's my job and my hobby. I have maintained and contributed to several database systems. Your slides are intriguing but meaningless to me.

Your list of definitions ('Semantics') redefines many things that already have perfectly good definitions, and declares new terminology for concepts that already have perfectly good labels.

Many of the definitions are vague or even nonsensical/self-inconsistent.

For example: "soul': is the practically unique, immutable identifier for a node".

OK, so it's an identifier for a Node. So it's a Node ID. Why don't you just call it that?

But what does 'practically unique' mean? Something is either unique, or it isn't. It might be unique in a particular context, e.g. only in one instance of the database, or application, or server, ... or... what?

And what's a 'node'? "A group of no, one, some, or all fields, as they change over time." Well, you've redefined a perfectly good piece of jargon with a new and vague description. Node seems like a really bad word for this. In what way is a set of fields anything like a 'node' in the general sense? How does a node capture things over time? Is it a list, a history, an event log....?

"A group of no, one, some, or all" is better known as a 'set'. This is universally-accepted mathematical terminology. Except you've redefined that too.

And if something is a set of fields.... hey, how about calling it a field set? You know, like everybody else does...? Oh, no, let's call it a node instead....

My favourite: "Sent: proof that a message was received, might contain data that needs no receipt." The more you study this sentence, the more nonsensical and ambiguous it becomes. For a start, why not call it 'Received'? Or even 'Receipt', because that's the common noun for an item showing proof of receipt. Except, that you might need to prove receipt of data that needs no receipt... It is a _ridiculous_ definition.

I'm sorry, but I can't take you seriously.

Frankly, it sounds like you yourself don't understand the domain and concepts you are describing, and are handwaving to cover your lack of knowledge. The fact that you provide your own terminology for things that could quite easily be described in standard terms betrays a lack of theoretical background, and ignorance of the state-of-the-art.

I'd venture a guess that your being REALLY, REALLY bad at explaining things may be correlated with the fact that you're apparently really good at describing tiny things in the most grandiose and self-aggrandizing terms. This seems to be ubiquitous across all your github projects. Redefining things unnecessarily, solving things that already have simple solutions, describing toy apps as radical revolutionary game-changers. I suspect your inability to explain things stems from this narcissism/egocentrism.

<comment><USER6> Abso-fucking-lutely.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER7> A few disagreements in this thread have crossed over into being disrespectful. This is a gentle reminder that you can (and on Hacker News, please do) disagree without calling names.

[https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html)

[https://news.ycombinator.com/showhn.html](https://news.ycombinator.com/showhn.html)

</comment><comment><USER8> A few questions.

1\. How do you define the operating boundaries for your time stamps? What is too low and too high and why?

2\. What are the expected use cases for your conflict resolution algorithm? The HAM function you proposed would just overwrite one string with another and so for things like collaborative document editing, user intention isn't preserved.

3\. Where is the vector clock defined in your code? I can only see Gun.time.is() in a brief glance at your code... and it is just getting the UNIX timestamp in milliseconds.

<comment><AUTHOR> Wonderful questions! Actually some of the best in the entire thread I think.

1\. See (3) but first read:

A) The upper boundary is defined by the current machine's local clock, which could have skew or drift.

B) The lower boundary is defined by the last known update on an individual record (down to the UUID+field).

2\. The expected use case is for this conflict resolution algorithm is for basic field/value pairs (terms defined here: [https://github.com/amark/gun/wiki/semantics](https://github.com/amark/gun/wiki/semantics), and here: [https://github.com/amark/gun/wiki/JSON-Data- Format](https://github.com/amark/gun/wiki/JSON-Data-Format)) within a UUID an object (called a node, as in a node in a graph).

This is what HAM works off and is considered the lowest level atomic pieces (the value). In order to sync on collaborative text you need to build an OT layer on top of this (I plan on doing this, possibly integrating with ShareJS as another mentioned). You cannot collaboratively sync on atomic values by themselves, you must define a CRDT for that - plugins/modules for them will be coming later.

3\. Vector Clocks. HAM does not assume what the sort key is for state, it just assumes it is a value it can do <, <=, ===, =>, > comparisons on.

A) Vector clocks have a vulnerability that if you are working with temporary/ephemeral machines, the clocks will constantly get reset and have to play "catch up". However, network partitions are highly likely, so there is no guarantee that two machines won't issue a conflicting vector clock. If this happens, there is no standard way of dealing with this, although there are plenty of work arounds.

B) Timestamps also have a vulnerability, that is if you set your local clock ahead (say 2 years in the future) then it will "always win" wiping out other peers valid values. However you unfortunately cannot determine in an untrusted network whether a peer is being malicious about being 2 years in the future, or if they are actually at a different point in timespace - like a GPS satellite or on Mars, or went offline in the subway.

C) As a result, this is why I combine them together via the boundary function. The upper and lower boundaries of the state machine provide the relative "vector" for the untrusted timestamp in the delta update.

The benefits of this technique are two fold:

1) You get deterministic and idempotent resolution within a special-relativity timeframe in a decentralized system without gossip (consensus).

2) If you do run GUN within your own trusted network, you can use the timestamps to calculate drift between machines and then readjust the boundary function of the state machine. Thus giving you a highly accurate "objective" view of your data across peers, which if the latency is low enough could indicate it is worth creating locks (but thus sacrificing Availability).

Hope this was clear enough! Any questions? I'm going to be reposting this in the rest of the thread.

</comment></comment><comment><USER9> I don't know if I should consider this "the easiest database ever" or "gun is not a database" (from the FAQ). Github says "a distributed, embedded, graph database engine".

I think some clarification around the marketing could do a world of good.

<comment><AUTHOR> Good point, oh boy - caught me red handed. shameshame.

What I'm trying to get across is that it is the easiest database because it is not your traditional master-slave database, and it doesn't require maintaining any database process. It is indeed just a cache, but it has all the benefits of a database.

<comment><USER10> I'm lost. How does it have all the benefits of a database, without any persistence? That doesn't sound like a database at all.

<comment><AUTHOR> Persistence is just a plugin/module/hook. Currently it plugs into a very never-should-ever-be-deployed file on disk (for easy local testing only) and S3.

We're going to be adding more storage engines though! Hopefully building an open source S3 that uses fancy algorithms to store on disk and on peers. However I don't know that stuff, somebody else is doing it (or I'm hiring - we're funded!).

</comment></comment></comment></comment><comment><USER11> Interesting project! It seems to share a lot of the goals and design choices of PouchDB/CouchDB: distributed, offline-first, eventually consistent, deterministic conflict resolution, etc.

One big difference I can see is that it's only using LocalStorage, which has good cross-browser support, but only allows 5-10MB maximum. Are there plans to add IndexedDB/WebSQL support so that users can store more data?

<comment><AUTHOR> Yes! Thanks.

LocalStorage implementation is just the default plugin, and I chose it first because of its compatibility. I'd like to get IndexedDB support in there as well. Interested in helping?

</comment></comment><comment><USER12> I wanted to read the text on the page, but the styling, with the shadow, or the gloss, or whatever it is, it is giving my astigmatic eyes pain, so I couldn't, I'm sorry.

<comment><AUTHOR> sorry about that. IDK why but it makes it easier on my eyes, maybe I should do a survey (I'm probably just weird) and then fix it.

<comment><USER13> I definitely remember complaining about this exact thing a year ago :P. At least you toned down the shadow a bit.

<comment><AUTHOR> awwwe you remember me! Happy face! For... being "that guy" that had blurry text. Shoot, sad face. Thanks for sticking around :).

<comment><USER13> Heh, I remembered the project too, I was just reminded of the blurry text by the blurry text.

If you find a high contrast hard on the eyes you could drop it a bit by just making the lettering a lighter grey in leiu of the drop shadow. Just don't overdo it or you'll get people complaining about that.

</comment></comment></comment></comment></comment><comment><USER14> It looks very promising. However I wonder who is the intended user of Gun:

1\. "full-stack" developers who just want to save time and/or benefit from NoDB aspect 2\. Beginners and front-end developers who don't anything about databases?

In case of group 1 your marketing seems to be insufficiently technical as many people here have already noted.

In case of group 2 (which I belong to) things look completely different. As a beginner whose learning efforts are constantly disheartened by tutorials and courses which end at "locally hosted HelloWorld app" phase, I'd be more than happy seeing: 1\. step-by-step, layman-friendly tutorial on installing Gun on S3 and other platforms. 2\. _very_ well commented example app demonstrating how to create typical functionalities.

With such approach you will keep the "Dropbox of databases" promise which sounds very exciting. Actually I think that something like this should be an obligatory feature on Codeacademy or any web development MOOC dedicated to beginners.

<comment><AUTHOR> Great questions.

1\. As of right now, focusing on beginner/front-end devs who just want an easy open source Firebase like database. People building small experimental apps, since we have finished our battle-testing suite yet.

However, I'd also highly encourage full stack developers to get involved and try it out and give us feedback. For small projects it'll probably save you time, but the plugin/modules ecosystem (aka features) aren't mature enough that you'll be writing a lot of your own logic. Which please do! We need them!

If you don't want to run GUN on localhost, I'll host a GUN server for you. :) You are right, I need to get better docs/tutorials and information out on this, so laymen don't get disheartened.

Is there anything I can do to help? Thanks for your comment!

<comment><USER14> Thanks Mark, I'll keep an eye on the docs page then. I'll also keep the thumbs up :)

</comment></comment></comment><comment><USER15> Have you heard of sharejs [http://sharejs.org/](http://sharejs.org/)? It's made by an ex-Google-wave engineer and uses operational transforms for eventual consistency. It seems like you guys are solving similar problems.

I mention this because Dropbox has their own "Dropbox for Databases" called Datastore: [https://www.dropbox.com/developers/datastore](https://www.dropbox.com/developers/datastore) which is based on Operational Transforms: [https://blogs.dropbox.com/developers/2013/07/how-the- datasto...](https://blogs.dropbox.com/developers/2013/07/how-the-datastore- api-handles-conflicts-part-1-basics-of-offline-conflict-handling/)

<comment><AUTHOR> Actually yes! I'm one of the people who accidentaly sparked a long discussion in the #1 issues thread: [https://github.com/share/ShareJS/issues/1](https://github.com/share/ShareJS/issues/1) that I've seen other people on HN link to.

GUN doesn't have OT-style text collaboration yet, so go with ShareJS if that is what you need now. I do plan on implementing it on top of GUN though, or trying to get ShareJS integrated with GUN. Joseph is a really great guy.

Yupe, I've talked to Steve Marx at Dropbox Datastore at a hackathon before. He's a great guy as well. They're using algorithms that require some centralized conflict resolution though. Which is great, but I'm interested in the decentralized side.

</comment></comment><comment><USER16> I dislike that the webpage actually has very little information about what the tool does, what use cases it is suitable for, what the architecture is like, etc.

Here's an important question the homepage doesn't answer: is it ACID?

<comment><AUTHOR> Good point, I'll try and move the blog to another page and replace it with more details.

The fastest summary is that it is an Open Source Firebase.

Flat up answer for ACID: honestly, not how you traditionally would think, as it favors AP of the CAP theorem.

However, ACID terminology is actually pretty vague ([http://en.wikipedia.org/wiki/ACID](http://en.wikipedia.org/wiki/ACID)). Here is my comments about ACID in the code:

    			A - Atomic, if you set a full node, or nodes of nodes, if any value is in error then nothing will be set.
    				If you want sets to be independent of each other, you need to set each piece of the data individually.

    			C - Consistency, if you use any reserved symbols or similar, the operation will be rejected as it could lead to an invalid read and thus an invalid state.

    			I - Isolation, the conflict resolution algorithm guarantees idempotent transactions, across every peer, regardless of any partition,
    				including a peer acting by itself or one having been disconnected from the network.

    			D - Durability, if the acknowledgement receipt is received, then the state at which the final persistence hook was called on is guaranteed to have been written.
    				The live state at point of confirmation may or may not be different than when it was called.
    				If this causes any application-level concern, it can compare against the live data by immediately reading it, or accessing the logs if enabled.

If you have any specific further questions I am happy to answer. It has support for vector-clock/timestamp "state" transactions.

<comment><USER17> I'm attempting to draw a connection between your comments on ACID and what ACID actually means, and there doesn't appear to be any parallel.

<comment><AUTHOR> I understand what you mean.

Could you do me a favor and point me to your favorite description of ACID?

</comment></comment></comment></comment><comment><USER18> > 400 Bad Request

[https://github.com/amark/gun](https://github.com/amark/gun)

<comment><AUTHOR> oh snap, the HN "DDOS" has peaked! I'll see what I can do to get things back online. Thanks for putting the github link in here in case others get the same issue.

</comment></comment><comment><USER6> I would really love if this actually worked as promised. Way too much skepticism and not nearly enough proof. Kudos for actually putting this out there, though. It'd be great to prove everyone wrong, but I will not hold my breath.

Good luck!

<comment><AUTHOR> You can try messing with it yourself by, doing (if you already have node/npm/git installed and familiar with terminal):

       git clone http://github.com/amark/gun
       cd gun/examples && npm install
       node express.js 8080

Then open it in a couple of browser tabs on different devices, change their system clock, try refreshing data, crashing things. etc.

I'm also trying to figure out how to write simulated tests (like Jepsen) that will do all of this for you and give you the results of what failed/succeeded. Till then, let me know if you see anything break.

<comment><USER6> I'm not going to spin this up on 1000 nodes to make sure it handles the kind of load needed to simulate actual production traffic (which is what you would need to actually figure out if this would hold up to some kind of large scale load that Riak or Cassandra would be able to handle). Maybe you should do that yourself and document it to prove how good your product is!

<comment><AUTHOR> You don't need to spin up a 1,000 nodes.

You can just spin up a 1,000 tabs.

Since they all run the same algorithm!

Yes, I am working on more tests to prove myself wrong or right. Please bare with me as I/we make progress, because it is literally only a few contributors and me.

This is v0.1.0 for a reason, not v1. Lots ahead, but please play with it while we work on developing the test suite.

<comment><USER6> I appreciate the suggestion and response. Understand it is v.0.1.0 but you should also understand that when you bring something like this out with next to no academic backing behind your theories and algorithms there is DEFINITELY going to be skepticism and doubt.

You are exactly right, though. It's early, and I'll give you the benefit of the doubt that you will achieve what you want.

Also know that there is a TON of research in these areas (which you clearly are aware of based on your comments in this thread) that basically refutes a lot of what you are claiming. I would love to see more clear documentation along with actual proofs showing how your algorithm is sound.

Until then, good luck, and I look forward to hearing about your success!

<comment><AUTHOR> Thanks! :)

Quick question though: I'm claiming an AP system, not that I have all three. What research are you referring to that suggests you can't have idempotent/deterministic conflict resolution? CRDTs are out there in the wild and working. Do you have any papers in mind?

<comment><USER6> I'm not saying you claimed to have all three.

Only paper I would have in mind is the CRDT paper from Letia, Preguiça, and Shapiro which I'm sure you're already familiar with.

The thing that bothers me the most is that it appears your entire algorithm (Hypothetical Amnesia Machine) has no proofs behind it. Specifically, your wiki article here:

[https://github.com/amark/gun/wiki/Conflict-Resolution- with-G...](https://github.com/amark/gun/wiki/Conflict-Resolution-with-Guns)

Has a giant hole where the substance would be. That bothers me because you are putting this potentially cool thing out there WAY BEFORE you have done the actual work.

Again, I applaud the fact that you actually put this together and you implemented it. And I understand it's v.0.1.0. That's fine.

Claiming this: "All conflict resolution happens locally in each peer using a deterministic algorithm. Such that eventual consistency is guaranteed across all writes within the mesh, with fault tolerant retries built in at each step. Data integrity is now a breeze."

without any proof that algorithm actually does this reliably and WITHOUT DATA LOSS bothers me. There is so much snake oil out there, you don't need to be starting off on the wrong foot.

I'm no expert at this stuff (I've only been working on distributed systems for about 5 years) but I'm also not claiming to be an expert. I just know that there is a lot of hand waving out there, and I think it would be important to actually prove your algorithm.

My 2¢.

<comment><AUTHOR> This person (in the comments above/below, please upvote him), and my reply, best addresses the most important questions: [https://news.ycombinator.com/item?id=9077969](https://news.ycombinator.com/item?id=9077969)

Please don't assume I haven't done the "actual work", I have. The academic side of the equation with proofs is going to take much longer than the timeframe from my investors for this seed round. I openly admit that, but I'd rather do good of getting this out in peoples hands to actually play and build stuff with.

To be honest, I'll probably want to get Jepsen tests and the sort built before the academic side of the equation is completed. Thank you for being skeptical (I like that), but please don't ignore or not experiment with something just because a paper hasn't been published yet. Who knows, if you did play with it, you might like it enough to help write the paper - but maybe that is me being too optimistic.

Blessings.

<comment><USER6> That is good information, thanks for that.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER19> There is no way this can work. Merging data changes can inherently not be automated in the general case. Deciding if a change from foo to bar should win over a change from foo to baz depends on the semantics of those strings. There are some cases, for example counters, with simple and clear semantics where you can build reusable and robust solutions for. You can also handle the general case with simple policies like last write wins. But there is no way any algorithm will ever be able to figure out whether to choose bar or baz, not at last because I could arbitrarily declare any of the two outcomes correct.

<comment><AUTHOR> Every change can be preserved in a history/append-only/log/stream. So you don't have to "lose" data from another "winning". However, the algorithm will by default select one, you can then code it at the app level for the user to select a new winner.

The general case here is very UUID based key/value pairs. Anything beyond that, you should be using CRDTs and OT like algorithms, which I will be building on top of GUN.

However, in the meanwhile, I challenge you to try running the example folder from the GitHub ReadMe and seeing if you can break the automated sync and cause data divergence!

Edit: This person (in the comments below, please upvote him), and my reply, best addresses the most important questions: [https://news.ycombinator.com/item?id=9077969](https://news.ycombinator.com/item?id=9077969)

</comment></comment><comment><USER20> Awesome to finally see Gun on here, Mark! What still worries me is the reliance on external storage services, although a good local storage service could be built for Gun. Other than that, I'm glad to finally see docs!

</comment><comment><USER21> Cool approach. I had some fights with Neo4J and taming IO. I did fall back on a 2nd Level Cache, which is nothing else than a huge hash map/KV store in memory.

<comment><AUTHOR> Thanks! Interested in joining and working on these types of problems? You seem to have some pretty good skills. Shoot me an email email@example.com

</comment></comment><comment><USER22> You guys seriously need to work on your SEO - Googling "gundb" has the page show up with the text "Your browser does not support frames...".

<comment><AUTHOR> Oh my goodness #fail. Thank you for spotting this. I'll try to figure out how to fix it (probably by not being cheap by domain masking).

</comment></comment><comment><USER23> If it "is just a cache" and the data is distributed among every client, where is the data at each time before it is persisted to S3?

<comment><AUTHOR> Great question, I'm going to C&P a reply I did previously:

1\. In memory in the browser tab's process.

2\. If available, in the browser's localstorage or fallback.

3\. In the server process's memory.

4\. If available, on disk in the server.

5\. If in a multi-machine setup, any other connected server that is subscribed to that data set, being in memory (3) or in disk (4) if available.

6\. If configured, in a machine log on S3.

7\. Persisted to S3, which replicates and shards it for you internally.

8\. If configured, in a revision file on S3.

9\. If configured, in a multi-region S3 setup, redundantly in many places.

(2) is not cleared till an acknowledgment that (7) is confirmed. (1) is not cleared until an acknowledgement that (7) is confirmed or if the tab is exited. In the case of (7) it is no longer the delta/diff, but a snapshot of that current data set with that delta/diff's update. Retries from (1) ~ (5) will happen at various events, if the confirmations are not satisfied. If a conflict has already occurred by (3) the acknowledgement from (5) will include a notification that the value has already been updated, along with the standard delta/diff of that conflicting update being sent down. Meaning (5) does not guarantee that your delta/diff has "won", only that it has been saved or is already outdated.

Worst case condition is that (2, 4, 5, 6, 8, 9) are turned off, in which your user's data is as volatile as them preemptively leaving the page (although I suppose you could use an onbeforeunload to warn them) - however this behavior is the current norm for most http post based forms and apps. Actually, pardon me, worst case condition is that everything is offline simultaneously, however this is not really interesting because then users won't even be able to access your app in the first place.

</comment></comment><comment><USER24> I've looked at your "Hypothetical Amnesia Machine algorithm" and have a few questions.

First though, I'd like you to read this: [http://research.microsoft.com/en- us/um/people/lamport/pubs/t...](http://research.microsoft.com/en- us/um/people/lamport/pubs/time-clocks.pdf)

<comment><AUTHOR> Yes, I've looked at this paper before - I should reread it though.

I've done a tech talk (not recorded though) on the pros/cons of vector-clocks and timestamps. I have some very specific insights which I should probably write a paper on. Or at least get the tech talk recorded or written down. There are some slides at the bottom of: [https://github.com/amark/gun/wiki/How-to-Create- GUN](https://github.com/amark/gun/wiki/How-to-Create-GUN) .

What questions may I answer?

</comment></comment><comment><USER23> The demo is a little confusing because it loads two iframes and seen to be faking it, but yes it works and no, it is not faking it.

[https://dl.dropboxusercontent.com/u/4374976/gun/web/tabs.htm...](https://dl.dropboxusercontent.com/u/4374976/gun/web/tabs.html?key=random/sdcws4mU0)

<comment><AUTHOR> Thank you for noticing this. :)

My original tutorial actually required the user to physically open up multiple tabs and have them be side-by-side. However it was a mess and people didn't like it. So I opted to fake it... while still depending upon the real tech underneath.

HOWEVER, it is just running on a freebie heroku box, so it is probably bound to crash/fall-over soon.

</comment></comment><comment><USER25> As a "self-hosted Firebase", I'd love to see something like their integrations with various JS frameworks, for ex:

[https://www.firebase.com/docs/web/libraries/react/](https://www.firebase.com/docs/web/libraries/react/)

<comment><AUTHOR> YES! We're actively working on trying to get adapters built for React, Angular, Ember, Backbone, etc. but we're a super tiny team.

Would you be interested in contributing? You could really help make a big difference.

<comment><USER25> Awesome! I've starred the project on Github. I'm in startup mode and juggling way too many things these days, but maybe I can find a free evening :)

<comment><AUTHOR> sweet, shoot me an email firstname.lastname@example.com to talk more.

</comment></comment></comment></comment><comment><AUTHOR> Hey everyone! If you have any questions, I'll be here for the next several hours. Also check out the GitHub Wiki: [https://github.com/amark/gun/wiki](https://github.com/amark/gun/wiki) .

</comment><comment><USER26> Have you tried redis?

[http://try.redis.io/](http://try.redis.io/)

<comment><AUTHOR> I love redis! My first proof of concept of GUN used redis as the persistence/storage layer. But I moved off of it since I wanted a fully embedded solution.

Data wise the difference is that Redis doesn't support graphs. But you could easily build that on top of Redis, so you could argue GUN is just graph data ontop of Redis (well, not anymore) with a conflict resolution algorithm baked in.

<comment><USER26> I'll have to give Gun a go when I have the chance. Thank you for providing the contrast.

</comment></comment></comment><comment><USER27> Hey Mark! Congrats, it looks awesome, good to see this here!

</comment><comment><USER28> ...Is there a glow effect around all the text?

</comment><comment><USER29> Congrats. What is the license? I must be missing where it is and the source code I checked doesn't have it.

<comment><AUTHOR> Thanks!

Honestly, I might put this up to an open-source vote.

I personally learn towards the MIT and the ZLIB license, [http://en.wikipedia.org/wiki/Zlib_License](http://en.wikipedia.org/wiki/Zlib_License) .

However I also know a lot of other databases are doing AGPL, I think for monetary reasons. Which :/ I might also want to consider.

But as I said, I honestly think this should be a combination of community decision.

Could people reply back with what license they'd like?

<comment><USER30> If you want everyone to use your database, MIT or ZLIB are clearly superior. For you(r company) that would limit your monetization options to support and similar, which is certainly not ideal.

If you value free software (as opposed to open source), AGPL is a good option and allows you to sell more permissive licenses to everyone who needs one.

If you actually want to make money with this, it's really a question of your business model. I would use it with either license.

<comment><USER31> Why would using AGPL imply not valuing open source?

<comment><USER32> Because open source guys value having more people using your code, and using AGPL discourages some people from using it because they can't keep their modifications private?

</comment></comment></comment></comment></comment><comment><USER33> This is really awesome! Excited to use it.

</comment><comment><USER34> "With all new flavors like banana, fizzbitch, and GUN!" [https://www.youtube.com/watch?v=t-3qncy5Qfk](https://www.youtube.com/watch?v=t-3qncy5Qfk)

</comment><comment><USER35> This is the best troll ever

</comment><comment><USER36> this seems like a great tool. hosting firebase on my own is what I want to build real time apps, is this possible?

I have the same concerns for meteor which I have for this as well, which is security and scalability.

How does Gun address those two things?

<comment><AUTHOR> Great questions.

Hosting on your own: Yes.

Security: Currently a "Roll Your Own" approach, where you wrap GUN behind some firewall/throttling like system.

Why? Because permissions are so app-specific behavior, I haven't figured out how to generalize it. I don't think it is possible to do it, so in the future we'll probably provide various security plugins that come with app specific assumptions.

Scalability: Run the example folder in the GitHub Readme, and open up hundreds of tabs. Gun is running individually in all of them. See how it handles that.

I'm trying to have a production-grade battle-testing suite developed soon, such that you could just run a script, it would ask you how much you want to spend on the test, and then it would deploy a ton of GUN peers to the cloud and generate a ton of traffic and load. This is not available yet, but something I'm focusing on within the next 6months or year.

Anything I can help with?

</comment></comment><comment><USER37> Why is it called Gun? The name is a little off-putting. What's next, a database called Kill? How about Murder? Genocide?

Edit: The fact that I'm being downvoted for voicing a concern about the naming is really disappointing. This is a serious issue, and I would appreciate a response, not being buried.

<comment><AUTHOR> I didn't downvote you, so please don't think I'm the one trying to bury you.

I'm calling it GUN because it is powerful and therefore a dangerous tool to wield. Because I'm going with a fully decentralized/distributed system, it has also generated some controversy with people.

Fact is, centralized/master-slave consensus based databases are incredibly popular right now. Things like Riak, Cassandra's CRDTs are not getting enough traction as they should - but probably because they can be difficult to set up. I'm trying to blow this all out of the water and make distributed database systems easy for developers.

So I'm admittedly going for an edgy name. I'm not wanting to kill anybody, just centralized software.

<comment><USER37> Thanks for the response. I didn't think you were the one trying to bury me, but I appreciate the fact that you care.

I'm glad to hear that you are aware of the fact that this is a loaded term and that you intentionally chose it because you wanted an edgy name. While I'm still not a fan of it, I feel much better about it knowing the reason behind the naming. And I think you need to put this info somewhere on the site and the GitHub project. I read gunned.io, and I skimmed the README of your GitHub, and nowhere did you even acknowledge that the name was edge, much less indicate that this was an intentional choice. I would urge you to add a FAQ entry on gundb.io, add a wiki page to your GitHub repo, and put a line somewhere in the README (perhaps at the bottom) linking to that wiki page. Otherwise, you're going to end up with more people than just me thinking that you chose a potentially-offensive name as opposed to a deliberately edgy one.

Speaking of your GitHub repo, you should also add gundb.io as the webpage for the repo, and probably link to it in the README.</comment></comment></comment>


Spark - <AUTHOR> https://spark.laravel.com/ <comment><USER2> Anyone tried this? Could you integrate only certain components(and customize them?) with existing laravel application?

</comment><comment><USER3> Anything similar for Django?

</comment><comment><USER4> Does this have any connection with Apache Spark, or the Spark Java micro- framework?

If not: WTF? seriously?

<comment><USER5> No connection beyond sharing a name. Can you elaborate on why you're upset about that?

<comment><USER4> Ambiguous names are an endless source of confusion and waste of time.

<comment><USER5> This is why context matters. Nobody in the Laravel community is going to associate "spark" with anything other than this project, and hardly anyone outside the Laravel community will associate "spark" with this project.

This is exactly the same thing that happens with [https://www.drupal.org/project/spark](https://www.drupal.org/project/spark).

Words mean different things to different people depending on context. Getting annoyed at that is really just a waste of time and energy.</comment></comment></comment></comment>


Install Ubuntu on Nexus 7 - <AUTHOR> https://wiki.ubuntu.com/Nexus7/Installation

<comment><USER2> Hi,

I led the team that shipped this image, and I'm pretty proud of what we did. A few thoughts about our goals for this release.

The entire point of Ubuntu core on the Nexus 7 is to highlight our desktop's performance and resource issues. We know we're way too fat in terms of memory consumption, CPU usage, disk footprint, etc. and now we have a convenient developer platform that folks can use to help us optimize our core in preparation for a future world where mobile dominates. (nb, I've been calling it Ubuntu Pilates)

The great thing about Ubuntu on the Nexus 7 is that it finally provides a convenient, cheap, ARM platform where all the standard Linux tools work. Believe me, I've hacked on pandas, rpis, etc. and for what we're trying to do here, the Nexus 7 is so much easier to develop on.

And if I may insert some editorial, I often see the HN crowd complain about Apple's developer policies, working around strange bugs in their black box APIs, etc. This is your chance to help build out an open platform. I'm not saying our APIs are better (in fact, they tend to be less well thought out than Apple's), but at least you have a chance to help improve things in the platform, rather than accepting whatever the platform gives you.

In any case, the summary here is that for now, we've got a tight focus on improving our core OS footprint so don't expect that our current UI experience is great (it's not) or that it's a usable replacement for Android (it's not, unless you hook up a USB keyboard/mouse in which case it's just a super cheap, silent terminal).

Every bit that we improve the core OS on the Nexus 7 flows back into the rest of our platform so our desktop and our server gets leaner and faster. To make it painfully obvious, this will help all your Amazon EC2 instances. :)

We'd love to have any help. And stay tuned for more to come.

thanks, /ac

</comment><comment> grey-area This is a very early experimental project, requires wiping your nexus 7, the performance will not be good and it doesn't have a tablet interface, so it's for testers/devs rather than normal users at this stage:

[http://webcache.googleusercontent.com/search?q=cache:http://...](http://webcache.googleusercontent.com/search?q=cache:http://www.jonobacon.org/2012/10/26/ubuntu- core-on-the-nexus-7/)

It might help improve desktop performance though, and provide an alternative truly platform to android for phone manufacturers in time, so an interesting move for Ubuntu.

<comment><USER3> Seems to work better with LXDE:

<http://www.youtube.com/watch?v=ItkWCmkxBv0>

</comment></comment><comment><USER4> Now that this has been out for a few days, can anyone speak to the performance?

<comment><USER5> I'd like to hear about usability as well. If it's decent to use could be an interesting tool

<comment><USER6> Also anyone know about drivers? I have a microusb to usb dongle so it'd be cool to hook up a mouse and keyboard does anyone know whats supported in this regard?

<comment><USER2> You will need a USB OTG cable to use USB peripherals. This is mentioned in the wiki.

<https://wiki.ubuntu.com/Nexus7/UsingTheDevice>

</comment></comment></comment></comment><comment><USER7> Extremely misleading title. Maybe the utility to download and flash the device only takes one click to use, but we can't just ignore the fact that you have to actually get the device in recovery mode etc to even reach that step. I like that my nexus could potentially have ubuntu on it, but I think it's important to not purposefully misrepresent the steps it would take to get there.

<comment><USER2> We did think about adding 'fastboot oem unlock' to our installer script, but decided against for UX reasons. Asking the user to do some ugly looking terminal commands hopefully scared away the folks who least understood what they might have been getting into, as it is explicitly intended to be a developer build.

As for the various blog headlines, we obviously don't have control over those.

[edit] Oops, I see you might have been referring to the wiki. Thanks, I cleaned up the wording a bit to say "graphical installer" instead of "one- click installer". Thanks.

</comment></comment><comment><USER8> <http://news.ycombinator.com/item?id=4703922>

</comment><comment><USER9> I'm amazed there is no young 'Michael Dell' out there selling things like this out of his trunk at tech shows.

<comment><USER10> Why would there be? Android is a better OS than Ubuntu right now. Especially given all the issues that Ubuntu currently has on the Nexus (keyboard, camera, bluetooth, etc).</comment></comment>


FYI: Last time someone made a $100MM fund to boost development it didn't turn out all that great - <AUTHOR> http://query.nytimes.com/gst/fullpage.html?res=9C0CE0D61330F931A1575BC0A960958260

<comment><USER2> I think this new fund is basically a stunt to get a lot of headlines in the business press. It's not a coincidence that KP is announcing this at the _same_ press conference where Apple announces a bunch of business-friendly iPhone features.

The seventies-era Steve Jobs would have just put up a bloody banner that said DELENDA EST RIM, but I'm sure the older and wiser Jobs decided that an influential VC in a suit, wielding a suitcase stuffed with hundred-dollar bills, would make a better impression on the typical IT manager.

Did they name a single company that would actually get any of this money? I haven't seen any mention of one. And AFAIK the existence of a big pile of yet- uninvested VC money is not news.

</comment><comment><USER3> Do we actually know it didn't turn out great?

Beyond the fact that Java is the de facto language to work in, I'd wager that KP made an excellent return.

<comment><USER4> It got ok returns, but only because they tossed the original plan to fund companies using Java, and just invested in the same kinds of companies KP would have anyway.

<comment><USER5> There are lots of great Java companies at the moment (JetBrains, JBoss, Atlassian, ...). However investing in a particular company just because it uses certain technology or doesn't makes no sense to me.

<comment><USER6> I think that's because you're an engineer and not a business person ;-)

</comment></comment></comment></comment><comment><USER7> There is probably little basis to draw any conclusions from one data point. Besides, this focuses on the wrong thing - what they aren't realizing is that apple doesn't need 100MM to boost development. Apple just provided a way for any smart person with an idea to place his/her product in front of every iphone user.

Bring on the naysayers. I see huge opportunity (VC funded or otherwise).

<comment><USER8> Put it this way: Would you rather be the proud owner of an iTunes-marquee- featured Top 50 (by sales, with 70% going into your bank account) iPhone application or a top 50 Facebook app (where your revenues are eaten by bandwidth and server hosting costs)?

<comment><USER7> And the barriers to entry are lower for Facebook apps. Comparatively fewer people know Objective C and the Cocoa frameworks.

</comment></comment></comment><comment><USER9> I always thought it ironic some of the biggest investment successes of the KPCB Java-fund were companies that actually had little or nothing at all to do with Java which nonetheless rewarded the investors handsomely when they were subsequently bought or went public (albeit before the bubble burst).

Edit: KPMG -> KPCB. Thanks to myoung8 for pointing that out.

<comment><USER10> It's KPCB. KPMG is an accounting firm.

</comment></comment><comment><USER11> Wait, did they lose all the money they put into the fund? They tried something, it didn't exactly work the first time around, and are probably making some changes to try again. (2nd? 3rd?). Why is this a bad thing?

<comment><USER12> _Why is this a bad thing?_

Because it's dumb to dole out money based primarily on a programming language.

<comment><USER6> That depends entirely on what your motives are...

</comment></comment></comment><comment><USER12> They probably just used Java as a buzzword to pull in more institutional investors who read about the language and were ready to put up money based on it.

<comment><USER4> A firm like KP wouldn't have had any trouble raising money. I think they genuinely believed the hype about Java, and they were hoping that if they became the official Java fund (I think they were anointed by Sun) they'd get first crack at all the related deal flow. And that is probably what's motivating them here too.

<comment><USER12> I guess perspective is everything. I was an EE undergrad during the first bubble era, with little programming experience. I remember everybody talking about Java during the time, magazine articles, etc. Looking back, I can see how they thought that way; not being an active programmer can cause one to develop bad taste.

</comment></comment></comment><comment><USER13> If it didn´t work out why are they doing it again?

<comment><AUTHOR> publicity and association with apple

</comment></comment><comment><USER14> are you actually claiming that apple and sun have anything in common?

<comment><USER15> One rumor going around is that Sun will merge with Apple ... The logic behind this rumor is that Apple is now effectively a Unix company, that Apple and Sun could target the desktop and server markets, respectively -- [http://www.pbs.org/cringely/pulpit/2003/pulpit_20030213_0007...](http://www.pbs.org/cringely/pulpit/2003/pulpit_20030213_000762.html)

<comment><USER16> What's the last time that any of Cringely's predictions actually happened?

<comment><USER15> His annual predictions for 2007 achieved 61.5% ( [http://www.pbs.org/cringely/pulpit/2008/pulpit_20080104_0037...](http://www.pbs.org/cringely/pulpit/2008/pulpit_20080104_003787.html) ).

</comment></comment></comment></comment><comment><USER17> looks like somebody is suffering from cognitive dissonance;-)</comment>


Show HN: Gif2Fb, post gifs to Facebook - <AUTHOR> http://gif2fb.com/

<comment><AUTHOR> Source[0] available too, for the curious.

[0] [https://github.com/nathancahill/gif2fb](https://github.com/nathancahill/gif2fb)</comment>


SBCL20 in Vienna - <AUTHOR> https://lispblog.xach.com/post/189764932688/sbcl20-in-vienna <comment><USER2> This is really cool!

Notably, the venue of this conference was the _Bundesrechenzentrum_ (Austrian Federal Computing Center), abbreviated as BRZ, the strategic technology partner of the Austrian public sector where many IT applications and e-government services are developed and hosted:

[https://www.brz.gv.at/en/](https://www.brz.gv.at/en/)

I work in the public sector and have had the great pleasure to work with Philipp Marek, who hosted this conference, and many of his colleagues already in several projects where Lisp was used to achieve impressive and also fast results.

Currently, I am leading a project in the Federal Ministry for Digital and Economic Affairs where — in close cooperation with the BRZ as our contractor, and also with other ministries and organizations — we are using symbolic AI techniques to deduce and show suitable _grants_ for businesses, based on logical rules and criteria. The eventual goal of these developments is to automatically suggest fitting grants in the Business Service Portal (usp.gv.at), the Austrian e-government platform for businesses.

The BRZ team presented a first draft of the rule-based DSL for encoding eligibility requirements, specified as Lisp forms, already in the project kick-off (i.e., first) meeting. This shows that Lisp is very suitable for fast prototyping, and will be an excellent language to implement the logic we need in this project.

In the public sector, we are especially interested in symbolic AI methods, to ensure traceability and explainability of decisions. Lisp and Prolog programmers are especially needed for these projects, and it is great to see that the BRZ fosters these developments by hosting such conferences and already using these languages in several projects.

<comment><USER3> Thanks for sharing, that's very interesting! Are Lisp and/or Prolog used in a lot of projects in the public sector in Österreich? From what I've heard, many (most?) projects at BRZ use Java or C# stacks.

<comment><USER2> I cannot speak for the entire public sector or the BRZ.

However, Lisp has already played an important role in two projects I led, and it also plays an important role in the project I mentioned which is currently ongoing.

Prolog is used for example in a theorem prover for deontic logic developed by Björn Lellmann at TU Wien:

[http://subsell.logic.at/bprover/deonticProver/](http://subsell.logic.at/bprover/deonticProver/)

In cooperation with Björn, we have used this solver to showcase the formalisation and automated application of _legislation_. For a prototype, Björn has formulated a few paragraphs of the _Studienförderungsgesetz_ (a law regulating student grants) in deontic logic, and demonstrated that this theorem prover can be used to automate various decisions because they can be deduced as stringent logical consequences of existing regulations.

Generally, I think that as the tasks we want to solve become more challenging and encompassing, high-level languages such as Lisp and Prolog will be increasingly needed.

</comment></comment></comment><comment><USER4> Nice to see that Siscog continues to be a Lisp shop.

If any Lisp hackers feel like moving to Porto or Lisbon, give it a shot.

</comment><comment><USER5> The SBCL20 workshop page las lots of nice info and links too: [http://www.sbcl.org/sbcl20/](http://www.sbcl.org/sbcl20/)

</comment><comment><USER6> I saw Zach post this on Twitter early this morning. Great write up to SBCL Common Lisp's 20 year anniversary celebration and conference. I wish I had gone.

</comment><comment><USER7> As someone who have wanted to pick up SBCL for some years now, what would be the best getting started resource? The website seems to go through the installation and only have some sort of reference, which might be a too hard to chew in the beginning.

<comment><USER8> It would be the collaborative Cookbook now: [https://lispcookbook.github.io/cl-cookbook/getting- started.h...](https://lispcookbook.github.io/cl-cookbook/getting-started.html)

</comment></comment><comment><USER9> > Steel Bank Common Lisp (SBCL) is a high performance Common Lisp compiler.</comment>


Illegal prime - <AUTHOR> http://en.wikipedia.org/wiki/Illegal_prime <comment><USER2> Y'all totally missed what's going on here.

Primepages (<http://primes.utm.edu/>) lists the largest known primes of various forms. One of the categories is primes that have _no special form_ , which are the hardest to prove prime.

Chris Caldwell, the primepages maintainer, called up Phil Carmody and said, "Phil, if you can turn DeCSS into a 'general prime' that's big enough for the top 20 ever discovered, I'll be happy to host it on primepages." (Just as he would host _any_ prime, DeCSS or not, that was big enough for the top 20.) So Phil did, cuz he's a smart guy and had a lot of computrons, and the prime went in the database.

The point here is that if you're merely turning data into a number, you have no legitimate reason to distribute it other than whatever reason you had to distribute the data itself. However, primepages existed long before DeCSS became a problem, and was arguably simply doing what it always did, which is to list the top tens.

I don't know if that would hold up in court -- it was never tested -- but the argument is a lot more subtle than what people are criticizing here.

An aside: Phil and I worked together on some other primality records. I wrote most of that Wikipedia article back in 2002 or so, and they went and featured it.. this was all before the rules for citations/references on Wikipedia became tighter than a mouse's arsehole. So if anyone is in the mood to add some citations, that would be much appreciated.

<comment><USER3> I don't see how "a reason to distribute it" is necessary. What if I just choose a completely random integer with 2000 digits and host it? I don't have any reason to do so, and it's certainly not illegal. Then someone comes along and generates a program that's equivalent to that number, or some digital media rights developer happens to use that number as a key for encrypting some copyrighted media. Does my original act of hosting suddenly become illegal, because I had no good reason to host the number in the first place?

<comment><USER4> The probability of you doing that without piracy is so vanishingly small as to be irrelevant.

</comment></comment></comment><comment><USER5> I think the argument that "how can a number be owned or its posession be illegal" is mostly bogus. One could translate any string of text into a series of bits and back to a single number and say that a book or a picture is just a number. Then one could say that noone invented that number, and that it's just a number, so you couldn't have copyright nor protection because everything could be randomly generated, etc, etc...

I think the real issue is that in the case of prime numbers made "illegal/protected", the absurd is not that they are protected, but that they are not encoding any meaningful information that a human being produced. They are a particular number (probably randomly generated) and the fact that they are used in a particular context (to encrypt data) makes them protected.

<comment><USER6> "but that they are not encoding any meaningful information that a human being produced"

I was sort of with you up to that point; I don't agree, but I was with you. However, now I would say you need to read the article more carefully, as the entire point is that they do indeed encode something human-produced and usable. If you use Unix, you've almost certainly got the decoder for that number sitting right on your disk right now, it doesn't get much more concrete than that. Without that, you're missing the whole point. They aren't randomly generated at all.

Guess I might as well spell out the other objection I have, which is that you're subtly begging the question. You prove that the idea of owning a number is silly because the idea of owning a number is silly in your last sentence of your first paragraph. Let me give you a much better argument: flip your argument on its head, and say that _of course_ it's perfectly sensible to own numbers.

All but the smallest works translate in any reasonable encoding scheme into _enormous_ numbers, numbers that would simply never be chosen randomly. There 0 chance that sitting here and stringing together "random numbers" will ever produce anything like a movie or picture or even coherent sentence, that doesn't already exist in the encoding scheme. (Not literally 0, depending on the circumstances, but close enough.) Therefore, the actual problem is that it does indeed make sense to own numbers; in an infinite space when we are all choosing umpteen millions or billions or trillions or well beyond that of digits, one can very plausibly stake an ownership claim on the grounds that it is clear that if somebody else ends up with the exact same number, they got it from you.

Therefore, since it is sensible to own numbers, the objection that it is not collapses and then the rest of the argument against ownership does too.

As I said, I don't actually agree with that line of thought. There are a lot of intricacies in the issues of encoding, and some other objections I'm leaving out, but it's still a stronger line of argument. My feeling are more related to the classic bit color essay: <http://ansuz.sooke.bc.ca/lawpoli/colour/2004061001.php> If that doesn't seem related, think more; it is, it very much is.

<comment><USER7> > you're subtly begging the question.

You are the first person to correctly use the phrase "beg the question" in something I've read in the last three weeks.

Congratulations!

</comment></comment></comment><comment><USER8> A Danish Social security number consists of two numbers - the first one being four arbitrary digits, and the second one being the six digits of your birthday.

My two numbers aren't only prime, which in and of itself would be pretty unlikely. No they're Twin primes. (<http://en.wikipedia.org/wiki/Twin_prime>)

This is the only place I know where information like that would be considered pretty cool :-)

Now somebody guess my birthday.

<comment><AUTHOR> Assuming that (1) you were born between 1950 and 1985 and (2) the danish date format is (dd-mm-yy), here are the possible DOBs:

        10-01-51    30-01-51    17-03-51    14-05-51    26-05-51    27-05-51
        13-06-51    16-06-51    16-07-51    18-07-51    25-07-51    25-09-51
        15-10-51    21-10-51    24-10-51    21-11-51    13-12-51    17-12-51
        19-12-51    28-12-51    10-01-53    17-03-53    27-05-53    16-07-53
        25-07-53    21-11-53    17-12-53    24-02-57    29-06-57    25-10-57
        13-02-59    24-02-59    21-03-59    29-06-59    14-07-59    17-07-59
        22-08-59    15-09-59    25-10-59    26-10-59    10-11-59    24-12-59
        13-02-61    10-03-61    21-03-61    31-03-61    27-04-61    23-05-61
        14-07-61    17-07-61    27-07-61    22-08-61    23-08-61    26-08-61
        15-09-61    12-10-61    18-10-61    21-10-61    26-10-61    10-11-61
        17-11-61    24-12-61    25-12-61    10-03-63    31-03-63    27-04-63
        23-05-63    27-07-63    23-08-63    26-08-63    12-10-63    18-10-63
        21-10-63    17-11-63    25-12-63    13-03-67    19-03-67    11-05-67
        19-06-67    15-07-67    14-08-67    20-08-67    16-09-67    25-09-67
        24-10-67    17-11-67    26-11-67    29-11-67    27-02-69    13-03-69
        17-03-69    19-03-69    22-04-69    11-05-69    19-06-69    29-06-69
        15-07-69    28-07-69    14-08-69    20-08-69    16-09-69    25-09-69
        22-10-69    24-10-69    12-11-69    15-11-69    17-11-69    26-11-69
        29-11-69    11-12-69    23-12-69    27-02-71    17-03-71    22-04-71
        29-04-71    29-06-71    23-07-71    28-07-71    22-10-71    12-11-71
        15-11-71    22-11-71    11-12-71    23-12-71    29-04-73    23-07-73
        22-11-73    15-03-77    11-04-77    19-05-77    16-08-77    22-08-77
        17-10-77    25-11-77    27-12-77    18-01-79    15-03-79    11-04-79
        19-05-79    11-08-79    16-08-79    22-08-79    17-10-79    14-11-79
        25-11-79    10-12-79    27-12-79    18-01-81    20-03-81    16-04-81
        30-05-81    14-06-81    11-08-81    15-08-81    24-08-81    14-11-81
        30-11-81    10-12-81    20-03-83    16-04-83    30-05-83    14-06-83
        15-08-83    24-08-83    30-11-83

<comment><USER9> Thanks for the list but he said 6 digits... So the format is probably dd-mm- yy.

<comment><AUTHOR> Oops! Corrected.

</comment></comment></comment></comment><comment><USER10> This is pretty silly, isn't it? Is it that mind-boggling that data can be illegal to distribute, for example a movie or an unreleased game?

The prime number is a red herring. Given the prime number theorem, the probability that an n-digit number is prime scales as 1/log n, so it's easy to pad any data with random garbage that isn't executed until you get a prime. For a gigabyte of data that might be a few billion attempts. (Proving it's a prime will be harder.)

<comment><AUTHOR> >> Is it that mind-boggling that data can be illegal to distribute...?

 _The DMCA has had an impact on the worldwide cryptography research community, since an argument can be made that any cryptanalytic research violates, or might violate, the DMCA._

\- [http://en.wikipedia.org/wiki/Digital_Millennium_Copyright_Ac...](http://en.wikipedia.org/wiki/Digital_Millennium_Copyright_Act#Criticisms)

That is mind-boggling.

</comment></comment><comment><USER11> I bring this up whenever I want to point out how law lags behind technology and ends up doing silly things like making a number illegal, or making cracking cyphers like rot13 a felony. That is to say, breaking even simple encryption a felony, not rot13 specifically.

People always get amused that a prime number could get them in trouble.

<comment><USER12> A more relevant example, as mentioned in a linked article, is that the binary data of images such as child pornography and state secrets are also numbers and as such may be considered illegal.

<comment><USER13> How can an image be a number? This is an honest question.

Isn't an image a list of numbers? These numbers could the RGB of each pixel, or the N higher Fourier coefficients, etc. From these numbers, one can compute a single number, sure. Nonetheless, the idea that an image is a number and, hence, can be made illegal, looks utterly ludicrous to me due to the fact that the image -> number mapping is certainly not injective.

<comment><USER14> Nope, that's just one interpretation and it's not more valid then any other. Your argument is equivalent to saying something like this "129 isn't a single number, it's actually 1 _10^2+2_ 10^1+9*10^0 (aka 100 + 20 + 9)".

Anything that can be represented on a computer can be seen as a number, rather large numbers sometimes but still definitely numbers.

<comment><USER13> You are _totally_ missing the point. The 3-tuple (1,2,9) may represent number 129 if you use the decimal expansion. What if you use a base-16 expansion, or a base-8 expansion? You can even choose the base so that the tuple -> number mapping is not injective (and, thus, not invertible).

So, you give me a number, and I can give you infinitely many n-tuples that can be transformed into that number. Unless you know the mapping, and unless the mapping is injective, a single number is useless. It could represent infinitely many images.

So, I ask again, how can an image be a number?

<comment><USER15> The simplest, and most common representation would be for a file to simply be a string of binary bits representing a large number.

eg:

       big_number = 0;

       while(!feof(file)) {
          big_number = (big_number<<8) | file.readByte();
       }

<comment><USER13> I am pointing at the forest, and you're looking at the trees. We're not even talking about the same thing. I am taking a very high-level, abstract view of the problem. You're thinking of implementation.

<comment><USER15> Right. You're just saying there are an infinite number of ways you could convert a string of binary digits into a 'number'.

Well sure :/ Of course there are.

At the simplest form you could swap things around, represent a fractional part of a number etc, at the more complex side you just have encryption.

But those are different things to your question "So, I ask again, how can an image be a number?"

<comment><USER13> For an image to _be_ a number, I demand a one-to-one correspondence between images and numbers. Lacking that, I merely say that an image _can be_ represented by a number, but this is trivial. Hence, I repeat: we're not even discussing the same thing.

<comment><USER15> >> "So, I ask again, how can an image be a number?

>> "Lacking that, I merely say that an image can be represented by a number, but this is trivial"

I think you're arguing with yourself at this point.

<comment><USER13> Note that: "is" and "is represented by" are not the same on my book (which is obvious from the previous comments). If you want to counter-argument, try harder.

<comment><USER16> I wonder what you mean by "is". Nothing really "is" anything but itself. The only other "is", the one that real people actually use, is "is represented by" or "is a representation of", or "is an instance of", etc.

For example, this --> A <\-- looks like the letter A. But it isn't the letter A. It "is" only a representation, a bit-pattern with decimal notation 65, a glyph drawn from a font, a set of pixel elements on a graphics surface, a pattern of light on a display, a bunch of photons traveling through space, a group of excited photoreceptor cells, a set of signals traveling through neurons, etc. And it is none of these things, because none of them capture the essence of the pattern, repeated over human experiences.

So it seems to me that if you're trying to win an argument by drawing a distinction between "is" and "is represented by", you are not going to convince anyone who's put much thought into it. "Ceci n'est pas une pipe"; but a representation of a pipe is a (more or less faithful) representation of a pipe, whether you are blind or not, and so a number is a digital image, and vice versa.

<comment><USER17> I think one must draw a distinction between the physical world and the metaphysical one. For a platonist, numbers do exist outside of any physical reality and, therefore, a number and its representation are not the same thing.

I am not a mathematician, but to me this discussion reminds me of a vector having different coordinates, depending on what coordinate system we choose. Those are all different representations of the same thing. Likewise, a number can be represented in many different ways (binary, oct, hex, etc), but they all represent the same number. Is the vector its representation? If so, then the vector is many things, which is a funny definition of "to be". If the vector is itself, then it cannot be equal to any of its representations, it's something beyond its representation.

<comment><USER18> I don't think it's at all a given that Hylaean Theoric Worlds exist independently the Arbran Causal Domain.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER19> For all those commenting please read it carefully: the primes are not illegal, just number representations of apparently illegal programs.

</comment><comment><USER20> I still don't get how a prime number can reveal hidden information. Can someone please explain me the process?

<comment><USER21> it doesn't reveal information except that it is a constant that is used as part of a process of encryption where without the constant cracking that encryption would be effectively impossible and with it cracking the encryption is trivial.

effectively the number is the encryption, as having the number makes the encryption useless. the rest of the algorithm is pointless without the number and vice versa.

<comment><USER22> That's a different number, not the one the article is about.

The one in question is a compressed version of a c program that breaks encryption.</comment></comment></comment>


The Next Big Thing In Music? Apps That Read Your Mind - <AUTHOR> http://www.fastcodesign.com/3025991/the-next-big-thing-in-music-apps-that-read-your-mind

<comment><USER2> There are some apps that predict your mood according to the time of the day. Are we becoming so monotonous and predictable?</comment>


Linux Mint 20 "Ulyana" released - <AUTHOR> https://blog.linuxmint.com/?p=3928 <comment><USER2> Would encourage anybody on Ubuntu to give Linux Mint a try. It's displaced Lubuntu as my go to distribution due to it being very polished overall while still being about as lightweight and fast as Lubuntu or Xubuntu.

<comment><USER3> Sorry, but would like to advice the other way. I started out on ubuntu, but tried mint the last year. Now I'm going back to ubuntu with some gnome extensions, here's why. Desktop linux in general has many quirks and bugs, and mint, being less mainstream, even more so. I've experienced many subtle errors with drag & drop, multiscreen support, windows remaining in the taskbar after being closed, etc. In my experience ubuntu has less of these, and with 'dash to panel' and 'arc menu' installed you've basicly got 90% of the mint experience anyway.

No disrespect to any of the hardworking mint people intended, their work clearly fills a need.

<comment><USER4> Not my experience with Mint Xfce, which I've used, along with Xubuntu, since V.12. Mint's focus on stability for the user has long been a primary consideration. EG the 'Timeshift' backup utility has been very helpful.

While I haven't used it, the Cinnamon desktop has been very attractive to Linux newcomers - recently a rapidly-growing group.

</comment></comment></comment><comment><USER5> Release notes can be found here: [https://www.linuxmint.com/rel_ulyana_cinnamon_whatsnew.php](https://www.linuxmint.com/rel_ulyana_cinnamon_whatsnew.php)

</comment><comment><USER6> Before you upgrade to Mint 20 ----

If you are running mysql 5.7 in Mint 19, update your databases to be compatible with mysql 8.0 _before_ you change to Mint 20.

That mainly means changing your engine to InnoDB instead of MyISAM, and the character set to utf8mb4 from latin1.

Oh, and I prefer MATE. But I just installed Cinnamon and then installed MATE using Synaptic. All working well.

</comment><comment><USER6> Before you upgrade to Mint 20 ----

If you are running mysql 5.7 in Mint 19, update your databases to be compatible with mysql 8.0 _before_ you change to Mint 20.

That mainly means changing your engine to InnoDB instead of MyISAM, and the character set to utf8mb4 from latin1.

</comment><comment><USER7> Congratulations Clement and team, massively solid release.

</comment><comment><USER8> Main reason I'm going to use this: it's ubuntu without snap. And snap is the devil.

<comment><USER9> The main reason for me is that Ubuntu somehow breaks at every major upgrade, while Mint doesn't. That and Cinnamon, of course.

</comment></comment><comment><USER10> Fractional scaling is huge!</comment>


Show HN: Google Assistant Apps Directory - <AUTHOR> https://gactions.com/ <comment><AUTHOR> Until the official list is released (presumably on August 31), I've thrown this together.

Around 500 apps are currently available through Google Assistant. The directory includes the Assistant "built-in" applications made by Google (Calendar, My Day, Gmail, etc.) as well as 3rd party applications approved in the assistant directory. A QA test app is available publicly: "QA TEST test three three eight four" ([https://goo.gl/76FPwt](https://goo.gl/76FPwt)).

This was built after [https://assistant.google.com/sitemap.xml](https://assistant.google.com/sitemap.xml) and dumped in Firebase, then wrapped around a Polymer app-layout template named "publishing". The raw data can be downloaded at [https://gactions.com/data/articles.json](https://gactions.com/data/articles.json).

</comment><comment><USER2> good</comment>