Strangler pattern, a powerful simple concept to do refactoring - <AUTHOR> https://www.martinfowler.com/bliki/StranglerApplication.html <comment><USER3> > There's another important idea here - when designing a new application you > should design it in such a way as to make it easier for it to be strangled > in the future. Let's face it, all we are doing is writing tomorrow's legacy > software today. By making it easy to be strangled in the future, you are > enabling the graceful fading away of today's work.

This is a very important point that I've been harping on for years. If the nature of your business requires quickly adapting to new business needs--then make your software and systems easy to delete! Chances are good that they'll be obsolete/outdated in a few years, and everyone will be much happier if the system is easy to remove and replace.

How to implement that is very dependent on the nature of your systems, how you deploy, your company's tech and operational culture, etc. But it's very much worth thinking about: "If this project were to fail in the long run, how hard would it be to get rid of?" In large companies, lingering legacy systems can make or break an entire organization.

<comment><USER4> OTOH: "Well-designed components are easy to replace. Eventually, they will be replaced by ones that are not so easy to replace."

<comment><USER3> Not sure what your point is? Should we give up on well-designed components?

A cynical quip like Sustrik's Law is meaningless to me without a deeper analysis. What mechanisms or conditions make this "law" true? And what are its actionable takeaways?

<comment><USER5> I think it drives at an important point: Your job isn't done just because you've somehow managed to design and implement the perfect component that's absolutely reusable. There are plenty of internal and external forces that will turn that component into something imperfect and flawed, if not replace it outright with something that is far less usable, reusable, appropriate, etc. It requires constant vigilance and maintenance to maintain that state.

</comment></comment></comment></comment><comment><USER6> The main problem I've seen with this strategy is 'funding' for the new system gets pulled half-way, and there's no time remaining to refactor the old system. Fast-forward a year later, someone else may try to write a 3rd refactor using a different 3rd improved system design. Now that project also stalls out due to project pressing concerns. Now the codebase is polluted with different systems that require more training to work with, more lines of code to cause bugs (mixed frameworks), and generally a headache. I still think the Stangler pattern is a good one, just make sure you get enough leeway to reach the 'strangler' moment where most of the old code becomes deprecated and removed.

<comment><USER7> This is known as the "lava flow" anti-pattern. I kind of like the visual imagery of the two. With the strangler pattern, you have new living pathways to deliver functionality. With the lava flow anti-pattern you have petrified remnants that lead different places, but which have died.

From my own experience, when you take over a project that has attempted the strangler pattern, but got cancelled the key is either to continue it (holding your nose if you don't like it), or remove it and go back to the old infrastructure. If the new pathway is better than the old, go with it until you can remove the old one. Even if you have a new super zappy way to do it, resist introducing it without "finishing" what what started earlier (one way or another).

</comment></comment><comment><USER8> Agreed. We are wrapping up the rewrite of a CRM and man-oh-man has it been long. Two years in the making due to being taken on and off, on and off, and yet again on and off the project. Looking back. I wish I had either just rewritten the existing system, piece by piece at a time, or at least starting moving pieces one-by-one out via micro-services to a new backend. The front- end then could've been completed in a smaller rebuild.

Regardless, had we gone with a strangler approach, we probably would've been done months ago. As it stands, there is at least another week or two of development via QA break/fixing until its ready to go live.

With that said, I still think there are times when a full rewrite makes sense. We redid our API two years ago when it was still small and I am happy we did the full rewrite. The old architecture just wouldn't have been able to scale with where we are now and I felt the code was just too far gone to be helped.

As always, life is full of learning experiences.

<comment><USER9> When would you do a rewrite instead of a strangler?

<comment><USER10> I personally have worked on successful rewrites when the existing system was actually broken. Maybe it worked enough to get most work done but there are manual steps to keep it from falling apart completely. Development has gone off the rails. The rewrite can be a winner that constantly delivers useful functionality.

</comment></comment></comment><comment><USER11> There's already been tons of discussion here on HN about rewrites.

But, for the love of programming, please seriously consider this gradual rewrite/strangler pattern/whatever you want to call it over the often disastrous complete rewrite.

<comment><USER12> Definitely agree. Unfortunately full-rewrites will always have some level of praise. Typically it starts with a POC, completely new tech stack, like for a new one starting today it will probably be a React/Node or something like that with GraphQL. Perhaps it is replacing a Java/JSP/JSF something-er-rather.

The POC will have the advantage of taking a small feature, and reproducing it, but working 10 times better, faster etc.. However, what is unfortunate is that often times the POC team will say, yeah this is about 80% of the way there, we still don't have X, Y and Z implemented. But that's where the rub is - <USER2> turns out that X, Y and Z are often always under estimated. After all, there is a reason they chose to exclude it from the POC.

Beyond that, the POC is just 1 feature usually. What about the other 80 screens. The POC team will then say, well if this took 3 weeks, then 80*3 (as a worst case) will be 4 year project - but the upshot is that it can be paralleled and done a lot quicker.

This is how I always hear it. So they put in a plan to do it, and things just start unravelling as you have 1) stakeholders slowing down work with getting existing functionality. 2) you still need to tackle the last 20% (which might really be 50%) 3) You will constantly drain resources for the next year or 2 from the ACTIVE product, and that battle will be ongoing.

If you use the strangler pattern, you will basically be making incremental releases that use the new technology AND the old at the same time. You don't have to replace the last 20% until it's absolutely a good idea. You're able to get the instant benefits to the screens/features you want out the door, and basically train up the existing team. There are no two teams competing, they are all working on the next short-term release.

<comment><USER13> Indeed. I think the key point here is that even if the rewrite 'only' takes 4 years, how many new features have been added to the original codebase (maintained for 'continuity') in the meantime?

There's usually some expectation that the rewrite will make it 'quicker' to develop these new features so _of course_ it will catch up. Eventually. After ten years of splitting the dev team to maintain two codebases. One of which has not produced any value in that time.

Alternatively the application featureset is frozen for the duration of the rewrite, and the company folds halfway through.

</comment></comment></comment><comment><USER14> We've used this pattern in an warehouse management system in a company I worked for years ago.

Old version had almost all the logic in PL/SQL, some Qt forms for high-level management, and C++ console apps (warehouse processes) running on portable terminals through telnet (so in reality these were running on the server, and portable clients were telneting to it to control it).

First we introduced XML-based protocol between C++ app and portable terminals, and a .net client running on these terminals to replace telnet. This allowed for a simple graphical interface instead of text-only, so there was a good motivation for customers to upgrade. Also it separated the parts clearly and allowed to mix and match new and old parts in the system.

Then we introduced J2EE application server, exposed the database through hibernate, and new processes were written in java (jbpm to be specific). They still used the same XML protocol and .net client, so old C++ processes could call java processes and vice-versa.

New processes required the possibility to call PL/SQL logic so the features that were needed were exposed through J2EE services to the java processes.

Finally we added a way to write new management forms in Eclipse RCP.

We also planned on moving the logic from PL/SQL to J2EE completely, and becoming database independent, but we never got to that.

The rewrite was never completed, there was a merger in the meantime, and we switched tech again, at which point most of the team left :)

But what we finished was working reliably, no features were lost, and as far as I know some customers still use the old system, some use both, some use the new system.

The thing that made it easy to do, but also hard to finish - was the logic in PL/SQL. As long as we left that be it made moving everything else easy. But at the same time it was a constant temptation to just call the old PL/SQL function instead of writing a new J2EE service, and finish the task at hand faster.

<comment><USER15> I've seen huge things being built in/with PL/SQL, running stable, fast, nearly bug-free and containing all the features needed, for decades, sometimes upgraded to a new database major version.

I've also seen multiple attempts at replacing those PL/SQL systems, reimplementing the same functionality with Hibernate/Java (and I recall one instance of PHP being used) and they've all been slow (to use and develop), buggy and always lacking in functionality compared to the original. Basically all three of the previous problems or a disgusting combination of them.

In all of those replacement cases, there has been no objective reason to replace the entire system, maybe give the UI a facelift.

So here's my question, __why __rewrite it all, what 's the reason these "rewrites" and "stanglings" are done to nicely working systems just not complying with what the newest fad is? Is PL/SQL or DBs such an arcane knowledge your devs did not understand it enough to give it a facelift? I'm genuinely just curious why these things happen, if I knew the reason maybe I could stop another service I have to use being turned to excrement.

<comment><USER14> The ultimate goal was to become database-independent as far as I understand (I was just a junior dev, this was my first job, so I'm guessing, I wasn't making decisions). To avoid Oracle tax I assume. It was very funny when mid-rewrite we learnt Oracle bought Java :)

But there were lots of other improvements - using jbpm for designing warehousing processes was a natural fit, much better than making persistent long-running processes with C++ using nested ifs in a while loop and serializing the state of the process with manual inserts and updates on each state change.

With jbpm you could see the whole state machine as a graph, move nodes around, insert new ones easily, and the persistence was automatic, including all the variables you use, which saved a lot of time and hard-to-track bugs (some combination of steps breaks the persistence the next time you enter this process - good luck fixing that and tracking what really happened on the warehouse before the process broke the persistence).

Regarding the speed we were actually slightly faster with the jbpm (mostly thanks to the hibernate 2nd level cache and optimistic locking). We measured the time on the portable devices between pressing a key and seeing the next screen, and because the bottleneck was PL/SQL procedures running selects to decide what to show and waiting on locks - the whole overhead of application server and jbpm and .net client was hidden in the savings thanks to the cache (and optimistic locking).

Also jbpm processes had versioning. Old versions were continuing to run and new instances were started with new version. Upgrading the processes with the C++ code was basically stop-the-world event.

We could have skipped the Eclipse RCP thing, though. The subteam that worked on that went a little over the top with architecture astronomy, there were like 4 sub-layers with 4 levels of configuration xmls :). And the framework built on qt we used previously for forms was quite nice already, arguably better.

And no - PL/SQL isn't arcane, and the whole team had lots of experience with it running the system for years.

<comment><USER16> Why not move to another DBMS rather than move off from SQL altogether?

<comment><USER17> PL/SQL or stored procedures are specific to each database vendor. So, it is hard to pull off. The better way to replace PL/SQL altogether, but keep sql queries.

<comment><USER18> Sure, but still it would be more sane to set up another DB, say Postgres, write some migration code to always keep the two DBs in sync, then start migrating the SQLs one by one.

</comment></comment></comment></comment></comment></comment><comment><USER13> In the codebase I maintain, this boils down to a 'gradual rewrite from the outside in' combined with refactoring bits of the 'in' where practical. You create new independent code paths on the way 'in' instead of trying to make the existing ones cope with yet another use case. These tend to highlight bits of existing core code which can be refactored as isolated and testable components, typically by copy-pasting them into a separate library and updating references piecemeal. Old code hangs around as long as it's referenced, but new code doesn't necessarily have to touch that copy.

Eventually the monolith's trunk gets hollowed out as useful pieces become dependencyless libraries, and the tangled knot of rotting branches, vines, and strange green things with purple lumps starts to die back as a multitude of independent and healthy trunks grow from the surrounding earth.

At the risk of breaking the metaphor...

</comment><comment><USER19> We opted for something similar when facing a technology pivot point in our front-end application. Instead of opting to re-write our entire application that had been built over the course of 3 years, we chose to integrate the replacement technology side-by-side with the original. This enabled us to add new features using the new technology as needed, along with allowing us to move old features over as we were able to. So far, I'm pretty happy with it. But, at some point, we will have to actively prioritize re-writing old content using the new technology, or else we'll be stuck with this frankenstein forever.

<comment><USER20> Yeah. I'm really torn on this approach. I guess there aren't really any "good" options to redoing 3 years worth of stuff, so it's mostly an exercise in trying to pick the most acceptable bad trade-off.

The downside of this as I've experienced it is the tech-stack bifurcates and it becomes harder to ramp up new people. Or only some people get to work on the new shiny stuff and others just don't.

It's probably the best approach if you can guarantee the frankenstein won't persist forever. I've seen it get several frankensteins deep. At that point you're never getting rid of it, and the problem compounds. But there are no right/wrong answers, it's all completely context dependent and perhaps that's the only configuration in which the company can survive.

I also think there are likely certain inflection points in terms of project size/complexity. If the whole thing would only take 3 months to re-write then that's probably a good option. If it would take 3 years, it's probably not feasible. You know what I mean? The software itself is an input into the function of 'can we move this to a new techstack/architecture?' and I feel like there are certain parameters which have a safe operating envelope within which it's workable to do a re-write and not have the old solution hang around, but outside that the parameters may just simply not allow for it as a possibility.

</comment></comment><comment><USER21> I've seen a team of 5 junior devs on an existing product outpace 10 senior devs on a team to replace that product from scratch for 3+ years.

A third team, of like 3 devs, made a proof of concept using the Strangler pattern and just a simple API to interact with the existing database within a year and took over the "rewrite project".

<comment><USER22> 5 devs will nearly always outpace 10 if they have to work on the exact same piece of code. You gotta break it up into teams of at most 4, with as little overlap as possible. Communication doesn't scale.

<comment><USER23> The other problem is that 10 senior devs sounds like too many cooks and egos in one kitchen.

Junior devs have less experience, but that also can mean less rigidity and a willingness to explore new options.

</comment></comment></comment><comment><USER24> That's a pretty funny analogy considering the same tree appears to be the inspiration behind the design of the aptly-named "Bed of Chaos" from Dark Souls: [https://66.media.tumblr.com/02253f537ab15bd946d55cdb9b0b7b41...](https://66.media.tumblr.com/02253f537ab15bd946d55cdb9b0b7b41/tumblr_nzvs61E4LV1ukgbqco9_1280.jpg)

<comment><USER24> Ha, I failed to notice that even the description is similar: A failed experiment to duplicate the first flame.

"The experiment failed and had terrible consequences, releasing pure chaos and creating a distorted being ... that consumed the witch and her followers. The being became the source of all demons: The Bed of Chaos"

Sounds downright prophetic.

</comment></comment><comment><USER25> I think this is an insightful point of view: "Let's face it, all we are doing is writing tomorrow's legacy software today."

Maybe we spend too much time trying to design flexible programs that can be easily updated to support new requirements (which, in my experience, usually ends up just being extra complexity which must be maintained and never allowed the extra flexibility it was supposed to deliver), and it might be wiser to sometimes think about software which is easy to replace.

<comment><USER26> Reminds me of [https://programmingisterrible.com/post/139222674273/write- co...](https://programmingisterrible.com/post/139222674273/write-code-that-is- easy-to-delete-not-easy-to)

</comment></comment><comment><USER27> (2004)

Adopted a similar pattern recently on a project, results aren't fully in yet, but it looks like it might work.

However, while I understand the reluctance about rewrites, in my personal experience they have actually been very successful.

So beware the absolutes. _Always_ beware the absolutes ;-)

<comment><USER28> > Always beware the absolutes ;-)

All categorical statements are bad — including this one ....

<comment><USER28> I see some people didn't get the (self-contradicting) joke. I probably should have put it in quotation marks, or appended a smiley-face.

<comment><USER27> Or they didn't think that simply repeating the self-contradicting joke already made added anything to the conversation?

</comment></comment></comment></comment><comment><USER29> "We describe how a small, successful, self-selected XP team approached a seemingly intractable problem with panache, flair and im-modesty." \- Abstract of the linked paper

