Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
adsharma
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
29 ms
·
331.
▲
by
adsharma
5y ago
Code in python and generate C++. That's my happy place.
332.
▲
by
adsharma
5y ago
Try http://github.com/adsharma/py2many tests/expected/*.go has generally human readable code.
333.
▲
by
adsharma
5y ago
Did you rewrite it by hand or use a transpiler?
334.
▲
by
adsharma
5y ago
https://github.com/adsharma/py2many/issues/168 Please add details if any
335.
▲
by
adsharma
5y ago
Could you open an issue for me on github? It shouldn't be hard to get hello world working. Bringing it to the same level as other languages is probably several weeks of work. Pull requests welcome.
336.
▲
by
adsharma
5y ago
Looking for feedback here. How many programmers actually know this and expect it? Is it worth the extra complexity when translating to static languages which don't provide this guarantee? From an implementation perspective, doing it fo
337.
▲
by
adsharma
5y ago
This one is more aimed at everyday business applications, including mobile apps and web apps.
338.
▲
by
adsharma
5y ago
I haven't formally defined the supported subset. The 16 test cases, especially coverage.py should give you a sense. JavaScript is possible via python to dart to JavaScript. Adding another backend is easy, given there are 7 backends alr
339.
▲
Show HN: Py2many – Transpile Python3 to 7 languages
(github.com)
9 points
by
adsharma
5y ago
|
13 comments
340.
▲
by
adsharma
5y ago
Can compile the following 16 python programs to 7 languages, compile and run the resulting code and produce the same output as the source python. https://github.com/adsharma/py2many/tree/main/tests/c
341.
▲
by
adsharma
5y ago
I find it easier to develop apps in Gtk Python. But I can see how Vala might be more performant. Towards this end I've worked on a transpiler (py2many). Any suggestions on what language Python should be transpiled to for the best Gtk r
342.
▲
by
adsharma
5y ago
Replace UML with python data classes. You'll be much happier
343.
▲
by
adsharma
5y ago
./py2many.py --julia=1 list_py_annotations.py produces https://paste.ubuntu.com/p/vwxYkppRCw/
344.
▲
by
adsharma
5y ago
py2many doesn't care which language is faster as long as the source language is annotated python3. I don't know if this particular benchmark transpiles correctly or not, but it should be possible to achieve much speedup if you ann
345.
▲
by
adsharma
6y ago
Also see: https://github.com/oxan/djangorestframework-dataclasses/issu... on how this could work. The author wasn't interested, but I might pursue it in a fork.
346.
▲
by
adsharma
6y ago
I explore this topic in my blog post from a few months ago: https://adsharma.github.io/flattools-programs/ In short, django models are written using a very low level of abstraction. I much prefer dataclasses generated
347.
▲
by
adsharma
6y ago
I wrote such a C++ implementation during my days at Facebook around 8 years ago: https://engineering.fb.com/2016/03/18/data-infrastructure/dr... There is an example under "Functional programming pri
348.
▲
by
adsharma
6y ago
There is another way to add value over python. Transpile python to Julia. One place where Julia has an opportunity is to make easily distributable small binaries, which work better than par files.
349.
▲
by
adsharma
6y ago
If you're wondering how to get some adoption without having a killer app written in your language - in this case Zig, there is a second way: Take programs in an already popular language and transpile the code to your language. One of m
350.
▲
by
adsharma
6y ago
Given the tracking cookie situation, apps could refuse to install if that option is turned on. They can easily detect if they see a small number of contacts relative to average. With the two address book solution, they should have no way of
351.
▲
by
adsharma
6y ago
I wonder if people have thought about another variant of this. An app that maintains two address books and switches between them based on context.
352.
▲
by
adsharma
6y ago
Re: Conways law at Facebook I was at Facebook when GraphQL was invented, maintaining a backend storage service where a core assumption was that storage should be reorganized based on access patterns and that predicates should be pushed down
353.
▲
by
adsharma
6y ago
The idea behind https://github.com/adsharma/py2many is that you can still write: del a[i] and have the go code auto generated. py2many doesn't do that yet, but you can teach it to.
354.
▲
by
adsharma
6y ago
It would be cool to teach the python static type checkers such as pyright and mypy to do the same validation as pydantic, marshmallow. Then you could use dataclasses and map them to the database via sqlalchemy. https://github.com
355.
▲
by
adsharma
6y ago
Rewrite vs Transpile I see references to "fixing" C and rewriting. An alternative would be to transpile a memory safe, easy to program language such as python3 and generate code in a memory safe language. Since I don't know w
356.
▲
by
adsharma
6y ago
So much discussion about about work life balance and toxic managers, but not enough about exactly what you've accomplished by working all these hours? Did you write another object relational manager or another functional programming is
357.
▲
by
adsharma
6y ago
Computing tax Noticed this comment. https://github.com/thegrims/UsTaxes/blob/master/src/irsForms... I wrote some python a few years ago for this purpose https://github.com/adsharma&#
358.
▲
by
adsharma
6y ago
Both iOS and Android use garbage collected memory. It's just that iOS uses simpler garbage collection in the form of ARC. KMM code runs fine on JVM right? If you start from JVM code, yeah it needs to be rewritten, but that's not t
359.
▲
by
adsharma
6y ago
I get that you're not particularly excited about gradual typing and the fact that type checkers are optional and live in a separate ecosystem from the interpreter/language runtime. I actually like the fact that python code without
360.
▲
by
adsharma
6y ago
I meant KMM (Kotlin Mobile multi-platform). Not aware of write once and run twice (iOS and Android) apps in these languages. Jetbrains recently removed working Linux support for KMM as a host platform.
More ›