Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pansa2
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
151.
▲
by
pansa2
1y ago
CDs specifically are obsolete, but games on optical media are still a thing. Unlike ROM cartridges, which AFAICT died with the GBA in 2008.
152.
▲
by
pansa2
1y ago
> the language is not complex It's easy to get started with, but it's certainly not simple . Even small expressions like `a + b` or `a.b` in Python have very complex semantics.
153.
▲
by
pansa2
1y ago
Type hints aren’t a single addition - with every release they get more complex. It wouldn’t surprise me if the language included 20+ typing-related PEPs by now. The other obvious example of complexity is pattern matching. The feature is ver
154.
▲
by
pansa2
1y ago
> Those little 20-500 line scripts were just so much more fun in Python than anything else though It's notable that you've written this in the past tense. These kinds of scripts don't seem to be a focus for Python any mo
155.
▲
by
pansa2
1y ago
> For CLIs, it doesn't really matter. Actually, I'd say this is where Go has a real advantage. Are any other mainstream languages both garbage-collected (for ease of development) and native-compiled (for ease of distribution)
156.
▲
Generic Types: Adding Math Puzzles to Your Code (2021)
(patshaughnessy.net)
1 points
by
pansa2
1y ago
|
0 comments
157.
▲
by
pansa2
1y ago
> python is no longer the "learn in a weekend" language For the last 10 years, Python's evolution has been directed by professional developers working for large software companies, and they've focused on adding feat
158.
▲
by
pansa2
1y ago
> it’s a shame no language is as beautiful as Ruby [...] I really think it's a bad choice of Ruby not to care for types Do you think Ruby could change something so fundamental as dynamic => static typing and still retain its be
159.
▲
by
pansa2
1y ago
As long as you don’t need to do `hours := 8` and `+= hours * time.Hour`. Incredibly the only way to get that multiplication to work is to cast `hours` to a `time.Duration`. In Go, `int * Duration = error`, but `Duration * Duration = Duratio
160.
▲
by
pansa2
1y ago
Python doesn’t have one either
161.
▲
by
pansa2
1y ago
SED display? https://en.wikipedia.org/wiki/Surface-conduction_electron-em...
162.
▲
by
pansa2
1y ago
> vertically flat, 27in Trinitron Yes, the cylindrically-curved screen is distinctively Trinitron. It’s easy to spot one at-a-glance, whereas the later fully-flat models look much more like those from other brands. > I miss those b
163.
▲
by
pansa2
1y ago
> 4:3, so 1280x1024 That’s 5:4. The correct 4:3 resolution is indeed 1280x960.
164.
▲
by
pansa2
1y ago
> you simply don't understand what a match statement is It's "a DSL contrived to look like Python, and to be used inside of Python, but with very different semantics": https://discuss.python.org/t&#x
165.
▲
by
pansa2
1y ago
At least functional languages tend to have block scope, so the latter snippet introduces a new variable that shadows `not_found` instead of mutating it.
166.
▲
by
pansa2
1y ago
Doesn't matter what it is, it shouldn't break fundamental rules of the language. Ruby's `case`/`in` has the same problem.
167.
▲
by
pansa2
1y ago
The real crime is the design of Python's pattern matching in the first place: match status: case 404: return "Not found" not_found = 404 match status: case not_found: ret
168.
▲
by
pansa2
1y ago
Can you get away with just f-strings? Python also has `string.format` for situations where the string needs to be built dynamically. Are there languages which only have an f-string-like feature without a `string.format` equivalent?
169.
▲
by
pansa2
1y ago
> in the US the early eight-bit home machines gave way much earlier to consoles That’s my understanding as well. In the US the NES was huge in the late 80s, but in the UK home computers were dominant. The NES never sold well in the UK.
170.
▲
by
pansa2
1y ago
PyPy deserves much more credit (and much wider use) than it gets. The underperformance of the Faster CPython project [0] shows how difficult it is to optimize a Python implementation, and highlights just how impressive PyPy really is. [0] T
171.
▲
by
pansa2
1y ago
> Stackless Python Reminds me of ANTLR - another project whose name is the opposite of what it actually does.
172.
▲
by
pansa2
1y ago
> you have had to change quite a few things that are mutually incompatible between 2.x and 3.x I made those changes while still targeting 2.7: around 2018 I was writing code for 2.7 that was forward-compatible with 3.x, as was common a
173.
▲
by
pansa2
1y ago
> I recently chased down a bug where something was accidentally made a class variable because a type hint was left off it by accident That's the reverse situation to one I've come across - a novice accidentally wrote `a : 4`
174.
▲
by
pansa2
1y ago
> I feel like this started/greatly accelerated when Guido stepped down as BDFL Same, but I don't think that's the direct cause. Guido was actually in favor of all these features (as well as Walrus, of course) - so it
175.
▲
by
pansa2
1y ago
> I don't feel calling modern Match/Case syntax a "du-jour" feature is plausible I do. To be clear: I'm not saying that (well-designed versions of) pattern-matching will become less useful over time, but that t
176.
▲
by
pansa2
1y ago
> I like `gevent` but I think it may have been too hacky of a solution to be incorporated to the main runtime gevent's monkey-patching might be hacky, but an official implementation of stackful coroutines (similar to Lua's) n
177.
▲
by
pansa2
1y ago
Ruby is probably the most-similar popular language - a good choice for small projects/prototyping/exploratory programming. Personally I'm still using Python for this, but I'm basically still writing Python 2.7 (plus f-st
178.
▲
by
pansa2
1y ago
Nim is often recommended as an alternative to Python, but how similar is it? I know it has Python-like significant indentation, but I'd have thought syntax is the least important consideration when choosing a language?
179.
▲
by
pansa2
1y ago
> asyncio has so many sharp corners and design issues [...] bordering on being fundamentally broken > other languages and libraries did what asyncio does significantly better > it is baffling how the library made it out of pro
180.
▲
by
pansa2
1y ago
> Its a simple language No, it isn’t. This misconception is common and I don’t know where it comes from. Python is a very complex language hiding behind friendly syntax.
More ›