Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
adsharma
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
28 ms
·
361.
▲
by
adsharma
6y ago
Kotlin as a competitive next gen language In order for Kotlin to be taken seriously outside Android, especially in relation to Swift/Rust as a native language, it needs a few changes. 1. Make the compiler native binary and competitive
362.
▲
by
adsharma
6y ago
If it's just the syntax and muscle memory you are quibbling about, you can use python to write code and then transpile it to Julia. Link to github in my other comment in this article.
363.
▲
by
adsharma
6y ago
The lack of algebraic data types is what python gets criticisms about. That situation is improving, but I would have preferred match to be an expression rather than a statement. What else is missing in the python3 type system?
364.
▲
by
adsharma
6y ago
Python type system is improving. Another point in this ease of use vs type safety spectrum is python -> type safe language static compilation. I don't know which one is the best. So I've been experimenting with several. https:
365.
▲
by
adsharma
6y ago
A bonus for writing strongly typed code and using a small/safe subset of python is that you can transpile it to languages like rust or kotlin
366.
▲
by
adsharma
6y ago
I've been trying to find the motivation for making it a statement. Do you have links to any prior discussion? I maintain a transpiler that converts python to 6 type safe languages. Keeping match semantics similar makes it easier to tra
367.
▲
by
adsharma
6y ago
https://en.arguman.org/the-war-on-disinformation-is-a-war-on... trailing slash gives a 404
368.
▲
by
adsharma
6y ago
I summarized some of the arguments here: https://en.arguman.org/the-war-on-disinformation-is-a-war-on...
369.
▲
by
adsharma
6y ago
I haven't focused on performance yet. Thanks for the pointer! Gives me a concrete target to go after. https://github.com/adsharma/py2many/tree/main/tests/expected is a good place to understand
370.
▲
by
adsharma
6y ago
shameless plug: https://github.com/adsharma/py2many I didn't write the python -> C++ transpiler, but added a few features to common and added basic support in 6 other languages. It should be possible to generat
371.
▲
by
adsharma
6y ago
How long did it take you to write C++ vs python? What if you could write python and generate C++?
372.
▲
by
adsharma
6y ago
There is another way to speed up python: Write code in python and transpile to another language (could be rust) and then import it back into python https://github.com/adsharma/py2many/tree/main/tests/
373.
▲
by
adsharma
6y ago
I've messed around with activerecord for sqlalchemy :) https://twitter.com/arundsharma/status/1338596939600781313
374.
▲
by
adsharma
6y ago
The visual is indeed cool. I also thought it'd be nice to use a chat like interface to learn raft. Alice: /set a 1 Alice: /set b 2 Bob: /status Etc https://github.com/adsharma/zre_raft https:/
375.
▲
by
adsharma
6y ago
Charlie doesn't have to lose the data he saved on the plane. Don't know what the rqlite implementation does. In the second case, Alice-Bob consensus overrides Charlie
376.
▲
by
adsharma
6y ago
Better quality video: https://drive.google.com/file/d/1lmMgj76IpsX_YN4lNgqwKLexZDS...
377.
▲
by
adsharma
6y ago
If this is a concern for you, consider using the signal protocol without a server. CLI prototype. Can be generalized into a nice phone app. https://github.com/adsharma/zre_raft https://twitter.com/arund
378.
▲
by
adsharma
6y ago
Even if the clients are open source and if the verification of the protocol using ProVerif is sound, there is the possibility of a divergence between the "proof" and the implementation. This is why it's important to have them
379.
▲
by
adsharma
6y ago
python3 has type checkers. I like pyright. You can use protocols which are similar to Go interfaces. The benefit of go is really in performance and packaging.
380.
▲
by
adsharma
6y ago
Counter point: This has nothing to do with the programming language in question. The anti-abstraction, everything must be concrete argument leads to madness. You can do type oriented design with python3 or typescript. Since writing this, I&
381.
▲
by
adsharma
6y ago
The term "business logic" itself tends to be somewhat controversial: https://adsharma.github.io/flattools-programs/
382.
▲
by
adsharma
6y ago
I like their idea though. Encryption without a server. I independently implemented similar ideas over the holidays and then discovered that there were people with similar ideas. Code: https://github.com/adsharma/zre_raf
383.
▲
by
adsharma
6y ago
As a token of support, I implemented signal protocol in 250 lines of python. https://github.com/adsharma/zre_raft/blob/main/zre_raft/zre_... Hope more programmers understand how this works, implemen
384.
▲
by
adsharma
6y ago
Like you're suggesting, external data can be seen as a variant of literals embedded in code. https://www.python.org/dev/peps/pep-0589/ movie: Movie = {'name': 'Blade Runner',
385.
▲
by
adsharma
6y ago
I picked the trivial example on purpose to make the point that none of the top 5 programming languages do it, even if it was solved in the 80s. Recent languages like swift/kotlin (which I expect will see increased usage in coming years
386.
▲
by
adsharma
6y ago
Also see: https://rise4fun.com/fstar/tutorial Even though this sounds like formal verification gobbledygook, there is some information of practical value there. How many JSON validators have you seen in python and java
387.
▲
by
adsharma
6y ago
So when is kotlinc going to be rewritten in kotlin native/multiplatform? To be a serious competitor to rust/C++ compilation speeds matter.
388.
▲
by
adsharma
6y ago
https://adsharma.github.io/flattools-11222020.html supports unions and 4 popular type safe languages. The idea is that you'd write decorators in those languages to implement functionality similar to ksy or write a temp
389.
▲
by
adsharma
6y ago
I like the flatbuffer syntax as an IDL. It should be fairly trivial to write a tool to generate ksy https://adsharma.github.io/flattools-11222020.html
390.
▲
by
adsharma
6y ago
An idea that I submitted for discussion here: https://github.com/ppinard/dataclasses-sql/issues/4 My belief is that the django functionality can be added back in the form of decorators. I have similar work to
More ›