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
As someone who has engineered repetition away and shares what he builds, I agree, and admire your gumption.
> intentionally designed as a low-level and generic tool.
git is high level. and opinionated. It has branches and tags baked right in. Compare to SVN or CVS where the support is second class.
> requires running many Git commands for each operation, and is highly repetitive.
I run lots of git commands by hand, and can be pretty verbose in commit messages. I (sort of) try to follow this: https://chris.beams.io/posts/git-commit/
However, to speed things up, I will sometimes at shell prompt use `ctrl-r` and search history a bit, then `ctrl-e` to start scrolling in a line brought back up if I want to both 1. see what I committed last, and 2. get a head start on writing the commit message.
I also find the staging workflow git has (another thing I personally consider high-level, purposeful, opinionated to git, and use regularly) to be very convenient. I can type `git status`, `git diff`, `git diff --cached` to see what's staged and unstaged. I can use `git reset` to unstage a file. Overall, I get more granularity on which files I want to add to that commit. This comes in really handing when reverting, merging and rebasing.
So in my workflow, I don't want to give up control of these things.
Apparently, while I don't use these features, `git bisect` and `git blame` also benefit from being thoughtful with commits.
> It shows the Git commands it runs for you, as well as their output.
I am glad to hear that.
> nor does it try to shield you from learning how Git works
This is what irks me. I view git as high level and opinionated already, and have no way of knowing how it would effect someone learning git. I developed my own habits w/ VCS a long time ago.
That said, leave it up to the people who want to try your project.
(I followed you and starred your repository.)
comment 9y ago · link · parent
git is an especially poor choice for wrappers. You're hiding the concepts of staged and unstaged information, branches, tags, remotes, submodules. Regardless of VCS, you're setting yourself up for failure when you buy into a third-party tool's workflow rather than knowing what the hell you're doing.
Pick up git as you go along. Rather than a tool doing who knows what behind the scene. If you really goof things when you're starting, don't be afraid to git reset --hard <ref> / git commit --amend + force push, as long as you know where you're at in history.
comment 9y ago · link · parent
Some hand-picked examples of well-implemented inheritance in open source:
An example of where inheritance makes great sense is Django CBV (Class-based views), https://docs.djangoproject.com/en/1.11/topics/class-based-vi..., as well as Django REST Framework class views (http://www.django-rest-framework.org/api-guide/views/)
An example of where inheritance in the form of runtime metaprogramming makes sense is SQLAlchemy declarative and Django ORM.
An example where inheritance in the form of mixins make sense would be Django ORM, such as TimeStampedModel in django-extensions https://github.com/django-extensions/django-extensions/blob/....
An example where classes make sense in standard libraries would be (impure) interfaces such as csv.Dialect (https://github.com/python/cpython/blob/6aee6fb/Lib/csv.py#L2...)
An example of where inherited classes make sense in abstraction would be types (https://github.com/zzzeek/sqlalchemy/blob/master/lib/sqlalch...) and dialects in SQLAlchemy (https://github.com/zzzeek/sqlalchemy/tree/master/lib/sqlalch...)
As a closing note, It works a lot better when the use of inheritance symbolically represents actual standards (SQL, HTTP, and/or standard libraries API's) that developers already are familiar with, rather than abstract concepts meaningful only to the writer.
comment 9y ago · link · parent
Over years, while other CMS have overly complicated admins, which grow more and more complex, WordPress polished what it already had.
It's honed to writers.
WYSIWYG editor is solid, the white space, font and font sizes are pretty great considering it's a browser.
I've once heard a person say they prefer writing in the WordPress interface more than they do using Word.
Easy previewing of stuff in draft mode.
Autosaving.
Revisions.
Plugin and theme community (both open source and commercial) top tier.
comment 9y ago · link · parent
The reason some programmers hold GPL in contempt isn't due to picking a sports team. It's really annoying to have to explain to a true believer (of GPL) that it potentially taints codebases it mixes with.
It's also a license that's complex and hasn't been tested in across jurisdictions. So arguing about what happens on a message board isn't fruitful since there is no case law. You may be recommended to "see a lawyer". I've spoken to a few people who have, ultimately the lawyer throws their hands in the air and say we don't have answers to the "What if's"; there isn't case law. And at that, the consensus of a random person on the internet isn't going to hold weight if you're accused of violating the terms of the license.
It's hard to pick GPL on the merits. Permissively licensed projects don't seem to be having reciprocity issues. Can't remember the last time I heard these thriving BSD, MIT, Apache2, ISC licensed projects complaining about freeloaders.
By the way, really happy Nintendo Switch picked up FreeBSD recently. Looking forward to upstream patches, even knowing it's entirely voluntary for them to give back.
Why? Because the potential reciprocity from a big player is better than having a license that obligates reciprocity strictly, even punitively. Which could cause them to look elsewhere, to a proprietary solution. No entity wants to risk their hard work to become a derivative of a smaller project they pull in.
comment 9y ago · link · parent
In fact I'm coming short on a value equation where it'd be more secure / efficient / readable without at least a query builder.
> but ORM means giving up a lot of control
What control is being lost, specifically?
> (and transparency, and understanding)
Highly recommend Django in Depth by James Bennett at PyCon 2015. https://www.youtube.com/watch?v=tkwZ1jG3XgA
Also, try out printing the .query of the QuerySet:
print(MyUser.objects.all().query)
SELECT "core_myuser"."id", "core_myuser"."password", "core_myuser"."last_login", "core_myuser"."is_superuser", "core_myuser"."username", "core_myuser"."email", "core_myuser"."is_active", "core_myuser"."is_admin" FROM "core_myuser"
And Q(), https://docs.djangoproject.com/en/1.11/topics/db/queries/#co..., .extra(), https://docs.djangoproject.com/en/1.11/ref/models/querysets/..., and finally raw SQL queries https://docs.djangoproject.com/en/1.11/topics/db/sql/.
> of your database in exchange for a few shortcuts regarding things like M:M links.
Maybe a few other benefits: helps with readability, consistent with OOP in python. Works across SQL dialects. Prevents mistakes, since those relationships are common. Getting clear and consistent access to common data retrieval and updating.
comment 9y ago · link · parent
But you can't use pure SQLAlchemy models (easily), since this otherwise great extension for flask doesn't support it (https://github.com/mitsuhiko/flask-sqlalchemy/pull/250, yes I'm in the thread).
You'll fork it or brew your own code to get declarative models working right. Kinda time consuming, but at least your models can be pulled in by any python code, and aren't tied down to a framework (That's what you were avoiding from the first place, wasn't it?)
Then you'll pick up WTForms (https://wtforms.readthedocs.io/en/latest/), another excellent library. And you'll miss having Django ORM's rich form and model-backed validation. So you'll try wtforms-alchemy, https://github.com/kvesteri/wtforms-alchemy.
Then you'll begin to see why Django makes sense after using Flask for a while. Django pulls in all the essential stuff and supports it well.
And top of that, django's addons like django-extensions (https://django-extensions.readthedocs.io), which gives you Werkzeug's debugger if you use ./manage.py runserver_plus. And ./manage.py shell_plus, which integrates with ptpython/ipython/bpython (https://django-extensions.readthedocs.io/en/latest/shell_plu...).
Django rest framework, DRF for short (http://www.django-rest-framework.org/), which is very mature at this stage, runs circles around Flask API. Flask API is inspired by DRF. You could also try https://flask-restful.readthedocs.io, but after all that, you'll be missing that tight model support.
You'll love flask. The code is top tier and exemplary. The testsuites are a dream and are very clear. Documentation is awesome. It feels good to code in it. But django feels good to code in as well.
Django's ORM is very mature. It's easier than SQLAlchemy, and despite SQLAlchemy's purity, and documentation - even better than flask's - Django's ORM does the trick for pretty much anything, even foreign databases I've interacted with. Another thing, QuerySet's are a charm, a lot of django's addons like django-filters, django-rest-framework and django-tables2 are built on top of its versatility.
Another thing Flask community ends up having to clone from Django is django-debug-toolbar https://github.com/django-debug-toolbar/django-debug-toolbar. See https://flask-debugtoolbar.readthedocs.io.
Again, I love flask, but when I realized that I'm just going to end up reinventing django with my flask app anyway, I started going with django on new projects. I haven't turned back, but still check out flask and sqlalchemy to see what's happening now and then.
comment 9y ago · link · parent
Remote: Yes
Technologies: Python, Django, JS (ES5), Node, Flask, Backbone, AWS, Postgres, MySQL, Mongo, Debian/Ubuntu, Fabric, Saltstack
Résumé/CV: https://git-pull.com, https://github.com/tony, https://openhub.net/accounts/git-pull, https://stackoverflow.com/cv/tony
Email: See profile
Position: CTO, Management or senior engineering roles, remote only
Author of The Tao of tmux, tmuxp, libtmux, vcspull, and libvcs. Contributor to >100 open source projects. Former Boostable (YC W14) in SF and acquihire (Social Amp -> Merkle) in NYC.
No take home projects or whiteboard interviews. See code.
comment 9y ago · link · parent
Also Armin Ronacher released a new one late 2015, Lektor. https://www.getlektor.com/
Show me a team replacing their medium-sized django or rails website with ASP.net Core. Or a YCombinator startup huddling up to their screens late at night in Visual Studio pushing code to azure. And them shipping and making customer's happy.
comment 9y ago · link · parent
No bloat, just the latest info on Linux distro releases.
As well as the versions for popular packages in the release.
Looks like NixOS 17.03 dropped yesterday (2017/03/31): https://distrowatch.com/?newsid=09772
Couple of days before that, Oracle Linux 6.9 (https://distrowatch.com/?newsid=09770) and DragonFly BSD 4.8.0 (https://distrowatch.com/9769).
For those who still use news readers, the feed is at https://distrowatch.com/news/dw.xml.
comment 9y ago · link · parent
Edit: I pasted the whole thing, but it's too big for comments.
comment 9y ago · link · parent
Documentation is top tier. Docutils + Sphinx + ReadTheDocs. Autodoc and intersphinx (linking across python projects) are just wonderfully implemented.
Contrib Library quality. Mature and well documented. Permissively licensed. Django, SQLAlachemy, Requests, Flask, Werkzeug, Boto, Jupyter, Numpy, Pandas, Scipy, fabric, ansible, saltstack, pytest (a new favorite of mine).
Standard library quality. Well documented and just the right amount of features in many cases. In some situations you may find more elegant API's in the contrib community.
OOP is implemented nicely. It scales well. It's easy to traverse large codebases and get situational orientation fast.
Language consistency. Python 3 is generally a consistent language. There are warts in every language, but nothing in python is insurmountable. Python 2.7 with __future__ imports and a compat module eliminates a lot of problems.
Debugging: Tracebacks are human friendly. ptpython/ptpdb and ipython/ipdb are a delight to work with.
C API integration. Well documented and well supported. Also see Cython, CFFI. Also C++ with boost python and pybind11
Editor integration. Jedi, pycharm
Stability. CPython (the main implementation) doesn't break. Clear distinction between 2 and 3 and easy enough to code to both versions. Contrib libraries generally follow semver and have consistent API's
Community. Friendly and great support on IRC and so on.
283.
Show HN: The Tao of tmux, available for free on the web, has been newly edited
48 points · by tony · 9y ago · 5 comments
comment 9y ago · link · parent
So this library does it via analyzing it. Somehow. It seems math is involved, but even with the docs, I still don't get it. It'd be helpful to explain the basics of what tempo, amplitude, frequency, attack is. Maybe a video would help.
I also see someone wrote an MPD plugin for it (https://github.com/Phyks/Blissify). That's worth checking out.
Most people don't understand how audio and programming works. In the same way people may not specialize in geo + programming (but they use Google Maps) or color theory + programming (Yet they use color scheme generators and Photoshop). So there is domain knowledge that could be conveyed.
comment 9y ago · link · parent
You want high resolutions, so customize it to the highest you can get. Some people may say it makes stuff look too small, but software will continually will improve to handle HDPI scaling, but that's easier than trying to switch out a screen yourself. Remember you'll at least have an editor and docs on the screen at the same time.
You said you want to do deep learning / big data stuff, Tensorflow can work with CUDA. Feel free to go for the NVIDIA laptops (T and P series), which can fall back on intel integrated graphics for power savings. NVIDIA's Linux and FreeBSD drivers are nice.
These laptops work well with Linux and FreeBSD.
On FreeBSD, newer intel chipsets graphics and wifi may have issues. If there's an issue with wifi support, consider a USB wifi like "ASUS (USB-N10) wireless-N USB Adapter" or "TP-LINK TL-WN725N Wireless N Nano USB Adapter", which have chipsets that are supported on FreeBSD and Linux very well.
Consider outlet.lenovo.com for deals on these laptops. Older generation laptops work well
Steer clear of anything with *40 at the end. T440, X240, etc. are the scourge of the Thinkpad line. They removed the physical keys from the buttons in the mouse and the trackpad itself is horribly poor quality. http://www.laptopmag.com/images/uploads/4020/g/lenovo-thinkp... is bad. http://www.laptopreleasedate.com/wp-content/uploads/2016/01/... is good.
You can go for X series and grab an external monitor / base station to plug into. This gives you may portability. But I still advise you go for 1080p resolution, if you compromise for less, it may be too squished to program in.
comment 9y ago · link · parent
But man, am I getting jaded about all this javascript framework stuff. Every 6 months stuff breaks, every 2 years there's a huge shift.
The problem with javascript I've been facing is value. Time and effort doesn't always correlate to what I get in the other end. In fact, I can say when building, going single-page is a time sink.
And it's almost always a mistake to go SPA first. Using a django or a rails lets you get the basics and data flow nailed down early on. Get into a framework too early and have a need to change something? Have fun explaining to your manager/client how costly it is to do a "simple" modification to a JS app when you have to throw the state you built it upon out the door.
What I want is a system tightly coupled into a server-side framework like a Django or a Rails that degrades gracefully and I only have to program the interactivity one time. Something that'd plop right into the asset pipeline/django compressor so I don't have to go outside of the framework to build.
Hundreds of hours of my life have been spent chasing this dream of sharing server side code with client side JS frameworks. That's what I need.
Meteor didn't do it for me. As for rendr, I've done stuff better with backbone/express in-house. As of 2017, I get my best bang for the buck using django and pjax. No joking, I went from full DRF + Backbone Marionette -> to plain old jquery and pjax and couldn't be happier.
All these new build tools (grunt, gulp, webpack... come on), ES versions (I was ok with ES5). None of these things are helping me ship stuff ahead of / on time and correctly. They're creating an even larger gap between the server side data, logic and templates and the JS interactivity.
If anyone is listening, I'd love to have a well-supported opinionated distribution of django or rails that just renders forms, tables, etc. with angular/react/etc. and degrades gracefully.
comment 9y ago · link · parent
In addition, there's no need to worry about shell scripting portability across systems. I personally use macOS, Linux and BSDs, so I have to take extra time to ensure my scripts work on machines without Bash.
For some shortcuts, tips, and tricks on tmux, I have a section in a book I've recently published at https://leanpub.com/the-tao-of-tmux/read#scripting-tmux. It's freely available online. It covers command aliases, pattern matching, targets and formats.
> Side note: tmux has an annoying misfeature that panes can't be named nor does their numbering stay stable. It's a bit tricky to programmatically set up a bunch of panes (can't do `tmux split-window -t mysession:mywindow.mypane`
The internal pane_id stays the same. If you're using a library like libtmux (https://libtmux.git-pull.com), you can keep reference to the pane after split-window commands and stuff.
> So to get a specific layout, you need to do all your splits in a specific order.
Yes, this is one of the reason tools like tmuxp, tmuxinator and tmuxomatic exist.
tmuxp goes the extra mile and has integration tests across a matrix of tmux versions to assure complex configurations produce the intended result upon loading a session. (https://github.com/tony/tmuxp/tree/master/tests)
Writing those tests took time, but were highly worth it when minor changes in the behavior of tmux popped up across versions.
comment 9y ago · link · parent
Check out the annotated source here: http://backbonejs.org/docs/backbone.html
289.
Show HN: tmuxp – session manager for tmux(tmuxp.git-pull.com ↗)
109 points · by tony · 9y ago · 38 comments
comment 9y ago · link · parent
- USB Wall outlets
- A panel system around the house to keep cords organized
- More pics
- Info on how much weight can the bed / tables hold
As for questions, how much does would that Solar power (1kw) on the Boxhouse Deluxe power? Could it handle a Macbook Pro playing video games, a 4k tv screen, a heater running 16 hours a day?
comment 9y ago · link · parent
I think freelancing is dead. To sum it up, employers, including startups that'd dry up their runway in 1 to 3 years, are demanding developers go full time and onsite.
As if they really could give job security. That's the frustrating thing. They're making you jump through hoops for work that, save them being acquired, won't last.
Yes, exceptions exist. But the new norm is that. And norm means being able to have some sense of reliability, not some person's luck. Yes, I ask recruiters to look around for remote opportunities and they try to help, but the good paying jobs are back in SF and want me in the office. Full time.
Nope, no gigs. No one wants 3 months, 6 months.
Yeah, I've heard all the talk about consulting. To me, it's just more growth hack / NLP talk about value that doesn't represent the realities of being a developer in our market these days. Startups shun the thought of outside experts or opinions, unless it's a SAAS tool. These CTO's, even if they don't know better, see advice from an outside expert as losing control. I think this is because they want employees who they can mold in their image, rather than someone who could help them in a pinch.
The other thing is hiring happens a lot slower. A lot of these places keep passing over qualified candidates because they feel they have so many options.
And no, employers aren't winning either with the lack of flexibility they have. Going remote opens up yourself to a ton of candidates. They're ultimately isolating themselves from skilled workers with experience. It's completely understandable to not want to be in SF and to accommodate working remote if you're a seasoned programmer.
comment 9y ago · link · parent
Imagine reading through SQLAlchemy's documentation [1] in that format.
Quick link to the repo: https://github.com/sarabander/sicp
The format this book is made out of seems to be Texinfo: https://en.wikipedia.org/wiki/Texinfo
comment 9y ago · link · parent
This wouldn't work out of the box on FreeBSD.
I recommend this tool: https://www.shellcheck.net/