Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pansa2
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
85 ms
·
661.
▲
by
pansa2
6y ago
> was PyPi actually named Cheese Shop?! Yes. That’s why the packages you download from PyPI are called “wheels”.
662.
▲
by
pansa2
6y ago
You mention "Writing an Interpreter in Go" - are you familiar with the similar book, "Crafting Interpreters" [0]? It's highly recommended by many but, again, may be more implementation-oriented than you're look
663.
▲
by
pansa2
6y ago
> 5 different object systems This is an issue in Lua as well. The language is unopinionated and designed to offer “mechanism, not policy”, meaning you can design your own object system based on the language-provided primitives. The pro
664.
▲
by
pansa2
6y ago
> deliberately whimsical terminology, puns in their programs Python was like this as well, the language is even named after a comedy group. Perhaps as the culture has changed, Python has done a better job of adapting (e.g. changing the
665.
▲
by
pansa2
6y ago
> How to study programming language theory I think the information you're looking for would probably come under the umbrella of "Programming Language Design", not "Programming Language Theory" (PLT). Discussion
666.
▲
by
pansa2
6y ago
Can multiple Tcl interpreters run truly parallel on different threads in the same process? That’s possible with Lua but AFAIK not with Python, because one of the pieces of global Python interpreter state is the Global Interpreter Lock. Enca
667.
▲
by
pansa2
6y ago
One obvious improvement here is the use of `HPyContext`. This allows the Python interpreter state to be encapsulated rather than globally-accessible, which would enable multiple interpreters in a single process. Lua’s C API is generally con
668.
▲
by
pansa2
6y ago
> In c, with no dependencies, and -Werror disabled, it is likely decades. How might C code like this eventually fail, assuming future C standards remain backwards-compatible? Perhaps because C code is likely to contain (currently benig
669.
▲
by
pansa2
6y ago
One issue I have with (pure) OOP is the way that methods are associated with a single type (and its subtypes). What about operations that don’t naturally belong to any one type? For example, binary operator overloading. With unrelated class
670.
▲
by
pansa2
6y ago
I see, thanks. Looks like static compilation will only work if the entire program is “type stable”, which AFAICT means that the type of every variable can be deduced statically.
671.
▲
by
pansa2
6y ago
Elsewhere someone says “Fib was around 44kb with no runtime required”. Which is correct?
672.
▲
by
pansa2
6y ago
Why shouldn’t they be bundled together? They’re completely interdependent - each is useless without the other.
673.
▲
by
pansa2
6y ago
Thanks, I missed that the Go code in the article was only performing a "128-bit / 64-bit" division. However, based on this comment [0], it looks like Go does use Knuth's algorithm when dividing arbitrary-precision intege
674.
▲
by
pansa2
6y ago
> IIRC, both (well, CPython and MRI) internally use distinct “small integer” and “big integer" representations, but that is transparent to the user. This seems to be correct for MRI. Before Ruby 2.4, both `Fixnum` and `Bignum` wer
675.
▲
by
pansa2
6y ago
Nothing is unboxed in CPython. Other implementations differ - for example, MicroPython supports several encodings for unboxed values. https://github.com/micropython/micropython/blob/4fc2866f4569...
676.
▲
by
pansa2
6y ago
So, Golang and V8 both use this algorithm when you choose to use an arbitrary-precision integer type. In Python (and Ruby?), all integers are arbitrary-precision - do those languages also use this algorithm for division?
677.
▲
by
pansa2
6y ago
The tool could be extended to support Unicode, whereas AFAIK it would not be possible to extend it to support backreferences. Are there any other “regex” features that would be impossible to support?
678.
▲
by
pansa2
6y ago
> sonic boom-less aircraft Here’s a theoretical example: https://en.wikipedia.org/wiki/Busemann_biplane
679.
▲
by
pansa2
6y ago
What are the limitations of regular expressions compiled in this way, compared to things like Python’s `re` module? Is it just that they can’t support backreferences?
680.
▲
by
pansa2
6y ago
> there should be preferably ten thousand subtle different ways of doing things This doesn’t sound elegant (meaning “pleasingly ingenious and simple”) at all. It also only seems readable in the most shallow sense - certainly not u
681.
▲
by
pansa2
6y ago
> I’ve never declared a variable and not simultaneously thought “this is going to be a float, always a float, never not a float.” Never written generic/template code? Making that much easier is one of the main benefits of dynamic
682.
▲
by
pansa2
6y ago
> automatically multiplexing the lightweight threads onto a smaller number of OS threads For Crystal 1.0, the number of OS threads is always 1, isn’t it? So although this provides concurrency, it’s less powerful than Go where the same
683.
▲
by
pansa2
6y ago
> Python itself is an extremely simple language Unfortunately that’s not true at all - Python is far from simple. Sure, it’s no C++, but it’s very complex compared to languages like C, Go, Lua, even JavaScript.
684.
▲
by
pansa2
6y ago
Here’s a quote from Rob Pike (in 2015) about what Go was trying to avoid: "Java, JavaScript (ECMAScript), Typescript, C#, C++, Hack (PHP), and more [...] actively borrow features from one another. They are converging into a single huge
685.
▲
by
pansa2
6y ago
Either you need to restrict arithmetic to values which can’t overflow, or yes, you need to check for overflow manually. Note that you need to do those checks without actually triggering the overflow because once undefined behaviour is possi
686.
▲
by
pansa2
6y ago
> The standard simply is not important Does the Linux kernel still only support compilation using gcc? That’s about the only situation in which the standard could be considered “not important”. I wonder how many other C projects are in
687.
▲
by
pansa2
6y ago
> There is no simpler language inside Rust that has the same safety guarantees, unless you strip out other useful features (traits, async, etc.). This sounds like “there is no simpler language inside C++, unless you strip out useful fe
688.
▲
by
pansa2
6y ago
> I'm certain my code is not as performant If you don’t need maximum-possible performance, though, why use Rust/C/C++ at all? Wouldn’t a better choice be Go/Java/C#?
689.
▲
by
pansa2
6y ago
> Temporal memory safety and data race safety. [...] Unique to rust. [...] add a significant amount of complexity to the language. Rust seems to be a very complex language. Is all that complexity essential to providing memory safety wi
690.
▲
by
pansa2
6y ago
That C# example is so much nicer than Python’s approach of casually breaking fundamental programming principles [0]. I wonder why Python’s designers didn’t use something similar? [0] https://twitter.com/brandon_rhodes/s
More ›