Better HN
topnewbestaskshowjobs
Log inSign up

git-pull

1,787 karma · joined Oct 29, 2013 (13y ago) · 405 submissions

open source software plumber

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!)

Submissions

comment 9y ago · link · parent

> Organizing your life to minimize "drama, breakups, [and] regrets" and maximize "time to get work done" is a good way to end up unhappy and lonely.

I feel that's the mentality pressuring people into social networks that otherwise wouldn't use them. Appealing to stuff like status, happiness, and so on.

And I don't think it works out in practice. I think putting social stuff, especially facebook on the back burner, and investing in accomplishments as a primary goal, is the best life choice.

As far back as history goes, people have both sought and claimed to have the answers to happiness. I don't think relationships are going to give me that fulfillment in the end.

Look at celebs: despite their popularity, money, and status, they're prone to loneliness and unhappiness. I think there's more to the equation of fulfillment, and we're all looking to discover what works for us. I don't believe stuff like Facebook is the key, but if other's do, more power to them.

comment 9y ago · link · parent

> Ask yourself, do I really need and care for this contact? Remove people that do not add value to your life.

I do a different test. It's called "Do you care about me?"

If I got in a car crash over the weekend, would you even know? If you found out, would you visit me in the hospital?

If the answer is yes: but they're family, I already have their contact info. For non-family, that group fluctuates, and more often than not, it's zero. I'm fine with the number staying there. Benefits include: Less drama, breakups, regrets, and more time to get work done.

If the answer is no, which it mostly is: I feel I save time and am more self-honest not connecting with them.

But as I get closer to 30 I feel less interest in connecting with others. The only exception is when I travel abroad and the surroundings are more intriguing.

On the other hand: Social media is a great marketing tool. I'm fine if people use Facebook however they choose. And I also agree with pruning boring content in favor of subscribing / liking manually.

comment 9y ago · link · parent

That evades the point and reintroduces the same thought pattern I've criticized in my original post.

> Even though it's not a charitable cause, they are trying to make the same appeals. And if a charitable organization was eating away more than 50% of the donations in administrative costs, you would likely be very wary.

The funding is low, less than a fast food worker. The person running the operation couldn't even pay his own rent to run it out of an apartment.

Before we start slicing up the pie, we need to have the funds reach a point where they can sustain themselves. For instance, basic living expenses in midwestern US. Funds after administrative costs should be the pie.

We have to stop shaking down people who want to help open source when they ask for funding. It's as if whenever someone tries to fund an open source project or create a way to fix this problem funding in open source, they're hounded and dogpiled.

I've seen this sort of entitled, stingy attitude on the part of open source users, that despite using open source software to their benefit, those doing the work behind the scenes are shamed for trying to sustain themselves.

It's this strange double bind: first you want your software working, new features, and that bug fixed, but the one's facilitating that very thing for you can't have the material means to do it without being shook down.

When I see 10k in funding, less than poverty wage in USA, and people talking about it as if it was a prize pool instead of operating expenses, that's the mentality I'd like to see done more thoughtfully.

comment 9y ago · link · parent

This isn't directed at the commenter, but the concept above: Can we all come to an agreement that a person running an endeavor be permitted to feed, cloth, and accomodate themselves reasonably?

Specifically, this crab mentality of dashing hopes of someone ending up right side up on a side project or even a nonprofit. Why pick on the little guys who are just trying to get by, especially if they have a noble intention of funding open source projects.

This is something that we really need, and I feel larger organizations that fund open source - not naming names - aren't transparent or egalitarian enough with who and how they fund. So many people do open source and don't see a penny from it. In 2017, if you want to receive any funding for an open source project, you have to be in a certain social circle, very popular, or very fortunate.

There are organizations that horde millions in cash reserves and give six figures to people just for sitting on a board. Then, there are people just trying to bootstrap themselves on a shoestring budget to buy groceries and pay rent to their roommate. It is my sincere hope we are more generous to people just trying to scrape by and not trying to unduly hound them and guilt trip them into not being able to pay their basic living expenses.

$3,413.20 over a period of four months? Thankfully he also had a day job, because we also don't know if he had other developers, or what were his true needs were to be able to sustain his project.

comment 9y ago · link · parent

Would love to see a C++ implementation of this of this code, whether it's a test project or an example already available in open source.

