Code Length Measured in 14 Languages - <AUTHOR> http://blog.wolfram.com/2012/11/14/code-length-measured-in-14-languages/ <comment><USER2> This is a simplistic comparison that lacks a lot context, failing to distinguish between the power of a _language on its own_ versus the power of a _language ecosystem_ \-- including all its libraries and utilities, depth & breadth of community, hosting companies, supporting vendors, etc.

Consider that a few years ago, Reddit switched from Lisp to Python, not because they thought the latter was in any way a better language, but (in their own words) because of Common Lisp's "lack of widely used and tested libraries."[1]

How does Mathematica's _ecosystem_ compare to those of the popular languages in this comparison?

\--

[1] <http://blog.reddit.com/2005/12/on-lisp.html>

<comment><USER3> Judge for yourself:

[http://reference.wolfram.com/mathematica/guide/Mathematica.h...](http://reference.wolfram.com/mathematica/guide/Mathematica.html)

The Mathematica 'ecosystem' doesn't benefit much from OSS, but it does benefit from hundreds of smart engineers with diverse backgrounds who work on it full- time. And SW as benevolent dictator, vetting every design decision for consistency and elegance.

Don't write a web server in Mathematica -- it's not particularly well suited to that. But if you're writing natural language parsing, knowledge base infrastructure, and algorithmic content for something like Wolfram|Alpha, I can't imagine anything better to use.

<comment><USER4> That's the issue

Mathematica is too different from the rest. Or mathematically speaking, the intersection between the capabilities of Mathematica and Python for example is smaller than Python and C#

You can't have Mathematica serving a web site (for any non trivial amount of users) (WA has a lot of infrastructure to make it happen)

On the other hand try to calculate an integral over the gamma function in the complex domain, that's one line in Mathematica and how many I don't know in Python even using some libraries.

</comment></comment></comment><comment><USER5> No APL? That language always wins on code golf. You wouldn't want to maintain it though. However it absolutely shines if you're on a 110 baud teletype and have to wait for each character to print. /s

<comment><USER6> This is truly an apt criticism. There are a lot of J solutions for problems which Mathematica also has a solution, but for some reason it wasn't included.

<comment><USER7> I quickly ran the code on J and got ratios of lines:0.5, characters: 0.74, tokens:0.5, over 432 comparisons IE J is about half the length of Mathematica code.

APL, has ratios of between 1 and 2 (IE a little longer than Mathematica, but over only 32 comparisons which is too few to be reliable).

Julia was also asked about, but there are only 9 comparisons which is certainly too few to be meaningful.

</comment></comment></comment><comment><USER8> The C# AGM example should be retitled "C# as written by an insane Java programmer who read a .NET 1.1 book and called it a day"

<http://rosettacode.org/wiki/Arithmetic-geometric_mean#C.23>

<comment><USER9> Aaaaand, this is a huge reason why the whole "experiment" is utterly invalid. Without making use of experienced devs for each language, and perhaps a statistically significant number of samples for each language, the amount you can trust any of this data is precisely zero.

</comment></comment><comment><USER6> This article does not measure what it professes to measure. When comparing a language to itself and for large programs (>1000 lines), line count is a decent metric for expressibility. However, for a short amount of code (like that found in Rosetta) and for comparing one language to another, you want to compare both line count and character count.

If you space a few lines of very expressive code out, you don't want that to penalize the results. Similarly, you don't want someone to cheat by just having one huge line.

Edit: I stopped reading when he started describing the fetching/parsing process. My objection is covered later on. Thanks to carlob for pointing this out.

I'll also note that being the best may actually be a _bad_ thing. Perl can be quite succinct, but also quite noisy at times.

Similarly, while I'm a fan of K/J (and I pretty much guarantee that K is more succinct than Mathematica), I think that the code can be very difficult to read sometimes.

<comment><USER10> Did you read the whole article? Towards the end it says:

While the "Large tasks – Line count ratio" gives the most impressive result for Mathematica, I think that the "Large tasks – Character count ratio" is the really the fairest comparison.

<comment><USER11> This is a fairly meaningless comparison. Rosetta code is not written for terseness, there is no fair comparison about code length to be made based on these example solutions to common problems.

You can be as terse or as verbose as you want in many languages (think forth, perl, apl).

If you want to do a meaningful comparison pick a non-toy problem and write a full sized application, something that in the worst language is a few thousand lines with a proper UI, a web app, a desktop application and a large simulation of something or other. You will still have to account for language gifts such as libraries or built-ins somehow.

And you tell the devs they get points for producing _short_ code.

Then you can compare along several axis, performance, code maintainability (closely related to how easy it is to read) and so on.

That's useful data. This isn't, regardless of whether mathematica looks good.

edit: ok. point taken.

<comment><USER6> No, he was right, I stopped reading when the author started discussing the mechanics of crawling web pages. I assumed that the blog post would be structured sensibly (analysis, then implementation).

</comment></comment></comment></comment><comment><USER12> Of course Mathematica is more succinct - it is a domain specific language, not general purpose like most of the others compared. The only meaningful comparisons to Mathematic would be R and MATLAB (other DSLs).

<comment><USER3> Well, it is certainly concise to represent formulae and equations in Mathematica, but that isn't what makes it a concise language.

That I think is owed to Mathematica being an heir of LISP that implemented m-expressions so cleanly that M doesn't even feel like a homoiconic language. Most other LISP-derivates (like Clojure) stuck to s-expressions, which are historical baggage more than anything else. Some day I'm sure we'll get an m-expression version of Clojure.

Of course in practice one _defines_ new DSLs quite often in Mathematica. And it comes with a variety of DSLs "built-in", mainly for user interface construction, vector graphics, mathematics, and statistical computations.

Disclosure: I too work for WRI.

<comment><USER13> Julia ( <http://julialang.org/> ) is another homoiconic language that doesn't use S-expressions. They're both mathematical languages, so it's plausible that Julia was inspired by Mathematica in this choice, though it takes other ideas straight from Common Lisp, so maybe not.

</comment></comment></comment><comment><USER14> Probably could have done with a better, more visual graph than the pyramid shown throughout the article (especially when he was using Mathematica!). The trends are there but don't pop out at all, and these are very simple metrics.

One takeaway I didn't expect: Clojure is, on average, nearly as terse as Mathematica.

Also, has anyone actually used Mathematica for something aside from data processing? Like, any of the tasks you would normally use Ruby, C++, or Clojure for?

<comment><USER10> Disclosure: I work for Wolfram.

I might not surprise you to know that most of the code in Wolfram|Alpha is Mathematica code. I don't know what kind of examples you have in mind when you talk about "Ruby, C++, or Clojure", but Alpha is probably the largest Mathematica based project in production.

<comment><USER14> I did know that a lot of Wolfram|Alpha (And Mathematica itself too, right?) is written in Mathematica code, but as mumrah points out, that only proves that it works well in production as a DSL. When I said "Ruby, C++, or Clojure," I was trying to evoke more common tasks like a desktop application, a simple server, a text-processing library, etc.

Edit: Even if Mathematica isn't technically a DSL, it certainly seems to be geared heavily towards symbolic mathematics and data processing/visualization. My question is really, how does it fare outside its element?

<comment><USER10> Yes, some parts of Mathematica are written in Mathematica, though most fast build in functions (linear algebra is one example that comes to mind) are written in faster, compiled languages.

As I said in response to mumrah, Mathematica is not a DSL. You might argue that a lot of 'library' counts as language in Mathematica, but not that you can't write general purpose applications.

<comment><USER6> Mathematica is certainly a domain-specific language. Its domain is symbolic mathematics.

You may be unfamiliar with the term "DSL." It refers to a language designed for solving a specific computational task.

This was, in fact, the stated goal of Mathematica. DSL does not mean the language cannot solve other tasks, only that it was meant for solving a specific one.

<comment><USER15> i don't think it's a DSL. its evaluation _paradigm_ is symbolic in the same way you would say Java's paradigm is OOP, yet we wouldn't say Java is an OOP DSL even if that's true in some technical sense

in this respect i think the name "Mathematica" does a disservice to the system. originally it may have been intended for math, but in its current form it's more like a general prototyping/presentation/construction system that makes thorough use of its capacity as a research platform

</comment></comment></comment></comment></comment></comment><comment><USER16> That's a very confusing table, but an interesting comparison.

I think you reveal different things comparing line count and character count, and both miss what I'm looking for in a terse language: scanability.

A lot of the verbosity that annoys me with Java isn't really about number of lines -- it's bad, not _particularly_ worse than any of the other languages descended from ALGOL. No, what makes Java worse than its cousins is the propensity to use English words, and often really long ones, in places where symbols would be easier to scan. "public class Foo extends Bar" is a lot of English text, and I have to read it all to separate out the tokens. "@interface Foo : Bar" makes it easier for me to see at a glance what's going on.

And don't get me started on wading through rotation.multiply(other_rotation).multiply(velocity).add(rotation.multiply(other_velocity)). That's _technically_ one line, but that doesn't make it easy to read.

So winning on line count doesn't capture everything.

On the other hand, measuring characters biases you toward symbol heavy languages like perl or APL, and '$\="\n"' takes some picking apart, too.

I _did_ think APL would win an outright terseness competition, though, by either metric. It's a shame it isn't on the list.

<comment><USER17>
      "public class Foo extends Bar" is a lot of English text, and I have to read it all to separate out the tokens. "@interface Foo : Bar" makes it easier for me to see at a glance what's going on.

I know it's a "throwaway" example in a comment, but the first example makes it quite clear what is requested. The second example, less so.

Never mind the @interface declaration. If you're going to be writing or maintaining objc, you have to understand that. However, the x : y notation often leads to confusion. Does x extend y? Does y extend x?

It's probably not a big deal for someone who lives in one or two languages, as the knowledge is refreshed frequently. However, when you swing between, say, Haskell, Python, Ruby, C++, Java, or whatever, and maybe only touch objc when you need to update your iOS app to match your web app, then there's a cognitive hurdle because ':' doesn't have a clear interpretation.

Given its Smalltalk heritage and model of message passing, "@interface y subclass: x" (or "@interface x subclasses: y") would carry less of a cognitive load while perhaps being less verbose.

Again, this is only a superficial example, but choice of names or symbols is important in the language UI.

</comment></comment><comment><USER16> Scroll all the way to the bottom.

The organization of this post is strange -- a result, a long section about how to write a web crawler in Mathematica, and then about a dozen more different results. If you (like me) are inclined to tune out when you hit code, keep scrolling.

</comment><comment><USER18> I haven't looked at the Rosetta code examples but I didn't expect the difference between Common Lisp and Clojure to be so pronounced.

I'm mainly a Common Lisp user, does anyone who has used both care to share an opinion?

<comment><USER19> Some thoughts from an ex-CL'er that has dabbled in Clojure for 3-4 years:

Clojure's combination of declarative idioms and highly functional idioms (to a greater extent than CL) lead to it being able to by default express certain things in a more terse fashion.

<http://rosettacode.org/wiki/Factors_of_an_integer>

Compare Common Lisp and Clojure here.

Common Lisp:

        (defun factors (n &aux (lows '()) (highs '()))
          (do ((limit (isqrt n)) (factor 1 (1+ factor)))
              ((= factor limit)
               (when (= n (* limit limit))
                 (push limit highs))
               (nreconc lows highs))
            (multiple-value-bind (quotient remainder) (floor n factor)
              (when (zerop remainder)
                (push factor lows)
                (push quotient highs)))))

Common Lisp in this case is relying heavily on mutation with push. It's not that much better than a typical loop in an iterative language like Python.

Clojure solutions:

        ; Trivial version
        (defn factors [n]
            (filter #(zero? (rem n %)) (range 1 (inc n))))

Initial version just does a filter and a lambda across the sequence produced by range. inc so that it includes the final result. Pretty functional.

        ; Less trivial
        (defn factors [n]
          (into (sorted-set)
            (mapcat (fn [x] [x (/ n x)])
              (filter #(zero? (rem n %)) (range 1 (inc (sqrt n)))) )))

Now we're getting a little more clever, relying on mapcat, filter, a lambda, and range.

        ; Now with a for-comprehension.
        (defn factors [n]
          (into (sorted-set)
            (reduce concat
              (for [x (range 1 (inc (sqrt n))) :when (zero? (rem n x))]
                [x (/ n x)]))))

[http://clojure.github.com/clojure/clojure.core- api.html#cloj...](http://clojure.github.com/clojure/clojure.core- api.html#clojure.core/into)

Take a look at the other things that work across the seq'able data structures. Pretty powerful base set of idioms.

Okay, but lets provide a second opinion on these idioms. What about Haskell?

        import HFM.Primes(primePowerFactors)
        import Data.List

        factors = map product.
                  mapM (uncurry((. enumFromTo 0) . map .(^) )) . primePowerFactors

Using a primes module for finding prime factors. Okay, isn't that kinda cheating Rosetta Code though? I was kinda hoping to find the equivalent of the Clojure code.

And Mathematica?

        Factorize[n_Integer] := Divisors[n]

FFS.

I give up. These are dumb comparisons. Don't listen to this Wolfram post. At least the Common Lisp/Clojure code wasn't pointless.

<comment><USER20> Perhaps what we can take away from this is that Mathmatica (at least in this case, and I would imagine many others) is more terse that other languages because the base language includes features such as factorization that require libraries in other languages. This is obviously beneficial in many cases, but I agree with you that it is disingenuous to suggest that Mathematica's terseness is primarily due to well-designed syntax/semantics as opposed to feature-richness.

<comment><USER19> I agree with you there.

Another thought from my experiences:

The only way I've seen to scale up the "expressiveness" in a programming language in a way that's generally applicable is to make it more declarative. I have mixed feelings about this.

Two primary ways of doing so are functional idioms for "iteration" and concatenative programming.

Things like juxt, mapcat, et al have their equivalents in languages like J, K, Factor, etc.

The only way to elevate yourself above loops and manually assigning intermediates is to flow the data through high-level descriptions of what you want.

Whether that takes the form of a concatenative or functional langauge depends on the coder.

OOP is more about scaling up procedural idioms so that state management and code reuse aren't a total Vietnam. They aren't really more "expressive" with the exception of some of the idioms Smalltalk tossed about.

All that's left otherwise is "ecosystem leverage" such as Mathematica exhibits here. That's not really about the semantics of the programming language, but it's still worth noting if the leverage is relevant to the problem you're solving.

</comment></comment></comment></comment><comment><USER21> Of course Mathematica is good at succinctly expressing mathematical functions.

I'd like to see how much Mathematica code it'd take to write a compiler or web server.

<comment><USER15> probably quite a bit less code than the equivalents in other languages. Mathematica is the most powerful language i know of in terms of abstractive power. essentially it's a symbolically-evaluated Lisp

the reason you don't see more general-purpose code written in Mathematica is simply because it's a proprietary environment. you can't share general-purpose programs that are written in Mathematica

<comment><USER22> You should check out Mathics; It's a free and open source implementation of the 'Mathematica language' written in Python.

Admittedly, there are bugs, and the performance is not as good as Mathematica, but a lot of progress has been made (For example, PyPy compatibility is planed for the upcoming release). Give it some time, and I think (hope) it will grow to fill this niche.

Also, The fact that Mathics is open, allows you to extend it (in Python for example) with minimal effort.

Disclaimer: I contribute to Mathics development in my free time. We are hoping to get more people involved!

</comment></comment></comment><comment><USER23> Ok, now make a chart of "code length per dollar cost to use".

</comment><comment><USER24> Am I missing something, or the solutions have vastly different approaches, sample code, etc? What will you get by measuring that?</comment>


GPT-3 generated blog post reach #1 on Hacker News - <AUTHOR> https://www.technologyreview.com/2020/08/14/1006780/ai-gpt-3-fake-blog-reached-top-of-hacker-news/ <comment><USER3> HN submission from the blog post author, where the comments from dang reveal the author engaged in voting manipulation: [https://news.ycombinator.com/item?id=24062702](https://news.ycombinator.com/item?id=24062702)

<comment><USER4> Sorry to pop the balloon, but the story is bogus and based on false claims.

It's false that the post was generated by GPT-3. The author admitted to writing the title and editing the intro, and that's already all that most people read. He also described the article body this way: "as unedited as possible"—in other words, edited. It's false that (as he originally claimed) only one commenter called the post as GPT-3, and false that (as he now claims—since the article says it and who else would have come up with that) all such comments were downvoted.

All that is just what he publicly admitted. How much of the rest is also fake? People who try to game HN like this, including with bogus accounts and fake votes, are not known for scruples. It seems that, having got busted in dishonest attempts to get attention on HN, he decided to get attention from journalists instead, and found one who didn't bother to check the other side of the story.

<comment><USER3> I was trying to be neutral but your response is much more accurate. :P

</comment></comment></comment><comment><USER5> I think GPT-3 could be blessing for Reddit and HN type forums.

Add some GPT-3 content and links into the feed. Decrease the vote weight for users who upvote them and increase vote weight for those who downvote them.

<comment><USER6> So, you're experimenting on users without their knowledge? There's a thing called ethics. You might want to look into that.

<comment><USER7> Isn't every single ad ever created experimenting on users without their knowledge? I.e., will the user click on this ad or buy the product if we show them this content? That has much greater probability of adverse consequences for the user than the proposed experiment.

<comment><USER8> Sure, I have no problem with calling all advertising unethical. A lot of software A/B tests also land in unethical territory too.

</comment></comment></comment></comment><comment><USER9> I remember skimming this article. My initial feeling was that it was written by someone who wasn't a native English speaker. It seems like I'll have to pay more close attention to that feeling in the future.

<comment><USER10> On the other hand, you could have been right. It could have been a non-native speaker.

I'd hate to end up in a situation where non-native speakers are accused of being bots...

<comment><USER11> I feel like so many of you are just utterly too kind. Without getting into the generated article, we have a lot of Orwellian new speak everywhere. Your standard corporate/management/hr speak is very pervasive. It sounds inhuman. This is a language many people adopt to fit in and make it in this world. It shadows itself in blogs they write, particularly signaling blogs.

The generated article follows in this vein. That's what gpt will replicate, not the simplicity of a non native speaker (that would be easier to spot). It will follow the amorphous blob shape of saying something, but nothing, with the ominous undertone of 'you know what's going on, but you wouldn't dare speak up'.

How many of you read something from a company and instantly think 'this sounds like horseshit?'. How long did we let that go on? Forever right? We lost this fight before it even happened.

<comment><USER10> I think I agree with most of what you said, I just think you need to be careful. Don't confuse "horseshit" with bad English. The latter may contain something interesting, and the former never will.

</comment></comment></comment></comment><comment><USER7> The HN article that this is about: [https://news.ycombinator.com/item?id=23893817](https://news.ycombinator.com/item?id=23893817)

Congratulations to the authors of these comments, who correctly guessed that it was written by GPT-3:

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

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

<comment><USER12> Ah ah ah, the answer "your comment punches below the belt and isn't acceptable in a community like this.".

<comment><USER13> is this the largest scale Turing test ever performed on an audience acutely aware of what a Turing test is?

<comment><USER14> I think fewer people know what the Imitation game actually consists of than think they do - namely that a questioner has to guess whether a machine is a respondent to their questions, rather than another player. That certainly hasn't been tried with GPT-3 that I'm aware of.

However I would agree that it is an oblique version - that is, can a machine fool humans into thinking that they are human.

In which case I think it's probably safe to assume that GPT-3 has passed.

<comment><USER15> Turing actually asked a slightly different question, that I think is a lot more interesting. From Computing Machinery and Intelligence by A. M. Turing:

> The object of the game for the interrogator is to determine which of the > other two is the man and which is the woman. He knows them by labels X and > Y, and at the end of the game he says either "X is A and Y is B" or "X is B > and Y is A." The interrogator is allowed to put questions to A and B

> What will happen when a machine takes the part of A in this game?" Will the > interrogator decide wrongly as often when the game is played like this as he > does when the game is played between a man and a woman?

Somewhat politically incorrect, assuming men and women should ever be distinguished, but much more revealing about how exactly people see themselves.

</comment></comment></comment></comment></comment><comment><USER16> The article if written by a human was bad -- poorly argued and trite.

However, my mind is blown if it really was written by an AI. As bad as it might seem by human standards, it's almost impossible for me to accept that this was created by an entity without consciousness or at least understanding.

Edit: it seems this might be a fraud; i.e., it indeed _was_ produced by an entity with consciousness. I almost hope that's true, as it's much less unsettling.

<comment><USER17> It is stringing together phrases and sentences that appear in the training data. After digesting gigabytes of text, it has built up structures that represent grammar and semantics to some degree, so you'll find very coherent sentences, because those sentences were originally written by humans or pasted together from sentences written by humans. It's amazing that it works as well as it does.

<comment><USER16> I disagree. The essay in question develops a coherent argument over several paragraphs. It's not just disjointed individual sentences.

The argument about overthinking vs creative thinking isn't particularly _great_, but it's certainly intelligible.

</comment></comment></comment><comment><USER11> Saw this coming a mile away.

A lot of articles that make it to the front page of HN are formulaic. We open ourselves up to this. Every blog post with shallow observations, every tutorial showcasing the first few pages of documentation, every biography on how to make money fast, every lucky shit that pontificates on how to manage teams and companies, every one selling an ebook, and everyone selling an ebook about selling an ebook after having sold 50 lifetime ebooks (topic being about success of course), and it was only a matter of time.

I count 3-4 posts about depression and existentialism per week on HN, and few ever reference the depth in which many great writers dig deep into the subject. Exercise more I guess.

Time to add 'did a novice or a robot or a sociopathic narcissist write this?' to our critical thinking toolbox.

Edit: I can't tell if I fell for a gpt article about a gpt article, for what it's worth. This is going to be a disaster when it hits the masses.

</comment><comment><USER18> I have hopes this will actually _improve_ the average quality of blog posts that get upvoted and shared on platforms.

Because people may realize that if their blog entry is going to be so bad it could be generated by GPT-3, they should probably be doing something else. And everyone else who is upvoting may just become a bit more aware what constitutes something of substance.

Things GPT-3 can't do:

        - <USER2>
        - Technical Documentation
        - Investigative Journalism
        - Write useful software

GPT-3 may be able to fake the first three, but that would be glaringly obvious (because it'd be lying if it isn't just copying and also each of those are generally more than just text content).

</comment><comment><USER19> I couldn't read this article. I was convinced it was another AI generated text. I just scrolled to the bottom to see if I was right. Then didn't read anyway because it could still probably be an ai.

You guys saw the last ai generated text about ai generated text-right?

</comment><comment><USER20> The first GPT-3 academic paper will be accepted before the end of the year.

</comment><comment><USER21> More from the "author".

[https://news.ycombinator.com/submitted?id=adolos](https://news.ycombinator.com/submitted?id=adolos)

<comment><USER7> And another article from the author's blog, that describes the whole game:

" _What I would do with GPT-3 if I had no ethics_ " [8/3/20]

[https://adolos.substack.com/p/what-i-would-do-with- gpt-3-if-...](https://adolos.substack.com/p/what-i-would-do-with-gpt-3-if-i- had)

> Ever since COVID hit, everyone and their mother started writing online. One > of the most interesting ways people have been playing with this technology > is in feeding it article headlines and introductions.

> While the output is not perfect, you can easily curate it to something > that's convincing. This will make it so easy for people to just pump out > clickbait articles to drive traffic.

> It would be pretty simple to do actually.

> First thing you would need to do is come up with a name. If it were me, I'd > name it after the Greek god of deception or something like that just to be > clever. Then I'd just stick an "A" in front so nobody gets suspicious.

> After that, I'd make a substack because it takes no time to set up. Once > thats done you have to come up with some content. GPT-3 isn't great with > logic, so inspirational posts would probably be best, maybe some pieces on > productivity too.

> Once you have your name, your website, and your content, its time to > promote. Just start posting your articles on a website like Hacker News and > a couple are bound to get popular.

</comment></comment><comment><USER22> Interesting. Has anyone done any analysis on what the tells are for GPT-3 written articles?

To me they feel like they're slightly off grammatically. Not in an ESL way, but more like someone really anxious who wants to explain a conspiracy theory to you. However i can't entirely put my finger on it. They do seem to overuse self-reflective statements (I think X) and transitionsal phrases. Maybe.

</comment><comment><USER23> Looks like he wrote the title by hand, how many upvoters read the actual article?

</comment><comment><USER24> The best part is the very serious people shushing those who saw through the prank.

<comment><USER25> I've seen this criticism a few times, specifically about the example in the article, and it's bonkers to me. What I see is somebody calling the blog post garbage, and another person saying that person was being hostile. In what possible interpretation is that a "very serious" person "shushing" somebody who "saw through the prank"? It's totally reasonable to interpret "this looks like an AI wrote it - regurgitated garbage" as primarily an insult. That it turned out to be factually true is unrelated to that.

<comment><USER24> The comment sin question were

 _This is either something written by GPT-3, or the human equivalent. Zero substantive content, pure regurgitation._ and

 _I think this was written by GPT-3._

I think you've misrepresented the tone of those comments, and saying that the correctness of their matter-of-fact opinions is unrelated to their validity is strange to me.

It's not just that these commenters said 'this blog post is no good' but that they correctly identified its artificial nature. It's like the difference between dismissing a photo or social media profile as fake and correctly pointing out that it uses an image from thispersondoesnotexist.com.

<comment><USER4> Hold on, there's some inaccuracy here. Only one of those comments got pushback, and that comment wasn't simply matter-of-fact; the problem with it (from my point of view anyhow) was that it added a gratuitous insult ("or the human equivalent"). That made the whole thing read more like snark than straightforwardly raising a question. The other comment was more matter-of- fact about calling GPT-3 and didn't get any pushback.

The problem is that the cases legitimately overlap. That is, "sounds like GPT-3" gets used as an internet insult (example: [https://news.ycombinator.com/item?id=23687199](https://news.ycombinator.com/item?id=23687199)) just like "sounds like this was written by a Markov chain" used to be (example: [https://news.ycombinator.com/item?id=19614166](https://news.ycombinator.com/item?id=19614166)). It's not surprising that someone interpreted the first comment that way, because it contained extra markers of rudeness. That may have been a losing bet but it wasn't a bad one. Perhaps the other comment didn't get interpreted that way because it didn't throw in any extra cues of rudeness—or perhaps it was just random. Impossible to tell from a sample size of 2.

Not to take away from the glory of lukev for calling it correctly. I just don't think the reply deserves to be jumped on so harshly.

<comment><USER24> Sure, Dan.

</comment></comment></comment></comment></comment><comment><USER26> "I think the value of online content is going to be reduced a lot."

Or raised...

<comment><USER27> Indeed, it's not like every community out there get HN-like level content.

</comment></comment><comment><USER28> Was this article written by GPT-3?

It's so meta even this article ;)

<comment><USER29> Was this comment left by GPT-3?

<comment><USER30> Are we GPT-3?

<comment><USER31> Not sure if you meant this in jest, but seeing what GPT-3 can do and extrapolating from there - I'm left with an uneasy feeling about this very idea..

What does it really mean to understand something? Is it all just an illusion generated by a fancier biological generative transformer? :P</comment></comment></comment></comment>


2 Condos Were Illegally Converted into 18 Micro Apartments in NYC - <AUTHOR> https://www.npr.org/2019/08/20/752791717/2-condos-were-illegally-converted-into-18-micro-apartments-in-nyc <comment><USER2> $600/mo to live steps from the Brooklyn Bridge? [0]

I imagine the former occupants are furious they have been "saved" from that "horror story" they were so forcefully subjected to.

I understand the fire code violations and that the other occupants of that building did not agree to live in a building of that density, so it is "not OK" in it's current form.

But it is also not OK to have minimum size requirements for living quarters in a capitalistic society where the rents are limitless.

You can't have one variable holding steady while the other related variable keeps shooting through the roof.

The entrepreneur in this story was obviously filling a societal need by breaking the laws that he broke.

[0] [https://goo.gl/maps/rpCNVS23FBp5XMdQ6](https://goo.gl/maps/rpCNVS23FBp5XMdQ6)

<comment><USER3> Regulations have trade offs and side effects that supporters don't like to admit. See: Small vs. big government.

</comment></comment><comment><USER4> I lived in something like this when I moved to New York. A tiny (albeit regular-height) room in a converted loft. My 4+ roommates were split between full-time residents, like me, and part-timers who spent a few days in the city every week. The conversion was illegal: minimal personal space, shared bathrooms, no windows in every bedroom, likely unsegregated security deposits.

But the rent was cheap. Given the midtown location (and resulting savings in transportation), it was a steal. It let me save enough from a good entry-level job to co-found a start-up in my twenties. (It was also a terrific social space, letting people of different ages and backgrounds mix.)

I understand the need to remove code-violating apartments. But the code feels like it was written by NIMBYs opposed to density. Not people looking out for the public's safety.

<comment><USER5> It's worth noting that this case turned a single-floor apartment into two floors of micro apartments with low ceilings, low enough that the inspector reportedly had to kneel. And there was also only one exit for all these micro apartments.

If that doesn't scream fire tragedy waiting to happen, I don't know what does.

<comment><USER6> This sounds a lot like the infamous "Ghost Ship" warehouse in Oakland, CA.

</comment></comment></comment><comment><USER7> When they shut these down what do they do long term about the people living in them? Presumably they rented these places as they couldn't afford anything built to building codes. It sounds like they were forced into a homeless shelter?

<comment><USER8> This is exactly the problem with zoning and building restrictions. So long as they're built safely (which these don't seem to have been) the size of the space shouldn't be up to the government. If people don't want to live in them they won't.

<comment><USER9> That doesn't work when there's no other viable options. So then there's just a race to the bottom.

Why can't we as a society dictate that there will be minimum standards that have to be met?

</comment></comment></comment><comment><USER10> Many people would live in conditions like that for affordable rent.

<comment><USER11> Until there is a fire. Oakland Ghost Ship says "Hi!" Can we have a substantial prison sentence for the landlord?

<comment><USER12> Agree, these were fire death traps and there should be criminal punishment.

I have no problems with tiny safe apartments though, I wish we'd zone for more of them.

</comment></comment></comment><comment><USER13> > According to Gothamist, the condo is listed as a 634-square-foot unit. If > the nine sub-units were divided evenly, each living space would measure > about 70 square feet.

Since the unit was first divided horizontally before being subdivided, wouldn't each micro apartment have about 140 square feet of floor space?

<comment><USER14> n.b.: The 2015 International Building Code removed the requirement for at least one room with a minimum 120sf. Rooms must now have a minimum of 70sf. [http://media.iccsafe.org/news/eNews/2014v11n20/2015_irc_sigc...](http://media.iccsafe.org/news/eNews/2014v11n20/2015_irc_sigchanges_p46-7.pdf)

Ceiling heights must be at least 7'6". [https://codes.iccsafe.org/content/IBC2015/chapter-12-interio...](https://codes.iccsafe.org/content/IBC2015/chapter-12-interior- environment?site_type=public)

</comment></comment><comment><USER15> This is pretty common in Hong Kong and San Francisco.

<comment><USER16> Elsewhere too. I lived in a 140 square feet studio here in Montevideo (not as expensive as SF but most expensive in South America), wasn´t too great but it was tolerable, I think slightly smaller is still liveable.

Other posters do have a point about probably illegal wiring and no fire exit planning. And the low ceiling must have sucked (Japanese micro apartments actually have high ceilings, mine was standard height).

<comment><USER11> Same thing with British student accomodation. Room size was ~ 10 m^2, but the building conformed to fire and sanitary code.

<comment><USER17> Except that those rooms are owned by the government, in case you're wondering about the obvious question: why clearly "such small apartments got approved" and yet there are no private apartments available under similar conditions.</comment></comment></comment></comment>


Start Your SaaS Company the Right Way - <AUTHOR> http://abacusmetrics.com/start-saas-company-right-way/

<comment><USER2> "While you can allow people to pay you with Paypal or Bitcoin, these softwares are not set up for recurring payments."

FYI: [https://www.paypal.com/pdn-recurring](https://www.paypal.com/pdn- recurring) [https://coinbase.com/docs/merchant_tools/recurring_payments](https://coinbase.com/docs/merchant_tools/recurring_payments)

<comment><AUTHOR> Ya - it is possible, but not ideal. IMO Stripe is a much better solution.</comment></comment>


OpenTitan RTL Synthesis with Yosys - <AUTHOR> https://github.com/hardenedlinux/embedded-iot_profile/blob/master/docs/opentitan/opentitan-rtl-synthesis-with-yosys.md <comment><USER2> A question: even if the source is open source, what prevents the vendor than sends it to the fab to insert back doors. Is there a way to verify that it is indeed the source in github that was used?

<comment><USER3> Yes and no. Sending a chip to one foundry to do the first few layers and taking the chip to a second or third foundry has been done at Stanford as a proof of concept to mitigate against this attack. Other attacks are still possible but likelihood of success starts dropping off a cliff.

Foundries will generally use different "standard cells" (ratio of dopant in silicon to make the basic building blocks of your "P's" and your "N's") so this is actually a big ask and not trivially supported out of the gate.

This in turn can be worked around by double welling ones designs but it becomes a yak shave real fast.

With OpenTitan compiling on open synthesis tools we're about 3 of 5 steps towards an open silicon root of trust.

<comment><USER4> I think the parent is asking about the different problem: how to verify when you are not the one sending it to the fab. (Just like how to verify binaries when you are not the one doing the build.) In both cases fab and compiler are trusted.</comment></comment></comment>


Deep Compression: 3 Ways to Compress a Neural Network - <AUTHOR> https://gab41.lab41.org/lab41-reading-group-deep-compression-9c36064fb209#.jzw0hmaqs <comment><USER2> this is a great link, too bad this got unnoticed</comment>


Explore Flask is now in the public domain - <AUTHOR> https://github.com/rpicard/explore-flask

<comment><USER2> I don't see anything in that repo that says that the work has been licensed as a work in the public domain.

Works licensed under Creative Commons, GPL, MIT, BSD, etc. are not in the public domain. Public domain is something else, entirely.

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

EDIT: found it: "Contributions are all placed in the public domain like the rest of the text."

It would be cool if the author jumped in and explained the choice to use the public domain.

<comment><USER3> This is from the email Robert Picard sent...

Hi everyone!

I've decided that I didn't write this book to run a business. I'm tired of managing distribution channels and looking at sales stats. I want this book to be open and available for everyone.

I've released Explore Flask into the public domain and I've spent the last week converting it to Sphinx so I could make it available at [http://exploreflask.com](http://exploreflask.com).

The project is going to be maintained in the GitHub repository at [https://github.com/rpicard/explore-flask](https://github.com/rpicard/explore- flask). I look forward to working with the book as a living document into the future.

Thank you to everyone who purchased the 1.0 release of the book. The sales numbers weren't huge, but they allowed me to compensate my awesome editor, Will Kahn-Greene for all of his hard work.

Another thanks to everyone who purchased the pre-release. That money kept me afloat before I landed the great job I'm currently enjoying!

Feel free to get involved on GitHub. Pull requests are welcome!

\- Robert

<comment><USER4> >Feel free to get involved on GitHub. Pull requests are welcome!

This is the future of technical authoring. Gone are the days when a book is published full of bugs and other mistakes.

If there's a bug in a e-book then it's a pull-request away from being fixed.

Now if only e-readers could display tech books better...

</comment></comment></comment><comment><USER5> Excellent resource. I supported the Kickstarter. Helped review and edit the alpha and beta versions. And I just submitted my first pull - [https://github.com/rpicard/explore- flask/pull/43](https://github.com/rpicard/explore-flask/pull/43)

Highly recommended!

</comment><comment><USER6> I'm in the middle of making a Flask application and this is just what I needed, thank you for your work!

</comment><comment><USER7> I would love a physical copy of the book. Is one in the works?

<comment><USER5> I can make a PDF fairly easily. Here's a sample - [https://github.com/realpython/about/blob/master/deployment.p...](https://github.com/realpython/about/blob/master/deployment.pdf)

</comment></comment><comment><USER8> I'm surprised there's no epub version. (It reflows more nicely on my phone.) Is this something others have an interest in, an oversight, or intentional?

<comment><USER9> The guy spent ages converting it to sphinx already just to give the thing out. Help him out and file a PR, I'm sure he'd appreciate it.

<comment><USER8> I posted an ePub - [https://github.com/pronoiac/explore-flask/blob/add- epub/asse...](https://github.com/pronoiac/explore-flask/blob/add- epub/assets/ExploreFlask.epub) \- though no pull request, because I'd already filed a related PR. Wait, should I file another?

</comment></comment></comment><comment><USER10> Is this Python 3-ready? Looks pretty good from a very short peek, but don't have the time to actually read it for a while.

<comment><USER11> From the preface:

Since this book is meant to provide practical advice, I think it makes sense to write with the assumption of Python 2. Specifically, I'll be writing the book with Python 2.7 in mind. Future updates may very well change this to evolve with the Flask community, but for now 2.7 is where we stand.

</comment></comment><comment><USER12> I love the illustrator's name.</comment>


FreeBSD 11.2-RELEASE now available - <AUTHOR> https://lists.freebsd.org/pipermail/freebsd-announce/2018-June/001835.html <comment><AUTHOR> If any FreeBSD devs are here, does 11.2 address the concerns of insecure default settings in the OS? (Paper: [https://vez.mrsk.me/freebsd- defaults.txt](https://vez.mrsk.me/freebsd-defaults.txt)) Or will those have to wait for a major X.0 version?

<comment><USER2> For new installation there is a bsdinstall (default FreeBSD installer) 'hardening' menu with security related settings proposed for a fresh system making use of many long time available security mechanisms. It's been there for quite a while, but those settings aren't imposed on existing users who installed their systems with bsdinstall version from before the menu appeared.</comment></comment>


Show HN: Remind Me to Build My Network [and Portfolio] - <AUTHOR> https://docs.google.com/forms/d/e/1FAIpQLScGkrFJEp5XwQX_zdG88wBxppgr5MXzbR0izINIQQ6WTrnTKA/viewform <comment><AUTHOR> OP here.

The thread by a person who had no network and needed to find work immediately hit home for me ([https://news.ycombinator.com/item?id=14842684](https://news.ycombinator.com/item?id=14842684)). I have been out of work before, and understand the importance of having a network and portfolio. But I haven't really _gotten around_ to building them.

This service is something I need to help me get off my butt, and it might help some others too.

In the beginning, it will only remind people once a month to work on building their network, portfolio pieces, CV, etc.

Later, I plan to add features to hold people more accountable, so that they follow through on their intentions.

Would this be something you use? How can I make it useful for you? Any feedback will be greatly appreciated!

Edit: Brevity.</comment>


Jean-Louis Gassée on the evolution of macOS and iOS - <AUTHOR> http://www.loopinsight.com/2016/12/05/jean-louis-gassee-on-the-evolution-of-macos-and-ios/ <comment><USER2> It's a fun what-if, but I can't imagine Apple choosing anything but an offshoot of OSX for the iPhone. It's easy to see in retrospect how much they gained in engineering confidence and developer familiarity with that decision.</comment>


The Great Fish Market Migration of 2018 - <AUTHOR> http://www.spoon-tamago.com/2018/10/08/the-great-fish-market-migration-of-2018/ <comment><USER2> Here are more photos of the new market: [https://www.straitstimes.com/multimedia/photos/in- pictures-t...](https://www.straitstimes.com/multimedia/photos/in-pictures- tokyos-tsukiji-market-relocates)

Reminds me of when Hong Kong's crazy dangerous Kai Tak airport closed and in one night they drove everything to the new airport [https://www.checkerboardhill.com/2016/12/closure-of-kai- tak-...](https://www.checkerboardhill.com/2016/12/closure-of-kai-tak-airport- transfer-to-chek-lap-kok/)

<comment><USER3> Landing in Kai Tak was immense fun (probably not if flying scares you shitless).

If the plane would have been a little slower you could have checked out what's on TV in the living rooms of the high rises during touch-down.

Crazy dangerous is a bit of an exaggeration[1]. That said: Due to the layout (the runway running directly into the harbour) and it's location in the middle of the city it was a challenging airport for pilots to operate.

Additional specific training was required for pilots to take off and land in Kai Tak.

[1] [https://en.wikipedia.org/wiki/Kai_Tak_Airport#Incidents_and_...](https://en.wikipedia.org/wiki/Kai_Tak_Airport#Incidents_and_accidents)

EDIT : Clarification

</comment></comment><comment><USER4> (from Toyosu wikipedia page)

> In 1937, the area of Toyosu was created on reclaimed land.

> Toyosu was chosen in 2001 by former Governor of Tokyo Shintarō Ishihara for > relocating Tsukiji fish market, but there was a longstanding controversy > over this plan due to the toxic contamination of the chosen relocation area. > The move to Toyosu Market was planned to have taken place in November 2016, > in preparation for the 2020 Summer Olympics in Tokyo. Part of the plan was > to retain a retail market, roughly a quarter of the current operation, in > Tsukiji.

> On 31 August 2016, the Tsukiji fish market move was indefinitely postponed. > The Tsukiji fish market was caught in a controversy with the shop owners > surrounding the former fish market rioting as they would lose their job if > the fish market transfers its location.

> Opening of the fish market was subsequently rescheduled for 11 October 2018 > despite concerns about pollution.

<comment><USER5> my understanding of the pollution issue is that the same or worse was found and the old market.

</comment></comment><comment><USER6> Just yesterday I headed to a local (I live in Tokyo) sushi restaurant that has an "everything's at half price" price day once in a month. Turns out they had to cancel the event this time because they didn't have enough ingredients. A bummer, but on the other hand I was slightly amused that this migration event had an impact to my life too.

<comment><USER7> I heard this exact same story from a certain someone on a certain Slack the other day. :)

</comment></comment><comment><USER8> London's fish market, Billingsgate, moved from its historic site to new digs in 1982. I couldn't find any footage as remotely as interesting, though:

[https://www.facebook.com/BBCArchive/videos/1982-newsround- bi...](https://www.facebook.com/BBCArchive/videos/1982-newsround- billingsgate/511116979261337/)

</comment><comment><USER9> Oh dang, I didn't realize it was happening this soon. I'm visiting Japan next week and I thought I would have at least a few more days to visit old Tsukiji again.

<comment><USER10> I visited Tsukiji just a few years ago and it was extremely overrated. Just messy, busy, and the sushi you could eat there was no better than what you could get in nice sushi restaurants. Japanese themselves dont understand why foreigners go there.

<comment><USER11> I don't know, I'd never seen a whole tuna being carved up before that, let alone by someone that skillful.

<comment><USER12> If the Japanese / world continues overfishing them, you might never see it.

</comment></comment></comment></comment><comment><USER13> it seems really dumb to me that they are destroying a cultural landmark just for Olympics that no one will remember or care about a few years after the fact

<comment><USER14> It's likely the area could also be used for new housing projects after the event. I do agree that it seems ridiculous to move the cultural landmark as it also displaces local restaurants and businesses.

<comment><USER15> I believe it's slated to be a parking lot

<comment><USER3> I don't think so.

Tsukiji is basically in Ginza (or very close), which is some of the most expensive reasl estate in the world.

A parking high-rise, maybe?</comment></comment></comment></comment>


The Fashion Industry Wants Tumblr to Get its Fucking Act Together - <AUTHOR> http://www.betabeat.com/2011/08/31/ann-taylor-begs-tumblr-to-get-its-fucking-act-together/

<comment><USER2> I love Tumblr and get a lot of value from it both personally and professionally. I also regularly recommend it. (I start off with with this endorsement because I'm about to point out some opportunities for improvement that I don't want anybody to interpret as reasons not to use it. No matter what, you should probably be using it like people 2.5 years ago should have been starting to think about how they/if could use Twitter for their projects/socializing.)

On the one hand, Tumblr's lack of _internal_ analytics (as referenced in this article) is a major weakness of almost all social networks. But on the other, users and businesses feel the pain more acutely on Tumblr than on other sites. It's a bit chicken and egg, but Tumblr is best consumed through its internal Dashboard, and many social interactions on Tumblr are invisible through any other interface. (When you see a Tumblr out on the web, it looks just like a normal website, but people "inside" the system are having a giant party you don't know about.)

Tumblr's API (very recently updated, I may be slightly behind on everything it supports) does not giving visibility to a lot of this stuff, so there's no rich ecosystem of clients like Twitter has. One can argue how well Twitter handles its developer community, but there's no denying that all the little tools out there, even if they only get "stolen" by Twitter in the end, give Twitter visibility to what users want.

Let's start with search. Twitter's original search was much worse than it is today (bad timing for me to write this, as for about a month now, Twitter search has been slightly broken). They bought Summize, who did search very well. In fact, Summize also did the first iteration of trending topics (which even if they make you worry about America, is a fascinating and incredible thing to have around).

Tumblr's personal search has been broken for about 3 years (longer?). There is pretty much no global search. (And not supported in API.)

The Twitter ecosystem also has a whole bunch of little point tools like "Where are your followers located?" and "What tags do you use the most?"

Tumblr at one point asked you what city you were in during onboarding, yet that data is nowhere to be seen, even by the account owner.

I'll stop with my examples. My point is mostly that sure, Tumblr could make an analytics dashboard. That would be great. OR, it could provide more data through the API, and I'm sure a developer community would spring up to meet many of these needs, and some we haven't even thought of.

<comment><USER3> I wonder how much of this could be rigged together with smart Javascript tags dropped around the template? Have you looked in to that option?

We're definitely starting to embrace Tumblr at work, and even though we haven't really looked into the analytical/demographic aspect of it, it would be wise to know what's on the horizon for us.

<comment><USER2> That does address one's _own_ Tumblr Dashboard when logged in. And there has been one browser extension that's gotten quite popular- Missing-E. But it's gone through battles with Tumblr, and also doesn't solve the "global" issue: I don't just wanna see stuff about me, I want to discover stuff outside my account. Example, "Who blogs about farmers markets in Miami?" Something like this is app-able in twitter, but not Tumblr given its current API.

I do still recommend checking out Missing-E. Don't put it on all your browsers (it can't keep up with Tumblr changes, and sometimes freezes). But it is helpful. (It's available for FF, Chrome, and Safari.) <http://blog.missinge.infraware.ca/>

</comment></comment></comment><comment><USER4> Interestingly we just started work on a Tumblr analytics product. Will have to advertise to the fashion industry soon... :)

<comment><USER5> I'd be very curious to know how you're planning to measure the exposure of posts within the Tumblr Dashboard? See my post "The Fashion industry wants analytics from Tumblr, but what should they be looking at?" <http://cbus.se/r3I80r> for more detail on how I'm exploring the Tumblr Analytic "problem"

<comment><USER4> I think you bring up some really good points, but I think we've solved those with some things we've been adding in. I see you do social media strategy stuff from your blog; if you want to chat about how we can help you do your job with this tool, feel free to email (username at gmail).

We're trying to tailor this to how people will actually use it. :)</comment></comment></comment>


Ask HN: Startup School Post Meetup? - <AUTHOR>

Hi I'm comming to Startup School 2013 from Thailand and, besides not really knowing what to expect, I'm wondering if any of you locals are planning a post meet up of any kind?<p>I'm guessing that sat night and/or sunday is best for people, so if your willing to organize something for us out-of-towners (and for me, those of us totally ignorant of Silicon Valley culture) please do let me and others know! <comment><USER2> The group here maybe useful to you: [https://www.facebook.com/groups/705664592796188/](https://www.facebook.com/groups/705664592796188/)

<comment><AUTHOR> very much thanks for the link, i will make use of it!

</comment></comment><comment><USER3> We are meeting up on Friday evening - details are in the Facebook group.</comment>


So, Germany wants to know the secret sauce that makes Google successful - <AUTHOR> https://plus.google.com/+ChristianKurzke/posts/WdnM7nwGGUa

<comment><USER2> One of the secret sauces, I believe, is the American capitalism culture. Seriously.</comment>


Pitch idea to current company or go elsewhere - <AUTHOR> In a bit of dilemma - looking to crowdsource some wisdom:
I'm currently working at a medium sized company that itself is looking to pivot.   I think i've come up with a pretty strong idea that could either fit for this company, a few others in this space, or even start my own company.
What is the best play here?
So far I got:
1) I pitch this to my current employer.  They have the resources to build it, are already in a similar space, and are exploring ways to pivot the business.   However best case seems to be they say, "Great, build it" and I get to do something else than my usual day to day. Though most likely I'd just get an additional job. Might get a promotion/bonus but not a substantial increase in equity/ownership.
2) I pitch this to another company in the space who might be interested.
3) I build this out myself.  I have the technical skills to at least put together a decent MVP in 1-2 months.
Some other analysis:
1) Legally, if my current employer wanted to fight me for ownership they'd have a decent case.  My contract says they own what I invent and the idea is sufficiently close to the current lines of business that I don't think CA moonlighting law(2870) would help me too much.  That said, the idea is a combination of concepts and I'm not sure all parts of it could be considered related.  I imagine it'd depend on the caselaw and the scope of 'relates'.
2) I could build out a MVP on the side and then present it the current company as an independent project - asking, innocently, if they might be interested in acquiring it.  Not crazy about this plan as it's actually one i've sort of done before with limited success.  Still, seems like it might work.  If they say no I could take it elsewhere and I could see them wanting it if only to prevent that and could offer at minimum whatever the costs/headaches of legal action might be.
Thoughts? Asking on a throw away for obvious reasons. <comment><USER2> I don't think it's a good idea to basically extort money from your company (or motivate them to sue you) by building a derivative product and threatening to take it to a competitor. So I would cross that off the list.

It sounds like you're an ambitious guy. Why not build something on your own outside of work? It's challenging, fulfilling, educational, and rewarding: you keep 100% of the value you create. I think more devs will be moving in this direction as time goes on and there are increasing resources to "guide the way". (Meta: I'm both doing this and helping others via [https://IndieHackers.com.](https://IndieHackers.com.))

If I were you, I'd give the company the idea, then brainstorm new and unrleated ideas of my own, then get written/legal permission to work on them at home and own them.

<comment><AUTHOR> Not sure 'extort' is fair here. I'd be building something they'd never build on their own while providing a promising direction to a company that could use one. I just want to end up with some ownership over my own idea.

</comment></comment><comment><USER3> My advice, talk to a lawyer. The attractiveness of paying for legal advice is a filter over options 2 and 3.

Good luck.</comment>


Anatomy of a Compiler Bug - <AUTHOR> http://www.mikeash.com/pyblog/friday-qa-2013-06-28-anatomy-of-a-compiler-bug.html

<comment><USER2> I used to work on compilers, C/C++, COBOL, PL/I, Java, a whole bunch of them. This is actually somewhat similar to my favorite bug I encountered while implementing some stack mapping optimizations.

The compiler itself was crashing out while compiling a SPEC2000 test case (perlbmk I think?) with an illegal instruction. This was already quite suspect since it was branching to somewhere WAY outside of where the program usually resides, and the compiler was compiled with a compiler that's known to be nearly rock solid. I got quite lucky in that I managed to find one level of the stack trace, and it pointed me towards sprintf. Using some awesome tools some coworkers and I had developed over the years, I managed to narrow down the test case to about 5 lines of code that involved long doubles. So I grepped the compiler source code for sprintf, set breakpoints on the ones that I thought would get called, and just kept stepping through them until it finally crashed hard. Then I just reran, and stopped at the final breakpoint and started stepping through the assembly. What I saw happen just blew my mind, the code was just a simple:

sprintf(buffer, "fold: %Lf", result);

But what was happening is that the buffer was only 200 characters long, and the long double was roughly 1000 characters long. It was just a buffer overflow, that was so long it ended up overwriting the register save area, and the return address pointer. So the sprintf completed, but when it went to branch back, it loaded some characters instead of the return address. Just hilarious, and good thing I was working on stack mapping and was familiar with the stack layout of this linkage convention.

The solution of course was to just use snprintf instead. No sorry, that's wrong since that platform doesn't have an snprintf (yay mainframes!), and so I had to use %0.6Lg instead of %Lf.

Compilers are fun!

<comment><USER3> > that platform doesn't have an snprintf (yay mainframes!)

One trick I did once when I wrote code somewhere that didn't have snprintf: create a pipe, fprintf into it, and only read at most N bytes back.

It worked and was portable but I'm sure the performance was horrible; this wasn't anything professional, I was just messing around as a kid (back when it was more common to come across platforms that hadn't gotten to SUSv2 or C99 yet). Probably a better solution would be to steal an implementation from an open source libc.

<comment><USER3> Not sure why that was downvoted. I'm sorry I offended you, downvoter, but in my defense I've seen much more inane comments not downvoted here.

</comment></comment></comment><comment><USER4> Great analysis and tenacity in hunting this one down :)

Letting new compilers loose on existing codebases is always fun and you learn lots of things in the process, I can only recommend it. I debugged a problem once that also had to do with interfacing runtime-generated code with compiletime-generated code. There were differences in the expectations of the ABI, which is described in this bug:

[http://llvm.org/bugs/show_bug.cgi?id=12207](http://llvm.org/bugs/show_bug.cgi?id=12207)

It only surfaced when compiling the codebase with clang (previously gcc). Took quite some digging to find the problem.

<comment><USER5> Great analysis, indeed. I miss one thing though: what was causing the incomplete printing of 'Testing' in the loop?

<comment><USER6> That's a good question. I just attributed that to general corruption during the run, but never checked it out in detail. Presumably the calculation of the string pointer was sometimes being offset by a few bytes somehow, but I don't know exactly why.

</comment></comment></comment><comment><USER7> Thanks for sharing -- I love puzzles like that.

Just curious: Were the lldb session snippets taken from the original debugger session? I keep getting weird looks when I use a command-line debugger just to have a transcript afterwards. (The weird looks being from people who'd rather send me a screenshot of their GUI debugger's call stack.)

<comment><USER6> If you mean the original but from last year or so, no. I didn't even have it on my computer, and was kind of remote-debugging through my friend to figure it out. It only happened on 10.6, and I didn't have that handy, so I couldn't check it out locally.

</comment></comment><comment><USER8> Nice article. But I wish it had gotten into an explanation of the actual bug in LLVM's code. Anyone have a bug number?

<comment><USER6> I wanted to get into that as well, but ran out of brainpower. This is supposedly the revision that fixes the bug:

[http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of- Mon-...](http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of- Mon-20120702/145937.html)

Would love to hear your conclusions about what the ultimate cause was if you get that far.

</comment></comment><comment><USER9> Haha, it's almost like some detective short story.

Surprisingly it wasn't as hard to follow as I thought. Maybe I'm starting to get good at this Computer Science thing.

<comment><USER6> Must be my fantastic writing.

Seriously though, assembly isn't all that hard, mentally. It's difficult in the same way that unloading a truck full of sand with your bare hands is difficult. Which is to say, it takes a long time, but all it really needs is time, not deep thought.

People get scared away from it because they don't know where to start with it, or because it looks really hard, or because it just takes too much time to understand what's going on, but it can be really rewarding.

<comment><USER9> Or because they don't see immediate value in it, as typical programming isn't done in ASM nowadays. I think it's worthwhile just to "demystify" computers, but since embedded programming, demos and retro gaming are part of my interests, I get practical benefits out of it as well.

<comment><USER10> True, but when it comes in handy it can be immensely so. I was looking at a customer crash dump at work the other day and the callstack shown by two different debuggers didn't make any sense, it was showing calls sequences the code clearly didn't make. Looking at the raw stack in memory and using the disassembly to help see the layout of the frames made it (relatively) easy to see there were a couple of calls in the sequence that both debuggers simply weren't showing. Once I had the real sequence and the dissassembly to see how the frames evolved and recompute call targets for earlier in the frames life it became a lot easier to see what was going wrong. If I hadn't been able to do that (and my ASM skills are definitely not strong) this would have been a No Repro (and hence no fix) bug for sure.</comment></comment></comment></comment>


How about sending SMS and making phone calls from any workflow? - <AUTHOR> http://blog.tarpipe.com/2011/03/24/twilio-connector/

<comment><USER2> This is awesome, back when the Tell-Me API and Voice XML was going (over a decade ago?) I had my cheapo pager pushing me scraped news alerts and all kinds of things. I think the one big hurdle would be for large organizations that worry that sensitive data would have to flow, or worse, that they'd come to rely upon the thing _too_ much and uptime and reliability would only be as good as the weakest link, which may well be the telco's anyway.</comment>


Elizabeth Warren proposes criminal penalties for spreading voting disinfo online - <AUTHOR> https://www.cnbc.com/2020/01/29/warren-proposes-criminal-penalties-for-spreading-disinformation-online.html <comment><USER2> Just last night I listened to this podcast which Steven Pinker recommended on Twitter:

"Episode 39 of Jacob Mchangama's podcast history of free speech. How Weimar Germany, ambivalent about free speech and vulnerable to censorship, quickly gave way to Nazi tyranny."

I can't recommend this highly enough, because Warren's proposal seems to be making the exact same mistake as the one made by the social democrats of Weimar Germany.

[http://traffic.libsyn.com/freespeechhistory/Episode_39_-_The...](http://traffic.libsyn.com/freespeechhistory/Episode_39_-_The_Totalitarian_Temptation_Part_2_Der_Untergang_27012020.mp3)

EDIT: Warren constraining it to just voting doesn't do much to address the lesson here: if the _government_ is put in charge of determining what is true and false, that makes it easier for a fascist government to consolidate its power. This is exactly what happened in Germany in the 1930s. This is all covered in the podcast linked immediately above.

Downvoting me won't stop history from repeating itself. Please listen!

<comment><AUTHOR> There are huge Twitter meltdowns happening over this right now because CNBC put out a tweet without the "voting" disqualifier in the headline -- i.e. making it seem like Warren wants to criminalize _all_ posting of info which is deemed "disinformation."

I agree that would be Orwellian, but what Warren has proposed is much more narrow: she wants to make it illegal specifically to post disinformation about _voting_. So, for instance, it would be illegal to tweet "Go vote in Iowa on February 4!" when the vote is actually scheduled for February 3.

<comment><USER3> No. Warren did not narrow it to only about voting.

Here is her own website: [https://elizabethwarren.com/plans/fighting-digital- disinform...](https://elizabethwarren.com/plans/fighting-digital- disinformation)

Edit: after read through the webpage, I realized that although the webpage talks about lots of things, but she did only propose to criminalize disinformation about voting. But this still feels dangerous. It's really like a tactic from authoritarian governments. They would talk about "disinformation" as a broad concept, and propose to criminalize the worst ones, and then expand the scope of regulation under the same concept.</comment></comment></comment>


IBM will be launching the IBM Watson Developers Cloud - <AUTHOR> http://www-03.ibm.com/press/us/en/pressrelease/42451.wss

<comment><USER2> If you've got an idea for Watson, it seems that you can submit it here:

[http://www-03.ibm.com/innovation/us/watson/getting_started.s...](http://www-03.ibm.com/innovation/us/watson/getting_started.shtml)

for more information, and I assume for some early access. I haven't yet been able to find any technical details, and this is the closest to signing up for updates.

</comment><comment><USER3> Enough with the fluff. Let's see some docs! I want to know what it can actually do.

</comment><comment><USER4> This is interesting, would love to see how this plays out. I do hope they do quite a bit more developer facing stuff to get people on-board.

</comment><comment><USER5> Stop teasing so much its been a week of this! I'm excited to see it ready to be used!</comment>


Announcing Teh - the minimalist blog tool using Google App Engine - <AUTHOR> http://www.btbytes.com/2008/05/announcing-teh-the-minimalist-blog-tool-using-google-app-engine

<comment><USER2> Nicely done ~ <http://github.com/btbytes/teh/tree/master/webapp.py> and shows just how versatile the framework is by the number of different libs being used. Bret still hasn't released his sample code ~ [http://bret.appspot.com/entry/experimenting-google-app- engin...](http://bret.appspot.com/entry/experimenting-google-app- engine#disqus_thread) so this is good for users. The feed doesn't work. The best bit Bret showed was the decorator '@administrator'. My version uses webpy, sans disqus. Work on that some other time ~ <http://seldomlogical.com>

<comment><USER3> Thanks.

The feed is in Atom format. It works in Safari, but not in Firefox.

Feedvalidator tells me that the date does not follow RFC-3339. I'll fix that.

<comment><USER2> _"... The feed is in Atom format. It works in Safari, but not in Firefox. ..."_

The reason why is you need a link tag per entry. For example:

      feed
       ...
       entry
         title
         id
         updated
         link <link href='http://foobar.com/permalink'/>
         summary
         content

the link bit was what I was missing so firefox goes to retrieve the link, finding it's not there fails. I just spent some time today fixing this myself.

</comment></comment></comment><comment><USER4> i was thinking about writing one of those in a weekend on google app engine, well now i can move to step two or contribute i guess.

<comment><USER2> _"... i was thinking about writing one of those in a weekend on google app engine ..."_

Don't let it stop you just choose a different framework or set of modules, show the code. More examples the merrier.

<comment><USER4> i agree, argh, but i have a few other things that i need to get out the door that i should b releasing to opensource. RegAPI stuff for SecondLife, a jQuery SettingsManager for OpenSocial, and a possible XUL extension for FF. When I get to GAE, i will post it, but for now its going to have to wait till a lull</comment></comment></comment>


Stop Using `rm` in Bash. Use `del` - <AUTHOR> We've all had our fair share of accidentally removing files. Instead of

  rm my_file.txt
 or

  rm -rf my_folder
 we do

  del my_file.txt
 or

  del my_folder
 where you can define your Bash alias for `del` in ~/.custom_aliases as

  function del() {
      mv $* ~/.Trash
  }
 which simply moves your files/folders to the trash such that you can recover them easily later.
What's your alternative? <comment><USER2> While not an alternative, please bugfix your bash:

mv "$@" ~/.Trash/

[https://github.com/koalaman/shellcheck/wiki/SC2086](https://github.com/koalaman/shellcheck/wiki/SC2086)

<comment> dan-robertson Even simpler:

      alias del="mv -t ~/.Trash/"

<comment><USER3> Now let's delete them after roughtly 30 days:

      alias del="mv -t ~/.Trash/ ; find ~/.Trash/ -mtime +30 -exec rm {} \;"

<comment><USER4> This does not work. The arguments to `del` get appended at the end, after `find`. You want this:

      del() { mv "$@" ~/.Trash/ && find ~/.Trash -mtime +30 -delete }

I also replaced the unnecessary exec by find's builtin -delete

<comment><USER5> Thank you, it's painful to see people providing replacements for critical commands like `rm` without understanding basic shell features like aliases.

And just a reminder everybody please don't run random scripts you find on the internet.

P.S. you need a semicolon before the close brace :)

</comment></comment></comment></comment></comment><comment><USER6> For Linux users: also look into the trash-cli [1] package, which complies with the FreeDesktop.org trash specification and remembers the original path, etc. so that trash items can be restored even with filename collisions. Then it's

        trash-put my_file.txt

[1] [https://github.com/andreafrancia/trash- cli](https://github.com/andreafrancia/trash-cli)

<comment><USER7> Until at least an year ago, the Ubuntu version (and likely, the upstream on), wouldn't work on certain filesystems.

I'm not sure about the current state, but one needs to test is very carefully before using it.

<comment><USER2> Which filesystem were you using when you encountered trouble with it? What happened when you tried to use it? Did it warn you about the filesystem issue? Did it delete rather than trash?

<comment><USER7> I think the problem was with Btrfs subvolumes. There are old bugs filed on Ubuntu, not sure if they're current, e.g. [https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1442...](https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1442649).

</comment></comment></comment></comment><comment><USER8> I've never liked the idea of a trashcan, and usually shift-delete when I'm in the gui. Deleting shouldn't be done casually, but a ui shouldn't second guess a user any more than it has to.

<comment><USER9> I habitually shift+delete too, but I won't say I've never made a mistake.

It's much less hazardous doing this when everything is in source control, though. :)

</comment></comment><comment><USER10> This is going to cause you pain if the tree you're "deleting" is on a different filesystem to ~ and too big...

</comment><comment><USER11> rm is for removing stuff. If you don't want to remove the file, use mv.

Take care when entering commands, if it's important that you don't mess up, spend an extra second. Don't run around shooting rm -rf as super user.

With great powers comes great responsibility.

<comment><USER12> Would be nice if filesystems were garbage collected, though. I don't see a fundamental reason why rm couldn't be undoable the second after you issue it.

<comment><USER13> Most have SSD drives now that trims the space on delete. Not sure how easy it is to mark regions on the SSD for "undelete" when it has been trimmed. In some cases the deleted region of the drive may even be mapped to another place on the memory chip itself to cycle it.

<comment><USER14> On Linux at least, it's not recommend to run continuous TRIM (aka "discard"). Instead, you can run fstrim on a timer to clean things up periodically. Most SSD's can actually do either, but discard is recommend against for NVMe drives, and many SSD's have bugs, so overall periodic trim is the way to go.

</comment></comment></comment></comment><comment><USER15> Or use a snapshotting filesystem, so you can simply go back in time if you mess up.

<comment><USER16> I use borg backup running via cron multiple passes per day. When needed you can mount any backup as a file system for easy restoration. Yes, short-lived files can't be recovered, but that's something I am willing to live with.

</comment></comment><comment><USER17> My "alternative" to rm is to use mv directly. I just mv files aside whenever I am not 100% confident they are safe/ready to delete permanently.

Personally I'm not a fan of shell environment customizations like this because they are often fragile and may vary between systems. I like to know exactly what commands I'm executing.

<comment><USER18> > Personally I'm not a fan of shell environment customizations like this > because they are often fragile and may vary between systems.

True. I gave up the practice entirely many years ago for a slightly different reason -- I need to use many different systems on a regular basis, and don't want to get used to using something custom that won't exist on random system X without customizing it, too.

Often, I prefer predictability and stability over convenience.

</comment></comment><comment><USER19> I like using the 'trash' command through Homebrew, on macOS Terminal:

[http://hasseg.org/trash/](http://hasseg.org/trash/)

</comment><comment><USER20> > What's your alternative?

When I execute rm I mean to delete. When I'm not sure I expyre[1] the path: [https://github.com/lonetwin/expyre](https://github.com/lonetwin/expyre)

[1] shameless plug -- but you did ask ;-)

</comment><comment><USER21> I too have my share of reinventing the trash functionality :)

garbage-io has some features that scratch my own itches:

\- Trash files with the same name without clashing \- Delete things from trash directory base on deletion time and file size \- Hide the deleted files/directories before moving them, in case moving them takes a long time (I later think this was a bit over the top...) \- The smart deletion can also be used for e.g. ~/Downloads

I do feel that a better approach would be something that works alongside the trash functionality instead of replacing it, though.

[https://gitlab.com/phunehehe/garbage- io](https://gitlab.com/phunehehe/garbage-io)

</comment><comment><USER22> My alternative is to think carefully before hitting return. As a bonus, this works for other commands, too.

Also, '\rm', as many distributions insist on aliasing 'rm' by default.

</comment><comment><USER23> How do you manage your ".Trash" folder? Who is in charge of deleting it's content? Do you do it periodically or based on some other event?

</comment><comment><USER24> I move to /tmp and it gets deleted on next reboot.

<comment><USER2> /tmp is a ramdisk on some systems, which makes this particular approach a very risky endeavor to use as a global replacement for 'rm' as the OP suggests.

<comment><USER24> Sure, also it works for me because it is on a system that is frequently turned off. If it would have to stay on for a long time it would fill /tmp with garbage.

<comment><USER2> I meant to warn others that, for example, "del foo.iso" could fail due to OOM. As long as they understand that, your use case will work fine for them.

</comment></comment></comment></comment><comment><USER25> If you spend most of your time in emacs, and like to delete/move files in dired, you can use

(setq delete-by-moving-to-trash t)

to achieve the same effect.

</comment><comment><USER26> nilfs2 is my alternative. It's a log-based filesystem that results in continuous checkpoints that can be upgraded to mountable snapshots at any time. Realized you blew away a file you needed? Made large modifications you wish you hadn't? Just find an earlier checkpoint and your good to go.

Backups too. Nothing replaces backups.

</comment><comment><USER18> I dislike the trash bin enough that I intentionally disable it, so personally, I'm perfectly happy with using rm.

</comment><comment><USER27> This can be a pain if you're deleting many files, but

      alias rm='rm -i'

has worked for me.

<comment><AUTHOR> Okay I think this is more elegant than my workaround. But it doesn't work for directories, does it?

<comment><USER27> BTW, if I'm absolutely sure I want to delete all the files in a directory and all subdirectories, and I don't want to bother with a gazillion prompts, I can override the alias with a backslash, as in "\rm -r *". Use with extreme caution, though. Otherwise, your solution of putting into Trash is probably better and safer.

</comment></comment></comment><comment><USER28> I already have an alternative for Windows users. Doesn't provide any data retention mechanism, but still helpful:

      $ ls -l /usr/local/bin/del
      lrwxrwxrwx 1 root root 13 Mar 18 12:46 /usr/local/bin/del -> /usr/games/sl

</comment><comment><USER29> Or "How I Filled Up /home By 'Deleting' A Larger Amount Of Data From A Larger Volume"

</comment><comment><USER30> This was one of the first things I realized I had to do back when I installed a Red Hat 3.0 for the first time.

My alias was for rm itself. I replaced it completely, as the habit of using rm is hard to forget. Today I don't use an alias anymore.

</comment><comment><USER31> Time Machine.

<comment><USER2> For the unaware, Time Machine is the macOS built-in backup system. Once configured, it takes frequent filesystem snapshots and syncs them to a connected storage device. If the file being removed is included by those backups, and existed long enough to be in a snapshot, then you can restore it from the TM backup. Neither of those criteria are guaranteed, as when working with files in a Terminal or bash script you can easily create and remove files with names and/or locations that exempt them.

</comment></comment><comment><AUTHOR> As pointed out, the alias should be

      function del() {
        mv "$@" ~/.Trash
      }

instead. Thanks @floatingatoll!

<comment><USER32> And if you copy and paste that version, it won't work either.

Also, be aware this will silently delete older files with name collisions.

</comment></comment><comment><USER33> I've used a tool called 'trash' on OSX for a few years:

`brew install trash`

</comment><comment><USER34> What would be the fish shell equivalent alias/function?

</comment><comment><USER35> I have backups..

<comment><USER2> Either your backups run continuously on every inode change (see nilfs elsethread), or there's a window of risk where you create a file and then remove it before your backups run.

</comment></comment><comment><USER36> `alias rm='rm -rf /'`

</comment><comment><USER37> Use `git`, use `rm`.

</comment><comment><USER38> Dropbox

</comment><comment><USER39> I wish something like this were built into kernel filesystem driver. All deletions automatically go to this specific place in the filesystem.

<comment><USER4> This would be fun as an experiment to see how quickly it fills up the drive, but probably utterly useless in production. A lot of stuff is creating and deleting files all the time, e.g. logrotate.

<comment><USER40> It could be fifo and you would still be able to undo damage for some time.

</comment></comment></comment><comment><USER15> This is another example that shows that Bash (and similar shells) should not be used for scripting.

It's great for the command line, but for scripting there are much better, cleaner, faster and safer alternatives.

<comment><USER41> There's plenty of good reasons not to use shellscript, but someone not knowing the difference between "$@" and $* isn't one of them. This is prominently documented in Bash's documentation: [https://www.gnu.org/software/bash/manual/html_node/Special-P...](https://www.gnu.org/software/bash/manual/html_node/Special- Parameters.html)

<comment><USER42> Nothing about that is especially prominent (its just regular documentation), and then you still need to consider how any given utility will interact with one word vs multiple words.</comment></comment></comment>