A world without mosquitoes (2010) - <AUTHOR> http://www.nature.com/news/2010/100721/full/466432a.html <comment><USER2> Inspired by this article, and getting bitten by mosquitoes since then, and some of the more interesting species-targeting work being done, I've been thinking about this topic.

There is a very major positive impact that mosquito elimination would have: we'd stop trying to suppress mosquitoes. We'd stop spraying for mosquitoes. We'd be more lax about standing water. Standing water is treated like something awful, and while it can get a bit smelly and obnoxious, that's because standing water is an interesting host for lots of life, and besides mosquitoes that life is mostly fine. Add in tick elimination and we could let many more urban areas go fully wild. More people would spend more time outside, and I think that would itself be a major ecological factor, as it would positively affect our attitude about the outdoors.

There's a couple obnoxious insects, but nothing compares to the mosquito. Eliminate mosquitoes and suddenly the human race can come to peace with bugs. That would be hugely ecologically positive.

</comment><comment><USER3> Wiping out a species deliberately flies in the face of the philosophy of environmental conservation that we all learned in school and from media. However, we have wiped out organisms that threaten humans before (e.g. smallpox) and are currently in the process of wiping out others, such as polio and the guinea worm, which is a parasite that is ingested in contaminated water only to emerge, slowly and painfully, through the skin (see Dracunculiasis).

In terms of deaths caused, mosquitoes are undoubtedly far deadlier than any species humans have eradicated to date. In North America they are more of a nuisance than a deadly threat, but the same does not hold true for large portions of the world where they are a major disease vector. They are unquestionably worth eradicating if it ever becomes feasible to do so.

The question should not be whether or not we should eliminate the species of mosquitoes that feed on humans. Instead, we should ask how can we minimize the impact of eliminating these species. Can other species of mosquitoes that are not disease vectors, or other insects entirely, fill in the vacated niche? Is it possible to eradicate mosquitoes in test areas to see what the long-term impact is? If we do eradicate them globally, how long would we have to "hit reset" by hatching and releasing stored eggs if unforeseen consequences make it necessary?

<comment><USER4> Alternatively, can we nudge evolution in a desirable direction so that the disease spreading capabilities of modern mosquito's are surpassed by a new species that serves the same ecological role without spreading disease?

<comment><USER5> Impossible. Even if we could nobody knows the full extent of the ecological role of mosquitos. When you are talking about ecology there are too many variables to know them all.

<comment><USER6> Nature lost species all the time throughout history, and the world survived. I'd say, there are so many variables that the ecosystem can surely adapt to the loss of any particular species.

<comment><USER7> yeah everything will adapt, but it still might be worse /for us/

<comment><USER8> It's hard to see how as long as we're talking about mosquitoes. We're not talking about putting the Earth through anything like these:

