Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pansa2
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
pansa2
7mo ago
Crystal’s syntax is similar to Ruby’s, but AFAIK the similarity more-or-less ends there.
32.
▲
by
pansa2
7mo ago
You’re right, of course: even Guido seems to have been moved off working on CPython and onto some tangentially-related AI technology. However, Faster CPython was supposed be a 4-year project, delivering a 1.5x speedup each year. AFAIK they
33.
▲
by
pansa2
7mo ago
PyPy is a fantastic achievement and deserves far more support than it gets. Microsoft’s “Faster CPython” team tried to make Python 5x faster but only achieved ~1.5x in four years - meanwhile PyPy has been running at over 5x faster for dec
34.
▲
by
pansa2
8mo ago
Fundamentally, CPUs use 0-based addresses. That's unavoidable. We can't choose to switch to 1-based indexing - either we use 0-based everywhere, or a mixture of 0-based and 1-based. Given the prevalence of off-by-one errors, I thi
35.
▲
by
pansa2
8mo ago
The reason many languages prefer `length` to `count`, I think, is that the former is clearly a noun and the latter could be a verb. `length` feels like a simple property of a container whereas `count` could be an algorithm. `countof` remove
36.
▲
by
pansa2
8mo ago
At least one of them is wrong
37.
▲
by
pansa2
8mo ago
Yeah, you could argue that choosing C is just choosing a particular subset of C++. The main difference from choosing a different subset, e.g. “Google C++” (i.e. writing C++ according to the Google style guide), is that the compiler enforces
38.
▲
by
pansa2
8mo ago
There’s also CimGUI. I know the underlying C++ library is well-regarded - I’m curious to hear people’s experiences using the C wrapper. https://github.com/cimgui/cimgui
39.
▲
by
pansa2
8mo ago
> statically-typed > Embed/extend in C Is Lily intended to be (or could it be used as) a statically-typed alternative to Lua? Personally I'm happy with dynamic typing for scripting - but I suspect many people would welco
40.
▲
Proposal: Generic Methods for Go
(github.com)
1 points
by
pansa2
9mo ago
|
0 comments
41.
▲
by
pansa2
9mo ago
Second-chance pool https://news.ycombinator.com/item?id=26998308
42.
▲
by
pansa2
9mo ago
> You basically need two pieces of state That’s enough for INDENT, but for DEDENT you also need a stack of previous indentation levels. That’s how, when the amount of indentation decreases, you know how many DEDENTs to emit. The requ
43.
▲
by
pansa2
9mo ago
> It's a pretty nice best-of-both-worlds arrangement It’s also a worst-of-both-worlds arrangement, in that you have to do the extra work to satisfy the type checker but don’t get the benefits of a compiled language in terms of per
44.
▲
by
pansa2
9mo ago
> Never had anyone "frown" towards me for not using MyPy or any typechecker either I’ve seen it many times. Here’s one of the more extreme examples, a highly-upvoted comment that describes not using type hints as “catastrophi
45.
▲
by
pansa2
9mo ago
AFAICT Python basically is a [statically-]typed language nowadays. Most people are using MyPy or an alternative typechecker, and the community frowns on those who aren’t.
46.
▲
by
pansa2
9mo ago
> you need to [use Git] to work with everyone else Programmers use different operating systems, editors, languages - is there any reason we all have to use the same source control tool? We weren’t doing so before Git came along.
47.
▲
by
pansa2
9mo ago
> OLEDs make great TVs and gaming monitors [...] But on desktop monitors for still things — text and fine lines — OLEDs currently just aren’t great It seems that LCD has long been the best technology for desktop monitors - but interest
48.
▲
The many advantages of dynamic languages (2020)
(erik-engheim.medium.com)
8 points
by
pansa2
9mo ago
|
0 comments
49.
▲
by
pansa2
9mo ago
6 is the product of the members of the set {2, 3}. 3 is the product of the members of {3}. 1 is the product of the members of the empty set.
50.
▲
by
pansa2
9mo ago
But can he invert a binary tree?
51.
▲
by
pansa2
9mo ago
Syntactically: From `~=` instead of `!=`, and no support for `+=` or `continue`, to free-form syntax with no statement separators - except in that one place where they're necessary. Semantically: Conflation of arrays and maps, conflati
52.
▲
by
pansa2
9mo ago
Mruby isn’t aimed at embedded systems, it’s “lightweight Ruby” intended to be embedded within a lower-level application. The language it’s most similar to is Lua. My gut feeling comparing the two is that mRuby is a better (or at least less
53.
▲
by
pansa2
9mo ago
How alike actually are Ruby and Crystal? I’ve heard the similarity is only skin-deep: similar syntax but quite different semantics. In other words, isn’t describing Crystal as “Ruby with types” similar to describing C++ as “JavaScript with
54.
▲
by
pansa2
10mo ago
Unladen Swallow got a lot of hype but was only a very small project. IIRC the only people working on it were two interns. V8 was a much higher priority - Google hired many of the world’s best VM engineers to develop it.
55.
▲
by
pansa2
10mo ago
> I would also say there’s generally less impetus to optimize CPython Nonetheless, Microsoft employed a whole "Faster CPython" team for 4 years - they targeted a 5x speedup but could only achieve ~1.5x. Why couldn't they
56.
▲
by
pansa2
10mo ago
> python - as a language - is way more "dynamic" than javascript Very true, but IMO the existence of PyPy proves that this doesn't necessarily prevent a fast implementation. I think the reason for CPython's poor per
57.
▲
by
pansa2
10mo ago
True. Choosing between the two languages usually comes down to their library ecosystems - or more bluntly, to Rails on one hand vs NumPy on the other. Nonetheless, it's still common for people to talk about the relative performance of
58.
▲
by
pansa2
10mo ago
> that’s faster In every test I've done, Ruby has been faster than Python. In my experience that's been the case since Ruby 1.9, with the move to YARV.
59.
▲
by
pansa2
10mo ago
> fastapi, pytorch, langchain, streamlit, and so on and on It's telling that your reasons for switching are all features of Python's ecosystem, not of the language itself. A lot of developers are moving to Python because of i
60.
▲
by
pansa2
10mo ago
If valid `data` can be zero, an empty string, or anything else “falsy”, then your version won’t handle those values correctly. It treats them the same as `None`, i.e. not found.
More ›