Earlier quoted context omitted.
In http://glom.readthedocs.io/en/latest/tutorial.html#access-gr... , > After years of research and countless iterations, the glom team landed on this simple construct: 'years of research', 'countless iterations', 'glom team ', really?
You're yellin at a tutorial man. You gotta let some flavor text slide. :) That said, I'm no liar. Kurt and I (as a team), really did write stuff leading up to glom in 2013 (years ago), and have written stuff like it enough times that I've lost count (countless :P). If this isn't research, I don't know what is. Heck, I'm even getting a fun little peer review!
Glom – Restructured Data for Python
51–60 of 99 posts
Re: Glom – Restructured Data for Python
#52I'm curious about how the author replaced DRF with glom
Re: Glom – Restructured Data for Python
#53The writing style is just insufferable. Even the API documentation is littered with hyperbole and self-congratulation. We get it, you're proud of your work and extremely proud of yourself. > "as simple and powerful as glom" > "big things come in small packages" > "small API with big functionality" > "power is only surpassed by its intuitiveness" > "simplicity is only surpassed by its utility" > "shortest-named featur…
Re: Glom – Restructured Data for Python
#54This is really cool. Did you ever consider an API to do the reverse - to insert a value at a particular point in the data? My interest stems from this issue[0] on the Ruby issue tracker to make a symmetrical method to Hash#dig (which does something similar to, but more limited than glom) called Hash#bury. The problem in the issue was that inserting a value at a given index in an array proved difficult and unnatural i…
glom not only supports more than string keys, it also supports assigning to non-dictionary objects. That's a part of the API we're working on right now, actually. As for the data insertion, mutation may be in the future, but for now glom only transforms and returns new objects. Definitely something to think about though, bookmarked! :)
Re: Glom – Restructured Data for Python
#55Earlier quoted context omitted.
My thoughts also turned to toolz. Here's a example comparison: glom glom(target, ('system.planets', ['name'])) # ['earth', 'jupiter'] toolz list(pluck('name', get_in(('system', 'planets'), target))) # ['earth', 'jupiter']
The real advantage over toolz/get_in is in the breadth of types glom can support ( http://glom.readthedocs.io/en/latest/api.html#setup-and-regi... ), the extensive fallback behavior ( http://glom.readthedocs.io/en/latest/api.html#advanced-speci... ), and "T" specifier ( https://sedimental.org/glom_restructured_data.html#true-pyth... ), which allows performing object-oriented traversals and calls. Check the post for m…
Re: Glom – Restructured Data for Python
#56Earlier quoted context omitted.
Why is writing DSLs strictly worse than writing complicated transformations built on top of the limited constructs provided by the language itself? (You said never )
The issue isn't dsls, it's string dsls. Doing it within the language can provide stronger garauntees. As a simple example, you get some syntax checking.
Re: Glom – Restructured Data for Python
#57The writing style is just insufferable. Even the API documentation is littered with hyperbole and self-congratulation. We get it, you're proud of your work and extremely proud of yourself. > "as simple and powerful as glom" > "big things come in small packages" > "small API with big functionality" > "power is only surpassed by its intuitiveness" > "simplicity is only surpassed by its utility" > "shortest-named featur…
Re: Glom – Restructured Data for Python
#58Earlier quoted context omitted.
The issue isn't dsls, it's string dsls. Doing it within the language can provide stronger garauntees. As a simple example, you get some syntax checking.
Precisely. Until my autocomplete, syntax highlighting, and linting engines recognize it, I'll pass.
While mentioned in the post, it's not front-and-center because that's the sort of Python superpower that can look scary to less-experienced devs.
Re: Glom – Restructured Data for Python
#59I'm not really versed in the idioms/social mores of Python, so please take the following with a grain of salt: This seems like it usefully solves a problem, but the invocation pattern is suspect to me -- Instead of "glom" taking the target for picking-apart plus a magic little bit of DSL, what if "glom" took a single parameter, the aforementioned DSL, and returned a function that would perform the corresponding searc…
Python regex library does this, optionally
Re: Glom – Restructured Data for Python
#60Earlier quoted context omitted.
In http://glom.readthedocs.io/en/latest/tutorial.html#access-gr... , > After years of research and countless iterations, the glom team landed on this simple construct: 'years of research', 'countless iterations', 'glom team ', really?
You're yellin at a tutorial man. You gotta let some flavor text slide. :) That said, I'm no liar. Kurt and I (as a team), really did write stuff leading up to glom in 2013 (years ago), and have written stuff like it enough times that I've lost count (countless :P). If this isn't research, I don't know what is. Heck, I'm even getting a fun little peer review!
I didn't find your writing insufferable. I've written tongue in cheek (or over the top) posts about my projects in the past. If they can't see the humor and the usefulness of the project, their loss.
Thank you for creating Glom and thank you for posting it on HN. Count me in as one of your users.