[http://cdn.pols.co.uk/papers/agile-approach-to-legacy- system...](http://cdn.pols.co.uk/papers/agile-approach-to-legacy-systems.pdf)

</comment><comment><USER30> This pattern was taught to be by a former mentor, except he phrased it "always be ready to ship". I used it to convert my app from rendered HTML + jQuery into a full fledged VueJS app + API. Much, much better than rewriting.

One more thing to add, is that a lot of software (e.g. SAAS) has users that depend on it. You want to make sure that your customers are happy through the transition.

</comment><comment><USER31> The link from "Further reading" was a great read too: _Legacy Application Strangulation: Case Studies (2013)_

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

</comment><comment><USER32> Maybe a little OT but it seems a little surprising that this Man, Martin Fowler just observes nature and creates design patterns out of it. And of course once he writes an article everyone starts talking about it.

I'm not sure how I feel about it. The quality of his articles are generally pretty good. But it seems a little reckless (or perhaps foolhardy) for just one person to dictate all new design patterns.

<comment><USER33> A Pattern isnt good just because someone came up with it. Lots of patterns have been discovered/described in the past, and they turned out to be rubbish. This might be one of them, or it might be good, time will tell.

He is not dictating anything, he is offering you his advice. You too can describe a pattern you came up with, and submit it here as well

<comment><USER32> Can we be honest with ourselves and admit that an article with a link to martinfowler.com is much more likely to get to the top of HN and more eyes than a random blog post on design patterns?

<comment><USER34> I think your statement is accurate, but I don't think it requires any special honesty or insight. Fowler has written seven books on software development, spent five years as the editor of the design column for _IEEE Software_ magazine, is the editor of an Addison-Wesley Signature Series of books, and is employed by a very famous software development company. His posts _ought_ to be given more attention than random blog posts. That's not to say they're always correct. They're just more likely to be worth reading.

</comment></comment></comment></comment><comment><USER35> Isn't this common sense though? How else would you re-write a complex, legacy system? But then again, I feel the same way about all virtues Martin Fowler extols.

<comment><AUTHOR> Most of the redesigns are done in the "big redesign in the sky" fashion, that mean we rewrite a new system from scratch and when it have equivalent features as the old system we redirect traffic to it a "big bang" introduction. This usually goes wrong because it take too much time to have an equivalent system, and redirecting the traffic in one shot add to the risk of such a project. It also create frustration between the people maintaining the old system and thoses creating the new one. This said, a lot of companies still do that!!

</comment></comment><comment><USER36> god, that's a terrible name</comment>


Paul Dix - Why Node and Scala will dry up: Go will drink their milkshake - <AUTHOR> http://vimeo.com/64716826 <comment><USER2> Comparing Pattern matching to "ifs and elses" shows that, saddly, he didn't really understand its power.

Also, his opinion on Options seems to forget its advantage that the compiler won't let you use a "nullable" object without proper care. It is the main thing about it.

From the talk, it seems that he was new to Scala, didn't properly understand its concepts, wrote a bunch of spaguetti code and then blamed the language.

<comment><USER3> This went over like a bad joke to the usual suspects on Twitter. It was often much less polite than your comment.</comment></comment>


Category 5 Hurricane Irma Brings 180-MPH Winds to Bear on Caribbean Islands - <AUTHOR> http://www.npr.org/sections/thetwo-way/2017/09/05/548606014/category-5-hurricane-irma-brings-175-mph-winds-to-bear-on-caribbean-islands <comment><USER2> Having just lived through Harvey, I cannot stress enough that if you are in a position to evacuate, please do so. We were lucky to narrowly escape flooding in our home, but for 3 days we had no water, septic or power(need power for the other 2). The flooding had us stuck in our neighborhood but we were able to kayak out to safety. In addition to high winds(which Houston fortunately avoided) flooding is very dangerous. Those in the path of Irma should expect both. Again please evacuate if you can.

<comment><USER3> What do you think of city mayor's decision not to order a larger scale evacuation. NYT seems to think it was absolutely (their word) the right thing to do. Being on the ground there, would you agree?

<comment><USER4> The last time an evacuation was called for in Houston (Rita), over 100 people died trying to evacuate before the hurricane even hit. (e.g. [https://en.wikipedia.org/wiki/Hurricane_Rita#Evacuation_deat...](https://en.wikipedia.org/wiki/Hurricane_Rita#Evacuation_deaths))

In terms of life lost, evacuating would have been a disaster. You'd have had gridlocked interstates underwater.

Mayor Turner absolutely made the right call by not evacuating. Living in Houston, I'm probably a bit biased, but I find the criticism he's received for making the decision not to evacuate a bit absurd.

<comment><USER5> Agreed. I live in Austin now, but I lived in Houston before this (Ike hit about a week after I moved to H-town, what a welcome party). Turner made absolutely the right decision. It was very unclear until _very_ close to landfall how powerful it was going to really be (tropical storm -> Cat 4 in ~50 hours.) That isn't enough time. For ~4 million people, like a _week_ isn't enough time...

If a panic had ensued from an evac order? Honestly, I believe thousands would have died from the roads flooding and being trapped in their cars. It would have been a living nightmare, more than it already was.

(Greg Abbott, on the other hand, _did_ recommend evacuation. I can only assume he did this because his only purpose for existence is to be a gigantic piece of shit, and ruin people's lives in any way he can, but whatever.)

</comment></comment></comment></comment><comment><USER6> I know that this is slightly off-topic so feel free to downvote if you feel so inclined:

There's a lot of money that goes into disaster relief and recovery. I think that's great and very worthwhile, thoughts on charity accountability notwithstanding.

What I wonder, though, is if there are any organizations that provide pre- relief (prelief?) for disasters. For instance, the comment in this discussion about the airlines overbooking for flights out of the Turks made me think, "we've known that this is a possibility for a while, could aid funds be provided to get folks to safety in advance?" I know that there are a lot of logistical problems to solve (where do they go? for how long will they stay? what about their lives/livelihoods at home? how does an organization maintain accountability with donations for a disaster that has yet to happen?)

Anyway, it's just a thought. I didn't know if such an organization existed, or if it's even feasible.

<comment><USER7> It isn't feasible, but the reasons are weather prediction, not economics. Those who live in hurricane reasons are warned far enough in advance to evacuate 10 times every year. Many years not even one hurricane turns out big enough that an evacuation was required, and even when one does turn out that big, that vast majority of the land that was warned is never affected.

When we can accurately predict 1 week in advance how big and where a hurricane will land it is easy to evacuate those people over that week. However we don't yet have enough information to do that.

People living in those areas soon learn that most hurricanes are non-events: either they hit elsewhere, or they are small enough that their house can safely ride it out. Either way they can go years without evacuating. When a big one finally comes for them they don't realize until it is too late. Then the evacuation becomes a massive traffic jam of people trying to get out in not enough time.

Note that even if weather prediction is good enough people will take years to undo their habit of ignoring the predictions until it is too late as they have learned that the warnings are not worth paying attention to. (For all I know prediction might already be good enough)

<comment><USER8> I live in South Florida and this nails it. My friends who have lived here a short time are already planning to pack up and leave. My friends who have been here for 10+ years are all just going to stay and ride it out. I think even if they issued mandatory evacuations many of them would still not leave. They all speak longingly of having neighborhood "hurricane parties" while they wait for the power to come back on. They think of it as South Florida snow days. An inconvenience at worst, a fun few days off school and work at best. They just don't see the threat as being that serious.

<comment><USER9> Florida native here. They must not remember Andrew. It was not fun and games.

The media plays these storms up, yes, but they really are nothing to joke about. Even inland, as much rain as they produce, it only takes that one gust to push over a 200 year old oak and it can destroy a house.

People should take these storms seriously. First responders' lives are put into jeopardy because of foolishness like that.

Not trying to be all up on my soapbox here. I've just seen some stuff is all.

<comment><USER10> Florida native here, too. What op is probably referring to are those who haven't been decimated yet. I've lived in Ft.lauderdale a for a while and went through Andrew. We evacuated inland. The place we evacuated to lost power, where our house didn't. Ironic, isn't it.

Ft.lauderdale wasn't near the eye. It was Miami/Homestead. Anyone who has lived in Ft.lauderdale has probably not faced a damaging hurricane. Andrew was 25 years ago. I do not recall any hurricane after that that caused as much alarm. Just a few days off school.

<comment><USER11> We haven't had a major hurricane make landfall in FL in 12 years. People begin to forget the fear and seriousness in that time.

<comment><USER6> I grew up in Orlando and my high school gym was a shelter for those displaced by Andrew. That stretches back quite a bit farther than 12 years, I know, but the image of folks living in the gym has been seared into my brain. It's part of the reason why I asked the original question.

</comment></comment></comment></comment></comment></comment></comment><comment><USER12> This site makes an appearance on HN somewhat regularly, but in case it's new to anyone, it tends to be a pretty useful forecast visual for wind: [https://www.windy.com/?25.820,-67.720,5](https://www.windy.com/?25.820,-67.720,5)

<comment><USER13> It's also interesting to look at the bigger picture. The southern hemisphere has its own level of insanity going on:

[https://www.windy.com/?-22.513,39.375,3](https://www.windy.com/?-22.513,39.375,3)

<comment><USER14> I think that's somewhat normal below 40 degrees south. Lots of open ocean without any significant land masses to slow things down. See more here:

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

<comment><USER15> lest we forget the Furious Fifties

</comment></comment></comment></comment><comment><USER16> I was 10 living in Miami during Hurricane Andrew, and I'm still here if that's were Irma hits.

After Andrew we bought an RV and live in that outside our house for months while our home was repaired/rebuilt; I can't recall exactly but I'd say it was at least a month before power was restored to power refridge/deep freezer; for months my elementary school was shared with another school that was destroyed (we had half days); houses literally had "looters will be shot" spray painted on them; eventually national guard began patrolling the neighborhood for a couple months; it wasn't unusual for kids at school to be living off military MREs (meals ready to eat). And we always considered ourselves lucky.

</comment><comment><USER17> Oof. This is ramping up to be quite the hurricane/monsoon season.

I don't know much about meteorology, so I'll post this without comment besides the article's subject; maybe someone else can make an informed value judgement. But apparently as global temperatures rise, the atmosphere is going to be able to hold a lot more water:

[https://www.theatlantic.com/science/archive/2017/08/the- stra...](https://www.theatlantic.com/science/archive/2017/08/the-strange- future-hurricane-harvey-portends/538557/)

<comment><USER18> Cliff Mass (whose blog is really worth following) points out that this is not an abnormal hurricane season by historical standards. There is not a big temperature anomaly in the waters fueling these storms: [http://cliffmass.blogspot.com/2017/08/global-warming-and- hur...](http://cliffmass.blogspot.com/2017/08/global-warming-and-hurricane- harvey.html)

In other words, this is the kind of storm season you can expect to get once in a while even before factoring in the effect of warming seas.

<comment><USER19> Please note that the Cliff Mass blog post you linked to is not about the hurricane discussed here. Also note that your summary of his post ("this is not an abnormal hurricane season by historical standards") is misleading as that is not the topic or conclusion of that piece.

<comment><USER18> Look at the weekly SST temperature anomaly along Irma's track and you'll see the argument carries over.

</comment></comment></comment></comment><comment><USER20> Been watching this for a few days with /r/tropicalweather. Amazing to watch.

This site[1] has some really good info and daily videos with the rundown of the latest forecast

[1] [https://www.tropicaltidbits.com](https://www.tropicaltidbits.com)

<comment><USER21> It's also pretty fascinating to look at the Satellite images. Here you can check out the latest from the hi-res GOES-16. It's insane to see the scale of the hurricane, all told.

[http://rammb-slider.cira.colostate.edu/](http://rammb- slider.cira.colostate.edu/)

<comment><USER22> They have a nice loop of Irma's eye.

2017/09/05 - A closeup look at Hurricane Irma's eye via 1-min Band 2

[http://rammb.cira.colostate.edu/ramsdis/online/loop_of_the_d...](http://rammb.cira.colostate.edu/ramsdis/online/loop_of_the_day/)

mp4 link: [http://rammb.cira.colostate.edu/ramsdis/online/images/loop_o...](http://rammb.cira.colostate.edu/ramsdis/online/images/loop_of_the_day/goes-16/20170905000000/video/20170905000000_irma6.mp4)

</comment></comment></comment><comment><USER23> As a Puerto Rican preparing for Irma, yes, we're pretty freaked.

<comment><USER15> chances are you will just be saved : [https://earth.nullschool.net/#2017/09/07/0000Z/wind/isobaric...](https://earth.nullschool.net/#2017/09/07/0000Z/wind/isobaric/1000hPa/orthographic=-60.02,16.20,3000/loc=-64.437,18.539)

<comment><USER23> It was expected to go north today. Unfortunately, all models were wrong and it actually is coming much faster to our direction, and it keeps getting stronger. I'm legitimately scared.

<comment><USER24> We all are.

I'm in Guaynabo. Not close to the coast, so I didn't have to evacuate.

Came down for the weekend, stayed because of the hurricane...

Be safe!

</comment></comment></comment></comment><comment><USER25> Hurricanes rotate counter clockwise, so the highest wind speeds and storm surge tend to occur to the "right" or on the east/southeast side of the eye path. Currently Miami looks to be right in the center of this danger zone, so just get out now while you still can.

Yes it's a few days out and they can and usually do veer off, but this one is not worth riding out.

<comment><USER26> a hard steer to the right would be nice... but many of them do a slow steer and would get me right in it... [http://www.stuartflelectrician.com/wp- content/uploads/2015/1...](http://www.stuartflelectrician.com/wp- content/uploads/2015/12/hurricane-paths.png)

<comment><USER26> some spaghetti models predict a pretty hard right steer, but a little too late.... [http://derecho.math.uwm.edu/models/al112017.png](http://derecho.math.uwm.edu/models/al112017.png)

</comment></comment></comment><comment><USER27> I remember reading a few days ago that European models were predicting a turn to the north, and US models were predicting a high pressure ridge holding the hurricane to the west.

Anyone know more about this?

Because if true, it's the second time European models were more correct than American ones. Last time they decided we needed more supercomputing power, and they got it. Did it help?

<comment><USER28> > Last time they decided we needed more supercomputing power, and they got it. > Did it help?

Per a few sources I've seen, no, it didn't. One big cause of the GFS (USA) model's inaccuracy is lack the of computing power, which we've addressed a few times with new supercomputing clusters.

The bigger problem is that the GFS model uses bad underlying physics. Decades ago we made several choices to optimize around the current architecture and processing ability, which was probably okay in the mid 1990s. Today, it just results in greatly inferior predictive ability compared to the European models. When you combine the poor model physics with lower resolution compared to the competitors, it becomes clear that we need to reboot the whole thing.

[https://cliffmass.blogspot.com/2016/06/us-numerical- weather-...](https://cliffmass.blogspot.com/2016/06/us-numerical-weather- prediction-is.html)

<comment><USER29> Thank you very much for pointing this out, TIL. To save others the time to look up which model the US National Weather Service (NWS) chose, they selected the [1] Geophysical Fluid Dynamics Lab (GFDL) FV-3, which the author of the linked blog article above was opposed to. The US has a "weather modeling gap", which is surprising to me, because of the economic (many futures contracts move on forecasts, though many of the forecasting used by financial firms is increasingly from private sources), public policy, and military applications.

[1] [http://cliffmass.blogspot.com/2016/07/the-national- weather-s...](http://cliffmass.blogspot.com/2016/07/the-national-weather- service-moves-to.html)

</comment></comment></comment><comment><USER30> I have been through 5 hurricanes in south florida, and always stayed put. Wilma was a strong 2/weak 3, and it was no joke. Afterwards there were trees uprooted everywhere, concrete power poles snapped like toothpicks. This storm's winds have 2.5x the energy of Wilma's currently.

I would GTFO for this one, it looks really bad.

<comment><USER31> I second this. Wilma's eye passed over us, which was my first time ever experiencing the eye wall of a hurricane. I vividly remember watching our house's patio enclosure get destroyed from my parents' bedroom.

I wouldn't stick around for this one if I were still in Florida.

</comment></comment><comment><USER32> For those following storms I recommend two sites: [http://spaghettimodels.com/](http://spaghettimodels.com/) and [http://www.stormpulse.com](http://www.stormpulse.com)

</comment><comment><USER33> As the models are updated, I'm starting to get more and more concerned about Tampa Bay: [https://www.washingtonpost.com/graphics/2017/health/environm...](https://www.washingtonpost.com/graphics/2017/health/environment/tampa- bay-climate-change/?utm_term=.3ca651d0fb2a)

</comment><comment><USER34> Windy.com is pretty fun to use! But I have to ask something....

Irma is 180mph. Scroll the Windy.com map to between South America and Antartica. Is that really 330mph winds?

[https://www.windy.com/?-63.273,-79.277,3,m:YTadQA](https://www.windy.com/?-63.273,-79.277,3,m:YTadQA)

screenshot, just in case: [https://imgur.com/a/Jm2ir](https://imgur.com/a/Jm2ir)

Still looking at Windy.com, Alaska is getting hit with 150mph winds right now. I haven't heard about that, but Irma is huge news on the back of Harvey. I guess I might be sheltered a bit. I seldom think about the weather much.

<comment><USER35> You're looking at kt, knots, so roughly 45+mph winds. [http://imgur.com/a/7sIIU](http://imgur.com/a/7sIIU)

<comment><USER34> ah, that explains a lot! Thank you for clarifying.

</comment></comment></comment><comment><USER36> I've got a Christmas vacation booked in Providenciales and I give it a 50/50 chance the VRBO I booked will still be there.

People are trying to get off Grand Turk as fast as they can. The airlines have overbooked outbound flights and the airport is closing on Thursday for 48 hours. I'm hoping the damage is minimal. outoftacos mentions that eastern sides of the islands take more of a hit which gives some solace here.

</comment><comment><USER37> You can see a visualization of the approaching hurricane here: [https://earth.nullschool.net/#current/wind/surface/level/ort...](https://earth.nullschool.net/#current/wind/surface/level/orthographic=-62.10,15.50,976/loc=-51.028,21.881)

</comment><comment><USER38> I was born and raised in Cuba. I lived through Katrina, Wilma, and many others (while in cuba). For the most part, everytime theres any climate discrepancy the primate part of the brain activates -chaos and disorganization arise- Which is, in part related to the amount of casualties. Key things to do: -keep calm -seek higher ground -gather dry food, and non-perishable food (nuts, dry meat, canned fish, etc) -water -detachment of any material things. (Countless lives have been lost because people refuse to let go of their belongings) -dont wait until the last minute to take action.

In Cuba we didn't have nearly a quarter of the resources available in the U.S. We managed to minimize casualties because we kept our cool and didnt give in into despair.

<comment><USER24> > We managed to minimize casualties because we kept our cool and didnt give in > into despair.

It's been a shit show in Puerto Rico the last couple of days.

<comment><USER38> I can only imagine. Stay safe out there

</comment></comment></comment><comment><USER39> Winds started here in Guadeloupe. The sea is bumpy but not that much. Waiting for the night to come to see that will be.

Big thoughts for all those who will be less lucky than us.

<comment><USER24> You safe? Any updates? How's it been?

Expecting it here today/tonight (Puerto Rico)

<comment><USER39> Thank for asking. Guadeloupe Island is now safe, without major damages, but the French northern islands (St Martin and St Barthélémy) have been heavily impacted.

Don't have much news by now, but I saw video feeds that were very concerning.

Stay safe, I wish you the best. And tell us if you're ok tomorrow.

</comment></comment></comment><comment><USER40> I live in the Turks and Caicos Islands (Providenciales). We were lucky hurricane Matthew missed us last year, I suspect however that we won't be so lucky with Irma.

It's worrisome to say the least.

<comment><USER18> Good luck out there, and stay safe.

</comment></comment><comment><USER41> I already bought my flight out of South Florida. The worst should be over by the time it reaches Alabama so I figure anywhere NE/MW is good to hold out.

</comment><comment><USER42> I am (was) in FL. I fled the state. I pray it doesn't hit texas again, in FL we can at least take a huge hit.

</comment><comment><USER43> I got a question! What sets the upper bound of ~185mph on hurricanes?

</comment><comment><USER44> I really need to fill up my truck before there's another post hurricane price hike.

<comment><USER45> I think the price hike is mainly due to decreased refining capacity, I doubt a hurricane in Miami/SF would have the same effect.

<comment><USER44> IIRC there's a some refining capacity in NC/SC, also the oil companies know that not everyone knows where there is and isn't refining capacity.</comment></comment></comment>


Delta-V Map of the Solar System - <AUTHOR> https://twitter.com/derKha/status/956612860146221056?s=09 <comment><USER2> Nice. The original is apparently [https://www.reddit.com/r/space/comments/1ktjfi/deltav_map_of...](https://www.reddit.com/r/space/comments/1ktjfi/deltav_map_of_the_solar_system/cbsg4yy/)

It would be more nice if the delta-V were drawn to scale.

I don't understand why in this graphic the delta-v to the sun is something like 600 km/s but [https://en.wikipedia.org/wiki/Delta- v_budget#Interplanetary](https://en.wikipedia.org/wiki/Delta- v_budget#Interplanetary) says that it's 25-30 km/s.

<comment><USER3> These are usually designed for practical use; drawing them to scale just fills the image up with dead space.

The wiki page is listing the dv cost of a transfer orbit - no capture (assuming I'm looking at the right table). The dv map is showing the cost to land on the sun, including both capture into low solar orbit and landing from there (which is the really expensive bit for large bodies). Note that 440 km/s of the total 650 km/s listed on the map is that one step.

I personally prefer the subway-styled dv maps, but that may just be me: [http://i.imgur.com/AAGJvD1.png](http://i.imgur.com/AAGJvD1.png)

</comment></comment><comment><USER4> It's missing DeltaV to the asteroid belt. Clearly the reason is the long standing conspiracy to suppress the knowledge that the belt's resources are less costly to tap than Mars's!</comment>


C++ patterns using plain C - <AUTHOR> http://blog.noctua-software.com/cpp-patterns-using-plain-c.html

<comment><USER3> A complaint about all of the examples is the use of free() directly in main(). I dislike this because it implies that the "create", or "new" used a single call to (m/c)alloc to allocate the returned pointer. While this is the case for the examples, it may not be the case where you are only given a prototype for "base_new" in a header file, and you don't know of its implementation detail.

Such example might be a jagged array where you allocate several chunks of memory, and a final chunk containing the pointers to each one. Freeing the pointer returned for the memory containing these pointers will not free the memory pointed to by each pointer.

The person who wrote the _new function should write the maching _free, since he's really the only one who knows exactly what and how the "object" was allocated and how it needs to be deallocated.

If you find yourself ever writing such _new function without the matching _free, you're _doing it wrong_.

Even worse is the last list example, as it not clear where, or if memory is even freed at all from the code given. Does one of those macros free up the memory?

<comment><AUTHOR> That's a valid point. This is the reason why some C API (like the chipmunk physic engine), offer two versions of constructor functions: one that allocates the memory, and one that takes an already allocated pointer.

<comment><USER3> I also think that asking the user to allocate memory is bad (for OOP) design, because it is leaking information which should be encapsulated into the class. How does the user even know how, or what to allocate in order to work with your "methods"?

A constructor taking a pointer serves a useful purpose - it's the equivalent of a copy constructor.

However, one thing you missed from the examples (quite possibly for simplification of the blog post), is that "proper" OOP design in C is done by having opaque data types in headers, with their fields only in the implementation file - the "methods" you expose in a header all take a pointer to the opaque struct as their first argument, other than the constructor, which returns one. This is how you provide the encapsulation of classes, equivalent to private fields, if you like - which should generally be the case for non-PODS.

<comment><USER4> _I also think that asking the user to allocate memory is bad (for OOP) design, because it is leaking information which should be encapsulated into the class. How does the user even know how, or what to allocate in order to work with your "methods"?_

What? Gods no!

The user knows more about their runtime environment than your objects--indeed, consider this a form of DI for memory management.

Libraries that don't let me override allocations, file access, and logging are very, very bad.

<comment><USER3> In that case you would inject a function pointer to an allocator (and deallocator), however, the object constructor is the only thing which knows _how_ to allocate the object - consider the jagged array example I gave, or even a linked list - the user has no idea how they're allocated if given just an opaque pointer.

</comment></comment></comment></comment></comment><comment><USER5> Never do this!

I've worked in a large company with a legacy codebase that attempted to do this in the 90's when C++ & inheritance was the latest-thing. It has turned out to be a real maintenance nightmare for them, it obfuscates normal code scaring off anyone who looks at the it. Lack of tooling is a major issue, try getting eclipse to find the definition of one of your virtual methods...

This is before you consider that all it gives you is inheritance. Wide use of inheritance is an anti-pattern and this gives you the mechanism without the ease-of-use that makes it maintainable.

In summary... _AVOID DOING THIS AT ALL COSTS_ (It will cost you when you need to re-write in a sane way in a few years time).

Anyway... this has been done hundreds of times before, ever heard of CFront??

</comment><comment><USER6> Welcome back to the 80's, where C++ used to play with macro to make templates and inheritance was only a basic compiler trick.

I can only emphasizes the need to move to real C++ if you want to use C++ idioms, to do it safely and performances wise: here you just opened the gate of Macro error's hell which will be more horrible than anything the C++ could throw at you.

<comment><USER7> The code in the article is just a plaything, a C programmer wouldn't use any of that and wouldn't use C++ as a starting point for their C implementation. Don't let it reflect negatively on C.

<comment><USER8> In what way? I have seen several examples of C programs that implemented a form of interfaces using structs of function pointers. The GIMP code base does it, as does the Linux kernel's Virtual File System layer. This is a good overview: [https://www.kernel.org/doc/Documentation/filesystems/vfs.txt](https://www.kernel.org/doc/Documentation/filesystems/vfs.txt)

</comment></comment></comment><comment><USER9> I'd miss the STL more than anything. It's so much nicer than any of the remotely comparable C data structure + algorithm libraries. That plus RAII are enough to keep me on the C++ side.

<comment><USER10> The STL has huge mistakes like the completely useless "std::list".

It also does a whole lot of unnecessary dynamic allocations due to the non- intrusive style used for all of its containers.

I think the STL might be overhyped.

<comment><USER11> It would help if you could point me to something that is better than STL (in performance and ease of use) and addresses the full scope of STL. I have asked this a few times, but all I have got so far is cricket chirps or pointers to worse bloatware. Not claiming that such a thing does not exist, rather would be happy to give such a thing a try. It would also lend more heft to your comment.

<comment><USER12> Any library that addresses exactly the same use case as STL is going to have the same limitations as STL. Everything is a trade-off. I think you can probably assume that STL does about as good a job as any library would, given identical trade-offs. Note that the actual implementations will vary by platform and compiler.

</comment></comment></comment></comment><comment><USER13> Aka as "lots of hacks using non standard C, while forcing the developer to do the work of the compiler".

<comment><USER14> Yon mean "non idiomatic", right? I don't think he used anything non standard.

<comment><USER15> The max macro in Section 4 is using two separate GCC extensions: typeof and statements in expressions.

</comment></comment></comment><comment><USER16> I couldn't care less about trying to reimplement classes in C — structs and functions will do just fine thank you very much. What about something actually useful, like RAII to simplify memory management?

<comment><USER17> _RAII_

Please, yes. It happens I just spent the morning writing some C with files, views of those files etc, and I kept on whishing there was RAII, instead of having to build flow around the fact each of the operations might fail.

Is there a clean way to implement something like this in C?

 _I couldn 't care less about trying to reimplement classes_

indeed - the premise the OP starts with, i.e. 'here's the simplest class: BANG two subclasses' is also wrong. That is inheritance, not just 'the simplest class' as that wouldn't have anything to do with inheritcance.

<comment><USER18> I remember something implemented as GCC extension (the cleanup variable attribute) but I never used it so I can't judge if it's really what are you searching for.

<comment><AUTHOR> Gcc cleanup extension works very well for RAII, I used it extensively to write a simple profiler for a video game project (just add 'PROFILE' on top of a function to have it automatically profiled). The only problem is that this is not supported by MSVC.

<comment><USER19> It is supported by clang though. Maybe you could use clang-cl to get it into msvc no?

</comment></comment></comment></comment></comment><comment><USER20> This is a nice article for anyone who wants to understand typical implementation of basic C++ features but in the end I'd say it makes the case for actually using C++ instead of reimplementing it in C.

If you do go the OOP-C route, one thing that's nice is that you can compose objects of different super types. In C++ an object belongs to one class of a hierarchy but in OOP-C it's conceivable that the vtable dispatches to a different mixt of virtual functions per object.

Also, nice trick with the #define T/#include __FILE__. Hadn't seen that before.

</comment><comment><USER21> I've always liked to keep in mind that C++ was developed as an extension to C ( [http://en.wikipedia.org/wiki/Cfront](http://en.wikipedia.org/wiki/Cfront) ), so most of the constructs that it has can be directly mapped to C --- I think the only exception is... exceptions, although there's probably a way to do it using setjmp/longjmp too.

Personally I prefer C because of all the added flexibility it allows, but I can definitely see the value of a lot of the features added by C++ - <USER2> programmers were using structures and function pointers before, now they can use classes. RAII - a nice benefit of the semantics of constructors and destructors - is a more implicit, easier way of doing the same thing manually by calling the appropriate functions. Templates make it easy to generate a lot of otherwise very similarly structured code. Operator overloading can replace function calls and make some expressions look clearer.

However, the biggest disadvantage of all these features is that they add complexity and cognitive overhead to understanding the code - abstractions are only truly useful to those who know what the abstractions are of. That's why I believe that anyone who wants to learn C++ should already have strong knowledge of C (including structures, pointers, and memory allocation), and preferably know some Asm; then the transition to using the features of C++ feel straightforward and natural, without the "I don't know how it works, it's all magic" feeling to them. It's for this same reason that I recommend reading through the code of the STL - a good one to start with is std::vector.

<comment><USER12> >>I think the only exception is... exceptions, although there's probably a way to do it using setjmp/longjmp too.

I'm pretty sure that C++ exceptions could be simulated that way.

>>Templates make it easy to generate a lot of otherwise very similarly structured code

Templates are a mixed bag. There are a lot of things that look like they should be possible with templates, but once you start trying to implement them, it suddenly becomes much more difficult. Most of the practical value of templates is in getting around data type limitations and in inlining, IMO. Luckily, C has simpler data types than C++, so there is less need to climb over barriers, but templates do provide some value over C in this respect. The value with respect to inlining may be decreasing as C compilers become more sophisticated, but I'm not certain. std::sort() is said to be faster than qsort(). I've wondered if there is any way to coax a C compiler into inlining the sort routine, callback and all, but I haven't tried it yet.

<comment><USER11> >I've wondered if there is any way to coax a C compiler into inlining the sort routine, callback and all, but I haven't tried it yet.

And how is the compiler supposed to inline the callback in qsort() when all it has is a pointer that will be provided only at runtime ? With JIT yes that would be possible. This requires a runtime optimization solution, not a compile time. This is also the reason why templates come so handy, sans the error messages (although GCC has improved by leagues, now to the point I find GCC's error messages easier to debug STL code with than Clang's). The error message scenario would a be a lot better once they get concepts sorted out.

<comment><USER22> I don't have stats, but I would think that the comparison function's definition typically is available at compile time.

Also, if the compiler gets the qsort prototype by including it from the system header <stdlib.h>, I think the compiler may assume that it is the standard qsort function. So, it could emit a custom qsort function that inlines the comparison function.

<comment><USER12> >I don't have stats, but I would think that the comparison function's definition typically is available at compile time.

The comparison function usually will be. The qsort function generally won't be available.

>Also, if the compiler gets the qsort prototype by including it from the system header <stdlib.h>, I think the compiler may assume that it is the standard qsort function. So, it could emit a custom qsort function that inlines the comparison function.

It could do something like that, but gcc doesn't ([https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Other- Builtins....](https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Other- Builtins.html#Other-Builtins)).

If you look at the kinds of API functions implemented as builtins, they are generally simple.

</comment></comment></comment></comment></comment><comment><USER23> I think this proofs Scott Meyers point about the most important feature we have in C++: the destructor.

</comment><comment><USER24> The problem with many of these OO in C workarounds is how well they work at scale. For small projects, they're fine. But in larger projects, the compromises in the design begin to show up and require additional patching. This same problem--increasingly messy code to emulate C++ features--led to the abandonment of cfront and the development of true C++ compilers.

<comment><USER25> The scale argument is dogma. We already know huge, successful code bases exist in C and many employ similar techniques to this. (These are pretty mild tricks.) Additionally, the scaling argument is often used to belittle other languages like Python, Ruby, Lua, JavaScript, etc. All propaganda BS.

</comment></comment><comment><USER26> I have written related article

[http://www.avabodh.com/cxxin/cxx.html](http://www.avabodh.com/cxxin/cxx.html)

</comment><comment><USER27> I could probably live with most of this, but the macros make me want to gouge my eyes out. C macros just have too many issues

</comment><comment><USER28> It's fun to know how we implement these stuffs in C but not fun enough to use them :)

</comment><comment><USER29> Three other ways to do OOP in C

[http://www6.uniovi.es/cscene/CS1/CS1-02.html](http://www6.uniovi.es/cscene/CS1/CS1-02.html)

</comment><comment><USER30> I hate when people try to do this, it makes the code almost unreadable, if you want to use classes, use C++.

</comment><comment><USER31> Basic template: how do you single-step through a multiple-statement macro? Advanced template: where's specialization? Also, where's RAII?

Nothing to see there, move on.</comment>


Why the yakuza are not illegal - <AUTHOR> http://www.economist.com/blogs/economist-explains/2015/09/economist-explains-20 <comment><USER2> "Should we outlaw this" vs "freedom" is an interesting and hard problem especially if you are generally inclined to mistrust the state and not see it as a great benefactor of humankind by default. I live in a country that is quicker to outlaw certain things which in the US would be considered a breach of freedom of speech (or religion). Nazi symbols is one example but 1%er symbols were also outlawed for a while until it got overturned. I'm favoring the "don't outlaw" stance but the other side has sensible arguments as well.

Scientology is another good example. I can see the argument for "freedom of religion" but depending on your views about the state it has a certain obligation to protect citizens from their own idiocy. The borders in the sand are hard to draw.

A very common case is that people who vehemently disagree with outlawing Scientology also strongly believe vaccination is a good idea. I think that's a fairly inconsistent stance but it is also completely reasonable (as in it protects the person and also others like their family in both cases).

Political parties are also a good example. I think the stance of "never outlaw, society has to handle that and let the idiots be idiots" is perfectly reasonable but parties get tax money for various things and I can see how people have a problem with their tax money funding neo-nazi organizations.

I used to be more radically pro freedom no questions asked but these days my stance is pro freedom by default but some deep thinking and gut check for individual cases. It bothers me a lot that I'm fairly inconsistent (since I am against maximum freedom in quite a few cases) but it's the most reasonable course of action for my value system.

<comment><USER3> Summary: can't outlaw Scientology, can't legally compel vaccinations. I'm against Scientology, I'm for vaccination. Neither of the opinions should ever be codified into law.

I'm pretty certain vaccination isn't "the law." The only thing compelling anyone to have their children vaccinated are the rules (not laws) for public education (keep in mind: I'm in the US and public school systems differ from county to county in my own state.) You're not required to send your children to public school; they can allow vaccination exceptions on a case-by-case basis ... there's a good amount of freedom here.

That said, I want my children vaccinated. And in the rare medical cases where they can't be vaccinated, I want to know they're safe from people who might carry a life-threatening disease (i.e. others who aren't vaccinated.) It's a tough balance, but the socially responsible thing is to vaccinate, or avoid diverse social contact (such as ... public school.)

<comment><USER4> There's a _reason_ these freedoms are protected. They're not just axioms of a society. Most of them stem from one very strong principle: if you don't have and _extremely_ good reason to know something, then you can't prohibit the alternatives, because you may be prohibiting improvements. And in the long run, it's better to have 9 people fail and one succeed than to have 10 people do nothing new.

But you can have laws that guide behavior. Those 9 people who will fail? You can learn the lesson about that failure and make it illegal to fail in the same way. For instance, at one time, you were free to beat your children, because nobody really knew that it wasn't the most effective way to teach them. But if you have overwhelming evidence that it doesn't work, then you can make it illegal. You still have the freedom to choose how to raise your children, you just can't do it in obviously failure-prone ways.

So yeah, you can outlaw (parts of) scientology and legally compel vaccinations when those actions are shown to definitively run counter to the justification of those freedoms in the first place. You are not free to make clear and obvious mistakes. Take any safety law as an example.

The only thing you really need is proof.

<comment><USER5> A nitpick: you are of course free to make any costly mistake if it _only affects you_ and no one else.

Various safety laws protect innocent bystanders from mistakes other people make, e.g. losing control of a car due to excessive speed or alcohol intake, or spreading a virus.

The fact that tax money is spent on various social protection things, like health care, allows to legally limit one's apparently personal choices, like smoking, that increase the tax money spending due to those choices. Such is the nature of most, if not any, tax-funded welfare features.

<comment><USER4> There are very few costly mistakes that only affect you, though. I actually can't think of a single one.

Emergency healthcare is a public resource (you can only handle X patients per unit time) and it's a costly one. I would bet that most safety laws are forcing you to protect yourself by way of doing simple things that lower public medical costs. Even if you commit suicide, _someone_ has to clean up your remains and deal with the potentially dangerous bio-materials.

Yes, you are free to do things that hurt only you, but good luck finding anything that does.

<comment><USER5> Why, damaging or destroying your property, or entering an utterly disastrous but legal contract can be examples, both pretty wide categories.

<comment><USER4> There are limits on those things, though. You can't burn your house down. You can't live in filth. You can't strip mine your land or pollute it. And you can get thrown in jail for failing to fulfill certain contracts, so it can be indirectly illegal. There's also fraud: you can't lie to enter a contract you know you can't fulfill. And it _should_ be illegal to exploit people by offering them contracts they can't be expected to fulfill, even if it currently isn't.

Sure, I can just smash up my stuff or start a risky business. But the reason for that is that there isn't proof that what I'm doing constitutes failure. (They could be very educational activities.)

</comment></comment></comment></comment></comment></comment></comment><comment><USER6> Was expecting "because they control a lot of money", but got reasoning more in line with Ankh-Morpork's Patrician's view on the Guild of Thieves.

<comment><USER7> Thieves' Guild - Formally the Guild of Thieves, Cutpurses and Allied Trades

[https://en.wikipedia.org/wiki/Guilds_of_Ankh- Morpork#Thieves...](https://en.wikipedia.org/wiki/Guilds_of_Ankh- Morpork#Thieves.27_Guild)

</comment></comment><comment><USER8> Because making membership of an organization illegal is a violation of freedom of association, as guaranteed by Article 21 of the Constitution of Japan?

<comment><USER9> Freedom of association does not typically disallow the government from designating certain organizations to be illegal and barring membership in them. Happens here in the US all the time. No freedom is absolute. What keeps them from abusing it here is checks and balances.

For example, trade unions were considered an illegal restraint on trade until the Clayton Antitrust Act of 1914. Also, certain forms of corporation have been made legal and illegal over the course of history.

<comment><USER8> Unlike Japan, the USA _doesn 't_ have an explicit constitutional guarantee of freedom of association (though the Supreme Court - reasonably - starts to read such a right into the first amendment in the 50s).

If I understand what I'm reading correctly, the pre-1914 trade union ban was _not_ a ban on association (workers could still form professional associations, working-men's clubs, etc.) but on "cartel-like" behaviour: collective bargaining, strike action, etc.

<comment><USER9> I wouldn't read too much into it, Japan has a Western style constitution, and the idea of a universal right to free association didn't really start to coalesce until the mid-20th century. Japan's constitution happened to get ratified in 1947. If we had to do the US Constitution over, there would probably be freedom to associate codified.

</comment></comment></comment></comment><comment><USER10> They were historically a legitimate feudal organization, they have a strict code of honor, they provide aid to local people in the event of natural disasters, they have political ties, there's few Japanese laws specifically to help prosecute organized crime, some of the groups disdain certain activities like theft or drug trade, and they operate in a quasi-open fashion.

<comment><USER11> All that's changing, though. The younger guys eschew tattoos and finger chopping. Plus, they view drugs as an increasingly important part of the business.

They're being driven slowly underground with changes in the law, and when that process is complete they'll probably be few in number but far more violent.

<comment><USER12> > All that's changing, though. The younger guys eschew tattoos and finger > chopping.

Echoing a generational change in the nation in general.

Damn it, it may be easy to forget but Japan was feudal until the 1800s (the last shogun stepped down in 1867). And their WW2 militarism was something of a last hurrah of that.

Since then it seems to have been directed more inwards, in how they run businesses etc. The execs care for the workers, and in return the workers dedicate themselves to the company (or some such).

As best i can tell, the core of most stories produced in Japan even today can be boiled down to the old samurai question of duty vs self-respect.

Meaning that you will find a endless row of characters that spend time agonizing over following orders (or expectations) from their superiors, even though they personally find it wrong or offensive in some way. Looking for some escape clause that allow them to appease both.

</comment></comment></comment><comment><USER13> How is this so much different than HA? It's not like their hangouts are unknown and unlisted and members make a big deal of showing where they belong.

<comment><USER14> What's "HA"?

Edit: Never mind. Hell's Angels. Maybe if HA had been around since the 1600s, nothing ;)

<comment><USER15> I read it as 'high availability'...

<comment><USER16> Constantly in a turf war with QOS.

</comment></comment></comment></comment><comment><USER17> It's very scary that the world has become a place that people think it's normal to arrest people just because they are a member of a group without any evidence that person has committed a crime.

<comment><USER18> I think it's completely normal and I expect people to be arrested for belonging to neo-nazi organisations, especially since simply displaying any nazi symbols is illegal where I live(as it should be). Is that scary?

<comment><USER19> > Is that scary?

Yes. Because making other people's beliefs illegal is the first step towards forcibly supplying your own.

<comment><USER18> Well.....Hitler should have been and in fact was forcibly stopped from practicing his beliefs. In my mind, people who walk in front of Auschwitz with swastikas on their flags and shout how X minority should be exterminated also should be stopped. Those people _should_ be forcibly supplied other beliefs, just like rapists are forcibly put into prison and forced to accept a different set of rules from their own.

<comment><USER19> And what about atheists' beliefs in a country largely populated by theists? How should we treat them?

It's easy to say that you think that speech that is almost universally repugnant should be illegal. The problem is that the benefit from doing so does not outweigh the risk that some day you may hold a socially repugnant belief of your own and find yourself legally silenced.

</comment></comment></comment></comment></comment><comment><USER20> The article does not really go into why.

<comment><USER21> The why is that they have compartmentalized their organization enough so that law enforcement can't prosecute them. There's never any provable direct links to criminal activity so members can parade around in full view without worry about arrest. If you are a member of these orgs all you do is pass money between lawyers.

Triads and Yakuza offer a package like SaaS. You pay them for all your various operational needs but they do not get involved in your business, so you are free to do whatever you want, so long as you keep paying them a monthly fee by using their laundering services, and you don't heat out the streets so much that it affects business. Everybody works with them because they have their own banks and financial networks built over decades with rules about not burning customers.

No lesser gang will run the risk of rising up against them and there really is no reason to since they are not involved in your decision making they are just cleaning your illegal profits at 30% fee and offer capital to expand your criminal operations. They also have extensive prisoner services and since every gang member ends up doing a few months for being caught with an illegal handgun you need them to pay off rivals not to kill you inside, to pay your family money while incarcerated, to offer you credit when you come out to restart a drug business ect.

Now you see where the myth of the Yakuza and Triads having millions of hitmen comes from, since all their customers are criminal street gangs it's trivial for them to organize mass violence by merely calling in all their favors through a proxy. Street gang X probably had members avoid jail with an expensive defense attorney the Yakuza provided, so being thugs they will jump at the chance to pay back the debt with violence since that's what they specialize in anyway.

</comment></comment><comment><USER22> I'd like to think it's because the cost of fighting them is higher than the cost of letting them operate.

Sadly it might be more to do with social acceptance.

</comment><comment><USER23> > At least now they are regulated and subject to the law

Even when they are breaking the law?

<comment><USER24> The police in Japan does not go against Yakuza unless they want to show off or make an impression. There is a clear understanding of each other's boundaries and most of the time there is no investigation going on with gangs' actions.

</comment></comment><comment><USER25> Summary: Probably not illegal because

"Japan, it seems, prefers organised crime to the disorganised alternative."

<comment><USER26> It's actually a bit complicated.

One premise is that the Yakuza is very hierarchical, not only a personal hierarchy in clan internally, but as an organization. Members of the most major Yakuza clans, for example Yamaguchi-Gumi, are a leader of another clan himself, one tree down from the parent clan itself. So, when they say there's a certain Yakuza clan, you are not talking about one clan manging people under them; you are probably talking about tens, perhaps hundreds of organizations under the clan, which can stem two or three levels down. (So when they talk about 23000 clan members, that's including everyone in the tree -- there are only a little more than 80 members in "Yamaguchi-Gumi" itself.)

Essentially, as a "public stance," many higher organization "prohibits" lower organizations down the tree from engaging in illegal activities. For example, Yamaguchi-Gumi's known to have very strict "no-drug" policy, and they even tell their under if they engage business of drug dealing, they will shun offenders.

But here's a problem. Basically, it is expected that lower clans pay a membership due regularly to higher clan, and it can get very costly as a person goes higher up on the tree, except the leader of the very top clan himself, perhaps. (As a side note, a lot of news speculates this is probably why split of the Yamaguchi-Gumi took place in the first place.) That's you are talking about payment of 100000yen-ish (basically $10000-ish) every month.

Being a leader of a clan under the main clan themselves, they will naturally order their henchmen below to pay him a membership dues. As you go down the tree, someone will have to get their hand dirty to make that kind of money; they could be legally to down right illegal business like prostitution (there's very legal gray areas of this in Japan), loan sharks, and some do, turn to crimes mainly, like fraud, and exploitations in order to make that kind of money.

Essentially, while it is an argument that laws and regulations are attempting to make it harder and harder to get away with, basically the top clan's saying "hey, I am telling everyone to not engage in illegal activities, we even fire when they violate it, so we are not responsible for their actions."

<comment><USER27> Quite similar to how these things happen in corporations. No exec ever makes a decision to violate the law, they just put underlings into stressful situations where they can't achieve the set goals without doing so.

The people at the top can then say they knew nothing of it, and they're shocked, _shocked_ , that their employees would do such a thing.

<comment><USER26> Their "contract" between their pseudo kinship makes it very difficult for someone in the lower hierarchy to blame their upper, let alone whistle blow, about such wrongdoing without very severe consequences.

Many of clan members would voluntarily accept imprisonment by limiting blame to themselves instead of to their upper or their immediate upper would pressure for them to do so, which I don't necessarily think the case for corporations. (I wouldn't say this doesn't exist, though.)

</comment></comment></comment></comment><comment><USER12> Better the gangsters you know,than the gangsters you don't?

</comment><comment><USER28> What if they didn't exist, would Japanese society be better? It looks like all the good points they have could be replaced by local community initiatives and collective planning.

Imagine a society free of aggressive and predatory crime. It's possible with the technology we have today. What are we waiting for?

<comment><USER29> > Imagine a society free of aggressive and predatory crime. It's possible with > the technology we have today. What are we waiting for?

The concern is generally what else you give up in order to remove the crime.

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

<comment><USER30> We've been trained by the works of fiction to immediately pattern-match high- tech crime prevention with dystopia, but I think it might be good to stop for a minute and consider if the belief isn't seriously biased. It's incredibly hard to make an utopia that's not immediately boring - to be enjoyable, narratives _require_ conflict. Even Star Trek, arguably the last popular sci- fi with positive outlook on the future, just took the conflict out of the utopian Earth and moved it somewhere else. So the reason crime-solving technology leads to dystopia is not a feature of the tech, it's just because an utopia would be boring.

<comment><USER29> No, we've been trained by centuries of experience that the concentration of power invites abuse.

Before we give the government the tools to monitor and control the populace, we need to make sure the populace has the tools to monitor and control the government. (I originally wrote "any organization", but any organization with such compulsory power becomes the de facto government...)

A recent sci-fi with a positive view of hyper-tech civilization is "The Culture" (Iain Banks). However, the interesting stories there all occur on the borders, with the interaction of the Culture with non-Culture civilizations. "Player of Games" is a good starting point.

<comment><USER28> > No, we've been trained by centuries of experience that the concentration of > power invites abuse.

And this is what tech can solve. We could be "ruled" by adaptive algorithms we collectively vote on. If a better algo is discovered it can be voted up and eventually replace another.

Many refer to society as a machine, what would happen if we really treated it like one?</comment></comment></comment></comment></comment>


Technocracy discussion on Reddit - <AUTHOR> http://www.reddit.com/r/todayilearned/comments/3284f0/til_there_was_a_briefly_popular_social_movement/

<comment><AUTHOR> I saw this technocracy discussion on reddit. I was wondering if HN would throw in their two bits? Or you know, maybe more than two bits. What do you guys think of a technology driven government?

</comment><comment><AUTHOR> The discussion on reddit has devolved to people shouting insults at each other in binary.</comment>


LaunchNotes is generally available today - <AUTHOR> https://techcrunch.com/2020/05/12/launchnotes-helps-companies-better-communicate-their-software-updates/ <comment><USER2> Great new app for bringing your Release Notes into the Continuous Delivery age!</comment>


One-pass Compiler - <AUTHOR> https://keleshev.com/one-pass-compiler-primer <comment><USER2> Lua is an example of a programming language that still uses an one-pass compiler. It keeps the implementation small, which is useful in embedded contexts. Additionally, not constructing an AST helps when parsing very large files. Lua files are sometimes used to store data, sort of like JSON.

</comment><comment><USER3> Reminds me of "Let's Build a Compiler"

[https://compilers.iecc.com/crenshaw/](https://compilers.iecc.com/crenshaw/) circa 1995

And a new C version [https://github.com/lotabout/Let-s-build-a- compiler](https://github.com/lotabout/Let-s-build-a-compiler)

</comment><comment><USER4> If anyone's interested in a simple single-pass compiler for a full language, you can also check out munificent's Crafting Interpreters[0]. It walks you through a Java based AST parser and C based bytecode compiler.

[0] [http://craftinginterpreters.com/](http://craftinginterpreters.com/)

</comment><comment> nils-m-holm There are a few trivial optimizations that you can do even in a one-pass compiler. See [http://t3x.org/t3x/comp.html](http://t3x.org/t3x/comp.html)

Details are described in the book Write Your Own Compiler, [http://t3x.org/t3x/book.html](http://t3x.org/t3x/book.html)

</comment><comment><USER5> Cool stuff! Register management is a pain to do. It's nice to be able to leave that to LLVM or treat x86 as a stack machine.

I wrote a compiler series exploring all three of these variations for a lisp dialect compiled by JavaScript.

[https://notes.eatonphil.com/compiler-basics- an-x86-upgrade.h...](https://notes.eatonphil.com/compiler-basics- an-x86-upgrade.html)

</comment><comment><USER6> Tangential - in your work in progress compiler book [https://keleshev.com/compiling-to-assembly-from-scratch- the-...](https://keleshev.com/compiling-to-assembly-from-scratch-the-book) are you going to write yourself the lexer and parser or use Flex and Bison like in the article ?

<comment><AUTHOR> In the book, lexing and parsing is done from scratch. I think tools like Flex and Bison are very handy, but for the book, my focus is on learning value.

</comment></comment><comment><USER7> I wrote something very similar recently, also a single-pass, but with a trivial internal representation:

[https://github.com/skx/math-compiler](https://github.com/skx/math-compiler)

The real difference between the compiler in the example, and mine, is that I handle floating-point operations and also explicitly use printf to show the output. (Because otherwise your return value is limited to an 8bit number.)

<comment><USER8> This is nice. The -debug flag is a cool feature. But if you first build a representation of the whole program in memory, then traverse that representation to generate code, it's not really single-pass.

<comment><USER7> Sorry my comment was wrong, I should have said "not a single-pass", that's why I mentiond the trivial internal representation.

Too late to edit now!

</comment></comment></comment><comment><USER9> I remember some of the old DOS compilers would generate similar code, using the stack as an actual expression evaluation stack when registers weren't sufficient. It's not a bad idea even now, since x86 has an internal cache of the top of the stack so operations on it are specifically optimised, and the opcodes are very small: push/pop reg is 1 byte, push s8 is 2.

</comment><comment><USER10> I'm currently working on a 3-part blog series on writing a one-pass compiler in Python that emits C. It is quite a bit longer though because we make the lexer and parser from scratch. I started it because my students were having trouble with other tutorials because of all the jargon, theory, and libraries required.

[http://web.eecs.utk.edu/~azh/blog/teenytinycompiler1.html](http://web.eecs.utk.edu/~azh/blog/teenytinycompiler1.html)

<comment><USER11> Good text, but let's nitpick. I'm too lazy/confident/arrogant to verify, so let's potentially embarrass myself here.

        def getToken(self):
            self.skipWhitespace()
            self.skipComment()

How does that handle multiple consecutive comments? Whitespace following a comment?

(returning 'comment' and 'whitespace' tokens would fix this, and would make it possible to reuse the lexer for pretty-printing/syntax coloring)

<comment><USER10> It works because a comment by definition goes until a newline, so you can't have consecutive comments without a newline token in between.

I'll look into if there's a better way to do it than this based on your suggestion, thanks!

</comment></comment></comment><comment><USER12> I've been writing a one-pass optimising compiler for Wasm. It's not perfect, but the code it outputs currently outperforms Cranelift's by a factor of 2-10x for many of the files in the Wasm specification testsuite.

<comment><USER13> Wow, that sounds incredible. Is that a .wasm -> .wasm compiler?

</comment></comment><comment><USER14> That was a short and epic read.

> This limited both the language features that were possible and the quality > of the produced code.

What are the limitations ?

<comment><USER8> Older versions of C had the restriction that variables could only be declared at the start of a block. Supposedly this was due to the original C compiler being one-pass. It's easier to keep track of the size of the stack frame if you see all declarations in one place. Though I think with a frame pointer you could make it work anyway. You have essentially the same complications if you allow programmers to open a block anywhere and declare variables there. I don't know if the very first versions of C allowed this.

Maybe more exotically, here is a legal Haskell program:

        compute = f x y
        x = 3
        y = 4
        f = (+)

Using typed identifiers before they are declared would not be possible in a single-pass compiler. You wouldn't know what code to emit for compute since you wouldn't even know its type until you have seen the definitions of x, y, and f.

Interestingly, this restriction does not apply to goto labels, which you can use first and define later: The compiler can just emit the label as written into the assembly code and let the assembler worry about patching up the jump target.

<comment><USER15> >Older versions of C had the restriction that variables could only be declared at the start of a block.

Pascal also has that restriction

Although Delphi does not have it anymore. But FreePascal still has it, even in Delphi compatible mode. The FreePascal developers have also said, they will keep that restriction to improve readability. The code could not be read anymore if variables were placed willy-nilly everywhere

<comment><USER16> I've heard the readability justification for C restriction, but it doesn't make sense: this prevent ´constification' of variables (make the variable contains only one value)..

</comment></comment></comment></comment><comment><USER17> I'm actually working on a Pascal compiler right now. Register management has been a really tricky part for me, but I didn't even thing of treating an x86 processor as a stack based machine. Very clever, especially when you just want a simple compiler an not anything super optimized.

<comment><USER3> A simple optimization is to make a stack machine with the top of stack cached in a register. This can improve speed about 10% in general operation.

</comment></comment><comment><USER18> The author states:

>"An optimizing compiler would constant-fold our expression into a single number ahead of time."

Could someone say what is meant by constant-folding here?

<comment><USER7> As a concrete example I wrote a simple interpreter a while back, in golang. Operations would be compiled to a simple bytecode which would be executed at runtime. So:

         3 + 4

Would get "compiled" to:

         PUSH_INT 3
         PUSH_INT 4
         OP_PLUS

As you can imagine this was a virtual stack-machine. After a while I started folding these operations:

* If there was a "push int"

* And another "push int"

* And a maths operation.

* Then replace.

So in my case I'd first generate the naive version, then have a separate "optimise" pass which would rewrite the program:

         PUSH_INT 7
         NOP
         NOP
         NOP
         NOP

A later optimization pass would remove consecutive NOP operations. I made a brief blog-post here:

[https://blog.steve.fi/adventures_optimizing_a_bytecode_based...](https://blog.steve.fi/adventures_optimizing_a_bytecode_based_scripting_language.html)

There were a couple of bugs found along the way, but the actual implementation of this optimization pass was pretty simple:

[https://github.com/skx/evalfilter/pull/66/files](https://github.com/skx/evalfilter/pull/66/files)

The biggest issue I had to face was that "1 + 3 => 4" is trivial, but my virtual machine only supports loading integers. So I couldn't collapse "2 * 3.3" into the constant "6.6".

<comment><USER4> For anyone wondering, the NOPs are so that jumps don't get messed up. Assembly level GOTOs generally work on byte/word offsets, so if something intended to jump back before the calculation but was expecting two PUSH_INTs and an OP_PLUS (5 words: 3 opcodes, 2 arguments) but there was only a single PUSH_INT (2 words), it would jump back 3 words too far.

<comment><USER7> Good clarification, and exactly right!

Later I do walk back over the bytecode and remove the nops. But I have to update all JMP/CALL instructions to cope with the changed destination offsets. Not a hard job in my case, as there are only a couple of instructions which refer to byte-offsets.

(If I allowed "LD A,[BC]", or similar permuations I'd have a lot more work to do.)

</comment></comment></comment></comment><comment> non-e-moose A one pass compiler is going to generate code which is slower than a modern JIT/interpreter. Why is a one pass compiler interesting?

<comment><USER19> Because they're really fast. Actually, the lower tiers of modern JITs actually need speed, so being able to do code generation in one pass there is a huge boon.</comment></comment>


A different approach to bookmarking  - <AUTHOR> http://copyto.co

<comment><USER2> To be "honest", "different" here means "almost identical to historious, diigo, evernote", etc. There already are plenty of players in the space, but delicious has spoilt users enough that they don't want to pay for these services.

<comment><USER3> There are some differences though like copyto lets you save selected parts of a page which is kind of the whole purpose behind

<comment><USER2> Hmm, I thought Evernote lets you do that as well. Regardless, though, competition is always good!

<comment><USER3> Evernote does pretty much everything thats for sure. 30 million funding should do the trick. Historious is also a nice alternative though, at least they have a stable path only on bookmarking. Anyways competition really makes services better.

<comment><USER2> Haha yep, you're spot on for evernote...

</comment></comment></comment></comment></comment><comment><USER4> I stronly suggest you experiment with charging a one-time fee based on your estimated lifetime value of a customer. $1.99 in monthly fees for a personal utility like this is not too much to pay, it's the mental overhead which stops me from buying it. And you lose money per transaction.

Pinboard's pricing model is great here. A one-time fee of around $10 to use the service and $25 per annum archival fees. You should consider doing something similar.

<comment><USER5> Pinboard has also a roadmap, so you know what to expect in the next months.

The monthly fee is a good "you can stop when you want" argument. If a new bookmark service with an innovative feature comes out in 2 months, you can change without hesitation.

Maybe propose both choices. Something like 22$/year or 1,99$/month.

<comment><USER6> I think a recurring fee for this kind of service is a bad idea. Either you spend some time each month deciding whether you got $X of value, or you choose not to bother and feel vaguely taken advantage of (at least, that's my own personal experience with Audible.com and other monthly services).

Thanks for reminding me to go update the roadmap :-)

</comment></comment></comment><comment><USER7> This seems like a step in the right direction, but I'd love to see a bookmarking service make accessing and utilizing bookmarks easy by 1) indexing bookmarked pages and extracting keywords & identifying content & enabling tag based search + auto-organized index 2) offer an easy to use interface for accessing the bookmarks.

The main annoyance I have with bookmarking present day bookmarking tools is the amount of steps it requires. Selecting text to be bookmarked is nice but it's an extra action. I don't want to have to file/tag/place in folder, mouse drag and click around just to bookmark a page. Why not a single click?

*currently using the note in reader bookmarklet for google reader

<comment><USER8> My experience is that the easier to bookmark a page the least likely I will get back to it (except the two dozen or so in the bookmarks bar in Chrome).

I built for my own use with Google App Engine this service I call "ting" (sample search: <http://ting-1.appspot.com/rt?rt=startup>) and with each link I want to save I enter tags and a summary; this way I know I only save pages that I really believe will be useful to me in the long run. (I also cut and paste the link, making it even more time consuming)

</comment></comment><comment><USER9> (Edit: Disregard this comment. Copyto has a fine business plan, a flat $1.99/month fee.)

I have a policy of only investing my time in a service if I know their monetization plan, to avoid getting burned by shutdowns or features moved to premium account plans. Does Copyto have one yet? I see no ads, the privacy policy is strict enough to make data-mining impossible, and there doesn't seem to be a way to pay.

Other than that, this looks great. It has all the features I use on Pinboard, and the thumbnail view could be handy.

<comment><USER10> I'm confused by your comment and the replies to it. Maybe the page changed since you posted it, but if you visit the sign up page[1] now, it says (in big letters, right up at the top left):

        just for $1.99/month
        no limit, no fancy premium upgrades.
        no contract needed, cancel anytime.

[1] <http://copyto.co/signup.php>

<comment><USER9> Oh, I'm sorry, I didn't see that. Disregard my comment.

</comment></comment></comment><comment><USER5> Any way to import bookmarks from delicious/diigo/pinboard ?

Seems like the others bookmarking services, i don't really see the 'different approach'... maybe the screenshot part ?

</comment><comment><USER11> This seems like a very similar service to the wildly popular Instapaper. I'm curious what the difference is or how Copyto plans to differentiate themselves.

<comment><USER2> Man, I always get the same observation with historio.us as well. How are they similar? Instapaper saves links for later, historious saves the full content of bookmarks and allows you to perform full text search on it. They're nothing alike.

</comment></comment><comment><USER12> "You will be able to select all or some of the content on your bookmarked page to save it as long as you want."

Really? Even if copyright holders litigiously suggest otherwise?

Of more practical value, does it work on pages that use JavaScript to dynamically render a page?

<comment><AUTHOR> Copyright issue applies to all services that allow you to save a page, even Google would be guilty for caching. It is up to the user to judge for a copyright infringement before saving a page.

<comment><USER13> Since I'm currently exploring some of the same problems, I'd like to ask further..

How do you guard yourself against user-shared copyrighted content* ? Do you delete on request from the copyright holders? Do you weed out in the shared content once in a while? Do you have some kind of policy or agreement transfering the infrigement to the sharing user in such cases ?

*Say, a user has access to some content behind a paywall, but shares it un-blocked through your service.

<comment><AUTHOR> We have to delete public content that has been requested to be deleted by the copyright holders. In such a case the user will be notified about the infirigement and the possible removal of his content.

</comment></comment></comment></comment><comment><USER6> Looks like an awfully familiar approach to bookmarking from where I sit. But hey, welcome!

</comment><comment><USER14> I am not usually using IE, but the site looks bad under IE8, I can confirm that.

But you know what..? I would not bother fixing it if I were you. Seriously, I don't think it's worth the trouble.

<comment><AUTHOR> Thats something I'm really ashamed of. Until having some kind of help on my side I also don't think it would be worth the trouble.

</comment></comment><comment><USER15> Sorry if I'm missing something, but what would make me use this instead of Evernote? The free version has served me nicely for a while and it also does the nice thumbnailing feature.

</comment><comment><USER16> Does anyone know if they support exporting bookmarks just in case I don't feel like paying them $24/year for bookmarks anymore?

</comment><comment><USER17> Got an email address? I don't see any email addresses or feedback forms on the public site.

<comment><USER3> I guess they forgot to add it on the public site. Their email is support (at) copyto.co

</comment></comment><comment><USER18> Just a feedback- design is broken in IE7 & IE8. Otherwise it looks good service to me.

</comment><comment><USER19> Amazing when HN generate so much comment on services with no About section.</comment>


Michal Zalewski's new web app security book, "The Tangled Web", available now - <AUTHOR> http://nostarch.com/tangledweb.htm

<comment><AUTHOR> Get the ebook now; print books will ship out the week of November 28th.

Use discount code TANGLEDWEB for 40% off purchase, valid until 11/23.</comment>