Implement with Types, Not Your Brain - <AUTHOR> https://reasonablypolymorphic.com/blog/typeholes/ <comment><USER2> > I don't need to use my brain to do programming

...

        hoistStateIntoStateT
            :: Sem (State s ': r) a
            -> S.StateT s (Sem r) a
        hoistStateIntoStateT (Sem m) = m $ \u ->
        case decomp u of
            Left x -> S.StateT $ \s ->
            liftSem . fmap swap
                    . weave (s, ())
                            (\(s', m') -> fmap swap
                                        $ S.runStateT m' s')
                            (Just . snd)
                    $ hoist hoistStateIntoStateT x
            Right (Yo Get z _ y _)     -> fmap (y . (<$ z)) $ S.get
            Right (Yo (Put s) z _ y _) -> fmap (y . (<$ z)) $ S.put s

...

I definitely need to use my brain to _read_ that code though.

<comment><USER3> I have a similar experience with mathematics. "The differential form expressions for Maxwell's equations are incredibly simple!" Yup, they're simple after you've done all of the work to wrap your mind around differential forms in the first place. I did it at some point. It was rewarding, and it was elegant, and it was even _fun_ , but it was anything but easy on my brain.

Haskell feels a lot like that. That code snippet gave me the same feeling of having to climb a conceptual mountain to appreciate the metaphorical view at the top. I have no doubt that there is something beautiful there, but of all of the conceptual, programming related mountains I need to climb, the language abstraction one is pretty low priority, because the language I am using really is not my limiting factor. I appreciate that others who care spend a lot of time thinking about this problem, but Haskell's got a long way to go before I'm convinced that it's worth using in everyday contexts.

<comment><USER4> Note that Haskell makes very few assumptions about the users; the quality and complexity of Haskell code varies greatly. The author of this block is dealing with an abstract topic, resulting in somewhat arcane looking code (I am sure that after some refactoring it would read nicer). It is however very possible to write really easy to understand Haskell code by ignoring its more fancy features and sticking to the most used abstractions: Monads, Applicatives and Functors. They alone are enough to write great code, no category theory, effect library, type magic or whatever is needed. Simple, real-world Haskell exists, it is just not often blogged about.

<comment><USER3> Fair enough, I just disagree with the premise that heavily relying on the type system actually lets you think less hard about how to implement your code. In my experience, defining the types you'll use at module boundaries is the actual hardest part. The stuff in the middle is usually straightforward until you realize you need sub-modules, at which point you're defining module boundary types again.

<comment><USER5> A good type is like a heads up display about where you are in your implementation. Haskell types are often far away from being that, however.

</comment></comment></comment></comment></comment><comment><USER6> Sorry but this is just crazy. I always wonder if people writing blog posts like that have ever worked in a big company. You need to spend at least 2-3 hours a day doing code reviews and most of the rest you are writing code, which subsequently involves reading the code you wrote yourself and others have written.

Now we currently use Java here. I worked with other programming languages in companies too, for instance C and C++ which were a nightmare with no equal. Don't get me wrong, when I was in college I just loved creating crazy shit with template metaprogramming and preprocessor metaprogramming. Once you mature out of it, this is just the most craziest thing you could ever do.

The reason is simple. Even plain, stupid Java is already incredibly hard to verify during a CodeReview. Spend 2 hours in a row trying to find problems with other's people well written Java code and your brain feels like it explodes. Now with C++ that same task is almost impossible and will likely require 8 hours of your day for the same code volume. With Haskell I would go out on a limb here and say it would require 24 hours of your daily time to handle the same code volume...

Not to mention that most programmers even at Google and Amazon would not even be able to either read or write such code and people like me, who could and did in the past would just shake their heads and move on. Nobody wants to deal with such code outside of university...

<comment><USER7> > most programmers even at Google and Amazon would not even be able to either > read or write such code

Hello, I am at Amazon. I spend a decent portion of my time working with an in- house Clojure library (not entirely dissimilar to Haskell) which handles some mission critical business logic my team owns.

It terrifies me. I hate it.

For every hour I spend working with it, I spend another hour trying to convince everyone we need to rewrite it in Java, immediately, or replace it with a different library. None of us have a clue how it works. We can't debug it. The guy who wrote it quit three years ago.

I mean, it works. It works very well. But the day it doesn't work, we're not going to have a clue why that is. And then we're in real trouble.

<comment><USER8> You could use those hours currently spent lobbying for a rewrite to, you know, learn clojure.

<comment><USER6> Yet another myth that comes from not working in big companies... Learning a language is mostly useless for several reasons: 1) You will be among the only person who is willing to learn it 2) You will have no capable reviewers, and usually you need about 2 for each CR 3) Your team has no production knowledge and muscle memory for that language. Ergo pretty much all you do will be garbage for a very long time and a huge operational risk. 4) Other teams at your company will not know this language either.

Bottom line: Pick the language most teams at your company are familiar with. At Amazon that simply is Java for anything that is not frontend, period. Even getting into Kotlin presents a major obstacle. Clojure? Yeah right.

Edit: Just to clarify. Working in a big company is not meant as a restriction. In fact, having worked in several startups before, these would do well to adopt the same principles for programming and prohibit this "university graduate" way of developing software. In the end, if your startup is going to survive, it's going to become a big company itself someday.

<comment><USER9> Learning a language that is almost completely useless for your company is still useful for you. It adds to your skill set, increases your market value and keeps you learning.

Only learning corporate-approved languages is a bit shortsighted. Tech companies, development paradigms and programming languages all have shorter lifespans than humans. COBOL and Fortran, once very successful and popular languages have stopped being mainstream for a while. And those two were the survivors of their batch. Who knows how many then-popular languages have faded away to obscurity?

Also you have to keep learning even if you are to stick to the same language. Java is not 1.6 anymore. Languages keep evolving by borrowing good ideas from other languages. So why not use your learning time to stay ahead of the curve?

Edit: All languages have their places, even in big companies. Could Whatsapp and Discord have grown at the same pace while using Java/C#? BEAM is the right tooling for them and it has paid off.

<comment><USER10> > Could Whatsapp and Discord have grown at the same pace while using Java/C#?

Arguably, yes. The JVM and .NET CLR are both superior platforms when it comes to performance. They also both offer actor models with supervision (e.g. Akka/Akka.NET).

</comment></comment></comment></comment></comment></comment><comment><USER11> > _Which means you can slowly use type holes to chip away at a difficult > implementation, without ever really knowing what you 're doing._

Yeah, look! I started with a function signature and a little _. Lo and behold, fifty seven holes later, I have a graph-coloring optimal register allocator for MIPS for my compiler back end. Don't ask me how it works, but the type system assures it.

<comment><USER12> This type system, is it powered by AI?

<comment><USER13> There's nothing fuzzy going on. If I said f(x) = 2, you could quickly work backwards from that and state: 2 is an Int. x isn't used so it could be any type, let's say a. That means f has type (a -> Int).

</comment></comment></comment><comment><USER14> This post is _not_ for beginners/non-haskellers, I don't understand why it's being posted here. Is this intentional or are people in the haskell community _this_ tone deaf? It's like we're determined to prevent new people from joining.

Dear everyone, code like this is _not_ where Haskell starts to get useful, it's useful much earlier. I won't reproduce it here but I _just_ wrote a post with some practical code (and how haskell helped) taken from a project of mine: [https://news.ycombinator.com/item?id=20260095](https://news.ycombinator.com/item?id=20260095).

If you are using Coyoneda in your code, please do not use it to extol the virtues of Haskell, except if you're sure your audience is expert haskellers/mathematicians/researchers/others who can actually gain something from the post, or if the writing is so sublime that it has reduced the complexity to near zero.

Please OP, you're actively hurting the adoption of Haskell by posting stuff like this in the wrong places/context.

The author of the article (Sandy Maguire) created a library called polysemy that improved on the efficiency of using a concept called Free Monads in Haskell -- their main benefit is that they let you write functions that deal _only_ in your business domains. A rough corrolary would be a dependency- injected function that _could not_ do anything outside of what the dependency injected pieces do, but also allows for different dependency implementations to be mocked out entirely within the languag (i.e. _without_ the XML/annotation hell that is Spring DI magic).

<comment><USER15> > This post is not for beginners/non-haskellers, I don't understand why it's > being posted here. Is this intentional or are people in the haskell > community this tone deaf? It's like we're determined to prevent new people > from joining.

There are plenty of submissions on HN that are aimed at specialists of a field. They get to the front page because people are curious about specialized fields. So, even though I disagree from the pits of my soul with the content of the submission (as a professional Haskell developer, I should add), I think you're being very unfair to say that stuff like this shouldn't be shared with a broader audience.

<comment><USER16> Oh man, I'd absolutely _love_ to work in haskell professionally. Mind if I ask for your advice? As someone with ~4yrs in industry as a mobile developer and a master's in math, what are some routes I should be look into?

<comment><USER15> So, I got my first job by going to my local Haskell meetup and chatting with someone who would end up being my boss, and I've stuck with that crew since. I think that's rather serendipitous but it definitely doesn't hurt to go hang out with the Haskellers in your area. There's a regular meetup in many major cities, including Boston, SF, NYC, London and Zurich off the top of my head. Our shop has also hired people who respond to our job postings (on Reddit, for example), as well as people who participate in the community on IRC and Discord either by word of mouth or recommendation.

Now, as someone who evaluates resumes and interviews people, the only Haskell specific thing I care about is making sure the candidate knows how to use the core of the language, which is basically Haskell2010 + some indispensable extensions. I expect fancier stuff to require training, and to be honest it's sometimes better to properly contextualize that stuff for someone instead of having them come in already thinking they know how to use the footguns :^). My company asks candidates to attach or link code samples if they have them. If they don't, we ask them to write a small Reflex [0] app, because we're primarily a Reflex shop.

Now, every shop is going to be different and expect different things from their candidates. That's one reason why getting involved in the community is so useful. If you hear directly from people who employ Haskellers in your area what they want, then you can build your credentials for that. Besides that, you just gotta apply. If you're a strong candidate in another tech stack, you're a strong candidate for a Haskell stack too if you can demonstrate you can use the language. There's currently a remote job posting on r/haskell if you want to give it a shot. I wish you the best of luck :)

