Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
adsharma
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
18 ms
·
241.
▲
by
adsharma
4y ago
Try searching for anything related to a database. Google's language model implicitly assumes that you are looking for spanner.
242.
▲
by
adsharma
4y ago
If your problem is with the runtime cost of python, do consider transpilers such as py2many that generate rust code. In order for this to succeed, python libraries would have to be rewritten without the C API in the dialect/subset of p
243.
▲
by
adsharma
4y ago
> It's not "useful" in the sense of being something that you'd actually run. What if we could actually run it (stay with me for a second) with a well known interpreter such as python3 or v8? That is the direction py2m
244.
▲
by
adsharma
4y ago
Because python is #2 on the most used languages list, has great tooling, IDE support, has been around for 30+ years. It's been used to build serious large scale projects. The idea is that you can get great runtime performance by transp
245.
▲
by
adsharma
4y ago
Cython doesn't consume python3 type hints and needs special type hints of its own. But it's certainly more mature than other players in the field. What we need is a rpython suitable for app programming and a stdlib written in that
246.
▲
by
adsharma
4y ago
Try py2many may be? 7-8 supported target languages, although it began with c++14 as the py14 project.
247.
▲
by
adsharma
4y ago
It'd be interesting to write code in a concise, easy to learn/grok language and then transpile to a faster systems language and recompute the PAIN score. I spent a few months last year pursuing that approach (py2many on github). W
248.
▲
by
adsharma
4y ago
rpython is designed to write new interpreters. Not aware of many apps written in the rpython dialect. There are bunch of transpilers which might provide a path from statically typed python3 to native binaries. py2many is one of them. The do
249.
▲
by
adsharma
4y ago
You can transpile this to a more efficient systems language using py2many or another transpiler and all these problems go away if you're willing to sacrifice some of the dynamic features of the language and embrace static types.
250.
▲
by
adsharma
5y ago
> emotional response That makes it a social network optimized for engagement. Someone posted a link to you.com in another sub thread. The results for the same query over there is what I'd expect. I'm thinking that living in a d
251.
▲
by
adsharma
5y ago
Right - this was called result diversity. But in markets like the US, where avg revenue per user is high, polarization is also high and there is some belief that big software companies have a role in changing societal wrongthink, you get th
252.
▲
by
adsharma
5y ago
Here's the logged out search result in the US: https://smallpdf.com/result#r=65aec01a358fb33d67f37736c8c099...
253.
▲
by
adsharma
5y ago
Try "testing" as a sample query. I only see results about covid testing. Would love to see dictionary like factual results instead of reflecting the controversial topics of the day based on what people are clicking on. If in fact
254.
▲
by
adsharma
5y ago
Agreed on the need to write simpler programs with less cognitive load. The thing about wuffs is that you can't single step through it and there is no ecosystem of libraries a wuffs programmer could use. This is why a subset of python t
255.
▲
by
adsharma
5y ago
I'm aware of it, but prefer a subset accepted by static type checkers over a superset.
256.
▲
by
adsharma
5y ago
Also see: https://github.com/adsharma/py2many/blob/main/doc/langspec.m...
257.
▲
by
adsharma
5y ago
I'm surprised that no one brought up using a subset of python with an emphasis on static typing, efficiency and transpilation can give you both the ecosystem and the efficiency.
258.
▲
by
adsharma
5y ago
No intermediate AST. To understand the various stages of transpilation and separation of language specific and independent rewriters, this file is a good starting point: https://github.com/adsharma/py2many/blob
259.
▲
by
adsharma
5y ago
This is awesome! The direction of using a subset of python, while leveraging the user base and static typing to accomplish some other everyday task in a different language is very legit IMO. I took a cursory look at: https://gith
260.
▲
by
adsharma
5y ago
Grumpy is unmaintained.There is similar work (py2many) that transpiles python3 to 8 different languages. The approach focuses on functional programming, does away with extensions completely. For that approach to be successful, a pure python
261.
▲
by
adsharma
5y ago
Why not write python and transpile to Go? Py2many, grumpy etc can do this.
262.
▲
by
adsharma
5y ago
The biggest performance problems with python involve the GIL, highly dynamic runtime and an extension API that exposes internals. I believe moving python towards a more static type system, functional programming and transpilation to other l
263.
▲
by
adsharma
5y ago
Link to the test that's relevant for this discussion: https://github.com/adsharma/py2many/blob/main/tests/cases/in... This is an explicit deviation from python's bigint, which doesn&#
264.
▲
by
adsharma
5y ago
This is basically the solution py2many uses for handling overflow from fixed width integer types when transpiling from python to low level systemsy languages such as Rust/C++ and Go. Please file bugs if something deviates from what
265.
▲
by
adsharma
5y ago
Why not do both? cat test.py | py2many --nim=1 - http://dpaste.com//5ALVT7MK4
266.
▲
by
adsharma
5y ago
Some more discussion in this thread https://mail.python.org/archives/list/typing-sig@python.org/... I have a fork of the "adt" library that supports sealed classes. For static type checking, I'
267.
▲
by
adsharma
5y ago
You can also think of Cython as a .pyx -> .c transpiler, but it tries to build a python C extension primarily. Py2many tries to primarily build a standalone C program without the python runtime, although it supports a --extension flag, w
268.
▲
by
adsharma
5y ago
cython requires you to express types in a special way (cdef int in a .pyx file). py2many uses standard python3 types plus a few derived from ctypes, with rust compatible names.
269.
▲
by
adsharma
5y ago
> Python evaluates the match expression One other limitation from the perspective of people looking to transpile static python to other languages: match is a statement, not an expression in the language. I've been looking to define
270.
▲
by
adsharma
5y ago
If you stick to this subset of python https://github.com/adsharma/py2many/blob/main/doc/langspec.m... The tool can convert your code to C++/Rust/Go and give you a native binary which like
More ›