Show HN: uThreads – Concurrent User Threads in C and C++ - <AUTHOR> http://samanbarghi.com/uThreads/v0.3.0/ <comment><USER2> This looks super interesting! I've been working on a Raytracer in C++ and I was recently looking into a threading library which I can use to parallelize the rendering. Surely going to try this out in the coming weekend.

Unsolicited suggestion - while benchmarks and the motivation are important for a threading library, a code snippet of a simple parallel program on the home page would be something that I'd love to see.

Great job, though!

<comment><USER3> Isn't raytracing almost completely CPU-bound? Seems like a odd use-case for green threads, which afaik are more commonly used for IO-bound tasks.

<comment><USER2> You're absolutely right - raytracing is CPU-bound. However, one can still parallelize per-pixel rendering computations on separate cores. Here's an example of a path-tracer written in Go, spawning a new go-routine for this very use-case [https://github.com/fogleman/pt/blob/master/pt/renderer.go#L6...](https://github.com/fogleman/pt/blob/master/pt/renderer.go#L64-L65)

<comment><USER4> If you just want to start num-CPUs threads like that code does, there is no advantage of green threads over regular ones, std::thread in C++. If you want to start a thread per pixel or something, green threads could work, but it's probably more efficient to keep track of state manually.

</comment></comment></comment></comment><comment><USER5> How would something like this differ from something like Sandia National Lab's Qthreads ([http://www.cs.sandia.gov/qthreads/](http://www.cs.sandia.gov/qthreads/))? Seems it's a tried and true solution in C that also works with C++11 (committed a test case for C++11 myself)...It is also an optional underpinning for some relatively big-name frameworks like Kokkos, Chapel, RaftLib, etc.

<comment><AUTHOR> Thanks for mentioning this, it is indeed very related and very interesting. I am not sure why not me or people around me were aware of Qthread, it has very good support for various architectures and provides many interesting features. It has many similarities with I have in mind for a concurrent library, and even some research goals seems to be very close to mine. Specially the notion of affinity and locality is what I am focusing on in uThreads. I am going through the papers and the source code at the moment to see what are the similarities and differences.

uThreads is still a work in progress and I have specific plans for it in the future that might differ of what Qthreads is trying to accomplish. For now my focus is more on providing auto tuning of Clusters based on the workload. I also will try to explore the pros and cons of uThread migration based on Cluster placement (NUMA and cache locality), and from the 2008 paper it seems that it is what you are trying to study as well. I am open to collaboration if there is an ongoing study around this topic.

<comment><USER5> ooh, ok. you might also check out openshmem ([http://openshmem.org/site/](http://openshmem.org/site/)) and openucx ([http://www.openucx.org](http://www.openucx.org)). I'd been planning on integrating both in RaftLib just not enough cycles to get it done yet. These combined would make it much easier to maintain a relatively portable yet performant back end. My thesis research was all about locality, memory placement, and throughput for big data systems. Current work is similar but I'm not neck deep in the hardware dev world. There are current research efforts on my part outside of work, most center around the raftlib.io platform. Before I forget, you might also want to check out the graph partitioning frameworks like metis and scotch...both are used in some MPI frameworks for more optimal partitioning. To get topology data you might want to look at the hwloc framework, it's cross platform and provides input for things like NUMA/cache/PCIe topology for optimization. I haven't had a chance to integrate this hook into RaftLib, however it's just a few lines away once I find the time. If you're wondering...I started out writing my own fiber library for RaftLib. Had ports for both IBM Power and Intel, but it gets a bit tiring maintaining/optimizing for every new architecture. Qthreads and the like have been used in HPC circles for quite awhile, so it made sense. There was no way I was beating them for dev time, so might as well join them.

Based on your auto-tuning discussion...RaftLib aims to do something similar, but for big-data stream processing workloads. Here's my 2016 IJHPCA paper: [http://hpc.sagepub.com/content/early/2016/10/18/109434201667...](http://hpc.sagepub.com/content/early/2016/10/18/1094342016672542)

It looks like it's behind a paywall so if you don't have access I'll update my website with the "author archive" copy sometime today...will be at ( [http://jonathanbeard.io/media](http://jonathanbeard.io/media) ) once I update it. Bottom line if there's intersected interest, definitely open to collaboration :).

<comment><AUTHOR> Thanks, so much information to absorb, let me go through all this and get back to you. I shoot you an email when I processed all this :)

</comment></comment></comment></comment><comment><USER6> Is there any reason you chose GPL3 or would you consider a less restrictive license like Apache or BSD?

<comment><USER7> Is there a reason you'd choose Apache or BSD instead of a freedom preserving license like GPL3?

<comment><USER8> They probably want to use it, make money off it, and give nothing back to anyone. The same as most people who complain about it, IMO. Or, just as likely, they'll integrate it into their own BSD software, which will then be used by someone else to make money, and give nothing back, which might as well be the same thing. (Countdown until 1 person shows up and retorts "Well, _my_ company supports the OSS we use..." as if it's meaningful at all, vs the massive trend of corporations ripping off FOSS and returning nothing)

I don't GPL license a lot of my software (I used BSD/MIT/Apache most of the time, and my company revolves around and writes BSD-licensed code), but IMO, having seen this tired argument over and over again, I'm pretty sure 90% of all GPL complaints come down to this, even if the people don't come out and say it: "I can't make money off of your free work as easily, and that isn't fair to me. Please reconsider." Given this is Hacker News where half of everyone is in a rat-race to make money, I speculate this is a strong part of it.

People just like to wrap it in words like "restrictive" and "viral" to make themselves sound more palatable and reasonable.

And of course, there are also many reasonable alternatives to this library, many which are BSD or permissively licensed, which these people could also use instead -- but that won't stop them from complaining that GPL is unfair or "bad", of course, even though they could pick from a dozen alternatives...

<comment><USER9> It's harder for me to agree with a library being licensed under GPL than if it were an entire application being licensed under GPL.

If someone's licensing an entire application that's usable in its own right, like an SQL server or emulator or game or kernel, then it totally makes sense that anything you build around it should have its code be accessible.

