Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
bakery2k
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
61.
▲
by
bakery2k
8y ago
Compatibility with C extensions seems to be the most difficult thing for an alternative implementation to achieve. PyPy struggled with this for a long time, and IIRC extension compatibility also caused the failure of Dropbox's Pyston.
62.
▲
by
bakery2k
8y ago
Does an RTG count as "nuclear power"?
63.
▲
by
bakery2k
8y ago
It's a really good article! Nothing too advanced, but concisely explains a lot of the basic concepts of both a compiler and an interpreter.
64.
▲
by
bakery2k
8y ago
Isn't this how Python itself implements function calls, using the host (C) stack? Hence Python's lack of support for stackful coroutines?
65.
▲
by
bakery2k
8y ago
That's right - Guido has been very much in favour of adding type hints to Python. Are type hints Pythonic? I personally don't think so - to me, they don't match the philosophy of the rest of the language. On the other hand, o
66.
▲
by
bakery2k
8y ago
Isn't Nim, like Python, a large, complex language? Looking at the documentation, it seems to include a huge number of features.
67.
▲
by
bakery2k
8y ago
The Python equivalent of your JavaScript example is simply: def double(x): return x * 2 Python's `lambda` construct creates anonymous functions - its limitations mean it should only be used when anonymity is required. If a fun
68.
▲
by
bakery2k
8y ago
Would it be possible for Python's parser to handle the infix `->` syntax, without making it more complex than the current LL(1)?
69.
▲
by
bakery2k
8y ago
https://news.ycombinator.com/item?id=18759898
70.
▲
by
bakery2k
8y ago
In Australia, I've seen maps with North America in the top right .
71.
▲
by
bakery2k
8y ago
I've heard of this - people considering Python 2.7 as an "LTS" version of the language, receiving bug fixes but otherwise remaining unchanged for many years. I wonder, once 2.7 is EOL in a years time, whether the language dev
72.
▲
by
bakery2k
8y ago
No, IMO. Don't get me wrong, Python 3 is a better language than Python 2. I just don't think it's that much better that it was worth breaking backwards compatibility and stalling the language for several years. Python 3 did
73.
▲
by
bakery2k
8y ago
Is anyone using VirtualBox on the desktop? Specifically, to run Linux/macOS/Windows guests on a macOS host? Would you recommend it? Or is the best option VMware Fusion, Parallels, or something else?
74.
▲
by
bakery2k
8y ago
You're right, this is the same problem that Python has with closures, for example: >>> l = [] >>> for i in range(10): ... l.append(lambda: i) ... >>> for j in range(10): ...
75.
▲
by
bakery2k
8y ago
Your `f` is not a method, but a top-level function whose first parameter happens to be named `self`. You can't call `f` as a method of any object, because in Python (unlike Ruby) the top-level namespace is unrelated to the namespaces
76.
▲
by
bakery2k
8y ago
There doesn't seem to be any interest in checking type annotations at run-time. Unfortunately, without doing so, type annotations look authoritative but are essentially just comments. I believe Julia is an example of a dynamically-type
77.
▲
by
bakery2k
8y ago
You can't add methods to integers in Python, but they're still objects in the sense that you can call methods on them: >>> i = 123 >>> i.bit_length() 7
78.
▲
by
bakery2k
8y ago
> I've always thought there's a much simpler language struggling to get out of Python I agree, although I suspect we have different ideas as to which parts of Python would be included in that simpler language. For example, I qu
79.
▲
by
bakery2k
8y ago
> indentation-as-syntax -- which I've always hated What would you prefer? C-style syntax? Ruby-style `end end end`?
80.
▲
by
bakery2k
8y ago
Regarding reason 3 (syntax), I don't mind significant whitespace in itself, but it has knock-on effects which can be problematic. It's the direct cause of Python's `lambda` limitations [1], and IIRC the lack of an explicit en
81.
▲
by
bakery2k
8y ago
> `a.y() and do_x()` If you're happy to write it that way round, why not just use `if a.y(): do_x()`?
82.
▲
by
bakery2k
8y ago
I have replied to your post on /r/Python [1]. [1] https://www.reddit.com/r/Python/comments/9n18ot/ive_read_abo...
83.
▲
by
bakery2k
8y ago
Or, of course, for British surreal comedy groups.
84.
▲
by
bakery2k
8y ago
Python is, despite its simple appearance, a much more complex language than JavaScript. A V8 equivalent for Python is certainly possible, but would require even more work than went into creating V8 itself - who would be motivated to spend
85.
▲
by
bakery2k
8y ago
Doesn't Ruby essentially have a BDFL, i.e. Matz?
86.
▲
by
bakery2k
8y ago
There are a number of these lightweight, embeddable programming languages - few are particularly innovative. I have often wondered whether, rather than a new, very orthodox language, it would be more useful to have a lightweight implementat
87.
▲
by
bakery2k
8y ago
MicroPython is a subset of Python intended for resource-constrained embedded devices, unlike Gravity which is designed to be embedded in applications. This is a significant difference - a while back I considered embedding MicroPython in an
88.
▲
by
bakery2k
8y ago
Is it possible to embed Gravity in my C/C++ project and safely run untrusted Gravity code? The Lua implementation supports the creation of sandboxes to run untrusted scripts, but this is a feature that other embeddable languages (e.g
89.
▲
PEP 572 and decision-making in Python
(lwn.net)
1 points
by
bakery2k
8y ago
|
0 comments
90.
▲
Linux distributions and Python 2
(lwn.net)
3 points
by
bakery2k
8y ago
|
0 comments
More ›