Supercharging the Git Commit Graph - <AUTHOR> https://blogs.msdn.microsoft.com/devops/2018/06/25/supercharging-the-git-commit-graph/ <comment><USER2> "Before I joined Microsoft, I was a mathematician working in computational graph theory. I spent years thinking about graphs every day, so it was a habit that was hard to break. "

As a former BitKeeper developer, this is a key person for Microsoft to have on hand to improve git. BitKeeper got about 10X faster after it was used on the Linux kernel and many of the key performance wins were due to better graph traversal algorithms. Rick was a wizard at that sort of thing. The other was memory layout optimizations and caching. (my contribution)

So Rick made sure we walked the graph as little as necessary and I made sure the graph had an extremely compact representation containing as little information as possible and then once a target commit is found it is looked up in another store.

However, this quote was disturbing. "There are a few Git features that don't work well with the commit-graph, such as shallow clones, replace-objects, and commit grafts. If you never use any of those features, then you should have no problems!" The joy of not having to write commercial software! Reading between the lines it appears they changed the default output order for 'git log' or some internal API and then didn't bother to fix the cases that depending on the old order.

<comment><USER3> Sorry for the worrying note about the experimental feature. One issue when working in open source is that contributors don't have control over the release cycle, and review requires smaller series than having the feature be delivered all at once.

