TRE: A Regex Engine with Approximate Matching - <AUTHOR> http://ducktape.blot.im/tre-a-regex-engine-with-approximate-matching <comment><USER2> An interesting theoretical problem that arises: Given a regular language L, define LD(L,k) to be the set of strings with Levenshtein distance at most k from some string in L.

1\. Is LD(L,k) regular? (yes)

2\. How hard is it to construct a regular expression(or DFA, NFA) of LD(L,k) given a regular expression(or DFA, NFA) of L? (probably it is something k times the original size in terms of NFA)

I believe a constant k here does not make much sense. since we might match super long strings, then having more errors seems ok. Maybe we can ask for the following:

LDM(L,ε) is the set of strings, such that if x in LDM(L,ε), then there is a y in L, such that distance between x and y is at most ε|y|.

LDM(L,ε) does not seem to be a regular language.

<comment><USER3> If memory serves, it returns the number of deletes/inserts/edits. So what you mention can still be handled.

<comment><USER3> Nevermind, you can set the cost/max of each:

[https://laurikari.net/tre/documentation/regaexec/](https://laurikari.net/tre/documentation/regaexec/)

</comment></comment></comment><comment><USER4> Looks pretty handy, but wish it could capture the actual edit distance somewhere. You can set a max, but many use cases call for knowing how close the match was.

</comment><comment><USER5> Apropos of regex engines: PCRE [1] is an interesting and somewhat widely used [2] C library for Perl-Compatible Regular Expressions.

I was once on a product team where we used PCRE, and one of my tasks was building it from its C source on many Unix variants (such as Linux, Solaris, HP-UX, AIX, Tru64 UNIX, etc.) and Windows (x 32/64-bit OS versions for some of them). I learned something about the differences between the C compiler toolchains on all those OSes in the process. There was quite a bit of variation between them, in the commands and steps needed to compile and link programs.

[1] [https://www.pcre.org/](https://www.pcre.org/)

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

[https://en.wikipedia.org/wiki/Philip_Hazel](https://en.wikipedia.org/wiki/Philip_Hazel) (PCRE creator)

[2] From the Wikipedia article about PCRE:

>A number of prominent open-source programs, such as the Apache and Nginx HTTP Servers, and the PHP and R scripting languages, incorporate the PCRE library; proprietary software can do likewise, as the library is BSD licensed. As of Perl 5.10, PCRE is also available as a replacement for Perl's default regular expression engine through the re::engine::PCRE module.

>The library can be built on Unix, Windows, and several other environments. PCRE is distributed with a POSIX C wrapper, a native C++ wrapper,[a] several test programs, and the utility program pcregrep built in tandem with the library.

</comment><comment><USER3> Years ago in a pinch, I used this library to isolate data in OCR results. Looking for phone numbers or tax IDs, it would return values with a B in it and you could correct to an 8 or other similar transforms. Probably much better tools for this now, but at the time it was extremely useful.

</comment><comment><USER6> Interesting, would help with [1] ReDOS attacks? It would seem that fuzzy matching could put a upper limit on execution time right?

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

<comment><USER7> I believe the correct way to protect against ReDOS is to use one of the many regular expression implementations that do not have exponential worst cases.

Nowadays there are good DFA or Tree based matching algorithms that are O(mn) where m is the length of the regular expression and n is the length of the input.

</comment></comment><comment><USER8> This looks pretty interesting. Anyone know if this library has been ported to any other languages aside Perl?

<comment><USER4> C, Perl, Python, and Haskell: [https://laurikari.net/tre/faq/](https://laurikari.net/tre/faq/)</comment></comment>


I love my paper dictionary (2017) - <AUTHOR> https://austinkleon.com/2017/08/17/why-i-love-my-paper-dictionary/ <comment><USER3> I'm old enough to have used paper dictionaries and yet I don't miss them.

Today I have a dictionary of every language I speak in my pocket.

The serendipity of using paper dictionary exist online. Some dictionaries (like Merriam Webster show neighboring words). Others shows random words. Many offer to subscribe to a word of the day via email or an app.

If anything I find serendipity to be greatly improved by hyperlinks. The dictionary is this flat shallow lexicographically ordered collection of word definitions. It can't compete with the depth of the internet.

Wikipedia is a lot better than any paper encyclopedia I have used. It is updated with recent events. And following links you can go from rabbit hole to rabbit hole effortless. I have spent countless hours on topics I did not even know anything about in this fashion.

I think nostalgia gives people pink colored glasses that really distort reality. I have not owned a paper dictionary I over a decade and I really don't miss it.

<comment><USER4> Two points:

1\. The experience of flipping through a paper dictionary or book is more-or- less impossible to replicate on a screen. Even the most hyperlink-heavy Internet article is limited in comparison to a book that can be flipped through instantaneously. With hyperlinks, you're necessarily limited to the context of the article.

2\. Wikipedia articles are a mile wide and an inch deep and pale in comparison to an actual encyclopedia. Furthermore, they are all written like advertisements. This is easy to see on pages for cities and countries - <USER2> introductory paragraph is nothing but accolades, rankings, and tourist attractions. This is a far cry from an actual encyclopedia, which is about data.

<comment><USER5> > _2\. Wikipedia articles are a mile wide and an inch deep and pale in > comparison to an actual encyclopedia._

Do you have any examples? Or is this just a vague impression? There have been studies done about this by neutral outside researchers which found that generally Wikipedia was more comprehensive and more reliable than other encyclopedias.

<comment><USER4> Take the Vienna page as an example. In the introductory paragraphs, we have the text below. While it isn't incorrect or false, it's quite obviously included only facts that portray the city in the best possible light. If the purpose of an encyclopedia is to present information in a neutral, objective way, this doesn't seem to fit the bill.

I say this as someone who likes Vienna and thinks the quality-of-life studies are correct. But this information belongs in a sub-header, not in the introduction of the article.

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

 _Vienna is known for its high quality of life. In a 2005 study of 127 world cities, the Economist Intelligence Unit ranked the city first (in a tie with Vancouver and San Francisco) for the world 's most liveable cities. Between 2011 and 2015, Vienna was ranked second, behind Melbourne.[20][21][22][23][24] In 2018, it replaced Melbourne as the number one spot.[25] For ten consecutive years (2009–2019), the human-resource-consulting firm Mercer ranked Vienna first in its annual "Quality of Living" survey of hundreds of cities around the world.[26][27][28][29][30][31][32][33] Monocle's 2015 "Quality of Life Survey" ranked Vienna second on a list of the top 25 cities in the world "to make a base within."[34][35][36][37][38]_

 _The UN-Habitat classified Vienna as the most prosperous city in the world in 2012 /2013.[39] The city was ranked 1st globally for its culture of innovation in 2007 and 2008, and sixth globally (out of 256 cities) in the 2014 Innovation Cities Index, which analyzed 162 indicators in covering three areas: culture, infrastructure, and markets.[40][41][42] Vienna regularly hosts urban planning conferences and is often used as a case study by urban planners.[43]_

 _Between 2005 and 2010, Vienna was the world 's number-one destination for international congresses and conventions.[44] It attracts over 6.8 million tourists a year._

<comment><USER6> And what does your favorite paper encyclopedia have to say in the first few paragraphs?

<comment><USER4> I don't have a printed encyclopedia in front of me at the moment, but for comparison, here's the Encyclopedia Britannica online entry for Vienna. For the most part, it is pretty neutral and objective and has far less marketing- speak than Wikipedia.

[https://www.britannica.com/place/Vienna](https://www.britannica.com/place/Vienna)

<comment><USER7> When I read this Vienna article, I agree that it has perhaps a bit less marketing speak (although I don't think the two paragraphs from the Wiki Intro you pulled are indicative of the whole article) but it is not any less positive on the city.

In the linked article I think paragraphs 3 and 4 ("Vienna is among..." and "Viennese Lebenskunst...") basically read like they are from a Travel Guidebook on why you should add Vienna to your next itinerary.

I think it also showcases two of the major problems I have with Britannica and most other "old school" encyclopedias:

1\. A general aversion to putting dates with facts. For instance the article states that 2 million visitors comes to the city annually. The Wiki article links to statistics from the city that put that number much higher. I understand that the 2 million number may be from some time ago, but I have no way of knowing. My assumption has always been that they do not put dates on things to prevent appearing out of date. They are really good at putting dates on "history" but seem to be much more hesitant on putting dates on "current" information which makes me think that a lot of that "current" information is already "history"

2\. Lack of any sort of citations. I do generally trust Britannica, but it would be nice to get information about where they are getting their information.

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> This highlights one of the impacts that the internet has had on our society; the tyranny of the search result.

Precise results to queries, or results wrapped with irrelevant out of context, spam or just uninteresting near misses mean that our explorations are stymied.

The monopolies of knowledge provision (google, wikipedia) also mean that narrow groups (either tacitly through algorithmic design or directly through editorial decisions) control the associations of knowledge. The concerns of the organisations offering the knowledge are also reflected in the structure of the systems provided. Google is a money making operation, children do not make it money, therefore Google does not offer a children's search engine (if I worked for Google I would be _ashamed_ at how hard they make it for children to find things on the internet).

There are intentional manipulations, but these are not the fault of the internet providers (I believe, almost completely) and happened with dictionaries, encyclopedias and text books in any case. But what is new is the narrowness and exclusivity of information provision.

<comment><USER9> Can you give an example of how Google is failing kids' unique needs? I'm not understanding.

<comment><USER8> go to incongnito/private mode to get personalisation out of the way (I don't think that this makes a difference, in this case, but who knows!)

Search for hybrid car, ignore the privacy reminder as that's just because of private mode.

I get 4 ads. On the right there is an information bubble with images, a wikipedia snippit and four alternative searches.

The highlighted result is off the page on my browser - I have to scroll for it, it's a summary from "car magazine". Then there are four lines of "people also ask" and then the organic results start.

Notice, I have missed out the icons on the search bar, the menu bar of search controls and the report of the number of results and search engine performance (does anyone really need to know that google can do this search in 0.85s? Isn't that debate done?) And most confusingly the switch between the browser bar and the search bubble - your search is mystically teleported from one place on the screen to another, a violation of interface that floors children instantly.

Now - imagine you are explaining this to a six year old (the layout of the page). I have done this, and I was met (unsurprisingly) by blank incomprehension. I have previously explained (conceptually!) Newtonian Calculus to said six year old, and she got it (I'm not so sure I do, but there you go). We (the informationartiieee) filter this out, screen these complexities and dodge and weave through the spaghetti that modern google is (do you remember geocities, old yahoo?)

Now, we are not even in the zone of how do we frame the queries, how do we cross check, how do we explore further (although google is trying to prompt us/me for that) but the fundamental is that google is trying to be many things at once; it's trying to provide a console onto this topic, it's trying to provide shopping advice, it's trying to summarise so that we don't click further (is that good?) it's trying to prompt for other searches (which I posit is a self fulfilling prophesy), what it is not doing is delivering a kids encyclopedia or providing a diverse interface to a plurality of different types of information sources.

I can contrast this with a tool that google provides that I know that six year olds do and can use - google maps. They can find places and use "the little red man" to locate themselves and see what's where they are exploring. Hardly any explaining is needed.

Now there are a lot of queries where Google reverts to a more "information only mode", for example "where do butterflies come from" but this is another point - google's behaviour is wildly inconsistent, these variations are fine for you and me and our friends, but they are not for six year olds, or nine year olds (my experience is limited here).

I really find it interesting that it is a fact that the people at google haven't even made a tool that their families might need or can use. I am a technical person, and my family are pretty well smack in the google demographic, so I don't know what that reveals about how useful the tool is for people who are not like me an google people... but I suspect that it's pretty indicative that it just isn't as useful for many, many people as it really should be.

<comment><USER10> What is Google's competition like here? Sounds like Google should be worried.

<comment><USER8> lol.

Sadly, it's me who's worried.

</comment></comment></comment></comment></comment><comment><USER11> This is the same reason I like libraries and book stores. Especially used book stores. You can find some interesting books at "random". Generally random of course. But these are books that would, 9 out of 10 times, never be recommended to you by an algorithm. Taliban by Ahmed Rashid was one such book. I found it late last year by accident at the library. Totally changed my perspective on the war on terror. A way better understanding on how 9/11 came to be (the book was published in 2000). That led to the past year of reading history books on various subjects. And I'm happy. While my amazon account only ever recommends tech and business books to me. Which all generally sadden me.

Oh plus, this was a few years ago, I road tripped through the Oregon coast. I went into used book stores and bought a metric fuckton of old school pulp fiction crime noir books for like a buck each. All published in the 20s and 30s. Holy crap, so awesome. Again, never would have been suggested any of those if I was walking around and picked random books to look at.

Random and physical is nice. Digital and "recommended" has its place. But the real world can't really be replaced.

<comment><USER12> I have come to the conclusion that digital/algorithmic recommendations will always be marketing influenced and lack the context to make an absolute guaranteed recommend. Random-physical and friendly suggestions are more accurate and reveal much more as they come from sources rather than a machine "guessing" what will work. Algorithms are also subject to poisoning. Friendly suggestions are subject to poisoning but the risk is of course much less.

TLDR; I enjoy the work required for discovery. For example, I'd rather cancel Netflix streaming and returning to Netflix physical for missed releases, hidden nuggets/gems, hard to find, and better consumption management.

<comment><USER11> I agree. But again, I'm not 100% against algorithmic recommendations. Same way I'm not always 100% for human curated recommendations either. Both have pros and cons.

What I liked back in the day was the original netflix recommendations when they first started. From what I understand, they did it where they matched movies you like/dislike compared to other people that roughly liked/disliked the same. Then they recommend movies and guess how you might feel over a movie you haven't seen. Those I have watched, but haven't rated yet, the ratings were pretty close to how I felt about said movie. Then, it always seemed like the end of the list of recommendations was an oddball film. I loved those odd ball movies. Always out of my "known territory" of films. 70% of the time, yea, never ventured to watch. But the 30% that I did end up watching were always worth it and never regretted. That's the system I like. A decent mix of the pros and cons from both worlds.

</comment></comment></comment><comment><USER13> Related: anyone on MacOS, try to use the dictionaries built into the OS. They are extremely high quality and have surpassed sources I've seen elsewhere. Even for words in my native language I'll pick up a lot of interesting details and synonyms. And on top of that they have a lot of language-to-language dictionaries for anyone who deals with foreign languages a lot.

It's actually on my short list of things that make me want to stick to MacOS desppite everything

<comment><USER14> I didn't even know there was one. I thank you for that. Is there an API that I can hook into (I'm thinking emacs here). Maybe a Swift script calling this: [https://developer.apple.com/documentation/coreservices/14468...](https://developer.apple.com/documentation/coreservices/1446842-dcscopytextdefinition)

<comment><USER13> [https://josephg.com/blog/reverse-engineering-apple- dictionar...](https://josephg.com/blog/reverse-engineering-apple- dictionaries/) seems like there's someone who outright reverse engineered the format as well.

Normally I would recommend going for something via Applescript but it seems like Dictionary.app doesn't expose anything via Applescript (though it totally should)

</comment></comment></comment><comment><USER15> Here's a great article covering why some dictionaries are great and why some are just boring. It also goes into a more detailed discussion of John McPhee (mentioned in OP) and what dictionary he uses.

"You're probably using the wrong dictionary" \- [http://jsomers.net/blog/dictionary](http://jsomers.net/blog/dictionary)

<comment><USER16> I stumbled across this article a bit over a month ago and it lead me to discovering the mobile app Dictionary Universal which allows you to search the definition of a word in multiple dictionaries at the same time. It's nice to see different dictionaries definitions of the same word.

The only problem I have with it is that I can't seem to find any legal copies of dictionaries to use with it in the supported Lingvo DSL and Stardict formats.

That being said, there are a few websites that allow you to add all the big names in dictionaries to the app. I just wish I could do it above board.

</comment></comment><comment><USER17> A paper dictionary has a massive advantage for me when reading: it's not a source of distraction. There's no social media on it. I cannot check sport results. I do not even think about being tempted because all my screens are not close to me.

I also find it quicker than 1/unlocking my phone, 2/opening the app list, 3/opening the browser/app and 4/searching for the word and 5/clicking on the appropriate result in the list available. But it's minor and I'm sure some people have quicker ways. The main advantage is simply that I have no access to the internet.

</comment><comment><USER18> I enjoy using my dictionary as well, though I purchased it new at a chain store and it is somewhat lacking in cachet.

One thing I did do is develop a little script that puts 10 random dictionary words into whatever text file I'm editing, which has been helpful for brainstorming purposes. Several of my clients' ah-ha moments have been directly attributable to questions I have asked them due to these dictionary words. Plus: There's just something about coming across a neat word.

</comment><comment><USER19> Information will always be better digitized, this is objectively the case. Whether you grow up appreciating ink and paper or swiping up and down is incidental.

This is just romanticizing paper/physical medium. Similar things happen when you google, you might not type in the perfect keywords so you get other results. This also happens when looking for images, you will see all kinds of related ones, and I use this for inspiration as well (not to mention services dedicated to this like Pinterest which serve this purpose specifically). I really don't get the attachment to physical medium. It's clunky and 100% of the information can be digitized. Now books as a decorative element in some room... that's good interior design.

</comment><comment><USER20> My faves are the early Webster's Dictionaries (I have an 1828 first edition reprint, and a New International Second Edition, Unabridged, that was published in 1934 and lives on a library stand in my office).

I'm also a huge fan of the complete Oxford English Dictionary (the final arbiter of the meaning of English words) and although I'd like to have the full multivolume edition, because of space contraints I settle for the older 2-volume micrographically reduced edition that comes with a Bausch & Lomb magnifying glass that lives in its own drawer at the top of the slipcase; I won this as a spelling bee prize.

</comment><comment><USER21> I think American Heritage is special case. I have had many dictionaries and the only one that is "readable" is AHD. I have the fifth edition and every time I look at it it just brings me joy.

</comment><comment><USER22> This seems like a good time to endorse the "real" Roget's Thesaurus (currently titled, 'Roget's International Thesaurus' with "The Original Roget's" on the dust cover).

I'd wager many (?most) folks have only used a dictionary-style thesaurus or some online version. But, kind of like RPN calculators <heh>, once you master a real thesaurus it's a game-changer.

For those not familiar: all the 'target' words are fully indexed against the main section where Platonic ideals, as it were, comprise fundamental language constructs. Think: Dewey Decimal System, but for words.

Usage: locate the word you want to match in the index (which is about one- quarter of the page count!); find the section ID for the matching concept(s); flip forward into the body section to the numbered § where is listed _all the words in that category_.

There you find not just a handful of synonyms as you get from a dictionary- style but every word that is nuanced, colloquial, arcane, &. — they're all there. It's frequently in the dozens and sometimes is more than a full-page column. There is no comparison in the quality of choices between the two formats.

NB: my college roommate turned me onto this as a freshman and it's been one of my greatest research/writing tips ever since.

</comment><comment><USER23> I'll admit I don't use a dictionary much when I am writing. Spellcheck has spoiled me and I probably limit my vocabulary as a result.

When I am reading I pull out the dictionary all the time (most often on my phone) to look things up. I prefer the digital dictionary while reading because it's virtually instantaneous and doesn't impact my train-of-thought as much as a paper dictionary would. I also write down at least 1 word a day that is new to me or is notable and fun. Most recently I've written down "autodidact," "epithet," "pithy," and, after reading this blog post, "proprioception."

I can see the value in using a paper dictionary when writing. I think I'll give it a try.

</comment><comment><USER24> Price is a factor too. Access to the online version of arguably the best Dutch dictionary costs 75 euro's a year. The print version costs 180 euro's and lasts you a lifetime. Granted, you don't have the monthly updates they claim to do, but I personally hardly look up modern words so that adds little value for me.

For the convenience of a quick search interface I would be willing to buy an online version for a euro per month. For that price, the publisher would have earned more money from me than he has until now, since my print version is over thirty years old (and still going strong).

</comment><comment><USER25> I like paper book references because when I use them, there's not a permanent record made, belonging to some unknown group of companies, of the exact time and manner of how I used them.

</comment><comment><USER26> I feel the same way about the encyclopedia. When I was a kid, I had to use a book to look things up, and oftentimes I would read a bunch of articles on the way to what I was looking up. The closest you could get today would be hitting the "random" button on wikipedia a few times before reading the article you were looking for.

</comment><comment><USER27> In _The Autobiography of Malcolm X_ , he tells how he learned to read and write by copying out, _by hand_ , the _entire dictionary_ he got from the prison library, copying a page a day. (It's in chapter 11 of the _Autobiography_ ).

</comment><comment><USER28> > convenience always ends up replacing nostalgia

I used paper dictionaries so much when I was kid but I don't find them useful today. I have so much information at one tap of my hand that, it is hard to see the benefit or the convienience on something that lacks almost everything.

</comment><comment><USER29> A good paper dictionary usually has better usability than most Internet dictionaries. That being said, I tend to use Wiktionary quite a lot, but then usually use the sources it points to in order to verify the results.

</comment><comment><USER30> The standard answer from my parents when I asked what something meant was to "look it up in the dictionary". It annoyed child me, but I think it gave me the habit of doing my own research.

I still have a dictionary now.

</comment><comment><USER31> And paper encyclopedias.</comment>


On Facebook, fear of parasites push people to post feces, pursue dangerous cures - <AUTHOR> https://www.nbcnews.com/tech/tech-news/facebook-fears-parasites-push-people-post-pictures-feces-pursue-dangerous-n1081286 <comment> dawg- The best book I had to read in college was called "Madumo: A Man Bewitched". It's by an anthropologist who befriended a man in South Africa named Madumo. Madumo was a young man from a very poor family living in Suweto and he was working on going to college when the author met him.

At some point Madumo became "cursed" according to a local shaman and all of this misfortune started to befall him. All of his friends and family believed that the curse was real. He believed that the curse was real. A series of shamans took his money and prescribed him increasingly outrageous cures for the curse, not unlike the treatments described in this article.

The author's main question was, is the magic real? Isn't it real if everyone believes in it, and if everybody's actions are constrained by it? How can we honestly call something like that "not real"?

My question is, do we really believe that we in the west are immune to this kind of behavior? Have we really escaped the clutches of witch magic and shamanism just because we have high-technology things like the internet, particle colliders, atom bombs?

Maybe this is a part of human nature that will never go away. Maybe people will always snort rhinocerous horns for stronger erections and drink essential oils to get rid of their cancer. We think we're super modern but is it true? No matter how much "science education" spread by the likes of Niell DeGrasse Tyson and Bill Nye, is it possibly that we will we always find ourselves possessed by curses, demons, aliens, parasites?

If you're interested in this kind of thing I also recommend the book "Techgnosis" by Erik Davis, which brilliantly explores techno-magic and shamanism.

<comment><USER2> 1\. Human beings can be host to parasitic worms. Here: [https://www.healthline.com/health/worms-in-humans#types- of-w...](https://www.healthline.com/health/worms-in-humans#types-of-worms)

2\. That in the modern western world, we don't encounter them is due to our relative affluence. It's not uncommon for people to walk barefoot and not have clean water in some parts of the world.

3\. People dealt with and killed off parasites before pharmaceuticals..and so some of of the remedies are valid.

<comment> dawg- I'm not sure what you are talking about as I didn't dispute that parasites exist. The article is about people who irrationally believe that their bodies are full of parasites, posting pictures of their poop on facebook groups. And other people, who are not doctors, are telling them to fix the "problem" by doing dangerous things like drinking turpentine

<comment><USER2> But how do you know that? From that article? 1. That they are Irrational 2. What is wrong with posting poop pictures in a group? The internet is full of private groups that post pictures of all kinds of stuff..poop is relatively benign. 3. Those without degrees can heal non chronic and non life threatening issues with the body.

Having said that, drinking turpentine is questionable but it sounds clickbaity for inviting outrage to me. Ymmv.

Further, assuming these are a group of people paranoid and delusional, people still have the right to congregate and talk amongst themselves and share their thoughts. It's called freedom of speech. There is no coercion.

Finally, the reason people seek out others to discuss health issues is because patients are discounted by doctors and physicians. The art of listening is challenged when your HMO allots 12 minutes for patients and doctors to converse..just enough time to prescribe medicines and order diagnostics.

Sick people like to talk. And they must be heard. It's the same with old people. Especially because older people tend to be sicker than healthy young adults. If the medical profession needs to learn something new, it's listening. And listening without judgement.</comment></comment></comment></comment>


The Town That Creep Built - <AUTHOR> http://bldgblog.blogspot.com/2015/04/the-town-that-creep-built.html <comment><USER2> Previous discussion: [https://news.ycombinator.com/item?id=9506224](https://news.ycombinator.com/item?id=9506224)

</comment><comment><USER3> Raise your hand if at first you thought this was scope creep (based on title alone)..</comment>


Former NPM CTO to starts an open-source alternative - <AUTHOR> https://www.youtube.com/watch?v=MO8hZlgK5zc <comment><USER2> This is the most powerful talk i have ever seen</comment>


Show HN: Culori – a general-purpose color library for JavaScript - <AUTHOR> https://github.com/Evercoder/culori <comment><AUTHOR> I've recently re-started work on this library after a half-year hiatus — fixing a few bugs and adding more extensive documentation. I'm quite happy with most of the features, but I'm not convinced it's ready for the first stable release. I have some concerns that the interpolation section is a bit overwrought, but I haven't found a better way to combine the interpolation method (linear, basis spline, natural spline etc.) and how to interpret values (simple numeric values vs. hues vs. alpha values).

In either case, I'd love if you gave it a spin and let me know your thoughts on the functionality, API, and how the docs read in general. Another pair of eyes would be very helpful at this point!</comment>


Python for iOS - <AUTHOR> http://pythonforios.com/

<comment><USER2> Nice. So, it's possible to integrate the interpreter on iOS? My app <http://worqshop.com> has the Python editor (with syntax highlighting) and GitHub support. But, no interpreter!

<comment><USER3> This looks neat, but does it support other Git repos or just Github?

</comment></comment><comment><USER4> Is this a fully capable interpreter? In other words, is it capable of importing and running code from external sources? This would allow for some cool use cases.

<comment><USER5> Unfortunately, Apple rejected my last update because I had added the ability to import .py files from other Apps. If/When Apple changes their policy on this I will submit an update the next day.

<comment><USER6> From your example, I can see it is possible to import sympy, and the app store page says that you added a few "extra" packages. Could you list those extra packages on your website?

Since it is not possible to import files for now, would you take requests to add new packages to that extra list?

<comment><USER5> Certainly, I'll list them on the site. I would love suggestions on other modules to include. At the moment I'm working on compiling in SciPy and NumPy. Any ideas can be sent to firstname.lastname@example.com or posted in the in-app Feedback Forums (via the Settings Tab).

</comment></comment></comment></comment><comment><USER7> Downloaded it and love it. Sometimes I get the urge to mess around with simple ideas, but I need to work some part of them out by coding (i.e. RNG). If I'm out and about and have some time to spare, I can now pull out this app and do some coding exercises. :)

Problem: I can't seem to swipe between the console, editor, and docs.

Usinh iPhone 4, version 5.0 (9A334)

<comment><USER5> Swiping between tabs is an interesting idea. I'll see if there is a good way to implement this. Thanks for the suggestion!

</comment></comment><comment><USER8> This is very interesting. If anyone is interested I've embedded Python on Android with support for the standard library. I actually wrote a 2D game platform similar to Corona (<http://www.anscamobile.com>) but almost entirely written in Python. You can use PyDev to develop and it looks/runs the same on the device. As a demo I wrote a simple free game ([https://market.android.com/details?id=com.gravityfour.game.c...](https://market.android.com/details?id=com.gravityfour.game.candyland)).

I have been thinking what to do with the code and how to release it. I want to open-source it and see what people do with it. I think it has a lot of potential to compete with Corona. It is in a prototype-ish state at the moment. If anybody is interested in helping send me an email :).

 __I realize "Scripting Layer for Android" exists but I wanted to combine native code with Python easily.

<comment><USER9> nice! i've been looking for a prototyping tool.

note that the email field in your hn profile doesn't show up publicly... you have to also put it in the about field.

<comment><USER8> oops updated :)

</comment></comment></comment><comment><USER10> Great program! Couple of suggestions:

* Can you add a free python reference like this one: <http://www.diveintopython.net/>

* Syntax highlighting!

* Dropbox support - a very simple module to save .py or txt files into a dropbox folder and sync - this would be great!

</comment><comment><USER11> This is awesome. I've been waiting for this! Now all I need is the same thing for JavaScript and I'll be in heaven!

<comment><USER12> [http://itunes.apple.com/us/app/javascript- anywhere/id3634522...](http://itunes.apple.com/us/app/javascript- anywhere/id363452277?mt=8)

</comment></comment><comment><USER13> Awesomesauce! Even w/o the interpreter, it's helpful for trying snippets on the go. I think if you need something more elaborate, just spend 5 seconds more and open your laptop.

</comment><comment><USER14> Is it as crippled as the lua ide? Or can you import/export scripts without copy/paste?

<comment><USER5> You can export script files and interpreter sessions (via email), but unfortunately, importing from outside the App is prohibited by Apple.

</comment></comment><comment><USER15> Can it save anything to the filesystem (within its own sandbox?)

<comment><USER5> Yes, you can save/load script files and interpreter sessions to the device. The save path is in sys.path so those saved scripts can be imported into other scripts or the interpreter as well.

</comment></comment><comment><USER16> Some of the icons do not have 2x versions; can you fix that?

<comment><USER5> Hmm, I did not realize that. I will fix it now and include them in the next update (v1.4).

</comment></comment><comment><USER17> The theme is horrible :/ We don't live in the matrix.

<comment><USER18> what kind of themes do you prefer?

<comment><USER19> I'd say, when in doubt, the rest of iOS is a good guideline. Plenty greys and blues, black-on-white text, boring, but at least not distracting.

</comment></comment></comment><comment><USER20> Python for iOS is something that makes Python programs run as apps and maintains its library -- thus something explicitly impossible. This is just a gadget.

<comment><USER21> That's not true at all.

Interpreted code is perfectly legitimate to use in an iOS app, under certain restrictions.

The first is that you cannot JIT it, because the OS prevents execution of memory that has been writable (this is true for every app except for MobileSafari and it the reason why the only arbitrary code execution vulnerabilities have been found through MobileSafari).

The second is that you're not allowed download executable code to increase or change the functionality of the app. The reasoning for this I see as a little bit of selfishness on Apple's part, in that you can't really build a native app that acts as a platform for other people's fully-fledged 'apps' bypassing the app store, and the second being that the user's expectation of an app is that it be pretty much self contained in terms of functionality.

There have been exceptions to this though. CouchDB for iOS runs interpreted on the Erlang VM, but its database queries are executed by Mozilla's command line javascript engine. The code that runs on this query engine is actually downloaded through the database's syncing functionality, and it IS allowed in the app store.

So there does seem to be some leeway in terms of what is actually banned in that case. It seems that if downloading something technically turing-complete is REQUIRED as part of an essential function of the app, and cannot by necessity actually _change_ the main functionality of the app through running in a very limited sandbox (no I/O of any kind or indeed anything but data processing in this case), then it's allowed.

To get back to your original point, if someone wanted to build a bit of middleware that bridged the CocoaTouch libraries with python, then distributed that and allowed people to compile apps with it, it would be perfectly legal on iOS.

</comment></comment><comment><USER22> Unless I can program and do something useful on the target device itself, it will remain a mere gadget. The novelty of "trying out new ideas in the interpreter" wears off quite quickly. My MBA is (almost) as light as an ipad, and much more useful (programming wise.)

</comment><comment><USER23> why it is not a free app?

<comment><USER24> Because it takes serious effort to do it.

I'm glad they did it. 3 dollars is nothing compared with the value I got from being able to use python on my phone.

<comment><USER25> I grant that "Python for iOS" took serious effort, but I am sure "Python" took more effort. Still Python is free.

<comment><USER26> Python is free because the creator wanted it to gain traction. This app costs money because the creator wants to charge for it. No other considerations are relevant really.</comment></comment></comment></comment>


What I Learned Making ARKit Prototypes - <AUTHOR> https://medium.com/@nathangitter/what-i-learned-making-five-arkit-prototypes-7a30c0cd3956 <comment><USER2> The graffiti demo he made is very impressive.

Using various photos of the same place, he makes a time scrubber that shows the older art that was on a wall.

Link: [https://twitter.com/nathangitter/status/1020733723183124480?...](https://twitter.com/nathangitter/status/1020733723183124480?s=21)

</comment><comment><USER3> Basically - useful AR hardware isn't here yet but what we do have allows us to play around and test ideas.

I'm interested in using VR in a similar way. i.e. build a copy of a real space in VR, ensure the alignment is correct and make sure any moveable objects are trackable. It's a hassle but once you've done this you've essentially got a prototype of what it will be like in future when AR glasses have a decent field of view, work in full lighting and allow you to subtract as well as add light to the scene.

I think this is more fun that the other options:

1\. Hold a phone or tablet in front of you and imagine what it will be like when I can do that without holding a lump of metal and glass.

2\. Squint through a Hololens or Magic Leap and try and ignore the current hardware limitations.

However - in either case it's all a dry run for some future hardware platform that we don't have yet.

<comment><USER4> It's all leading to AR glasses worn by everyone, seeing a shared AR world superimposed on meatspace.

Kinda predicted by a neat anime called Dennou Coil [0]

[0] [https://en.wikipedia.org/wiki/Dennō_Coil](https://en.wikipedia.org/wiki/Dennō_Coil)

<comment><USER5> I think its going to be selectively shared, with much unshared. The results for human interaction will be very annoying. The next time you see someone at the airport playing a game on their phone with the volume maxed, imagine them dancing around and waving their hands in the air. That will be AR.

<comment><USER4> I wouldn't mind passing by a park and seeing kids playing with AR Pokémon in 3D space.

Most of it will be implicitly-shared by corporations/government in the form of AR ads/aids etc. much like today.</comment></comment></comment></comment>


Submittable (YC S12): How To Find The Pain That Creates Paying Customers - <AUTHOR> http://mixergy.com/michael-fitzgerald-submittable-interview/ <comment><USER2> First, let me say that in general I hate the negativity that has come to infect Hacker News, so it is only with much self-consciousness that I provide the following negative reaction. The mixergy post says "If you've heard me say that entrepreneurs should start by finding the pain, wait till you hear the first thing today's guest did." (And the submission headline supports this lede.) The advice within the recording is that the founders of Submittable got together and made a list of their personal problems, and Submittable was like third on their list. I don't think that's particularly novel helpful advice given that it's basically the entirety of Paul Graham's famous essay "How to Get Startup Ideas" which I hope everyone here has read. If there were more detail on other ideas and ways to find startup ideas, it would be fine, but this is a one/two sentence explanation of the most obvious and well-known method, being used to justify the entire interview. The real question is what do you do when you don't have any problems and you don't know anyone with business problems.

That said, this isn't a reflection on Submittable as a company or the Submittable founders. I'm sure they are awesome and have an awesome service, and I hope they have the best of luck.

<comment><USER3> This isn't negative. It's a great comment.

I think there's more to my interview than your short summary. For example, Michael made a mistake that's common to people who start with their own pain, so he pretty much had to scrap a whole year's worth of work.

What he learned was that he -- as an author -- was experiencing a ton of pain when he submitted to manuscripts to publishers. But the pain wasn't caused by the way he submitted his work to them. It was caused by the way their processed what he (and other authors) sent.

The cure for this was to have outside conversations. Picking the right person to talk to is a whole other part of this interview, but I won't get into it here. I don't want to recreate the interview.

<comment><USER4> I personally really enjoyed the interview. It was refreshingly honest to hear about his struggles and it was a good reminder as to how much work and dedication it takes.

Some really great quotes about what kind of competition he's most afraid of.

Really thoughtful interview.

</comment></comment></comment><comment><USER5> "I'm not afraid of the guy with 190 IQ, I'm afraid of the sicko who never gives up"

</comment><comment><USER6> I did some work in a similar space. It's amazing how many publications and organizations out there need a good solution for doing something as simple as a photo contest or a simple storage for documents. This company did a good job tackling a specific audience of "publishers, universities and art organizations." While the work I did was on a product that was able to be flexible enough (more generalized consumer feedback) to facilitate this kind of thing, I think they made a great decision to build something specifically for this type of problem.

I wish them the best of luck in their business, it was an interesting ride for us.

</comment><comment><USER7> May someone from Submittable explain in simple words the work flow issue that this service improves upon?

I don't understand it very well.

<comment><USER8> Organizations and publications often have to receive documents from outside people for many reasons. Magazines accept article submissions from freelance writers. Academic journals receive papers from scientists. Companies receive resumes from jobseekers.

These documents need to be reviewed by the organization and then decisions need to be made - should the article be published? Should we interview the candidate?

Submittable makes it easier for the outside people to send the documents, and makes it easier for the organization to receive, review and decide on the documents.

<comment><USER7> Thank you.

<comment><USER9> Hi. This is Michael (Submittable). I've been on a plane today. Just seeing this. But this answer is spot on. We came from a publishing background where publishers have an over-supply of content-see Clay Shirky's Congnitive Surplus for more on this- and they needed a simple way to accept and curate incoming work. Submittable was originally a tool for that, but has since branched out to accept and curate any kind of digital object: manuscripts, film, audio, images, links, applications, resumes, anything coming in that needs to be reviewed and acted on.</comment></comment></comment></comment>


Fun with the Windows Subsystem for Linux - <AUTHOR> https://blogs.windows.com/buildingapps/2016/07/22/fun-with-the-windows-subsystem-for-linux/ <comment><USER2> I grew up through some of the more interesting business practices Microsoft employed, and it's several attempts to harm the Linux ecosystem. I would love to see this move by Microsoft in a positive light, but can't help but be suspicious ? For now the possibilities it opens are great, however I wish I understood Microsoft's strategic view of this and how it might evolve over time for Linux.

<comment><USER3> Strategic View is simple I believe, they want developers back in there fold. MS sells Windows and most devs have no problem with its UI but want to use linux CLI, also some new tools/languages are developed only/first for Linux. Now OSX being compatible has captured this lucrative marketshare.

Having good developers using Windows will be a great boost for ecosystem, a percentage may choose to experiment with UWP, a react-native developer may try a Windows version of app.

Only thing to loose is people may not build cli tools for Windows, but that is already a lost cause. Linux won't pose a threat to GUI, so no chance of non developers getting comfortable and migrating to Linux. So win-win and later some more win.

<comment><USER4> This is exactly me. When I can start running Linux(-ish) command line tools in Windows, I'll ditch my Macbook for a Dell in a hot second..

Here's a question though that I seem to not see answered (but maybe I'm not reading enough):

Can I run MariaDB or nginx or other "servers" in this environment? Or does that stuff not work?

<comment><USER5> I don't see why you wouldn't be able to. Then again, some tools don't seem to work for some inexplicable reason (ex screen).

<comment><USER6> I haven't tried W10 at all, but it's likely they didn't implement all of the terminal features required by screen, or that they did, but $TERM is set to something not recognized by [the terminal library that presumably underpins] screen.

For any new programmers who want to learn more, search for "ANSI escape codes", VT100, "terminal emulation", termcap, and terminfo. Maybe add curses and pseudoterminal for extra credit.

</comment></comment></comment></comment></comment><comment><USER7> Appreciate this is a minor point but the name _Windows Subsystem for Linux_ confuses me. Am I missing how to read it properly? It seems more like a _Linux_ subsystem _for Windows_ to me :-)

<comment><USER8> It's a Subsystem _of_ Windows _for Linux_ execution.

</comment></comment><comment><USER9> Sounds like Windows users discovering (and apparently having "fun with") GNU/Linux. None of this is really specific to this subsystem.

<comment><USER10> I agree. This looks like an elementary Linux tutorial.

<comment><USER11> Agreed. for an elementary tutorial, I would have not put that

      rm -rf /mnt/c/

command on it, at least I would have put a # in front just in case.

Once the authors discovers GNUScreen/tmux, xargs and other tools, his life will change :)

<comment><USER12> tmux works, screen shits the bed.

<comment><USER13> Is there a reason for this / is it likely to be fixed anytime soon? I grew up with screen but this might be a good reason to try out tmux, I guess.

<comment><USER14> I tried out tmux starting from a week ago after a long time using screen, and after I changed the key-bindings to be more screen-like I have to say that I'm very impressed. I wasn't even close to a screen power user but with tmux I feel like I have screen plus a whole lot of extra.

</comment></comment></comment></comment></comment></comment><comment> mark-r So the Windows 10 console _finally_ gets back the escape sequence capability that DOS had with ANSI.SYS? About frickin' time!

</comment><comment><USER15> That name bothers me. I understand that people don't want to use the name GNU/Linux because it's stupid and overcomplicated, but in this case there is no Linux at all. This is quite literally GNU running on top of the NT kernel, so why use the Linux name at all?

On a side note, the irony of GNU/NT must be killing Stallman.

<comment><USER16> Cygwin is GNU on top of the NT kernel. WSL is an implementation of a Linux ABI. In theory, you could run a non-GNU userland environment compiled for Linux on top of WSL.

</comment></comment><comment><USER17> ELI5: What does this mean to me, as a developer who's really familiar with (and prefers) Linux, but has to use Windows? What cool possibilities will this "Linux Subsystem For Windows" open up to me? What things will it specifically _not_ open up to me?

<comment><USER18> I've been primarily a Linux user since 1995, and have been using Windows 10+WSL for the past week or so, since getting a new laptop.

The only thing I can think of that it'll open up for you is if you want to develop for Windows, while still having Linux available to you. Whether that's for developing games (most of the good game development tools run only on Windows, even if they can deploy to Linux/Mac/Android), or developing for Windows Phone (or whatever it's called this week), using Microsoft technology like Visual Studio and C# (though it's now possible to do most things on Linux via .Net Core, I think), or playing games that aren't available for Linux.

The modern Linux desktop is every bit as good as Windows (and Mac OS), IMHO, though I'd be willing to bet accessibility is still better on Windows. Hardware compatibility for modern devices is probably still better for Windows, too, though old devices certainly are more likely to run on Linux than Windows (a lot of my pro audio and music equipment hasn't run under Windows since like Windows Vista or something, but still works fine under Linux).

From my perspective after a week of tinkering with it, and using is exclusively for my development work, I don't feel like it has given me anything over my Linux environment. But, it does make the Windows development experience much closer to what I expect from Linux. If I developed Windows desktop applications, I would tell a different story, but I develop applications that run on Linux servers; developing on Windows provides no benefits, only negatives...but the negatives have gotten so small that they probably don't matter, anymore. A new developer just learning to build web apps, for example, could do it pretty much as easily on Windows as they could on Linux. Which has _never_ been as true as it is today.

WSL is still very buggy and quirky, and the Windows build it runs on crashes several times a day (at least on my laptop, it does), so it's a net loss in productivity for me, as I'm spending some time waiting on reboots. But, in a few months, it'll probably be stable, widespread, well-documented, etc. And, at that point, maybe it'll even be an ideal option for some developers who are building for cross-platform deployment. Who knows, maybe in a few months, I'll find myself wanting to build something for Windows. I might come back from Linux for a while to spend time in Windows; I certainly don't hate it as much as I used to.

<comment><USER19> >The modern Linux desktop is every bit as good as Windows

Like resizing Windows in Xubuntu? They give you a 1 px border to grab. Bug reported years ago. No fix; happens in all built-in themes. This kind of lack of polish is everywhere.

It's good, it's functional, usable, I'd take it over Windows XP or something, but let's not say it's every _bit_ as good.

<comment><USER20> Regarding resizing windows on Xubuntu: Hold alt then hold right click and drag. It is very easy to resize this way.

</comment></comment></comment></comment><comment><USER21> I am really looking forward to this for my Surface Book. Historically I've loaded up a virtual machine running Linux, this was more complete and had fewer hiccups than a Cygwin type of setup for me. Of course it would be _REALLY_ useful if they also support NFS for mounting stuff from my NAS appliance and a compositor (Wayland/X11/Etc.) that would allow things that create windows to work as well.

<comment><USER22> I use the current fast ring insider builds with no substantial problems right now. Why wait?

<comment><USER12> It's on the slow ring now, too, which is where I'm using it. I'm quite impressed so far. There's some performance overhead in some cases (e.g. Hugo for Linux is about half the speed in the lxrun environment than Hugo for Windows on the same machine), but it's very pleasant.

</comment></comment></comment><comment><USER23> I'm have high hopes for bash on windows. It has the 'potential' to keep me on Windows a little longer. We shall see.

<comment><USER24> If all you need is Bash just install Msys. I use it every day to escape from crusty cmd.exe.

</comment></comment><comment><USER25> Why would you need a Linux subsystem to run Python? Python runs just fine on Windows. All my Python programs run on both platforms.

If you just want command line tools, there's Cygwin.

<comment><USER26> My experience with WSL has been excellent so far, I see it making Cygwin obsolete almost entirely. Cygwin was always a pain to set up and occasionally very buggy.

<comment><USER27> And slow. For some reason all commands I execute through cygwin seem to be taking a little more than if executed through a normal windows command prompt.

This really breaks the cygwin experience for me :/

</comment></comment></comment><comment><USER18> I just got a new laptop, and as it doesn't have an optical drive and I couldn't find a USB flash drive in order to install Linux, I've kinda been stuck on Windows for a few days.

I installed WSL a few days ago. Installation is a _ridiculous_ process, and takes about 24 hours for the service to finally appear after you follow the steps to make it happen, which is not well-documented and just feels idiotic to a Linux user, who's used to being able to change kernels in about three minutes, and switch back and forth at will.

But, I mostly love it. I still plan to install Linux and I'm unlikely to ever boot back into Windows except maybe for testing (I used to boot into Windows for games, but these days Steam has more than enough Linux games to keep me happy, as I don't game much), but Windows is suddenly not the worst of all possible worlds for developing software for Linux, anymore.

It has some weird/scary quirks: Using an editor installed on the "Windows" side of the system to edit files on the "Linux" side of the system led to files disappearing completely. I also saw the usual Windows CR/LF issues in sharing files between Linux and Windows partitions, but also an additional weird thing that might be Unicode related: I piped output from a command into a file on the Windows side in a Powershell session, opened it on the Linux side, and found it had spaces after every character and some other bizarre stuff inserted into it; kinda like maybe it was created in a UTF encoding but then loaded in a non-Unicode encoding or something. These are probably things that have some reasonable explanation and some way to work around them, but they made me scared enough of inter-operation between the two sides that I now isolate the two completely. I don't try to work "back and forth". If it's a Linux thing, I work only with Linux tools, and vice versa. This doesn't seem to be as big of an issue when using the MSYS bash shell that comes with git, which is my other bash shell in this system. At least, using the git bash shell hasn't led to any files disappearing.

Another interesting issue: Permissions are _super_ lax, by default, in the Linux side. Owned by root:root and mode 777 across the board in your home directory, which causes a lot of software to complain. ssh, Ruby bundler (downgrade to 1.12.3 if you're having problems running bundle on Windows, either under WSL or in Powershell; same solution works for different bugs), and a bunch of other stuff has weird quirks when given a directory that is 777. It's also just plain nuts. I guess Windows has a different security model and this may not be a crazy as it seems at first glance, but it does cause software to freak out. But, as I understand it, WSL didn't even have a user account until recently, so they seem to be making it better on that front. In the meantime, I wouldn't want to rely on it for anything important.

That said, it gets a lot right. It feels like magic to run nearly any Linux application and have it Just Work. I, admittedly, am only running text mode apps at the moment: vim, bash, git, Perl, Ruby, Node. I haven't tried any graphical apps, so far. But, that's enough to replicate most of my workflow for developing server apps, and I don't need a VM to do it.

I don't plan to stick with Windows, even now, but it's been fun playing with it, and seeing what Windows is like these days. It's pretty nice, honestly. If I were just starting out with computers, I'd probably have no strong need to move to Linux in order to be productive. I'd learn how to use Powershell effectively (though it's gotten a lot easier/nicer in recent years, and accepts many of the common commands a UNIX user would expect, like ls, cd, cp, mv, etc...last time I used it many years ago, every command was some "Stupid- Long-Ass-Thing WithBIzarreLY cApitalized-OptioNS"), and probably be happy with Windows as a development platform.

As an aside, the Windows side of other kinds of development has also gotten _remarkably_ better since I last tried it. Perl runs wonderfully right out of the box including some XS (compiled) modules, with Strawberry Perl, RubyInstaller does the same for Ruby, Python has always been great on Windows and still is, PostgreSQL works fine, git works mostly fine (though I guess some kinds of filename that are OK on Linux are problems on Windows), SQLite is great (as expected, since it is used by tons of Windows software, including stuff from Microsoft themselves, I think), ack works fine, etc. We've kind of entered a golden age where your desktop environment does not prevent you from working together with people using other desktop environments; they interoperate very easily for the most part, particularly with common points of ingress/egress (github or gitlab, for example).

<comment><USER28> You are talking about enabling insider preview which takes around a day to kick in and offer you the update. Since bash on windows is not included on the stable "branch" you have to go through the hoops to get it. This has nothing to do with the feature itself, which takes even less to install than pulling the Ubuntu image off docker hub.

<comment><USER18> I found it really clunky. I wanted a thing, and it made me wait nearly two days to get that thing; and it was confusing, to boot; I kept following the instructions and not seeing the service I expected to see. I now understand the process and what it was doing during all that time (er, actually, I still don't know what it was doing during all that time, but I understand it was working as designed in making me wait), I just think it is a clunky process that exhibits one of the bigger weaknesses of Windows. Windows simply handles updates and packages extremely poorly compared to Linux.

It's interesting that the answers I've gotten about it being a poor user experience are all basically of the form, "No, that's how it is supposed to work. It isn't a poor user experience." Have y'all not used Linux before? I mean, apt-get and yum are really something special, if you're coming from systems (like Windows or Mac OS) that don't have good package management. Having one universal method to install and update everything on your system, including OS updates, is just wonderful.

Nonetheless, Windows 10 is the best Windows I've used (ignoring the privacy concerns among other things), and I like WSL. It's cool technology and fun to play with. I'm probably installing Linux tonight or tomorrow, but it was a fun week of tinkering with something new to me.

<comment><USER29> >I found it really clunky. I wanted a thing, and it made me wait nearly two days to get that thing

That "thing" isn't officially released yet, hence the hoops.

</comment></comment></comment></comment><comment> dan-silver Looks like the comment on their warning isn't rendering html? Hopefully people still see this :) $ rm -rf /mnt/c/ <strong>[DO NOT DO THIS]</strong>

<comment><USER30> I hope that results in a malformed command, should anyone try and paste it in. Not gonna test it myself though :)

</comment></comment><comment><USER31> How stable is it? I've been playing around with the idea installing it on my only (dev)machine. I dont expect the ubuntu subsystem to work perfectly but my old workflow to be stable.

Edit: I am regularly suprised that nano filename does not open quick edit in my machine. And then I remeber I am working in my local machine.

<comment><USER32> It's pretty stable. But also pretty useless. Fun to play around and use a bit of byobu. I had a repo that wouldn't check out in windows because of some file names. But bash on Ubuntu on Windows worked like a champ.

But as I said, the utility is limited. If you really need the Linux kernel, this is useless. If you don't, then everything is already available on Windows natively.

<comment><USER33> THis makes no sense.. Most people don't comprehend that it's not just bash, its the entire Ubuntu user space. You can run Ubuntu apps just by running apt- get. VI, Ruby, Golang, Rust. You can set Bash as your debug shell in VS Code, you can have all your familiar SSH keys/forwarding/scp tools.. Of course there is a ton of windows native stuff, but in essence this makes Linux native so now you have just that much more.

<comment><USER32> >You can run Ubuntu apps just by running apt-get. VI, Ruby, Golang, Rust

But I already have vim, ruby, golang and rust natively on Windows. I agree it's cool. But still pointless.

>You can set Bash as your debug shell in VS Code, you can have all your familiar SSH keys/forwarding/scp tools.

I can install vscode on Linux directly. And again, ssh, scp, etc is already there on Windows.

<comment><USER34> I think many of us who use Windows take for granted the number of tools we use to cover over our pain points.

I use Msys2, Cmder, a bunch of custom tool builds, and some Powershell scripts. This setup works great; I'm productive with it and my command line feels fantastic. However, I have been tweaking my setup for years. WSL makes all of that learning, setup, and tweaking unnecessary.

All of your tools are available out of the box, and you don't have to configure anything, hunt down binaries, or make your own builds.

This isn't about making you and I more comfortable - we already are. This is about making it easier for other devs to find a happy setup on Windows.

</comment></comment></comment></comment></comment><comment><USER35> I'd rather a linux sub sys for windows -- gamers on linux would flock to it, wine sux. There's some nice windows apps, and niche things built only on windows -- but I've staying on Ubuntu most likely.

<comment><USER18> I don't think that's fair to Wine. It is tackling a _huge_ problem space, without a specification or source to work with. They're reverse engineering vast swaths of Windows. I think Wine works remarkably well given the size and scope of the project, and the nature of Windows being a huge moving target.

Steam has _so many_ games for Linux now, and a lot of that is due to Wine having advanced to the point where porting to Linux has become relatively trivial. Wine basically has allowed me to go years between reboots into Windows on my previous laptop; and I expect once I get Linux installed on my new laptop, I won't need to reboot into Windows again for another year or two or three. My favorite games are all working on Linux, mostly because of Wine (I don't run them explicitly under Wine, but a lot of the ports on Steam are using Wine behind the scenes).

<comment><USER35> I'm just saying WOW is buggy on linux wine, etc.. -- I think if windows officially had their own wine-alternative with proprietary drivers, dlls, etc --it would open a whole new world of cross-platform use.

<comment><USER18> WSL is also buggy as hell, so there's that. It's seemingly a hard problem either direction, but I think probably harder for Wine.

</comment></comment></comment></comment><comment><USER36> This is nice and all but I'm much more interested in the inverse use case: managing Windows servers through ssh and bash. For example, it would make loading Let's Encrypt certs much easier.

</comment><comment><USER37> I found that blog post to be very disappointing. It didn't really demonstrate a meaningful use case for WSL (i.e. programming in C by compiling with gcc). I think that blog post is mostly made for tech journalists who aren't actually very techy. For example, the author used nano to copy and paste in a Python script. There's a two things wrong with that: 1) he used nano for "programming" (regardless of which text editor you use, I think we can all agree that nano definitely shouldn't be used for programming) and 2) Python already has native support on Windows.

<comment><USER38> You need to re-read the post

"It's not about replacing other Windows-native tools such as Python, PowerShell, C# and more. It's about removing friction when you just need to get stuff done quickly and efficiently in a modern development workflow."

<comment><USER37> My example was meant to support my assertion that:

> I think that blog post is mostly made for tech journalists who aren't > actually very techy.

\---

This statement:

> This is definitely a "by developers, for developers" Windows 10 feature, > specifically designed to remove a bit of friction from developers' daily > workflow.

reads like a press release. I agree that implementing WSL will reduce "friction from developers' daily workflow", but the article did a fairly poor job at demonstrating that.

<comment><USER39> I think you're right though I wasn't disappointed by the fact. I saw quickly that the audience wasn't me and kept reading for curiosity's sake... to test who they're trying to reach.

There's probably a fair number of Windows only people that the whole Linux ecosystem is something new and foreign; especially sysadmin and corporate IT types that have heard about this, but may not know anything about it... I expect there may be some gentle introduction for those types here, too.

</comment></comment></comment></comment><comment><USER40> lets cut to the chase, does tmux work on wsl?

<comment><USER18> Yep, works perfectly. Some terminal emulators on Windows suck up some command key combinations which might impede use of tmux or others that need those key combos, but that's usually configurable.

<comment><USER41> This is not a unique problem to Windows, btw. I use tmux with alt + tilde (`) as my modifier key, and most terminal emulators need config changes to allow this.</comment></comment></comment>


Where Is Xu Zhiyong? - <AUTHOR> http://www.newyorker.com/online/blogs/evanosnos/2009/07/where-is-xu-zhiyong.html <comment><USER2> On a flight I once sat next to a Cuban-American man on his way back from a business trip to China. He told me about his company's work over there and how impressed he was with his Chinese counterparts. He had had a great time and looked forward to returning some day.

So when I asked him if, since he did business in China, he supported lifting the US embargo against Cuba, he emphatically said "no, that's completely different." I asked how, but he couldn't come up with a single thing and became pretty annoyed with me.

Whenever I hear stories of these kinds of abuses in China I can't help but to think of the utter hipocrisy of the USA's policy towards Cuba.

</comment><comment><USER3> To be fair, the same thing used to happen to suspected communists in the U.S., not so long ago. We still do it today, to youths in the Middle East. No trial, no warning - they just vanish, (and if they're lucky, show up in Guantanamo Bay a year later).

Refusing to admit mistakes, assuming that power is right, paying lip service to high-sounding ideals while indiscriminately abrogating freedoms - in this, as in so many other aspects of pride and capitalism, China has learned well from us.

Of course, they have much work to do in strengthening their social institution. But to stand aghast and sling mud at the audacious oppressors across the Pacific - it's a bit rich.

<comment><USER4> _the same thing used to happen to suspected communists in the U.S._

Name one suspected communist, please, who was detained by an authority in the U.S, who was denied a public hearing before a magistrate to challenge the legitimacy of the grounds for the detention or was denied a procedural right customary under English common law, such as the right to a trial by jury.

<comment><USER5> I can't name a Commi but I can name someone from today who was illegally detained by our country: Mohammed Jawad

I'm sure others can name more people (US citizens too) for whom our country has forgotten about Habeus Corpus

<comment><USER6> Communists _did not_ disappear inside the United States. They were treated unfairly (fired from jobs, ostracized) but legally, they had the same rights to habeas corpus. At the _height_ of McCarthy hearing, ostracism and loss of a career was the worst that could happen to a communist. However, this is the same treatment that was accorded (just previously) to the Nazi sympathizers in the US. In fact, HUAC was created to go after Nazi sympathizers.

Of course communism had the appeal of being a non-racist ideology, so a lot more innocent (but extreme naive) people got tangled up when HUAC went after the communists. That being said, they're both totalitarian ideologies: I wouldn't want either Nazis _or_ Communists holding public office in the United States, nor do I have any issues with private employers firing either (at least in employment-at-will states).

At that time China was going through Great Leap Forward (mass artificial starvation, with millions dying) and (in the 60s/70s, after HUAC has died down) cultural revolution. Again, a very blood period.

As for illegal detention, I am pretty squarely against it: either these people should be held as POWs or be tried as criminal defendants. Yet illegal detention that happens on the battlefield is _much different_ from illegal detention of a political activist working _within the system_. If you want to compare apples to apples, I'd look at China's treatment of US prisoners during the Korean war or their treatment of their own Islamic extremists in Xianjing province (yes-- there are _real_ Islamic extremists targeting civilians in China and no, they're not "freedom fighters").

That being said, it's a silly comparison to do irrespective: provided US _was_ as flagrant about human rights as China, that doesn't justify China treating their citizens in the same fashion. Nor does China treating their citizens horribly justify human rights violations by the US. The original article _did not_ claim anything along those lines. Arguing that "two wrongs make a right" is logically fallacious and morally bankrupt.

<comment><USER7> > Yet illegal detention that happens on the battlefield is much different from > illegal detention of a political activist working within the system.

That's only a matter of degree if you declare the battlefield to be whatever suits you.

<comment><USER6> Perhaps "outside of your civil jurisdiction, involving people who aren't your country's citizens" is a better way to put it (the only, so far, exception to this seems to be Jose Padilla-- yet even then he didn't "disappear"). However, that's odd for me to have this sort of argument, I am against extra-judicial detention. Either someone is a PoW (if they're a member of an army that follows the rules of war) or they're a criminal.

<comment><USER8> Just a note: you don't need to be a member of an army to get POW protections. All you need to do is fight openly and wear a distinctive uniform.

(Admittedly, most terrorists don't meet this criteria, and are therefore spies/saboteurs with none of the rights of POWs.)

<comment><USER7> Makes you wonder how they recognize those terrorists on sight doesn't it ?

<comment><USER8> Typically when they start shooting at you from a crowd of civilians.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> I honestly believe there's a massive social revolution sitting squarely between China's present and its much touted Glorious Future. They have some painful lessons to learn about the explosive force of information confined. Careful now, China: the whole world's watching.

<comment><USER10> History, especially recent Chinese history, suggests that the world is willing to watch pretty much anything without lifting a finger.

As for massive social revolution, what do you think is happening in China right now? The better part of a billion people are moving out of rural poverty and into the cities in about as big a social revolution as there has ever been.

<comment><USER9> I was thinking of revolution of a less pleasant sort, for which the urban immigration is a necessary prerequisite. There's a Tank Man streak in the Chinese psyche, which, when multiplied by a few hundred million of the recently enfranchised, well ...

As for lifting fingers (Man the Mice! Man the Keys!), our intense scrutiny may be all that's required to catalyze the reaction.

<comment><USER11> This Tank Man streak in the Chinese psyche you speak of doesn't seem to have come up much since well... Tank Man.

Most of the "strife" in China nowadays is ethnic I think.

(Disclaimer time: I'm Taiwanese, not Chinese. My view of China is a bit skewed.)

<comment><USER12> I spent a lot of time talking with people in the Haidian District in Beijing. This area is contains the two most prominent (and many, many lesser) universities in China so it's interesting to see the general opinion of people around there.

The unfortunate part is that it's a whole lot of apathy. I'm sure it's not easy, even for a foreigner, to find the heart of some people willing to speak or move against the Chinese government, but so many who I ran in to were casually trying to remain in their own world disjoint from the government. They feel a little rebellious just to support the stores that sell ironic Mao Zeodong merchandise and love to mildly mention that the government is really not that great here. That's about the depth of what I actively observed.

I'll disclaim that I didnt' spend much time talking to those in what would have been the most charged fields (politics or philosophy, perhaps), but the general apathy was sort of disheartening.

It's not all negative though. The educated Chinese are largely embracing the internet and desire to involve themselves more. For many, they give you a surprised look when you ask them about bypassing the firewall: _you mean you don't have access to a proxy? Really? I thought everyone did_. If this is the face of the new Tank Man, it's definitely going to be a different ride, but the transformative power of an enormous information pipeline plugged into the future leaders of your country still seems pretty portent.

And ethnic strife would need to be the topic of a whole essay. China has cultural problems there, too.

</comment></comment></comment></comment></comment><comment><USER13> In Malaysia, this is even worse. The government actually has the right to arrest someone "without the need for trial in certain defined circumstances".

[http://en.wikipedia.org/wiki/Internal_Security_Act_%28Malays...](http://en.wikipedia.org/wiki/Internal_Security_Act_%28Malaysia%29)

For example, the recent "Teoh Beng Hock" case happened in Malaysia. This guy was found death "at the premises of the Malaysian Anti-Corruption Commission headquarters" after he had been taken there for questioning the same day.

Malaysian police classified his death as "sudden death". Committing suicide? He supposed to marry his fiancee who has a 3 month-old prenancy on this coming September. Can you imagine a guy like this would commit suicide?

I am Malaysian myself(currently in US). I usually do not care anything happening in Malaysia. But, I really think that this incident is just too suspicious for me to believe in the government anymore.

<comment><USER14> Could be worse, mate. Could be Thailand!</comment></comment>


Leslie Lamport: How to Write a Proof [1993] - <AUTHOR> http://research.microsoft.com/en-us/um/people/lamport/pubs/lamport-how-to-write.pdf <comment><AUTHOR> Note that the paper's title is somewhat misleading: it's not a newbie's guide to how mathematicians write proofs, but a proposal for a new method of writing proofs that he thinks mathematicians and computer scientists should use. An interesting proposal, though.</comment>


@Google - @Twitter To Start Indexing Links For Search - <AUTHOR> http://www.techcrunch.com/2009/05/07/google-twitter-to-start-indexing-links-for-search/ <comment><USER2> A couple days ago Fred Wilson suggested someone aggregate a user's twitter links, so I actually started indexing and analyzing twitter links to provide a constant stream of link previews (unfortunately, no search atm). Check it out: <http://tweetlinx.com> (you need to sign in using oauth to get your links indexed). Or just check out my page as a preview <http://tweetlinx.com/markhuetsch>

</comment><comment><USER3> um, this has been going on for a while. you post a link on twitter, and the google crawler comes by almost immediately.

</comment><comment><AUTHOR> Favorite line in the article: _Twitter Search isn't meant to replace Google, that'd be dumb._</comment>


Show HN: ReadThisThing – One fantastic piece of journalism in your inbox daily - <AUTHOR> http://readthisthing.com#

<comment><AUTHOR> Hi HN,

I posted this once before when I first launched it, but it wasn't received very well. Since then I've added ten thousand subscribers and have turned the RTT newsletter into something I'm quite proud of. So, here's my second attempt to show it to HN - a v2, if you will.</comment>


Show HN: Crosswordmaker.io - <AUTHOR> http://crosswordmaker.io/ <comment><USER2> Love the idea, but I don't understand it at all. Where's the clues? Boxes aren't numbered. Why are there input text fields? Why is the crossword filled out already?

I've never seen a puzzle with only seven or fewer boxes in any direction. If working, would need to see a version with at least 12-15 boxes across and down.

</comment><comment><USER3> Isn't this a word search maker? Crosswords have clues and empty boxes to fill in the answers.</comment>


The Error in Baseball and the Moral Dimension of American Life - <AUTHOR> https://www.newyorker.com/news/sporting-scene/the-error-in-baseball-and-the-moral-dimension-to-american-life <comment><USER2> This strikes me as kind of silly.

An error isn't a moral judgment; it's a sort of an _accounting entry_. Every advance of a runner (or failure to record an out on a batter-runner that doesn't result in an advance, like a fumbled foul flyout) has to be _accounted for_. If a ball is misplayed, then any advantage that results should _not be charged to the pitcher_ and any subsequent outfall made possible by the misplay should not be charged to the pitcher.

The only other movement record is "defensive indifference", like a late-inning "steal" that the defense takes no action on because it's assumed to not matter in context. But's that's officially accounted for as well.

It's when events are _ignored_ in scoring that make no sense to me. For example, in hockey, a shot that hits iron was simply ignored statistically for decades (not counted as a "shot on goal" because there was no way to account for such a thing that the goalie couldn't be credited with a "save" for).

One beauty of baseball is that a full scoring record (such as ESPN's "pitch by pitch" record, which they've just _ruined_ in their site redesign) is like having detailed minutes of a game.

Speaking of which, IIRC, the infamous Buckner play should not have been recorded as an error because the ball hit something and took a "bad hop" (unforseeable trajectory), and he never touched it. The standard practice in scoring (right or wrong) has been that an _untouched_ ball "cannot" be an error, even if proper technique _should_ have resulted in a proper play (in the Buckner case, he should have knelt and been in position to block any moderate bad hop; in the general case, bad hop, miscommunication between players, etc.)

They should have a third category for such that doesn't charge the pitcher _or_ stick a random fielder with an error.

</comment><comment><USER3> "shall apply this rule even when it appears to be an injustice" — yep</comment>


Microsoft Surface Duo first impressions: first-gen device, immature vision - <AUTHOR> https://thejollyteapot.com/2020/08/12/microsoft-surface-duo-first-impressions-a-first-gen-device-for-an-immature-vision <comment><AUTHOR> "Either Microsoft is terrible at selling its vision and its new hardware, either this vision and this device form factor suck."</comment>


Facebook Publishes "Insider's Guide To Viral Marketing" - <AUTHOR> http://www.techcrunch.com/2008/04/21/facebook-publishes-insiders-guide-to-viral-marketing/ <comment><USER2> Step 1: Publish external habits to all internal users with no user approval.

Step 2: Profit.</comment>


Searching a Million Lines of Lisp - <AUTHOR> http://www.wilfred.me.uk/blog/2016/09/30/searching-a-million-lines-of-lisp/ <comment><USER2> Wilfred is a genius. The OP article is from about a year ago, but it laid the foundation for the Emacs package he just released: [http://www.wilfred.me.uk/blog/2017/08/30/helpful-adding- cont...](http://www.wilfred.me.uk/blog/2017/08/30/helpful-adding-contextual- help-to-emacs/)

<comment><USER3> Ah this is where I've been seeing that domain before. Yeah, the other package suggest.el is also a gem.

</comment></comment><comment><USER4> Tim Teitelbaum, one of the first researchers on IDEs summarized problems like this in a quote from one of his papers.

"Programs are not text; they are hierarchical compositions of computational structures and should be edited, executed, and debugged in an environment that consistently acknowledges and reinforces this viewpoint."

It is unfortunate that most major code editors and IDEs today do not store units of code (like Lisp SEXPs) as databases to be updated as you edit, which would make problems like this or other operations like metaprogramming, formal analysis, or documentation much easier to solve.

<comment><USER5> There are editors that do this. Notable, Jetbrains MPS comes to mind. It looks like a text editor but once you use it you quickly notice that you're actually editing the abstract syntax tree directly.

It's cool, but it has some major downsides too. For example, MPS stores the source as XML, not text (since it isn't text, it's a tree). This makes lots of basic tools we've taken for granted a lot harder, such as git merging etc. They've had to make a custom mergetool just to make basic collaborative coding feasible.

I bet there's other ways around that, all I'm saying is that text has major, major upsides because of the enormous ecosystem support.

<comment><USER6> > _It 's cool, but it has some major downsides too. For example, MPS stores > the source as XML, not text (since it isn't text, it's a tree). This makes > lots of basic tools we've taken for granted a lot harder, such as git > merging etc. They've had to make a custom mergetool just to make basic > collaborative coding feasible._

Doesn't solving this just require a text-to-AST, AST-to-text input and output step?

Anyplace outside the editor the programmer just sees regular text.

<comment><USER7> The issue with this is that operations on text don't necessarily preserve a valid AST. Doing `git merge` on the plain text of a source file may result in invalid code, at which point you have other annoying questions to answer about how to handle text that doesn't parse into a valid AST.

</comment></comment></comment></comment><comment><USER8> Github's search went the other direction, where it's decidedly less useful than grep. Case insensitive, and drops search string characters that provide context. Like quotes, =, $, etc.

[https://help.github.com/articles/searching- code/#considerati...](https://help.github.com/articles/searching- code/#considerations-for-code-search)

</comment><comment><USER9> He should try speeding it up further by compiling to C-code using this: [https://github.com/tromey/el-compilador](https://github.com/tromey/el- compilador)</comment>


Show HN: Sparkler – A KVM-Based Virtual Machine Manager - <AUTHOR> https://unixism.net/2019/10/sparkler-kvm-based-virtual-machine-manager/ <comment><USER2> Nice writeup!

> The VMM emulates some interesting hardware: a device that can read the > latest tweet from Command Line Magic's Twitter handle, a device that can get > the weather from certain cities, another device that can read fetch the > latest air quality measurements from certain cities and finally a console > device that lets the virtual machine read the keyboard and output text to > the terminal.

This is one of the under-appreciated fun things about virtualization: the ability to pretty much make up 'hardware' devices, and completely rethink the way that the hardware should work. No need to be a PC when you can be anything you want. Obviously it's possible to do all the same stuff with hardware, or even kernel drivers, but the KVM interface makes it really easy and fun.

<comment><AUTHOR> Weirdly no one had done it so far. That's the reason why I cooked up some high level devices :)

</comment></comment><comment><USER3> > You can program KVM using the well known UNIX file paradigm.

Does anyone know why the API was designed this way? Sending a bunch of ioctls to modify the KVM state seems no better than just having normal function calls for it…

<comment><USER4> What would "normal function calls" mean? This is happening on the Linux syscall boundary.

<comment><USER3> Right; why isn't there a sys_kvm syscall that you can just call from a C program?

<comment><USER5> It's Linux style. Syscalls are last resort - they're low level and have to be maintained forever. Instead, there are more robust and purpose specific abstractions built on top of them:

\- ioctls on char/blkdevs for either physical or logical devices (which also allow for a 'handle' paradigm of operation, and for event polling via epoll/select)

\- sysfs and procfs entries for system and process tunables and data

\- debugfs for day to day debugging (which is explicitely unstable and not enabled in most production kernels)

\- prctl, fcntl, ...

In addition, all of the above is 'automatically' ported across architectures. Some Linux architecture ports have their own syscall tables (with own numbering) and need to be explicitly modified any time a syscall is added.</comment></comment></comment></comment>