[http://en.wikipedia.org/wiki/Extinction_event](http://en.wikipedia.org/wiki/Extinction_event)

</comment></comment></comment></comment></comment></comment><comment><USER9> A little disappointed that neither the article nor comments have made much of the argument that any species which has made it through billions of years of evolution is _intrinsically_ a thing of value. As for planned extinction, I feel the bar should be set high: we needn't know, right now, what their long- term value must be.

Nevertheless, if I try to find some specific value to mosquitoes, it is likely related to the thing that also makes them pernicious. They are evasive, clever, micro-scale hunters some of which have co-evolved with humans for millions of years. Their feeding indicates they might be used for drug delivery, weapons, communications, logistics.

Just from one person's point of view, it would be a shame if, ten years after total eradication, Moore's Law delivered a boat-load of potential applications for mosquitoes. And of course if these insects have a say in the matter, we know how they'd likely vote.

<comment><USER10> > A little disappointed that neither the article nor comments have made much > of the argument that any species which has made it through billions of years > of evolution is intrinsically a thing of value.

When you dabble in evolutionary determinism, you run into problems, because humans seem to have free will but also seem to be the result of evolution. So when it comes to decisions by humans, it's hard to say which choice is "interfering" with evolution. I would say that, by definition, no human action is interfering with evolution, assuming that humans are the result of evolution. If we do decide to eliminate mosquitoes, well, that just means humans evolved to eliminate mosquitoes, and mosquitoes didn't evolve to survive such attempts.

</comment></comment><comment><USER11> I think Bill Gates has been trumpeting this as well. It wouldn't be the first species driven to extinction by human activity. How about it friends? In other news, pubic lice are already an endangered species:

[http://www.cbsnews.com/news/brazilian-bikini-wax-making- crab...](http://www.cbsnews.com/news/brazilian-bikini-wax-making-crab-lice- endangered/)

</comment><comment><USER12> A few comments discuss the complete eradication of all mosquitoes, and the impact that would have. It is worth noting that only a few of the various mosquito species are vectors for most of the diseases we tend to care about, and as such the complete eradication of all mosquitoes is not necessary.

You can eradicate just those species in order to remove the disease vectors, and replace them at the same time with a different mosquito that has a similar ecological role.

Of course we don't actually know if disease-vector mosquitoes play a different role than non-disease-vector mosquitoes, but the premise need not be the removal of all mosquitoes.

</comment><comment><USER13> I highly recommend this Radiolab episode, "KILL 'EM ALL", which explores the same issue.

[http://www.radiolab.org/story/kill-em- all/](http://www.radiolab.org/story/kill-em-all/)

</comment><comment><USER14> As someone that grew up in South Florida, spending lots of time in the Everglades and Keys (shit tons of mosquitoes...), I find the whole thing pretty scary. As an occasional fly fisherman that uses mosquito fly's I find the idea scary. Mosquitoes present problems for humans, but this general idea of lets wipe out species to make life easier for humans seems shortsighted, at best.

<comment><USER15> It's not really a new idea. Seen any _homo neanderthalensis_ around lately?

<comment><USER16> That was not really an "idea", but the result of collective actions. This is to previous extinctions [1] as premeditated murder is to negligent homicide.

[1] with the possible exception of smallpox

</comment></comment></comment><comment><USER17> I think that, if we can, we should completely and entirely get the world rid of mosquitoes (and tsetse flies as well if possible). Several species have become extinct in the world's history -- in fact far more species have gone extinct than extant today. Diminishing mosquitoes to EW (Extinct in the Wild) status would save millions of human lives.

Malaria isn't the only disease spread by mosquito. Mosquitoes are responsible for transmitting several diseases. The "aedes aegypti" species of mosquito doesn't spread malaria, but several other debilitating diseases including dengue fever, chikungunya, yellow fever, etc.

</comment><comment><USER18> Since the goal is to rid ourselves of malaria, are there more sophisticated ways to do this that don't involve permanently eradicating some or all species of mosquitoes?

I'm sure I read, perhaps mid 1990's in a New Scientist article, a proposition along the lines of:

1\. obtain a good sampling of a/some mosquito species - keep them in a sealed greenhouse somewhere, ensuring they have access to clean blood (ie. no pathogens we care about)

2\. eradicate them in the wild - at the time the expectation was a 'terminator' style gene that, once introduced into populations would, after say a dozen or so generations, lead to an exclusively infertile population, resulting in extinction

3\. release the pathogen-free mosquitoes back into the environment - presumably after ensuring pathogens were no longer in the population, which I suppose means at least one generation of hosts - so it could be some decades.

The idea was appealing because it means if we missed something fundamental during phase 2, it'd be possible to re-populate quickly, it could be repeated periodically if needed, and it could be performed on regional levels with good effect, especially if you toned down your expectations to 'drastically reducing prevalence of pathogens' rather than 100% eradication.

<comment><USER19> Backup the species before deleting them in case there is an unforeseen dependency? Pretty clever failsafe, actually!

</comment></comment><comment><USER20> Reminds me of the 4 pests campaign in China, 1958 [1]. "By April 1960, Chinese leaders realized that sparrows ate a large amount of insects, as well as grains. Rather than being increased, rice yields after the campaign were substantially decreased." [1] [http://en.wikipedia.org/wiki/Four_Pests_Campaign](http://en.wikipedia.org/wiki/Four_Pests_Campaign)

Not related, a 2011 study (edit: this in fact credited in the article) found out that eradicating mosquitoes in the french Camargue led to house martins having trouble finding food and correctly feeding their offspring. [2]

[2] [http://www.tourduvalat.org/fr/actualites/indirect_effects_bi...](http://www.tourduvalat.org/fr/actualites/indirect_effects_bioinsecticides_non_target_fauna_camargue_experiments_calls_future) Original study: POULIN B., 2012. Indirect effects of bioinsecticides on the non target fauna: the Camargue experiments calls for future research. Acta Oecol 44 p28-32.

Appears we're not that good at predicting outcomes in complex systems.

</comment><comment> guard-of-terra Can't we kill off mosquitoes and then release ones who can't drink blood? I guess they'll still reproduce, albeit slower.

</comment><comment><USER21> When the world started switching to LED-based traffic lights, cold places suddenly discovered that there was a problem: they would get covered in snow. Turns out that the old incandescent ones had a solution to this problem in giving off heat. As trivial as it is once you think about it, it was a problem that we didn't even realize we had solved.

I always use this as an example of how bad we are at predicting the outcome of our actions. It's why small iterations make so much sense. For running your company and for anything.

Eradicating mosquitoes might seem harmless in any way we can think of (even though the article gives good examples of why it probably isn't), but even so, such a massive change in the eco-system is bound to have a bunch of really severe consequences that we hadn't foreseen.

</comment><comment><USER22> Taken as a whole, the article says, "We don't really know what would happen." And while absolute certainty seems unlikely in an area as complex as ecology, it also seems foolhardy at best to act on the kind of (understandably) flimsy knowledge we now possess.

</comment><comment><USER23> How would we ever recreate dinosaurs without mosquitoes trapped in amber?

But seriously, where do I donate to the irradiation of mosquitoes?

I suspect it is not just a matter of money or Bill Gates foundation would be working on that (other than their genetic modification experiments).

<comment><USER24> > the irradiation of mosquitoes

Eradication. Irradiated mosquitoes would just make our problems worse.

</comment></comment><comment><USER25> Okay, so it might be a good thing if we rid the world of mosquitoes.

Could we even do that? How?

<comment><USER26> There are limited mosquito species that carry malaria, and only the females bite humans. Those insects have specific wing-beat frequencies and a limited range of sizes. So it's possible to build "photonic fences" \- sets of detectors to detect those specific mosquitos and then shoot them with a laser.

[http://en.m.wikipedia.org/wiki/Mosquito_laser](http://en.m.wikipedia.org/wiki/Mosquito_laser)

If you make these cheap enough amd deploy them widely enough you'd cut down on the problem populations.

<comment><USER27> Since the "photonic fence" was developed by known patent troll Intellectual Ventures in 2009 and does not seem to have been ever deployed outside of their labs, the cynic in me thinks that it was only created to boost their PR efforts (there were dozens of articles at the time about how the laser system would eliminate malaria) and possibly increase their patent portfolio.

[https://www.google.com/patents/US20100186284](https://www.google.com/patents/US20100186284)

[http://www.malariaworld.org/blog/will-laser-technology- rid-a...](http://www.malariaworld.org/blog/will-laser-technology-rid-africa- malaria)

[https://www.techdirt.com/blog/innovation/articles/20120903/0...](https://www.techdirt.com/blog/innovation/articles/20120903/07334520256/forget- death-star-anti-mosquito-lasers-heres-how-nathan-myhrvold-can-help-tackle- malaria-improve-his-image.shtml)

</comment></comment></comment><comment><USER28> Killing off all the mosquitoes is pretty challenging. Mosquitoes have a short flight ranges, from 300ft to 3 miles. So whatever method you use has to cover every mile of land. They are attracted to CO2, which makes it difficult to make a trap that is any more effective at attracting them than every other person around. Bats can eat a lot of mosquitoes, but they also eat a lot of other insects too, which would have side-effects.

</comment><comment><USER29> >Yet in many cases, scientists acknowledge that the ecological scar left by a missing mosquito would heal quickly as the niche was filled by other organisms.

yeaaa... i can't wait to learn who will replace those mosquitos in the "human bloodsucker and malaria<or whatever else> spreader" niche. I'm sure it will be very polite and tender creation doing it quickly and painlessly ...

</comment><comment><USER30> Most of civilization's advances address problems created by civilization, especially density and diet. Eliminating the harmful mosquitoes will surely create some additional problems - but we'll deal with just as we have all the other problems we create.

</comment><comment><USER31> I assume a lot of other animals rely on mosquitoes for food, for example fish and spiders. What would these guys eat when we eliminate mosquitoes.

<comment><USER32> Other small flying insects.

</comment></comment><comment><USER33> hard to think there couldn't be negatives to this...some thing s we don't totally understand yet

would harm anything that eats them, possibly reducing diseases would lead to over population of certain species as well

</comment><comment><USER34> What's the best mosquito repellent?</comment>


What Tools Developers Actually Use - <AUTHOR> http://www.readwriteweb.com/hack/2011/12/infographic-what-tools-develop.php

<comment><USER2> I think there is some serious selection bias. In particular, I think they mostly talked to web developers. (Of course, it's also possible that web developers now make up the majority of developers, but I'd like to see a separate study on that.) They show the "industry" breakdown, but 83% are under "technology" which is too generic to tell me anything meaningful.

Ah, they do say the people surveyed are at companies with less than 100 employees, so, yeah, there's some selection bias.

<comment><USER3> Curious if git is commonly used in companies over 100 people.

<comment><USER4> Facebook uses git. Many open source projects with more than 100 contributors do too, of course.

</comment></comment></comment><comment><USER5> Am I the only one who finds something odd about these numbers - 9% are using .NET yet less than 4% are using Visual Studio.NET? My personal observation is something close to 90-100% of .NET developers use VS.NET.

<comment><USER6> The survey says "the asked 500 leading software developers from around the world".

So, this is more about rock-star programmers and such, not people using .NET/VS in the enterprise. Especially as it talks about companies with <= 100 employees.

Probably people more like the Miguel De Icaza, Jeff Atwood etc types that probably use Vim/Emacs or such to work with .NET.

Even so, so many people using Notepad++? WTF?

<comment><USER7> What's wrong with Notepad++? Notepad++ is the Windows equivalent of Coda or TextMate, it's one of the first things I install every time I'm on a Windows machine.

I can get my Notepad++ themes off my source-control and have the exact same look/feel on whatever machine I am, and it has FTP/SFTP, Subversion, and more recently, Git plugins available too.

Oh I probably should say that I don't disagree that the survey is very biased (just look at the sample size), but Notepad++ is one of the only few things on that list I'm not shocked to see.

<comment><USER6> I've used Notepad++ on my Windows days. It's nothing like Coda (which is itself limited), or TextMate. Hence my reaction.

It's more like a dumbed down version of TextWrangler.

<comment><USER8> At the risk of asking an often-repeated question:

I use Notepad++ - at the moment this is predominantly Python + HTML/CSS/JS

If not Notepad++, what else should I be looking at?

</comment></comment></comment></comment></comment><comment><USER9> How did they choose the "500 leading developers"? This seems to be heavily skewed towards web development.

</comment><comment><USER10> I found this infographic worthless. Leading developers? How did they decide that? Minority Java and .NET? What kind of developers are they talking about?

</comment><comment><USER11> Where is emacs? I'm not expecting it to get #1 or anything, but a very healthy number of devs use it.

</comment><comment><USER12> Version Control: 53% use git, 31% svn, 3% beanstalk?

which of these is not like the other.

</comment><comment><USER13> Leaving aside questions about sample size / methodology / etc, here are the big surprises for me:

FRAMEWORKS - CodeIgniter at 6%. I use it for some projects, but I'm surprised that 6% of 'top developers' are still using it too given that it's an older entry in the (very crowded) field of PHP frameworks, AND it's PHP (which everyone loves to hate).

TEXT EDITORS - Nice to see Coda on the list. Maybe I shouldn't be surprised, but it's a great product with just the right mix of minimal features for me (syntax highlighting, simple FTP, sane keyboard shortcuts).

</comment><comment><USER14> No dreamweaver for webdevelopping? Gosh I tried everything and I just can't find something better in my opinion.

</comment><comment><USER15> Surprising that SQL Server beats out Postgres, especially considering these are developers in companies <100 people.

</comment><comment><USER16> This is not reliable at all. Look at the numbers for Oracle for database.

<comment><USER17> All the companies they surveyed are less than 100 people. I'm actually surprised it's that high.

</comment></comment><comment><USER18> I don't think RoR is really a "tool"

<comment><USER19> It's a framework, which is what it's filed under.</comment></comment>


Letting Bird's scooters fly free - <AUTHOR> https://mjg59.dreamwidth.org/53258.html <comment><USER3> I believe these are the same scooters that you can swap out the motherboard using a cheap conversion kit. The guy who wrote about it got a takedown notice from Bird that the EFF ended up getting squashed.

[https://techcrunch.com/2019/01/11/scooter-startup-bird- silen...](https://techcrunch.com/2019/01/11/scooter-startup-bird-silence- journalist/)

</comment><comment><USER4> These are the types of things that I feel like if could be made socially-viral would make some really cool real cyberpunk effects. Teach all the people with any interest how to hack the public scooters and do what they will.

<comment><USER5> How is it cool when people steal scooters and the companies ultimately stop to offer rental scooters?

Nobody will maintain the scooters just because cool and cyberpunk and viral.

[Edit: do I misinterpret your post?]

<comment><USER6> How is it cool when these scooter companies steal a public good in terms of space on sidewalks?

I don't recall my town voting on a bill allowing companies to park their fleet on public land free of charge.

If you are making a living by stealing(and yes I equate using public land without a license as the same thing as stealing), then it's pretty hypocritical to complain that others steal from you

<comment><USER7> Draw a comparison: would it be OK to hack / steal cars because they take up space?

I mean sure, scooters being dropped left and right is a problem - <USER2> Bird and co need to address, e.g. by fining anyone not leaving their items in designated areas - but transportation needs somewhere to stand. Whether said transportation is owned by a company or an individual is a moot point.

<comment><USER8> > Draw a comparison: would it be OK to hack / steal cars because they take up > space?

You mean like towing cars that are parked illegally? One can not just put a car wherever one likes, renting a spot can cost quite a lot depending on where you live. When I was living in Oslo I didn't have a car but i rented my spot that came with the apartment to the neighbour for $200/month.

<comment><USER9> Towing a car is not the same as stealing a car. If someone parks illegally you are not suddenly allowed to smash the window and take it for a joy ride. Even simpler, I'm not allowed to tow anyone else's car that has parked illegally.

I don't agree with Bird's practices, but that doesn't give anyone some moral right to steal their scooters.

<comment><USER8> No, but the municipality might be allowed to "steal" it. I was playing a bit of devils advocate in the previous comment.

However I've seen reckless towing destroy cars and they will hold your car until you pay up and not pay for the damages. It's a fine line.

</comment></comment></comment></comment></comment></comment></comment><comment><USER10> Why on earth didn't Bird lock down the STM32 through builtin hardware fuses, thus disabling the debug interface? Is that a consequence of moving fast and breaking things?

<comment><USER11> Because you must really be confident in your firmware before you start disabling debug interfaces. Most people aren't. They see more value in being able to fix their bugs after the fact than locking out potential hackers.

Imagine just receiving a batch of 1000 scooters with a botched firmware, which you must write off now because you can't reprogram them due to the disabled SWD. This happens more often than you might imagine.

<comment><USER12> They could at least have locked down the flash and RAM, triggering a flash mass erase when attempting to dump the firmware/RAM contents. Not that this would be 100% secure either, but with these STM32 HW features in place this is already significantly more difficult.

<comment><USER13> I don't see how making it harder to dump the firmware makes the platform any more secure. Determined attackers will get in anyways and you'll lose out on people who are interested in poking around.

<comment><USER14> It's usually done to prevent cheap chinese clones of your boards, not so much for security.

</comment></comment></comment></comment></comment><comment><USER15> I don't have any experience regarding hardware reverse engineering and the only thing I didn't get from the article is how do people obtain original firmware in the first place? Do they physically disassemble a scooter to access the control board?

<comment><USER13> > Hooking this up via an STLink and using OpenOCD allows dumping of the > firmware from both chips, which is where the fun begins.

In this case, it seems so.

</comment></comment><comment><USER16> Maybe I don't underestand something, but how is this different from just hotwiring the scooter and stealing it?

</comment><comment><USER17> I live in Los Angeles, and locals are getting so frustrated with tourists littering these things all over the city that they're beginning to knock them over, throw them in the trash, etc.

It may be immoral to hack them, but it's also immoral to treat our streets and sidewalks like a scooter landfill.

<comment><USER18> In SM they painted little squares on the sidewalk where you are supposed to park them.</comment></comment>


Climate change wars are coming and building walls won't help, top general warns - <AUTHOR> http://www.independent.co.uk/environment/climate-change-wars-global-warming-conflict-refugees-walls-wont-help-general-warns-a7381031.html <comment><USER2> "is threatening to force millions of people to become refugees and spark major wars that could "completely destabilise" the world, a leading general has warned"

Climate change isn't threatening anyone right now. Evil government regimes and terrorist groups are the biggest threat. We should focus on this first.

I sure hope they aren't insinuating that the current refugee issue is due to climate change.

<comment><USER3> Climate change has the potential to make homeless hundreds of millions of people, severely disrupt our agriculture, and exacerbate the spread of many diseases.

Evil government regimes and terrorists groups may be threatening you now with a switchblade, but I'd also worry about the shady Climate Change guy hanging out on the other side of the street.

>I sure hope they aren't insinuating that the current refugee issue is due to climate change.

They aren't, this seems to be something you have created all on your own.

You concerns for fixing our world's current ills are valid. Not having contrarian groups around would certainly be nice, but I'd be just as concerned that by not preparing for climate change now we are just setting the stage for another set of contrarian regimes and militia groups to emerge when we all start suffering from the effects of climate change.</comment></comment>


Overlap Detection in strings, with code - <AUTHOR> http://neil.fraser.name/news/2010/11/04/? <comment><USER2> I would have found the article much better if there was more discussion of the "highly efficient indexOf function". It sidesteps the whole discussion of algorithms to appeal to some magic black box with no explanation of how it works - in this case it seems like the speed advantage might very well be because that's implemented in C rather than his KMP implementation which is all in Python. That's still a valid reason to use the approach instead if it means the result is faster, but I'd have preferred to see some more discussion of what was going on behind the scenes.

<comment><USER3> This kind of discussion is lacking in the article. It seems as if the OPs goal is optimisation and of course finding the right algorithm with the lowest complexity is the first port of call. However, the indexOf function seems to rely on properties of the data which may not be present (like the forced example in the middle).

There are other algorithms besides KMP too for this. I'm sure with some thinking on my part the linear time suffix tree algorithms could solve this too off hand.

</comment></comment><comment><USER4> A company I worked for was started by someone doing this kind of work in biology. In particular trying to find matches in the ACTG strings and when there is a huge volume of data.

The startup was doing network compression - put an appliance either side of a WAN link and transparently compress the data inbetween. The core loop of that is examining IP and TCP traffic and determining if you have seen something like that before and how much of a match you have. If there is a match then you can just send the match details to the other side rather than the actual data. Typical compression ratios were 20:1 / 95% - ie you could stuff 20 times as much data through the link.

The standard zip algorithm has a window of 32kb (ie it looks roughly 32kb behind to see if data has been repeated). bzip2 uses 900kb. That is usually less than a second or two on standard WAN links! The founder's algorithm worked over hundreds of megabytes.

(The company name was Peribit Networks - you'll find Wikipedia rather unhelpful.)

</comment><comment><USER5> It may be worth pointing out that the OP's appeal to the relevance to biology may not be quite so relevant. Speaking as a bioinformaticist, most of the time we're interested in matching strings with some number of mismatches. In that case, something like the Smith-Waterman algorithm is going to provide much more interesting results. Given the choice between matching 400 basepairs exactly; or 399 basepairs, followed by one mismatch, followed by 399 more basepairs, I'd much rather take the latter case, but the indexOf approach wouldn't be able to tell me that.

<comment><USER6> Also, indels. Mismatches are the easy part -- in my thesis I show how, with linear-time preprocessing, you can solve the overlap problem with a constant proportion of mismatches in O(sqrt(overlap length)) time.

</comment></comment><comment><USER7> The algorithms used in this article are _extremely_ bad for the case! Realize that the guy is just trying to find the _longest overlap_ between two strings. This is, the longest part at the end of text1 that is repeated exactly at the beggining of text2.

With that in mind, it is _obvious_ that there is an algorithm linear in the size of the overlap to compute it. For instance:

      def commonOverlapSanely(text1, text2):
      	right = len(text1)-1
      	left  = 0
      	maxleft = len(text2)
      	while left < maxleft and right >= 0:
      		if text1[right] != text2[left]:
      			break
      		right -= 1
      		left += 1
      	return left

Instead of using this _very simple_ algorithm, the author employs three different approaches:

1\. A "naive" version that keeps copying increasingly large portions of the original strings, and checking the whole portion each time. This obviously makes the algorithm quadratic in the size of the overlap, thus leading to very bad performance.

2\. The KMP algorithm, that is designed to search for occurrences of a string within another one, disregarding where. This is a silly thing to do because the resulting algorithm is linear in the size of the longest input string, instead of on the size of the actual overlap.

3\. An "indexOf" monstruosity, that is so wrong it is even hard to explain. Carefuly inspect the code and cry.

Now, please tell me if I missed something...

<comment><AUTHOR> OK, as requested: You've missed something.

I've just run a few naive tests and all three versions on the linked page give the same result on every test, and yours gives different results on some of the tests. In short, your code doesn't work.

So you've missed something.</comment></comment>


Stripe, Balanced, WePay for Payments: Not big enough to #fail - <AUTHOR> http://go-to-hellman.blogspot.com/2012/09/stripe-balanced-wepay-for-payments-not.html

<comment><USER2> Risk mitigation is definitely the reason that the banks are backing away from crowd funding. There is personal liability for the owners of a company that is found to be abetting money laundering, even accidentally.

A crowd funding request is a bank account that anybody can throw money into. Once the funding goal is reached, the money is released, and no more controls exist over it.

Have you spotted the risk?

It's quite simple: 1) Set up crowd funding request for some service. Make it a web service, so there's no expectation of a tangible good. 2) Evil people "crowdfund" your project, the funding goal is reached, the money is released. 3) You bugger off and do bad things to the geopolitical status quo.

It really is the same old money laundering scheme updated for the internet age.</comment>


Thunderclap: Key-value, indexed JSON, graph database designed for Cloudflare - <AUTHOR> https://github.com/anywhichway/thunderclap <comment><AUTHOR> Currently alpha. It runs on top of the Cloudflare KV store. Its query capability is supported by JOQULAR (JavaScript Object Query Language), which is similar to, but more extensive than, the query language associated with MongoDB.

Like MongoDB, Thunderclap is open-sourced under the Server Side Public License. This means licencees are free to use and modify the code for internal applications or public applications that are not primarily a means of providing Thunderclap as a hosted service.</comment>


Kate – A Qt Text Editor for Linux, MacOS and Windows - <AUTHOR> https://kate-editor.org/about-kate/ <comment><USER2> I have to admit I love kate. It is my favourite graphical text editor on linux. As a part of KDE, it is simple to install under any distribution and highly customizable out of the box without installing any extensions by hand (a feature common to KDE programs).

Kate has a number of tools you expect from an advanced text editor, such as block editing or the capability to open and edit very large (GB) text files (which otherwise I can edit only with vim).

For me, Kate is on linux what Notepad++ is on Windows.

For those who like Kate and lack certain IDE features, try out KDevelop. It uses the Kate editor and enriches it with a number of typcial IDE features such as code browsing, autocompletion, context-sensitive syntax highlighting, etc. [http://kfunk.org/2017/01/10/using-kate-for-hacking-on-c- why-...](http://kfunk.org/2017/01/10/using-kate-for-hacking-on-c-why-dont-you- try-kdevelop/)

</comment><comment><USER3> Kate is amazing. Quite underrated. Super fast and responsive with tons of great features.

It's been my editor for many years now and I love it.</comment>


The trouble with social news - <AUTHOR> http://corte.si/posts/socialmedia/trouble-with-social-news.html <comment><USER2> I agree with this post but I'm more optimistic than the author that a solution will be found.

Let me use HN for examples, as that's the site I'm most familiar with.

The author correctly identifies that HN does a poor job of selecting new items to display. Technically, HN exploits too much (gives existing high ranking stories too much front page time) and doesn't explore enough (give new stories a chance). I also expect that the population who reads the "new" list behaves differently to that who read exclusively the front page.

We can fix both problems! We know of algorithms to balance exploration and exploitation -- they're known as bandit algorithms. Instead of displaying a fixed front page to everyone, choose the stories to show to balance exploration and exploitation. This way new stories get a fairer chance and the population observing both is the same.

There are some technical issues but they are solvable. I work on this stuff in my day job (Myna -- mynaweb.com -- go sign up now! ;-) and we have an algorithm for handling preference data. It would need some adjustment but it's doable.

Next up is voting rings and so on. Also solvable -- stop using votes as the only input signal. Observe what people actually do -- do they actually click the link? Come back and comment? These are strong indications of interest. How much text do they write? It's just a few words it's more likely to be a spammy "ata boy!" comment. How long do they spend on the link (maybe we can track this by using an iframe?) and do they scroll? The point is there are a whole heap more signals that people give to indicate real interest. Start using these and it becomes much harder to forge interest.

This area is known as implicit feedback, and again there is a decent body of work available.

<comment><USER3> I have noticed that when the comment count surpasses the up votes the article is usually very confrontational but isn't necessarily authoritative or insightful on the subject matter.

</comment></comment><comment><AUTHOR> I always thought Advogato's trust metric[1] was really interesting. It was part of Raph Levine's (of libart and Ghostscript fame) PhD thesis, but he later switched topics. As I recall it worked fairly well, but Advogato was a small community and probably wasn't yet susceptible to most of the problems of simple voting.

ku5oshin also had a unique peer-review style system that seemed quite well thought out.

Slashdot had meta-voting, which was pretty neat.

It amazes me that after a decade of this, there is very little innovation. At least the communities back then were trying hard to find novel solutions. Instead of trying to figure out new mechanisms that are resistant to common abuses, everyone seems to focus on finding and punishing the cheaters. You can never catch them all, and it doesn't seem to scale well.

[1] <http://advogato.org/trust-metric.html>

<comment><USER4> While reading the post, I too was thinking of the Slashdot / K5 / Advogato examples.

It's weird to me that there are millions of professional nerds for whom this trifecta is not a critical historical influence. Or even in their mind. At all.

Anyway; the cycle of blooming and decay is as old as people. I don't think there is a "solution". Just gotta accept it.

<comment><USER5> To accept something less than potential is a cop-out.

Solutions materialize, but it's never an all-at-once event. Printers evolved substantially from Gutenberg's such that we have personal high-volume color laserjets sitting near us with WiFi connections and AES encryption.

<comment><USER4> Some problems can't be solved.

</comment></comment></comment></comment><comment><USER6> Regarding karma, this is one place where I think HN's implementation gets it right (or at least more right than others). You can see your own karma, and the votes of things that you've submitted (I'm talking about comments not stories here), but you have to go look to see anyone else's, and you can't see the karma they've gotten from their comments (except as a relative number versus your own comment at the same level within a thread).

There are surely still karma whores (I'll admit to liking seeing the little number next to my name go up) but it's not quite as in-your-face as somewhere like Reddit.

<comment><USER7> Personally, I'm not such a fan of the lack of transparency on HN, because it makes the manipulations of the moderators very opaque and shady. My previous account got slowbanned despite the karma accumulated over years.

If you're going to run a place like that, overrule the community and keep them in the dark, you might as well ditch karma altogether (or make it 100% invisible and just use it as an internal aid). Otherwise you're just encouraging behavior you clearly don't want. I'm not arguing the right or wrong about the way HN is run, I just don't see the point in having karma at all here.

<comment><USER5> Transparency is key and the structural goal of a news platform should be building trust corporately and incentivizing individuals to build TRUST...not karma.

</comment></comment></comment><comment><USER8> Re: gaming the system, voting rings and other tit-for-tat behaviors are very much alive and well down here in the Bay Area. Without getting into specifics, many groups here have strong if unwritten "upvote your friends" policies encouraging promotion of each other's commercial interests, irrespective of the quality of the articles. It's rather like special-interest politics, where the damage done to the community is large but dispersed (from upvoting trash), whereas the benefits are localized and perceptible.

My social network is also the best source of news I have, but most of the information exchange takes place in private, often offline -- added plus that face-to-face is the only way to get access to a lot of quasi- or truly- confidential information.

</comment><comment><USER9> One of the things that lends itself to abuse of things such as karma is a lack of cost. It costs nothing to vote something up or down, therefore we associate little value with giving karma (as you're not losing anything), whereas the accumulation of karma typically requires some effort, so the cost of acquisition is higher.

</comment><comment><USER10> Solution for the one-vote problem could be a box at the top of the front page with "Which (if any) of these five new stories are front-page worthy?" Does potentially provide a lot of visibility to crappy posts though.

</comment><comment><USER5> Some of us are building a real solution to the industry's problem. karma, as demonstrated by reddit and HN, is subject to the hive mind phenomena. there is a way to integrate peer voting, but it most be up-down, to start, and it goes beyond that for a scalable solution. can't say more...

the best factor is paid subscriptions.</comment>


Forrst now uses GitHub auth to let developers skip the invite queue - <AUTHOR> http://forrst.com/signup

<comment><USER2> Be nice if they could fix the https if I'm going to be entering a password... <https://forrst.com/> currently goes to an Apache 2 Test Page.

</comment><comment><USER3> I got an error saying my account wasn't old enough or there weren't enough active repositories.

I'll admit I don't have many active repositories but I have had a github account for development on a private repository for over a year and a half.

What's the number of active repositories you need to be able to skip the invite step?

<comment><USER4> Try again, this should be fixed.

<comment><USER3> Hmm.. still no beans.

If any members are willing here is my application: Edit: Thank you guys.. got an invite :)

<comment><USER5> I voted your application just incase this still hasn't been resolved.

<comment><USER3> Thank you

</comment></comment></comment></comment></comment><comment><USER6> I am happy my GitHub account was accepted, I am just curious what the selection criteria are.

I have 4 coderwall badges ) <http://coderwall.com/gourneau>

<comment><AUTHOR> You just gave me a great idea re: coderwall :)

<comment><USER6> Make sure to check this out if you want to use the coderwall api. <https://github.com/icebreaker/proudify>

</comment></comment></comment><comment><USER7> I don't like that it wants to access your private repo info and that I can't find, with a quick Google, what it will be able to do / read from my repo's.

> Update your public and private repository info

<comment><AUTHOR> Sorry about that. We had to request private access since we figured not everyone with an active account would necessarily have public repos. Going to change it to only look at public for now.

<comment><USER8> Why do you need the rights to _update_ any of those?

<comment><USER4> Well, unfortunately, we don't. But GitHub's API is very terse. We can either read/write to private repos, or we can't access private repos at all.

We've updated the algorithms to not be as concerned to the number of private repos.

</comment></comment></comment></comment><comment><USER9> Is Forrst worth the trouble?

<comment><USER10> Would be really interested in an opinion from someone 'on the inside'. Seems cool from the outside, but probably just because it's a "selective" club

<comment><USER11> It's OK-ish but 1) it's rather hard to navigate or find things (maybe because I'm used to 'traditional' news-feed type of sites) and 2) I find it hard to 'network' since if you're thrown in there knowing nobody, how are you going to 'network'? You can 'like' (or 'follow' or whatever it's called) people, and then you have a distinct 'feed' where you can see the updates from those people. And of course you can 'comment' on people's posts, but in the end I'm not really seeing much in it.

</comment></comment></comment><comment><USER12> I have my code at launchpad.net <https://code.launchpad.net/~shreekantbohra/> anyone kind enough to vote my application ? <http://forrst.com/i/X6g>

</comment><comment><USER13> My github account didn't let me in, but then again I only have one repo that I use to store my vim dotfiles and suchlike. So, job done on Forrst's part, I suppose.

I am a developer though, for my sins, and would appreciate a vote or two. Or, ideally, three.

(removed the link to my profile, as some of you very kindly voted me in)

</comment><comment><USER14> I tried using my github account. Forrst didn't seem to recognize it... ? My application is here: <http://forrst.com/i/5cW> github here: <https://github.com/organizations/batchblue>

Thanks!

<comment><AUTHOR> Very odd, we'll take a look.

</comment></comment><comment><USER15> Anyone else getting an error page during app authorization? Here is the broken URL it's taking me to:

<http://timber.devel:3003/?error=redirect_uri_mismatch>

</comment><comment><USER16> My github profile didn't seem to get me in. Anyone mind voting on my request?

<http://forrst.com/i/5c9>

<comment><AUTHOR> Done. Mind sharing how old your account is and how many public/private repos you have? We're trying to tune things on our end.

<comment><USER17> My github account didn't get me in either. It's about 2,5 years old and has 11 public repos. Not very active by any means, but not dead either :)

If anyone is so inclined, you can vote for me here: <http://forrst.com/i/5cV>

<comment><USER4> I'm looking at this. Should have let you in.

</comment></comment></comment></comment><comment><USER18> Mine got me in just fine. I've been a member for a long while and have a lot of repos, though.

<comment><USER19> I have two inactive repos and still got in. I don't think I deserved this privilege.

</comment></comment><comment><USER20> I have been updating a few repos on Github daily and got in without a hitch. Nice.</comment>


Is the Universe Made of Math? - <AUTHOR> https://www.scientificamerican.com/article/is-the-universe-made-of-math-excerpt/ <comment><USER2> My view is that the root of this is the quote 'All models are wrong but some are useful'. I dont think youll get something which descries the universe completely which is less complex than the universe itself. However maths can certainly describe parts of the universe more simply (but not completely).

<comment><USER3> The question here is wether math is just a description or the thing itself, independently of the complexity.

</comment></comment><comment><USER4> >[...] that our reality isn't just described by mathematics – it is mathematics, in a very specific sense. Not just aspects of it, but all of it, including you.

Cue to Whitehead's _" a series of footnotes to Plato"_ quip. Though I think he was a bit off the mark. People aren't merely talking about Plato, but unwittingly echoing him. It's kind of like that another quote, this time from Keynes, about practical men being "slaves" to the opinions of long dead economists.

</comment><comment><USER5> The philosophy of mathematics[1] is a deep and interesting subject, with a long history of important contributions by people like Hilbert, Brouwer, Russel, Wittgenstein, Turing, Quine and Putnam among others. It's very hard to tell from this short piece whether the author simply subscribes to one of the famous old positions or makes any new claims, and if so, where those claims are positioned relative to all the old ones.

EDIT: A quick read of the relevant Wikipedia entry shows that Tegmark's view is basically good-old mathematical Platonism, with a radical, monistic twist.

EDIT2: A question I would pose to a mathematical Platonist monist like Tegmark would then be, what is the cardinality of the collection of universes? Brouwer could reject large infinities only because he insisted that mathematics is limited by the physical, but if the physical and the mathematical are the same, I can see no justification for rejecting a large set of universes.

[1]: [https://plato.stanford.edu/entries/philosophy- mathematics/](https://plato.stanford.edu/entries/philosophy-mathematics/)

[2]: [https://en.wikipedia.org/wiki/Mathematical_universe_hypothes...](https://en.wikipedia.org/wiki/Mathematical_universe_hypothesis)

</comment><comment><USER6> If there is such a thing as an external reality, is there even such a thing as 'meaning' that arises from anything other than relationships to other things? The only way to describe the human experience outside of the human experience is by describing all interactions and relations between the constituent parts.

That ignores the issue of how useful this description is. It is easy to conceive of an external mathematical reality that cannot be fully described from within. Even with a full description, there is no guarantee the description is at all useful. If you consider how stumped we are by the goldbach conjecture, and how simple that is, you realize there are plenty of mathematical structures that defy understanding.

And then there are the standard crises of maths. Incomputable problems, paradoxes in informal systems, controversial axioms in formal systems (axiom of choice), and that final bombshell of Godel's incompleteness theorem. All of these make math seem less rock-solid. Heck, if the universe is maths, we can't prove the universe is consistent from within the universe.

<comment><USER7> Yeah, you need a ladder or something to climb up or pull up and then you will see things right. Or something.

</comment></comment><comment><USER8> It is funny to see this article today. Overnight, I was considering the question again of "Is the map the territory or not?" JadeNB refers to this in their comment.

What a lot of people do not see, including many theoretical physicists is that mathematics is a "map". It describes reality in a simplistic way, but is not the reality itself.

twlevechairs26 refers to the quote "All models are wrong but some are useful". This highlights the fact that all models are maps, incomplete, simplified descriptions that leave out specific parts or include things that are not part of the thing being described.

When we get arrogant enough to claim the "truth" in mathematics or science we have moved into the realm of religion. Mathematics and science helps us get a handle on trying to understand the physical universe around us. But it will NEVER, and I repeat this, NEVER give us perfect understanding of the universe around us. For that perfect understanding would require that we become greater than the universe around (in effect raising ourselves by our bootstraps to be God or gods).

So, in may ways, the first question here, "Is the map the territory or not?" before asking "Is the Universe made of mathematics?"

<comment><USER9> >But it will NEVER, and I repeat this, NEVER give us perfect understanding of the universe around us.

How can you be sure?

>or that perfect understanding would require that we become greater than the universe around (in effect raising ourselves by our bootstraps to be God or gods).

 _shrug_

</comment></comment><comment><USER10> Can't wait for someone claiming the universe is made of Rust (the programming language), and how much better is than being made of C.

<comment><USER11> Elon Musk's efforts to break us out of the simulation [1] will be much harder if he can't find a suitable buffer overflow to exploit.

[1] [https://www.forbes.com/sites/janetwburns/2016/10/13/elon- mus...](https://www.forbes.com/sites/janetwburns/2016/10/13/elon-musk-and- friends-are-spending-millions-to-break-out-of-the-matrix/#d7d13035ce17)

<comment><USER12> _> Elon Musk's efforts to break us out of the simulation [1] will be much harder if he can't find a suitable buffer overflow to exploit_

It's astounding that someone as obviously intelligent as Musk believes in creationism.

<comment><USER13> If I have a big, fast computer and I simulate a universe by randomly defining a set of rules and then hit "go" over-and-over-and-over again, if life arises in one of them is that creationism? Isn't it more correct to say I am exploring the space of all possible universes to see which ones generate life?

<comment><USER12> _> If I have a big, fast computer and I simulate a universe by randomly defining a set of rules and then hit "go" over-and-over-and-over again, if life arises in one of them is that creationism? Isn't it more correct to say I am exploring the space of all possible universes to see which ones generate life?_

Both statements would be true.

<comment><USER13> When I multiply 5 and 6 am I creating 30?

<comment><USER12> Could you clarify the point you're trying to make?

</comment></comment></comment></comment></comment></comment></comment><comment><USER14> If you have yet to read Tegmarks book, I highly recommend it. It has a very layperson style of writing

</comment><comment><USER15> Skip the book (and the article), read the original paper: [https://arxiv.org/pdf/0704.0646.pdf](https://arxiv.org/pdf/0704.0646.pdf)

IMO, Tegmark has a solid argument that the MUH is more plausible than any of the other suggested possibilities ([https://www.amazon.com/Why-Does-World- Exist-Existential/dp/0...](https://www.amazon.com/Why-Does-World-Exist- Existential/dp/0871403595) is good for the PEQ and much more worth reading than Tegmark's book).

</comment><comment><USER16> I firmly believe it. No evidence contradicts it and it is the simplest possible explanation for everything: no hidden variables.

<comment><USER5> A map may be detailed enough not to leave out any detail, but the simplest explanation for that still wouldn't be that the map is the territory.

<comment><USER6> A map that leaves out no details is, by definition, equivalent or 'isomorphic' to the territory.

Equivalence is a weird concept though. Is the factor group O(3)/SO(3) equivalent to Z/2Z? As a group, the answer is yes. As transformations of R^3, most definitely not.

<comment><USER17> A map _can_ have details left out of it, while a territory cannot.

<comment><USER16> Different maps with different levels of detail can all be separate universes.

</comment></comment></comment></comment></comment><comment><USER18> This is fundamentally a religious question. There is nothing wrong with religion, but you should be aware when you step into the realm of religion. Whether you think the universe is made of math, or God's will, or it's turtles all the way down, the presumption contains an element of Faith.

<comment><USER5> Philosphical, certainly, but why religious? Not all faith is religious. There are many definitions of religion[1], but, AFAIK, none equate unprovable philosophical beliefs with religion. Normally, a religion requires at least some moral or normative elements (i.e., it should relate in some way to how _humans_ behave or should behave), which this philosophy lacks.

I've read that the author may have some opinions regarding AI that may be considered religious, but this particular subject so far seems purely philosophical to me.

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

<comment><USER19> Well, it's even stronger than most religions in specifying how humans _will_ behave, which of course includes _should_. That's because a mathematical universe is deterministic and more so, that anything mathematically possible (self-consistent and so forth) will happen infinite times.

I consider it perfectly justifiable to call it physics, but at this level of abstraction, it's hard to differentiate it from religion too.

<comment><USER20> > Well, it's even stronger than most religions in specifying how humans _will_ > behave, which of course includes _should_.

I think that the 'of course' here is not at all obvious. Economics, for example, seeks to describe how people _will_ behave, but neither makes nor, I think, is perceived to offer any description of how they _should_ behave (at least not in any moral sense).

<comment><USER19> I disagree. _should_ is only relevant when there is a choice. Under the MUH, it's like saying 1+1 _should_ = 3, which is fairly meaningless. Basically, the MUH answers the _should_ question which is why it qualifies as religion. It's answer is "it's irrelevant".

<comment><USER5> Well, people have literally spent millennia arguing over this. I doubt this could be resolved in a HN comment :)

Anyway, even a deterministic universe (mathematical, i.e. monistic Platonistic, or otherwise) is still undecidable/intractable, and so normative prescriptions may well serve an important role as you don't know their place in the causal chain.

Of course, you could argue that "importance" is also a subjective measure in a deterministic universe, and an irrelevant one, but then so is "relevance" itself.

</comment></comment></comment></comment></comment></comment><comment><USER21> Can we conceive of universe NOT made of math? Even in Harry Potter there's aritmancy...

<comment><USER20> > Can we conceive of universe NOT made of math? Even in Harry Potter there's > aritmancy...

But there is a difference between a universe in which math exists, and a universe that is _made_ of math; and the latter is, I think, a much stronger requirement. (Unless, indeed, every conceivable universe is made of math, in which case the requirements have exactly the same strength. :-) )

</comment></comment><comment><USER22> If you are intrigued by this flavor of modal realism then the sci-fi book "Permutation City" might be a good read.

<comment><USER23> > In 2050, Paul Durham, a Sydney man having experimented on Copies of himself, > offers wealthy Copies prime real estate in an advanced supercomputer which, > according to his pitch, will never be shut down and never experience any > slowdown whatsoever. Durham predicts that efforts to utilise chaotic effects > will clash with Copy rights.

> Copy rights

is that a pune?

</comment></comment><comment><USER24> The universe is made of information.

</comment><comment><USER25> No. Math is made of the universe.

<comment><USER20> > No. Math is made of the universe.

Given that math can easily describe conditions that aren't realised in any obvious way in our universe, this seems like a proposition for whose meaningfulness it would be hard to argue. (Granted, the math we do is _realised_ in the universe, but of course "the map is not the terrain".)</comment></comment>


Someone Stole Our Awesome Website - What else shall we do? - <AUTHOR> http://www.feedsapi.com/blog/someone-stole-our-website/ <comment><USER2> IANAL, but sending a DMCA notice to India? Really! I don't remember India being under US jurisdiction. Waste of money.

<comment><USER3> Actually, to Australia, where dndwebtech seems to be hosted presently, but that would be similarly outside US jurisdiction. Still, while it probably won't help, I don't see how sending a DMCA notice could hurt -- worst that might happen is that someone will laugh at you over the Internet. I've had worse.

Actually, worse might be that the pirate would send a DMCA takedown to _your_ hosting provider. I've seen reports of this happening, from Indian firms no less.

<comment><AUTHOR> "Actually, worse might be that the pirate would send a DMCA takedown to your hosting provider." Now, that would be funny , lol . I shall probably send their hosting provider a short note about this.

<comment><USER3> Just FYI: sending _their_ hosting provider a note (other than a takedown / copyright violation notice) won't do much to prevent _you_ from receiving a notice. You might want to put _your_ hosting provider on notice that your content has been misappropriated, and to disregard DMCA notices from anyone claiming the reverse.

</comment></comment></comment></comment><comment><USER4> America ≠ World. The DMCA does not apply outside of America.

<comment><USER5> Until the TPP's signed in which case..

</comment></comment><comment><USER6> This happens all the time, get used to it. Especially when your company/product starts to mean something. Take it from the bright side of life, and enjoy! They can copy the features of your side, but they can't copy the value and the stories your company can say. What you can do going forward, put a copyright of everything you create on the web site and strive to provide stories and value, rather than just a web site.

</comment><comment><USER7> Well, the website looks crappy anyway - the copycats should have invested 10$ and buy a template from somewhere.

</comment><comment><USER8> Looks like someone set up a new IT workshop and is stealing sites to fill up their portfolio. The url says demo1, so they are trying to show your site as a demo, as if it was designed by them.

</comment><comment><USER9> It's a demo url... Perhaps one of their customers (dndwebtech's customers I mean) asked them to build a website that "looks like feedsapi.org".

ie: perhaps they never planed to use it as is -- a developer could have downloaded the website just to look at how it's structured, and it's an unfortunate accident that it ended up on the open web...

</comment><comment><USER10> Dude, maybe it's just that you use the same template? How did you do your website?

<comment><AUTHOR> It IS a copy , same text, same content , same images, even the chat box is there... well, it's stealing plain and simple.

PS: Just to clarify, the copied version of our website is hosted at: [https://www.feedsapi.org](https://www.feedsapi.org) [Article already updated]

</comment></comment><comment><AUTHOR> OP here: Just to clarify, the copied version of our website is hosted at: [https://www.feedsapi.org](https://www.feedsapi.org) [Article already updated] .

</comment><comment><USER11> DNDWebTech, they applied to my one Freelancer.com post several months ago. I didn't give them the job, it was obvious they were ripping off other people's work.

<comment><USER12> I clicked the link to 'Create your account', and the link 404'd.

I'm not sure they stole yet. They might be in the process of stealing it.

Distinction that doesn't make a difference?

</comment></comment><comment><USER13> The links to the copy should be marked with nofollow otherwise you'll be promoting their search engine ranking.</comment>


Creatures: The game that used machine learning AI in 1996 - <AUTHOR> https://www.youtube.com/watch?v=Y-6DzI-krUQ <comment><USER2> Machine Learning in 1953: [https://this1that1whatever.com/miscellany/mind- reader/Shanno...](https://this1that1whatever.com/miscellany/mind- reader/Shannon-Mind-Reading.pdf)

Across the pond, Donald Michie had slightly less funding, so he Blue Peter'd MENACE in 1960, using a few hundred matchboxes (and inspiring a Saberhagen short story).</comment>


The Retirement Gamble - <AUTHOR> http://www.pbs.org/wgbh/pages/frontline/retirement-gamble/

<comment><AUTHOR> The discussion about fees is extremely important and the following is a sample:

 _Those are the fees that they charge.

Fees, expenses, portfolio turnover inside of the fund, sales loads, advisory fees, operating expenses — take them all out, and the net return divided up by investors is what's left. So costs are a crucial part of the equation.

And a lot of people say, "So what?" Well, think about this. We're lucky enough to get a 7 percent return on the market. That means it should not surprise anybody that investors as a group divide up 7 percent. Suppose it costs two percent — maybe a little bit high but in the ballpark — to gain that return. Then investors who grossed 7 percent will net 5 percent.

Now, when the market's going up, as it did in the '80s and '90s, at 17 percent a year, 2 percent doesn't seem like much. But it's an awful lot. And if you compound a 7 percent and the 5 percent return over, say, 50 years, let's call that an investment lifetime — well, in fact the investment lifetime is longer than that — something like 70 percent of the market return goes to the purveyors of the services, Wall Street if you will, and 30 percent goes to the fund owners.

So it's greatly underrated, in part because we're all so short-term-focused. We don't think about investing for a lifetime._ [1]

Again, as an example, over the lifetime of your investment, a 2% fee will consume about 70% of it. (And most companies do not offer no- or very-low-fee funds in their retirement offerings.)

[1] [http://www.pbs.org/wgbh/pages/frontline/business-economy- fin...](http://www.pbs.org/wgbh/pages/frontline/business-economy-financial- crisis/retirement-gamble/john-bogle-the-train-wreck-awaiting-american- retirement/)</comment>


Too Much Sitting Shortens Lives, Study Suggests - <AUTHOR> http://www.nytimes.com/2010/01/26/health/26beha.html

<comment><USER2> Right - it's the sitting. It couldn't possibly be that the kind of person that watches hours upon hours of TV _each day_ just might have other unhealthy habits...

<comment><USER3> That's true, but other observational studies have also connected many forms of inactivity to reduced health relative to many forms of activity.

</comment></comment><comment><AUTHOR> Of course, one would want to look at this study in light of Peter Norvig's advice

<http://norvig.com/experiment-design.html>

on interpreting research studies.

</comment><comment><USER4> "Although it is possible that people who were already ill watched more television than those who were healthy, the researchers tried to rule that out by excluding subjects who already had heart disease.."

This is a typical same old correlation - causation confusion. There are many more "althoughs" and all of them have to be excluded before the title can be justified.

<comment><AUTHOR> However, an EXPERIMENTAL design for a study of this issue would go a long way toward clearing up that problem.

</comment></comment><comment><USER5> Two groups - one spends 4 hours per day watching TV and the other spends 2-4 hours per day doing something more active. Did it really take research to highlight which was more beneficial to life expectancy?

<comment><USER6> No, but it takes research to quantify it.

<comment><USER5> Sure but I thought the benefit of exercise was quantified already. Quantifying the value of (!exercise) seems redundant.

</comment></comment></comment><comment><USER7> This is why all Buddhist monks die young.

<comment><USER8> Not to mention cyclists and rowers.

<comment><AUTHOR> I wouldn't call what cyclists and rowers do "sitting." But, more to the point of your comment and its parent, does anyone have any carefully gathered figures on differences in mortality between Buddhist monks and other residents of countries the monks live in, or between cyclists and rowers and their compatriots?

</comment></comment></comment><comment><USER9> No explanation, no science.

</comment><comment><USER10> I <3 my treadmill desk.

<comment><USER11> Even a standing desk arrangement can totally change your attitude (pun intended). Just make sure to have comfortable shoes or a good floor.

</comment></comment><comment><USER12> how to waste 6 and a half years in grad school...</comment>


Visibility of IPv4 and IPv6 Prefix Lengths in 2019 - <AUTHOR> https://labs.ripe.net/Members/stephen_strowes/visibility-of-prefix-lengths-in-ipv4-and-ipv6 <comment><USER2> I find it curious their IPv4 table from 2019 shows a ton of /30s appeared since 2011, is there any reason to use a /30 instead of a /31?

<comment><USER3> As far as my understanding goes, RFC3021 is unsupported on some router devices widely used as it doesn't have a broadcast and network address and is therefore invalid (/s), so some ISPs default to /30 instead for peering and don't filter out their peering networks in BGP.

<comment><USER4> I think the reason for using /30s instead of /31s is mostly legacy. It's a 19 year old standard and most vendors support it.

Regardless of the point-to-point subnet used for the local peering connection, it's interesting that that many /30s have leaked into the default-free zone. BCP 194 recommends filtering IPv4 prefixes longer than a /24.

</comment></comment></comment><comment><USER5> I'm told the V6 /48 include ddos mitigation defensive routing. Many of them have a covering /32

<comment><USER4> Advertising the longest generally-accepted prefix is more of a BGP hijack defense than a DDoS defense. Longest prefix always wins in IP forwarding, so advertising the longest prefix enforces that the best path to you is (usually) selected by local preference or AS path length.

<comment><USER6> I see it used in DDoS defense by "hijacking" the traffic of the /32\. The standard unprotected provider gets hit and the mitigation provider announces a more specific /48 then tunnels the traffic back out of band

</comment></comment></comment><comment><USER7> Where are the horror stories, that we needed IPV6 because in one year we will be running out of ipv4. Thats over 5 years ago.

<comment><USER8> The lack of end-to-end reachability makes it harder to build decentralized applications, thus adding more fuel to centralization.

<comment><USER9> What lack? Use IPv6.

<comment><USER8> I do, but it's not ubiquitous yet. Many people are behind IPv4-only CGNAT.</comment></comment></comment></comment>


'I've Got Nothing to Hide' and Other Misunderstandings of Privacy (2007) - <AUTHOR> https://papers.ssrn.com/sol3/papers.cfm?abstract_id=998565 <comment><AUTHOR> I am aware that this has been posted several times already, but I do believe that under the current events it is a solid and informative reminder of the faulty argument around "I've got nothing to hide".</comment>


Show HN: This Week in Tech Events per City - <AUTHOR> http://www.techevent.ninja/

<comment><USER2> Things I immediately wanted:

1\. Auto detect my location based on IP address so I don't have to click that tiny link for my city.

2\. You mention 3 kinds of events…techies, makers and urban misfits. Maybe color code or put icons to differentiate which events match those types. The first two are probably the same (or are they not?), but I really wanted to see a separated list or make it easier to find events only related to the last one. Mostly because it jumped out at me more for being novel.

Also, please, please add more cities. We don't have problems finding events in San Francisco…the people who really need this are elsewhere. Help them find each other.

Thanks for sharing!

<comment><AUTHOR> All cities supported under the More tab. We get the data from eventbrite and meetup.com

</comment></comment><comment><USER3> Nice idea but I was hitting a lot of JavaScript errors when using it on the latest Firefox build. Presented with a lovely completely blank, white screen when that happened too :(

<comment><USER3> Should be a good developer & post an example. So when clicking on some events, I'd see something along the lines of:

        Load denied by X-Frame-Options: http://www.meetup.com/Startup-Tri-Valley/events/222473222/ does not permit cross-origin framing.

<comment><AUTHOR> Thanks , should be fixed right now had some x-frame problems clearly.

</comment></comment></comment><comment><USER4> I loved how easy it was to scan list of upcoming events but I did run into an issue when looking for events in London.

The 'City, State, Country' format led me to input 'London, London, England' which didn't feel...right.

Generally the first few results on any given day were for London, but it also gave me events in India, the US and Canada (I gave up checking after a while).

<comment><AUTHOR> The meetup.com api does this weird thing when it doesn't have enough results.

</comment></comment><comment><USER5> Nice, although my city is missing, just a white screen. Where are you sourcing the data from?

<comment><AUTHOR> Eventbrite API and Meetup API

</comment></comment><comment><AUTHOR> Thanks for all the feedback !</comment>


Mobile apps built using Docker  Does it exist - <AUTHOR> I was thinking .. is there any attempt to develop mobile apps using micro services concepts for example using Docker like what is done in web apps? <comment><USER2> Docker etc are for code that run on backend i.e on your own systems and not for code that run on users devices like mobile app or web app front end that run on user browser.</comment>


Show HN: Find your ideal eBike based on what's in stock, speed, cargo, etc. - <AUTHOR> https://ebikematch.com/ <comment><USER2> FYI, on Safari for iOS, changing the search filters created 20+ history entries (way more than 1 per click).

Otherwise, seems to do what it claims :) I could see adding some kind of rating or at least a one-line description (what's unique about it?) to the bike listing. My search matched 7 or 8 similar-looking bikes, so I needed a little more info in the results or I'd have had to open each one in a new tab. Consumer Reports' numeric rating ([https://www.consumerreports.org/electric- bikes/electric-bike...](https://www.consumerreports.org/electric- bikes/electric-bike-reviews-e-bike-testing/)) might be one option.

</comment><comment><AUTHOR> Hello Hacker News,

When I bought my eBike, I was frustrated that it was hard to find unbiased reviews that weren't on their website or part of marketing campaigns.

I am launching a website called eBike Match ([https://ebikematch.com](https://ebikematch.com)) that helps people find ebikes, discuss, and review bikes and ultimately help people choose the best bike objectively.

I would be very grateful if you could share your review on our website, just scroll down to the discussion section.

If you have an ebike, I would appreciate your review! If you don't have one, let me know how the website can be more useful for helping you find one.</comment>


Show HN: Tumblr2WP, a migration tool for Tumblr to WordPress - <AUTHOR> http://tumblr2wp.com

<comment><USER2> Haven't tried it but as this is coming from WooThemes who make Tumblr-style themes for Wordpress, it's a smart move providing a tool like this.

</comment><comment><USER3> love it, would also be cool to see a wordpress to tumblr exporter :)

<comment><USER4> Definitely agree with you here. Tumblr's already incredible growth would be even bigger if they could start stealing WP users. Maybe this is part of the plan though. Eventually allow WP to Tumblr once they can finally keep up with demand.

</comment></comment><comment><USER5> Hao Chen here. Great to see others move the project forward.

<comment><AUTHOR> Thanks for your initial work on this! :)</comment></comment>


Orca: 2D esoteric programming language where every alphabet is an operator - <AUTHOR> https://hundredrabbits.itch.io/orca <comment><USER2> I just want to say that ORCA author, Devine Lu Linvega[1], is such a talented and creative person. He build complete ecosystem with it's own language, drag & drop theme support[2] and human readable DB format[3]. He and his girlfriend (cartoonist) Rekka Bell are sailing the ocean and working from their sailboat Pino[4].

[1] [https://wiki.xxiivv.com/](https://wiki.xxiivv.com/)

[2] [https://github.com/hundredrabbits/Themes](https://github.com/hundredrabbits/Themes)

[3] [https://wiki.xxiivv.com/site/indental.html](https://wiki.xxiivv.com/site/indental.html)

[4] [https://100r.co/site/about_us.html](https://100r.co/site/about_us.html)</comment>


Analysis of the MD5 collision attack used by the Flame malware - <AUTHOR> https://speakerdeck.com/u/asotirov/p/analyzing-the-md5-collision-in-flame

<comment><USER2> TLDR: X.509 certificate collision attack where the uptime of the signing server appears to have been guessed successfully to an accuracy of 1 millisecond (!)

Some further technical details:

Dump of the full certificate chain: [http://blog.didierstevens.com/2012/06/06/flame- authenticode-...](http://blog.didierstevens.com/2012/06/06/flame-authenticode- dumps-kb2718704/)

Technical analysis and information about the certificate from Microsoft (MSRC): [https://blogs.technet.com/b/srd/archive/2012/06/06/more- info...](https://blogs.technet.com/b/srd/archive/2012/06/06/more-information- about-the-digital-certificates-used-to-sign-the-flame-malware.aspx)

Discussion on the firstname.lastname@example.com mailing list: [http://www.mail- email@example.com/msg02...](http://www.mail- email@example.com/msg02916.html)

<comment><USER3> to be fair they would have had to generate certs to push the serial # up to the collided cert anyways, so they could use those generated certs and observed network latency to know exactly the uptime.. still very impressively executed..</comment></comment>


Ask HN: What are your essential tools you wish you had discovered sooner? - <AUTHOR>

Someone recently suggested I try iTerm2, after I tried and dismissed earlier versions years ago, and now I'm wondering what else I'm missing out on.<p>By tools I mean anything, even physical tools, not just software, and not just for software development. <comment><USER2> I finally bought a mitre saw [0], and it makes me want to build things. I built a set of rolling carts for my kid to store books and toys in, and I made him a swing last week. I think the next project will be a kid-sized picnic table.

Those are small projects, but they're getting me back into the habit of building simple but useful things. I think next summer I might build a little dory [1] with my son.

[0] [http://www.amazon.com/Hitachi-C10FCE2-10-Inch-Compound- Miter...](http://www.amazon.com/Hitachi-C10FCE2-10-Inch-Compound- Miter/dp/B000V5Z6RG)

[1] [http://www.spirainternational.com/tipsandtricks/tipsandtrick...](http://www.spirainternational.com/tipsandtricks/tipsandtricks_2012q3.html)

</comment><comment><USER3> Unite[0] and Vimfiler[1] for Vim. Before, searching with ag[2] required using the command line, now I can do it directly from Vim. Also, opening NERDTree took seconds, vimfiler opens in less than a second.

[0] [https://github.com/Shougo/unite.vim](https://github.com/Shougo/unite.vim) [1] [https://github.com/Shougo/vimfiler.vim](https://github.com/Shougo/vimfiler.vim) [2] [https://github.com/ggreer/the_silver_searcher](https://github.com/ggreer/the_silver_searcher)

</comment><comment><USER4> CodeRunner[0]. It might seem like it does not actually do all that much but it's a pretty big time saver for me.

[0] [http://krillapps.com/coderunner/](http://krillapps.com/coderunner/)

</comment><comment><USER5> Sketch, Framer.js

</comment><comment><USER6> Paper (iOs app)

</comment><comment><USER7> The Silver Searcher

</comment><comment><USER7> ievms</comment>


Garbage Collection - <AUTHOR> http://craftinginterpreters.com/garbage-collection.html <comment><USER2> An interesting story on generational garbage collectors: a couple of versions ago, Lua experimented with a generational GC. But it didn't improve performance, so they kept the old incremental collector. A long time later, they looked at it more closely and realised that the actual problem was that the generational collector was moving objects out of the nursery too eagerly. Objects in the stack are live and will survive if the GC runs, but many of them will stop being live as soon as their function returns. They fixed the issue by making the stack objects that survive one round of GC to stay in the nursery. The new GC is now much faster than the old one, and is one of the big features of the upcoming Lua 5.4

<comment><USER3> When using generational GCs it is of utmost importance to match the policies for moving things between GCs to the actual pointer interconnection pattern.

This can go really bad, for example in systems that keep caches/repositories of preallocated things for faster re-use. If they are anchored at global variables, or near global, then you need to treat those preallocated things special. You can't just go and move them every time even when knowing you will never collect them.

Generally, GC works better if you don't do tricks/optimizations with memory allocation and let just everything flow freely into the heap. If you do have to optimize allocation you generally have to teach your GC about your hack.

<comment><USER4> One of the consequences of this being that when you do in-process caching, you trade improved average case performance for degraded worst-case behavior, unless the GC authors have taken some pains to deal with pointer chasing on writes to the old generation.

I'm kind of a fan of out-of-process, same-system caches for this reason.

</comment></comment></comment><comment><USER5> Great article, but I'm curious why automatic reference counting (ARC) and smart pointers never seemed to really catch on outside of Objective-C and Swift:

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

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

They almost "just work", except for circular references:

[https://en.wikipedia.org/wiki/Reference_count#Dealing_with_r...](https://en.wikipedia.org/wiki/Reference_count#Dealing_with_reference_cycles)

I'd like to see some real-world studies on what percentage of unclaimed memory is taken up by orphaned circular references, because my gut feeling is that it's below 10%. So that really makes me question why so much work has gone into various garbage collection schemes, nearly all of which suffer from performance problems (or can't be made realtime due to nondetermistic collection costs).

Also I can't prove it, but I think a major source of pain in garbage collection is mutability, which is exacerbated by our fascination with object- oriented programming. I'd like to see a solid comparison of garbage collection overhead between functional and imperative languages.

I feel like if we put the storage overage of the reference count aside (which becomes less relevant as time goes on), then there should be some mathematical proof for how small the time cost can get with a tracing garbage collector or the cycle collection algorithm of Bacon and Paz.

<comment><USER6> _> They almost "just work", except for circular references_

Well, and they're often slower since they require mutating the reference count on every single time a field is stored. You can optimize that using lazy reference counting, or not updating refcounts for references on the stack and instead scanning the stack before a collection. But at that point... you're halfway to implementing a tracing collector.

Every refcounting implementation eventually gets "optimized" to the point that it has most of a tracing collector hiding inside of it. I think it's simpler, cleaner, and faster to just start with tracing in the first place.

There's a reason almost no widely used language implementation relies on ref- counting. CPython is the only real exception and they would switch to tracing if they could. They can't because they exposed deterministic finalization to the user which means now their GC strategy is a language "feature" that they're stuck with.

That being said, ref-counting is fine for other kinds of resource management where resources are pretty coarse-grained and don't have cyclic references. For example, I think Delphi uses ref-counting to manage strings, which makes a lot of sense. Many games use ref-counting for tracking resources loaded from disc, and that also works well. In both of those cases, there's nothing to trace through, and the overhead of updating refcounts is fairly low.

<comment><USER7> Objective-C and then Swift are surely the most serious goes at _fast_ widely used RC languages. Neither requires mutating the reference count on every store, and neither seems at risk of growing a tracing GC.

ObjC had some elision tricks like objc_retainAutoreleasedReturnValue, but more importantly the optimizer was taught about RC manipulation. Swift then extended this with a new ABI that minimizes unnecessary mutations.

The big advantages of this scheme are efficient COW collections and a simpler FFI (very important with Swift). More generally RC _integrates_ better. Imagine teaching the JS GC to walk the Java heap!

<comment><USER8> So efficient that Swift's RC implementation loses against all major tracing GC implementations.

[https://github.com/ixy-languages/ixy-languages](https://github.com/ixy- languages/ixy-languages)

<comment><USER9> That project doesn't compare GC implementations, so it's probably not that useful here.

Also, the Swift implementation is a bit questionable if performance is a goal. That is, why not try to remove the memory management from the inner loop? Probably the first thing to try is value types instead of reference types, which are more generally preferred anyway.

<comment><USER8> Sure it does, memory management impacts the performance of the task being achieved, writing an high-speed network driver.

<comment><USER9> By that measure, every project is a good measure of GC performance. Is that really a good argument?

I believe all general purpose languages let the code allocate memory and therefore will let you allocate memory in a way inefficient to your task.

<comment><USER8> The argument is that to eventually write Swift code whose performance matches the competition, one needs to work around ARC's implementation.

Hence why there is so much emphasis on value driven programming alongside protocols at WWDC talks.

</comment></comment></comment></comment></comment></comment></comment></comment><comment> dan-robertson Whenever the topic of garbage collection comes up, I am reminded of the following excellent reference, [https://www.memorymanagement.org/](https://www.memorymanagement.org/) which puts various different garbage collection (and memory management) techniques into a wider context. It perhaps doesn't explain some of the newer tricks (eg using overlapping memory mappings to put the colour bits into the high(ish) bits of pointers and get a hardware write barrier only when necessary without needing to move lots of objects and have forwarding pointers).

The reference is provided by Ravenbrook, a consulting company formed from the ashes of Harlequin (who made lispworks, a CL implementation and IDE; MLWorks, the same for SML; and ScriptWorks, a postscript rasteriser which made them all their money). I don't know when the reference was created.

</comment><comment><USER10> Why was the title changed to include (2017)? It was published today.

<comment><USER11> please mail the mods at email@example.com for such corrections

<comment><USER12> This comment seems like something others will want to see. Before the title is corrected (five hours so far), the comment is useful for people who didn't notice the wrong date, or did notice and wondered if anyone had emailed the mods. After the title is corrected, the comment is a useful place to explain why the mistake happened and learn a little about the process that changes the titles.

<comment><USER11> And if the user is interested in that change to actually happen, contacting the moderators is the best way of doing it. They might not be aware of that, which is why I mentioned it, so that they and others reading the comment know in the future.

</comment></comment></comment></comment><comment><USER13> Why is this marked 2017? This is the newest chapter of a book that isn't finished yet, and was released literally today. It couldn't be more (2019) if it tried!

<comment><USER14> Tech moves fast; this morning's bleeding edge is this afternoon's yesteryear, and you don't want to know what happens if you bookmark it to read tomorrow.

<comment><USER15> Was this a subtle reference to a sweep and mark algorithm?

</comment></comment></comment><comment><USER3> If you are interested in optimizing generational GC with operating system facilities:

[https://medium.com/@MartinCracauer/generational-garbage- coll...](https://medium.com/@MartinCracauer/generational-garbage-collection- write-barriers-write-protection-and-userfaultfd-2-8b0e796b8f7f)

And a review of LLVM's GC facilities: [https://medium.com/@MartinCracauer/llvms-garbage- collection-...](https://medium.com/@MartinCracauer/llvms-garbage-collection- facilities-and-sbcl-s-generational-gc-a13eedfb1b31)

Overall message is that there are many different ways to get to the destination, and creative solutions are mixed in.

<comment> dan-robertson Do you know if llvm got good at garbage collection support recently? My understanding was always that their optimisations would mangle your stack/registers so much that a decent incremental exact GC becomes super hard. And that something like keeping one/two pointers to the tip of the heap in dedicated registers is super hard/annoying too.

<comment><USER3> I don't have anything new. I might have to re-write a GC for Clasp. Then I know :)

A better questions would be whether anybody has a moving, precise GC running on LLVM. Clasp with MPS runs, but that might be coincidence/luck.

</comment></comment></comment><comment><USER16> I'm a bit surprised to find no discussion of reference counting versus tracing GC, only a couple of passing mentions. On the one hand, I suppose this has already been discussed to death. And if the author felt it would be more fun to write and read about actually implementing mark-and-sweep GC, fair enough. On the other hand, reference counting definitely has its place, and I'd be curious to know more about the author's opinion on it, given his background in game scripting languages. Some scripting languages that have been put to good use in games, such as AngelScript [1] and Squirrel [2], use reference counting.

Edit: My mistake; he discussed it back in chapter 3.

[1]: [https://www.angelcode.com/angelscript/](https://www.angelcode.com/angelscript/)

[2]:: [http://squirrel-lang.org/](http://squirrel-lang.org/)

<comment><USER17> FWIW, in re: reference counting vs. tracing GC

"A Unified Theory of Garbage Collection" [https://researcher.watson.ibm.com/researcher/files/us- bacon/...](https://researcher.watson.ibm.com/researcher/files/us- bacon/Bacon04Unified.pdf)

> Tracing and reference counting are uniformly viewed as being fundamentally > different approaches to garbage collection that possess very distinct > performance properties. We have implemented high-performance collectors of > both types, and in the process observed that the more we optimized them, the > more similarly they behaved— that they seem to share some deep structure.

> We present a formulation of the two algorithms that shows that they are in > fact duals of each other. Intuitively, the difference is that tracing > operates on live objects, or "matter", while reference counting operates on > dead objects, or "anti-matter". For every operation performed by the tracing > collector, there is a precisely corresponding anti-operation performed by > the reference counting collector.

> Using this framework, we show that all high-performance collectors (for > example, deferred reference counting and generational collection) are in > fact hybrids of tracing and reference counting. We develop a uniform cost- > model for the collectors to quantify the trade-offs that result from > choosing different hybridizations of tracing and reference counting. This > allows the correct scheme to be selected based on system performance > requirements and the expected properties of the target application.

<comment><USER18> This is one of my favorite papers. It's a very accessible article that dispels the myth that reference counting is somehow not a form of garbage collection.

<comment><USER6> _> This is one of my favorite papers._

Mine too. It's a gem.

</comment></comment></comment></comment><comment> c-smile While reading I was expecting to hit moving/copying/compacting GC discussion at some point. But not.

IMO, one of GC's benefits is that it maintains data locality. Otherwise given GC is not that different from reference counting MM (loops in ownership graphs aside). Same problems with memory fragmentation inherited from malloc/free.

<comment><USER19> When you say locality, you mean moving memory allocations next to each other so that there is no wasted space between them right?

<comment><USER3> Not wasted space. Unreleated space would do.

Keep in mind that you only have a tiny amount of L1 data cache lines. They are gone so quickly. If you can get a couple more struct instances in an array into those cache lines (without the cache lines holding unrelated nonsense as a byproduct of a memory fetch) that is a huge win.

The issue of L1 cache _lines_ is more important than the size of the L1 cache. The granularity of the cache lines uses up the size of the cache very quickly if all cache lines are padded up with 3/4rd nonsense that you don't need right now.

</comment></comment></comment><comment><USER20> This is great. Garbage collection is one of those things that tends to scare people, even though a basic garbage collector can be _very_ simple (though a naive approach is usually also horribly slow..). Great to see the amount of illustrations to make it easier to grasp.

<comment><USER3> A GCed piece of nontrivial code can also be faster than a malloc/free solution.

The reason being that allocation can be much faster. The GCed code can allocate memory with as much as an increment of a pointer (and that is atomic, so no thread locking needed).

malloc/free always do full function calls, and they might/will descent into dealing with fragmentation (aka finding free space). Likewise, free() isn't free and cross-thread allocation/deallocation can further complicate things.

<comment><USER21> Is this universally true? Redis for example vendors jemalloc so it's entirely possible for malloc to mostly inline? IIUC malloc isn't a syscall like the underlying sbrk and mmap calls that malloc implementations use to get memory from the kernel?

<comment><USER3> Sure, you can change any of the individual properties.

But if you cannot move memory (adjust pointers like most GCs do) then you will have to deal with fragmentation, which slows down allocation (or causes other drawbacks).

Moving GC can also make the program faster due to memory compactation and hence being more efficient wrt CPU cache and TLB.

<comment><USER20> Fragmentation issues depends greatly on language. E.g I'm (perpetually, it seems) working on a Ruby compiler, and I slotted in a naive gc as a starting point and instrumented it.

Turned out the vast majority of allocations are tiny object instances of a handful of different sizes. As a result minimizing fragmentation is as easy as allocating pools of a fixed size for small objects, and round up larger objects to a multiple of block size. There are still truly pathological patterns possible, and a compacting / generational gc may still be worth it later both to deal with that and to reduce the cost of a collection, but for a lot of uses you can get away with simple options like that.

</comment></comment></comment></comment></comment><comment><USER22> I'm definitely a newbie at this topic, but I wonder if we can have some type of static GC? I'm not speaking about Radical change to the model of the programming language (like Rust), but about a compile time analyzer that can detect when object will go out of memory (edit: out of scope) and insert a code to deal with it, or make some expectations about the real generation of the object, this will decrease the amount of required work by the GC during runtime, no?

<comment><USER23> Isn't a compile-time analyzer that can detect when an object will go out of memory precisely what Rust (and C++ RAII) does? It's just a form of escape analysis.

Imagine creating a Rust program entirely with `Rc`. It's basically a GC'd program at the point where the "roots" are managed by the reference counter. The "list of roots" is only ever messed with whenever a `Rc` is dropped/created, and one can optimize functions to take `&Rc` to reduce "GC" pressure. I do not believe it's possible to automate this process in general because if you could, I have a hunch the solution can be used to decide the Halting Problem.

So sure, in general a GC can perform some heuristics to predict the lifetime of an object, but usually the point of using a GC is that one does NOT know the lifetime or it is insanely complex.

<comment><USER24> Such analysis also requires language design that limits the legal statements in a program to make the analysis tractable.

Without these restrictions, this problem is isomorphic to the halting problem. (Proof: assignment of a given memory object to a field within another unrelated object creates another reference. The job of automatic memory management is to determine when no such references exist. Now replace that assignment with HALT. Any such automatic memory manager that operates statically would be able to find all HALT statements within the program and so solve the halting problem for an arbitrary program.)

That's why languages that manage memory statically like Rust & C++ must be able to reject some programs as "not passing the borrow-checker", and everything else requires run-time support via either GC or refcounting.

<comment><USER20> Doing it perfectly requires a suitable language design, but even a pathologically statical analysis unfriendly language like Ruby still allows you to determine it in many cases. You just need to accept that for such languages it is an optimisation, and you still need to fall back on full gc.

</comment></comment></comment></comment><comment><USER25>
      > if (previous != NULL) {
      >   previous->next = object;
      > } else {
      >   vm.objects = object;

Ergh. That's much more painful than it needs to be. Maybe try:

      static void sweep() {
        Obj** ref = &vm.objects;
        while (*ref != NULL) {
          if ((*ref)->isMarked) {
            (*ref)->isMarked = false;
            ref = &(*ref)->next;
          } else {
            Obj* unreached = *ref;
            *ref = unreached->next;
            freeObject(unreached);
          }
        }
      }

<comment><USER26> Funny you might say that.

 _Baby's First Garbage Collector_ [0] (from the same author) uses this approach.

[0]: [https://journal.stuffwithstuff.com/2013/12/08/babys-first- ga...](https://journal.stuffwithstuff.com/2013/12/08/babys-first-garbage- collector/)

</comment></comment><comment><USER2> The long awaited garbage collection chapter is finally here! I'm not sure the discussion about white/gray/black objects is strictly necessary for a simplest possible garbage collector, but it definitely will help those who want to read more about the topic in the future.

<comment><USER6> _> I'm not sure the discussion about white/gray/black objects is strictly necessary for a simplest possible garbage collector_

I wondered about that too. If you aren't doing an incremental collector, it's not really necessary. But I think it helps build a visual intuition for the algorithm (and other graph traversals for that matter), so I felt it was worthwhile to put in there.

</comment></comment><comment><USER27> Garbage collection solve many problems on virtual machine as memory leaks and override on primary memory, many programming languages now implement something like garbage collection on API then the compiler can manage the memory for the user.</comment>