This would also be a cool thing to give an example of across programming languages. Sort of like how https://github.com/drujensen/fib does it.

comment 9y ago · link · parent

For https://devel.tech and https://www.hskflashcards.com, I split the common JS, SCSS, and Python code into a git submodule.

I named my common library "based":

- Uses reStructuredText + docutils to display content in a consistent fashion (https://devel.tech/features/django-vs-flask/, https://www.hskflashcards.com/downloads)

- Common fabric source code for deploying Django websites, updating the sites

- Customized crispy-form templates and SCSS files

- Using Yarn "Workspaces" to load the common JS/SAAS code (https://yarnpkg.com/lang/en/docs/workspaces/)

- In Webpack, I share common webpack code via wrapping the configs in a function and passing in dependencies.

- Common Python code is available to be accessed for reusable Django applications, but also plain-old python

- And use of "import_string" in django settings to load additional plugin configurations [1]

[1] https://docs.djangoproject.com/en/1.11/ref/utils/#django.uti...

P.S. I am writing an article (in draft atm) about import_strings in Django at https://devel.tech/tips/n/djms3tTe/demystifying-djangos-impo..., intended for people new to Python and Django. You can also use import_string in your own Django code to 'opt-in' to any sort of feature you keep in a common codebase. In my circumstance, I use it as a way to register docutils roles and directives via django settings. This pattern also holds true without Django, too (https://docs.python.org/3/library/importlib.html).

P.P.S. I highly recommend Yarn Workspaces. It's fast, and really makes it a lot easier to share front-end code.

comment 9y ago · link · parent

I am at my wits end. I am getting exhausted and drained in these interviews.

There are times where I just botch interviews. Here and there, I look back and realize I came off the wrong way, like wow, I did that. But I reflect, and strive to get better. Sometimes it's just not a fit. Or someone comes along that's a better option than me.

But there is a growing pocket of places I interview at where they blatantly lie, bait and switch, ignore my portfolio and go right into brainteasers, code golf, and refactors that have absolutely nothing to do with the role being filled. Then radio silence.

I'm coming to the conclusion I'd rather earn less and work more hours on my own than enable this system. Because I have an indictment far more damning the OP: Some of the people interviewing me can barely code and are trying to survive another day. Not to mention, there are some who are afraid of letting in a stronger candidate that could replace them. Heh, what do you think they do?

Last interview I had, I discussed multiple times it being in Django and Python. Come the time of our call, interviewer flipped the script, it's in JavaScript, Underscore, and the data being passed around is so ambiguous it meshed together in my mind through the remainder of our call. I don't know if it's a clueless interviewer - or a really shrewd one who knew how to lay one over me.

Or is it me? The problem I face is getting beat down by all these tests makes me feel I'm not a good coder. Due to the fog of Dunning-Kruger, I know I can never be sure if the deficit is really on my end or not.

Does anyone else out there feel this?

I have published code all over. I code 10+ hours a day, even on the weekends. I get hammered in technical interviews.

comment 9y ago · link · parent

Location: USA (Central)

Remote: Yes

Willing to relocate: No

Technologies: Django, Python, Linux, Javascript (ES5+6), Backbone, webpack, sass, spaCy, DRF, reStructuredText, AWS, Postgres, SQLAlchemy, handlebars/mustache, jinja2, Some C++.

Email: See GH/portfolio

CV: https://stackoverflow.com/story/tony

Portfolio: https://www.git-pull.com

Github: https://github.com/tony

Sample sites: https://devel.tech, https://www.hskflashcards.com

Sample projects: https://cihai.git-pull.com, https://tmuxp.git-pull.com, https://unihan-etl.git-pull.com

comment 9y ago · link · parent

Just for show and tell purposes:

https://devel.tech, tech tutorial website - webpack, bulma, django, docutils + sphinx (heavily customized)

Here are some examples:

- Powered by pure docutils: https://devel.tech/tips/n/sNZwQvNh/django-compressor-vs-djan...

- Powered by sphinx: https://devel.tech/features/django-vs-flask/

https://www.hskflashcards.com - recently converted to bulma, webpack + django-webpack-loader (from BS4 + django-compressor). Powered by Django + Postgres with the unaccent extension (https://www.postgresql.org/docs/9.1/static/unaccent.html). Example usage: https://www.hskflashcards.com/search?omni=hao

Some comments on the stack: webpack has really grown on me, particularly https://github.com/ezhome/django-webpack-loader. I've been avoiding trying to integrate node for a long time, and found webpack to have a bit of a learning curve, but after getting through the quirks it's great.

Another thing, looking into seeing more stuff with yarn workspaces (https://yarnpkg.com/blog/2017/08/02/introducing-workspaces/), lerna, etc. Trying to make the UX customizations more modular, and I think it's becoming more practical to separate out stuff into node packages more often.

As for other stuff I've been liking, SASS has been good as always, as has the bulma framework (https://bulma.io).

comment 9y ago · link · parent

Screenshot of the LindowsOS desktop on Wal-Mart website: https://imgur.com/3VsE0zL

Forum thread with information on the system details / costs of LindowsOS desktops at Wal-Mart: https://www.dbstalk.com/community/index.php?threads/wal-mart... (June 2002)

comment 9y ago · link · parent

Anyone else here remember LindowsOS (later changed its name to Linspire)?

In the early 2000's (around the time of the article), they were trying to get point and click simplicity for installing software (which even back then was abundant in Linux). I remember a few others distros, like Mandriva (Mandrake at the time) had graphical package managers. There were others.

To anyone who's curious and feels like giving old Linux distros a try, https://old-linux.com/ is a good resource. Unfortunately I can't find any mirrors of repos with packages that go back to 1998 and early 2000's.

comment 9y ago · link · parent

I think it'd be more convenient to deploy onto Heroku (Free) or AWS (free tier) and reposted. It's a lot easier to load a web page than it is to clone and build from source. Link it up on the GH Readme prominently, too.

comment 9y ago · link · parent

It's a fine startup postmortem.

A small gripe: I don't get why Django has to get dragged into this. Whether it's the title, or the venue. It distracts from the broader lessons he brings to the table in hindsight as a CTO-founder.

Other than the author making fleeting references to Django, there's no technical depth or major points delivered on how the stack effected operations.

I have nothing wrong with Django criticism, but the title needs to be fixed. Maybe: "Autopsy of a slow train wreck (DjangoCon 2017)"

comment 9y ago · link · parent

C++/QT may be great, but a lot of the JS question boils down to website creation, rather than app creation.

I dumped node.js on the server site like a hot potato. At the time (2014), it didn't scale well and was quite porous dealing with stuff you'd get free in a framework like django (like db-backed form validation).

But, I can't say I regret learning JS. You won't be able to do the job developing websites if you can't wrangle it. It's so ubiquitous, despite my efforts to keep a node-free codebase, I still had to cave in. Even if it's just getting your foot in the door using SCSS. Or wiring in that jQuery plugin.

Whether it's situational awareness or dealing with webpack configurations, getting that last 10% cinched is going to require understanding what's going on.

What I think people need to know about JS is that they shouldn't just drink the Kool Aid because everyone else seems to.

comment 9y ago · link · parent

Books (free):

- Javascript Patterns https://shichuan.github.io/javascript-patterns/: Good for wrapping your brain around scoping and how things flow in JS. It's a very nimble language. While you won't use every single one, internalizing their concepts are central to be efficient in wrangling JS and reading other's.

- Patterns For Large-Scale JavaScript Application Architecture https://addyosmani.com/largescalejavascript/

Docs / Articles:

- Callback functions: https://developer.mozilla.org/en-US/docs/Glossary/Callback_f... Absolutely mandatory.

- Currying: https://www.sitepoint.com/currying-in-functional-javascript/

- 'return this' for method chaining: https://schier.co/blog/2013/11/14/method-chaining-in-javascr...

Annotated Source:

(soak these in 10-20 minutes every day over a month or two)

- http://backbonejs.org/docs/backbone.html

- http://underscorejs.org/docs/underscore.html

Frameworks:

- None. Webpack 3 + jQuery + babel + pjax

Tips:

- The longer you hold off on a framework, the better. Focus on getting your stuff out the door, test coverage + CI feedback loop, core business data schemas, and trimming off technical debt. After a couple of iterations and months of stability, consider a/b testing a framework.

- Most libraries are still in ES5. Wrap your brain around ES5 is a sure thing. Not everyone is using newer JS features.

- In many programming languages in your webstack, you're likely going to be dealing with node for build utilities and compilation.

- Webpack, while it seems unintuitive at first, can be pretty nice once you get over the hump. It's like a miss of the old r.js configs and the declartive-ness of grunt.

- As a parting note, don't feel a necessity to buy into single page application and frameworks. They're a tremendous time sink and the ROI just isn't there.

166.

Pybind11 — Seamless operability between C++11 and Python(github.com ↗)

135 points · by tony · 9y ago · 117 comments

comment 9y ago · link · parent

Echoing this. Some personal anecdotes:

Back in 2012, I remember when Backbone Marionette broke into pieces. It made "logical" sense, but the instances you'd actually want to pull in the event library without taking in Marionette is rare.

There's a certain sense you have to be tactical with decoupling stuff. I decouple front ends from libraries because I don't want my users to be forced to use my CLI front end when they just want an abstraction with minimal requirements.

I get away with it because there's 1 library and 1 frontend.

In JS, there's a front end, a library, and an extension marketplace that make you wonder what they were thinking when they were decoupled. Stuff like extract-text-webpack-plugin.

Guess what that plugin does: It allows you have your CSS show up as CSS files instead of JS. But the title denote that, (forget that fact you'd expect webpack to have such simple stuff in webpack itself.) It instead is "extracts text", despite the fact the convention of "text extraction" means nothing to web developers.

comment 9y ago · link · parent

Updated, thank you.

Assigning the results of a command to a variable is not POSIX Make. However, both FreeBSD's Make and GNU Make support it.

There's the proposal to add it to POSIX Make: http://austingroupbugs.net/view.php?id=337

Another thing I wanted to add to the main post: since POSIX Make doesn't have conditionals, GNU Make and bmake both have different ways of doing them. If you look through FreeBSD's Make files, you'll see that conditionals exist, but they begin with dots:

https://github.com/freebsd/freebsd/blob/c09174d99/share/mk/b...

There are going to be some compromises when writing portable scripts where it won't be POSIX, but could still be considered portable.

comment 9y ago · link · parent

More nifty portable Make facts:

- For portable recursive make(1) calls, use $(MAKE). This has the added advantage of BSD systems which can electively install GNU Make as gmake being able to pass in the path to gmake to run GNU Makefiles [1]

- BSD's don't include GNU Make in base system. BSD's port and build system uses Make extensively, and has a different dialect [2]

- In addition to that, you will likely choose to invoke system commands in your Makefile. These also have the same GNU-specific features that won't work on BSD's. So keep your commands like find, ls, etc. POSIX-compliant [3]

- Part of the reasons tools like CMake exist is to abstract not only library/header paths and compiler extensions, but also the fact POSIX shell scripting and Makefile's are quite limited.

- Not only is there a necessity to use POSIX commands and POSIX compatible Make language, but the shell scripting must also not use Bash-isms and such, since there's no guarantee the system will have Bash.

- POSIX Makefiles have no conditionals as of 2017. Here's a ticket from the issue tracker suggesting it in 2013: http://austingroupbugs.net/view.php?id=805.

- You can do nifty tricks with portable Makefile's to get around limitations. For instance, major dialects can still use commands to grab piped information and put it into a variable. For instance, you may not have double globs across all systems, but you can use POSIX find(1) to store them in a variable:

    FILES= find . -type f -not -path '*/\.*' | grep -i '.*[.]go$$' 2> /dev/null
Then access the variable:

    if command -v entr > /dev/null; then ${WATCH_FILES} | entr -c $(MAKE) test; else $(MAKE) test entr_warn; fi
I cover this in detail in my book The Tao of tmux, available for free to read online. [4]

- MacOS comes with Bash, and if I remember correctly, GNU Make comes with the developer CLI tools as make.

- For file watching across platforms (including with respect for kqueue), I use entr(1) [5]. This can plop right into a Makefile. I use it to automatically rerun testsuites and rebuild docs/projeocts. For instance https://github.com/cihai/cihai/blob/cebc197/Makefile#L16 (feel free to copy/paste, it's permissively licensed).

[1] https://www.gnu.org/software/make/manual/html_node/MAKE-Vari...

[2] https://www.freebsd.org/cgi/man.cgi?query=make&apropos=0&sek...

[3] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/fi...

[4] https://leanpub.com/the-tao-of-tmux/read#tips-and-tricks

[5] http://entrproject.org

1
567
14