But if it's some smaller part of your entire codebase, I feel it's a little less reasonable for people who aren't working on something that's already *GPL licensed. Especially when you have middlewares or other proprietary pieces of code linked with yours. That, plainly and simply, will prevent you from using the library. (Except if it's the LGPL, which I've never had problems with. I personally like it the most, and I'd use it if I really cared about people upstreaming their changes.)

I'm not going to say "this library is bad because it's GPL'd" but it does mean I would avoid baking it into a programming language runtime, for example.

And it really bothers me that you have such a low opinion of people who comment here, and of people who disagree with you. Maybe it's just an exaggeration for argument's sake, but I feel like there are plenty of reasonable arguments against use of the GPL.

</comment></comment></comment></comment><comment><USER10> For what kinds of applications would one favor this over, say, the coroutines approach of libdill?

[http://libdill.org/tutorial.html](http://libdill.org/tutorial.html)

See, in particular, Step 6 of the tutorial.

<comment><AUTHOR> In libdill approach, you are probably limited to only multiplex connections over multiple kernel threads. And when a connection is accepted over a kernel thread it has to perform all further instructions over that kernel thread. So it gives you a bit of control over which cores to be utilized but after that you do not have control over what part of the code should be executed on each core.

Using uThreads you can decide what part of the code should be executed over each kernel thread and, if taskset is used, which core to execute your code. You can do this by creating Clusters and using migration or uThread creating in runtime. Thus you can decide which thread is used to multiplex connections and which one is used to run CPU bound code in addition to having a thread pool for example to do the disk IO asynchronously. Ultimately, one can create a SEDA[1] like architecture using uTrheads. Also you can always use uThread as a single threaded application.

\</comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>

[1] [https://en.wikipedia.org/wiki/Staged_event- driven_architectu...](https://en.wikipedia.org/wiki/Staged_event- driven_architecture)

<comment><USER10> First time I've heard of SEDA, though I've been aware of the concerns/concepts it addresses, in various forms, for some time.

Any thoughts on Welsh's _Retrospective on SEDA_?

[http://matt-welsh.blogspot.com/2010/07/retrospective-on-seda...](http://matt- welsh.blogspot.com/2010/07/retrospective-on-seda.html)

<comment><AUTHOR> I have seen this before. Those are very good points, and I am trying to move this library towards supporting a SEDA type architecture with dynamic control and auto tuning runtime parameters.

</comment></comment></comment><comment><USER11> Interesting, I've recently been looking for a user level threading package in C/C++. I ended up settling on lthreads: [http://lthread.readthedocs.io/en/latest/intro.html](http://lthread.readthedocs.io/en/latest/intro.html)

Does anyone know how it compares?

<comment><AUTHOR> Hi, I developed uThreads. I looked at lthreads quickly, and it seems lthreads only maps multiple coroutines onto a single pthread (N:1). Although, it adds the possibility of running multiple pthreads, but each pthread can only run their local lthreads (using M threads that do N:1 mapping). However, in uThreads, uThreads can be multiplexed over multiple pthreads (thus M:N mapping). Also lthreads scheduler is based on epoll/kqueue per pthread, and uThreads is using run Queues to manage uThreads which has less overhead. Per pthread epoll/kqueue can mean better scalability for large number of threads in comparison with uThreads that is relying on a single poller thread. But since the poller thread and synchronization is very low overhead in uThreads, the scalability is not an issue (Experiments to up to 16 threads show that uThreads scale very well). Although lthreads provide compute boundaries and async IO to move lthreads over other pthreads, but this process seems to be very expensive. uThreads does not provide these features, but it provides more flexibility and control to the developer by providing migrations. Developers can use migration at any point to move the uThread to another set of kThreads to execute tasks asynchronously (By defining Clusters of kThreads, e.g., IO cluster or Compute Cluster).

<comment><USER12> I recommend trying to get access to larger machines with more hardware parallelism. I have seen techniques that scale just fine to using 16 threads, but hit serious limitations when you get to over 100 threads.

<comment><AUTHOR> You are right, I have access to machines with higher number of cores, but they have multiple sockets and at some point I need to address the cross NUMA cost which adds a whole new level of complexity and design decisions.

For sure at some point the poller thread will be saturated and the program will not scale past a certain number of threads. I used to have a poller thread per cluster for better scalability, but that would add overhead for migrations between clusters, thus I had to remove it for now until I can somehow find a low overhead solution. uThreads is a work in progress and all these need to be carefully considered in the future :) Thanks for your feedback

<comment><USER12> Sometimes, the techniques you use to scale to 100s of threads solve some NUMA issues by virtue of the fact that in order to scale that high, you need to avoid touching as much non-local data as possible. I think it's better to just deal with the pain now and start running your experiments on as large of a machine you can get access to. You can still put off explicitly designing for NUMA, but you want to avoid spending too much time and effort designing for the lower end of the scalability spectrum.

</comment></comment></comment></comment></comment><comment> purple-dragon I've had success with Intel's Threading Building Blocks. Is there a reason I might prefer something like this instead?

<comment><AUTHOR> Seems like a very mature library, I can't answer your question before I go through their documentation and code. Also, I find your question a bit abstract, since I am not aware of the details of the problem you are trying to solve, I cannot reason why any library or tool can be better over other libraries. In your case, TBB might fit your requirements and it might be hard to give a reason to switch to another library.

</comment></comment><comment><USER13> How does it compare to boost.fiber ([http://www.boost.org/doc/libs/1_62_0/libs/fiber/doc/html/ind...](http://www.boost.org/doc/libs/1_62_0/libs/fiber/doc/html/index.html))?

</comment><comment><USER14> Impressive.

8KiB stacks are a bit on the small side though for production usage. Go gets away with this because they're stacks act more like Vectors then flat arrays.

Why did you decided to roll your own stack swapping software instead of using say using `boost::context`?

<comment><AUTHOR> Right, however segmented stacks are have high overhead and stack copying is not very easy in C/C++. Thus, for now uThreads only support fixed size stacks, I know it makes it harder to be used in production, and in the future I might provide optional segmented stacks. As for why not using `boost::context`, I am implementing uThreads as part of my research in uwaterloo, I wanted to have full control over the code and be able to optimize for performance as much as I can. Thus, tried to avoid relying on any third party code when I started :)

</comment></comment><comment><USER15> Why not just use StateThreads? A comparison against other options would be illuminating.

<comment><AUTHOR> Good idea, I probably write a blog post on this later. If you take a look at [1], I explain the difference between N:1 and M:N mappings. StateThreads uses a N:1 mapping which means you can multiplex many fibers over a single thread and to take advantage of multi-processors you can have M processes that do N:1 mapping, which is a common practice (libmill, libdill, ...). But with uThreads you can multiplex many fibers over many kernel threads.

\</comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---

[1][https://github.com/samanbarghi/uThreads#what-are- uthreads](https://github.com/samanbarghi/uThreads#what-are-uthreads)

<comment><USER15> Sure, I get the M:N argument, but that wasn't something you could extend existing solutions to support?

<comment><AUTHOR> Do you have anything specific in mind? The only code I found similar to this is uC++ [1], which has way more features and more sophisticated scheduler. I am using this as part of my research and wanted to have sth very simple.

For all N:1 mappings, since there is only a single process, there is no need for synchronization, also there is no need for any scheduler as a simple queue suffice. But as soon as multiple threads are introduced, there is a need for orchestration among threads and it also changes all other aspects of the code. Of course, I could develop on top of an existing codebase, but I suspect I had to change so much that it is better to start from scratch anyway.

\</comment></comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>

[1][https://plg.uwaterloo.ca/usystem/uC++.html](https://plg.uwaterloo.ca/usystem/uC++.html)

<comment><USER15> > For all N:1 mappings, since there is only a single process, there is no need > for synchronization, also there is no need for any scheduler as a simple > queue suffice.

Wouldn't an M:N model simply amount to work stealing among N kernel-thread- local queues? This seems like it should be a pretty straightforward extension to one of the user-level C thread packages.

Or are you doing something more elaborate for your research?

<comment><AUTHOR> Well on the surface, yes! when I started I expected the same. For now there is no work stealing among kThreads. But let me dig into the problem a bit deeper so you get an idea why it might not be very straight forward (also it very much depends on the use case).

Usually these libraries either provide their own queue or rely on underlying event system e.g. epoll/kqueue to manage the state of the light weight threads. Also, the other main part is IO multiplexing, which can be done using select/poll/epoll/kqueue ...

Lets say if they are using some sort of queue, since there is no other thread in the system, thus no synchronization required and its as simple as pushing to the tail of queue and pulling from the head. Now, if I add more threads, now I have to think how I want to synchronize among threads. The straight forward way of doing this is using the same queue and multiplex among kernel threads and use Mutex and CV. However, Mutex has high overhead and is not very scalable (pthread_mutex does not scale well under contention in Linux). What about N-kernel-thread-local queues along with Mutex? Well, if you see the documentation this approach does better but has high overhead as well. What is next? remove the queue and add some sort of lock-free queue, either MPMC, MPSC, or SPSC. This requires some work to determine which one has lower overhead, in my case I have not tested SPSC, and for now settled with MPSC. So the queue part is totally gone, since they probably did not care about all this and used a simple queue.

Next, comes the IO multiplexing. Relying on an epoll instance per kernel- thread is absolutely fine specially for cases where uThreads stick to the same kernel thread, but as soon as I introduce the notion of migration then moving from on kernel-thread to another kenrel-thread means issuing at least two system calls (in case of epoll, deregister from current epoll instance and register to the new one). This has high overhead, so I need to provide some sort of common poller that do multiplexing over multiple kernel threads, but due to having more than one kernel thread, it means connections should be properly synchronized as more than one thread might try to access a connection. Also, it has to be done in a way with low overhead as migrations for my research require to have very low overhead. Thus, the IO multiplexing part should be replaced.

So the main parts are required to be changed, and I believe the effort required to make fundamental changes to an existing system might be more than the efforts required for writing it from scratch. Also for each part implemented, I did performance optimisations and build on top of that which helped to keep the performance at an acceptable level, it would be hard to do the same with an existing system as it requires to isolate various parts and optimise each part, which requires additional effort.

I hope it makes it more clear :)

<comment><USER15> I agree there are additional complexities with M:N. I was assuming a lock-free queue, since you'll need this for scalable work-stealing.

I was also assuming a single kernel thread performs I/O via epoll/kqueue/etc. and either has its own queue from which other threads steal, or simply pushes results onto a random queue when requested I/O are complete. This accomplishes the migration I believe you were describing.

When I/O needs to be done, you enqueue the uthread on the I/O queue and invoke a reserved file descriptor to notify the I/O thread, which then reshuffles its file descriptors and again calls epoll/kqueue.

I'm not sure whether this would scale as well as what you're doing since you mentioned an epoll-per-kernel thread, but I wouldn't be surprised if it got close since it's so I/O-bound.

<comment><AUTHOR> > I was also assuming a single kernel thread performs I/O via > epoll/kqueue/etc. and either has its own queue from which other threads > steal, or simply pushes results onto a random queue when requested I/O are > complete. This accomplishes the migration I believe you were describing.

> When I/O needs to be done, you enqueue the uthread on the I/O queue and > invoke a reserved file descriptor to notify the I/O thread, which then > reshuffles its file descriptors and again calls epoll/kqueue.

If I remember correctly, what you described is similar to how golang perform I/O polling since they are using work stealing, except there is no dedicated poller thread, and threads take turn to do the polling whenever they become idle.

Also, with epoll/kqueue there is no need to enqueue uThreads and you can simply store a pointer(a struct that has reader/writer pointers to uThreads) with the epoll event that you create and recover it later from the notification, this way you can set the pointer when need to do I/O.

I agree a single poller thread does not scale as well as per kthread epoll instance, and that requires some meditation to provide a low overhead solution that does not sacrifice performance over scalability.

</comment></comment></comment></comment></comment><comment><USER16> I did something similar in plain C:

[https://github.com/ademakov/MainMemory](https://github.com/ademakov/MainMemory)</comment>


China to Launch Three Artificial Moons Bright Enough to Replace Streetlights - <AUTHOR> https://www.news18.com/amp/news/world/china-to-launch-three-artificial-moons-bright-enough-to-replace-streetlights-by-2020-1913347.html <comment><USER2> if true, this the communist version of the Simpsons episode were the capitalist covers the sun

</comment><comment><AUTHOR> funny</comment>


Officials see Iran, not outrage over film, behind cyber attacks on US banks - <AUTHOR> http://openchannel.nbcnews.com/_news/2012/09/20/13990206-officials-see-iran-not-outrage-over-film-behind-cyber-attacks-on-us-banks

<comment><USER2> So.. the U.S. and Israeli governments physically destroyed parts of a uranium enrichment plant by custom-creating from scratch, the most sophisticated piece of malware the world has ever seen. Meanwhile, Iran responds by DoSing a couple of banks like a ten-year-old script kiddie. How cute.

</comment><comment><USER3> Given that the Pentagon now sees cyberattacks as "acts of war", I wonder what the public response will be.

<comment><USER4> So.. does that mean that we committed "acts of war" without any congressional approval when we unleashed Flame and Stuxnet on our "enemies?"

</comment></comment><comment><USER5> This is weird. There are a couple of reasons they would want to bully the United States: to dissuade us from supporting an Israeli attack on Iran, and to force us to ease up on our campaign of economic sanctions. Realistically, though, they _can't_ bully the U.S. They aren't capable of posing much of a threat, and they aren't popular with the American people or with the international community, so the U.S. is free to retaliate (proportionately or disproportionately) against serious aggression. Meanwhile, they have ample reason to play nice. They want to minimize international support for potential Israeli aggression, and they don't want to make it any easier for the U.S. to get other nations on board with the economic sanctions. Why would they want to 1) piss off the U.S. and 2) paint themselves as a rogue aggressor in the eyes of the international community?

</comment><comment><USER6> Considering that we very likely sabotaged their nuclear program, I can't really blame them for attacking our banks.

</comment><comment><USER7> "cyber aggression"

Wow.</comment>


Is this YC News' Birthday? - <AUTHOR>

I randomly decided to see how much karma PG had (it's a lot more than the top of the leaderboard), and noticed that he has been a user for 365 days.
Does that mean today is YC News' first birthday?
If so, happy birthday! It's been a good first year. <comment><USER2> Hmm, I suppose it is, in a way. The system has been up and running for 365 days. But 365 days ago reddit was in the middle of getting bought, and we didn't want to freak out Conde Nast. So the site wasn't launched till Feb 07.

<comment><USER3> Ah, the good old East vs West debate of birthdate. Does it occur at conception or birth?

</comment></comment><comment><USER4> So we celebrate today or in Feb 7?

<comment><AUTHOR> Yeah after I posted this I got to searching around and found the post that said the 6 month mark was August 20th... So I guess the go-public birthday is probably more like February 20th.

</comment></comment><comment><USER5> cough suckup cough</comment>


Basket for iPhone: The Definitive Dribbble Client - <AUTHOR> http://getbasketapp.com

<comment><AUTHOR> This is a simple little app I've been working for the last few months.

Some of the features include:

\- Two Viewing Modes: Grid and List.

\- Browse all of your feeds including popular, everyone and debuts

\- User login, so you can view your personal following feed and access your profile quickly

\- HTML Comments + Automatic Link Detection

\- Fullscreen Image Viewer

\- Sharing options

\- View user profiles

\- Animated GIF support

\- Designed for iOS 7

\- French, German, Spanish and Irish Localization

Would love for you to check it out!

I also open sourced the component I wrote for rendering HTML comments in the app: [https://github.com/mattdonnelly/MDHTMLLabel](https://github.com/mattdonnelly/MDHTMLLabel)</comment>


Ask HN: Any experimental Node.js Heroku users?  - <AUTHOR>

I sent my request to email@example.com two and half weeks ago but never heard from them back. No reply to followup inquiry. Anybody is using it? Any information to share? <comment><USER2> It took several weeks until I got mine. You have the correct contact address. There are no replies, but you are on their waiting list. They seem to send out invites in batches. I can say, it's worth the wait.

BTW. Existing users cannot invite new users.

</comment><comment><USER3> My invite didn't arrive until something like a month and a half.</comment>


A cycle-accurate implementation of notch's dcpu-16 in Go - <AUTHOR> https://github.com/kballard/dcpu16 <comment><USER2> So... how much memory does it eat?

</comment><comment><USER3> When did notch get his own cult?

<comment><USER4> Somewhere around the time he made $140,000,000 selling an indie game to gobs of people who love to create, then announced he was writing another game which included a CPU.</comment></comment>


Amazon is now aggressively going after Google's core business - <AUTHOR> http://qz.com/255223/amazon-and-google-are-now-going-after-each-others-core-businesses/ <comment><USER2> Bezos is finally overreaching.</comment>


Show HN: Web Scraping with just one click. (Algorithm-based) - <AUTHOR> https://listly.io/ <comment><USER2> Interesting. Congrats on shipping.

Here's what your homepage crawl looks like :) [https://listly.io/en/try/data?key=iJlJndur](https://listly.io/en/try/data?key=iJlJndur)

<comment><AUTHOR> Thanks. It works on any webpages. The result looks nice to export to Excel. :)</comment></comment>


Which Wordpress template do you suggest for a new technology blog? - <AUTHOR> <comment><USER2> I would publish on your own domain but you can start using one of the out of the box included WordPress themes.

Like others have said it's the content, not the presentation that can be improved over time.

If you're including code snippets it would make sense to take a look at using markdown . . . this article is a little dated but a good starting point: [https://css-tricks.com/posting-code-blocks-wordpress-site/](https://css- tricks.com/posting-code-blocks-wordpress-site/)

Also think about making it easy to double click to select all of the code or use another method to make it super easy to cut and paste the code.

</comment><comment><USER3> Have you considered using ghost blog? There are some free themes out there: [http://marketplace.ghost.org/themes/free/](http://marketplace.ghost.org/themes/free/)

Personally, I've migrated my blog from WordPress to Ghost and never looked back. Ghost is very lightweight when you compare it to WordPress and it's free. If you like simplicity you should try it out.

It has support for markdown syntax and all of your posts are stored inside single file (SQL-lite db).

</comment><comment><USER4> Relative to the creation of interesting quality content, the selection of template doesn't matter. Given the ease with which templates may be exchanged, decisions regarding templates may be revisited later for little cost.

Good luck.

<comment><USER5> Great answer. Focus on creating great quality first.

I would even suggest to publish on medium.com as the quality matters more than the template or you self hosting the site.

</comment></comment><comment><USER6> As previous commenters has mentioned focus on content.

If you will run the blog in parallell with e.g. a product/service and need a consistent look and feel I would look at the _s stater theme [0]. You get most of the "nuts and bolts" and you can quickly style it to match your overall design.

[0] [http://underscores.me/](http://underscores.me/)</comment>


Raspberry Cloud – Dropbox for the Raspberry Pi - <AUTHOR> https://github.com/JaredMHall/RaspberryCloud

<comment><USER2> Not sure why this project is keen on calling itself Raspberry PI. There is nothing that makes this specific for the Raspberry, it's just a cursus based interface to Dropbox.

<comment><AUTHOR> It's called Raspberry Cloud actually.

At the time there were no fully-featured Dropbox ports for the Raspberry Pi.

So seeing as how the main motivation was to make a Dropbox port for the Raspberry Pi community, I figured I'd put Raspberry in the name.

</comment></comment><comment><USER3> I was expecting something like OwnCloud, a true dropbox clone, which is fairly easy to install on a Pi...

[http://projpi.com/diy-home-projects-with-a-raspberry- pi/pi-o...](http://projpi.com/diy-home-projects-with-a-raspberry-pi/pi- owncloud-drop-box-clone/)

<comment><AUTHOR> Raspberry Cloud uses the Dropbox API, it isn't a clone. So you have the advantage of accessing your actual Dropbox folder. Plus it is fully featured media links, downloadable .zips and all.

It is easy to install as well :D</comment></comment>


I almost sold Baremetrics for $5M - <AUTHOR> https://baremetrics.com/blog/i-almost-sold-baremetrics-for-5m?ck_subscriber_id=1673362 <comment><USER2> Sounds like there needs to be a way for the buyer to put some skin in the game. Maybe asking for a $50k non-refundable deposit to kick things off.

Sounds harsh? Well non-refundable deposits are a thing in real estate. For example in my country it is common to put 0.25% down to take the property off the market, non refundable, allowing you to do due diligence and then 19.75% deposit within 5 days non-refundable, with a closing period of say 30 days to pony up the other 80%, usually from finance. Probably the 19.75% is lost if finance doesn't come through but IANAL not sure if that holds up court or not or if you can get it back in some circumstances. But people understand it's serious you might lose it.

If you don't really need to sell but wouldn't mind $5m this would be a good way to weed out non-serious people. If everyone says NO then that's OK you keep on running the business as before. If anyone says yes then you know they are serious. They might not buy, but you get $50k compensation, which might be less than your costs, but the point is the $50k is like a way of communicating information 'we are serious' than an actual payment.

Asking for $50k from someone who invests $5m is like asking $50 deposit for someone who wants to book a luxury hotel room for a week. Maybe I should have said $100k (!)

<comment><USER3> ~$8m price. Asked for $25,000 break fee to cover our costs. Was balked at. Have no reason to believe they were not serious buyers as they bought another company or two.

<comment><USER4> I'm based in Europe but together with a partner I'm a buyer of small tech businesses. We have bought businesses so are credible and are always interested in buying more. We could pay $8m if an interesting business came along.

The issue is that a lot of smaller deals fall through, either because of unrealistic final price expectations by the seller or because some metric that is super important to the business was calculated and supplied in the wrong way (i.e. churn). Or there are issues in structuring the contract because the seller (or his legal advisor) "overengineers" the contract -- lawyers can and sometimes do end up killing deals.

As a buyer, if I pay you a $25k fee, you now have leverage over me. Because if the deal doesn't happen I'm out $25k. If I don't pay you anything you're incentivized to get the deal done and try and draft a balanced sale/purchase agreement that works for seller and buyer. That means both parties making concessions on terms. In my mind, that is healthy, because if we finalise the deal you're getting a bag of money.

Let's say there is a clause we just can't find each other on. No worries, we can jointly decide to walk away. If I paid you and you're not willing to budge, then I'm out $25k if I walk away. It doesn't keep the discussion balanced.

Add to that that some people might (in the end) be unsure whether they even want to sell or not, and you end up in a situation where it's all mostly uncertainty (for both parties) until the deal closes.

<comment><USER5> >Let's say there is a clause we just can't find each other on. No worries, we can jointly decide to walk away. If I paid you and you're not willing to budge, then I'm out $25k if I walk away. It doesn't keep the discussion balanced.

 _Balanced_? Utter nonsense and I suspect you know it. You know that proceeding past an LOI involves the seller accruing costs, sinking massive amounts of time on activities other than working on their business, and, more often than not, becoming emotionally invested in 'doing the deal'. Buyers buy businesses a lot more frequently than sellers sell businesses, and that makes the transaction a "home game" for the buyer, giving buyers an advantage.

Not providing any earnest money minimizes buyer risk, allows buyers an opportunity for a cheap education on the ins and outs of a successful business, and invites other tactics to tilt negotiations away from the seller - all the reasons selling a business becomes one of the most painful experiences of an entrepreneur's professional life.

If you're not prepared to provide any earnest money, you probably haven't done enough work to decide whether you're really entering into an LOI. Hopefully, the sellers negotiating with buyers like you figure that out and push back.

</comment></comment></comment></comment><comment><USER6> This is very painful to hear. I've tried selling my main company to 4 different buyers now... every single time we get past the LOI phase, they see all our financials in plain sight, and there's always some stupid hangup/ghosting/sketchiness exactly like in this article.

Very disappointing, considering how transparent we are up front sending every financial, and there's no real 'discoveries' later that would change their mind. It's just general terrible flakiness.

One guy's excuse was that his brother had put all his money into collateral without his knowledge, and that discovery phase was a waste of 5 months.

This last one, we thought we learned our lesson so we demanded proof of funds, as well as much more thorough checks....... and they just magically ghosted us LITERALLY after I FedExed the signed agreement... so after months and months of due diligience. They change their mind after about 100 confirmations from their lawyers, accountants, financers... and just ghost hours after I send it.

It has been greatly discouraging to me, as the 3 serious attempts to sell have essentially crushed our momentum, and now the company is dying/dead. I won't say that its a direct result of it, but we ran it very conservatively during these times as not to upset anything, and those were the times we needed to be running more aggressively to keep up with competition.

The company is essentially insolvent now, with a large amount of debt. I also made the bad mistake (I was quite young) to originally put the company card on an Amex applied for by me (I had 820 credit at the time). Because of inability to pay back debt on this company, my personal credit is now destroyed.

So.. going from 820 credit, making hundreds of thousands profit per month... to freelancing to pay bills with a 590 credit. Such is the life of an entrepreneur and the brutal lessons one learns along the way.

PS... I found out later our accountant had dementia, and did all our taxes wrong. My biggest advice, have an accountant who is really on point, and accept absolutely nothing less. Don't fall for the illusion of the pain of having to "retrain" someone if you don't think your accountant is 100%. Just find someone who is fucking good, and if they show a red flag, find someone you fully trust. My business partner has also been ruined in the past by incompetent accountants.

<comment><USER7> Require 10% of the deal in escrow after the first 2 weeks in the discovery phase. If the deal doesn't go through, the amount in escrow defaults to you. If they jerk you around on the escrow, cut them loose, they're not actually interested in acquisition

<comment><USER8> Great point. This is what happens in a real estate. A letter of intent should have earnest money deposited into an escrow (because the offer is being made in "earnest") and each contingency should have an expiration date. Upon expiration of the due diligence contingency, for example, the earnest money deposit becomes non-refundable and credited towards the purchase price. If the buyer defaults after the due diligence contingency then the earnest money goes to the seller.

Does anyone have a link to a sample LOI for selling startups or M&A in general?

<comment><USER9> bump. also looking for this.

</comment></comment></comment></comment><comment><USER10> "In many ways, I feel like my job as CEO and Founder is to absorb all of the insane parts of running a business so my team can focus on building, learning and enjoying their jobs."

This is spot on. I would extend to senior leadership in general.

<comment><USER11> One way I've heard the role of product manager described as is a "shit umbrella".

<comment><USER12> This is applied to managers in general:

\- Good managers are shit umbrellas

\- Bad managers are shit funnels

<comment><USER13> beautiful metaphor. anyway, I quasi-agree, though I've become suspicious of managers who claims to be an umbrella protecting their team from the rain. Half the time, they're really just trying to make sure their team doesn't see the forecast and quit.

<comment><USER14> I guess umbrellas also keep the sun out.

What you need are those clear plastic umbrellas, no rain, but all the sun.

Transparency.

<comment> o-__-o Raining shit would be opaque, tho

</comment></comment></comment></comment></comment></comment><comment><USER15> Two quick thoughts on this.

1) The amount of transparency that this company shows is insane. I have a hard time imagining any one else in this situation sharing the way they do. I hope it works out for them long term.

2) The due diligence work they did for this deal was absolutely not a waste (even if they never sell the company). Having gone through this process once will make it orders of magnitude easier if they sell in the future (especially gathering and organizing documents from the very early stages). Even if they don't sell, the process would have shown light on potential liabilities and issues they hadn't even been thinking about. This is helpful regardless of who owns the company. Maybe not worth the time and money; but definitely not a waste.

<comment><USER16> It wouldn't feel great seeing this as an employee of the company. The only reason you are not sold to the highest bidder was because the ceo got played.

<comment><USER17> I fucking wish some of the companies I've been at sold to the highest bidder when they had the chance.

Exits are better than layoffs.

<comment><USER18> There is always a non insignificant chance that exits will be followed by layoffs

<comment><USER17> True, but layoff + severance < layoff + severance + liquidity event

<comment><USER19> How about cases where due to liquidity preferences, no one but founders get money at the liquidity event? A small exit is often 0 for employees.

<comment><USER17> then you worked at a bad company with a bad outlook and should have been prepping to leave anyway?

</comment></comment></comment></comment></comment></comment></comment><comment><USER20> It's not uncommon for potential acquirers to feign interest in a purchase so they can derail your business for months while your competition (their actual investments) pull ahead.

<comment><USER21> If not derail then just to get a ton of valuable business insight that isn't available publicly. A while ago a large software company dragged us through this process for months, and eventually backed out at the last minute. A short while later they had a complete clone of our service ready for launch.

<comment><USER22> Have you tried to getting a patent? Does this help in any way?

<comment><USER23> A patent is only worth what you're willing to pay in legal fees to defend it.

A patent in and of itself doesn't prevent that from happening.

</comment></comment></comment></comment><comment><USER24> There's got to be a business in here somewhere. A company that acts as a middleman that sorts through all your financials for you, does all the communicating, drafts all legal paperwork and just gives you quick regular updates through the process. That way you can keep running your company during all of this madness.

I wish I knew more about selling and acquiring companies since it seems like a business well worth launching if it's feasible, which I don't even know if it is.

<comment><USER25> It can't really work that way. There are diligence firms that provide quality of earnings analysis, compliance analysis, intellectual property audits, etc. But potential buyers always have questions that require input from staff.

The executive team has to be very involved in the process. Their involvement naturally drags management/staff into it.

</comment></comment><comment><USER26> A friend of mine who sold his company told me that it's common to get approached and if the buyer is serious things move very fast. Most of the time though it's just a game of delay to keep competition in control and get more insights. So, if buyer is interested they will make an offer quickly (initially maybe too low), but they show they are serious by doing so. Dont get dragged in meetings or fly around to meet buyers like crazy. Better to focus on growing the business.

<comment><USER27> What software/service do you use for your data room?

</comment></comment><comment><USER28> I didn't fully appreciate the value of our data room until it mattered. Since the last deal, we've kept our data room impeccable and exceptionally granular. We're also way more sensitive about the timing of what we share and what we black-box for as long as possible. There's a strategy for managing your data room in situations like this, so I encourage talking with mentors/advisors if it's your first time.

This is also true for general communication to the team about offers like this. It's way too distracting and too high of a risk to morale if the deal falls apart.

<comment><USER29> Can you go into more detail on your data room? Thanks.

</comment></comment><comment><USER30> Anyone have an idea on why 3.7x revenue for SaaS was considered a fair valuation? I thought SaaS was always closer to 5-6x

<comment><USER31> BareMetrics MRR is public, check it out:

[https://demo.baremetrics.com/#start_date=2019-01-01&end_date...](https://demo.baremetrics.com/#start_date=2019-01-01&end_date=2019-12-31)

20% growth last year or 1.7% per month. That's considered slow for a SaaS. That's likely what's driving the 3.7x multiple.

<comment><USER30> Fair and thank you for that. Wouldn't their value to Stripe be much more than 3.75x in this case?

<comment><USER32> Basically, there are 3 types of buyers: value PE, growth PE and strategic. Value pays 3-4x, growth 4-7x, strategics ¯\\_(ツ)_/¯ Stripe would be a strategic for Baremetrics.

<comment><USER33> Hmm ... Where did you get these multiples from? Based on what I've seen in many sources (here's one that I have at hand, by McKinsey: [https://www.mckinsey.com/business-functions/strategy-and- cor...](https://www.mckinsey.com/business-functions/strategy-and-corporate- finance/our-insights/multiples-analysis-industry-labels-dont-matter- performance-does)), high-growth tech/IT startups are valued (and, I assume, could be acquired) at > 15x, sometimes even > 20x.

<comment><USER34> For public companies, growing > 40%, ARR > $100Mn, NDR>125$ revenue multiples are sky-high ATM.

For private companies at around $1Mn-$3Mn ARR growing sub-20% YoY there are very few buyers in the first place.

<comment><USER33> I was definitely talking about the first category (though not necessarily public only; AFAIK there are some [many?] private companies that fit that profile). I agree that those revenue multiples are high, though I'm not sure I would refer to them as "sky-high". Who knows what kind of numbers we will see in the future ... ;-)

</comment></comment></comment></comment></comment></comment></comment><comment><USER35> Due diligence works both ways and it pays to do your homework on potential buyers and to ask them to prove their claims, or even ask them to put some money down, before proceeding.

I don't know the company or what they do but cynical me can also imagine a third party pretending to want to acquire in order to gain inside knowledge.

<comment><USER36> >or even ask them to put some money down, before proceeding.

Yep. Just look at mature markets like housing. You don't see anyone wasting time without a deposit, which will be kept if the buyer doesn't go through with the closing.

Won't put down a earnest money deposit? They aren't serious. For all you know the do this knowing they won't pull the trigger, but to justify their job/identifying an opportunity, then being the hero when they "find something off" and save the company from a bad deal (which they manufactured in the first place)

</comment></comment><comment><USER37> So hard! And this is a reality even you're not trying to sell but are doing as part of your regular corp responsibility! I've been on the founder side in convs like this, both real+fake, so some advice I got here that has resonated the most:

1\. Assume 95+% of inbounds won't go through, even if 'serious'

2\. Use every ask from the acquirer to get a parallel give: if they're serious, they'll increasingly show they're not the 95% here

3\. Almost all teams are not emotionally equipped to understand the 95% no- deal thing, unless you're say a VP-only company (???). As soon as they hear potential acquirer, it's natural to think "maybe 30% chance for one, so 100% across 3-4 inbounds", not "maybe 5% for just one if we qualify it more." It's hard to do anything if you're worrying about your kid's college tuition for 6mo wrt to a fragile deal's ups and downs that you have little control over.

A common path here is to understand indiv employee personal goals, and only bring in the acquirer in front of them, such as for interviews or whatever, only once you've gotten a deal to the 99% point (one of the biggest asks). Baremetrics is going for more transparency afaict, so having someone to help contextualize for both its ~first-time ceo + employees would seem required to avoid morale going through the ringer.

4\. Don't optimize for building to exit, but do treat as part of general BD. (Though I feel most YC etc. co's don't do this, and the wave of quick-flip startup people is poisoning the well for follow-on founders more serious about high-trust areas like enterprise.)

==> 4b. This kind of distinction can be all sorts of confusing for team members too, who aren't thinking about BD+Prod+... etc. strategy all day but how to make an X do a Y. They can make bad high-level decisions if it takes center stage.

==> 4c. More likely outcome is becoming colleagues with folks for future accounts/partnerships/etc., and even hires. So do that!

</comment><comment><USER38> Want to sell your startup: don't be desperate; people smell that--and it stinks.

Attract buyers (put out press releases about how well you're doing--hire a PR firm), and then Say No. Tell them are too busy to prepare financials, and your lawyers refuse to waste their time. Just say no But Be NICE About it.

This works like a motherfucker because (A) People Really Want What They Can't Have... and (B) They Already Really, Really Want It Because Of The Press Releases. (C) Hire a Real Negotiator--and a person who is dispassionate about the business. Pay them a percentage of the gross profits; of course you tell them a bottom line number which is the lowest offer you'd accept.

Put the sale money in escrow and you each pay 50% of the due diligence cost After the money is in the bank.

</comment><comment><USER39> Jay Jamison (when he was a VC) gave me a great advice once.

"Companies are bought not sold"

<comment><USER40> This is a hoary old chestnut; my dad told me this back in the 1990s.

<comment><USER41> > This is a hoary old chestnut

As is the phrase "hoary old chestnut"

</comment></comment></comment><comment><USER42> 5mm is just too low for a web based SaaS business. You've already done the hard work of getting some PMF validation. Why not double down and try to scale the business? Going from 5mm to 15mm is way easier than 0mm to 5mm.

<comment><USER43> That's the route we're going down now! As I mentioned in the article:

> For me, this came at a time where, personally, life was…draining. Outside of > work I wasn't in a great place mentally. I was dealing with some family > issues that were consuming every ounce of my mental energy. I was depressed, > anxious and the most stressed I've ever been and the prospect of being able > to sell the company and give myself and my brain a break was very appealing.

</comment></comment><comment><USER44> Hearing many horror stories over backing out at last minute, I wonder why breakup fees and escrow are not more popular in startup world.

E.g. if you would like to acquire for $5mln you need to deposit $100k. If you walk out, this is a breakup fee. If startup bails it also have to pay same amount to the acquire.

<comment><USER45> Part of any acquisition is getting a look at your books.

Now the buyer knows exactly how much runway you have left and all they have to do is drag their feet until you get desperate to make a deal.

Either you have to be cashflow positive, or keep at least two buyers on the hook past whatever disclosure phase nets them this sort of information. I think maybe one company I ever worked for was clever and healthy enough to do this. And even on that one, things went a bit touch and go. One of the worst kludges we ever did, it came out later, was worth a month of payroll, which got us through that acquisition without bouncing checks.

(Still the longest single method body I've seen a human create, and from someone I thought would never write code like that.)

<comment><USER46> Wow I'm struggling to imagine how a too-long method could keep the wolf from the door for a month. More details please, if you can.

<comment><USER45> Horrible messy business logic to fulfill a short term contract. It's been a long time, but if memory serves it was used for data ingestion. The file was 6000 lines, the worst method was over a third of that, closer to half.

It never really worked, as some of us predicted while the project was being ramped up. Without going into too much detail (most of which has gone from my head anyway), the speed of light won and we used a different architecture which obsoleted most of that code.

However, if I and the other people who said it couldn't be done had gotten our way, that sale would have gone much worse for us. Decisions from incomplete data and all that jazz. It went live and the customer and we cashed the check with less than two months of operating capital left, while the lawyers were still futzing around with term sheets.

The irony is this was also the owner who thought he was rallying the troops and instead filled us with existential dread every time he tried to give us a speech. Why I wasn't aware we were scraping bottom of the barrel until six months later, I'll never know.

</comment></comment></comment></comment><comment><USER47> Same thing happen to me. Only it was 2 mil instead of 5 and I did not really have to do any due diligence as I was selling my product, not my company. So other then spending some time and paying couple of grand to have lawyer go over the agreements I did not suffer much.

But boy, was I disappointed ;(

<comment><USER48> You lost a few grand?

<comment><USER49> More like missing out on 2 mil

<comment><USER50> Spending $5 on a losing lottery ticket isn't missing out on $100 million.

<comment><USER49> I know what you mean, but we're talking about someone's perception, not the mathematical way to see things.

Also, winning the lottery and almost selling your business don't have nearly the same probability.

</comment></comment></comment></comment></comment><comment><USER51> Is there any forum or group that has people that can advise on such matters?

I know HN is one but it's too big/too impersonal for this.

I mean a place for founders to find "mentors" (i.e. people with more experience or people that have done similar things before) that would be willing to help them with things as a sale to a big company or how to structure a deal.

<comment><USER52> I'm in a program in NYC called [https://www.venwise.com/](https://www.venwise.com/), it's a moderated CxO peer group that meets for a long session every month and does exactly this.

<comment><USER51> Thanks.

Anything in London?

</comment></comment></comment><comment><USER53> I wish people would name names. That would discourage this type of behavior.

</comment><comment><USER54> Sadly it's very common to hear from many reasonably serious potential acquirers before something is consummated. 10 is not unusual I think. It's best to always focus on your business and growing it, assume the acquisition isn't going to close and not getting distracted by it. Avoid any legal or other costs until it's basically negotiated/closed and they're putting some non-refundable closing money down.

</comment><comment><USER55> Can breakup fees be negotiated in these kinds of deals to protect the would-be acquired company? Seems like the company to be acquired bears all the risk.

<comment><USER56> You can negotiate anything you want, and I'm not joking or being sarcastic about it.

A lot of people in this thread will say: well, it's unusual or non-standard to do x y z. Good. Most of the interest a company receives re acquisition is going to be pure bullshit at best and malevolent at worst. Ideally you cause the majority of both types to turn tail and run away immediately. If you're not careful you'll waste an enormous amount of valuable time dealing with bogus acquisition (and partnership) interest. Big companies waste a lot of time and money screwing around with: let's make a deal; they can afford it.

The break-up fee should not be layered under 27 conditionals. As someone pointed out, the acquiring company will bury you under a mountain of difficult to fight legal justifications to get out of the break-up fee if they can. And they're almost always going to be far stronger financially than you are.

A fee is going into the company bank account no matter what, without conditions, if you want to get serious about an acquisition. You're going to pay us for our time - risk, legal costs, etc. - if you're serious. The mental approach is simple: don't like the arrangement? Fuck off right now so I can get back to running my business. That's not standard? Too bad. It's your business, you can do anything you want to in that respect. Don't let people tell you that you can't do it, you certainly can. If a company is very serious about buying you, they won't run away if you put this on the table up front, they'll be willing to discuss it at least.

<comment><USER55> Thanks for the reply, I agree with you. Parenthetically, I know you can negotiate anything you want. I went to law school (though never practiced) and I find one of the common misconceptions is that contracts are these highly fomulaic documents with no room for creativity. The reality is, as you say, that you can put whatever you want in there. Contract law is mostly about enforcing the freely-negotiated agreements between parties. I wrote a lot of contracts that were highly specific to the scenarios in question and there was a ton of creativity - only trick was to use very precise language (verbose bordering on annoying).

My question was more whether this is something that is done in such contexts, namely smallish acquisitions. I think you're right that Baremetrics made a mistake here in not insisting on some of the things you mentioned.

</comment></comment></comment><comment><USER57> One of the best parts of Baremetrics is that it's an "Open Startup". I can't help but think that the acquisition is clearly not open if he didn't talk about it during the acquisition and doesn't name names here.

I think he's right not to dox the company, but perhaps in the future having an "open acquisition process" could have avoided some of the headache.

<comment><USER43> I threw around the idea but the reality was I wasn't in a strong position to try to negotiate that with a potential buyer.

Acquisitions are incredibly closed-door and so finding a buyer who was willing to be open about the process would have been nearly impossible.

</comment></comment><comment><USER58> Rule number one: Nothing is real till the money hits the bank account. The rest is all foreplay.

</comment><comment><USER59> This has been posted half a dozen times, but now gets 250+ up-votes and 150+ comments?

</comment><comment><USER60> > You see, it turns out they'd misrepresented their funding situation at the > beginning.

it's so aggravating when my business partners can't see these posers from a mile away.

</comment><comment><USER61> congrats

</comment><comment><USER62> I can't even visit OP as my pi.hole blocks it :)

Let me guess: another spam^H^Hads analytics^H^H^Hspy business there under the pretext of 'better user satisfaction'.

<comment><USER52> No, Baremetrics is a Stripe-et-al analytics service.</comment></comment>


Stroustrup on The C++0x "Remove Concepts" Decision - <AUTHOR> http://www.ddj.com/architect/218600111

<comment><USER2> Woa .. this will sure upset Mr. Stepanov. The lack of the support for concepts was one of his main concerns about the C++ even back in 1995. I'm sure his feelings didn't improve dramatically since then.

      What is an iterator? Not a class. Not a type. It is a
      concept. (Or, if we want to be more formal, it is what
      Bourbaki calls a structure type, what logicians call a
      theory, or what type theory people call a sort.) It is
      something which doesn't have a linguistic incarnation
      in C++. But it could.

<http://www.sgi.com/tech/stl/drdobbs-interview.html>

</comment><comment><USER3> I don't expect this to make C++0x any less of a train wreck--it would take an act of God to do that at this point--but it's interesting to note that most standards committees see their role as codification of existing practice, whereas C++0x and the previous standard before it have had a marked tendency toward invention.

<comment><USER4> Do you really consider it a train wreck? There seem to be some useful new features.

The tragedy, in my opinion, is that we don't have more to show from a decade's work by so many brilliant people. C++ is straitjacketed by ISO standardization.

<comment><USER2> Design by committee is a tricky business, especially if Bijarne says they are always aiming for the consensus and not a simple majority vote.

Even not considering C++, this approach is more likely to result in the acceptance of a feature that everyone feels equally "meh" about rather than something that "only" 80% really likes, but 20% opposes.

<comment><USER5> Just a fun fact: Haskell was designed by a committee. Just saying that it's not all bad :)

</comment></comment></comment></comment><comment><USER6> It's okay for them to be a little conservative. As we've seen with the likes of GNU extensions and Boost, it is certainly _possible_ to move forward without perfect standardization.

But part of me also wants to put C++ on life support, and simply devote all time to the improvement of D (akin to temporarily moving Python 2.x forward until Python 3 is more mature).

<comment><USER7> Commercially, C++ is already on life support: it's no longer a general applications language but rather a niche language. Microsoft supports it in Visual Studio for the game industry and Intel supports it for the same as well as the HPC market. For all the rhetoric over C++ (it will either save or destroy C++ depending on who you talk to) its unlikely to make a big difference either way.

I think D is pretty cool, but it has a lot farther to go with regards to standardization as well as implementation. There is a current reddit thread going over its shortcomings:

[http://www.reddit.com/r/programming/comments/93jh5/ask_progg...](http://www.reddit.com/r/programming/comments/93jh5/ask_proggit_the_d_programming_language_looks/)

Whether it wants to be or not, D is now in the same niche as C++, but without either the maturity or commercial support that a niche language needs to thrive. And that probably won't change now that the larger software world has moved on.

<comment><USER5> Qt and hundreds of KDE apps built on it are hardly niche. What about VLC? Gecko? WebKit? LLVM? All niche projects?

I don't know about the commercial application space, but in FOSS C++ is alive and well. And it isn't going anywhere for a long, long time.

For a new project, C++ is a much better choice than C, even if you don't use all features of the language. The compilers are faster and better than ever, and the libraries are great.

<UNRELATED> I, for one, have _never_ seen a decent quality desktop application written in Java. C# has better apps because C# programmers seem to prefer using Windows.Forms on Windows and GTK# on Linux. But _nothing_ beats the speed and responsiveness of an application running on the bare metal. </UNRELATED>

<comment><USER8> _I, for one, have never seen a decent quality desktop application written in Java._

I hear eclipse is pretty decent.

<comment><USER5> I was kind of talking from the users' perspective.

</comment></comment></comment></comment></comment><comment><USER4> I really like C++. I use python, I use ruby, but I don't enjoy either of them as much as C++. They feel "dumbed-down." And the speed has been nice many times.

I feel that one of the things really holding C++ back is its development model. The benevolent dictator open source approach seems to have proven itself compared to C++'s problematic ISO-standard process. For one thing, mistakes are locked in stone. Non-standardized languages handle mistakes through versioning, which tends to be a much better bargain for all involved.

At the same time, the ISO-standardization means that C++ has some much more computer-science orientated modules than you tend to see in other languages. The amount of thought and optimization that goes into everything is mind- boggling.

<comment><USER9> Given how enormously complicated C++98 is, let alone C++0x, I think the last thing C++ needs is to jettison the standardization process in pursuit of faster evolution. The evolution of C++ should be conservative: both because it is widely deployed on many different platforms and compilers for doing "serious" work, and because it already has far, far too much junk in it already.</comment></comment>


Cocktail Similarity - <AUTHOR> https://beta.observablehq.com/@tmcw/cocktail-similarity <comment><USER2> > A Manhattan is a Martini but you replace dry vermouth with bitters, replace > gin with sweet vermouth, and add whiskey.

No, it's not.

What's missing is a sense of "role". Spirits should map to spirits, liqueurs to liqueurs etc.

There's usually only a few "slots" with cocktails: one (or sometimes a few) base spirits, something aromatic such as bitters or a vermouth, a sweet thing and/or a citrus.

(I once made a spreadsheet that I dubbed "the period table of cocktails - turns out the gaps usually lead you to an obscure variation you'd never heard of)

<comment><USER3> It's also missing a sense of quantity. Imagine starting a Manhattan with an ounce of bitters and two ounces of sweet vermouth.

Or the Negroni:

> A Negroni is a Manhattan but you replace bitters with campari and replace > whiskey with gin.

So a Negroni should have a couple of dashes of Campari.

<comment><USER4> > Or the Negroni

Personally I think the classic Negroni is interesting because if you play with the ingredients (and/or ratios) in the right way you get a lot of interesting variations:

      - An Americano is a Negroni without the gin
      - A Boulevardier is a Negroni with the gin swapped for bourbon
      - A Black Negroni is a Negroni with the Campari swapped for an amaro (e.g. Averna)
      - A Negronino is a Negroni with part of the Campari swapped for Amaro Nonino
      - A Quill is a Negroni with the addition of 1/2 oz absinthe

(There's boundless others, these are just some of my favorites.)

<comment><USER5> I prefer ditching the Campari entirely and using Aperol.

<comment><USER3> Gin, Aperol, and Lillet Blanc combined like in a Negroni make a beautiful drink.

</comment></comment></comment></comment></comment><comment><USER6> Death & Co's second book, "Cocktail Codex" [0], has a somewhat similar approach. The thrust of the book is that there are six root cocktails, and everything else is just a variation on them.

That book, and Death & Co's first book, "Modern Classic Cocktails" [1], are good reads for the person who is a fan of quality cocktails and wants to make something at home that's really good, and frequently better than what you get when you're dining out.

You will likely need to invest in some booze and stuff to be able to fully enjoy them, but just pick a drink a week, buy what you need, and pretty soon you'll have a collection that will allow you to make most of the things in the books.

[0] [https://www.amazon.com/Cocktail-Codex-Fundamentals- Formulas-...](https://www.amazon.com/Cocktail-Codex-Fundamentals-Formulas- Evolutions/dp/160774970X)

[1] [https://www.amazon.com/Death-Co-Modern-Classic- Cocktails/dp/...](https://www.amazon.com/Death-Co-Modern-Classic- Cocktails/dp/1607745259/)

<comment><USER7> I love Death & Co's first book. I highly recommend it to anyone who likes having a cocktail after work or making them for parties this book will make you plenty of friends. Or basically anyone who likes digging into everything in a connoisseur/nerdy type of way.

Once you learn the foundational stuff of making cocktails (with a small investment in some gear and plenty on a variety of booze) it's surprisingly easy to make really good drinks. What I found interesting is how you intuitively starting learning some fundamental bases which you learn, where it becomes easy to make up your own drinks when you don't have access to the book's ingredient lists or you're at the liquor store without one in mind.

It's not just an endless list of popular cocktails recipes but structures it around bases which you build on. And it made me a big fan of gin (they almost entirely skip vodka, besides a few recipes, which I found interesting).

Learning how to make cocktails is underrated skillset IMO. At least compared to people knowing scotch or understanding good wines.

<comment><USER8> The first book is amazing for gin recipes. It also gave me a much greater appreciation for how different types of gin work in different cocktails. Their follow-up book, Cocktail Codex, includes a lot more recipes for drinks with vodka.

</comment></comment></comment><comment><USER9> So I got:

"A Manhattan is a Martini but you replace dry vermouth with bitters, replace gin with sweet vermouth, and add whiskey."

This is the wrong way to think about it. The rye (aka "whiskey") in a Manhattan is conceptually and functionally equivalent to the gin in the martini.

The graph doesn't seem to understand the concept of base liquor, which makes it a really cool exercise, but not functional.

Still, I love the idea.

</comment><comment><USER10> "A Manhattan is a Screwdriver but you replace orange juice with bitters, replace vodka with sweet vermouth, and add whiskey."

Can't wait to explain this one to my bartender tonight!

<comment><USER11> Yeah, I think Manhattan/Martini is a closer comparison than Manhattan/Old Fashioned or Manhattan/Screwdriver...

<comment><USER12> You're right.

The Manhattan & Martini both derive lineage from the Old Fashioned. The Old Fashioned was so named in the late 19th century as it was trying to recreate the original cocktail, as in "Don't give me one of those drinks with all the stuff in it, give me an old fashioned cocktail".

The Martini derives from the Martinez which is a much sweeter drink. Heavy on sweet vermouth and using a heavier & sweeter style of gin. It should be clear at that point that the Martinez and Manhattan aren't super far apart.

</comment></comment></comment><comment><USER13> I use Levenshtein matching for a small business. We take in orders, and some of them end up being ordered from a partner that ships them out. They often change the shipping address in small ways, and don't provide a nice api for us to match orders to tracking numbers. Instead, we just get an email from Fedex or UPS.

So, we trawl IMAP to extract the addresses and find close matches for open orders with Levenshtein. Not perfect, especially when one customer places more than one order, but saves us a lot of time.

<comment><USER14> For addresses, I believe USPS provides a free address standardization API as long as you are using it for shipping purposes.

<comment><USER13> This is a bit different. It's matching what you have versus what a 3rd party has. You have no control over the third party.

We do use SmartyStreets to normalize the address before submitting, but the 3rd party uses something else. Also, address correction is a weird space. UPS, for example, delivers to many places that the USPS does not. Rural communities are especially tricky. UPS, Fedex, and USPS disagree on things like "Rural Route 24" vs "State Route 24" versus "Arizona Route 24".

<comment><USER15> Fun fact: my address gets corrected to one on the other side of town with a South suffix added. The Post Office, UPS and FedEx all have manual procedures in place to handle this case. No-one has yet to fix their software more than to flag a manual review at the local office

<comment><USER16> Have you thought about requesting to change the number of your house to one that doesn't exist on the other side of town? That is usually much easier and cheaper than changing the street name.

</comment></comment></comment></comment></comment><comment><USER17> Since order and ingredient category does matter for some cocktails, you could really geek out on this a lot farther, and take it way off the deep end... categorize by liquor base, by mixers, by sweet or savory flavorings, by solidity, by acidity, by temperature, by water/ice content, by garnishes, etc., etc., and then use edit distance on trees rather that on sets.

<comment><USER18> "Since order and ingredient category does matter for some cocktails..."

I'm skeptical that ingredient order makes any difference in a cocktail (unless you're doing things like setting them on fire, etc.) ... could you provide an example ?

<comment><USER17> Setting drinks on fire is a decent example that is alone enough to justify what I said. Some people care whether you pour over ice or put ice in the drink. Whether they can tell the difference is anyone's guess. "Lace" is cocktail terminology for the last ingredient. Muddling is another example; you don't muddle after you mix. Sugary syrups and other infusions definitely change a drink's character depending on mixing order, many drinks call for being _less_ mixed so you get a different taste at the beginning vs the finish at the end.

You can also think about recipes and cocktail names; order does matter to the corpus of recipes and lore and creative naming of drinks as much as it may (or may not) matter to taste. I didn't invent cocktail history, so it's not exactly my place to defend this, but I believe it's fair to say that there are lots of recipes that call for ingredients in a specific order, in addition to all the examples where order is clearly needed/used.

</comment></comment></comment><comment><USER19> > Cocktail edit distance is a bit different - primarily because order doesn't > matter. It's just set difference, or set distance.

Well, no, quantity matters for cocktails, which puts it in the opposite direction of set distance from a comparison where only order matters in terms of complexity.

<comment><USER20> This is true, but the fuzzyness of cocktail ratios makes ingredient quantity _very_ hard to use for something like this. What is the ratio of gin to vermouth in a martini? Depends on who is making it.

<comment><USER21> You picked one of the fuzziest examples. Lots of cocktail ratios are much more rigid than martinis.

Construction methods also matter.

</comment></comment></comment><comment><USER22> The problem with this analysis is lack of depth. Changing any step of the recipe (the ingredients, measurements, temperatures, cooking vessels, order of operations, even presentation) can result in vastly different products.

Firstly, you need similar measurements. Second, replacing one ingredient for another affects the chemical composition that directly influences the perceived flavor (sweet, bitter, sour, salt, fat). Third, the physical acts of stirring vs shaking affect texture, temperature, and dilution all at once.

All this would need to be added to the model to begin to approximate actually similar cocktails, and not just a comparison like _" Hey, you can take the sugar and eggs out of cake and make bread!"_

(The fact that the author conflates sweet and dry vermouth is also not great; that's like confusing a Riesling with Extra Brut Champagne)

</comment><comment><USER23> I spotted an interesting data standardization anomaly:

"A The Last Word is a Gin Gimlet but you replace simple syrup with green chartreuse, replace lime juice with maraschino, and add lime."

It appears that "lime juice" and "lime" exist as separate ingredients in the ingredient lists, even though they're exactly the same thing. It looks like this is causing a false separation of the Last Word cluster (drinks containing "lime") from the Gimlet cluster (drinks containing "lime juice") in the 2D plots.

<comment><USER24> Gimlets are more often made with lime cordial, marketed as Rose's lime juice. This is different from fresh lime juice in that it has sugar and other stuff added.

[https://www.jeffreymorgenthaler.com/lime- cordial/](https://www.jeffreymorgenthaler.com/lime-cordial/)

<comment><USER23> Interesting. I have two concerns with your "lime means Rose's lime juice" hypothesis.

(1) When I google "gin gimlet recipe", all search results I looked at (the top 4) call for "fresh lime juice" as the ingredient, leading me to believe that fresh lime juice is more common as a gimlet ingredient. The article you linked even states that fresh lime is more common: "A lot of bartenders out there adopt the fresh-lime-juice-and-sugar method of making lime cordial."

(2) Why would a recipe use the word "lime" to refer to Rose's lime juice? It seems like no one would ever be able to make the cocktail correctly if they had to infer that "lime" refers to Rose's lime juice rather than fresh lime juice.

</comment></comment></comment><comment><USER25> It was explained to me that cocktails are a combination of flavors. That is, for example, sweet + dry + sour + ... you get the point. Making a good cocktail is about balancing those various attributes, based on the characteristics of the base ingredients.

<comment><USER26> > cocktails are a combination of flavors

Isn't this all recipes?

</comment></comment><comment><USER27> I think this project would've benefitted from consulting a good bartender -- or at least a barfly - to identify the key dimensions and the scaling vectors.

As other commenters pointed out, there's a whole science behind how the ingredients associate.

</comment><comment><USER28> What cosmology of mixology doesn't have a G&T?

<comment><USER29> That's a mixed drink, not a cocktail!

</comment></comment><comment><USER30> Should've called it Cocktail Hamming Distance</comment>


Green Energy Projects Across Scotland to Get £10M Funding Boost - <AUTHOR> https://digit.fyi/green-energy-projects-across-scotland-to-get-10m-funding-boost/ <comment><USER2> A lot of electric bike schemes included in this. Hardly a high-impact result from this investment.</comment>


Ask HN: Craigslist API - <AUTHOR>

Do you guys know if craigslist has any API where I can post to craigslist from a 3rd party website? <comment><USER2> <http://www.craigslist.org/about/bulk_posting_interface>

Note there are only a very limited number of supported categories.</comment>


The iPhone is a piece of sh% - <AUTHOR> http://www.thebestpageintheuniverse.net/c.cgi?u=iphone

<comment><USER2> It's no secret the original iPhone was just a feature Phone with a touchscreen .

</comment><comment><USER3> This is hilarious xD. You got some points there.</comment>


Using Google+ to Track Severe Weather [Experiment] - <AUTHOR> https://plus.google.com/u/0/events/cg2p24s78ch3n5261uqoubq29ko/114282530294727349974 When Google+ introduced Events, I thought it would be interesting to see if they could be used to collect images, videos, discussions during and after a storm. With the threat and chance of severe weather in Indiana today, I created a public G+ event for anyone in Indiana today. It could be a total flop, especially since it's hard to predict the weather. We'll see what happens! <comment><AUTHOR> so far the weather event has been lackluster... mother nature is not cooperating. still the change for scattered severe storms this afternoon...</comment>


Archaeologists investigate what life was like after dark in the ancient world - <AUTHOR> https://psmag.com/news/historical-night-life <comment><USER2> Very interesting. There was one other scholarly work in this general area — but that was comparatively much more recent: Roger Ekirch's "At Day's Close" [1], which is very well-researched and covers pre-artificial-light Europe.

[1] [https://www.amazon.com/At-Days-Close-Night- Times/dp/03933290...](https://www.amazon.com/At-Days-Close-Night- Times/dp/0393329011)

</comment><comment><USER3> I've wondered how particulate pollution affects this, also. Discussions on this topic always seem to always focus on light pollution, but anyone taking a flight can see a haze just about anywhere from pollution. I'd imagine it diffuses incoming light from extraterrestrial sources and it reflects light pollution, for a double-whammy.

</comment><comment><USER4> An associated topic is the history of artificial lighting. A good exhibit is the one at Old Sturbridge Village. Here are some pictures of it:

[https://www.flickr.com/photos/mytravelphotos/14693172893/in/...](https://www.flickr.com/photos/mytravelphotos/14693172893/in/photostream/)

It's crazy to me that no so long ago people had to make do with rushlights which were far more primitive than the oil lamps of the ancient world.

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

</comment><comment><USER5> As I optimize my daily life, I find myself needing less sleep, and with more time to kill at night. I'm starting to get very familiar with the brightness control features of all my devices, as it's physically painful now to look at too much light at night.

But I can now go to bed at ten or so and wake up at three, and so long as I avoid light sources I can get a lot done. I just wish my fridge had a night mode.

<comment><USER6> I'm curious about what optimizations you are making that reduce your need for sleep (as someone with lots of things they want to do and not enough time in the day to do them all). If you wouldn't mind briefly sharing I'd be much obliged.

<comment><USER5> They mostly revolve around turning things of my life that you ordinarily would handle as one-offs, as structured, routine tasks. This reduces my daily cognitive load, allowing me to spend ever more time with my default mode network activated instead of in focus state.

So if I'm ever in a situation where I'm not really quite sure what to do, I come up with a rule and do it that way the next time.

I've been optimizing this process for perhaps a year after I got interested in it. Everything in my apartment has a history and a little set of rules. I keep a spray bottle of daily shower cleaner in my bathroom. It lives on the ledge of the sink when I'm not using the sink and moves to the lid of the toilet when I am. I don't feel comfortable yet putting it away because I think if I do that I'll forget to use it after I take a shower. Maybe in another year.

Having to remember to do stuff sucks. I always make a visual reminder. A few times I forgot to put washed clothes in the dryer. Now when I'm washing clothes the hamper gets put in the way of the door so I can't miss it.

Nothing stays in mind, so it's free to imagine and wander. I do this at work too, every task gets routinized. Very rarely am I caught off guard with not knowing how to do something.

About a year in I noticed myself naturally waking up earlier. It helps that I don't set an alarm clock anymore. But I'm routinely the first one on my team into the office anyway.

I live alone, and I've often wondered how my lifestyle would alter if I had to live with somebody. Well, the few times I've had someone over regularly, my routine adapted to accommodate them, I was surprised how easy it was. If things got out of place, I'd just return them to their place when I noticed. The little routines have accumulated their own inertia.

The most fascinating thing about it is, even though I feel like I'm _doing_ a lot less, in reality a lot _more_ gets done than otherwise would be. Routinizing something makes it ten times easier and take ten times less time to accomplish. It's so worth doing that before I even get started I look for ways to optimize.

I think this is how primitive peoples must've lived all the time. Tons of stuff that needed to be done, day in, day out, over and over again. Optimize, optimize, optimize.

<comment><USER6> Thanks for your detailed reply! I have been attempting to incorporate more routine in my life, but I hadn't considered the why, really. The concept of reducing cognitive load makes sense, and I agree that "having to remember to do stuff sucks" 100%.

</comment></comment></comment></comment><comment><USER7> The concept of night mayors is interesting, and I'd love to see the concept extended further into other sectors of government.

<comment><USER8> As I recall from the 1980s sitcom Night Court, there are night judges (though I have no idea if that is a real thing, I doubt my town has night judges).

<comment><USER9> Night Court was a great show.

The TV Tropes ([http://tvtropes.org/pmwiki/pmwiki.php/Series/NightCourt](http://tvtropes.org/pmwiki/pmwiki.php/Series/NightCourt)) page says that "many legal professionals confide that Night Court is far ''more'' realistic than most straight Law Procedurals." I can't vouch for that, but my father is a lawyer, and it was one of his favourite shows too. His other favourite was Rumpole of the Bailey [https://en.wikipedia.org/wiki/Rumpole_of_the_Bailey](https://en.wikipedia.org/wiki/Rumpole_of_the_Bailey).

The common thread here that both shows are both (a) funny, and (b) portray defense lawyers as more-or-less good guys. (My father worked for the Attorney General's department).

I can't think of a law procedural from the last two and a half decades that has either of those features. Why is that?

</comment></comment></comment><comment><USER10> This was unfortunately titled, there is a movie titled "What We Do in the Dark".

<comment><USER11> I think we are all thinking of 'What We Do in the Shadows'... FWIW. Great movie.

</comment></comment><comment><USER12> Came here wondering why the hell HN was discussing a mockumentary about vampires...

</comment><comment><USER9> > From that point on, most people have had access to some form of "artificial" > light, at least occasionally.

The scare quotes are silly. It seems to come from the mentality that any technology that Hobbits can understand is "natural" but anything else isn't.

</comment><comment><USER13> I've never understood why this topic is being studied primarily through archaeology. There are plenty of humans alive today that live far from much artificial light and could tell you exactly what their life is like right now, what they did _last night_. Shouldn't have to be so hard / so mysterious

<comment><USER14> How are you going to contact people who live far from artificial light? Typically that's concomitant with not having electricity needed for internet communications, as that typically prevents powered cell phone internet communication as well.

You could fly then drive there, but the costs are going to add up quickly. You're going to have to find them, get someone to communicate with them, and have liabilities covered. This quickly becomes very expensive with even just a few people.

<comment><USER15> It's funny, just came back from a trip into the American South West. Stayed at a cabin in the middle of nowhere on a 500 acre ranch surrounded by only the wilderness and other giant ranches...on a new moon.

I've never seen so many stars in my life, even in places I thought of as raw wilderness and I've spent quite a bit of time camping in national parks and so on.

Those places seemed like light filled cities in comparison. It was about a 4 hour drive from the nearest major population center.

I suspect there's plenty of these places still left even in relatively developed areas.

<comment><USER16> I felt that way at Capitol Reef. Where were you?

<comment><USER15> Southwest Utah.</comment></comment></comment></comment></comment>


AT&T's fiber deployment: 1Gbps for the rich, 768kbps for the poor - <AUTHOR> https://arstechnica.com/information-technology/2017/04/att-brings-fiber-to-rich-areas-while-the-rest-are-stuck-on-dsl-study-finds/ <comment><USER2> "Our analysis finds that AT&T has built its all-fiber network disproportionately in higher income communities. "

This isn't bad. I was thinking of proposing this exact thing for a local, high-speed ISP. I was going to say focus on denser, high-income residential and city just because you recover your costs back faster. On top of that, it's easier to upsell them on high-margin services that increase either profit or growth. The backbones-connected sites where ISP's can get cheaper bandwidth [in long run] are also usually close to such areas since they were similarly targeting profitable regions. Now, I have less data on that last claim to say how often its true or exactly how close customers are. I've just often seen cases where new ISP's might be able to get a quick start targeting the homes or businesses physically close to those sites for cheaper fiber. A bootstrap option.

"However, the copper could be replaced by wireless networks instead of fiber in areas where fiber rollouts aren't cost-effective. AT&T is deploying a 10Mbps fixed wireless service in order to meet its Connect America Fund obligations."

Now, this is a decent idea. NEPA, a small ISP with wireless, was already here showing it can work:

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

</comment><comment><USER3> I, too, would target the areas that would quickly récup the costs of the fiber I just paid out. Why deploy if people can't afford $100+/month internet service? (guessing on that price.. I pay $120 for 200mbps today)

</comment><comment> at-fates-hands I see Ars is at it again with its Liberal class warfare articles.

I find it humorous how we complain about how low income families are having such a hard time being trampled under foot by the out of control corporate greed. And here we are, complaining about. . .

Internet access that's _only_ 768Kbps.

I mean, are you really still that poor if you can afford a smartphone, internet access, a computer, a wireless router and a cable modem? I've been to places in South Africa and Haiti where people are just happy to have clean water to wash their clothes and drink.

The notion that we are making a big deal out of this is absurd and laughable.

<comment><USER2> "Internet access that's only 768Kbps."

The problem is that cell service and sometimes Internet services are becoming close to a necessity for getting jobs or cheap goods. There's a lot of people in rural areas kind of stuck because they don't have such things or have them periodically. I know some. Two of my family members were in that situation with one sort of out of it now. She got a job right after I bought her a single month of phone time. She had to borrow time on our PC and Internet to do all the online applications. All she needed were two things hard to get for the poor.</comment></comment>


Uber: London drivers must use hybrid or fully electric cars from 2020 - <AUTHOR> https://www.theguardian.com/technology/2017/sep/08/uber-london-hybrid-fully-electric-cars-2020-vehicles <comment><AUTHOR> Good to see Uber executing on its vision and getting some positive publicity along the way</comment>


Gamifying propositional logic: QED, an interactive textbook - <AUTHOR> https://terrytao.wordpress.com/2018/07/28/gamifying-propositional-logic-qed-an-interactive-textbook/ <comment><USER2> This is a very nice game/textbook!

I'd love to see some additional features:

\- I'm currently at the excercise 9.1, and this far PUSH is always the only operation you can do when dragging from an outer scope to an inner one. Seems pretty fundamental. (To the extent that explicit mentions of "pushing" is not even normally mentioned in textual proofs?) Could this be streamlined somehow, for example applying PUSH automatically just with the drag & drop operation from outer to inner scope?

\- Instead of a linear "achievement history", keep records of all produced proofs for each lemma. Highlight the one with the smallest amount of "rules".

\- It seems to allow circular proofs by default. Surely this can be detected using a dependency graph?

\- Speaking of dependency graphs, I'd love to explore reverse mathematics using this kind of an interactive tool. Maybe add some challenge by counting not only the amount of rules, but amount of axioms/basic rules of inference used, and counting also the size of the whole dependency graph of each proof. Maybe there could be separate record-keeping for different sets of axioms.

<comment><USER3> PUSH is known as "weakening", one of the structural rules of logic.

</comment></comment><comment><USER4> Related: Nicky Case (whose website you really should check out) is currently organizing an Explorables Jam until the nineteenth of August[0][1].

[0] [https://explorabl.es/jam/](https://explorabl.es/jam/)

[1] [https://ncase.me/](https://ncase.me/)

</comment><comment><USER5> 9.3(d) was a real pain until I thought about how I'd write a function with type `(Either a b, Either a c) -> Either a (b, c)`. Before that, I kept wanting a negation operator.

(EDIT: Looks like some of the exercises are getting shuffled between versions -- 9.3(d) is the one I meant as of v1.2, but that might change over time. At least the type signature is a clue about which one I mean.)

<comment><USER2> I'm totally stuck. I would write an exhaustive pattern match to implement that function, but I have no clue how to do that in logic, without using negation.

<comment><USER6> You know A|B and A|C. Prove A|(B&C) by assuming A and separately by assuming B, then use case analysis (by dragging the first conclusion onto the second).

To prove A|(B&C) assuming B, you have to use A|C and yet another (nested) case analysis.

<comment><USER2> Forgot to comment yesterday: thank you! Because of this I got unstuck.

</comment></comment></comment></comment><comment><USER7> Reminds me quite a bit of this, which also includes FOL: [http://proofs.openlogicproject.org/](http://proofs.openlogicproject.org/)

</comment><comment><USER8> Great works! We are making a VR logic game combining Alice in Wonderland and The Game of Logic. Both were written by Lewis Carroll. Our preview poster: [https://sciencevr.com/img/carrollsriddles_s.png](https://sciencevr.com/img/carrollsriddles_s.png)

</comment><comment><USER9> There's earlier, non computer game precedence in To Mock a Mockingbird, which I feel is similar in spirit.

Nice find OP

</comment><comment><USER10> Shameless plug: I have created an Android game for learning propositional logic that's probably more suitable for younger audiences.

Source code: [https://github.com/stefanhaustein/emojic](https://github.com/stefanhaustein/emojic) (the page has a playstore link which has screenshots).

Have fun competing with your kids O:)

</comment><comment><USER11> See also "The Markable Mark": [http://www.markability.net/](http://www.markability.net/)

It's an introduction to logic using George Spencer-Brown's Laws of Form notation.

<comment><USER12> I'm glad you mentioned LoF because I was thinking about it too, from an old article many years ago. I always get tangled up in the philosphy aspects, but what ever happened to it? Is it simply a different and consistent notation, or is there more to it?

<comment><USER11> > Is it simply a different and consistent notation, or is there more to it?

I've found that you can use that question to partition people (who have an opinion on the question) into two major groups: Those who dismiss LoF as just another notation, and those who do find something deeper in it or at least claim to.

 _Pragmatically_ it's strictly superior to conventional notation: it's more parsimonious and it admits the rule (due to W. Bricken, I believe):

        A(AB) = A(B)

Which is unknown in other notations, and permits proofs in LoF notation to be extraordinarily concise and elegant (compared to proofs worked in conventional notation.) It also permits a concise implementation of a SAT solver that has the nice property that you don't have to put your problem into normal form.

Recently, George Burnett-Stuart ( _not_ Spencer-Brown), the author of the "Markable Mark" site, has worked out how to encode Predicate Calculus [http://www.markability.net/prospectus.htm](http://www.markability.net/prospectus.htm)

</comment></comment></comment><comment><USER13> Last time I spent some time trying to learn mathematical logic I realized that logic texts could benefit from syntax coloring of various languages involved (e.g., metalanguage, object language, logic symbols vs non-logic math symbols, etc, etc).

I'm not sure if this is considered as pedagogically beneficial, and/or feasible without interactivity (on a cursory glance, it doesn't look like Terence Tao has given any importance to coloring in this project).

</comment><comment><USER14> Cool! Someone should make a sleeker interface for it.

<comment><USER15> The interface is good enough. But someone should make a natural deduction version of it!

</comment></comment><comment><USER14> What is the difference between "B [assuming A]" and "A implies B"? Is the distinction something that was introduced for the purposes of this game, or is it made otherwise as well?

<comment><USER16> Conditional assertion (that is, deducibility of B under the hypothesis A) is distinct from assertion of a conditional (deducibility of the statement that A implies B). This is a fundamental distinction in formal logic. See [1].

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

</comment></comment><comment><USER17> Should we tell him about Coq? Lol.</comment>


MaxCDN Joins StackPath - <AUTHOR> https://www.maxcdn.com/blog/maxcdn-joins-stackpath/ <comment><USER2> I wonder if the pricing structure would remain same for long.</comment>