[0] [https://reflex-frp.org/](https://reflex-frp.org/)

</comment></comment></comment></comment><comment><USER17> This reminds me of solving physics problems by getting the units right.

Blah blah ...15 meters per second... blah blah ...after 10 minutes... blah blah ...how far... blah blah => aha! I probably want to multiply 15 by (10 × 60).

<comment><USER18> Yes, very much the same flavour! In each case although it doesn't guarantee the right answer it gets you closer.

<comment><USER19> Obligatory: [https://xkcd.com/687](https://xkcd.com/687)

</comment></comment></comment><comment><USER20> Are they suggesting writing code that you can't later understand or debug?

Does this actually work out for Haskellers? I mean, I guess I'll believe you if you tell me it does, Haskell is different enough from the kind of programming I do that I don't think I know anything at all about it.

<comment><USER21> Some of the type-machinery code (hint, it has words like "hoist" or "lift" that describe type operations, not data operations) _is_ like that, and its really not a problem because it does the only thing it can do given the types, and the things it does have nothing to do with your business domain or I/O so its never going to change unless a library you are using changes. When that happens its annoying but you just play type tetris again until the red squiggly lines go away and then you are fine for another few years. It isn't something I'd really brag about though as its really hard to explain the benefits of this stuff to non-Haskellers and you can end up wasting infinite amounts of time polishing these abstractions instead of getting work done.

<comment><USER20> > because it does the only thing it can do given the types

Okay, this may be (probably is) a stupid question, because I know no Haskell whatsoever, but... if there's really only one thing it can do given the types, why does the code have to be there at all? Why can't you just write "Do the only thing you can do given these types"? If it's code humans aren't meant to read anyway, and it really is the _only_ thing that could be done... why can't the compiler just _do_ it without you having to put the non-human-intelligible code in your source files?

<comment><USER22> This is an interesting question.

Technically there is more than one possible implementation, but you would also have to go out of your way to get it wrong. Automatically determining what constitutes "going out of your way" so that the code can be generated automatically is an active area of research (program synthesis), but as this post already shows, for "simple" cases, we're getting pretty close.

As the post mentions, there are certain dead giveaways of an incorrect implementation, such as unused variables. Conversely one may still have some rough idea of the desired code to guide the implementation. The point is not about entirely removing one's mind from the process, but to allow oneself to only think about the choices that matter, which are few.

Alternatively, another way to look at the problem is that these types, while already being quite precise, are still not as precise as they could be, because the type system is not sufficiently expressive. And even with the ability to describe the desired properties to uniquely determine the implementation:

\- it may not be obvious that the implementation is in fact uniquely determined;

\- a solution, unique or not, may not be easy to find automatically. Program synthesis is essentially the same problem as proof search (c.f. Curry-Howard correspondence); knowing that there is a proof of Fermat's last theorem is not sufficient to construct an actual proof of it from scratch.

For these reasons, it may still be desirable to nail down the implementation explicitly even if it is hard to read.

It's also worth considering the fact that polysemy (the package that the controversial snippet at the beginning of the post comes from) is very much an implementation of a state-of-the-art effect system using state-of-the-art features of Haskell's type system, so it can be expected that the abstractions to make this code more digestible (for the right audience) are still missing, because no one has ever thought of how to express them yet.

</comment></comment></comment></comment><comment><USER23> This piqued my interest, because that's the same way TDD works for me.

And then it starts with "Let's go through an example together. Consider the random type signature that I just made up:"

Hmm...I _never_ have a type signature as a starting point, random or not. I have some sort of requirement, some sort of _functionality_ I want out of the code. Soft fuzzy requirements.

And the types rarely if ever tell me what the function _does_. Heck, a function that's _int x int - > int_ could be just about _anything_. How about _string - > int_? Does it convert the string to an integer or count the vowels?

<comment><USER24> > Heck, a function that's int x int -> int could be just about anything. How > about string -> int?

That's because using types like "int" and "string" is not a real, valid use of a good type system. Instead, you'd typically have a function type of `newton -> sqMeter -> pascal`, or `username -> accessLevel`. All these types would be implemented through basic int and string types, but declaring them explicitly with very limited conversions inbetween would actually use type system to verify correctness of your code.

<comment><USER23> So you're going to not have arithmetic or string manipulation?

<comment><USER25> Not really. I may have vector length manipulation and address formatting though. But vector lengths are not integers (or natural for that matter) and an address is certainly not a string. Perhaps you could use these _primitives_ to represent these things but we should not confuse representation with equality.

<comment><USER26> Yes so much.

An integer can represent all sorts of things, so forever programmers have been using integers to represent all sorts of things.

If instead of "int age, int size, int color" you have "age_t age, size_t size, color_t color", and a type system that helps keep these apart, so much confusion can be avoided...

</comment></comment></comment></comment></comment><comment><USER27> I really wanted to get into the promise-land of Haskell, and tried hard to, but my enthusiasm went south when I found out I can hit bugs with lazy-IO that the compiler wouldn't warn me about.

<comment><USER28> Lazy Io was an unfortunate historic accident, one which is preached much against in the Haskell community. Alternative standard libraries abound in the ecosystem that remove this accident.

</comment></comment><comment><USER29> I've never read a code base where I thought the type system was doing a good job of being a DSL for describing business requirements

Types are great imo for checking against primitives because the semantics of int string array etc are strong but most languages are encouraging wrapping up primitives in some user defined wrapper then the semantics of the wrapper are implicit, brittle and known only to the author

The semantics of your Bob class is more likely to change as it's used over many different contexts than the int type is, if the int type is being swapped out it's usually because the wrong data is being used, which is what we are using types to protect against, it's not usually because there's a problem with what int is

<comment><USER22> > I've never read a code base where I thought the type system was doing a good > job of being a DSL for describing business requirements

Would refinement types help in that respect? For example, the F* language. [https://www.fstar-lang.org/](https://www.fstar-lang.org/)

I don't have any experience with "business" code, but my naive understanding is that application-level code is typically very monomorphic which is exactly where refinement types are useful, whereas the OP leverages polymorphism to a large extent (not necessarily), and that works well for general-purpose libraries which don't and must not care about their users' data.

</comment></comment><comment> dan-robertson I read the argument in the article as something like "strong advanced type systems like Haskell's are good because instead of manually writing hard functions, one can just write the type (ie the meaning of the function) and do a bunch of menial compiler-directed work to build up one's function in little steps. This is great because one doesn't need to "actually" write such horrible functions.

I find it slightly silly because one still has to read such functions so it is still hard to know that they do the right thing. For example, consider the function in the article which has type:

         Sem (State s ': r) a
      -> S.StateT s (Sem r) a

It seems pretty obvious what this morally should do.

In some cases it is possible for polymorphism to force a value of a certain type to always behave a certain way. E.g. a value of type [a] must be the empty list because that is the only value with that type. On the other hand there are multiple values of type [[a]] (I.e. an empty list or an infinite list of empty lists or anything in between). A more complicated example is that the only thing a function with the signature of compose ((b -> c) -> (a -> b) -> (a -> c)) can do is compose functions whereas a function of type (Int-> Int) -> (Int-> Int) -> (Int -> Int) can do just about anything. Outside of abstract Haskell libraries, code tends to look more like the second case than the first.

In this case it is hard to be sure that the function must behave in the correct way because of its type. I think it hinges on whether it is possible for Put to change the type of the state. If it can then types force you to always take the newly put value and return it with Get, otherwise it would be possible for Put to eg only sometimes work. So if one has to check that the code is correct, one must either read very carefully and check the code, or one must very carefully read the type signature and deduce that the code is correct.

In the first case the fact that the compiler made the code easy to write doesn't really help much. Perl5 taught us that just because a program was easy to write it does not mean it will be easy to read/check.

In the second case, why do we have a program at all? If there is only one correct program we could have written then it seems to me that the program is in fact the type and the compiler ought to have been more clever and written it itself. (There are of course plenty of issues with that statement).

It seems to me that claiming "Haskell is great because it helps automatically write difficult functions which are impossible to check" or "Haskell is great because it makes me do the manual steps in writing a function that can only ever do one thing and mixes that pointless code in with the thing I care about" is a bit silly.

This all being said, I do think holes are a useful feature but I don't think they are useful for entirely writing a function for you. They are particularly useful in proof assistants like Agda where one must manually exhibit a million trivial propositions and holes help fill in all the boring gaps. Agda doesn't really suffer from the "multiple things a type could mean" issue.

<comment><USER22> > In this case it is hard to be sure that the function must behave in the > correct way because of its type.

I would argue that in this case it is quite easy to ensure that it does the right thing, because even if the implementation is not unique, the number of possibilities is extremely limited. In the case of `Put` you can return either the new state or the old one. It takes a single unit test to ensure it's putting the new one, with parametricity to generalize from one case to all cases, still without looking at the implementation.

> In the second case, why do we have a program at all? If there is only one > correct program we could have written then it seems to me that the program > is in fact the type and the compiler ought to have been more clever and > written it itself. (There are of course plenty of issues with that > statement).

Program synthesis being basically proof search, even after the right automation is developed it may still be more practical to write the program by hand.

> They are particularly useful in proof assistants like Agda where one must > manually exhibit a million trivial propositions and holes help fill in all > the boring gaps.

I think the same mechanisms and benefits are at play here in a non- dependently-typed setting, even considering "entirely writing a function for you" as an unwarranted exaggeration.

</comment></comment><comment><USER30> I would really love to see an IDE that auto suggests / autocompletes code based on typed holes like this.

Does such a thing exist?

<comment><USER31> Holes in Agda are a good bit more powerful than in Haskell, and agda's emacs mode has a bunch of very powerful commands for working with them, eg: listing possible values, automatically filling, splitting them by case, etc.

For example, for this post's "jonk" example I just had to copy the type into emacs, reformat it a bit into Agda syntax, then press C-c C-a and it automatically figured out the solution that the author worked through manually: λ z z₁ z₂ → z₁ (λ z₃ → z₂ (z z₃))

See the full list of commands at [https://agda.readthedocs.io/en/v2.5.2/tools/emacs- mode.html](https://agda.readthedocs.io/en/v2.5.2/tools/emacs-mode.html)

</comment></comment><comment><USER32> > Once you really understand the typesystem, most of the time, types really > are the best documentation --- they often tell you exactly what the function > does, in a way that English comments never will.

Snake Oil.

Apply this claim to any set of real world functions, however well designed they are.

This is classic Haskellism. Obsessed with the lattice of types in the room. Door closed. Real world outside.

<comment><USER2> Not completely. Types are documentation. When going from JS -> TS you suddenly have the ability to create types that allow you to easily discover what is in an object. You can now confidently say foo.bar.replace(...) and know it'll work at runtime.

Otherwise you hope that someone has written in a doc somewhere that bar is a string. And judging by npm docs I've seen - that is very unlikely. So you debug at runtime, head over to the github repo, or do an console.log(typeof(... hmm!

<comment><USER33> My biggest problem with this claim is typescript doesn't include any support for runtime type checking.

My experience with TS has been great until I need to deal with data that comes from an external system (API, client, database). Then I either have to cast the type (which can lead to bugs where compile and run time types don't match and IMO isn't an option server-side) or I have to effectively duplicate my types by writing type guard functions.

<comment><USER34> Speaking of TS, here is a good argument for static typing:

>Change a front-end React prop, then follow static type errors through the statically typed API, into the backend, all the way down into the database where they force a change in the Postgres schema. The system won't even compile unless React can talk all the way down to Postgres.

[https://twitter.com/garybernhardt/status/1140695491685933060](https://twitter.com/garybernhardt/status/1140695491685933060)

<comment><USER32> You've just described hell.

<comment><USER32> Okay, let me be more specific. I've built complex React apps full-stack down to Postgres and maintained them over ever-evolving/increasing product requirements. To schedule. With a tiny team, part-time dedicated. And little maintenance/defects/outages in between feature pushes.

The success here lied in using various tools, applied _pragmatically_ at each step according to the given context. Probably the most important tool is defensive coding and building up a system from decoupled, almost visibly- correct components. Then some nice technical tools thrown in: dynamic development with hot loading, some modest storybooking of components, a repl, good backend libraries, conscious and measured unit testing, strong build/deploy/release tools.

The ability to turn on a dime and incrementally refactor things was paramount to the success and efficiency of this development.

Then someone says we need to use strong static typing. All the way. No judicious application of this tool, we'll use it everywhere. We'll make everything cohere to the type system. This is no pragmatic choice. This is religion. You know its religion because its an ideology that pervades the whole system. There is no judicious application. The extreme tax of contending with types _as your system evolves_ is high. I've only ever seen strong typing enthusiasts deny this truth. Will one enthusiast be honest here? You can literally stand over a strong typing enthusiasts shoulder as they spend an hour running all over their system adjusting their types for one minor change in business requirements and they'll still say, "No, no, types don't cost anything..."

<comment><USER34> You sound smart, but I don't want to have to be that smart when I'm refactoring code. I want the compiler to do as much thinking for me as possible. I want to be able to change it in one place and have type errors to remind me of any other places in the codebase I forgot to change.

Static analysis doesn't solve all your problems, but it solves enough of them to be a very useful technique.

<comment><USER32> Static typing cannot ensure about their code what the coder can and should ensure about their code.

And often -- very often -- especially in strongly typed languages -- the static checker will reject code that is _otherwise_ valid. First point.

Second point: Statically typed PLs (especially strongly typed ones) enforce the verifications _across the code_ , with no (at least non-ridiculous) way for the coder to be judicious about things.

Third point: statically typed languages have weaker runtime features/abilities: polymorphism, homoiconicity, true REPL (ie true read->eval), etc.

All of these points add up to MORE cognitive complexity for the coder who is trying to develop non-trivial business applications -- not less cognitive complexity.

It's not being smart. It's learning. Once you learn algebra, say, many classes of problems _without algebra_ would be too much cognitive complexity.

Type systems are focused on one thing: type coherence. But the real world demands runtime dynamics are what the customer is paying for; being as close to that need as possible IS lower cognitive impedance.

<comment><USER34> "enforce the verifications across the code" is the point.

I've worked with a ton of Python code that looks like this:

        def foo(bar):
            # do stuff
            return baz(bar)

What does `foo()` return? I have to go read the body (or docstring if I'm lucky) of `baz()` to know that. And `baz()` might be another level of indirection to `quux()`. If I change what `baz()` returns, now I need to grep my codebase for all call sites of `baz()` and verify that the new return type is acceptable at each of them, and make changes if not. This is super time- consuming and error-prone, especially when a compiler (especially with an IDE refactoring tool) could do take care of it for me in seconds. It's easier if I have a good test suite, but that means I'm just implementing static type checking with runtime tests, which is more code that I have to maintain.

<comment><USER32> You're looking at this Python code and blaming its deficiencies on lack of types. It's deficiencies are not lack of types, but lack of separation of stable vs volatile code, lack of contract specification and documentation, lack of refactoring and versioning idioms (see [https://www.youtube.com/watch?v=oyLBGkS5ICk](https://www.youtube.com/watch?v=oyLBGkS5ICk)).

Why does the blame always go to lack of types?

Whether or not you have types you're still going to suffer if you don't have the other things I mention. And if you have the other things I mention then static typing become much more of a nuisance. Ergo...</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment>


Books Are Getting Longer - <AUTHOR> http://www.theguardian.com/books/2015/dec/10/are-books-getting-longer-survey-marlon-james-hanya-yanagihara <comment><USER2> And of course the real title is "The big question: are books getting longer?".

Re: article, it's disheartening that good books suffer from this as well. I've recently read "The power of habit" and "Think fast and slow". Both are great, but both would be much better at the half of their size.

For most non-fiction content the magazine article is too short (3-8 pages) and only skims over the issue. It's evident when you read an article on something you're very familiar with. However book is too long (300 pages) and introduces filler and repetitions. I find that Special Reports from The Economist are quite good in size and depth (15-30 pages). My ideal would be around 100 pages, but those reports are still my go-to place if I want to read something.

<comment><USER3> > And of course the real title is "The big question: are books getting > longer?".

But the body of the article contains nothing to the contrary, so it seems the submitter's edit was in keeping with the guidelines (i.e. change the title if it is misleading).

<comment><USER2> You misunderstood me. I was not criticising the submitter, kudos for the change. I was criticising the clickbaity title of the article.

<comment><USER3> Ah, I see. Agreed!

</comment></comment></comment></comment><comment><USER4> >citing studies showing that only 60% of books bought electronically are ever begun, and completion rates that can fall as low as 20% for some titles.

Well, how about the completion rates of physical books? I am sure most people would rather read smaller, to the point books if they could. Moreover, there are also social brownie points associated with buying thick books. If everyone is talking about it, buying that popular book in physical form will increase the aesthetic look of my "home library" and then when people come over, I can show off how well read I am.

Also the top comment on the article page importantly notes:

"AAARRRGGGGHHH!!!

Count the words, not the pages!!!! Some simple typesetting changes can increase or decrease a books page count significantly.

A bigger book may look more intimidating, but it may also look like better value for money, and if production/material costs have gone down over the last 15 years, I wouldn't be at all surprised if a publisher bumps up the paragraph spacing and brings in the page margins to make a book appear longer than it is."

<comment><USER5> Isn't this a bit skewed though? I've not read maybe half the books in my library, but that's simply because either I bought something like a humble bundle where I was only really interested in 2-3 of them anyway, or because I bought whole series at discounted price and stopped after first two books.

Kind of similar to Steam games - 37% of games were never played. If I can get a set of Witcher 1,2,3 for the price of one + $1, then I'm definitely getting all of them, even if I'm really interested in the third one only right now.

</comment></comment><comment><USER6> Aaron Swartz had some interesting things to say about the length of most non- fiction:

[http://www.aaronsw.com/weblog/001229](http://www.aaronsw.com/weblog/001229)

<comment><USER7> Came to say something along these lines. Often books say very little in as many words as possible. Part of a 'more stuff for your money' philosophy.

Textbooks have this problem as well until you hit graduate subjects.

<comment><USER8> A lot of the best graduate textbooks are pdfs of lecture notes. 40 pages, no nonsense.

</comment></comment></comment><comment><USER9> I'm pretty sure that I would have put Anathem away if I had it in paper. Unfortunately it wasn't and I was trapped in a good example of an horribly overstretched big book.

Sometimes there is a good idea hidden in those kind of books but most of the times it's just a cheap shallow story you've read before in a different setting. I consider it a sign that the author either was forced to write a sequel/prequel or that he's just a bad writer. Most of the times, I don't touch those authors works again.

<comment><USER10> I enjoyed all of Anathem and would have happily read another 500 pages of it. Not sure if Stephenson is the best example, his long book style is quite unique. Usually it works for me (Anathem, Cryptonomicon, I've read both at least twice) other times it doesn't (The baroque series I haven't finished). Snow crash and Zodiac are examples of him writing shorter good books too.

<comment><USER9> Yes, I fell for a urgent recommendation by a person like you ;)

I have no idea how you can cope with all that utter irrelevance in this. While reading I started thinking that Stephenson tried to create a "moment" by overstreching. A scenery. Something you see in those slow artistic movies for example. But then there is another problem. Stephenson is unable to describe the environment in which the scene plays. Instead he concentrates on completely irrelevant details in the current area. A good example for this was when the protagonist traveled a region where former cities were. It looked like that: "...traveling along those dead cities we've learned to distinguish the time period in which the cities have been build...". But he describes not a single one. You end up having absolutely no picture of the environment. He tells you that there are launch pads and anti-missile turrets but not how they look. Instead he drags you through several sentences regarding the steel rubble they get from the cities. Spoiler: it's rusty. Same poor writing goes for character development (main character is supposed to be clever according to the context but is plainly stupid and really slow...), basic aspects like the love story or the weird way he describes women.

I don't know. Maybe I'm just too demanding but I currently read through some of Alestair Raynolds works and it makes Stephenson look like a rich school boy whos private teacher was afraid to mark the basic mistakes for him.

I've read Snow Crash many years ago. When Neuromancer and the art of those times was still in my head. Fortunately because it was exactly the same thing. Please read Snow Crash again and try to focus on the world he un-describes. I had the feeling like Stephenson took it for granted that you've already read Gibson or Sterling and knew how the world is supposed too look like so he can concentrate on world details that are completely irrelevant for the story and make no sense without describing the place they stand in.

You see...I fell twice for Stephenson which was a mistake on my side so I'm pretty angry on myself and try do divert the fault to him...

<comment><USER10> I agree for what it's worth.

If you read Stephenson for character or environment description, or even a coherent story, you will have a bad time. If you want to read about strange ideas from a guy who spent way too much time thinking about submarine cables, you may have a good time, if that's your thing and you like the topic he is currently interested in. I am (usually) in the latter category.

Reynolds is a different guy. Better story teller, more conventional ideas to me. (I like and have read about all his books too).

If you like Reynolds, try Peter Hamiltons series, especially the Nights Dawn trilogy.

<comment><USER9> Aaah thanks for bringing Hamilton up. I've read "The Reality Dysfunction" a long time ago. Found it in a Hotel on the Maldives and forgot about it. I didn't know there was more.

</comment></comment></comment></comment></comment><comment><USER11> I wonder if this is true of self-published, ebook-first writers. In conversations with agents about my novels, I was told that they needed to be "longer" and that ~70K words wasn't enough or wasn't sufficiently "commercial." But in my view the novels were the appropriate length to the material (see [http://jakeseliger.com/my-novels/](http://jakeseliger.com/my- novels/) if you're curious). With ebooks, I don't think readers are subconsciously swayed by length as they are by physical books in bookstores.

Indie authors also often point out that they're better off splitting one massive tome into multiple parts. A novel like Neal Stephenson's _Seveneves_ might've been split into three to five parts, with the first one given away and each additional part $.99 – $2.99 in its ebook edition.

EDIT: Also, I'm not opposed to being commercial, and indeed if I could think of more / better ways to be more "commercial" I'd do it!

<comment><USER12> Counter; installments (if you're a well known author) might mean you make less money, b/c people drop off after the first part & never buy the rest. Whereas before, even if they got bored & didn't finish it, they'd already paid in full.

(Installments aside, Seveneves needed heavy editing. Great plot, but probably about 1/3 cruft. I get it; you studied orbital mechanics & it's cool, but the 100th detailed explanation of orbital transfer is too much)

<comment><USER13> More orbital mechanics? There was a fair amount of that in _Anathem_ as well. Sure the author is supposed to show-us-not-tell-us that characters are smart, but this handwaved now-they-work-a-physics-problem trope only gets about halfway there.

<comment><USER14> Hah. I actually just had this conversation earlier today with a friend (who I know is interested in this stuff): Me: Have you read Anathem? A decent chunk of the book and the plot is all about orbital mechanics. Him: No, but have you read Seveneves? There's a ton of orbital mechanics in that book. Me: Huh. Well I guess we found his pet subject.

(Btw, I didn't really mind the orbital stuff in Anathem, but I found the repetitive explanations of the many-worlds idea, adding just one tiny new tidbit each time, a little annoying by the end.)

<comment><USER13> Many-worlds usually annoys me on the grounds of parsimony, but the Socratic dialog on the mountain worked well enough for me to tie the whole book together. (I can remember the broad strokes seven years after reading it, for one thing.) The role of many-worlds was a surprise, but a reasonable one. I didn't feel there was any authorial cheating.

<comment><USER14> [If anyone else is reading this: warning, spoilers!]

It would have been more satisfying to me if the dialog on the mountain was actually important in the context of the story at all. It was enlightening to the reader, but when Erasmus got to the convox and started talking with people, it turned out that many of them already had basically the same ideas, so he didn't really contribute anything.

Actually, it's hard to think of a point where any idea or action of Erasmus actually changed the outcome of something. He was at the center of everything, but only as a witness. Although I guess the book kind of hints that perhaps nothing that any character except Jad did had any effect on anything, since Jad rewrote it all...

</comment></comment></comment></comment></comment></comment><comment><USER15> This is strange to me since our attention spans are getting so much shorter.

I read only fiction, slightly less than a book a week. This year I've read books between 75 and 1200 pages and I dont think there is any correlation between length and my enjoyment.

I do notice that for many authors their self-proclaimed 'masterpiece' tends to be their longest book. And in many cases, not their best.

<comment><USER16> I think a lot of people read books with only partial attention; this helps to explain the five-star reviews of books stuffed full of absurdities.

</comment></comment><comment><USER17> True. I've been wondering why mainstream films are getting longer, too. 2-2.5 hours has become the norm.

<comment><USER18> Depending on the exact film/genre I don't have a problem with that.

<comment> guard-of-terra I do. Mainstream movies became a caleidoscope of boring repeating scenes. They often lack any sort of plot.

Compare "Back to the Future" (any one) with whatever new movie in this genre you can remember.

<comment><USER19> It's not exactly the same genre since it's not futuristic, but last year's The Grand Budapest Hotel is also a light-hearted & fanciful adventures film, and it certainly has a plot - besides being a much better film all around than any of the BttF trilogy, in my opinion.

On the other hand, it's also only 100 min. long, so it doesn't exactly fit with trend of longer movies.

</comment></comment></comment></comment><comment><USER20> Probably about half of the novels I read could work just as well as short stories... (especially in science fiction.) It's like Strunk and White said: Omit Needless Words.

</comment><comment><USER21> Sorta related to this topic, I'd suggest giving audiobooks a chance! They're definitely not for everyone, but I've become a huge fan. Every time I need to drive somewhere or I have to clean around the house, I play an audiobook.

They're also great if you lead a sedentary lifestyle (e.g. in front of computer all day). Reading books will probably necessitate more sitting around, but with audiobooks you can be a little bit more active and go out for a jog or walk.

<comment><USER22> +1 audio books

For me, I can digest one much quicker than reading.

I got a few from Audible this year. The content is great, but their one size fits all credit system is archaic. I would love to see a Spotify-like audio book subscription service.

<comment><USER21> I'm subscribed to Audible as well; I generally like it.

The 2 credit per month plan covers my needs pretty well. In some occasions I've had to buy extra credits, but it still ends up being much cheaper than buying individual audiobooks.

It definitely pushes you to strike a balance between longer and shorter books, though. It's kinda crazy that a 4-hour story like The Magic Goes Away and a a 50-hour novel like A Dance with Dragons both end up consuming 1 credit.

</comment></comment></comment><comment><USER23> Unfortunately I can't even read a book cover to cover, only skim through interesting parts.

<comment><USER24> I think this applies to a vast majority of people outside the academic environment (or once they leave that environment). I really wonder why that is.

I've definitely noticed my mind wander once I start reading a book. It seems like we can all benefit from training our attention span.

<comment><USER25> I don't actually view it as a problem -- as long as you can finish GOOD books. (I was reading "breadth first" since before 2000, before my and everyone else's Internet addiction...)

My usual habit is to check out 5 books at a time from the library, and I end up finishing one. The other 4 I skim through. There's simply not that many books that are worth reading in their entirety. Many books have useful nuggets of knowledge, but there is generally a lot of filler.

I have read at least 1000 academic papers in CS and other fields in the last 5 years. And by read I mean mostly skimmed. A good paper will get 3 or 4 re- readings; most papers remain skimmed until something else reminds me of them (a paper or a problem in real life). I think that is the norm.

I do find that paper is better for comprehension. I get my books from the library and I print out PDFs of publications.

tl;dr The goal is comprehension, not "finishing books"

<comment><USER26> Mostly agree with this, but I don't think one should expect there to be a perfect correlation between enjoyment/engagement and worthwhile-ness. Most book and most articles are garbage, but there really are a few that are both painful and worthwhile.

Now if only we could convince the rest of the world to make abstracts the norm for books, internet articles, and the like...

<comment><USER23> Abstracts of everything, to just get the facts. Yes please!

</comment></comment></comment></comment></comment><comment><USER27> With some books on history i noticed that the author has reworked his PhD thesis into a book - now that's a long bummer by definition, If that is the case then that makes the book quite long to start with - (i think that's the right thing to do BTW).

One example:

The PhD thesis: "Political Protest and Dissent in the Khrushchev Era" by Robert Hornsby" (342 pages)

the book would be "Protest, Reform and Repression in Khrushchev's Soviet Union" by Robert Hornsby (324 pages)

</comment><comment><USER28> > completion rates that can fall as low as 20% for some titles.

I have so many books to read, that I don't bother finishing a book unless it's really good. The "some titles" are probably simply poor books.

Also, the number of pages isn't necessarily a good indicator of size. The typography can greatly influence the number of words on a page, and the typography can and does vary widely.

</comment><comment><USER7> Is there anywhere that extremely well thought out and detailed short stories could thrive? I want to find those.

I've read plenty of long books in my lifetime.

</comment><comment><USER29> Kind of off topic but it always bugs me when I see people using 'average' as a metric. Average is awful, it is a lossy metric that doesn't capture distribution. What if there are only very big books (600+ pages) and very small books (100 pages), we can end up with an average of 325 pages which is actually not any book.

</comment><comment><USER30> Difficult to assess objectively, but I wonder if the quality has degraded accordingly (eg. due amateur self-publishing)? In my experience, being more concise so as to produce better writing is difficult and time intensive -- a la the famous Blaise Pascal quote:

> I would have written a shorter letter, but I did not have the time.

</comment><comment><USER31> From the title I was expecting a line chart of average book length over time.

Is there an API to get book metadata for all books?

</comment><comment><USER32> For short bs we now have the internet.

</comment><comment><USER33> nah, fonts are getting larger and whitespace is ballooning :)

just kidding, I wouldn't know for sure, but this article should have graphs of wordcounts or something.

</comment><comment><USER34> I like really long non-fiction series. A 100,000 words is just a starting point. But to get there, it has to keep my interest for that long.

<comment><USER35> Worm Web Serial is pretty good. A couple of 'down' spots but I devoured it in a couple weeks.

"It totals roughly 1,680,000 words"

[https://parahumans.wordpress.com/](https://parahumans.wordpress.com/)</comment></comment>


Rare Star Trek: The Next Generation Pictures - <AUTHOR> http://slightlywarped.com/crapfactory/curiosities/2010/rare_star_trek_the_next_generation_pictures.htm

<comment><USER2> It must have been ridiculously awesome to be Wil Wheaton.

Case in point:

[http://slightlywarped.com/crapfactory/curiosities/2010/image...](http://slightlywarped.com/crapfactory/curiosities/2010/images/rare_s29.gif)

<comment><USER3> His blog is a great read: <http://wilwheaton.typepad.com/>

Over the years he's written eloquently on the ups and downs of his life.

<comment><USER4> He was pretty funny on The Big Bang Theory

</comment></comment></comment><comment><USER5> The fact that this made it to the front page not only confirms the stereotypes that I'm representative, but made me giddy to be surrounded by so many other nerds. How many of you had Star Trek: TNG action figures? :)

</comment><comment><USER6> [http://slightlywarped.com/crapfactory/curiosities/2010/image...](http://slightlywarped.com/crapfactory/curiosities/2010/images/rare_s110.jpg)

Back before there was a (color) Photoshop, before anyone even had the Impact font with which to caption.

</comment><comment><USER7> some of those almost brought me to tears. brent spiner with stephen hawking, brent spiner with what looks to be an insanely large cigar. the various directorial shots of jonathan frakes. oh man. thanks for these

</comment><comment><USER8> I won a call-into-the-radio contest when I was eight years old for being able to name Levar Burton as Lieutenant Commander Geordi La Forge. My mom didn't believe me when I told her I won. I think the prize ended up being a Weird Al cassette and some temporary tattoos.

<comment><USER9> Weird Al and ST:TNG. Defining media for the 90's teenage nerd :)

</comment></comment><comment><USER10> I don't want to seem like the huge geek that I am, but seeing these pictures makes me feel like I'm seeing a childhood friend who I haven't seen in years.

Now if you'll excuse me, I have to go buy the entire series on DVD....

</comment><comment><USER11> Thanks for the memories. I feel old after looking at the pictures and remembering I used to collect StarTrek TNG card. Good memories.

<comment><USER11> Why was I voted down? I wasn't being rude or sarcastic.

I'm not bothered by the vote, just curious what caused the person to do it.

<comment><USER12> Don't worry about it. Someone went through and downvoted half of the comments on this thread. Possibly just a TNG hater.

</comment></comment></comment><comment><USER13> Star Trek TNG is the best Star Trek ever.

</comment><comment><USER14> Does anyone know who the lady + episode on this photo is?

[http://slightlywarped.com/crapfactory/curiosities/2010/image...](http://slightlywarped.com/crapfactory/curiosities/2010/images/rare_s107.jpg)

So familiar, but I just can't recall it..

</comment><comment><USER15> I suppose Hacker News is the only place where people might relate to this comment: Did anyone else look at the first picture and wonder why Mendel Rosenblum was on the set of Star Trek?

</comment><comment><USER16> Star Trek pictures? Really HN?

Reddit might be a better place to post this: <http://www.reddit.com/r/scifi>

</comment><comment><USER17> Whoa, looks like Data's testing the iPhone 4 in this one.

[http://slightlywarped.com/crapfactory/curiosities/2010/image...](http://slightlywarped.com/crapfactory/curiosities/2010/images/rare_s116.jpg)</comment>


Ask HN: Which one is your favourite book? - <AUTHOR> Hello,<p>I would like to know about your favorite book belonging to any genre. I have just developed my reading habit. I want to read more books which will increase my knowledge. I like biographies as well. Right now I am reading losing my virginity by Richard Branson. <comment><USER2> _The Player of Games_ by Iain M. Banks, because it was my introduction to the Culture Novels as a whole. I have yet to find another world with such personality and richness, a close second would be _Surface Detail_ of the same series, mainly because it hosts one of my favorite fictional characters of all time. Not everyone likes Banks' writing style, I personally love it, and his humor too, which is why I also purchased his collection of poems published with Ken McLeod's.

</comment><comment><USER3> The book of the new sun - Gene Wolfe.

</comment><comment><USER4> \- Memoirs of Jacques Casanova \- 1984 \- Catcher in the Rye \- Autobiography of Benvenuto Cillini \- Catch-22 \- CS Lewis' Space Trilogy

</comment><comment><USER5> \- The Extended Organism, J. Scott Turner

</comment><comment><USER6> Power of now by Eckhart Tolle

</comment><comment><USER7> My reading habits are kind of eclectic. A favorite book I love to reread is Werner Herzog's A Guide for the Perplexed.

some random excerpts to get a feel.

\-- "For a while I have contemplated writing a book about battles that never took place because the armies missed each other."

\-- "They have a beautiful expression in Peru: 'Perseverance is where the gods dwell.'"

\-- "In 1964 we all went to a [Rolling Stones] concert in Pittsburgh. When it had finished, I noticed that rows of plastic seats were steaming: many of the teenage girls had peed themselves. That's when I knew this was something big."

\---- "When you find one midget you find several."

\-- "Joseph Plateau was a Belgian physicist, the first person to study the principle of persistence of vision. the afterglow of light on the retina, which is the fundamental principle of moving images in cinema. I consider Plateau to be one of the most significant explorers who ever lived. His tests rendered him blind because he stared directly into the sun for too long. He's a hero; the man sacrificed his eyes for cinema. Was it worth it? Perhaps, because he helped give meaning to our existence. There is nothing wrong with perishing in the travails and tribulations of life."

\-- "There is a beautiful saying: 'The best description of hunger is a description of bread.'"

\-- "I explained to him I would a pay him well, more than what he would earn in ten years sitting [at the square] and playing [pan flute] for people. At first he refused, saying that if he were to stop playing in the square, everyone in Cusco would die."

\--"My first choice for the role [in Aguirre] was actually Algerian president Houari Boumediene."

\--"Chickens in some forms--roasted for example--are perfectly acceptable to me, but look into their eyes while they are alive and bear witness to genuine, bottomless stupidity."

\--"No one thought of himself as an artist until maybe the late fifteenth century. Before that they were master craftsmen with apprentices who produced work on commission for popes. Once, after snow had fallen in Florence, a particular idiotic member of the Medici family asked Michelangelo to build a snowman in the courtyard of the family villa. He had no qualms about stepping outside, without a word, and completing this task. I like this attitude of absolute defiance."

\-- "Be wary of praise offered on someone else's terms."

\-- "I would never trust a man who has had multiple helmets by the age of five."

\-- "No one wants to interfere with a man in the middle of a fight. Philippe pointed out that the opposite also works, that people won't bother you when you're laughing your heart out."

\-- "When people take not of how far you have come on foot, they tell you stories they have bottle up for years."

\-- "A carpenter doesn't sit on his shavings."

\-- "What would an ocean be without a monster lurking in the dark? Like sleep without dreams."

\-- "In the film he talks about 'living your dash', the dash between the dates on your gravestone, everything from the time you're born to the moment of your death."

\-- "There is work to be done and we will do it well. Outside we will look like gangsters. On the inside we will where the gowns of priests"</comment>


Health provider wants algorithm that can predict illness - <AUTHOR> http://www.networkworld.com/news/2011/032911-heritage-provider-algorithm.html

<comment><USER2> This end product is worth a lot more than $3M...</comment>


Drawille: Pixel graphics in terminal with Unicode braille characters - <AUTHOR> https://github.com/asciimoo/drawille <comment><USER2> Did anyone even stop to appreciate the irony of using a thing created for blind people to make something that will only ever be useful to people with sight, if at all?

<comment><USER3> Why couldn't the blind appreciate this software?

<comment><USER4> Because blind people can't see animations made with dots even if those dots were originally meant for the blinds.

Even if you were to print those on a braille display, it would be meaningless letters over and over.

<comment><USER3> I reject this idea that a blind person is too stupid to recognize that the dots aren't representing letters when they use this software, and instead appricate it as a kind of art.

<comment><USER4> The braille displays you typically encounter will only display one line of braille at a time.

You are telling me that a blind person will be able to remember the entire line of gibberish as the geometric shape gets "printed" line by line and then remember those at 30 frames per seconds?

Come on, it's not about being too stupid to understand. It's about this technology having nothing at all to do with the blind except for hijacking useful Unicode characters.

</comment></comment></comment></comment></comment><comment><USER5> On a similar note, I wrote a library for drawing (24-bit) color raster graphics in the terminal if anyone's interested:

[https://github.com/fenwick67/term-px](https://github.com/fenwick67/term-px)

Demo / image utility here:

[https://fenwick.pizza/term-px/](https://fenwick.pizza/term-px/)

<comment><USER6> i wrote something very similar, but in c++

[https://github.com/gciruelos/seurat](https://github.com/gciruelos/seurat)

</comment></comment><comment><USER7> I can't wait until people rediscover Sixels and get actual graphics in the terminal in a network-transparent fashion. Modern terminal emulators support it, it just isn't widely known.

<comment><USER8> Really, is Sixels support that common now? Do you have a supported Linux terminal that you recommend for it?

<comment><USER7> xterm supports Sixels, and I'd be surprised if it were the only one.

And this library enables things like video and X11 using Sixel, plus it has a list of terminals which support Sixels in the README: [https://github.com/saitoha/libsixel](https://github.com/saitoha/libsixel)

</comment></comment></comment><comment><USER9> I guess Tektronix graphics isn't supported by anything anymore? [http://physics.oregonstate.edu/~landaur/nacphy/coping- with-u...](http://physics.oregonstate.edu/~landaur/nacphy/coping-with- unix/node140.html)

<comment><USER10> MacTerm implements TEK 4014 and 4105 graphics (MacTerm is my project). Support for TEK graphics does seem rare though; aside from "xterm" and "gnuplot", I can't think of anything else that uses those commands.

Drawille works in MacTerm too; I ran some of the example programs just now. Neat, especially the rotating cube. :)

</comment></comment><comment><USER11> [https://news.ycombinator.com/item?id=15549366](https://news.ycombinator.com/item?id=15549366)

</comment><comment><USER12> Quite reminiscent of the Teletext 'alpha mosaic' characters, which were 2x3 block graphics characters.

It could be used to make pages like e.g. [https://al.robotfuzz.com/~al/teletext/c4/1995-08-26-0046.0/4...](https://al.robotfuzz.com/~al/teletext/c4/1995-08-26-0046.0/496.html)

<comment><USER13> Any program that can output this?

<comment><USER12> Any BBC Micro emulator would do the trick.

</comment></comment></comment><comment><USER14> My previous attempt at a pithy complaint pointing out the license of this project was flagged, so I will attempt to provide a bit more value:

This is a great idea and would be nice even just as an art project but unfortunately I can't do much personally useful with it.

The choice is 100% up to the author and I respect how they avoid losing control of their IP. It is interesting to see the uptake and I wonder how many project using this tool are in violation of the license.

[https://www.gnu.org/licenses/why-not- lgpl.html](https://www.gnu.org/licenses/why-not-lgpl.html)

</comment><comment><USER15> This is a really neat looking project (and the GH readme references the original HN discussion). For folks who are generally into TTY UIs and dashboards, I also want to point out the Blessed terminal rendering lib and its ecosystem (which even includes a React bridge!):

      - https://github.com/chjj/blessed
      - https://github.com/yaronn/blessed-contrib
      - https://github.com/Yomguithereal/react-blessed

(edited for syntax and also to clarify I am not affiliated with the above, just a fan)

</comment><comment><USER16> I think the block characters are easier to read, but with a 4x4 grid the resolution is lower: [https://en.wikipedia.org/wiki/Block_Elements](https://en.wikipedia.org/wiki/Block_Elements)

The resulting pixel resolution is a bit screwy, especially if you use a tall, thin font like the one I tend to. Too many pixels horizontally, too few vertically. The upper block/lower block characters might be better in terms of aspect ratio, but then the overall resolution is made even worse...

The 2x3 Braille grid makes a lot more sense.

<comment><USER17> There are also 'sixels' (essentially 6x1), but terminal support is… not great. [https://en.wikipedia.org/wiki/Sixel](https://en.wikipedia.org/wiki/Sixel)

Some cool images: [https://github.com/saitoha/libsixel](https://github.com/saitoha/libsixel) & [https://github.com/saitoha/PySixel](https://github.com/saitoha/PySixel)

<comment><USER18> This is fantastic!! This should be supported in every terminal. What a dream.

</comment></comment></comment><comment><USER19> The rotating cube is especially cute. I challenge anyone to now write a clone on the classic game Elite with this.

</comment><comment><USER20> Awesome!

I wonder if unicode characters could be used on top of libcaca for an even more accurate rendering.

<comment><USER21> I've dreamed about doing an automated "ASCII"-art converter that utilizes all of Unicode. You could accomplish some pretty crazy line art if you put your mind to it, but the analysis would be super challenging.

Also you'd either need a monospace Unicode font (which I don't imagine has anywhere near 100% glyph support) or incorporate spacing and kerning rules...

<comment><USER20> I would think about feeding rendered unicode characters to train a visual algorithm about which character may match, then "on the go" do a bitmap comparison to select the best one for the given case.

The first part could be something like shapecatcher.com where you select the top N plausible candidates, then on the final part you select the best one for the case at hand. (well at least that's how I would try to implement that first)

Anyway yes, it would be great!!</comment></comment></comment>


Could MP3HD Replace the MP3 Format?   - <AUTHOR> http://www.gearlog.com/2009/03/could_mp3hd_replace_the_mp3_fo.php

<comment><USER2> Seems unlikely. MP3 is overwhelmingly dominant as a lossy codec and the competition among lossless codecs is a lot less interesting because there's no format lock-in, since you can convert losslessly between them.

The only possible advantage I can see of another lossless format is a new DRM scheme, but the consensus against DRM for music seems stronger all the time.</comment>


Things I wish I knew before making a paid extension (2019) - <AUTHOR> https://www.amie-chen.com/blog/making-paid-extension/ <comment><USER2> These are great points. I'd like to add some more to them:

On minified source code, Extensions/Add-Ons are allowed to be deployed with minified source code as long as you provide the unminified versions to Google/Mozilla during review time.

On chrome vs. browser namespaces, a quick 'let chrome = browser;' can help you keep the diffs small between versions. I have yet to find a complete solution to fixing 'forked code' between Google/Mozilla Extensions/Add-Ons.

Also, storage mechanisms between browsers using the same extension code can be completely different. Beware if you're using caches, navigator.storage, and storage.local.

Finally, extensions don't consider themselves secure, depending on the browser. moz-extension:// is not considered secure for cache access, whereas chrome-extension:// is.

There lots of little 'gotchas' like these when developing browser extensions. :)

<comment><USER3> > as long as you provide the unminified versions to Google/Mozilla during > review time.

I'm curious how they could know that the source code is the same

<comment><USER4> Firefox asks you to provide the source and the instructions to get the same build you are submitting to the store.

</comment></comment></comment><comment><USER5> YC W19 Sapling here. We have a freemium browser extension that acts as a grammar checker. Couple thoughts below:

1\. Source code. You are allowed to minify source code. Chrome actually recommends minifying source to improve performance. If you require certain permissions you'll have to submit un-minified source for security review.

2\. Cloud/subscription based models are the way to go if piracy is an issue, but it doesn't make sense for all products. Licensing hasn't been an issue for Sapling fortunately because the "brains" of our app are in the cloud. I know hacker news is very privacy conscious but our language models are too large to run on a user's end machine right now. Spier Pro seems like a useful web- scraping helper. People who can pirate a chrome extension probably can probably run xpath scripts or a free xpath testing extension themselves so if I were Amy I wouldn't worry _too_ much about piracy.

3\. Forked Code. There should be no reason to do it. Firefox and Edge have done a lot of work to support most of the chrome apis. You can handle minor edge cases build time with a variable toggle. Keep the same manifest, even. Browsers are good about ignoring keywords in the manifest they don't recognize. My recommendation is to pretend they are the same platform until you find bugs/issues and hard code around them. Theres a handful but it's very manageable.

[0] [https://blog.chromium.org/2018/10/trustworthy-chrome- extensi...](https://blog.chromium.org/2018/10/trustworthy-chrome-extensions- by-default.html)

[1] [https://stackoverflow.com/questions/37649620/does-chrome- mar...](https://stackoverflow.com/questions/37649620/does-chrome-market- accept-extensions-with-minified-and-or-obfuscated-source- code/56006881#56006881)

[2] [https://developer.mozilla.org/en-US/docs/Mozilla/Add- ons/Web...](https://developer.mozilla.org/en-US/docs/Mozilla/Add- ons/WebExtensions/Chrome_incompatibilities)

<comment><USER6> I've had some extensions that were approved, had no changes, then suddenly disapproved because someone on the chrome team decided to re-review it and didn't understand webpack / minification.

I've been so busy I haven't bothered to go try and "fix" the extensions. These are OSS extensions, nothing paid, so I all the code is available for the reviewer to read by the way.

<comment><USER5> Yea, I've seen some some stories around Chrome review problems, most recently around pushbullet. I think it the review outcome depends a little bit on a mixture of reviewer and the permissions required. The more permissions an extension asks for the longer the review process, and unfortunately some false positive flags do happen now and then.

</comment></comment></comment><comment><USER7> Browser vs chrome point is moot. Both namespaces exists in Firefox and there's a polyfill to bring the browser namespace into chrome if you want to use promises over function callbacks. [https://github.com/mozilla/webextension- polyfill](https://github.com/mozilla/webextension-polyfill)

<comment><USER4> As you said, the namespace is not a problem but some APIs definitely are, for example, in Chrome the notifications has a richer set of options but you need to be careful to not use the ones not supported by Firefox.

<comment><USER8> Is there other examples beyond notifications?

<comment><USER4> I guess there are, sadly I don't have an example at hand, I haven't been working much on extensions lately, sadly, the official docs doesn't state these kind of incompatible APIs.

</comment></comment></comment></comment><comment><USER9> For those curious, Gumroad does offer support for generating license keys which they state "are primarily used for creators selling software."[0] From my own experience implementing this and having used other extensions that also relied on this system, I think it works well for bringing monetization to browser addons/extensions.

EDIT: just wanted to add that you don't need to distribute your extension through Gumroad (though you can). You just make it so that anything behind a paywall requires adding the license key which is generated by Gumroad upon purchase and later verified via their licenses API.

[0]: [https://help.gumroad.com/article/76-license- keys](https://help.gumroad.com/article/76-license-keys)

<comment><USER10> > You just make it so that anything behind a paywall requires adding the > license key which is generated by Gumroad upon purchase and later verified > via their licenses API.

This is what I did. I also had to create a licensing backend to handle cases such as only being able to use your license key on a single account, and for verifying that your license key was still valid (in case you cancelled or got a refund).

</comment></comment><comment><USER11> > Lots of people are interested in using Gumroad for their extension, and here > are my two cents: Gumroad is designed to work best for digital goods such as > ebooks, photoshop brushes, and software that can be downloaded and owned. > However, I'd not recommend it for selling browser extensions because of: 1. > It doesn't make sense to download extensions and manually install them. (The > first version of Spider Pro worked that way, and lots of customers find it > confusing). 2. There's no easy way to distribute post-installation updates.

> However, I'd not recommend it for selling browser extensions because of: 1. > It doesn't make sense to download extensions and manually install them. (The > first version of Spider Pro worked that way, and lots of customers find it > confusing). 2. There's no easy way to distribute post-installation updates.

What's wrong with putting your extension on e.g. the Chrome and/or Firefox web store where purchasing via your own site gives a login that unlocks paid features within your extension? That gets around 1 and 2, plus you gain organic traffic from being in the stores.

This is what I do for [https://www.checkbot.io/](https://www.checkbot.io/), which is on the Chrome Web Store but I use Paddle for payments. This also means purchases aren't tied to the Chrome Web Store.

I went with Paddle over Gumroad as Gumroad seemed less flexible for team based subscriptions. Is anyone doing something like the above with Gumroad? How did it work out?

Also, I haven't used Chrome Web Store payments but I would steer well clear of integrating it. They've been disabling payment functional for various reasons the last few months as if it's not business critical to people: see [https://www.theregister.co.uk/2020/01/27/google_disables_web...](https://www.theregister.co.uk/2020/01/27/google_disables_web_store/) and more recently [https://groups.google.com/a/chromium.org/forum/#!topic/chrom...](https://groups.google.com/a/chromium.org/forum/#!topic/chromium- extensions/r5EKL-McE3A). I wouldn't be surprised if they cancelled Chrome store payments soon.

<comment><USER12> Would you mind giving a few more details about how your setup with Paddle and the extension works?

<comment><USER11> \- When a purchase is complete, Paddle can send a web hook to your own server that stores the subscription data e.g. username, subscription expiration date.

\- In the extension, get the user to log-in via your server, which includes checking the subscription is still valid e.g. log-in can be via email which you can link to the email used to buy the subscription.

\- When the subscription expiration date changes, Paddle will send another web hook to your server to update the subscription data.

More integration info here: [https://paddle.com/docs/reference-using- webhooks/](https://paddle.com/docs/reference-using-webhooks/)

Hope that helps!</comment></comment></comment>


How Keys Work - Explained in one simple GIF - <AUTHOR> http://gizmodo.com/5977794/how-keys-work-explained-in-one-perfect-animated-gif

<comment><USER2> Animated GIFs continue to rub our faces in Apple, Nokia and Microsoft's refusal to support royalty free video on the web.

</comment><comment><USER3> The GIF also reveals why it's so easy to pick locks, and (to a mechanically inclined person) how to do it.</comment>


Ask HN: What are some small to medium size blogs covering startups? - <AUTHOR>

I'm looking to try to get to know some writers who cover startups and up-and-coming web applications and tools.
I figure that it will be easier to get some traction with the small to medium size blogs because your average Wired or Mashable writer is inundated with emails.
What blogs have decent readership but aren't so mainstream that the writers are impossible to reach? <comment><USER2> Some of the blogs that I can immediately think of are..

<http://techcocktail.com/> <http://thestartuppitch.com/> <http://www.killerstartups.com/> <http://www.startuphustle.com/> <http://www.youngupstarts.com/> <http://startupstats.com>

Check out the Alltop Startups page and you can find more.

<comment><USER2> Hey there is another HN post today "List of Places to Submit your Startup for PR" <http://news.ycombinator.com/item?id=3756362> Thought this might be useful.

</comment></comment><comment><USER3> You should realize that even major startups blogs will only get you a relatively small amount of traffic (less than say being on the front page of HN) and most of that traffic won't be sticky, the value of being on the front page of say Techcrunch is that it puts you infront of potential investors and partners.

And you lose a lot of that value when you go to second or third tier startup blogs. You're much better off going for blogs which are in the same field as your startup (i.e. a health startup should go for health blogs) as you're much more likely to find actual users there.

<comment><AUTHOR> Ok thanks. This is good info regarding the size of the traffic to expect.

The reason I would like to get coverage from startup blogs is because my startup makes a tool for startup founders. I'm hoping that the people who read these blogs are my market demographic.

The startup in question: <http://domiy.com>

<comment><USER4> I think you need some more features, otherwise this is just a nicer looking shared google docs.

<http://www.leandomainsearch.com> has been adding some filters, but I would like to see the ability to permanently remove certain terms we would never use.

<comment><AUTHOR> Hi, thanks for the suggestions regarding features.

I started working on the site only 4 weeks ago and I've had people using it for the past week (~200 sign ups). I'm adding features and improvements all the time.

The reason I'm asking my question about blogs now is not because I plan to try to show it to any bloggers right now. I'd just like to start building the relationships now so that I will have some sway when I'm ready to try and get coverage.

</comment></comment></comment></comment><comment><USER5> <http://www.siliconprairienews.com> for those of us here in the midwest/plains areas.

</comment><comment><USER6> <http://web.appstorm.net/>, where I work as editor, is always glad to review new web app startups. Send us a personalized email through our contact form, and we'll usually get back in touch. I'm always excited to cover brand-new apps, as are most mid-range blogs that aren't as hugely known.

</comment><comment><USER7> <http://thestartupfoundry.com>

Edit: This could also be relevant to getting coverage [http://thestartupfoundry.com/2011/08/18/7-tips-for- scoring-y...](http://thestartupfoundry.com/2011/08/18/7-tips-for-scoring-your- first-article/)

<comment><USER2> Michael,

Paul at The Startup Foundora writes about startups but he doesn't feature or review startups.

<comment><USER7> There's a mix of stories. The bootstrapped section covers companies <http://thestartupfoundry.com/category/bootstrapped/>

Edit: reading your comment again, I see the distinction but if you have a compelling story that other startups could find useful, you could get covered.

</comment></comment></comment><comment><USER8> <http://ArcticStartup.com> covers startups based in the Nordic and Baltic countries. We are very reachable at editor (at) arcticstartup.com

</comment><comment><USER9> <http://devcodehack.com> It's not all startups, but there will definitely be more startup and YC stuff to come.

</comment><comment><USER10> <http://betakit.com/>

Betakit just launched a few months ago, but it looks good so far.

</comment><comment><USER11> I wouldn't just stick to conventional startup blogs. Blogs like ours also report on cool web apps etc - redferret.net

</comment><comment><USER12> Try <http://startups.fm/>

</comment><comment><USER13> check out the berlin based, english-language venturevillage.de</comment>


Yes, But Can Google Chrome Or Firefox Do THIS? [humor] - <AUTHOR> http://www.favbrowser.com/yes-but-can-google-chrome-or-firefox-do-this/

<comment><USER2> You can do that with any Windows app that crashes and stops repainting its client area - I hesitate to say that it's _impossible_ with FF or Chrome. Less likely, maybe :-)</comment>


Gangsta Lorem Ipsum - <AUTHOR> http://www.lorizzle.nl/

<comment><USER2> Why bother clicking a button? The contents of this site are literally pasted below:

        Lorizzle ipsum dolizzle get down get down get down get down, consectetuer adipiscing elit. Ma nizzle dope velit, black volutpat, suscipit pimpin', check out this vizzle, stuff. Pellentesque eget tortor. erizzle. Sheezy at dolor dapibizzle turpizzle tempus bling bling. Mauris pellentesque nibh et turpizzle. Shizzlin dizzle in fo shizzle my nizzle. Black gangsta mah nizzle nisi. In hac habitasse uhuh ... yih! break yo neck, yall. yo mamma. tellus its fo rizzle, pretium yippiyo, ma nizzle ac, eleifend vitae, nunc. Away suscipit. Integer check out this gizzle sizzle purus.

        Etizzle break yo neck, yall fo shizzle ut nisl. Bling bling quizzle pizzle. Maecenas sheezy, ipsum malesuada malesuada scelerisque, shut the shizzle up purizzle away felis, et yo mamma metus own yo' izzle crunk. Vivamizzle ullamcorper, break it down izzle varius congue, nibh nunc ultricizzle turpis, izzle break yo neck, yall leo elit yippiyo shizznit. Maurizzle aliquet, orci vel volutpat fo shizzle, sem augue luctizzle nisi, yo boofron pimpin' for sure izzle nisl. Nullizzle a sheezy fo shizzle orci eleifend izzle. Dizzle nizzle away. Curabitur nizzle velizzle things pede uhuh ... yih! facilisizzle. Maecenas sapien nulla, iaculizzle vel, molestie shit, egestas a, erizzle. Shiz vitae gangsta quizzle shut the shizzle up bibendum . Nizzle check it out pot. Aliquizzle erat fo shizzle. Nunc break yo neck, yall leo izzle daahng dawg pretizzle funky fresh. Boom shackalack nec lacus for sure dui condimentum ultricies. Ut nisl. Fizzle izzle urna. Integizzle bow wow wow ipsizzle break yo neck, yall mi. Donec at turpizzle.

        Curabitizzle pot dizzle yo mamma daahng dawg aliquam mammasay mammasa mamma oo sa. Shit potenti. Daahng dawg odio. Vivamus neque. For sure mofo. Crizzle mauris fo shizzle mah nizzle fo rizzle, mah home g-dizzle, interdizzle fo, feugizzle stuff amizzle, malesuada izzle, rizzle. Pellentesque gravida. Vestibulizzle sheezy mi, volutpizzle yo, sagittis sed, adipiscing sempizzle, fo shizzle. Crizzle phat ipsizzle. Things volutpizzle felizzle vizzle funky fresh. Cool quis justo pimpin' purizzle sodales ornare. Sed venenatizzle justo boofron lacus. Nunc urna. Suspendisse venenatis placerizzle lacus. Rizzle fo shizzle ante. Mammasay mammasa mamma oo sa pharetra, leo eu dapibus hendrerit, own yo' felizzle elementum sizzle, izzle aliquizzle dizzle felis luctus . Nizzle a i saw beyonces tizzles and my pizzle went crizzle. Class taciti sociosqu yippiyo litora torquent per conubia things, pizzle inceptos hymenaeos. Aliquam interdum, neque phat doggy that's the shizzle, go to hizzle orci viverra leo, crackalackin sempizzle that's the shizzle black izzle sem.

        Pimpin' facilisi. Crazy crazy doggy dizzle. Own yo' vulputate arcu bling bling mauris. Cras boom shackalack odio own yo' ipsizzle. Izzle adipiscing nibh vel check it out. Cras the bizzle, mi fo shizzle mah nizzle fo rizzle, mah home g-dizzle pot tincidunt, dolizzle sizzle nizzle ass, fo shizzle mah nizzle fo rizzle, mah home g-dizzle placerizzle quizzle its fo rizzle egizzle mi. Etizzle i saw beyonces tizzles and my pizzle went crizzle, lectizzle et aliquet fo shizzle, tellizzle dawg lacinia orci, a sagittis nulla mi at yippiyo. Suspendisse check out this nizzle away. In mofo aliquizzle dolor. Praesent leo enim, tempor nizzle, funky fresh nizzle, break it down gangsta, sizzle. Mauris shit massa quis risizzle blandizzle dictizzle. Fo shizzle ullamcorpizzle turpis at i'm in the shizzle tincidunt yippiyo. Bling bling quis fo. Maecenizzle lacinia. Get down get down fermentizzle my shizz enim. The bizzle mi. Crackalackin i saw beyonces tizzles and my pizzle went crizzle dolor sit sure, consectetizzle shiz elizzle. Maurizzle urna arcu, convallizzle eget, sagittizzle da bomb, pharetra eu, shizznit. Yippiyo ipsizzle things sit things, doggy adipiscing elizzle.

        Integer non owned. Phasellus semper, fizzle eu vehicula congue, velit bow wow wow convallizzle quam, vizzle gizzle sapizzle dang vizzle nulla. Vivamizzle vestibulum that's the shizzle. Bizzle rhoncus gizzle gizzle. Pizzle uhuh ... yih! ornare leo. Vestibulum urna quizzle, pizzle a, lacinia mah nizzle, rizzle izzle, urna. Vivamizzle eleifend euismod boofron. Gizzle shizzle my nizzle crocodizzle fo shizzle my nizzle shizznit. Rizzle izzle tortizzle sheezy erizzle ultricizzle pulvinar. Morbi mollizzle dope erizzle. Nam tellivizzle, pizzle a away sollicitudizzle, yo mamma i'm in the shizzle aliquet urna, the bizzle elementizzle velizzle purus izzle velizzle. Suspendisse tristique enizzle quis uhuh ... yih!. Sizzle break it down ligula et dui shizzle my nizzle crocodizzle fo shizzle. Funky fresh izzle lorizzle. Nizzle velizzle. Suspendisse uhuh ... yih! get down get down.

        Aliquam ultricizzle, boofron et go to hizzle posuere, nibh quam tempus diam, crazy mollis pizzle fo shizzle pellentesque est. Sure placerizzle, libero elementum own yo' break yo neck, yall, you son of a bizzle maurizzle yo shit, ut vehicula nisl velit sed shit. Boofron nulla dawg, imperdizzle own yo', malesuada volutpat, for sure crazy, pede. Crackalackin urna. Curabitur rizzle, nizzle quis cursus own yo', felis augue cool dui, egizzle bibendizzle break it down ipsizzle the bizzle erizzle. Donec lectus. Nizzle sizzle ass i'm in the shizzle pimpin' i saw beyonces tizzles and my pizzle went crizzle doggy. Integizzle , crackalackin vel auctor sollicitudin, pede ghetto sempizzle sizzle, go to hizzle bow wow wow laoreet mi felizzle mammasay mammasa mamma oo sa shizzlin dizzle. Cras fizzle orci. In hizzle habitasse bling bling dictumst. Check it out da bomb da bomb, faucibizzle izzle, fizzle sure, congue ac, quam. Hizzle tellizzle mofo, molestie vel, ultricizzle quizzle, euismizzle non, leo. Duis izzle magna hizzle fo shizzle pulvinizzle go to hizzle. Bizzle fo shizzle mah nizzle fo rizzle, mah home g-dizzle dolizzle rizzle amizzle, consectetizzle bow wow wow shit.

        Door: Jeroen & Gerard

<comment><USER3> It generates a different version every time you click the button.

</comment></comment><comment><USER4> This is better than the 'regular' lorum ipsum site if only because you don't have to enter how many paragraphs you want.

I wish it was a bit more gangsta and a bit less ipsum, though.</comment>