These interactions with grafts, replace-objects, and shallow clones are one reason 2.18 does not create and manage this file automatically. The commit- graph file works by representing the commit relationships in a new file, and if that file exists, we treat that as the truth. The commit grafts, replace- objects, and shallow clones use another set of special files to track commits whose parents have been modified in special ways. If you would like to see our progress on integrating these features together, please see this thread on the Git mailing list: [https://public- inbox.org/git/20180531174024.124488-1-dstolee...](https://public- email@example.com/T/#u)

<comment><USER2> > One issue when working in open source is that contributors don't have > control over the release cycle, and review requires smaller series than > having the feature be delivered all at once.

Yes, my reply was unnecessarily disparaging. Overall this looks like a cool feature. Perhaps a stopgap solution if for those commands to just delete your cache. But then your repository will get mysteriously slower. I just need to think of this as a technology demonstration.

<comment><USER3> The good news is that if you are using shallow clones, then you probably don't have enough commits locally to need the commit-graph feature!

</comment></comment></comment></comment><comment><USER4> One of the best things I ever did for my git usage was installing this ridiculous thing in my .gitconfig aliases:

        [alias]
            l = log --date-order --date=iso --graph --full-history --all --pretty=format:'%x08%x09%C(red)%h %C(cyan)%ad%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08 %C(bold blue)%aN%C(reset)%C(bold yellow)%d %C(reset)%s'

It lets me type 'git l' and get this kind of commit graph:

        *       8264cf2a 2018-06-28 yebyen (origin/dev, dev) ...
        |\
        | *     df6e4c49 blabla commit messages
        | *     195d8924 commit messages
        |/
        | *     96e74a5c (branch-label) commit message
        | |\
        | | *   b2786c07 blabla
        | | *   85721288 blabla

This is semi-related but not nearly as interesting from a technical perspective. But it's one of the missing features in Git, to visually help people understand why it's helpful to rebase occasionally, and keep your commit history clean.

I think I found it here[1]

[1]: [https://stackoverflow.com/a/16735971/661659](https://stackoverflow.com/a/16735971/661659)

<comment><USER5> I had a similar alias for a while at a past job, but realized I was just using `gitk` anyway, and `gitk` is installed by default everywhere and doesn't need an alias setup, so it's also especially easier to teach to junior developers.

Also, I don't encourage rebasing, especially to junior developers. I realize everyone has different preferences, but a messy graph is useful and there are other tools like `git log --first-parent` for getting "clean" baselines from the graph. The great thing about using a graph in the first place is there are a lot of traversal options and you don't have to micromanage where the trees are to still see the forest.

<comment><USER4> Yes! I agree with you mostly, except that we try to keep from having junior developers for too long. Nobody is really a junior developer, and everyone should get a turn as release manager. The main benefit of this is that people can see directly how their work style impacts the release engineering process, if they do know exactly what that process involves and actually get a turn at it. (You have to stub your own toe in order to know how bad it hurts.)

Our team is actually really small, and we like to make sure everyone knows about the hassles involved in putting together a release and doing a complete code review when it's needed. The main reason I encourage rebasing is because it helps avoid a messy graph, and a messy graph makes it immediately much harder to do a rebase across any number of merges, or any non-trivial span of time.

So in other words, I like to selfishly expect the other developers on my team to do rebases at the appropriate times, in order to preserve my own capability to easily do rebases when needed. (We also learned last week that git rebase has a --preserve-merges option that I feel foolish to not have known about sooner. We've wiped out so many merge commits unnecessarily.)

We treat the master branch as carved in stone like anyone should, but other branches should clearly flow their merges only one way (features into releases, or features into environments), and if a branch hasn't actually been included in a release tag, it's considered fair game for rebasing. It helps us to prevent our three developers' sometimes too many concurrent trains of thought from resulting in equally too many confusing merges, or an intractable number of HEADs to manage and organize into releases.

One of the places we struggle is that we're not all-the-way onboard with CI/CD processes, but we do the best we can so that whenever support for that kind of thing materializes, we will mostly not need to change our processes at all and can obtain the benefits of that kind of tooling as quickly as possible.

<comment><USER5> > other branches should clearly flow their merges only one way

I tend to disagree on this as well. The best person to merge a conflict is the developer creating the conflict in the first place, as soon or nearly as soon as they create the conflict, because they are most likely to know why the conflict exists in the first place. "Merge early, merge often."

Delaying "reverse" merges until the last possible second means you often don't have the integration expertise needed without research involved, even if it was "you" that introduced the conflict you may have moved on to other problems since and not recall why you did something one way or another, or which bits are important to integrate.

Delaying those merges as rebases I feel is even worse, because not only do you not have the resources to know why an integration needs to be made, you also aren't recording a history of the merge conflicts you saw in the rebase such that you can easily revisit the integration if you made an integration mistake (which does happen, because we are, after all, only human).

My advice tends to be to use a good PR system of some sort that makes your proper, code reviewed "forward" merges clear and obvious, and then don't worry about a mess of other merges "underneath" that top-level of strong PR merges. (Hence the key suggestion is that `git log --first-parent` is your best friend if you want a "clean" view of the DAG. It gives you a linear list of just your PR merges in master, or branch work and PR merges to that branch in any other branch.) Also, yes, CI/CD are really good ideas.

<comment><USER4> > you also aren't recording a history of the merge conflicts you saw in the > rebase

This is a good point. Mistakes are made during merge conflict resolution. But if you are tracking your upstream when you develop a long-lived feature branch, and rebasing when there are changes to the base, and actually comparing your rebased feature branches to the version that you had before you force push over the old remote version, then the only thing you really need to track is "does my diff still look like the change I intended to make."

The most valuable skill we are learning from Git is how to avoid merge conflicts altogether, and it tends to be more a human problem than a technological issue. (You don't avoid merge conflicts with some special commit strategy, you do it by ensuring that two people are not actively changing the same part of the codebase unless it's absolutely necessary.)

<comment><USER5> I still think you are better off preserving every merge point-in-time when they were made than ever rebasing feature branches. Because yes, every rebase is an opportunity for mistakes to go unnoticed, and there's no "rebase log" to try to unwind a mistake weeks or months later.

Also, every rebased branch is its own likely source of merge conflicts for people working on "differently rebased" versions of the same code.

> The most valuable skill we are learning from Git is how to avoid merge > conflicts altogether, and it tends to be more a human problem than a > technological issue. (You don't avoid merge conflicts with some special > commit strategy, you do it by ensuring that two people are not actively > changing the same part of the codebase unless it's absolutely necessary.)

Definitely. Communication is a key. It's also why I think "merge early, merge often" works better, because it forces communication as early and often as possible ("I'm seeing a merge conflict with this work you are doing, can you explain it to me?"). Keep branches as short-lived as possible, and try to avoid "separate but equal" work where you can't comingle features and have to intentionally fence your branches from integrating with each other. Merge feature branches between each other, even, to keep communication up. Find tools like feature flags that allow you to "ship" to master "unfinished" work faster to save yourself from trying to integrate long running branches after the fact. (If you are going to let "marketing" choose which features "ship" in a version, it is much nicer to do so by flipping flags in a dashboard somewhere, maybe even one Marketing can use themselves, than to try to furiously merge long-running feature branches at release time.)

<comment><USER4> +1 for feature flags. We have struggled to manage long-lived changes (our current iteration has been going on for nearly a year.)

The amount of uhh "pucker" I'll feel when we release next month, and certain pieces of code are touching prod for the first time, is much higher than I'd like.

The only reason I can sleep at night while spending a whole year with only hotfixes and minor feature addons for the last release going to prod, is because we've spent much too much time at all layers of the testing pyramid, and every time I've made a change that should probably break some tests, it actually breaks a few more tests than I expected (so I know that our coverage is pretty good.) Every time we write a brand new feature, it absolutely gets a matching Cucumber feature test in plain english that we run before and after every merge. And that's not even to mention unit testing.

So we can be reasonably confident that everything we've ever promised, is still true. Our test suite takes over an hour to run at this point, which is way longer than it should. But it helps us catch the bugs, and well before they start to have "piled up."

I'd feel marginally better if we knew what code doesn't run in prod because we could turn it on and off, and see those feature tests failing (or simply exclude them, since they would also be tagged with the feature label.)

It's interesting that some people feel feature flags are complicated enough to make "Feature flags as-a-Service" businesses a thing, like LaunchDarkly. I looked at what they are offering and thought it would serve us well, but we haven't actually started using feature flags for anything.

</comment></comment></comment></comment></comment></comment></comment><comment><USER6> Dang, this made `git log` inside the repo I use at work (which is enormous with a stupid number of commits) nearly instantaneous. Great work.

`git status` still takes over a second for me though, oh well...

<comment><USER7> Have you tried the fsmonitor hook feature that was added in git 2.17? [https://blog.github.com/2018-04-05-git-217-released/](https://blog.github.com/2018-04-05-git-217-released/)

<comment><USER6> Yep, as well as the untracked cache. I also was using a split index for a while, but it didn't play nicely with some tools...

</comment></comment></comment><comment><USER8> I wonder if any of these folks will have a hand in improving the Github commit graph, now that Microsoft owns it?

As great as Github is, I've never understood why they still have such a hard- to-read, horizontal commit graph while competitors like Stash/bitbucket/gitlab have all had beautiful vertical graphs (like shown in this article) for as long as I can remember. I think this is especially valuable for newbies who are less inclined to get similar viz at the command line, but still useful for vets when they (inevitably) end up in weird branch situations.

</comment><comment><USER9> To save people some time, an alias for your .gitconfig

create-graph = "!f() { git show-ref -s | git commit-graph write --stdin- commits ; } ; f"

<comment><USER10> How does it save time, given this command will rarely be run, and next version will automatically run it on GC? Instead of copy/pasting a command you now have to copy-paste that same command with more gunk added and run it separately.

<comment><USER9> You have to run it on every repository you want this in, don't you? At least, that's what I understood.

<comment><USER10> This is mostly for large repositories where building the revisions graph takes a long time (aka 5+ figures revisions). I have two of those from $dayjob, most of the stuff I work with/on/for doesn't come even remotely close. Running this on a repo with 5 commits is all but useless.

And even then you _still_ really only need run it once per repository, you can just cd/paste/return; cd/paste/return; … Hell, you'd probably have an easier time writing a script which looks for all git repositories and runs the command versus having to manually visit each and do so.

</comment></comment></comment></comment><comment><USER11> Would be nice to have support of it in tig too.

</comment><comment><USER12> Interesting tidbit:

> The developers making Microsoft Windows use Git

<comment><USER13> Kinda surprising. I know everyone seems to love git these days, but I find it's really better suited towards distributed and/or smaller projects. After feeling the pain of a megarepo system at work, I'm pushing to switch to a monorepo(well, like 4 repos instead of 200). git sort of sucks for monorepos.

Also, even after learning a fair amount of git, I still find I spend a noticeable amount of time dealing with it. I don't remember spending a lot of time on any of the VCS systems I've used in the past. They just stayed out of my way and let do my thing.

<comment><USER14> > git sort of sucks for monorepos.

Microsoft works around several of the issues there by using GVFS. Also, at Microsoft scale, everything "sort of sucks", there's just no silver bullets. You take one of the least bad options and put all the effort you can towards making it work as well as you can.

<comment> a-dub No. Everything only "sort of sucks" at "Microsoft scale" if you're willing to blame it on "scale."

At "Microsoft scale," you have the resources to purpose build anything you need from scratch for any scale you're working at... therefore if anything "sort of sucks" it's because:

a) It's not worth the money/resources. (The "let it suck" approach)

or

b) Nobody cares (The "acceptance that we suck, at 'scale'" approach)

<comment> a-dub ... and I'm going to belabor this, because I think it's important.

There's a fair bit of excitement around the new, exciting, open source friendly Microsoft with built-in Linux kernel emulation, an embrace of git and a huge release of open source tools...

Honestly though, I'm not buying it, the issue I've had with Microsoft over the years doesn't just stem from the shitty software or aggressive business practices... it's the deep rooted culture of mediocrity it promotes.

People who belong to that church believe it's ok to build shitty software because doing it right is too hard. Why root-cause an issue when you can just script reboots? It's too hard anyway, we're at "Microsoft scale."

The rise of the internet and the companies that grew around it showed us that if you have a culture of giving a shit, you can build really complex things "at scale" that aren't complete shit.

I worry that the new Microsoft will be a different kind of trojan horse for the OSS world. It won't be "embrace, extend, extinguish" it will be more like a social media psyops campaign that beats it into everyone's heads that now we're at "Microsoft scale" it's ok for everything to "kinda suck", and if we're not careful... everything will.

</comment></comment></comment></comment></comment><comment><USER15> To enable the commit-graph feature in your repository, run git config core.commitGraph true. Then, you can update your commit-graph file by running

'git show-ref -s | git commit-graph write —stdin-commits'

how do you automatically update this?

<comment><USER16> It's not perfect but doing it in a pre-push hook can be useful. Unfortunately there's no post-receive hook on client-side, which could have been useful in this situation...

<comment><USER10> > It's not perfect but doing it in a pre-push hook can be useful.

That's completely unnecessary and way too frequent. Some where else (reddit I think?) the authors noted that they'd like to have it run alongside GCs in the next version. So running it as pre-auto-gc is a better idea.

<comment><USER16> I was thinking that you need to do that everytime refs change, but it's just a boost and I presume you can have some refs in the commit-graph and some not in there and it will still work, so you're probably right.

</comment></comment></comment></comment><comment><USER16> Yet another file in the .git directory. The work is impressive and certainly helpful, but I can already hear Fossil proponents say "just use SQLite", which is getting more and more true.

<comment><USER17> Use sqllite instead of git? Or git should use sqllite? If the latter then one problem is you'd need to keep your own fork forever as they don't accept patches. I'm not sure if that's a price worth paying to reduce the number of files git uses. Why is this a problem for you, anyway?

<comment><USER16> It's not a problem for me, because all I see is the different commands that _use_ the underlying infrastructure. It's more about the design that was chosen: if you want to speed up things with git you have to implement specific logic in application code that will write a file and will need to update it periodically to keep it up-to-date, instead of using a querying engine made specifically for this purpose.

I don't see git ever changing its file format, but I do see another tool that imports everything from git and gives you a read-only sqlite db where you can do whatever you want, including displaying a graph quickly as the post advertises.

<comment><USER18> I think you don't fully understand what you are proposing. The storage engine (file system or SQLite) has little to do with git graph algorithm performance. SQLite doesn't magically "display a graph quickly".

<comment><USER16> What I'm saying is, the iteration step from "existing dataset" (what we have today) to "faster data traversal" (what the article proposes) is a custom file with a custom format on one side, and the appropriate query/index on the other side; one is definitely more understandable, portable and maintainable than the other.

<comment><USER5> Except that SQL has never had great DAG data structures, queries, nor indexes. You can model a DAG in a relational database, and you can non-standard SQL extensions to get some decent but not great recursive queries to do some okay semi-poorly indexed graph work, but having maintained databases like that at various times that all gets to be just as much a "custom file with a custom format" as dependent on database version and business logic as anything git is doing here.

If there was a stronger graph database store and graph query language for consideration than SQL you might be on to something. SQL isn't a great fit here either.

<comment><USER16> Fossil itself is stored entirely inside a SQLite db and only uses it to do everything it needs; if Fossil can do it, any VCS can do it. In fact, there is a whole section on that point in the official SQLite page ([https://www.sqlite.org/lang_with.html#rcex2](https://www.sqlite.org/lang_with.html#rcex2)).

I'm not saying SQL is the best way to store and query DAGs; any graph database would be better. All I'm saying is that SQL is probably better at designing and maintaining a solution than what git does with its custom file format and custom code.

I'm only comparing what the pile-of-files that git currently is and a full- fledged SQL database. None is perfect, but one feels overall easier than the other.

<comment><USER5> But you are also almost intentionally confusing the SQL standard here in your comment with the SQLite implementation (a de facto standard, of a sort, but not a recognized standard by any body of peers to my knowledge) with SQLite's particular binary format (which does change between versions even). That is a custom file format with custom code. Certainly it is very portable custom code, as SQLite is open source and ported to a large number of systems, but just because it is related to the SQL standards doesn't gift it the benefit of being an SQL standard in and of itself.

The SQL standards define a query language, not a storage format. There are SQL databases that themselves optimize their internal storage structures into "piles of files". In fact, most have at one point or another. SQLite is an intentional outlier here; it's part of why SQLite exists.

There's nothing stopping anyone from building an SQL query engine that executes over a git database, for what that is worth. Because you can't execute SQL queries against it today doesn't really say anything at all about whether or not git's database storage format is insufficient or not.

All of that is also before you even start to get into the weeds about standards compliance in the SQL query language itself and how very little is truly compliant between database engines, as they all have slightly different dialects due to historic oddities. Or the weeds that there's never been a good interchange format between SQL database storage formats other than overly verbose DDL and INSERT statement dumps. That again are sometimes subject to compatibility failures if trying to migrate between database engines, due to dialectal differences. Including what should be incredibly fundamental things like making sure that foreign key relationships import and index correctly, without data loss or data security issues, because even some of that is dialectal and varies between engines (drop keys, ignore keys, read keys, make sure everything is atomically transacted to the strongest transaction level available in that particular engine, etc).

Git's current pile of files may not be better than "a full-fledged SQL database", that's a long and difficult academic study to undertake, but a "a full-fledged SQL database" isn't necessarily the best solution just because it has a mostly standard query language, either.

<comment><USER19> > SQLite [is] not a recognized standard by any body of peers to my > knowledge...

Well, there is this: [https://www.loc.gov/preservation/resources/rfs/data.html](https://www.loc.gov/preservation/resources/rfs/data.html)

Also, the on-disk format for SQLite has been extended, but has not fundamentally changed since version 3.0.0 was released on 2004-06-18. SQLite version 3.0.0 can still read and write database files created by the latest release, as long as the database does not use any of the newer features. And, of course, the latest release of SQLite can read/write any database. There are over a trillion SQLite databases in active use in the wild, and so it is important to maintain backwards compatibility. We do test for that.

The on-disk format is well-documented ([https://sqlite.org/fileformat2.html](https://sqlite.org/fileformat2.html)) and multiple third parties have used that document to independently create software that both reads and writes SQLite database files. (We know this because they have brought ambiguities and omissions to our attention - all of which have now been fixed.)

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER20> Everybody who seriously uses git will also want to see the graph somehow. Here's how I do it: [https://github.com/erikbgithub/dot- files/blob/master/.gitcon...](https://github.com/erikbgithub/dot- files/blob/master/.gitconfig#L38)

</comment><comment><USER21> I wish i had those amazing algorithm skills.

</comment><comment><USER22> This is very cool.

Makes me sad I'll never do anything like this.

</comment><comment><USER23> This is basically what Fossil call timeline or I'm missing something?

[https://www.fossil-scm.org/index.html/timeline](https://www.fossil- scm.org/index.html/timeline)

<comment><USER10> It's not a UI feature, the UI feature has existed forever (it's the log and log graph). This is a cache for the graph so that it does not have to be rebuilt every time it's displayed.</comment></comment>


Bitcoin exchange owner gets 14 months in jail for lying about hack to SEC - <AUTHOR> https://decrypt.co/7861/bitcoin-exchange-owner-gets-14-months-jail-lying-about-hack-sec <comment><USER2> Very deceptive headline. Lying to the SEC was a minor part of what he was convicted of. The major charge was securities fraud - stealing from his customers to cover up his losses.

The article says:

> Montroll allegedly defrauded his customers by failing to disclose a hack of > the exchange in July 2013. The Bitfunder operator then attempted to cover it > up _by misappropriating their funds to hide the lost bitcoins_ , according > to federal prosecutors.

And:

> Montroll pleaded guilty to federal charges of _securities fraud_ and > obstruction of justice</comment>


How female elk adjust behaviour with age to avoid hunters - <AUTHOR> http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0178082&type=printable <comment><USER2> I hunt elk and this is not surprising at all. They are quite aware of the hunting seasons and the boundaries of hunting areas and they have completely different behaviors around those transitions. They will graze openly on hillsides in abundance right up to the open of the season, at which point they "go to ground" and disappear deep into the creek bottoms and wallows. There are some old and absolutely huge ones running around (from fresh sign we spot) but you never see them because they are very cautious.

Particularly with the older and wiser males, the only time we catch one is at extremely close range while stalking through bedding areas off-trail.

<comment><USER3> I'm totally perplexed at how you can appreciate something and still want to kill it.

<comment><USER4> I write this as a vegetarian (and former vegan). Do you appreciate plants? I know I sure do. Do I still kill them? Of course.

<comment><USER5> Let's apply that argument to killing humans now. Original post is getting at appreciation of this learning behavior. One may say the elk isn't doing this intelligently, drawing on examples such as dandelions which learn to not grow so tall after being mowed

<comment><USER6> I don't understand the application. Is it your stance that murderers are incapable of any appreciation for other humans? What about those who have killed others "justly", e.g. soldiers or executioners?

<comment><USER7> Are you suggesting that if he had claimed that he generally appreciates elks but not the ones he kills, would make more sense?

<comment><USER6> Nah, I'm suggesting that a decision to kill something is not necessarily the same as a decision to destroy something and may be motivated by more factors than simply how much one appreciates that thing. I appreciate the intricate webs that spiders weave and their impact on the other insect population around me but I will totally squish one if she happens upon me in the wrong situation. I imagine for hunters the appreciation of their prey's complex behaviours may even be part of the appeal.

<comment><USER7> Obviously then, you appreciate "having a clean, web-free house" more compared to the contribution of the webs in your home to the environment. Same same way, the hunter appreciates his hunting activity more compared to how much he appreciates his pray. Which makes the statement "I appreciate my pray" meaningless in the context of hunting. If you only hunt in a life threatening hunger situation, then obviously appreciate your own life more than the pray's. If you hunt for sports, then you appreciate your hobby more than your pray's life, and so on...

(I am a meat-eater, just pointing out something I find funny in such statements)

<comment><USER6> I'm afraid you've misunderstood me again--I usually leave the webs in and around my house, I appreciate their beauty and their utility. I am not a hunter of spiders, for sport or otherwise. I offered the example only to show how in some contexts I might destroy something _even though I appreciate it_.

I believe we may each be using the word "appreciate" with subtly different definitions. I believe it's possible to appreciate aspects of a thing without necessarily collapsing them all into some sort of comparison of perceived total value. I think it's possible that someone who hunts for sustenance might also come to treat the activity as somewhat of a sport, or an art, and so come to appreciate aspects of the activity including the intelligent behaviours of the prey.

<comment><USER7> No I have not misunderstood you, maybe I haven't made myself clear enough(not a native English speaker here...). As you also say, the context itself is what matters. For example, today I would guess most e.g. Canadians do not hunt for survival. Having a Canadian hunter saying "I hunt elks for sports, but I appreciate them", is kind of funny and meaningless. In the context of hunting for sports, it is pointless to say "but I appreciate them". If you beat up your neighbor cause he attacked you with an axe, and you needed to save your life, it is pointless to say that you appreciate him. It is clear you did what you did, cause you appreciate your own existence more than him. It is equally pointless to say "but I appreciate him" after making clear that you beat him up, cause you din't like his face. In both cases, the context is clear and thus the level of appreciation to the other party. Stating "but..." is meaningless. That for, my understanding of what the level of appreciation of someone hunting for sports towards his pray, is that it is very low by my standards.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> Documenting and quantifying the obvious might not be glamorous but someone's gotta do it.

Many species have similar learned adaptations to the dangers in their environment. Anyone who's fished saltwater and a range of freshwater environments will be able to vouch for this being readily observable.

<comment><AUTHOR> I don't have an English-speaking article handy, but female deer in the Bohemian Forest are still walking up to where barbed wire was during the Cold War, and turn around.

They have learned that they couldn't get further and have imprinted that "knowledge" to their offspring.

<comment><USER9> This is fascinating. Here's an article that mentions it: [http://www.haaretz.com/world-news/1.572417](http://www.haaretz.com/world- news/1.572417)

</comment></comment></comment><comment><USER10> This shouldn't really surprise outdoorsmen overly much. The big game (for me, fish) are almost always more wily, because they've had to be to reach their advanced age and size.

</comment><comment><USER11> My parent's have a cabin along the white river up near mt. rainier. There is no hunting on our side of the river and it's super clear that the elk know it.

<comment><USER12> Do you see large groups of them? Photos?</comment></comment>


Mach7: Pattern Matching for C++ - <AUTHOR> https://github.com/solodon4/Mach7 <comment><USER2> Reading about this, I followed a link to this talk advocating pattern matching (using Mach7) over the Visitor pattern: [https://www.youtube.com/watch?v=QhJguzpZOrk](https://www.youtube.com/watch?v=QhJguzpZOrk)

This was really interesting to me, because I had never thought of pattern matching and the Visitor pattern as being "competitors", so-to-speak. I guess this would mainly apply in the case that your pattern matching is based on type.

I was further intrigued because this argument (pattern matching is better than Visitor) seems to be the opposite argument made in the Google C++ Style Guide, which I usually agree with. The Google C++ Style Guide argues against using RTTI to do type-based dispatch ([https://google- styleguide.googlecode.com/svn/trunk/cppguide....](https://google- styleguide.googlecode.com/svn/trunk/cppguide.html#Run- Time_Type_Information__RTTI_)):

"Decision trees based on type are a strong indication that your code is on the wrong track. Code such as this usually breaks when additional subclasses are added to the class hierarchy. Moreover, when properties of a subclass change, it is difficult to find and modify all the affected code segments."

It's very interesting to me that there is such wide disagreement here on which of these two patterns represents better design.

<comment><USER3> Yeah, its cute but it doesn't provide exhaustiveness testing which is what the Google guide is concerned about. I think Scala came up with a neat way to work that into an OO model with its sealed attribute. A sealed case class can't be extended past its original source file, so its inheritance hierarchy is fixed. Pattern matches on a sealed case class will warn for lack of exhaustiveness just like matches on ADTs do in Haskell, Rust etc.

<comment><USER4> For the language history buffs: sealed classes aren't a Scala invention. Dylan had them, too (at the library, rather than the source level. [http://opendylan.org/books/dpg/perform.html](http://opendylan.org/books/dpg/perform.html))

(Better language history buffs than me, feel free to show prior art)

</comment></comment></comment><comment><USER5> Python 3 gets type hints, Javascript gets types (via Facebook's Flow), now C++ gets pattern matching. Seems like every successful programming language will eventually try and become ML (with meta-programming).

Robin Milner, you had it all sussed out in the early 1970s, it took the rest of the world about 40 years to catch up!

<comment><USER6> I don't think type hints do Hindley/Milner/Damas justice. This type system has two parts, none of which are present in most popular languages:

1\. A program that typechecks cannot have type errors during runtime. Dynamic type (i.e. runtime tag) based functions like instanceof break this, and most (all?) OOP languages have it in some form.

2\. Type inference: the types of expressions can be unified to the most general type that works for all of them. I don't know any popular language that is able to do this.

Most typing I see added to languages these days are cherry-picking consequences of the HM algorithm. C++'s auto keyword for example is a very simple version of type inference, type hints in dynamic languages aren't checked (or checkable) statically, and when runtime tags are involved it's hard to speak of static type inference.

<comment><USER7>
        I don't know any popular language that is able to do this.

Wikipedia lists ML and Haskell - are they missing some detail?

<comment><USER6> I wouldn't call ML popular, and in Haskell you have type classes, which have undecidable type inference. You can write `show (read str)` in Haskell for example, which parses `str` and then converts it back to `String` again. But the compiler cannot infer which type you want to parse to: is the input an Int, a Double, a JSON object, any other read/showable format? In these (rare) cases, you need explicit type annotations.

(Without type classes, type inference is decidable in Haskell.)

<comment><USER5> As an aside, Hindley–Milner is DEXPTIME-complete, and indeed you can write 5 line programs that exhibit the worst-case behaviour. That's as bad a _worst- case_ behaviour as undecidability for all practical purposes.

That said, in practise, HM type inference tends to be very fast, because the worst-case behaviour only shows up in rather artificial programs that human programmers would normally not write. If you bound the depth of let-nesting, HM is polynomial.

<comment><USER6> You're correct on the theoretical side, and writing a value whose type makes GHC crash is fairly easy. But in multiple years of Haskell, I did not encounter nor have I heard of a practical case in which type inference time was a performance issue, let alone a bottleneck or problem.

</comment></comment></comment></comment></comment></comment><comment><USER8> Neat to see; I think Rust shines here, since the use of pattern matching is tighly coupled with error handling of value that may be null; since pattern matching in Rust is exhaustive. [0] "But, the C++ compiler let me get away with not handling the case where the pointer was invalid (even if doing nothing in the case of "handling" it). ... Not only did the [Rust] compiler prevent me from generating an executable, it told me that a pattern was not exhaustive, explicitly which one, and what case that was not covered."

[0] [http://nickdesaulniers.github.io/blog/2013/05/07/rust- patter...](http://nickdesaulniers.github.io/blog/2013/05/07/rust-pattern- matching-and-the-option-type/)

</comment><comment><USER9> For people who care about how this is implemented: here are the two relevant articles [https://parasol.tamu.edu/~yuriys/papers/OPM13EA.pdf](https://parasol.tamu.edu/~yuriys/papers/OPM13EA.pdf) [https://parasol.tamu.edu/~yuriys/papers/TS12.pdf](https://parasol.tamu.edu/~yuriys/papers/TS12.pdf) they're from 2013 and 2012, I recommend starting with the second one as it gives an overview of the problem.

</comment><comment><USER10> Impressive effort, but pretty chthonian syntax. And that's with using macros. Main take away from this for me is that pattern matching needs to be a language feature to see pervasive use.

<comment><USER11> Stroustrup's pretty opposed to the idea that anything that can be done as a library without any language extensions automatically should be, so I think it's safe to say that by the time this is ready for standardization it will not be a mess of macros that beats the language into submission. It's just a lot easier to get people to try out your prototype when it doesn't require first building the compile from some branch.

<comment><USER12> That seems right, in the paper he is pretty open to the idea of extending the language if the solution is general enough:

"In the future, we would like to implement an actual language extension that will be capable of working with open patterns. Given such an extension and its implementation, we would like to look into how code for such patterns can be optimized without hardcoding the knowledge of the semantics of the patterns into the compiler. We would also like to experiment with other kinds of patterns (including those defined by the user), look at the interaction of patterns with both the standard library and other facilities in the language, and make views less ad-hoc."

[http://www.stroustrup.com/OpenPatternMatching.pdf](http://www.stroustrup.com/OpenPatternMatching.pdf)

</comment></comment></comment><comment><USER13> I tried Mach7 and couldn't get the thing to work reliably. Compile errors were horrific. I've had a lot of success with Yomm11[0] though

[0] [https://github.com/jll63/yomm11](https://github.com/jll63/yomm11)

<comment><USER14> Was the problem when you tried to build existing tests or when you tried to write your own code using the library? In any case I'd be happy to help.

</comment></comment><comment><USER15> Is the long term goal to create a new library (why not in boost) or to test new ideas to extend the language ?

<comment><USER16> From the presentation materials included in the repo, it looks like it's intended to be a library example of what they'd like to be a language extension.

</comment></comment><comment><USER14> We are looking for contributors to this work, there is still a lot that needs to be done before we can get a language proposal. Of particular interest are more uses of the library in various contexts and applications, so if you are a student working on a language or some tree-rewriting system for a class, research project etc. we would love to help you try the library solution. Also if you are a lock-free guru, we'd love some help with making vtbl-map lock- free. Also, don't hesitate to write me an email with any questions regarding Mach7.</comment>


Peter Thiel: An Angel on a Hot Streak - <AUTHOR> http://www.businessweek.com/magazine/content/10_10/b4169039646363.htm <comment><USER2> His philanthropic pursuits are also interesting. According to <http://en.wikipedia.org/wiki/Peter_Thiel#Philanthropy> he has donated to the Singularity Institute for Artificial Intelligence, the Methuselah Mouse Prize (anti-aging research), and the Seasteading Institute.

Edit: Actually, this makes sense considering his business acumen. He's shooting for most lives saved per dollar. The chance of success of these organizations is lower than typical charities, but the expected benefit is immense compared to typical charities. For example, let's say the Methuselah foundation has a 1% chance of finding a cure for aging. 7,000,000,000 * 0.01 = 70,000,000 expected lives saved.

<comment><USER3> I am a research associate at the Singularity Institute, and know several people involved in anti-aging research and seasteading. Utility-per-dollar calculations like <http://www.nickbostrom.com/astronomical/waste.html> are indeed a large part of our motivation. (Please do ask if you have any questions, or feel free to email me at email@example.com.)

</comment></comment><comment><USER4> "But the number of iconic companies—and the number of companies that even aspire to greatness—seems to be dropping. I'm a little worried that things are slowing down, operating well below potential. …We need more Intels, Apples, Googles, Genentechs, and Facebooks. I'm not sure we're going to get enough with venture [capital] in its current state. "

I agree and this bothers me a lot. Startups are easier to start and we're making silly twitter apps or trying to sell out for 5 million. Very few companies strive to build a lasting legacy.

<comment><USER3> I agree with your observation (and Thiel's), but disagree on the reasoning. See my essay An Alternative Theory of Startups (<http://www.rationalfuturist.com/writings/altstartups.html>).

</comment></comment><comment><USER5> Thiel understands that because the world political system is far from equilibrium, in the long run it will tend towards one of two possible futures: extreme centralization or extreme decentralization. If you can assume the former is nwo-type scenario, then it's clear that he's hoping to push society towards the latter--paypal, seasteading, etc all create the infrstrucure for small-scale independence. I agree with him.

</comment><comment><USER6> My least favorite Peter Thiel quote "Show me a good loser and I'll show you a loser. " According to: <http://www.guardian.co.uk/technology/2008/jan/14/facebook></comment>


Sotheby's top art forgery detective - <AUTHOR> https://www.theguardian.com/news/2018/jun/15/how-to-spot-a-perfect-fake-the-worlds-top-art-forgery-detective <comment><USER2> what a paradox: sure, people pay a super premium for something done by Da Vinci himself for obvious reasons...but the fakes apparently are also amazing, enough to fool all but a few experts.

<comment><USER3> People care about non-physical properties. In copyright law, the same pattern of bits can be legal in one context and illegal in another.</comment></comment>


Stealing Credit Cards from FUZE via Bluetooth - <AUTHOR> https://blog.ice9.us/2018/04/stealing-credit-cards-from-fuze-bluetooth.html <comment><USER2> Please visit our website and see our future plan. [https://fuzecard.com/FUZE_NOTICE_20180406.png](https://fuzecard.com/FUZE_NOTICE_20180406.png)</comment>


PTSD injection success prompts large-scale Army study - <AUTHOR> http://suissenews.net/health/ptsd-injection-success-prompts-large-scale-army-study-990-2017/ <comment><USER2> Do we have a better source? (Or a reason why this source should be trusted?)

<comment><AUTHOR> [https://www.bing.com/news/search?q=Ptsd+Injection&form=NWRFS...](https://www.bing.com/news/search?q=Ptsd+Injection&form=NWRFSH&ttct=)

There are multiple articles available. Wall Street Journal is paywalled. Another had what I felt was a click baity title. If you find one you like better, submit it. You seem to have a better track record of getting things to the front page than I do.</comment></comment>


Twitter in French, Italian, German, and Spanish - <AUTHOR> http://blog.twitter.com/2009/10/coming-soon-twitter-in-more-languages.html

<comment><USER2> Bizarre, instead of simply hiring a couple of translators at $0.10 a word, they build a tool to let users translate the site. How many words of copy does twitter.com have anyway? I count less than 100 on the frontpage.

And it's not just twitter - Facebook did the same - with painful results.

The truth is, being a native speaker isn't enough to produce good translations. And while the English creators of a site can't tell the difference, its users certainly can.</comment>


Ask HN: How do you architect software that needs to be maintained for 30-years? - <AUTHOR>

A discussion[0] yesterday got me wondering: how do you architect a software project that you expect will be in service and maintained for 30 years?<p>How do you decide which programming languages, libraries, dependencies, and tools are appropriate to use? How do you forecast which design patterns are both helpful, yet easily recognized and used by those who maintain the project after you? How do you build in enough flexibility for the project to withstand 30 years of requirements changes and enhancements?<p>[0] https://news.ycombinator.com/item?id=7142356 <comment><USER2> First off, I think you might not be getting responses to this because you labeled it a 30-year software project, which isn't what you're asking really, you're asking how do you architect a product that will be maintained for 30 years.

Those are two VERY different questions. I came here expecting to answer not to expect to develop for 30 years.

Ok, now for my answer. There are a few things you'll want to look at.

First, I'd argue you build very modularly. You don't know what the product is going to need to do in 5 years, let alone 30 years. Building a product from independent modules will allow future developers to add, remove or update modules to reflect the times.

As far as languages, go with either what is popular today, or what you have EVIDENCE will be popular in the next 10 years. I say evidence because if you just hop on the next big thing (Go, Julia, etc) because at this point you don't know how difficult it will be to hire developers that are familiar with those languages in 10 years.

The libraries and dependencies answer is the same as the previous. Don't pick something obscure that you think 'might' be popular in the long-term, go with what's popular now or has evidence of popularity later. jQuery, Bootstrap, Rails, Node.js all had massive amounts of interest right from the start. However, if you can get away with not relying on a library, you should probably do it. If you need something now to ship quickly, but don't want it populating your project long-term, use it only in the modules that need it, and that way it can be easily replaced later (I'm doing this with jQuery now as Angular DOM traversal isn't great.. yet).

<comment><AUTHOR> >> Ask HN: How do you architect a 30-year software project?

> you labeled it a 30-year software project, which isn't what you're asking

Good call - I've changed the title.

What sort of evidence do you think a developer should look for to tell whether a language may become popular, rather than just plateauing with a strong, but relatively small, user base? How strong should the evidence be to justify choosing an up-and-comer over an existing major player?

<comment><USER2> You can use github as a decent judge of this I think. You're not going to find any absolutes as to the potential popularity of a language, but I'd recommend not jumping on the next new thing. Go with something that has at least a few years behind it.

[https://github.com/JuliaLang/julia](https://github.com/JuliaLang/julia) [https://github.com/rails/rails](https://github.com/rails/rails) [https://github.com/scala/scala](https://github.com/scala/scala) [https://github.com/joyent/node](https://github.com/joyent/node) [https://github.com/ruby/ruby](https://github.com/ruby/ruby) [https://github.com/sinatra/sinatra](https://github.com/sinatra/sinatra)

</comment></comment></comment><comment><USER3> Emacs and Autocad both use a similar model based on a core plus a powerful command language...ie, the same architecture as LISP. That's not to say that either was initially envisioned as a 30 or 40 year project. It's just that their architecture has allowed them not only to survive but evolve continuously alongside expectations and needs release by release.

</comment><comment><USER4> Most people have hit on the big ones, but I think the most underrated answer is: Comments.

Seriously, comment the hell out of that code where anybody coming in at any time can understand what's happening. Make it so that a technical director can read only the comments and understand the entire system and it's dependencies.</comment>


Growth Hacking on Steroids: List of Powerful Apps to Maximize Number of Users - <AUTHOR> http://blog.maqtoob.com/growth-hacking-on-steroids-33-powerful-tools-to-maximize-number-of-users

<comment><AUTHOR> Hey, I put together a list of useful apps that can help with growing a business/startup fast and cheap. I hope it can help. Any other tips welcome.</comment>


Ask HN: How do you share password in a distribute/virtual organization? - <AUTHOR>

My partner and I are in different locations and occasionally need to share passwords for an email account or some other account relate to our project. What are some of the best practices for handling this? <comment><USER2> My company uses LastPass Enterprise (<https://lastpass.com/enterprise/>). It works well for us (multiple physical offices in different cities, some of us work from home, etc.).

</comment><comment><USER3> If it is ok for everyone on the team to see the passwords, a shared keepass (<http://keepass.info/>) database is one way to solve the problem.

<comment><AUTHOR> Thanks. I will try out the OS X port and see how it works. Currently there are only 2 people on the project, so everyone can see the passwords that I'm planning to store.

</comment></comment><comment><USER4> Meldium might be suitable? (<https://news.ycombinator.com/item?id=5282647>)

(I have nothing to do with them.)</comment>


Try Haskell: An interactive tutorial in your browser - <AUTHOR> http://tryhaskell.org This is already on haskell.org and I know it was posted here in the early stages, but maybe a few maybe-interested-in-trying-Haskell-ers haven't heard of it and would like to try Haskell. As of this week there are 30 tutorial steps / 7 lessons, finishing at the type system (so far).
There's a lot more potential for this project (adding a CodeMirror editor with "loadable" code, allowing uploading of tutorials like a pastebin... but a tutorialbin, asking exercise questions which are then quickcheck'd, etc.), but I like to incrementally add and then get feedback.
For newbies to Haskell I would like your feedback/comments, if you have any. I'm hoping to reach fresh Haskell newbies here on Hacker News for an unbiased experience.
I asked a non-programmer friend to try it out a while ago and got some invaluable feedback. Send it to your friends, just to see how far they get! Post what they say! Anyone who's read something like Rocket Surgery Made Easy will be familiar with how invaluable feedback is.
I am also interested in hearing about general ideas on what you think would just be cool to see.
If you want to let me know about bugs please post them here: http://github.com/chrisdone/tryhaskell/issues Granted there are some browser/OS oddities but I can only test on so many! Bugfixes welcome! PM me on github.
Cheers! <comment><AUTHOR> This is already on haskell.org and I know it was posted here in the early stages, but maybe a few maybe-interested-in-trying-Haskell-ers haven't heard of it and would like to try Haskell. As of this week there are 30 tutorial steps / 7 lessons, finishing at the type system (so far).

There's a lot more potential for this project (adding a CodeMirror editor with "loadable" code, allowing uploading of tutorials like a pastebin... but a tutorialbin, asking exercise questions which are then quickcheck'd, etc.), but I like to incrementally add and then get feedback.

For newbies to Haskell I would like your feedback/comments, if you have any. I'm hoping to reach fresh Haskell newbies here on Hacker News for an unbiased experience.

I asked a non-programmer friend to try it out a while ago and got some invaluable feedback. Send it to your friends, just to see how far they get! Post what they say! Anyone who's read something like Rocket Surgery Made Easy will be familiar with how invaluable feedback is.

I am also interested in hearing about general ideas on what you think would just be cool to see.

If you want to let me know about bugs please post them here: <http://github.com/chrisdone/tryhaskell/issues> Granted there are some browser/OS oddities but I can only test on so many! Bugfixes welcome! PM me on github.

Cheers!

<comment><USER2> I thought it was great, except the way "let" was introduced was a little shocking. You just assumed what it was doing was intuitive (which it was, coming from a lisp background). I look forward to more!

<comment><AUTHOR> That's definitely a pattern I'm seeing; people don't like the way "let" is introduced. I think in writing it I hoped it would be intuitive. I think, actually, someone suggested that I spend a few examples demonstrating it to ease the idea into the reader's brain. It seems people don't mind weird things as long as you explain them. Interesting lesson. Thanks for the feedback and thanks for trying!

<comment><USER3> I like everything up to but not including step 7. (<http://tryhaskell.org/#7>)

The syntax

      let villain = (28,"chirs") in fst villain

is not obvious to me, and the tutorial doesn't explain what each piece of the new syntax means, and quickly moves on to something new in step 8.

Only through experimentation, I find:

      fst (28,"chirs")
      => 28
      snd (28,"chirs")
      => "chirs"

So I gather the let is equivalent to:

      (let ((villain '(28 "chirs")))
        (first villain))

But without parens, line breaks or semicolons I have difficulty determining where one expression ends and another begins.

Plus, the arbitrary shortening of "first" to "fst" doesn't help, and should probably be clarified.

You seem to only check the return value to determine when to skip to the next step in the tutorial, since in step10, you want me to type:

      ['a','b','c'] == "abc"

But it skips ahead when I play around and return True from a different expression:

      'a' : 'b' : [] == "ab"
      => True

<comment><USER4> Are _fst_ and _snd_ the standard haskell functions? It doesn't seem worth saving a few characters for how awkward it makes it to read the code, but then again, if we can get used to _car_ , _cdr_ and so on, I guess its not bad. Though in the case of the tutorial, it should definitely state what _fst_ and _snd_ are.

<comment><USER3> _...if we can get used to car, cdr and so on, I guess its not bad._

Common Lisp (and MzScheme) users can use first (and second, and third...) and rest, and probably should do so when using simple lists.

<comment><USER4> My Lisp of choice is Clojure, which also uses first, second and rest.

</comment></comment></comment></comment></comment></comment></comment><comment><USER5> You might want to use mueval (<http://hackage.haskell.org/package/mueval>) in order to prevent evil people from being evil (at least to your server.)

It works pretty well at keeping crazy stuff out. Hopefully you added _some_ sort of limiter to your page... but if you haven't, this is a great start.

Nice UI & stuff, though. Seems to work pretty well. It would be nice, like paulgb said, to be able to enter a block of code and execute it. I know this currently behaves a lot like ghci, but it would be nice to test larger sections of code.

Also cool job with the lessons. Sure it's pretty light, but it provides a good, quick introduction.

<comment><AUTHOR> Hi, TryHaskell actually uses mueval underneath. See here [http://chrisdone.com/posts/2010-04-05-haskell-json- service-t...](http://chrisdone.com/posts/2010-04-05-haskell-json-service- tryhaskell.html) for more details about how. The JSON service supports state (code loading), with restrictions on imports (e.g. no importing unsafePerformIO), it's just that I haven't added a box to TryHaskell to enter the code. Definitely, it seems people would like to write bigger sections of code, which I like! I'm still pondering how to alter the layout to support this!

</comment></comment><comment><USER6> 1\. You're trying too hard with the joking tone - it gets in the way. Jokes are funny in tutorials when they contrast with something, but if the whole thing is a long-running joke there is nothing to contrast against.

2\. Inverted contrast of instruction text makes it hard to move the eyes from tutorial to command window and back.

3\. There isn't actually enough explanation for what's going on. For example here "let villain = (28,"chirs") in fst villain" it's never explained what the actual syntax is. Which is where I stopped reading.

4\. You have a hint that tells you how to get to current page. But I am already on the current page! What I need instead is a shortcut to get to previous page.

<comment><AUTHOR> Hey, I removed the jokes, a full explanation of let with examples and fst, etc. and a shortcut to go back. Can't change the colour yet on this machine as it's done with sprites and I need the right editor. Let me know if you try it further!

<comment><USER6> Sorry, I moved on to other things now.

I'm very impressed with your follow-trough however, and I think you will do quite well for that. It's similar to how a cruise missile can adjust the trajectory, and thus is infinitely more precise than a ballistic projectile. Good luck.

</comment></comment></comment><comment><USER7> Cool. Is there a way (or can you add a way) to link people to expressions? For example, if I want to show someone :t (id >=> id), could I just give them a URL somehow?

<comment><AUTHOR> [http://tryhaskell.org/?input=%3a%74%20%69%64%20%3e%3d%3e%20%...](http://tryhaskell.org/?input=%3a%74%20%69%64%20%3e%3d%3e%20%69%64)

Tada!

Type something in the console and hit enter. Then type "link" and hit enter. Or type "link :t id >=> id".

How's that for a slice of fried gold?

<comment><USER7> You, sir, are the man.

</comment></comment></comment><comment><USER8> Whenever I press "[" it actually inserts "8[" into the editor. I use Opera 10.5 and a German keyboard (on the German keyboard layout you get an "[" by pressing ALT+"8", if that's any help).

I think you might want to look at how Opera handles keydown and keypress events in Javascript. I had a similar problem working on my own project a few days ago.

<comment><AUTHOR> Ah, I haven't tested with a German layout. I have OS X and Ubuntu available to test on. What operating system are you using? Indeed, I had to add some special support for Opera in places with the key codes. For example, it's impossible to tell, on Opera, when someone presses the End key and when they press, say, 'h', because Opera sends 'h' for both keys. (Or whatever letter.) Actually it is possible with some hackery but it is a pain!

<comment><USER8> I'm on Win7. Actually I made a slight mistake on my original comment. You get "[" by pressing ALTGR+"8" not ALT+"8". Don't know if it makes a difference.

<comment><AUTHOR> OK, I'll try to get hold of a Win7 machine at work. Can't make any promises though! (Nearly everyone at my workplace uses Linux.) Hopefully a kind soul of German persuasion with JavaScript know-how and a penchant for Windows will come along and fix it.

<comment><USER8> I noticed that Opera sends two keypress events when I press "[". The first event (that generates the erroneous "8") has e.altKey==true.

So a simple solution might be to add the following to the keypress function "if(e.altKey) return;". I've tested this locally and it works for me, but don't know if it might interfere with other keyboard layouts.

<comment><AUTHOR> Ok, I applied the patch mentioned in the other post. Please try now and let me know if the issue still exists!

<comment><USER8> When I go to tryhaskell.org, it still doesn't work. I believe the patch that you've mentioned only applies to when the user presses ALT+TAB, which won't help here.

I'd suggest you either do "if(e.altKey)return;" or "if(e.altKey && e.ctrlKey)return;". Both work for me.

EDIT: Hm, my suggested changes work in Opera, but they break Chrome... This is driving me crazy.

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> Cool! Try Ruby was what convinced me to learn Ruby. Hopefully this will do the same for haskell.

Is there a way to bind variables? I can do things like "let a = 3 in a", but it seems that no state is stored between expressions?

<comment><AUTHOR> I do hope this will get you into Haskell!

Hey Paul, that's correct; there's no state stored between expressions. It's planned that there be a text editor where you can put top-level definitions, kinda similar to DrScheme, if you know of it. You may notice parts of the tutorial that would've been better (e.g. having to write `let .. in ..`) with state between expressions. I will rewrite those once this is implemented.

<comment><USER9> Actually, I'm already into Haskell; my comment was poorly worded but I meant I hope it does the same for other people :-).

> It's planned that there be a text editor where you can put top-level > definitions

Good to hear, I like the way Dr. Scheme does it and it makes for a good learning environment.

</comment></comment></comment><comment><USER10> Great, I always wanted to try these languages But

let villain = (28,"chirs") in fst villain

is a big turnoff.

<comment><AUTHOR> Yep, that seems to be everyone's main complaint! I should've known it wouldn't be intuitive. Oh well, lesson learned. Hopefully this is the only step like that! Cheers!

<comment><USER10> Maybe you can break up queries in keywords, where each keyword triggers a JS- balloon or title="" with explanation of its function. This way people unfamiliar with the language won't need to look up what fst is and why it is there (how rigid the syntax is).

Otherwise it is the languages fault, not yours. Sad that issues like keyword naming and syntax is often not taken seriously enough by language authors. Popularity really puts languages under a constrain of development towards the intuitive.

Would you agree with me that we need a very transparent and human readable super-language, that other languages can be easily translated into? This way it can exist exclusively for the definition of algorithms and learning purposes. This way speed and re-usability will never be an issue, and developers of this language won't need to keep its weaknesses for the sake of forward compatibility.

<comment><AUTHOR> Hmm bubbles/titles on syntax sounds like a good idea, thanks!

I suppose if you want a super-language, you would have a language which starts from very simple constructs and one straight-forward way to define new syntax and semantics to fit a given problem, within that language itself; so that for any given problem, someone can read the solution, and if they don't know the syntax/semantics, they can read the definition which is in turn written in this really simple language. Lisp is mostly ideal for this.</comment></comment></comment></comment>


Twitter's arbitrariness: do we need a dist'd protocol, not a central service? - <AUTHOR>

Watching various tweets going past in the light of the NBC fiasco, and several people are suggesting that we should have an email-like protocol so we can develop a Twitter-like system with multiple providers, similar to how we now have multiple email servers.<p>Surely this can't be too hard to design and implement - most likely the impossible challenge is the chicken-and-egg problem - how can you get people to use it. <comment><USER2> Protocols are nearly impossible to market to consumers; services and apps are what people want. Whether it'll be SMTP Lite, P2P HTTP, or whatever, doesn't matter at this point.

I think what's missing is a compelling user experience that's decentralized by its nature. Even the terminology needs to be thought out:

email : {Gmail, Hotmail, ...} :: ____ : {Twitter, Facebook, ...}

maybe ____ is "stream" as in "what's your stream address?"

The technology side is exciting, but the UX needs to be nailed before bothering with it. As for adoption, there are a ton of social networking clients out there, I'm sure you could convince a few to adopt this, maybe by starting with a niche first.

<comment><AUTHOR> Absolutely people want a service, but to build that service - which will be done by hackers - we need to have a protocol to work to.

But you're right - we need to nail the user experience.

</comment></comment><comment><USER3> I think it's important to replace Twitter with an open protocol _if Twitter as a platform has value_.

I would argue that it doesn't.

Twitter, in the social sense, has value for users on both sides as a corral of content consumers and producers. Twitter, in the technical sense, offers very little - the only special consideration is that I can send an SMS message from my phone and it will appear on a website, but there are many other services that provide this functionality. The reason I use Twitter is that it's free.

</comment><comment><USER4> "do we need a dist'd protocol, not a central service?"

Short answer: yes. The communication model/platform has viability, but implementation(s) would be what makes or breaks it.

Obvious I know, but it bears repeating.

</comment><comment><USER5> Have you checked out what we're doing at <http://join.app.net>?</comment>


A Trivial LLVM Lisp - <AUTHOR> http://paste.lisp.org/display/74068

<comment><USER2> Author here. This is really not a useful thing at all (most obviously there's no allocation whatsoever), and it is quite an old version. I pastebin'd it to show to someone on IRC, certainly not to have it show up on the front page of HN :)

Just me tinkering with LLVM, though it will probably turn into something useful (and, ahem, deliberately public) someday... (email of course appreciated if anyone happens to run with it).

</comment><comment><USER3> I don't believe I've seen an HN post before with so many upvotes (currently 63) and zero comments. I assume some people are bookmarking it for later review or use. Anyone got any plans in particular?

(Related: a small LLVM Scheme compiler: <http://llvm.org/ProjectsWithLLVM/#scheme>)

<comment><USER4> It's may be a way to say "we want more programming/computer science links".</comment></comment>


How much "ugly" food we throw away - <AUTHOR> http://www.salon.com/2015/09/23/beauty_of_ugly_food_partner/ <comment><USER2> I am in Germany and I am a member of [https://foodsharing.de/](https://foodsharing.de/) . We collect food from shops that would throw it away otherwise.

In my town, we have a cooperation with a small organic supermarket where we collect food twice a week. Sometimes the quantity of the food that gets thrown out is sheer incredible: [http://i.imgur.com/5mb4WN1.jpg](http://i.imgur.com/5mb4WN1.jpg)

Over 95% of the collected food is still edible. It's mostly unpackaged food such as fruit, vegetables and bread, but sometimes packaged food as well with expired "Best before"-date (which honestly doesn't say anything about the quality of the contents).

We usually split these quantities up with 4-6 people and it has fed me well over the past months.

<comment><USER3> Here in Portugal there's also a project called Refood, founded by an American, which collects food from restaurants, coffeeshops, etc, and provides them to people in need. It's now distributing 24 thousand meals per month.

</comment></comment><comment><USER4> That reminds me of a quite old doc that kids were expected to watch in schools during my childhood, Island of Flowers (with english subs): [https://www.youtube.com/watch?v=amg08t0TQOY](https://www.youtube.com/watch?v=amg08t0TQOY)

It's about a small river island in Porto Alegre, Brazil (in 1989). Food thrown away would be given to pigs first, and the rest discarded by the animals was scavenged by the poor people living there. It's a pretty intense scene to watch...

It's a well known fact (for brazilians, that is) that in Brazil we waste and throw away to much good food but people stopped bothering years ago when some bills passed stating anyone giving/reselling thrown away food to others -- no matter how perfect they were/looked -- could go to jail and pay some fines if anything happened to the consumers of such food.

It's quite easy to find fantastic food in street markets or at the back of restaurantes at the end of the day, specially veggies and fruits. That makes projects like food sharing etc extremely difficult.

<comment><USER5> >some bills passed stating anyone giving/reselling thrown away food to others -- no matter how perfect they were/looked -- could go to jail and pay some fines if anything happened to the consumers of such food.

Is that something that actually happened? In the US we tend to think that's a rule, but the opposite is true, there's explicit legal protection.

<comment><USER6> The US constantly shuts down unlicensed charity programs that set up feed stations in public. Donated food is subject to the same strict controls as sold food. A cafe can't donate a PB&J sandwich that has sat on the shelf unrefridgerated for 4 hours

<comment><USER5> I was talking about giving food to charities, not trying to set up a half- baked charity.

The big issue here is food that's still good but undesirable, not food that has gone past regulated safety limits.

Especially when manufacturers are setting arbitrary 'best' dates.

</comment></comment></comment></comment><comment><USER7> Given how much processed food we eat I find it hard to believe the situation is that bad.

Nobody is making orange juice out of perfect oranges.

<comment><USER8> Salon is a pretty awful magazine. The bias/inaccuracy's is pretty full on.

It would be interesting to see if processed foods companies using off cuts contributes to fast food often being cheaper than if you made it yourself.

<comment><USER9> This isn't orginally from Salon. It's from Alternet ([http://www.alternet.org/food/its-time-eat-ugly-food-you- wont...](http://www.alternet.org/food/its-time-eat-ugly-food-you-wont-believe- how-much-were-wasting)). Not that I know if Alternet is any better...

</comment></comment></comment><comment><USER10> Last Week Tonight did a pretty good special on this topic as well

[https://www.youtube.com/watch?v=i8xwLWb0lLY](https://www.youtube.com/watch?v=i8xwLWb0lLY)

</comment><comment><USER11> I've told this story before, but about 20 years ago I met a guy from a farming family. The family farm supplied zucchini/courgettes (I think it was) to supermarkets. The supermarkets had rules about what range of curvature was acceptable. Previously the extra bendy produce would essentially be waste (turned in to animal food, composted, etc), but with the rise of farmers markets and natural/organic food they were able to sell the bendy produce at a premium directly to the consumer.

And here's a French supermarket that is successfully selling 'ugly' produce at reduced prices:

[http://well.blogs.nytimes.com/2015/06/24/ugly-fruits-and- veg...](http://well.blogs.nytimes.com/2015/06/24/ugly-fruits-and-vegetables- get-a-makeover/)

<comment><USER6> Yes most cities have a discount produce shop that sells the B grade stuff.

</comment></comment><comment><USER12> Until a few years ago, EU had a regulation that stated "all bananas and cucumbers must be free of abnormal curvature and at least 14 cm in length. "

Not sure if I want to know what legislators did with the fruits...

<comment><USER13> That's not true, they define the "class" of banana/similar. It's there so that when one supplier in a country says "we'll deliver X tons of Class 1 bananas" there's some definition around what they're actually delivering. This gets more important as you start dealing with different items that have the same name in different countries.

<comment><USER12> Ok, they didn't ban them, they just put them together in a class with crappy, chemistry-grown fruits/veggies, so that nobody would buy them.

I don't remember the exact text, so I probably shouldn't have put quotes, but still, what I said is true in practice.

Anyway, it was an absolutely terrible idea that has been left in the past.

<comment><USER14> [https://en.wikipedia.org/wiki/Commission_Regulation_%28EC%29...](https://en.wikipedia.org/wiki/Commission_Regulation_%28EC%29_No._2257/94)

It's just overly-pedantic input validation in the legal system; if you're going to have rules that mention bananas, you have to define what is and what is not a banana. Especially if different fruits have different tax treatments.

</comment></comment></comment></comment><comment><USER15> I don't think it's worth getting more upset about an uneaten carrot or chicken than about an uneaten pine cone or bear.

<comment><USER16> Given that the former examples take human effort and resources to grow while the latter don't, the two aren't equivalent. If we had perfectly efficient farms we'd save a _huge_ amount of both energy and money providing food.

Arguably we already have perfectly efficient bear production, insofar as we don't spend resources on them because we don't eat them.

<comment><USER15> The amount of human effort wasted producing food is probably pretty small compared to the amount wasted, say, filling out HR forms.</comment></comment></comment>


Evernote Peek, The First iPad Smart Cover App - <AUTHOR> http://blog.evernote.com/2011/06/08/introducing-evernote-peek-the-first-ipad-smart-cover-app/ <comment><USER2> It looks cute, but for a flash card app other interaction methods are just as quick and easy, maybe more so. Now, if something like this could be used so that a person could see, for example, their next appointment by peeking, but fully opening the cover activated the iPad normally, that would be cool.

<comment><USER3> yeah, I agree. I tried it and it was very interesting but the interaction was very bad. For instance, you can't peek then close and think ... once you peek you have to open all the way or it will move to next question.

I appreciate the imaginativeness of it but it isn't really an enjoyable interface for long term use.

</comment></comment><comment><USER4> This is nifty enough, but Evernote has so many problems with its client UI design that I hate to see them spending front-end engineer development time on side diversions like this. I recently let my Evernote Premium subscription lapse and migrated my notes to another system because I was so frustrated with the painful user experience across their various clients, despite their core product idea being so awesome and their syncing/OCR/backend services working well.

<comment><USER5> I'd like to know what you switched to?

As a Premium subscriber to EverNote, this news about a very bad flash card app indicates to me that they aren't serious about improving their core product and instead want to capitalize on the brand with gimmicky spinoffs.

Basically I just lost a lot of confidence in the EverNote brand.

<comment><USER4> I replaced most of my Evernote usage with Markdown-formatted text files in Dropbox, using Elements as an iOS client. Dropbox gives me syncing, versioning, and online (read-only) access, and Elements lets me store all the notes locally on my iOS devices (as well as just being an otherwise fantastic app). There's no support for tags, but for the way my notes are organized a light folder structure works just as well.

I'm still using Evernote for collecting receipts, though. The combination of some smart Gmail filters (Amazon/iTunes/Steam/etc receipts all auto-forward to my Evernote email address) and the automatic PDF OCR (I've got a document feeder scanner) still make it simpler than anything else for that. I reference my receipts so rarely that I can put up with the painful UI once every few months.

</comment></comment></comment><comment><USER6> Very clever use of the smart cover, but in the end I don't feel many people will use it.

Its cleverness relies on having an iPad 2 and a smart-cover, which segments it. Then, from a usability standpoint, I feel it would be more annoying to continue to lift up a cover than to tap the screen to reveal the answer.

<comment><USER7> It does not actually require Apple's Smart Cover; any of the third-party covers which are using magnets would work the same way. And there are already quite a few of those.

<comment><USER6> Even if we change it from "needing a smart cover" to "needing a magnetic cover", the same general principal holds: You won't just need an iPad 2, you'll also need a cover that takes advantage of this capability, which will cut down your audience by a good amount.

<comment><USER8> I would be willing to bet that the intersection of users with iPad 2's and users with iPad 2 + Smart Cover is very large.

<comment><USER9> Not only that, but it's literally the cutting edge and folks with most disposable income... ie, a great market even if it the covers aren't a large % of iPad2 owners.

</comment></comment></comment></comment></comment><comment><USER5> why is evernote diverging so far from their core product?

there are other flash card apps that already do this way better and i dont see evernote catching up anytime soon

the peek thing looks cool but it's not a useful gimmick because

1\. you want the ability to use longer questions as well as images and video in your flashcards

2\. you want to be able to move on to the next question quickly without the carpel-tunnel implications of physically unfolding this cover

3\. proper flashcard learning requires more complex interaction than this. Each time a card is finished one needs to indicate how well they learned the card (among other things) In order to do this people would have to use 2 hands here.

The evernote marketing team is at the top of their game, as are the UI designers. But this is just brand cannibalization -- leveraging the evernote brand to get sales in an unrelated market with an inferior product based on a gimmick.

<comment><USER10> Last I checked the app was free. Sounds to me like a product they thought would be fun to make, so they made it. I dig it.

<comment><USER5> Sounds like you dig it because you're not a serious user of either flash card apps or EverNote.

<comment><USER11> Today I learned there are people who consider themselves serious users of flash card apps.

I use Evernote every day and it doesn't annoy me as a diversion from their core product. The smart Smart Cover integration is cool, at least.

<comment><USER5> if your job involves any amount of memorization, you should be using a flash card app with spaced repetition

</comment></comment></comment></comment></comment><comment><USER12> Cute, but flipping the cover back and forth is kind of low-tech right? I think this is a better product: <http://ankisrs.net/docs/AnkiMobile.html>

</comment><comment><USER13> It's an interesting use of the Smart Cover, but can it be a serious competitor to other flash card replacement apps since there's no easy way to report success or failure by lifting/replacing the cover?

<comment><USER14> Tapping the screen?

Also, is right/wrong reporting really that important? I don't have a way to do it with paper flashcards...

<comment><USER15> I find being able to report right/wrong answers makes flashcard programs much more effective. Once you try a program like Mnemosyne or SuperMemo, you'll never go back to paper flashcards.

<http://www.supermemo.com/english/ol/sm2.htm>

<comment><USER16> or anki, the OSS version of supermemo:

<http://ankisrs.net/>

</comment></comment></comment></comment><comment><USER17> This is a very clever idea. This 'tactic' could be used with a lot of different apps too, maybe even a notification bar?

<comment><USER18> That includes your mail, facebook updates, twitter mentions, weather, etc. Had that idea some time back. Could be cool!

</comment></comment><comment><USER19> While the use of app + smart cover is ingenious, what I am more excited about is that this opens to a possibility of a whole slew of "smart accessories" + apps that utilises the magnets on the iPad screen.

Which got me thinking...what sort of really clever apps/accessories can one make that utilises these magnets?

I.e. Perhaps a puzzle game that uses "magnetic chopsticks" to interact with it. Or maybe an organizer app with "magnetic labels" where when you cover different parts of the screen, it pulls up a different functionality.

</comment><comment><USER20> Very creative. I really like this. Well played, sirs.

</comment><comment><USER21> Curious, how do the capture the event of the cover lifting?

<comment><USER22> They don't. They capture the active/inactive event.

Try tap the home button and re-open the app.

<comment><USER23> Could you elaborate? Is the inactive event triggered when the screen is completely covered, and any uncovering triggers the active event?

<comment><USER22> There are some cases where these events are triggered, open and close the Smart Cover is one of them.

You can read the following API documentation for more info:

[http://developer.apple.com/library/ios/#documentation/UIKit/...](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intf/UIApplicationDelegate)

My guess is they do the switch of question when applicationWillResignActive is being called. Simple as that.

</comment></comment></comment></comment><comment><USER24> Please someone create a bluetooth poker app like this! It would be a very expensive round of poker but imagine people sitting around peeking at their cards via their ipad. Brilliant.

<comment><USER25> The problem with a poker app that utilizes this is that you would be showing your cards to other players. Poker players peek at their cards face down, not face up like an iPad.

</comment></comment><comment><USER26> This is such a great example of excess.

iPad 2: 500$+ Smart Cover: 40$ Evernote Peek: 0$.

vs.

Pack of index cards: 2$

<comment><USER27> Let me guess, you wear one of those giant trenchcoats in which you keep a film camera, a TV, a travel Scrabble kit, a rolodex, a piano, a homing pigeon, an encyclopedia, a barometer, a thermometer, a bubble level, a compass, a paintbrush and paints, an ocarina, a walkie-talkie, and of course, a pack of flashcards =)

<comment><USER28> An ocarina? Really?

<comment><USER29> There's an app for that.™ <http://ocarina.smule.com/>

<comment><USER3> now I find myself needing an ocarnia .... thanks

</comment></comment></comment></comment></comment><comment><USER30> All the people bitching against it wished they thought it first. Its a clever and simple idea. Good work.

</comment><comment><USER31> upwards of 50 million in venture capital for 500k in paid users. icloud killed more than just a few yesterday.

</comment><comment><USER32> Ingenious I think! A fun way to learn!

</comment><comment><USER33> Brilliant.

</comment><comment><USER34> awesome guys...really innovative!</comment>


Ask HN: What Algorithms are you using to make money? - <AUTHOR> I'm thinking about algorithms that generate money. First one comes to my is the Bellman Ford algorithm. It can be used to find the shortest path in arbitrage cycles. <comment><USER2>
        while (alive) {
            hussle()
        }

<comment><USER3> Hustle?

<comment><USER4> Hussle still means making money in slang apparently: [https://www.urbandictionary.com/define.php?term=hussle](https://www.urbandictionary.com/define.php?term=hussle)

</comment></comment></comment><comment><USER5> They are trade secret, so can't describe them here, but currently using algorithms created by my skip level manager [1] to make actual physical money.

[1]: [https://www.cranecurrency.com/rnd-banknote-security- thread-f...](https://www.cranecurrency.com/rnd-banknote-security-thread- features/)

</comment><comment><USER6> GEM - a dual momentum trading strategy that requires a couple of minutes work each month and almost never makes a trade. Highly recommend the book.

[https://www.optimalmomentum.com/gem_trackrecord.html](https://www.optimalmomentum.com/gem_trackrecord.html)

<comment><USER7> What do you have to do each month exactly?

<comment><USER6> Once a month look at year-over-year total returns for VOO, VXUS, and BIL

keep 100% of your portfolio in one of 3 funds: VXUS, VOO, BND

use chrome, not firefox which is broken [http://stockcharts.com/freecharts/perf.php?VOO,BIL,VXUS&n=25...](http://stockcharts.com/freecharts/perf.php?VOO,BIL,VXUS&n=252&O=011000)

VOO Highest? buy or continue to hold VOO

VXUS Highest? buy or continue to hold VXUS

BIL highest? buy or continue to hold BND

</comment></comment></comment><comment><USER8> I'm writing a swarm-based system that's experimenting on a bunch of different algorithms for trading. However, I'm currently building upon a modified [Quadratic Voting][1] mechanism as a means of communicating success/fitness and influencing other peers beyond pure algorithmic trading.

[1]: [https://www.sss.ias.edu/files/pdfs/Rodrik/workshop%2014-15/W...](https://www.sss.ias.edu/files/pdfs/Rodrik/workshop%2014-15/Weyl- Quadratic_Voting.pdf)

</comment><comment><USER9> I use multi-armed bandit algorithms to optimize things. It acts as a self- healing algorithm to minimize opportunity cost / "loss" as it searches the space.

</comment><comment><USER10> I am using Hamming distance to create money.

<comment><USER11> for me it's mostly SHA256 and Backpropagation

</comment></comment><comment><USER12> My own, incorpated into my cloud based trading robots...

<comment><USER13> Just read your profile, sounds really interesting! Can you talk about it? I would love to hear more!

<comment><USER12> Unfortunately, the details are my trade secret, but I can answer some general questions, so fire away...

<comment><USER13> I was afraid so, no problem!

How did you start?

How much user intervention does the system require? It buys/sells shares by itself?

How diverse is your portfolio?

would you mind recommending some material?

Thanks for your time!

<comment><USER12> Hey, basically I was always fascinated in the business/stock market even as a kid, so when I grew up and started working (Sysadmin/Security space) I started investing in whatever mutual funds my bank would recommend and it took me few years to realize how bad this investment was with the front/back loads, too many fees, etc... After that I decided to invest myself, so I took the path of reading a lot of useless books on value investing, technical analysis, etc and was sill losing money until I realized, that nobody in tier right mind would publish their trading secrets and even if someone does, all the money pouring into the system will arbitrage it away rather quickly, so all those people are basically making money not from trading, but from selling the dream...

Eventually, I bought data, learned myself how to program with Python (I am not a developer, so my programs are quite rude you might say) and started back testing any trading system I can find, all were losing the the long run, but I got the feeling for the market and started testing my own ideas until I found my edge... Automating it was easy afterwards using the API from discount broker... Hosted in the cloud with redundant servers around the world, and still testing new ideas...

My system does not require daily intervention and does everything (buy, sell, sizing, stops, adjustments, exists) by itself, but I would check the logs once a week to make sure everything is working properly, I do also have monitoring in place to monitor my servers, my API providers, also I sent myself notification after buy, sell and other statistics - maybe a bit overkill, but I am a sysadmin by heart and the email and SMS are free :-)

I would recommend buying some data: the far back you can get, the better, rent small linux VPS, learn some python and start testing, it won't be easy, but if you have interest, it makes a great hobby, and who knows, you might find your edge, sooner than later and it is well worth it, the compounding will generate your FU money, and something you can leave to your kids to run after...

The books I would recommend are more for motivation and inspiration:

The Asian Saga by James Clavell, reading as a kid on how to rule your life, business and create a dynasty...

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

More Money Than God: Hedge Funds and the Making of a New Elite by Sebastian Mallaby - on how to rule the world :-)

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

A Man For All Markets by Edward O. Thorp - basically the father of quant/systematic trading and one of the greatest minds of our time...

[http://www.edwardothorp.com/books/a-man-for-all- markets/](http://www.edwardothorp.com/books/a-man-for-all-markets/)

<comment><USER14> _Eventually, I bought data_

Hi, interested in trying this as a hobby, what kind of data did you buy? from where?

<comment><USER12> I am talking about historical stock market data and right now, the cheapest, I can personally find, is on eBay for less than $100 for 20 years...</comment></comment></comment></comment></comment></comment></comment>


Linus Torvalds rants about requiring root access for trivial tasks - <AUTHOR> https://plus.google.com/102150693225130002912/posts/1vyfmNCYpi5

<comment><AUTHOR> Interesting points: [http://www.h-online.com/open/features/Comment-Linus-s- daught...](http://www.h-online.com/open/features/Comment-Linus-s- daughter-1446928.html)</comment>


Weekend project: First HTML5 Game, more levels added! - <AUTHOR> http://www.highlinux.com/wanna-get-high?wp

<comment><USER2> towlie is the worst character ever! seriously, though, how do you play? i start with 3 each of alcohol and tobacco and seems like no matter the combination I just run out of them. great weekend project with html5!

<comment><AUTHOR> Hi,

this is indeed the idea of the game, you should combine the highs in a proper way that brings you to the top.

You can definitely go through all the 16 levels with no problems.

Towelie? Is the best character ever! :D

cheers,

<comment><USER2> you might need to include a training level or some kind of hint because, although I can see that doing things in different order make a difference, there's no visual clues and I'm not even close to getting to the top of level 1.</comment></comment></comment>


TinEye Reverse Image Search - <AUTHOR> http://www.tineye.com/ <comment><USER2> I found it missed a few. I have a couple of images I uploaded to Wikipedia of people. These articles are on the wikipedia entry to easy to find and get a few uses.

If I search for the person's name on google image search I get a few (non wikipedia) matches. But TinEye is unable to find _any_ non-wikipedia matches for the same images.

The images I am checking are of Rob Muldoon, Jim Gettys and Bdale Garbee

[http://commons.wikimedia.org/w/index.php?title=File:Muldoon_...](http://commons.wikimedia.org/w/index.php?title=File:Muldoon_26_June_1969.jpg)

[http://commons.wikimedia.org/w/index.php?title=File:Jim_Gett...](http://commons.wikimedia.org/w/index.php?title=File:Jim_Gettys1.jpg)

[http://commons.wikimedia.org/w/index.php?title=File:Bdale_pi...](http://commons.wikimedia.org/w/index.php?title=File:Bdale_pic1.jpg)

</comment><comment><USER3> Hmm... I uploaded a version of their own icon, but flipped horizontally ( <http://img21.imageshack.us/img21/6198/robbyn.png> ). It couldn't find it. It did find it when the image was not flipped, though.

<comment><USER4> In general, it matches despite differences in size, cropping, some watermarking and subtle differences in coloring. It's not surprising that their image hash isn't invariant under rotations and flips.

</comment></comment><comment><USER5> What is the discussion here supposed to be? TinEye has been around for like 2 years now.</comment>


Community-based, human-centered design - <AUTHOR> https://jnd.org/community-based-human-centered-design/ <comment><USER2> This is just design thinking reformulated. The problem with most of these principles is that they are extremely vague and are what good designers who design do anyway as a function of what they are buildning. Its very hard to do the not-test without ending with almost 100% score.

This offers no solution with regards to the transendence between the principles and the output. And reads to me just like marketing material for a process which will cost you way more than it will ever solve.

<comment><USER3> This is the announcement of a new paradigm that Don has been thinking about recently, it is not meant to be practical advice for implementation. It imagines a world where a designer is not needed to create a product; a designer can help refine, share, or scale it. In tech it would be something like those non-programming work flows for the marketing departments, which are typically looked down upon by the technically knowledgable, but imagine if they instead took that as the inputs to design a better system.

(Disclosure: Don is a relative.)

<comment><USER4> Your post addresses my biggest problem with the article: It reads more like a wishlist than a guide.

I would like to these issues addressed going forward: (And please don't take this as a list of reasons why this won't work; these are all things that I think can and eventually will be addressed.)

1\. How do the stakeholders learn what is or isn't technically feasible? (I've seen stakeholders propose cumbersome solutions because they had no idea that the technology existed to make something better.)

2\. How do the stakeholders learn about the non-obvious trade-offs between different design options? (As a trivial example: Lots of first-time product designers learn the hard way not to use white for the plastic exteriors of electronics. Why? It's extremely difficult to get white plastic to have a consistent color, and the two halves of the shell won't match. Even Apple, with their massive budget, struggles with this.)

3\. How do stakeholders learn about prior art in the field? There's rarely a good reason to reinvent the wheel, and there's even more rarely a good reason to repeat other people's mistakes.

4\. How do the stakeholders communicate their design to the engineers accurately and unambiguously?

5\. How do you accomplish all of the above without constraining the stakeholders to design by multiple choice (which is still inherently limited by an outside expert's idea of what is and isn't going to be useful to the stakeholders) or forcing them to become domain experts themselves?

If I have a suggestion off the cuff to address (some of) these issues, it would be to make a tiered set of design tools available. Level 1 would be straightforward multiple-choice, level 2 would be a mix of fill-in-the-blank and click-and-drag, up to level N using the same tools as the professionals. Community stakeholders could then decide for themselves what is the appropriate trade-off between flexibility and time investment.

</comment></comment></comment><comment><USER5> > Although traditional methods are effective for traditional mass-produced > items, they are unable to take account of the local needs, cultures, and > history of individual people and communities. The literature on the world- > wide aid community is filled with examples of well-intentioned "solutions" > failing to work when introduced into developing nations (see (Easterly, > 2013; Ramalingam, 2013). And if they do work at first, they are often so > difficult to maintain and service, that they soon fall into disuse. Finally, > in some cases the unintended negative consequences outweigh any good that > has resulted. We believe that the people best equipped to address these > issues are the people who live there: This article shows one approach.

</comment><comment><USER6> > The principles of human-centered design have proven to be effective and > productive

Perhaps this assertion is patently obvious within the field, and doesn't need a reference, but for those of us less familiar with human-centred design are there any well known instances of human-centered design being "effective and[/or] productive"?

<comment><USER2> Yes but not in the way it's used today.

I wrote about it several years ago

[http://000fff.org/getting-to-the-customer-why-everything- you...](http://000fff.org/getting-to-the-customer-why-everything-you-think- about-user-centred-design-is-wrong/)</comment></comment>