Hacker Newsnew | past | comments | ask | show | jobs | submit | more BiteCode_dev's commentslogin

Which is what nuitka does. But the result doesn't allow for real time python programs, andy you don't get direct access to the hardware like here.


I wonder if this article was about an illuminated quran if it would have reached HN front page.

Religious scriptures for sale feels really weird on HN either way.


If you ever get the chance, visit the Aga Khan museum in Toronto. It has a number of illuminated Qurans, and they're absolutely gorgeous.


Mohamed would probably summarily have you killed, if that alters your perspective at all


Would he? There seems to be a tradition of illuminations of the Quran (see e.g. https://www.islamicity.org/77800/illumination-of-the-quran/, first result of an internet search). The style is quite different, since Islam forbids making representations of animated beings, but that didn't prevent the development of a rather exquisite craftmanship.


It's art, if you just want the text translated to kingon or L33t speak, you can down load that. No need for a jihad.


Or, you know, use numpy.


Yeah, that’s much more efficient.

But there’s something beautiful in the way that a Taylor expansion or a trigonometric identity emerge from the function definition. Also, it teaches an interesting concept in lazy evaluation.

I mean, why not write straight up assembler? That would be even more efficient…


Yes, and I hope we will steal obj destructuring soon as well.

I mean, they took "yield" and @decorator, we have a trade deficit.


You don't need iterators or decorators.

But normalizing one pattern ensures the whole community build API around it. This creates a unified ecosystem.

And it's a very clean API that is a no brainer for the string user.


That's what t-strings are about. They are lazy, so you can mark them for translation "as-is".


Does perl have lazy string processing? And I'm not talking about a coderefs hack.


t-string are lazy, which is the point (escaping HTML, translating strings when you get preferred language headers, preparing SQL statements...).

Does Ruby strings already allow lazy processing ?

I'm not talking about wrapping them in a block and passing the block (all languages can do that with a lambdas) but a having literally that eventually resolves to something when you use it.


That's seems like the wrong pattern, maybe I'm missing something.

Ruby has lazy evaluation with a generic lazy enumeration facility, whether to produce string or any kind of object.

That is, I don't know what is the actual behavior of the default string interpolation in Ruby, but if profiling a codebase some string generation would gain lazy evaluation, there is a path to do so. But in the general case, does it really matter? Chances are good that a string construction is not a big bottleneck.

Does Python miss such a feature of generic lazy enumeration, or is it so painful to use that some syntactic sugar felt like a must have? Genuine question here, I don't have any strong opinion on this t-string feature.


It has lazy enumeration with generators, but:

    - string construction is a hot path, you don't want them to always be lazy, especially since any access is slow in python.

    - having it using a string syntax is just very clean and easy to read. It's explicit and can be supported by good editor highlighting.

    - it's easy to grep, analyse for, substitute, etc.

    - you get one single unified API instead of thousands of variations. Translations API, log API and escaping API can all look the same, arguments are in the same shapes.


Thanks for the detailed answer.

I understand that string generation can be a hotpath, though I wouldn't take it as a general certain fact.

From what I understand here the benefit in term of performance is mainly due to partial application automatically handled by the interpreter. It's hard to me to jauge actual pro/con compared to Ruby which can also leverage on freezed string, lambda, miscellaneous lazy evaluation facilities for example. I'm not aware of anything close in PHP, to stay in the realm of popular interpreted languages. I didn't make any Lua for a long time, so no idea how it evolved on that matter.


You don't need interactivity for this, you just need "<img src="" />"


Which still isn’t perfect as images get cached at different stages depending on the email client.


Or can be blocked or are opaque to visually impaired.


It's "accelerated mobile pages" but I love the abuse version.


Well yes, obviously Google didn't actually name it for Abuse of Monopoly Power.


Not publicly, at least.

They've put some seriously dumb admissions in writing before.

https://www.techemails.com/p/sergey-brin-irate-call-from-ste...


They learned from this and now just have periodic arbitrary layoffs to depress salaries and keep the workers scared and in line in a deniable way instead of in an explicit way.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: