Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
adsharma
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
271.
▲
by
adsharma
5y ago
Renaming the language in the future is still a possibility. For now, all the tests here: https://github.com/adsharma/py2many/tree/main/tests/cases are run with cpython interpreter and verified for c
272.
▲
by
adsharma
5y ago
Yes - Julia also has a pretty good JIT too, but doesn't have a great story on AOT compiled binaries. If you're finding it easy to write a quick command line tool in python, but end up rewriting it in another language for size/
273.
▲
by
adsharma
5y ago
Doesn't use python's C API or runtime. So no metaclasses, monkey patching, eval(). All types must be known at compile time or it should be possible to infer them. There are several challenges to solve - translating stdlib of one l
274.
▲
by
adsharma
5y ago
Extreme compatibility has a cost. If you're willing to give up some compatibility, you could get faster code that can be checked statically by transpiling to one of the many great choices from a set of statically typed languages. This
275.
▲
by
adsharma
5y ago
I'm looking to do something in this general area better than doctests. Looking for collaborators. http://adsharma.github.io/pysmt
276.
▲
by
adsharma
5y ago
Z3-solver is a popular backend for specifying properties about programs. Dafny, Viper, Boogie are all systems built on top of it. The issue is that much real world software is not written in these languages (or Haskell) Typescript and pytho
277.
▲
by
adsharma
5y ago
What does an ideal solution look like in your view? Do snapshot queries help, so you're protected from concurrent changes? With fquery ( https://adsharma.github.io/fquery/ ), the problem boils down to constructing a
278.
▲
by
adsharma
5y ago
Similar benefits without codegen (based on decorator magic) for a python based stack: https://github.com/adsharma/fquery * Use dataclasses for both database schema and the user facing operations * use decorators
279.
▲
by
adsharma
5y ago
I thought SMT2 (what you can feed to z3 -smt2), is a s-expression language that is the lowest level ("bytecode") thing. If you look at Dafny/Boogie, boogie is a much more human readable IR. I'm trying to build a pythonic
280.
▲
by
adsharma
5y ago
Love the ideas! I'm coming at it from the other side - I worked on a transpiler that targets 7+ languages already. Also started with python, to avoid javascript warts that typescript carries forward for compatibility reasons. But hey,
281.
▲
by
adsharma
5y ago
Any chance of supporting python? I have similar plans with py2many and http://adsharma.github.io/pysmt
282.
▲
by
adsharma
5y ago
https://www.microsoft.com/en-us/research/blog/p-programming-... makes the case better than I can on why it's important to have the specification and implementation come from the same source as opposed to
283.
▲
by
adsharma
5y ago
My intention is to reuse the rust type system where we can and yet keep the language small enough to be able to implement and verify non-trivial real world programs. https://github.com/adsharma/py2many/blob/ma
284.
▲
by
adsharma
5y ago
Author seems to be using https://github.com/ailidani/paxi for actual implementation and proof. I'm more of a python/rust guy. There have been some attempts to make model checkers in rust: https://g
285.
▲
by
adsharma
5y ago
Also exposes the underlying dataclasses as graphql types and capable of converting them to django models via decorators. I've tested that basic migrations work. The schema export as json in the original article can be used to generate
286.
▲
by
adsharma
5y ago
resp = ( await DepartmentQuery([1,2]) .edge("employees") .project(["name", "start_date", ":id"]) .to_json() ) https://github.com/adsharma/fquery&
287.
▲
by
adsharma
5y ago
https://github.com/adsharma/fquery/ https://adsharma.github.io/fquery/ Uses python expressions and generates SQL. Also does static typing, so you can run a type checker on the code
288.
▲
by
adsharma
5y ago
I'm interested in similar proposals that can provide the basis of some common syntax that could be transpiled to other functional programming languages https://github.com/adsharma/py2many I'm less interested
289.
▲
by
adsharma
5y ago
I think people focus much on syntax and not enough on semantics. After working on 2-3 iterations of similar languages (sexpressions, clojure enhanced with pipe operator), my take away is to define an API (not a new language) and support mul
290.
▲
by
adsharma
5y ago
Fat models are clearly a bad idea. But DDD (also called view models elsewhere in this discussion) seem to be better than function based views. My bias comes from working in a dot-com era startup which had a single 2000 line java function to
291.
▲
by
adsharma
5y ago
> But even if we don't get the full benefits of static typing (more useful IDEs, better performance, eliminating certain classes of errors, etc.), at least we mostly don't have to deal with the insane errors that you get with i
292.
▲
by
adsharma
5y ago
The issue with fat models is that if you use DB models and then put business logic in there (assuming that's what you mean by fat models), things fail pretty quickly. But like you rightly point out here that is not a good reason to avo
293.
▲
by
adsharma
5y ago
I'm open to having another syntax, another parser that produces the same AST. Let the market decide. No borrow checker concepts in the source, but transpiled rust code of course uses the borrow checker. The python standard library is w
294.
▲
by
adsharma
5y ago
Would your users be ok with something like this? Python syntax, rust concepts and transpiles to rust (and 6 other languages) https://twitter.com/arundsharma/status/1407229297392115713
295.
▲
by
adsharma
5y ago
https://github.com/adsharma/py2many pip3 install py2many py2many --nim=1 foo.py
296.
▲
by
adsharma
5y ago
py2many transpiles py3 to nim. Think of python as a way to interpret nim code if you like, with a large installed base of existing libraries. There is demand for iterative creation of software: first get the logic out with the least frictio
297.
▲
by
adsharma
5y ago
It should still be possible to use the python syntax and a reimplemented stdlib to build a statically typed, typesafe variant. I think you object to the name python3, because there is a duck typed interpreter that's popular.
298.
▲
by
adsharma
5y ago
Why do you think python3 is not typesafe?
299.
▲
by
adsharma
5y ago
I'm sympathetic to this point of view. But then there is 25 yrs of stdlib that's tattooed onto people's brains and stackoverflow. A pure python implementation of python stdlib ready be transpiled could be that bridge. Also it
300.
▲
by
adsharma
5y ago
Please try py2many, which targets this use case. Go, rust, C++ are among the 7 supported backends. http://github.com/adsharma/py2many
More ›