Arduino on Arduino battle ends in reconciliation, merger - <AUTHOR> http://arstechnica.com/business/2016/10/arduino-on-arduino-battle-ends-in-reconciliation-merger/?comments=1 <comment><USER2> Direct link to the article: [http://arstechnica.com/business/2016/10/arduino- on-arduino-b...](http://arstechnica.com/business/2016/10/arduino-on-arduino- battle-ends-in-reconciliation-merger/)

The submission links to the article's comments rather than to the article itself.

<comment><AUTHOR> You are correct, sorry about that. Clicked on the comments and didn't realize it reloaded the page.

</comment></comment><comment><USER3> See also previous discussion:

[https://news.ycombinator.com/item?id=12619394](https://news.ycombinator.com/item?id=12619394) (1 day ago, 36 comments)</comment>


A Review of Perl 6 - <AUTHOR> http://www.evanmiller.org/a-review-of-perl-6.html <comment><USER2> Subpar performance is a huge drawback of Perl 6.

I usually don't program in Perl, but occasionally use it instead of sed.

Compare, Perl 5 vs. Perl 6:

        $ time yes | head -n1000000 | perl -pe 's/y/n/' >/dev/null

        real	0m0.945s
        user	0m0.944s
        sys	0m0.016s
        $ time yes | head -n1000000 | perl6 -pe 's/y/n/' >/dev/null

        real	2m49.881s
        user	2m44.892s
        sys	0m2.184s

Spending several minutes to do what can be done in under 1 second is just unacceptable.

<comment><USER3> > \d now matches Unicode digits such as ᭕ (a Balinese five) and ๓ (a Thai > three).

This sounds like a disaster waiting to happen.

<comment><USER4> It has been like that since forever (at least since 5.10, 2007). To only match 0-9, use [0-9] or /\d/a (/a is available since 5.14, 2011).

</comment></comment></comment><comment><USER5> I found this a nifty intro to perl6. I am a 70 year old retiree and have 37 years of C programming and some C++, perl5, and other languages. This is the first time I've been able to make the slightest headway digging perl6.

<comment><USER6> _I am a 70 year old retiree and have 37 years of C programming_

That's awesome. Thank you for joining the community here. I have a lot of respect for our elders. New technology gets written about using old technology.

<comment><USER7> fnj is also a longtime community member of Slashdot, and well regarded.

</comment></comment></comment><comment><USER8> A lot of people here seems to think there is a lot of potential for perl6, with the only complaints being the name and its speed, with at least speed expected to improve.

But I thought this review sounded pretty damning.

Numerical operations are opaque as you never quite know if it's a rational or a float.

The grammar engine is inferior to other languages 3rd party modules, hard to debug and seems to not be suitable for its main purpose (parsing perl6!)

Everything seems to be writable in a multitude of ways with no clear indication if these ways are functionally different.

I do a lot of NLP in python and I wish for better tools to munge and clean up my text data, and have been curious about perl6, but after reading this review I don't find Perl all that enticing at all.

<comment><USER9> > Numerical operations are opaque as you never quite know if it's a rational > or a float.

Not so. When you put in floats, you get floats out. If you want always- rational numbers, put in FatRat and you get out FatRat -- with the predictable bad performance on algorithms that converge on irrational numbers.

> The grammar engine is inferior to other languages 3rd party modules

Nothing stops you from using superior 3rd party modules in Perl 6. Heck, you can use Python modules through Inline::Python in Perl 6.

> hard to debug

I haven't found it harder to debug than other parser libraries, but your mileage my vary. I'm a fan of Grammar::Tracer, which hasn't failed me yet.

> Everything seems to be writable in a multitude of ways with no clear > indication if these ways are functionally different.

That is true, but I find it irksome that you mention it right next to Python, which also has a multitude of ways to do different things, even though the Zen of Python says there should be just one way. Think string formatting, for example. I believe it's a trait of every programming language that doesn't set out to babysit you.

<comment><USER8> Thank you for inputs on the specifics.

Would you say the reviewer/author is misunderstanding Perl6, or that I am misunderstanding the review?

<comment><USER10> I think you are reading in too much the criticism of how grammars work. Ultimately the leading compiler uses the Perl 6 grammar engine and tooling to implement the language compiler! So if your needs are substantially less complex than needing to implement your own programming language, say parse some XML or something. Then the grammar engine is more than competent. The authors criticism of how to handle errors during parse and making a really advanced robust parser is definitely fair. However, the technology for doing this in a deep way does exist. It's already found in the grammar debugger module from one of the core devs ([https://github.com/jnthn/grammar- debugger](https://github.com/jnthn/grammar-debugger)). There just isn't perhaps a nicer "user" level API for you handling parsing in a flexible way when something goes wrong. There are mechanisms for making your grammar flexible though such as proto rules/tokens/regexes [https://docs.perl6.org/language/grammars#Protoregexes](https://docs.perl6.org/language/grammars#Protoregexes) here when different options are encountered you can trigger different code to handle whats being parsed.

</comment></comment></comment></comment><comment><USER11> This is an interesting article overall, but I'm unsure what this part is trying to say:

 _> Perl 6 is aware of graphemes and combining codepoints, and unlike Python, Swift, or Elixir, Perl 6 can can access arbitrary graphemes by position in constant time, rather than iterating over every grapheme to access a particular one. [...] Graphemes are stored internally as 32-bit integers; this address space is large enough to contain all legal codepoint combinations_

It sounds like Perl6 is simply storing strings as UTF-32. AFAIK, there's nothing called a "grapheme" in Unicode; the closest I know of are "grapheme clusters", which are theoretically unbounded in size and so cannot simply be stored in a 32-bit integer. Maybe by "grapheme" the author means "Unicode scalar value"? But being able to access those in constant time isn't especially useful, AFAIK.

<comment><USER12> Perl6 extends (NFC normalized) UTF-32 with autogenerated 'synthetic' codpoints for grapheme clusters. This yields an upper bound for the number of unique multi-codepoint grapheme clusters a Perl6 program may encounter (something like 2^31 as I believe only negative numbers are used for synthetics).

<comment><USER11> Is there a document somewhere describing Perl6's string implementation more precisely? To the best of my knowledge this can't be done, since not only is it legal for combining characters to appear an unlimited number of times in a single grapheme cluster, even discounting repetition the number of legal combinations of single combining characters is surely larger than 2^31. It seems self-evident that if all theoretically-legal combinations of codepoints fit into a 32-bit space, then we just wouldn't bother with combining characters and would use precomposed glyphs exclusively!

<comment><USER12> Not everything that's theoretically unsound is a problem in practice (eg a 128-bit address space would clearly be large enough - there are only so many atoms on the surface of the earth, and the number of glyphs written by humans is quite a bit smaller than that...)

<comment><USER11> This is exactly what I'm asking though; if they decided to treat some bespoke combinations of combining characters as though they were precomposed, then I'm curious how they generated that list, and I'm curious what fallback behavior it has for grapheme clusters that aren't specifically accounted for in this way. I'm also sort of curious what their rationale is for doing any of this in the first place, since it seems like the benefit of constant-time indexing isn't especially useful given the memory tradeoffs.

<comment><USER13> From what I understand, those _" autogenerated 'synthetic' codepoints"_ aren't guaranteed to be identical across runs (and typically won't be).

What they do is a bit like LZW compression: use a set of codes that is larger than the number of simple graphemes, assign each simple grapheme its 'normal' code and, whenever one encounters a complex one, assign it the first hitherto unused 'code point'.

That works fine until it breaks. They hope it never breaks in practice. I think there's a good chance it won't, but still don't think this is a good idea.

<comment><USER12> _those "autogenerated 'synthetic' codepoints" aren't guaranteed to be identical across runs_

Indeed: It's not an exchange format, but the format of the internal in-memory string representation.

<comment><USER11> If it's only intended as an in-memory representation, then how about a 24-bit representation, which is just as likely to work "in practice, if not in theory" as the 32-bit representation, while saving 25% of the memory? That gives you 16 million unique grapheme clusters per program instance, which, heck, is probably still more than 99% of programs use; you could easily get away with a 16-bit representation and use no more memory for strings than Java, C#, or Javascript. It's not like using a unique superset of UTF-32 is saving anyone the hassle of needing to convert between formats, since the vast majority of the world is ASCII-ish, UTF-8, and UTF-16 anyway.

<comment><USER12> > how about a 24-bit representation

Because 24-bit integers are not a thing on x86?

<comment><USER11> Who says you need to use integers? You're completely ignoring my question. Again, if you know of a design doc buried on a mailing list somewhere please just link me to that so that I can answer all of my questions at once.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER14> > ... but I personally prefer to be treated like a responsible adult rather > than, for instance, a teenager trapped in the father-knows-best house of Go.

My feelings exactly.

<comment><USER15> Oh, -I- should be treated like a responsible adult, -but those maniacs I work with shouldn't be-.

Is the language for individuals, or for teams? Is it for software developers, or dabblers from other domains who have to crank out a bit of code?

<comment><USER16> Perl always was, and still is, a hacker's language. It is for individuals who want to get shit done NOW, disregarding maintainability or teamwork. For this particular niche, it is indispensable.

<comment><USER15> Not saying otherwise. I, personally, prefer languages I can come back to a month later and figure out what the hell -I- was thinking, let alone someone else, but I understand the appeal.

My point was that it's not really a pro/con of a language on whether it favors individuals hacking, or teams developing, but merely a consideration for its appropriateness to your problem, and so to say "I prefer" needs to be qualified as to -when- it's preferable.

</comment></comment></comment></comment><comment><USER17> Its been endlessly stated but naming it 'Perl 6' was a huge mistake. Perl 5 has an enduring reputation for crufty, unmaintainable code written by graybeard sysadmins. I wrote a lot myself that I wouldn't want to ever deal with again. I think they would have benefitted from a clean break from a marketing perspective, especially considering it's completely different.

<comment><USER18> Perl 5 was my first love as a programming language. I rarely use it now, but it will always have a special place in my heart. I learned so much with that language. Blessing a regex for example. That was the first time I felt like I had a super power.

<comment><USER19> Perl 5 is still a great replacement for sed and awk in one-liners. Which is what it was originally envisaged as (although more than just one-liners), and is probably how it should survive - the most powerful one-line tool in existence.

<comment><USER20> With all due respect to APL?

<comment><USER21> I think they mean Nix terminal work. APL & J obviously win hands down as overal one-liner kings. Can Dyalog be used via the terminal in that manner? I'm guessing so, but never seen it used outside the IDE.

</comment></comment></comment></comment></comment><comment><USER22> If you want good error reporting from grammars then you really need to implement a FAILGOAL in the grammar. For example:

      method FAILGOAL($goal) { die "cannot find $goal near position {self.pos}" }

There is also a very helpful grammar tracer and debugger when developing a grammar:

      use Grammar::Tracer;

or

      use Grammar::Debugger;

[https://github.com/jnthn/grammar-debugger](https://github.com/jnthn/grammar- debugger)

<comment><USER23> I managed to not only read that several times over as FAILGOAT, but think that, yes, that sounds like an awesome solution.

</comment></comment><comment><USER24> Perl6 feels like it could be the ultimate language for Man, Machine, Mineral, and Beast, if only we could teleport into a parallel universe where it war already in widespread usage. The sense of sheer potential off the language is intoxicating.

I like to imagine the Geth in Mass Effect run on a hybrid Perl6/Erlang platform.

<comment><USER25> Funny you mentioning Geth... Perl 6's core devs use a bot named Geth to report new commits on IRC. And.... it's written in Perl 6 ( [https://github.com/perl6/geth](https://github.com/perl6/geth) ) :)

<comment><USER26> heh, same name as the _G_ o _Eth_ ereum client [https://geth.ethereum.org/](https://geth.ethereum.org/)

</comment></comment></comment><comment><USER27>
      $ perl6
      To exit type 'exit' or '^D'
      > 0.3 == 3e-1
      False

I'm really really not sure how I feel about this. Does anyone know why the decision was made to make exponential notation return a float while decimal notation returns a rational?

<comment><USER28> The "e" notation is an explicit reference to the floating point representation, so it should obviously use it.

But decimal literal numbers (that is, not using the "e" notation) are best represented with rational values, in the sense that they don't need any approximation, so there really is no reason to use floating points for them.

<comment><USER29> The "e" notation is just a shorthand for multiplying by a power of ten. I was kinda surprised when the article stated that "5.23e5" wasn't treated the same as as "5.23 * 10 * * 5". Mathematically, rational to an integer power is always rational. This strikes me more as a half-measure that can cause surprise and unpredictability.

edit: can't get double-asterisk to get through HN's markup :(

<comment><USER28> Fine, but then how do you suggest one should write floating point literal values?

PS. I guess there is the "f" suffix as in C++. Well, for some reason that's not what Perl 6 decided. I, for one, think it's simple enough to use the "e" notation. If you want to write a Rat with a power of ten, you can always literally write say

        1.2*10**3

<comment><USER29> I don't have a ready obvious alternative (though I do see others suggested an "f" suffix). The lack of alternative was sort of my point... language design is tricky, and small features in one place can paint you into a corner when implementing another.

Establishing the right dynamic tension between those features (and the parser, and the VM, and the user's mental model) definitely makes language design one of the high arts in the computer world.

I'm not even saying this was the wrong decision; just that it causing a surprising deviation from how numeric literals behave in other languages.

But Perl's goal has always seemed to me to be less about creating a rigorous language with well defined types that map to the low level; and more about creating an expressive feeling (to humans) language, where fundamental differences in type were merely an implementation detail.

So I'm not surprised that it deviates from the norm in some interesting ways; I'm just not sure if I personally like the feel when I try to speak it :)

... but I might think to close to the metal to be the target audience.

</comment></comment></comment></comment></comment><comment><USER28> I'm a bit disappointed about grammars. Usually, when I try to use them, it gets difficult. Especially when recursion is involved. Lately, for instance, I was reading the ECMAScript 2016 reference, and in it they define a repetition of elements with recursion[1]:

        ArgumentList:
            AssignmentExpression
            ArgumentList , AssignmentExpression

I've never managed to do something like that with Perl 6's grammar. Basically every time I try to use recursion, it doesn't quite work unless I do some tricks.

Maybe I ask too much, I don't know.

1\. [http://www.ecma- international.org/ecma-262/7.0/index.html#se...](http://www.ecma- international.org/ecma-262/7.0/index.html#sec-ecmascript-language-lexical- grammar)

<comment><USER10> Huh? Not sure I know what you mean, because something like the following trivially works?

        grammar LOL {
            rule TOP { <string> }
            rule string { <[a..z]><string>? }
        }

        my @lulz = LOL.parse("abcdef");
        say @lulz;

\---

        [「abcdef」
         string => 「abcdef」
          string => 「bcdef」
           string => 「cdef」
            string => 「def」
             string => 「ef」
              string => 「f」]

<comment><USER28> I didn't say recursion never works. I say most of the times, it doesn't. There is no alternation in the example you provide, for instance.

Had you written it like this:

        grammar {
            rule TOP { <string> }
            rule string { <[a..z]> | <string><[a..z]> }
        }

as inspired by the rule mentioned above in the ECMAscript reference, it would fail.

<comment><USER30> I'm probably off the mark a little bit.... but 'rule' implies that whitespace is really <.ws> (totally ignored white space matching thingy). '|' is the Longest-Match-First (different from Perl/PCRE/etc). LMF is not possible in the case where it is not a DFA... the implicit <.ws> that is there by using 'rule' and having a space might be your problem... :)

TL;DR Don't forget that 'rule' does <.ws> magic. This may or may not actually be part of the problem...

I have seen a similar sort of thing and only half understand the answer i got.. Check your implicit <.ws> and '|' LMF.

<comment><USER28> I had tried replacing 'rule' by 'token' and it did not change much.

</comment></comment></comment></comment></comment><comment><USER31> Superb; enjoyable write up. Very witty in parts, no puns in sight. Makes me want to try Perl6 out.

<comment><USER32> I also enjoyed the article but came away with absolutely no desire to ever use or encounter perl6.

<comment><USER33> The 6 is for the number of users. ;-)

On a more serious note, your comment is pretty much what I've seen most people say. I will probably poke at it, at some point. I won't have a good reason to do so, except just to learn.

<comment><USER21> There is more than you think and I expect a decent amount of people to come over from Perl5, Ruby, and Python if the language gets optimized enough. Just for small stuff at first, but in larger numbers as the libraries start to show up

</comment></comment></comment></comment><comment><USER34> > _Modifiers (i for case-insenstive is the most important one) can appear > inside a regex when preceded by a colon. For example, this Perl 5 regex:_

> _(Male|Female) (?:[Cc][Aa][Tt]|[Dd][Oo][Gg])_

> _would be translated to Perl 6 as:_

> _(Male || Female) ' ' [:i cat || dog]_

Perl 5 does support this feature:

(Male|Female) ((?i)cat|dog)

or:

(Male|Female) (?i:cat|dog)

<comment><USER35> Also I would use

        ( Male | Female )

in Perl 6, as it tries to match both in parallel.

The reason the version with || is in P5-to-p6 is that is how | works in Perl 5.

</comment></comment><comment><USER36> FWIW, I note my own trigger for revisiting Perl 6, is the existence of a standards-compliant transliterating implementation of another language, say Javascript, written in Perl 6. No ambiguity, just "does it pass the validation suite?", and "how fast is it?". A decade of "it's usable _now_!" has left that sentence with little signal weight for me.

The idea is, at least as of a decade ago, it was straightforward to massage the then ECMA spec into Perl 6 code. The spec says "Go to step 4 ... 4. ..."? Well, "goto Step_4;... Step_4: ..." is code. And so on. Perl 6, at least as envisioned then, is a very nice language for language implementation. Implementation often goes like this: most of the language is easy, nicely compatible with the target; some of it is hard, requiring some struggle to impedance match; and tiny bit of it is impossible, or nearly so, or requires rewriting all the rest, because of "gotcha" conflicts with the target semantics. With a rich kitchen-sink target, almost everything becomes easier, and there's likely some hook you can use to get that impossible bit done. And when writing a compiler, (then, almost) general grammars, and multiple dispatch with type sets, is a nice place to be.

But the corollary is, when I don't see a compliant ES2017 transliterated to Perl 6, then I assume something is wrong - something isn't working yet - be it unfortunate spec, or "doesn't quite work yet at scale" implementation, or community.

</comment><comment><USER37> The "whatever star" seems like a less-well-implemented version of Wolfram Language's pure anonymous functions:

[http://www.wolfram.com/language/elementary- introduction/2nd-...](http://www.wolfram.com/language/elementary- introduction/2nd-ed/26-pure-anonymous-functions.html)

Essentially, WL uses # instead of * and requires a "&" to indicate when you're done defining your function. So the WL equivalent to Perl's

        (1, 2, 3).map: * * 2

is

        Map[ #*2&, {1,2,3}]

(idiomatically you would use /@ as shorthand for Map[], so it would be)

        #*2&/@{1,2,3}

Except WL is far more general with what you can do with #, and you can do things like this:

        Outer[ #1 * #2 &, {1,2,3}, {4,5,6}]

which returns

        {{4, 5, 6}, {8, 10, 12}, {12, 15, 18}}

because #1 * #2 & defines a function of _two_ arguments, and "Outer" feeds the lists into that function. You can even use ## to refer to all the arguments passed into that function (regardless of how many arguments there are), so

        Outer[## &, {1, 2, 3}, {4, 5, 6}]

returns

        {{1, 4, 1, 5, 1, 6}, {2, 4, 2, 5, 2, 6}, {3, 4, 3, 5, 3, 6}}

And you can even do stuff like:

        f[x_] := x^2
        Outer[ #1[#2] &, {e, f, g}, {4, 5, 6}]

to get

        {{e[4], e[5], e[6]}, {16, 25, 36}, {g[4], g[5], g[6]}}

<comment><USER38> Scala had it before WL, with "_" which can be used with two or more arguments where necessary. I suspect other languages had it earlier than that.

It's a very useful shorthand, although it becomes less necessary with properly first class functions and/or currying by default. E.g. I don't know if Haskell has it at all, but it doesn't need it.

<comment><USER37> [http://reference.wolfram.com/language/ref/Slot.html?q=Slot](http://reference.wolfram.com/language/ref/Slot.html?q=Slot)

At the bottom of the page, it says:

>Introduced in 1988 (1.0)

So WL had this syntax several years before the JVM was even invented.

<comment><USER38> Hmm, I thought I remembered WL being announced a few years ago, long after I was using this stuff on the JVM.

</comment></comment></comment></comment><comment><USER39> To what extent is Perl 6 now stable? I was at a LISA conference in December 2011, and watched Tobias Oetiker present the wonders of Perl 6, and though I loved what I saw, something more than a tenth of his examples broke because of recent revisions, whether semantic or to implementation. God bless the language explorers, but my takeaway was "not yet". Is now the time?

<comment><USER5> I would say perl6 was stable as of the Christmas 2015 release of rakudo.

</comment></comment><comment><USER35>
        「Man is amazing, but he is not a masterpiece」

Is different than the other two, it can be thought of as short for

        Q 「Man is amazing, but he is not a masterpiece」

While the others are short for

        qq "Man is amazing, but he is not a masterpiece"

Which is short for

        Q :qq "Man is amazing, but he is not a masterpiece"
        Q :double "Man is amazing, but he is not a masterpiece"

Which is also short for

        Q :s :a :h :f :b :c "Man is amazing, but he is not a masterpiece"
        Q :scalar :array :hash :function :backslash :closure "Man is amazing, but he is not a masterpiece"

For more information see the [Quoting Constructs]([https://docs.perl6.org/language/quoting](https://docs.perl6.org/language/quoting)) documentation.

\---

There are modules for [debugging and tracing]([https://github.com/jnthn/grammar- debugger](https://github.com/jnthn/grammar-debugger)) Grammars.

A regex is just a special kind of method by the way.

        say Regex.^mro;
        # ((Regex) (Method) (Routine) (Block) (Code) (Any) (Mu))

Which is part of the reason it doesn't have some of the niceties of parser generators built-in yet. The main reason is it got to a working state, then other features needed more designing at that point.

\---

        # Perl 5
        /(Male|Female) (?:[Cc][Aa][Tt]|[Dd][Oo][Gg])/
        # is better written as
        /(Male|Female) (?i:cat|dog)/

In Perl 6 you can turn on and off sigspace mode

        /:s (:!s Male | Female ) [:!s:i cat | dog ]/
        # or fully spelled out
        /:sigspace (:!sigspace Male | Female ) [:!sigspace :ignorecase cat | dog ]/

        # or just use spaces more sparingly
        /:s ( Male| Female) [:i cat| dog]/

Note that in this case it is more like

        /( Male | Female ) \s+ [:i cat | dog ]/

In other contexts it could be slightly different. Basically it ignores insignificant whitespace.

Note that `( a || b )` is more like the Perl 5 behaviour, but `( a | b )` tries both in parallel with longest literal match.

Regular expressions are also the reason `:35minutes` is in the language by the way

        say 'a ab abc' ~~ m:3rd/ \S+ /;
        # 「abc」

Rather than make it a special syntax, it was generalized so it can be used everywhere.

\---

The asterix in a Term position turns into a Whatever, when that is part of an expression it turns into a positional parameter of a WhateverCode.

        $deck.pick(*); # randomized deck of cards
        $deck.pick(Whatever.new); # ditto

        $dice.roll(*); # infinite list of random rolls of a die
        $dice.roll(Whatever.new); # ditto

        %a.sort( *.value ); # sort the Pairs by value (rather than key then value)
        %a.sort( -> $_ { .value } ); # ditto

Note that the last asterix was part of an expression, while the others weren't.

        my &shuffle = *.pick(*); # only the first * represents a parameter to the lambda
                                 # the other is an argument to the pick method

The main reason I think for its addition to the language is for indexing in an array

        @a[ * - 1 ];

Rather than make it a special syntax exclusively for index operations, it was made a general lambda creation syntax.

I will agree that it takes some getting used to, but it is not intractable. WhateverCode lambdas should also only be used for very short code, as it can get difficult to understand in a hurry.

\---

A `$_` inside of `{ }` creates a bare block lambda, basically this removes the specialness of Perl 5's `grep` and `map` keywords.

There is a similar feature of placeholder parameters `{ $^a <=> $^b }` to remove the specialness of Perl 5's `sort` keyword.

Another feature is pointy block, which removes the specialness of a `for` loop iterator value syntax.

        # Perl 5 (this is the only place where this is valid)
        for my $line (<>) { say $line }

        # Perl 6
        for lines() -> $line { say $line }

        # not special
        lines().map( -> $line { say $line } );

        # really not special
        if $a.method-call -> $result { say $result }

\---

There is more to NativeCall that you haven't discovered yet.

For example, you can directly declare an external C function as a method in a class, and expose it with a different name. (if the first parameter is the instance)

Also it doesn't matter what you put in the code block for a NativeCall sub, as long as it parses. That is why it doesn't matter if you put a Whatever star (asterix) there or a stub-code ellipsis `...` in it. (you can also leave it empty)

        use NativeCall;
        sub double ( --> size_t ) is native() is symbol<fork> { say 'Hello World' }

        say double;
        say '$*PID == ',$*PID;
        # 1555
        # 0
        # $*PID == 1552
        # $*PID == 1555

\---

Supplies __can __be pattern matched, just use `grep` on them as if they were a list. It in turn returns a Supply. You can also call `map`, `first`, `head`, and `tail` on them. Basically every List method is also on a Supply, along with special methods like `delayed`.

\---

A lot about what you talked about with lists, and itemization is something that does take some time to get used to. It does get easier, but is always something you have to be cognizant of. Sort of like returning lists from subroutines are from Perl 5. It allows control over flattening that isn't available in Perl 5.

</comment><comment><USER40> Are there any good examples of projects like this that drag on for an eternity and somehow, despite the odds, release, and also become extremely successful? It seems like after a certain point you have basically missed the boat on delivering value based on the assumptions you had when starting the project.

<comment><USER41> Do you consider Haskell to already be extremely successful? (Haskell planning began in 1987, the same year Perl 1 shipped.)

</comment></comment><comment><USER42> Lately, I've been seeing more pots on Perl. Is it just confirmation bias? or is Perl making a comeback?

<comment><USER21> Perl did show back up in the TIOBE rankings as #10 and then #9 (Perl5). There are plenty of blog posts and conferences...just not as much as Python, Java, C#...etc. Perl6 is starting to get checked out by the first wave of people who like to dive into new tech, so a bunch of blog posts have been showing up recently.

</comment></comment><comment><USER26> > Perl 6 has Perl's regexes with a few changes: extending the Unicode support, > moving the modifiers around, and reassigning some symbols, and also changing > the whitespace rules to be more legible.

So… _Perl_ 6… has Perl-incompatible regular expressions?? Amazing.

<comment><USER10> It also has all of the Perl 5 regex syntax too, so you can still use anything legacy or if you prefer to stick to something more portable. It's just the "default" regex is the new syntax. You can also put in any other "language" for them that you feel like, so POSIX maybe shell glob? I think at least POSIX probably exists in the ecosystem ;)

</comment></comment><comment><USER43> This line from the article best summarizes it for me:

 _Perl 6: The Ruby on Rails of command-line tools._

</comment><comment><USER44> As a general comment, I would love to see more "reviews" of programming languages like this, even ones that are already in, use but maybe only in one niche, or should perhaps be more popular than they are.

<comment><USER45> I thought the same thing. In particular I would love to hear what the author has to say about the Nim programming language.

</comment></comment><comment><USER46> This reads like a literary review. I like the style a lot!

</comment><comment><USER47> How's the toolset on Windows? Last time I checked, there were no out-of-the- box IDEs that supported debugging for Perl 6.

<comment><USER10> There are some great things in Atom for linted editing with doc integration [https://github.com/azawawi/atom-perl6-editor- tools](https://github.com/azawawi/atom-perl6-editor-tools)

If you want to get hold of the latest stable full release you can use chocolatey which is kept up to date [https://chocolatey.org/packages/rakudostar](https://chocolatey.org/packages/rakudostar) or use a .msi installer from the official Rakudo site.

<comment><USER47> Thank you; I'll be sure to try it out.

</comment></comment></comment><comment><USER48> Excellent, thanks.

</comment><comment><USER49> It is not a review. It is an introduction or tutorial.</comment>


Ask HN: I'm getting older and I fear for my future - <AUTHOR> I'm 35 and I have been working for the same company for a couple of years now. I have about 6 years of experience (I started very late) and I work mostly as a frontend these days.
I fear that if I get fired or let go (for any reason) I'll be unable to find a job because I'm not a senior engineer and at my age that disqualifies me for most available jobs. Who wants a 35-year old who is good but not a lead? What about a 40-year old? (there's no possibility of career advancement at my current job, it has a very flat internal structure.)
What can I do to have a chance?
Note: I'm not in the USA and the local market while existent is small enough to know what I'm saying is a very real possibility. <comment><USER2> In 2018 you always need to be learning. If you stop learning, you are much more likely to fall behind. If I were you I would research some classes that I could take to make sure my skill set was still in demand. Udacity, for instance, has courses that guarantee a job offer upon graduation or your money back.</comment>


Bill and Kim's Excellently-Posed Adventure - <AUTHOR> http://www.fastcompany.com/blog/ken-carbone/yes-less/bill-and-kims-excellently-posed-adventure

<comment><USER2> When I see pre-article ads like this, I never usually close the window. It makes me wish HN had a down-vote button.

Would flagging such articles be appropriate? I feel kind of scammed when I click a link for an article and get an ad.

</comment><comment><USER3> .. or Beavis and Butthead do Semiotic Analysis. The article could have done without the juvenile, mocking undertones.

<comment><USER4> Without the juvenile, mocking undertones, I don't think there would have been an article.

</comment></comment><comment><USER5> Well ... that was pointless.

<comment><USER6> Maybe so, but whenever I follow a link to Fast Company, I'm always reminded how much I love their logo.</comment></comment>


Ask HN: Stormpulse valuation - <AUTHOR>

We are looking to place a value on our startup as we seek a round of funding.  The startup was seeded on sweat and roughly 50k, and we expect to take 300k-500k to expand our coverage and services and work on the venture full-time.  Coincidentally, PG defines this as the median range of investment for startups coming out of YC in his "Why There Aren't More Googles" essay.
I will try to be informative but discrete.  We had between 1 million and 5 million unique visitors to our domain between Aug 15 and Sept 15.  Our map is used as an embeddable widget on 400+ other sites, many of which are well-trafficked media outlets, and our map has been used on CNN during their hurricane coverage.  O'Reilly also happened to mention our site during his Web2.0 keynote.  Also, we have received hundreds of voluntary tips, donations, and thank-you emails.
So what percentage should we expect to hand over for this size investment? <comment><USER2> * If your company comprises a few founders/consultants, a great idea, a solid business plan, a working prototype, but none of you have a proven business track record, your typical pre-money valuation will be in the very low millions ($1 million to $3 million is typical). You should be looking for a seed round of $0.25 to $1 million. This is a difficult environment for you, and you should try getting some experience on your side

* If your team has a successful start-up track record, and if you have a 2-5 person management team with significant e-business or technology experience, your pre-money valuation jumps into the high single or low double-digit millions. $6 million to $15 million is the typical valuation range, and you should be looking for a first round of $3 to $10 million.

From: <http://oz.stern.nyu.edu/startups/vc.html>

<comment><USER3> I'd point out that they are no longer at the "prototype" stage, and have very respectable traction. Having users acts as a great substitute for "business experience". Thus the first category and valuation suggestion isn't really applicable.

Of course, it'd be even better if they had revenue. Revenue trumps all, and means that you're unarguably in the control position--no answer the investor can give can shutdown your business, if you have revenue sufficient to keep it rolling.

But, I think they've already proven they have a lot of the stuff investors look for...so, they're somewhere between your two suggestions even if they have no prior "e-business" experience.

It also sounds like they're very well-placed for a low-millions acquisition. Partners are the most likely acquirers, and there's a lot of websites that'd like to partner with a cool product like StormPulse (though it's cyclical, so this month it's hot, and it'll drop as the hurricane season dies down).

</comment></comment><comment><USER4> This may sound odd, but 300k-500k is about the hardest amount of money to raise. You're still too small for institutional investors, and you're large for an angel round. A typical angel might put in anywhere from $25k-$100k. I'd guess $50k to be the median, meaning you're looking at having to find 6-10 people.

You're in good shape given your traffic and revenue, so I'm not trying to suggest that you won't be able to do it. Just be cognizant of the fact that it actually may be easier for you to raise $3 million than $3 hundred grand.

<comment><USER2> It's not impossible to put together an angel round that's $500k or more with angels, assuming a) there's enough interest, and b) early on, you get angels who are connected / influential and you get a pile-on effect. (That being said, it is very hard to do.)

Some have been able to pull together up to $1M or more in $50 to $100k chunks.

As Ivan mentions, VCs like USV, Charles River Ventures and Bay Partners also come to mind -- they can do $200-$500k seed deals in one shot, or syndicate with angels.

There does seem to be a step function in valuation though when you get to Series A -- but that's moreso because of the economics of the VC game. They want to put $x million in a Series A, and they want to leave enough on the table for the founders to keep working, so they work backwards from that to set a premoney valuation.

<comment><USER4> Right, nothing is impossible. It's just harder. You're limiting yourself to the 2 or 3 VC firms who are ever willing to do this, or large angel groups. Or, you have to get 10 or so people interested. That's probably even a little harder right now than it was when I was going through the process, as the money angels use to invest is often paid for by selling shares of something.

Or you can convince one VC firm out of pretty much the entire set to give you $3 million. Raising investing is a lot like dating. You try to get set up with (or find yourself) as many people as possible until you find yourself in a situation where you like them and they like you. And if your total dating pool consists of 3 VCs and 2 large angel groups, your chances aren't 0, but they're a lot less than they would be if the pool was everyone with an office on Sand Hill road.

There are, of course, strong arguments for not taking that much, I'm just pointing out that it's easier.

</comment></comment></comment><comment><USER5> A little off-topic, but anyway:

I live in a non-hurricane part of the world, and as such have no particular interest in the phenomenon except for when it is covered in the news. I saw stormpulse here on YC news, and checked it out. Since the site is so well designed and a real pleasure to use I have often found myself going back to check up on hurricanes that appear halfway around the world from where I live.

You managed to get a regular visitor out of someone who has no particular interest in what you do, and that doesn't normally spend time just hanging out and doing nothing on the net. This is a big big accomplishment. And I think you deserve a big round of applause for having made such a well-designed site...

<comment><AUTHOR> Thank you. That's incredible to hear and I hope we can continue to please.

We need to do more advanced metrics to capture this kind of behaviour (cohorts, stickiness).

</comment></comment><comment><USER6> keep going as long as possible as you can without VC -- in fact, you need to plan to do this and not bank on getting funding.

out of curiosity, with $500k how will you "expand your coverage and services" in a way that won't currently happen? Is there really a burning need for this money, or will most just be salary for you to go full-time?

with the little info I know (and my few life experiences) why not built out the viable revenue model while still in bootstrapping phase.

<comment><AUTHOR> Yes, the money would be used to pay 2-3 full-time salaries plus office space and possibly incentivize some other development directly beneficial to us.

The only urgency is the cyclical nature of the industry; we'd like to be in a good position before the next season begins on June 1 2009.

</comment></comment><comment><USER7> Why not do convertible debt and not worry about your valuation?

[http://www.entrepreneur.com/money/financing/startupfinancing...](http://www.entrepreneur.com/money/financing/startupfinancingcolumnistasheeshadvani/article159520.html)

<comment><USER2> There are a few varieties of convertible debt -- one is with a discount, and another is with a pre-money cap.

Lots of investors will insist on pre-money cap at a reasonable seed valuation. This basically means later when you do a series A or change of control, the investor's money converts with the Series A, and they get reimbursed typically with additional common stock that would simulate that valuation as if they did equity.

Straight up convertible debt with only a discount actually does NOT align the entrepreneur's goals with the investor... the investor gets a fixed percentage discount off the Series A price, but what if they put in $100k at year 0 and the company is now worth $10 million later at year 1 (rare but not unrealistic example)? That $20k profit with the 20% discount is starting to look like an awful move.

History lesson: Back in the day, notes were common just to really "bridge" startups from seed to Series A. They were issued to startups by the same VC that was already planning to do a Series A with them -- so the discount was fine because the VC would set the valuation as well. It's different now because your note investor (angel, friends or family) probably won't be the pricing your next round -- more likely, the market will.

Now it just doesn't make sense for most investors since they can take a chance on a team, do a note with a discount, and then see no significant return if the team is successful and raises the next round at a much higher valuation.

This article is actually kind of messed up because it assumes that you priced your round poorly, and then uses that as an explanation for why debt is good. If everyone is doing their job, and you're planning for success, then do a cap... or heck, do equity with YC's Series AA.

</comment></comment><comment><USER8> Personally, I would not go for capital on your site. I'd put some ads on there, expand the service somewhat, and in a while you'll be making a bit of money.

<comment><USER2> I disagree.

Raising $300k to $500k at a reasonable seed valuation makes a ton of sense for them -- if you get the right angels who can actually help you with connections and experience, the pie will get larger faster than the % of the pie you give up to get them.

<comment><USER8> Well, I won't argue. I've never lived in an area where I had to deal with anything like hurricanes or other wierd weather, so I know very little about that market and how much can actually be made from it.

<comment><USER9> Just as a point of reference. The weather channel and its website was valued around 3.5B at time of acquisition. This included a TV channel as well as some other resources, but it's a market.

</comment></comment></comment></comment><comment> puzzle-out Value the company at $3million, raise the capital through two or three angels, giving away 15% of equity in total. Involving VCs could mean problems exiting later down the line. You don't mention if you came through YC - even if this is not the case, the company sounds like a YC startup, and so its worth targetting angel investors who have had successful exits with YC companies in the past.

<comment><AUTHOR> No, we did not come through YC. We did attend Startup School 2007 and we did apply, but it wasn't to be.

Thanks for the advice; this is sort of what we have in mind.

</comment></comment><comment><AUTHOR> Thanks everyone for the insightful and helpful answers.</comment>


10 Web design trends you can expect to see in 2015 - abramov-a-m http://thenextweb.com/dd/2015/01/02/10-web-design-trends-can-expect-see-2015/ <comment><AUTHOR> Let's hope one of them is not sites that make you click through 11 short pages of content.</comment>


Ask HN: Joking aside, does anyone actually use QR codes? - <AUTHOR>

I've seen previous discussions of QR codes here on HN, and in one of those discussions someone linked to the Tumblr "Pictures of People Scanning QR-codes," which only displays the message "No posts yet." In my own daily life experience, I have yet to see anyone actually scanning a QR code, and don't know of any local friend who recommends using them for anything, so what is the use case for QR codes? Who is using QR codes, for what? <comment><USER2> I've never scanned one other than out of curiosity the first time or two that I saw one. I wasn't the target demo to be scanning them, I just wanted to know that it worked I guess. I've never scanned one otherwise despite it being "so convenient" to do so. I see very little value in QR codes and expect them to be gone soon. I think they've been on their way out since they were first thought of.

</comment><comment><USER3> I scan QR codes whenever I need to link my phone to my Google account via the Google Authenticator app.

Outside of that I think I have scanned a QR code exactly one time - it was on a menu in a restaurant and scanning the code brought up coupons.

</comment><comment><USER4> I was pretty pissed looking for an apartment in LA where every sign had a QR code for you to get the apartment info. I think by you doing this they suckered you into creating an account and/or paying for it. I have no idea how to scan a QR code. I think I searched once in the android store, downloaded an app and it didn't work. They're basically just glorified short urls which doesn't interest me (gratuitous use of technology much?). The cool application I see is to actually transfer real data, but not too many people do that.

</comment><comment><USER5> Kew Gardens iPhone app developer here, Kew Gardens is a large Garden Park here in London, they have many many species of plants in the park - most have little tags with their scientific names printed on them, wthey just finished printing QR codes to go along side the tags for each plant. Scan the QR code from inside the Kew Gardens app, and we'll take you to the info page for that plant / attraction. (History, endangerment level, buy stuff etc)

<comment><USER6> Do your customers/users scan it?

<comment><USER5> Yes we record statistics, there's about 10 scans a day

Edit: Dont get me wrong, I think this is the _only_ real relevant use of a QR code - all it's doing it making it so the user doesn't have to type a short URL in.

As an app developer I'm always hearing "let's put a QR code there!" and 95% of the time, it's useless and we shoot down the idea

</comment></comment></comment><comment><USER7> The Los Angeles Metro bus has QR codes on all the stops that integrates with nextrip to tell you when the next bus is coming at that stop. I've used it before but it's rarely more convenient than just using GPS and having it guess the stop you're standing at.

</comment><comment><USER8> I scan them often, but I've never been anything but disappointed with the content they link to.

</comment><comment><USER9> I was looking at refrigerators at Best Buy a while back. Every appliance label had a QR code. I scanned several because it linked directly to the product page on the BB site with customer reviews.

</comment><comment><USER10> I use them. They're common on posters (both professional and amateur) where I live, and in print media.

</comment><comment><USER11> Most QR code lead to brand names site. Like California milk, Nike ... And so on. You never need them.

</comment><comment><USER12> Using for paying bills, easier that way.

</comment><comment><USER13> I have tried to use them and have not been able to make any of them work.

</comment><comment><USER14> the level up app is useful in certain places</comment>


YouTube's Quest to Suggest More, So Users Search Less - <AUTHOR> http://www.nytimes.com/2009/12/31/technology/internet/31tube.html <comment><USER2> YouTube currently can not compete with regular television because while they may be getting 20 hours of video being uploaded every minute, most of that video is ridiculous home videos of people like Boxxy.

For YouTube to compete they will have to do a better job of helping people find the quality videos while convincing major television producers to allow their shows to be "broadcast" on YouTube.

<comment><USER3> I disagree. Youtube has over 100 million users and they watched nearly 6 billion videos [1]. It's almost as much as digital and basic cable customers combined [2]. Content providers should be _begging_ Youtube to broadcast their content with their distribution potential.

[1] <http://ir.comscore.com/releasedetail.cfm?ReleaseID=368924> [2] <http://www.ncta.com/StatsGroup/OperatingMetric.aspx></comment></comment>


Create and submit R package to CRAN: Step-by-step guide - <AUTHOR> http://datavu.blogspot.com/2015/01/how-to-create-and-publish-r-package-on.html

<comment><USER2> Step eight: Get to know Ripley.</comment>


Is it Useful? - <AUTHOR> http://bokardo.com/archives/comic-is-it-useful/ <comment><USER2> Better style would be to select only the columns you use.

WordPress database error: [Got error 28 from table handler]

SELECT DISTINCT (star) FROM wp_posts WHERE 1=1 AND post_name = 'comic-is-it- useful' AND post_date_gmt (less)= '2007-05-24 16:56:59' AND (post_status != "static") AND post_status != "attachment" GROUP BY wp_posts.ID ORDER BY post_date DESC

Error 404 - Not Found</comment>


WireGuard: a modern VPN tunnel [PDF, slides] - <AUTHOR> https://fosdem.org/2017/schedule/event/wireguard/attachments/slides/1834/export/events/attachments/wireguard/slides/1834/wireguard_fosdem2017_slides.pdf <comment><USER2> Link to project site (at the end of the presentation): [https://www.wireguard.io/](https://www.wireguard.io/)</comment>


How to Sync Large Videos over the Internet Using Chunks - <AUTHOR> https://medium.com/@justinbarnett_/how-to-sync-large-videos-over-the-internet-using-chunks-22223da8b667 <comment><AUTHOR> Recently I took the extra time during quarantine and launched a project, sparkvid.com. Sparkvid is a tool that transcribes audio in video files and audio files to text.

One challenge in particular that was interesting was the problem of sending large files over a network

<comment><USER2> Did you checkout [https://tus.io/](https://tus.io/) before doing your own implementation?</comment></comment>


1961 Goldsboro B-52 crash - <AUTHOR> https://en.wikipedia.org/wiki/1961_Goldsboro_B-52_crash <comment><USER2> This and many other horrors are touched on in the great book _Command and Control_ : [https://en.wikipedia.org/wiki/Command_and_Control_(book)](https://en.wikipedia.org/wiki/Command_and_Control_\(book\))

It's truly astonishing the US hasn't nuked itself at least a half dozen times.

These bombers were flying all over the place day and night with fully operable nuclear weapons.

Recent news relating to an incident in Canada: [http://news.nationalpost.com/news/canada/mark-iv-nuclear- wea...](http://news.nationalpost.com/news/canada/mark-iv-nuclear-weapon-haida- gwaii)

</comment><comment><USER3> I was just reading about this earlier on, as it was one of the examples on: [http://nuclearsecrecy.com/nukemap/](http://nuclearsecrecy.com/nukemap/)

It lets you visualise the impact over your own house (town field accepts zip/post codes).

</comment><comment><USER4> As a North Carolina resident, I'm glad it didn't detonate (even though I wasn't alive yet)!</comment>


Anomaly Detection for Metatron Discovery Ex-Pack - <AUTHOR> https://metatron.app/anomaly-detection/ <comment><USER2> What are some useful solutions like Metatron Anomaly Detection?

</comment><comment><USER3> Are they rating their algorithms for explanation? Not sure the performance but I want to try it.</comment>


Amazon launches its newest private label, Wickedly Prime - <AUTHOR> https://techcrunch.com/2016/12/23/amazon-launches-its-newest-private-label-wickedly-prime/?ncid=rss&utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Techcrunch+%28TechCrunch%29 <comment><USER2> Isn't AmazonBasics also a private label that makes its affiliation with Amazon obvious? The article says quite explicitly and numerous times that Wikedly Prime is the first time Amazon has done this :/.

<comment><USER3> > Wickedly Prime is the first brand since the debut of Amazon Elements two > years ago to make its affiliation with Amazon known.

<comment><USER2> Ah ha: I apparently misread that sentence in multiple ways. :(

</comment></comment></comment><comment><USER4> With wicked right in the name, i'd assumed they'd be addressing more sins than just gluttony.

Wrath could be pretty easily handled by nerf guns, or perhaps airsoft/paintball. Sloth with home automation. Envy and lust seem straightforward.

Pride and greed might be tough though.

<comment><USER5> The name made me think it was maybe some kind of weird Amazon Prime service for sex toys and stuff like that.

</comment></comment><comment><USER6> Perfect choice for a name. No business is safe, Amazon is your competitor or soon will be. Hide your kids, hide your wife.

<comment><USER7> Remember to give you wife and kids a family-size bag of Wickedly Prime Blue Corn Tortilla Chips so they have something delicious and great value to munch on when hiding.

<comment><USER6> Unfortunately Wickedly Bezos Tortilla Chips are only available from amazon's site. So if you order them odds are you would get counterfeit chips from China instead. Dangerous.

</comment></comment></comment><comment><USER8> I didn't realize "wicked" was still slang. Regardless, Wickedly Prime strikes me the wrong way as a name -- it's almost too self-conscious.

<comment><USER9> In the Bay Area they may have to offer HellaPrime instead.

<comment><USER10> I would have loved if they called their same-day ("more" Prime) service that, instead of "Prime Now".

</comment></comment></comment><comment><USER11> Creepy logo but at least it's not monetizing human trafficking, yet.

<comment><USER12> Give Mechanical Turk a couple more years ;)

</comment></comment><comment><USER13> Am I the only one who thinks this is a signal that Amazon's core business has peaked and it is now desperately exploring any new opportunity to grow their revenue? Literally no business is safe.

If a business cannot grow up, it grows out.

<comment><USER14> What? This is as traditional of a move as they come. Virtually every other retailer has some lower cost in-house brand that rebrands generic items. Amazon is just doing the same. This is classic vertical integration at work.

<comment><USER15> The one difference I'd say is that the AmazonBasics house brand is usually leaps and bounds better than the competition for much cheaper. I needed a monitor arm, and they happened to have the cheapest one at the time - the next most expensive one had bad reviews for not being strong enough for heavier screens.

<comment><USER12> AmazonBasics is (aside from Monoprice) my go-to for cables. They're not the absolute best quality, but 92% of the time they're plenty good enough.</comment></comment></comment></comment>


I ported the minimalist text adventure we all know and love, A Dark Room, to iOS - <AUTHOR> https://itunes.apple.com/us/app/id736683061?mt=8

<comment><AUTHOR> And yes, this is the official iOS release of the game. More info here: [http://amirrajan.net/a-dark-room/](http://amirrajan.net/a-dark-room/)

<comment><USER2> Well, I was about to start a war here. That sorted it out. Also, don't put the reset button right in the middle of the screen.</comment></comment>


Quilter: open source file sharing with Node.js and Cloudant - <AUTHOR> https://cloudant.com/blog/quilter-open-source-file-sharing/

<comment><USER2> That's a very nice project, but I'm surprised he sets a remote couchdb instance as his repository. The point of couchdb is that you do all your actions locally, and have a background replication do all the synchronization.

Still, it seems to work very well.

</comment><comment><USER3> ugh another project that required I download all of Node.js just to use...

Note - if you are going to write a nifty little utility for use on the side, don't require all of an entire packaging framework like Node.js to run it.

Hey guys, check out this cool java utility i wrote...Oh you'll need to download Maven and let it install all of the various dependencies.</comment>


Axes of Quality - <AUTHOR> https://8thlight.com/blog/colin-jones/2020/01/14/axes-of-quality.html <comment><USER2> What "quality" means with respect to software is something that the experts (Watts Humphrey, SEI, etc) leave up to the imagination, as if "quality" had a single, easy to express meaning. But it doesn't. That's why we need articles like this one. I don't happen to agree entirely with it, as I think that "quality" can have goals in tension with one another, like the "Good/Fast/Cheap, pick any 2" triangle of quality. But overall, a good article.

<comment><AUTHOR> Yep, fair, "axes" / "dimensions" was overstating - they're not all actually all orthogonal (all models are wrong, some useful, etc.). Mature engineering discussions have plenty of examples of those tensions, e.g. is it more important for this system to be available or consistent?

<comment><USER2> Again, thanks for the article. The framing was unique in my experience, and the idea that "quality" isn't easily defined or built needs to be hammered on regularly.

You are correct - not every aspect of quality is in tension with some other aspect(s), and mature discussions would include the idea of axes or tension or "pick two" aspects, and the idea that some clusters of aspects go together for very little development effort. But unfortunately, very few seem to acknowledge or believe those things.</comment></comment></comment>


Yes, Python is Slow, and I Don't Care - <AUTHOR> https://hackernoon.com/yes-python-is-slow-and-i-dont-care-13763980b5a1 <comment><USER2> I was all ready to savage his opinion after reading the headline but I agree looking at my architecture that I designed for the company I work for, CPU isn't the bottleneck. Every time I try to increase performance by multi threading as much as possible, the databases start screaming.

On the other hand, the idea that dynamic languages are more productive than static languages are laughable. Statically type languages prevent a lot of bugs and allow for a lot of automated provably correct refactorings that simple cannot be done with a statically typed languages. You can't even reliably do a "find usages" of classes using a dynamically typed language.

<comment><USER3> >On the other hand, the idea that dynamic languages are more productive than static languages are laughable. Statically type languages prevent a lot of bugs and allow for a lot of automated provably correct refactorings that simple cannot be done with a statically typed languages. You can't even reliably do a "find usages" of classes using a dynamically typed languag

Exactly, I get quick and precise code completion, I catch plenty of errors beforehand etc. I'd say I'm about 10x as productive in C# as in Python, with similar amount of experience. Python only shines when there is a library that does something really well that you need. For me any productivity advantage in Python is from lots and lots of libraries.

Also in terms of maintainability, I find my C# code easy to read and modify a year later when I've forgotten completely about it. In Python I need to rescan all of the types into my head until I can understand what the program does.

I mean with var and dynamic, C# offers everything you need for duck typing efficiency, while preserving the very important statically typed interfaces.

<comment><USER4> >In Python I need to rescan all of the types into my head until I can understand what the program does.

Couldn't that be solved with sane variable naming conventions and docstrings/documentation?

<comment><USER2> Maybe. But it can be more easily solved on a strongly typed language where you can right click on a method and do "find usages" and it can. E done algorithmically.

</comment></comment></comment></comment><comment><USER5> I pretty much agree with everything in the article - except for the bit where he tries to quantify why python is better from a developer efficiency perspective than other languages.

The main example he cites is a study that compares the amount of time writing string processing routines in different languages - which is quite a bit different from the work I do every day. I develop web apps which means I generally work in very large code bases, and spend most of my time modifying existing code rather than writing fresh code from scratch. I have found that statically typed languages (java + typescript) and the fantastic IDE support that comes along with them make it really easy to navigate around the code and refactor things. Also - the compiler tends to catch and prevent a whole class of bugs that you might otherwise only catch at runtime in a dynamically typed language.

Of course there are other situations where I prefer to use Ruby as my scripting language of choice - it all comes down to using the right tool for the job at hand. Unfortunately I don't think the author gives enough consideration to the trade-offs between static vs. dynamically typed languages, and I think he would have been better just leaving that section out as it isn't really necessary to prove his point that CPU efficiency isn't important in a lot of applications.

Ultimately though I completely agree with his main point: "Optimize for your most expensive resource. That's YOU, not the computer."

</comment><comment><USER6> Python is also heavily used in science, where performance really does matter. It's successful because of how highly ergonomic python apis can be built on top of optimised C/C++/Fortran libraries.

That said, there is clearly a desire to write 'fast' code in python itself without swapping to C. Cython helps, but to get really fast Cython code you actually have to write with C-semantics (so you are basically writing C with Python syntax).

Projects like numba JIT are interesting in that they can optimise domain- specific code (i.e. numerical/array code) that's written in normal python style. It also means jumping through a few hoops (although with the latest version in many cases all you need is a single decorator on your hot function). You can even do GIL-less multithreading in some cases.

Overall things are looking promising, with the addition of the frame evaluation API and possible improvements to the python C-api that could make JIT and similar extentions easier.

</comment><comment><USER7> The author argues from his professional experience as a Python developer that it's fast enough, that you'll spend most time waiting for I/O anyway, that you can just throw more servers at the problem etc.

The problem is that his experience as a Python developer doesn't accurately reflect the prevalence of problems where runtime CPU performance actually is an issue. Of course not, because who in their right mind would make an informed decision to solve such a problem in Python? Python has worked for him because it is only useless for a category of problems that he hasn't had the opportunity to solve because he's a Python developer. Outside this professional experience, not everything is a trivially parallel web service that you can just throw more servers at if CPU time exceeds I/O waiting.

It all really boils down to what your requirements are, whether you have all the time and memory of a whole server park at your hands, or a fraction of the time available in a smaller embedded system, how timely the delivery of the software has to be and how timely it needs to deliver runtime results once it's up and running. There are times where Python just isn't fast enough, or where getting it fast enough is possible, but more convoluted and tricky than implementing the solution in a more performant language. Developer time may be more expensive than the platform that my solution is for, but that doesn't get around the fact that it eventually will need to run with the available resources.

</comment><comment><USER8> Unless we are talking like circa 1999 I don't think I have heard a complaint yet that Python is slow. I'm curious who or where the author heard that from (not specifically the people themselves but the domain they are in).

What I have heard complaints about Python are (and I don't agree with all these points):

* Its not statically typed

* The python 2/3 compatibility

* It has some design flaws: GIL, variable assigning, mutable variables, lambdas, indentation (I don't agree with all these but this is complaints I have heard).

* The plethora of packaging (ie its not unified)

I guess one could argue its slow because it can't do concurrency well but that really isn't raw speed.

Then the author started comparing string processing of programmer time from a study which... doesn't help the authors point at all.

* Python has and will always be fast at string processing and most people know this

* The people that complain about python speed are almost certainly not doing string processing

* I have serious questions about the study in general (many languages have changed quite a bit since then)

<comment><USER9> > I'm curious who or where the author heard that from (not specifically the > people themselves but the domain they are in).

In the telecom domain, I've dealt with data big enough that Python wasn't really feasible. Think 100 of millions of records in CSV format that need to be parsed and processed. Doing that in Python is going to be painful.

<comment><USER10> Python is insanely fast at data processing and analysis because it has very fast libraries.

As a matter of fact, don't know if you've heard, but data processing it kind of like.. Python's thing...

<comment><USER11> You're violently agreeing with each other.

Python _itself_ can be pretty slow. Doing image processing on data stored as list-of-lists-of-integers would be brutally slow.

On the other hand, numpy is an import away, and it can be quite fast, especially if it's been built with an optimized BLAS/ATLAS, etc.

<comment><USER12> By blazingly fast you mean 100x slower than C++ equivalent and only 20x slower is you're very careful to avoid accidental copies.

For reference, MATLAB is about 30x slower with no special care. Pure Java on Hotspot was 5x slower except it dies on big data input due to very slow GC and goes to 50x slow.

Source: handled big audio data from hdf5 database, gigabytes sized. C++ equivalent had no vectorization or magic BLAS or anything.

<comment><USER13> As I'll often say to these comments, then you're doing things wrong. Numpy code can be written to never leave the numpy sandbox, and at that point it should be as fast or faster than naive c++ (because you'll be getting SSE and stuff for free).

There's a reason almost all deep learning is done in python.

<comment><USER9> Not all data is a good fit for Numpy: some data is non-numeric or not a homogenous array.

> There's a reason almost all deep learning is done in python.

The heavy-lifting in e.g. TensorFlow is done in C++. Bindings to Python make sense because it is one of the few sanctioned languages inside Google, and it is widely used outside of Google and easy to pick up.

<comment><USER13> >The heavy-lifting in e.g. TensorFlow is done in C++. Bindings to Python make sense because it is one of the few sanctioned languages inside Google, and it is widely used outside of Google and easy to pick up.

That's exactly the same as with numpy. I'm not sure what your point is. C++ is also one of the few sanctioned languages inside google, as is Java.

>Not all data is a good fit for Numpy: some data is non-numeric or not a homogenous array.

I'm curious what kind of data you're working with that can't be represented and effectively transformed in a tensor (numpy array).

<comment><USER9> > That's exactly the same as with numpy. I'm not sure what your point is.

I was replying to "there's a reason why...". You didn't specify that reason, so from the rest of your comment I took it to mean that Python (with numpy) was fast and good enough to write deep learning stuff. That doesn't seem to be the case for TensorFlow.

> I'm curious what kind of data you're working with that can't be represented > and effectively transformed in a tensor (numpy array).

I'm not intimately familiar with the internals of numpy, but my understanding is that the basic data structure is a (multi-dimensional) array of values (not pointers). That leads to a number of questions.

If you have an array of records (dtype objects), and one of the fields is a string, am I correct that each element needs to allocate memory to hold the longest possible value that can occur for that field? What if that is not known beforehand?

How do you deal with optional fields (e.g. int or null)? Do you need to add a separate boolean to indicate null?

How do you deal with union types, e.g. each record can be one of x types, do you make a record that has a field for each of the fields of those x types? Do those fields take up space?

<comment><USER13> >You didn't specify that reason, so from the rest of your comment I took it to mean that Python (with numpy) was fast and good enough to write deep learning stuff. That doesn't seem to be the case for TensorFlow.

Tensorflow tensors are numpy arrays, or are transparently viewable as such.

>If you have an array of records (dtype objects), and one of the fields is a string, am I correct that each element needs to allocate memory to hold the longest possible value that can occur for that field? What if that is not known beforehand?

Yes, although you can also store numpy arrays of pyobjects, which are arrays of pointers. You'll be able to vectorize the code, but you won't get the same performance improvements as with a normal numpy array, because that same level of performance isn't possible with an array of pointers.

Note that for most machine learning applications, you'd preprocess your string into a vector of some kind.

>How do you deal with optional fields (e.g. int or null)? Do you need to add a separate boolean to indicate null?

Yes, but I'm not sure when you'd do that. That is, again in most machine learning applications you'd be representing things as one-hot arrays or as some kind of compressed high dimensional position vector, where 0 would represent a lack of presence of some thing.

>How do you deal with union types

dt = np.dtype((np.int32,{'real':(np.int16, 0),'imag':(np.int16, 2)})

is a 32 bit int that can also be accessed as a 16 bit complex number via .real and .imag.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER14> "It doesn't matter than Python is slow, besides we can use compiled libraries to speed it up"

"People saying it doesn't matter that Python is slow are deluding themselves and preventing Python from getting faster like JS did"

"Python is inherently harder to optimize than JS since it has <very dynamic features>"

"Smalltalk/Lisp/etc are also very dynamic yet are much faster"

"The slowness of Python is harming the planet by being inefficient and therefore wasting more energy/producing more pollution"

Did I miss any arguments? I know certain topics are bound to attract some repetitive discussion, but "Python is slow" has been one of the worst.

<comment><USER15> > "Python is inherently harder to optimize than JS since it has <very dynamic > features>"

Python is not a very dynamic language in the sense that you actually _can 't_ change a lot of stuff (and a number of the things you _can_ change just segfault CPython). I think JS is more dynamic, for example. Or Ruby.

<comment><USER14> These are not my arguments, mind you; I don't know enough to make them.

You've piqued my interest, though: can you give me an example of those things that you can't change or that break CPython?

<comment><USER15> Things like the Carlo Verre hack (also a thing you can't change —any more— in Python: builtins), editing objects during their construction (via e.g. gc)... generally, the gc module allows other ways as well to crash your interpreter.

        >>> import gc
        >>> 'foo'.lower()
        >>> gc.get_referents(str.__dict__)[0]['lower'] = str.upper
        >>> 'foo'.lower()
        segmentation fault (core dumped)  python

(That's the method lookup cache)

A talk in this direction is [https://www.youtube.com/watch?v=qCGofLIzX6g](https://www.youtube.com/watch?v=qCGofLIzX6g)

</comment></comment></comment></comment><comment><USER16> Python is my Swiss army knife. I love it because it is a single tool that can aid in almost every project I do. But if I'm doing one specific thing a lot, I want that thing to be done well and done efficiently, so I'll reach for the specific screwdriver I need.

Also most of my problems are IO bound so single threaded concurrency is fine.

But I represent a very small portion of the global problem space.

</comment><comment><USER17> The fact that Python is slow isn't its only problem. What I care more about nowadays is wasting my time hunting bugs that could have been avoided by a static type system.

<comment><USER18> Please tell me, do you write tests? I've learned that it's necessary. I do 100% code coverage and I'm enjoying TDD a lot.

<comment><USER19> The whole point of static type systems is that they give you the "type tests". 100% code coverage just to get what the compiler would give you is a waste of time. If python is supposed make developers more productive, this is just dragging them down.

</comment></comment></comment><comment><USER20> Python's value to me has always been that it's easier to get things done, not it's speed. One time when I was interviewing a candidate for a coding job, the candidate said she loved Python the most "because you can just yell at it and it'll work."

It's both the breadth of the standard library and ecosystem, and the simple language design, that make developing things in Python faster for me.

Doing problems on Project Euler has been an education for me in how algorithm matters more than speed. Lots and lots of people spend hours writing long C++ codes that are easily beaten by a few lines of Python. It certainly goes the other way too, and the wrong algorithm in Python is even that much slower and more painful than the right algorithm in C++. But when the right algorithm is used and the problem is solved in a few milliseconds, it really doesn't matter which language uses more CPU cycles, all that matters is whether you saw the insight that let you skip 99% of the search space, and how much time you spend writing code.

</comment><comment><USER21> Somewhat ironically, Python is used a lot for things that would benefit from raw speed (data processing pipelines) and do not benefit at all from dynamic typing (since the kind of property bags / data frame views over data are easily replicated in statically typed languages). But Python's C extension API is quite a bit easier than p.e. Matlab's MEX API (to me at least); can typical Python IDEs compile and relink extension modules without an external build step?

> Your bottleneck is most likely not CPU or Python itself.

With applications that are dominated by raw data processing, it's very, very easy to be CPU dominated. Hell, I had one quite trivial data converter for logfiles where the "parsing the printf string" part of Java's printf dominated processing and writing a custom formatter halved processing time (while regexes can be compiled, the format string cannot be precompiled and will be interpreted each time); it's one of those things where I would intuitively say "why did this moron write his custom formatter" if I stumbled upon it in a code review. Intuitively, you'd expect this to be a simple case of an IO dominated task (which it is now once the bottleneck has been removed).

If it's fire-and-forget batch jobs, you can get away with it, but if the converter is part of a user facing fat client application that runs on a old office laptop, you don't have that luxury.

</comment><comment><USER22> The article could be titled: "Yes, Python is Slow To Refactor and Maintain, and I Still Don't Care".

I never understand why dynamic language enthusiasts primarily focus on new code only. You have to discuss all sides of increased or decreased productivity to make a rational argument.

<comment><USER23> Python is optimized for getting interesting things done in a few lines of code. Small scripts you write once and then forget.

For serious projects? IMO python is a disaster.

</comment></comment><comment><USER24> > Your bottleneck is most likely not CPU or Python itself.

I've found that this is often the case. Nearly always disk or network. But it's sometimes surprising how little work you need to do to become CPU-bound. This is the price we pay for such a tremendously dynamic language.

Indeed, the article's suggestions of C/Cython/PyPy are good ones to remedy the problem when it occurs.

</comment><comment><USER25> I get the point this guy is making, but if you need something parallel for a cpu bound task, throwing more hardware at the problem isn't the most efficient solution if you can just use more cores. For example adding another quad core when the first cpu is only using one core anyway is inefficient and expensive.

Right tool for the right job I suppose.

<comment><USER26> Python does multiprocess very well. You can easily use all cores on your machine. Pythons main "disadvantage" is threading because of the GIL. But each process gets its own GIL. So when you multi process, your not limited to one core.

<comment><USER10> This. I had a problem where I needed to scrape roughly 20,000 html documents daily, which is normally a pretty slow task. You have to open the file, load it into memory, parse the DOM, and then run all of your selection methods. Sequentially, it took about 60 minutes daily. Multithreading slowed it down because it was CPU bound. Multiprocessing allowed me to run 12 processes across 8 cores. That took the total processing time down to about 4 minutes or so. And I was able to write the code in a day. Writing something similar in Java or C++ would have taken me a week.

</comment></comment></comment><comment><USER27> "It used to be the case that programs took a really long time to run. CPU's were expensive, memory was expensive. Running time of a program used to be an important metric."

As hardware gets faster we give it new tasks that could not be achieved before. Like rendering high resolution stereoscopic images using physically based shading at 90 FPS on relatively cheap consumer hadware (VR). There are still quite a lot of code that we call 'performance critical'. Most of that code is written in C/C++ (and CUDA and glsl, and hlsl, etc...) today.

<comment><USER28> It's still expensive on client machines because most of the persons in the world are NOT software engineers with 6-digit salaries.

They run cheap computers with HDDs and Windows polluted by a ton of 3rd party crap. They don't know how to fix it and silently suffer.

I was cleaning a local vet clinic's devices recently – they were literally switching between two computers to not wait 5 minutes of non-responsiveness because some bloated software was occasionally consuming 100% of CPU.

<comment> mark-r A lot of businesses these days prefer web apps. It's not hard to understand why - all the hassle of system maintenance falls to the people who host the app and can afford to know their stuff. If your Windows PC is suffering from rot just replace it with a Chromebook.

<comment><USER28> "Just get money for a new device out of thin air and just replace all your paid or even cracked Windows software with subscription-based alternatives that will not work without Internet. Ah, also just relearn all your workflows."

Sorry, but that's how being in a bubble looks like.

<comment> mark-r I wasn't suggesting that businesses were anxious to replace things that already work, I'm suggesting that as they acquire new software it's more likely to be web-based.

Devices are often replaced on a schedule anyway, especially if they're leased.

<comment><USER28> I wasn't talking only about businesses in my previous reply. But most businesses on the planet aren't bathing in money either.

You are speaking as a citizen of a rich country where devices are relatively cheap and stable Internet is available everywhere.

</comment></comment></comment></comment></comment></comment><comment><USER29> The problem is not so much that python is slow. It's that in some scenarios python can't be made fast.

Fast prototyping is great but being stuck with a prototype for deployment isn't.

<comment><USER30> >It's that in some scenarios python can't be made fast.

Can you give some examples of this? I mean, obviously with enough effort you can "make python fast" since it has good C bindings, and can just be a thin wrapper around fast stuff. Similar to how command line tools can be ridiculously fast[^1] despite, ostensibly, running in bash.

So I'm a bit confused about what you're claiming. Organizational issues, it's difficult to get management on board with an optimization pass?

[^1]: [https://aadrake.com/command-line-tools-can-be-235x-faster- th...](https://aadrake.com/command-line-tools-can-be-235x-faster-than-your- hadoop-cluster.html)

<comment><USER29> My point is do you have competent C programmers on your team?

That said, there is a point in some python prototypes where you "hit the performance wall". For whatever reason, you'll need to look at one of the options to make python faster and none of them are painless unless you're already a serious C programmer.

</comment></comment></comment><comment><USER30> There's are still some big gains python could make, if python implementations were better.

Micropython is equivalent to a real-time cooperative-multitasking OS. If it had ~~better~~ support for things like cffi, you could implement posix on top of it. I can imagine a laptop that runs gnu+python in the next few years.

That's a whole new usecase, simply because that implementation uses a lot less ram. What usecases would we discover for a faster python?

Shared objects and proper sandboxing would also be huge.

<comment><USER31> "There's are still some big gains python could make, if python implementations were better."

At this point, I would find it far easier to believe that you are underestimating the difficulty involved in what it takes to speed up Python than that there are enormous gains yet to be had in speeding up Python. I suspect JS has had more optimization effort expended overall, but Python has still had a ton of work by lots of smart people, and generally got an earlier head start on optimization. (They didn't start trying to make JS "fast" right away; they spent rather a lot of time getting JS's hookup to the DOM in the face of things like .innerHTML working first, before anyone even cared to do what we today do routinely without thought in plain ol' Javascript, let alone with our glorious frameworks.)

There are enormous gains to be had in speeding up "a language that is like Python except certain things are banned", but people have already done _that_ analysis too and discovered that broadly speaking, if you do that, too much existing Python breaks. If you want to see something like that, check out the RPython aspect of the PyPy project, which successfully implements a fast subset of Python. But it is a noticeably restricted subset of Python; AIUI it's not even close to something you can just drop in to your code and get faster speeds.

One of the things that I've learned from Python and the other attempts to speed up the scripting languages is that despite the mantra, yes, there _is_ in practice such a thing as an intrinsically slow language. (The theoretical existence of a Python interpreter that can run all existing Python code at C speeds doesn't do us much good if we have no idea after decades of very smart people banging on the problem how to manifest it. Personally I'd suspect that while such a beast theoretically exists it has an exponential complexity startup cost or, if you prefer, exponential compilation costs. And probably a pretty decent code and/or RAM bloat cost, too.) And Python is one of them. Some of the reasons why it is so much fun to use are part of that intrinsic slowness. Some of them really aren't.

I personally think there's a lot of up-and-coming languages that are exploring the space of how to get those nicer programming abstractions and programmer- convenient code without paying anywhere near the runtime cost that the dynamic scripting languages of today do; it's one of the more exciting developments I see coming up. People complain a lot about code bloat and poor performance of our code since right now we have to choose between "fairly inconvenient but fast" and "convenient but slow and bloated". Patience! Better choices are developing, but they're still young.

<comment><USER32> Will you please share the languages you thunk are up and coming?

<comment><USER31> Go is an early entrant into this space, but I think part of the reason it is early is also that it is less ambitious. But to answer the ever-present question on HN about "why would anyone ever use this language?", something modern, almost as easy to use as a scripting language [1], and almost as fast as a compiled language, doesn't actually have a lot of contenders. (Old fogeys... like me!... like to observe that if you drop modern you have some things like Delphi that fit that slot, but they're all pretty much dead now, and Go has good support for concurrency in the modern processor environment.)

In the "you probably can't convince your boss yet" category I'd recommend Crystal ([https://crystal-lang.org/](https://crystal-lang.org/)) and Nim ([https://nim-lang.org/](https://nim-lang.org/)).

Given the programming landscape and the general direction of things lately, I also bet there's a couple of serious contenders developing out there that haven't even hit HN yet.

[1]: For at least a broad class of problems. Put Go head-to-head with a problem someone would use NumPy for and Go will go down in flames in the ease- of-use and line count department. However I use Go for a lot of networks servers (not even necessarily Web servers, but network servers) and the line count for these comes out maybe 20% larger than Python, and it doesn't take much developer cognitive energy for those extra lines. I've also used Go for some command-line type apps where the line count is probably 50% over Python, but I also got some significant wins from the type system and concurrency, so, all in all there's a lot of things I can prototype with about the same mental effort in Go as I could in Python. Being able to declare interfaces that existing types conform to turns out to cover a surprising amount of those "duck-type" scripting-type cases.

</comment></comment></comment></comment><comment><USER33> This keeps getting posted, and while it makes some valid points, it's a lot of handwaving.

Arguably, other languages can get code out faster depending on the dev, language, etc.

<comment><USER34> Agreed. Things that are handwaved include:

1) Performance can be a genuine requirement of the product, i.e. if it's not fast enough, it doesn't ship. You can't ship faster and cheaper by sacrificing the thing you need to ship (well, you _can_ , but then you're shipping a different product, not meeting the same requirements sooner; it's no different than cutting a feature).

2) Many processes can't be horizontally scaled in an efficient way, period. Not because the programmer is ignorant of some cool algorithm, but because the problem is fundamentally expensive to parallelize. Maybe you end up getting something like a 20% boost by having twice as many nodes, even after applying all the cool algorithms. And you don't necessarily get that scalability in your code base for free, either.

3) "Speed" in the mobile and embedded spaces is often as much about energy efficiency and thermal management as getting done sooner.

4) The metrics for deciding that Python is faster to develop in only measure small problems. People tend to shy away from Python for bigger projects, and the reasons for this are pretty hotly debated.

</comment></comment><comment><USER35> Many times when Python is blamed for being slow, it's the programmers fault. Python is great that you can 'regular' people writing code in it quickly. The problem is, these regular people don't always understand algorithms or things like caches, threads, databases...

A lot of these users can just say "My department needs a $40,000 24 CPU server with maximum RAM from MicroWay/SuperMicro, we need to run our codes faster", when they are just trying to brute force things.

They understand the problem domain but don't have the programming skills to use a computer to efficiently solve it.

But, these guys are all a step ahead of the ones who are stuck in the mindset of "C is the only language fast enough for my work", while not even understanding pointers and basic syntax and getting stuck on silly things like text processing, which could be done in minutes in Python.

</comment><comment><USER26> Author here. Surprised to see this toping HN. Appreciate all the feedback. Let me know if you have any questions.

</comment><comment><USER36> Yes, time to market is important. However, you don't need to compromise convenience of development for the sake of performance. If you twist your Python code to get performance it takes time. If you need performance, and like the syntax of Python then you should take a look at Nim [1]. With Nim I develop as quickly as in Python while I get the performance of C.

[1] [https://nim-lang.org](https://nim-lang.org)

I believe application performance _is_ important on servers. It makes a difference if your Shop software written in Python is able to handle 50 requests per second, or if the same software written in Nim can handle 500 rps. And by the way, Nim provides static typing which helps a lot to catch errors at compile time.

<comment> cup-of-tea Nim seems really good, but does it have a decent REPL these days? I'm not sure if it would be as convenient with a statically typed language, but I like the incremental development approach so much that I only use C if I absolutely have to.

<comment><USER17> It doesn't. But you can grab Aporia (or some other tool) to quickly compile and run some code, it replaces a REPL very well in my experience.

</comment></comment></comment><comment><USER37> Premise: It's more important to be productive than to have fast code. Conclusion: Use Python. Is the premise true? For many cases- yes, but it depends. If you are running an application on the cloud and your metric is $/user/year and you have many users then saving some compute resources for each user gets attractive and you don't want to just throw another VM at it.

Is the conclusion true? Garbage collection gives big productivity gains. Other languages have GC. It's not nice to see your Python code die after a few days because you messed up the type passed to a function. Other languages fix that at compile time. Multicore is now. Other languages are built with better multicore awareness.

</comment><comment><USER38> > without getting stuck in the weeds of the small things such as whether you > should use a vector or an array

Yes, instead get into the weeds of tuple vs list

Not included in the graph of time-to-solve-problem static languages: statically typed languages with type inference

<comment><USER39> Given that they have exactly the same interface, that choice is really easy. You go with one until it turns out to be insufficient, and then you switch to the other and _not a single line of code_ has to change, except at the point where you create the thing.

Incidentally, the same is true in many situations in Python, and that is (IMO) one of its strengths.

</comment></comment><comment><USER40> > However, this is no longer true, as silicon is now cheap. Like really cheap. > Run time is no longer your most expensive resource.

Our client won't spend more money than a t2.medium instance on aws. Nothing we can do about it. In that case, run time does become an expensive resource.

But I get the point that OP is trying to make. Just wanted to mention that not all of us have the comfort of having enough resources on which our app runs.

</comment><comment><USER41> > It's more important to get stuff done than to make it go fast.

This is not a real absolute. It is only valid when what you have to run will not benefit a lot from performance or suffer a lot from lack of it.

The real guidance you can have in these matters is: how many times is my code going to run per second?

Some programs are written to be run once a day, others 10000000 times in a second. The first ones should be written in the language you're most productive in, the second ones in the fastest possible language.

</comment><comment><USER42> Putting aside the discussion regarding productivity, there is a case where I have found execution time to matter. Scaling an application which uses an unsharded database. The long transaction durations and number of connctions were bottlenecking db throughput. The particular app was a Ruby/Rails monolith.

</comment><comment><USER43> This sentiment is the reason for almost all software (especially on the web) beeing a load of crap. It's slow, it's buggy and developers always give the same excuse: CPUs and memory are cheap, therefore we can waste our customers time.

Imagine what we could do with the amazing hardware we have, if people started to do the sane thing and actually use the hardware to do things efficiently.

</comment><comment><USER44> Giving EvE Online as an example is bad because that game artificially slow the game loop to keep up with the number of players, would this happen with C++ on a recent architecture? Probably not.

</comment><comment><USER45> In "What if CPU time is an issue?" we could also mention the nim language (and not only cython) because it compiles (not only) to C and feels like python.

</comment><comment><USER46> I know it's not trendy, but I would argue PHP is as productive for developers as Python and has a MUCH faster runtime, particularly after 7.

</comment><comment><USER47> Slow doesn't matter when you scale horizontally.

</comment><comment><USER48> Yeah? Well, Jimmy Crack Corn and _I_ don't care.</comment>


Intab: Quick Look for Chrome - <AUTHOR> http://iansilber.com/intab/

<comment><USER2> Love the video. I will definitely give it a try! Funny part is that websites could implement the feature themselves...</comment>


The $300 YouTube video that earned a novice filmmaker a $30-million movie deal - <AUTHOR> http://hiphopo.posterous.com/the-300-youtube-video-that-earned-a-first-tim

<comment><USER2> <http://news.ycombinator.com/item?id=1001680></comment>


How to Multiply two 3-digit numbers together mentally in just one line - <AUTHOR>

http://mathema-tricks.blogspot.com/2012/04/multiplying-two-3-digit-numbers.html <comment><AUTHOR> [http://mathema-tricks.blogspot.com/2012/04/multiplying- two-3...](http://mathema-tricks.blogspot.com/2012/04/multiplying-two-3-digit- numbers.html)</comment>