Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
trotterdylan
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
Show HN: Create a web accessible URL for your CV or resume
(cv.studio)
19 points
by
trotterdylan
2y ago
|
2 comments
2.
▲
by
trotterdylan
2y ago
Hey HN, I’m one of the creators. We’re always dealing with each WYSIWYG’s quirks, strengths, and licensing. It’s tedious. Being able to preview and compare them in one place really speeds up picking the right editor for each project. Hope i
3.
▲
Show HN: AirQL: An Airtable API with OAuth2 access control and permissions
(airql.dev)
9 points
by
trotterdylan
4y ago
|
0 comments
4.
▲
Easily run a Docker container in a transient GCE VM instance
(github.com)
5 points
by
trotterdylan
4y ago
|
0 comments
5.
▲
How to Invest in Software Infrastructure
(linkedin.com)
11 points
by
trotterdylan
6y ago
|
0 comments
6.
▲
Moving Forward on Android with GraphQL
(thumbtack.com)
2 points
by
trotterdylan
8y ago
|
0 comments
7.
▲
by
trotterdylan
10y ago
We hope to implement optimizations like you're describing eventually. But the core functionality needs a lot of work before we start down that path.
8.
▲
by
trotterdylan
10y ago
Correct, Grumpy cannot yet run Grumpy :)
9.
▲
by
trotterdylan
10y ago
Ugh, sorry about that. There's a couple issues here: 1. Lambda tuple args are not yet supported -- I actually didn't know that was a thing :\ -- https://github.com/google/grumpy/issues/17 2. Even if
10.
▲
by
trotterdylan
10y ago
It's all good. Thanks for filing the issue. I'll get that fixed.
11.
▲
by
trotterdylan
10y ago
Whoops, just noticed you (or somebody) had already filed it: https://github.com/google/grumpy/issues/12
12.
▲
by
trotterdylan
10y ago
Unfortunately the native interface is still pretty immature so I can't guarantee things will work as they should. In this case, I think the problem is that you have a *Response object which is not itself a struct. I've rewritten t
13.
▲
by
trotterdylan
10y ago
Yes, leveraging type hints for optimization purposes is a long term goal. Thanks for pointing me to that issue, I'll keep an eye on it. One of the goals of open sourcing was to get feedback and work with outside folks so I'm defin
14.
▲
by
trotterdylan
10y ago
The idea is to continue to write code in Python. The transpiled code is not suitable for working with directly. That said, there is the possibility of rewriting bits and pieces in Go (e.g. performance critical stuff) and then call into it f
15.
▲
by
trotterdylan
10y ago
> I would love to know how big the codebase is. Sorry, can't be very specific, but rewriting all the frontend code would take a lot more effort than writing a new Python runtime :) > It seems like writing a translator to deal wit
16.
▲
by
trotterdylan
10y ago
Heh, I came across the namedtuple exec thing the other day when I was trying to get the collections module working :\ namedtuple will have to be implemented differently. I think it can be accomplished by defining the class with type()? Mayb
17.
▲
by
trotterdylan
10y ago
I'd like to support 3.x at some point. See https://github.com/google/grumpy/issues/1
18.
▲
by
trotterdylan
10y ago
Reflection in Go is used minimally in Grumpy because it is slow. Currently importing Go packages into Python code is accomplished via the reflect module, but I think this will have to change to make such integration useful.
19.
▲
by
trotterdylan
10y ago
As has been said by others, Grumpy is not used in production at Google currently. There's still a lot of work to do -- especially on the standard library -- to support large real world codebases.
20.
▲
by
trotterdylan
10y ago
I don't know. I hope so. I think this is an area where Go can succeed and integration with existing Python libraries could be useful.
21.
▲
by
trotterdylan
10y ago
Although Grumpy is compiled, it is just as dynamic as Python, in that method dispatch involves dictionary lookups, etc. The main reason why Grumpy's slower for most single threaded benchmarks is that most Python workloads involve creat
22.
▲
by
trotterdylan
10y ago
exec/eval do not work, but all of the other dispatching and magic methods are supposed to work exactly like CPython (and if they don't, it's a bug/not yet implemented).
23.
▲
by
trotterdylan
10y ago
> > Basically, exec and eval don't work. Since we don't use those in production code at Google, this seemed acceptable. > What about stuff like literal_eval? Or even just monkeypatching with name.__dict__[param] = value ?
24.
▲
by
trotterdylan
10y ago
YouTube does not run on Grumpy. There is a lot of work left to do before Grumpy can run a large existing codebase.
25.
▲
by
trotterdylan
10y ago
It's been said a couple times in this thread already but basically, the YouTube Python codebase is very large and the cost of a rewrite is prohibitive.
26.
▲
by
trotterdylan
10y ago
Thanks for trying it out! Yeah, Grumpy does not currently support old-style classes. Since all of our code internally requires new-style classes, this was not a high priority feature. It is something that we'll get to.
27.
▲
by
trotterdylan
10y ago
To be clear, Grumpy cannot yet run YouTube's Python codebase. There's still a lot of work to do on the standard library. There are a handful of C extensions for JSON, protobufs, etc that YouTube uses, but mostly they're small
28.
▲
by
trotterdylan
10y ago
Interestingly, achieving performance parity with CPython is one of the biggest challenges of this project. There are certain things CPython does very fast like allocating and freeing many small objects.
29.
▲
by
trotterdylan
10y ago
I think the CPython AST module is written as a C extension module so currently it's a no-go. I don't think there's a fundamental reason Grumpy couldn't run a pure Python AST module, though.
30.
▲
by
trotterdylan
10y ago
Thanks for trying it out! And sorry about the lacking documentation. I'll be fleshing it out over the next little while. Your assessment is right: the grumpc compiler takes a single Python file and spits out a Go package. Incidentally,
More ›