1,787 karma · joined Oct 29, 2013 (13y ago) · 405 submissions
author: The Tao of tmux (https://leanpub.com/the-tao-of-tmux) available to read for free online at https://leanpub.com/the-tao-of-tmux/free
software libraries: cihai, unihan-etl, tmuxp, libtmux, vcspull, libvcs
tony (at) git-pull.com
https://www.git-pull.com
(If what I say isn't helpful to you, disregard it. Spread the good will and good tidings!)
comment 9y ago · link · parent
Pivot idea: Consider using the chart tool to map out relations of characters in stories, TV shows, legal cases, etc.
Service integration (client): Consider if your tree could fit in as a GSuite add-on: https://developers.google.com/apps-script/add-ons/
Service integration (host): create REST API's, or language libraries for people to use your tool programatically
Viral idea: Consider offering family trees for free so Wikia pages can link to them
Viral idea: Consider an embeddable app with zooming/panning that media websites and pay a monthly fee to integrate
Viral idea: Consider an import/export JSON schema users can use to share their graphs
comment 9y ago · link · parent
Just started migrating a new website, https://devel.tech, from Bootstrap 4 + mdbootstrap pro to bulma (https://devel.tech/site/updates#id15)
Far simpler markup. Better whitespacing / balance. Less javascript.
A good compromise in framework size to features.
comment 9y ago · link · parent
Heroku.
By far. They call it "Purple".
URL: https://purple.herokuapp.com/
They're overhauling it (see https://purple3.herokuapp.com/)
The caveat? It's not open source and only used internally.
Would love it if they open sourced the primitives mixins/font sizes/white spacings/forms in their new design spec.
Their documentation is also the cream of the crop. Highly readable, and pleasant.
Their product is also solid. As someone who has contributed to config managers and been through all the cloud stuff, it's a relief to just `git push heroku` and have everything just work.
Not sure who leads them, but they're doing something right.
comment 9y ago · link · parent
I admire their cleverness.
If it were me: I'd create an extension interface for completion libraries to accept third party plugins. I'd stop at putting in a third party stuff in by default. A sufficiently good plugin API for python-autocomplete shouldn't require it even to know about Kite.
That said, I don't think Kite should be disallowed. If they have a secret sauce that they think can empower completion plugins, give them an API to plugin to.
It's not in the spirit of open source to shut the door on proprietary solutions (IMO). Transparency should be paramount. Normally most Linux users opt-in to using proprietary/blob software/drivers one way or another anyway. Open source projects routinely maintain relationships with vendors (NVIDIA, Intel). It doesn't necessarily mean evil is at work.
Though, as someone who's struggled with the performance and reliability of completion tools, I don't know if I'd personally opt to outsource that functionality. I'd wait and see if our current tools get better.
comment 9y ago · link · parent
It's also available to read for free online (https://leanpub.com/the-tao-of-tmux/read).
tmuxp (https://tmuxp.git-pull.com), a tmux session manager, gained over 1k stars over the years.
vcspull (https://vcspull.git-pull.com), a repo sync tool, compare to myrepos. Received a lot of valuable feedback on documentation that I ported to other projects.
comment 9y ago · link · parent
Using or considering Gnome 3? The "Pixel Saver" extension may be for you (https://extensions.gnome.org/extension/723/pixel-saver/). It merges the title bar of the window with the top menu. Save screen real estate on low resolution notebooks.
comment 9y ago · link · parent
Medium range: IKEA Markus
Clicking: http://www.hermanmiller.com/products/seating/performance-wor... / http://www.ikea.com/us/en/catalog/products/00103102/
comment 9y ago · link · parent
With liveBook:
- The books are free
- Full-text search for books
- Browser-based
- Audio readings with an arrow on the left / text highlighting to keep up with the book
- On the right-sidebar of a book, it offers to buy the book in PDF/ePub/kindle form.
This is similar to Leanpub's online reading option (https://leanpub.com).
I used it to write and publish The Tao of tmux and made it available online free (https://leanpub.com/the-tao-of-tmux/read). Like liveBook, users can opt to buy the book in DRM-free epub/pdf/mobi and have it sent to their Kindle.
What liveLeak seems to have that Leanpub doesn't is audio readings.
Another cool trick: on the left side of a liveBook (e.g. https://livebook.manning.com/#!/book/grokking-algorithms/cha...) mouse-over on the left side of a section of the book and you can start narration at that point.
comment 9y ago · link · parent
The initial poster posted this link: https://github.com/paritytech/parity/blob/master/js/src/cont...
Where "master" is the branch which normally has the latest code. And #L216 automatically scrolls down to the 216th line.
The issue is that line isn't permanent since the code in the master branch is subject to change. So in order to make a reliable link, you can link to the ref [1].
Like this: https://github.com/paritytech/parity/blob/4c32177ef3f4521c66...
You could also do it with the short ref (4c32177e): https://github.com/paritytech/parity/blob/4c32177e/js/src/co...
Normally you'd have to scroll up to the top right of the document and grab the short form it, e.g. "6b0e4f9" and replace it with master. Note that's only the ref of the last change for that blob (file) [2].
If you click the line number on a GitHub file, it will add the #LineNumber to your URL.
From there, press Y, this will replace master with the latest commit of the repo.
[1] https://git-scm.com/book/en/v2/Git-Internals-Git-References
[2] https://git-scm.com/book/en/v2/Git-Internals-Git-Objects
comment 9y ago · link · parent
Sphinx Doc: http://www.sphinx-doc.org/en/stable/. Builds on top of Docutils. Allows API documentation (http://www.sphinx-doc.org/en/stable/ext/autodoc.html) and cross-documentation linking via intersphinx (http://www.sphinx-doc.org/en/stable/ext/intersphinx.html). epub, PDF, and html output.
I've created mini technical manuals at previous workplaces using sphinx.
More clickables:
For graphs, grab aafig: https://pythonhosted.org/sphinxcontrib-aafig/ or graphviz http://www.sphinx-doc.org/en/stable/ext/graphviz.html
For enhanced python documentation (numpy and google style api docs) http://www.sphinx-doc.org/en/stable/ext/napoleon.html
For creating your own API docs outside of python use sphinx "domains" (http://www.sphinx-doc.org/en/stable/domains.html):
- HTTP: https://github.com/deceze/Sphinx-HTTP-domain
- .NET: https://github.com/rtfd/sphinxcontrib-dotnetdomain
- JS: http://www.sphinx-doc.org/en/stable/domains.html#the-javascr...
- C++: http://www.sphinx-doc.org/en/stable/domains.html#id2
- C: http://www.sphinx-doc.org/en/stable/domains.html#the-c-domai...
- Scala: https://pythonhosted.org/sphinxcontrib-scaladomain/
- golang: https://pypi.python.org/pypi/sphinxcontrib-golangdomain
comment 9y ago · link · parent
The key thing is Django's implicit behavior is directly proportional to the job it's trying to do [1]:
- Django's settings can be invoked at any time. So it's kept as a lazily-loaded singleton that isn't processed until an attribute is first accessed.
- Django needs to know which apps to load (a la INSTALLED_APPS). And to know the models, django needs to know the apps. These app models can contain relationship dependencies, so its necessarily from a invocation perspective to have a settings that declare them all.
- Using Django's initialization is a must. For the reasons above (settings), but there is work done behind the scenes to make sure everything lines up when Django starts.
- It's most likely project's using Django are going to be using it's ORM.
On the other hand:
- Django doesn't hold every project, or every request for that matter, to its batteries. Intricacies like middleware and context processors are opt-in. Things like template filters are also opt-in on a per-file basis via {% load %} tags.
- Whether or not to use Forms Framework / crispy-forms, for instance, is optional. But projects would miss out on nicely generated forms with validation.
- Projects can also switch out template engines for Jinja2 or something totally custom.
- While strictly speaking, projects can just keep models.py empty, QuerySet's are like the ultimate reusable interface in Django's Frameworks. QuerySet's can be used:
- by class-based views (CBV)
- ModelForms to provide database-backed form validation
- by third party extensions like Django REST Framework (DRF), django-filter, django-tables2, django-guardian, and so on
- in context processors (which can access URL regex group matches), that later are passed into in templates.
While that may feel like overkill, this is useful for things like database-backed menus that CMS like Drupal and WordPress would use by default.
> It's way harder to scale due to both its heavy reliance on hidden magic its tight integration with its data store.I plan on making a future article diving into Django's ORM. Sure, ORM's hide a lot of machinery behind a facade of sugary objects. But on most web projects the database's aren't doing much more than simple joins.
Django's ORM can scale into medium-sized code bases. By the time it gets beyond the point the ORM can handle, heavier data tools (like ElasticSearch, Hadoop) would end up being brought in regardless of whether Django was picked. That doesn't mean earlier code or data schemas need to be thrown out.
Put it another way: When project's get to the point they need a datamart or other things, they're likely to create a separate service for that distinctive from the web front-end.
[1] https://www.git-pull.com/code_explorer/django-vs-flask.html#... / https://www.git-pull.com/code_explorer/django-vs-flask.html#...
222.
Django vs. Flask(git-pull.com ↗)
349 points · by tony · 9y ago · 200 comments
comment 9y ago · link · parent
Location: Chicago, US
Remote: Yes
Willing to relocate: For the right salary, yes
Website: https://www.git-pull.com
Technologies: C++, Python, Javascript, Node.js, AWS, Backbone, Linux/FreeBSD, Less/Sass, Django/Flask, Postgres/MySQL, Elasticsearch
Email: tony at git-pull dot com
Résumé/CV: Available upon request
Clickables:
Type-A person, always programming, see my GitHub @ https://github.com/tony
Dedicated open source contributor, see an overview @ https://openhub.net/accounts/git-pull
Created several successful software projects, such as tmuxp @ https://tmuxp.git-pull.com
Author of The Tao of tmux @ https://leanpub.com/the-tao-of-tmux
C and C++ porting, see my patches @ https://www.git-pull.com/#porting-linux-to-bsd
Expertise with datasets of various sizes and complexity, see my UNIHAN database export tool http://unihan-etl.git-pull.com
See my latest article: https://www.git-pull.com/code_explorer/django-vs-flask.html
comment 9y ago · link · parent
Website: https://www.git-pull.com
Technologies: C++, Python, Javascript, Node.js, AWS, Backbone, Linux/FreeBSD, Less/Sass, Django/Flask, Postgres/MySQL, Elasticsearch
Email: tony at git-pull dot com
Clickables:
Type-A person, always programming, see my GitHub @ https://github.com/tony
Dedicated open source contributor, see an overview @ https://openhub.net/accounts/git-pull
Created several successful software projects, such as tmuxp @ https://tmuxp.git-pull.com
Author of The Tao of tmux @ https://leanpub.com/the-tao-of-tmux
C and C++ porting, see my patches @ https://www.git-pull.com/#porting-linux-to-bsd
Expertise with datasets of various sizes and complexity, see my UNIHAN database export tool http://unihan-etl.git-pull.com
See my latest article: https://www.git-pull.com/code_explorer/django-vs-flask.html
Resume available upon request
comment 9y ago · link · parent
I don't interpret this article like this. I understand the observation that people have different opinions, but with JS frameworks, there's so many developers who sunk their teeth into a framework to be productive just to lose their edge 6 months later.
It's substantive for a developer, a team of developers, a whole community to invest their time into a framework that gets thrown out every 2 years.
It's painful to constantly pursue a moving target with JavaScript changing. Meanwhile, web frameworks like Django and Rails remained stable for over a decade.
> At this point, I don't think it's especially likely that a project will fail because you chose Angular over React, or vice versa.
That sentiment feels rather just-worldish in light that becoming productive at a framework (not just doing small tweaks) is a chore in itself. I recognize that people have their own opinions and philosophies of the framework they pick, but the article also factors in the timeline of these frameworks.
When I read through that article, I felt sharp remembrance of being on the roller coaster of continually rebuilding my skills from scratch with the new framework where the action is at.
> Pick what works best for you and your team, and don't worry about what the chattering bloggers say you should be using. :)
While I do recognize there is also a cargo-cult fanaticism that comes with JS frameworks, the amount of upstream contributions and extensions these frameworks receive back is considerable. The effects are also felt on QA websites like StackOverflow and so on.
I don't see the same behavior for every framework in software development. Like for instance, SDL2/allegro/SFML, I don't feel attachment and the API's are somewhat less of a moving target.
Potentially, because it's safe to say you can just pin NPM packages and your old Backbone code will build. But will people hire you for that Angular 2.0 position if you're not top tier in that framework? They could pass you up for someone who's already ready for to take up the job. There's economic ramification for workers on what framework they pick.
comment 9y ago · link · parent
The queries that most tend to be making just aren't that sophisticated. Relationships tend to be basic.
And I haven't even mentioned stuff that'd really, really hard to express/manage in pure SQL like tree/nested information that has to stay balanced [1]. Thanks django-treebeard/mptt and sqlalchemy-orm-tree.
> The closer an ORM's API is to a monad, the happier you'll be.
Developers using ORM's simply aren't caring about ORM's matching a certain construct. They care that models emit correct representations of their schemas and that the data is retrieved "fast enough".
Take it a different way: the best part about ORM's? They're effective 95% of the time, right out the box, so you end up avoiding time that'd be spent over and prematurely optimizing.
> IMO trying to shoehorn objects (in the OO sense, with polymorphism, data hiding and behaviour) into a database is wrong-headed.
Objects in things like SQLAlchemy declarative and Django Models map perfectly to generated SQL, so they also act as a way to generate migrations. It's that accurate. A lot of the relationships project's need expressed tend to be vanilla joins.
> Data hiding in particular is a wrong mental model for thinking about facts in the database, and the more is hidden, the harder it will be to reason about performance and bulk remote operations generally.
ORM's strive to hit a value sweet-spot in terms of code expressiveness, reducing duplication, handling the bread and butter relationships and types. That covers what most developers really need.
Perhaps there are projects out there not fitting to ORM's. Not all projects are sophisticated data mart projects, but even then, a good share of those still go back to simple joins at the end of the day.
And I've even gone as far as trusting heavy-duty stuff like django-mptt, along with plugins that filter and sort. I don't even look at the queries, all I see is they're running performantly. In all these years, SQL queries have never been a bottleneck. Maybe it's because I'm only storing simple stuff.
comment 9y ago · link · parent
- Avoids mistakes when dealing with writing raw SQL queries (SQL is quite repetitive in practice)
- The declarative nature of classes maps well to types and relationships
- The declarative nature of classes maps out well to tables, even with polymorphism [1]
- Keeping "Models" in an ORM often maps out well to migration utility (Alembic, Django Migrations)
- Object-chaining map very well to queries
- ORM objects can be reused and composed
- They can abstract out intricacies across SQL dialects
- They can potentially make it easier to migrate to different SQL servers if no specialized features were used
- Can help avoid common security vulnerabilities like SQL injections
- When something can't be expressed via ORM relationships, they tend to allow the dev to drop down to raw SQL. In the case of SQLAlchemy, there is a core query language [2], too.
- In the case of Django, QuerySet is used as a standard throughout extensions that power a whole community. Plugins that don't even know each other (e.g. django-filter and django-tables2) can operate on the same django queryset to filter/search and sort/display data.
I mention QuerySet/Django ORM quite a bit in a recent blog post at https://www.git-pull.com/code_explorer/django-vs-flask.html.
[1] http://docs.sqlalchemy.org/en/latest/orm/inheritance.html [2] http://docs.sqlalchemy.org/en/latest/core/
comment 9y ago · link · parent
- Code examples: https://glitch.com/edit/#!/hyperapp
- Browser demos: https://hyperapp.glitch.me/
- README: https://github.com/hyperapp/hyperapp/blob/master/README.md
This is a good example of what an open source project should do. Straight forward. And also, refreshing to see a lite javascript framework.
One suggestion to authors: Include a link to the demonstration's code on pages like https://hyperapp.glitch.me/slider.
comment 9y ago · link · parent
- Imagine: Star Citizen: https://www.youtube.com/watch?v=lJJ9TcGxhNY
- Star Citizen - MISC Freelancer Commercial: https://www.youtube.com/watch?v=vO7RxsZpcKc
- Star Citizen: Consolidated Outland Mustang Commercial : https://www.youtube.com/watch?v=BR07oZC0QHU
- Introducing the 2944 Aurora: https://www.youtube.com/watch?v=UvDs7RDKCag
Full playlist: https://www.youtube.com/playlist?list=PLVct2QDhDrB0QRjv9oN02...