Ugh. I’m pretty happy sticking with Python 2, but this post is so bad I’m tempted to switch to Python 3. Even as a joke the Turing complete section is just stupid.
I couldn’t tell whether the Turing Complete section was a joke or just profoundly confused, to be honest. Conflating the language with the bytecode, claiming that one VM can’t run the bytecode generated by another language (or maybe complaining that the bytecode changed? or that there’s no py2 compiler targeting py3 bytecode?), and trying to tie that to a fundamental property that even “languages” like SQL and Excel have ….
It was all very muddle-headed.
Don’t get me wrong, I know he’ll claim that it was a joke, later. That’s not in question. I’m just not sure if it actually is a joke.
I don’t think this is meant as a joke. The “post” is a chapter in his book Learn Python the Hard Way.
Difficult To Use Strings
Wait.. what? Strings are a mess in Python 2. They have been cleaned up in Py3.
Python 3 Is Not Turing Complete
No comment.
Purposefully Crippled 2to3 Translator
It took me about one day of work to port a 70k lines django application to Py3 with the 2to3 tool. That’s was one year ago. Since then I’ve only found two bugs caused by the conversion. Doesn’t seem that bad to me.
Too Many Formatting Options
Yes, I can agree with that. This is the only valid criticism in that chapter.
I agree, but just as a data point, it’s taken about 3 people-weeks for us to port a large (~200kloc) Django application (over the course of several months).
The points that made this take a while:
We tried to maximize the amount of changes that were Py2 + Py3 compatible. This meant pulling things in over time, heavy usage of six, and catching a lot of bugs early on. Highly recommended for easy reviewing by third parties. For example: a couple changesets that were just “use six for more imports”.
we deal with many different encodings, and a lot of old text-to-bytes conversion code was pretty brittle. Py3 forced us to fix a lot of this
imports! 2to3 generated way too many false positives for our taste (hard to review the real changes), so it took a while to find the right solution (for us: a monkey-patched six that would minimize changes)
changes of standard API from lists to iterators generated a decent amount of busy work. Changes for the better, though.
Handling binary files. Here, too, we were often doing the wrong thing in Py2, but it would “just work” before.
Lots of dependencies that we needed to upgrade to get the Python 3 support.
Pretty minor things around bytes’s defautl __str__ method. For example, checking the output of a process call, we would do if output == "'0'", and that would fail because `“b'0'” != “‘0’” but that turned out to cause more issues down the road.
issues around pickling + celery. Our solution mostly centered around lowering usage of pickle even more (dangerous)
deployment issues. Juggling Python 2 tooling and Python 3 tooling in the CI pipeline would sometimes mess things up.
I can only recommend https://pypi.python.org/pypi/modernize
Instead of translating x.iteritems() to x.items(), it translates it to six.iteritems(x), and adds the six import. Fixes 80% of the boring stuff and you only need to focus on unicode/bytes, etc.
The idea of Python 3 was to make iteration cleaner the easier to read and understand. Now we have to insert calls to six in every loop and for every string. The result is hideous code that’s harder to read, not easier.
I was writing this because
We tried to maximize the amount of changes that were Py2 + Py3 compatible
If that is not your objective, you can just use 2to3 and be ready.
By the way, I really do not understand, why the CPython devs haven’t kept iteritems() as an alias to items() in Python 3 with a deprecation warning to be removed in Python 4. I cannot imagine that it would have been a massive maintenance effort. But on the other hand, making a function call instead of a method call is not rendering code unreadable. I have never heard a Python dev complain about calling str(foo).
Essentially, Python 3 adoption has not been slow because of “readability”, but because Python 3 bundles fairly boring changes (iteritems->items) with this massive unicode change (requiring quite a few changes to code bases) and few breathtaking new features that weren’t available in 2.7. This changes at the moment with Async, matrix multiplication operators, etc.
Joke or not, the fact that we even have to ask that question significantly harms the credibility of the article.
Just out of curiosity, why are you sticking with Python2 for now? At this point all of the major libraries have been ported to be 2/3 compatible. In addition, while there aren’t any huge new features in Python3 (besides the byte/Unicode separation) there has been an accumulation of small quality of life improvements that from my point of view make it very much worth it to switch.
Not sure about the comment author, but I’ve personally moved over some of my open source libraries to support both python 2 and 3. Moving larger project is tricky though as it involves updating the language, all dependencies and forking the ones that don’t support python 3.
The price of a maxed out 15" BTO is certainly eye watering - in the UK it’s just over £4,000. Yikes. And still only 16GiB RAM :(
I do wish they’d introduce a tapered body Pro - that’s one thing I really miss from my Air (well, that and the lightness although the newer Pros do address that to an extent).
What is everybody doing with 32GB+ of RAM anyways? I have a home PC with 4GB, and I feel like I ought to upgrade it just to keep up with newer things, but I haven’t gotten around to it yet because it already does everything fine. The only time I have felt like it could use more RAM is when trying to run virtual machines, which I almost never do on it anyways.
Two tabs open to Twitter at the same time.
I’m being slightly facetious; I don’t think I’ve ever seen twitter.com use more than 1G or so. The Slack website is also quite bad about memory usage. A few of these things add up…
I use an Apple Extended II
I’ve got a Matias too but it’s a bit too loud for office use.
It might be of interest here to know that an OpenBSD version of Crystal was released today ;)
https://groups.google.com/forum/?fromgroups#!topic/crystal-lang/NXswFStRMXw
This would be a good reason to switch to crystal (although i think this is at least the 3rd just like ruby but static language I’ve seen, so maybe wait a bit). Going through all this work to find bugs in ruby code, and then continuing to develop the ruby version sounds downright painful though. You’re going to add another feature to the ruby code and then do this all again next week?
Ruby has the advantage of being a significantly more mature language, with all of the pros (and cons) that brings. So I still think it’s a reasonable choice in the end. As always, it depends.
i think this is at least the 3rd just like ruby but static language I’ve seen
I’m curious, what are the other two?
One of the jruby devs was working on one. You can get some speed ups by calling methods normally instead of reflection for everything. :)
Mirah is the one from the JRuby folks.
Ruby folks named it after a gemstone in Japanese, eh? Last dynamic one used in mission-critical stuff just straight up said Gemstone:
A lot of things get named same thing in IT. Maybe just sheer volume of stuff we make. Btw, I saw Braintree on Basecamp’s Bootstrapped and Proud article. It was one of my favorites, esp owners' strategy of upselling on people who really knew why they needed product. I was thinking about trying something similar but as a non-profit or public benefit company chartered carefully for long-term safety of customers. Maybe franchise as well for growth strategy. Braintree could do that. Good luck to yall anway. :)
It’s hard to say with a contrived example but the syntax looks close enough to make me wonder if you could have ruby ignore the type annotations - test and check with crystal but develop and run with ruby, maybe?
For some reason, as I continued to read through the post, I assumed that the “second opinion” phrasing was a joke that was going to end with “you might as well use Crystal”.
This is probably going to come off as negative, but while I like the typing Crystal feels like a 100% copy of Ruby (warts and all) without the ecosystem.
Though maybe gems will work naturally.
Not trying to dispute that, only trying to say that it could offer gains greater than a copy of Ruby could. :-)
Yeah, you’re right about that.
My complaints are really that I’m tired of seeing Ruby’s warts continued in new languages.
Your complaint is valid, but if your new “copy of Ruby” changes too much, then it’s no longer a copy and no one who likes Ruby will want to use it. That puts languages like Crystal in between a rock and a hard place. Do you want to be like Ruby or “the next Ruby”? Or do you want to forge your own path? Neither path is an easy road in my opinion. And, finally, it’s a very fine line to walk between the two.
Hey, yeah I’ve made the same argument about RubyMotion (which has minor differences).
I believe that honestly if Crystal gets the ecosystem it should start ripping out the warts. It’ll be a long journey, it’ll have a lot of discomfort, but we’ve learned a lot since ‘91.
Agreed, I have the exact opposite opinion: too many languages are “inspired by X” but with some meaningless change (functions are defined with func instead of def for example). It is added cognitive load for no real gain.
I think that would be DragonflyBSD. Or rather, Bitrig is the DragonflyBSD of OpenBSD since DragonflyBSD forked 10 years ago to do experimental things like HAMMER.
I really sympathize with the author on this one. I used to fear publicly releasing code because it might not be ‘good enough’. It was the attitude displayed in these tweets that I caused this fear.
I was a bit surprised to see Steve being the one bashing on this, especially being someone that teaches programming. She even asked Steve for feedback and just got this snarky reply.
I’ve specifically been staying out of ALL of these threads, but what I will say is that when I wrote that tweet, I did not know she was the author. They’re different usernames.
I see nothing snarky about that reply. At all. One person’s snark is another person’s matter-of-fact directness. But it helps make my point.
I feel bad for Steve. He made a mistake. But now, for at least some, he’s just an asshole, regardless of everything else he has done so far. This is what I find so amazing.
There’s a thread about this over on HN (of course) and the level of vitriol is staggering. Suddenly he’s completely defined by a mistake. He’s pigeonholed with invective worse than what he said about someone’s code and coding skills.
This is “someone’s wrong on the Internet”, with venom. If you choose the wrong words to criticize something (and I guarantee you that no matter how you phrase it someone will think you’ve been too harsh) you are become a target for the self-righteous to dump on you in ways far worse than whatever it was they think you did.
I’d like more professionals to accept that often, their lauded “matter-of-fact directness” is as effective a communication tool as “no-nonsense single-character variable names”.
On the whole, humans prefer criticism to be couched in sympathetic language, and there is not one thing wrong with that.
He’s pigeonholed with invective worse than what he said about someone’s code and coding skills.
It’s worse than that – by my reading Steve didn’t say anything about her code or coding skills.
The individual tweets linked here read differently alone than they did in context, but the context is impossible to link to.
Twitter is a bad place to discuss things.
I suspected that this had been submitted, but wasn’t able to find it.
What do you think of having the story submission form show any dups before submission? Or at least have the search functionality match URLs (https://lobste.rs/search?utf8=%E2%9C%93&q=http%3A%2F%2Fwww.itwire.com%2Fbusiness-it-news%2Fopen-source%2F57589-upstream-vendors-can-harm-small-projects-openbsd-dev%2F57589-upstream-vendors-can-harm-small-projects-openbsd-dev&what=all&order=relevance)
It does match on similar URLs already, but the URL you submitted is quite different.
https://github.com/jcs/lobsters/blob/master/app/models/story.rb#L65
Ok, I can see that the link I tried has an extra article ID appended, but even the URL from the original submission is not found.
Maybe because of this, I’m not sure:
https://github.com/jcs/lobsters/blob/master/app/models/search.rb#L60-63
Seems like you have a great idea for a new feature. Lobsters is open source, so if you want more intelligent url searching, you can feel free to make a pull request.
I’ve been having fun with Gosu. Been working on a little Arkanoid clone just as a way to learn how to write a game :D
Aren’t games fun to write? I also like lua’s löve framework.
I have several game engines in progress… because I’m weird and find it relaxing and want more open-source engines. I also run a game coding competition that publishes all of its source. You may find one of my entries (C++, SDL, pics) interesting, since it is a merge of tetris and breakout. :)
The Premium Branch Manifesto makes sense in the context of a programmer who wants to do open source work in a capitalist environment. I don’t really like it, but I dislike pretty much every other option as well that does not involve destroying capitalism (for example, have a patron or get kept as a serf or starve or just don’t do large amounts of open source or be somehow independently wealthy or work a day job as well or make some money, but see corporations and startups making a lot more off of your work in an extractive manner that ultimately destroys the open source environment they depend on).
I’m not sure I understand what you’re complaining about. You expect to be compensated for releasing open code with no strings attached?
It should be more along the lines of, if they profit off of something you’re doing, and want you do fix a bug, or add a feature, then… why don’t they pay you for that? If they don’t and just file an issue for it or something, there is an expectation of free labor. It’s fine to create and not expect compensation when you are creating something on your own terms, I do that a lot to support progress for all people, but if anybody interjects with something they want and will profit from it… then that should come at a cost.
[Comment removed by author]
I agree. I don’t think that’s their argument either. Let’s call it a brand new argument! :)
What happens when people don’t want to contribute, but somebody really wants it? They might hire somebody to write it. If they want the original or maintaining author to do it… is there a precedent to how that might be done? Is that useful? Could that also offset the crux of his argument?
[Comment removed by author]
[Comment removed by author]
[Comment removed by author]
Did you even read my comment?
I want to work on open source. There are several ways to do that at present without starving, in the currently existing world. I hate all of those options, though I hate them all in different amounts and for different reasons. The Premium Branch Manifesto is a new option, which I do not like, though I dislike it less than most of the options I listed above.
I dislike it for many of the same reasons I dislike ‘open core’ or ‘copyright assignment/proprietary mix’ type strategies, though it is an interesting new twist which makes this sort of thing viable for those of us that are not megacorps. There are also a bunch of ways that people could use it in practice, and I think that it may be able to be used in a way that avoids some of the really problematic parts of the ‘open core’ and ‘copyright assignment/proprietary mix’ strategies.
Did you even read my comment?
Yup
I read this one too, and still don’t understand what compensation option that could exist that you wouldn’t hate.
Also, I don’t see Premium Branch Manifesto as being a new option method at all, it’s just proposing new tooling for Github, etc to make what many people are already doing easier.
Ah, I thought it was fairly obvious. What I would like is the destruction of capitalism, and the creation of some new world where the problems of capitalism do not exist (and are not replaced by equivalent or worse problems). That isn’t an option in the currently existing world though, so I am left with options I have varying degrees of dislike for.
The Premium Branch Manifesto is a combination of tooling and expectations that has not before now made a big enough impression for there to be a pre-existing word for it, or a pre-existing conversation or set of norms around it in the open source software world. That seems to me to qualify it as a ‘new option’. And as a note, it isn’t just the tooling, it is the tooling + the expectations that make it ‘new’.
[Comment removed by author]
I think it was more a lack of recognition for mongrel, which led to not getting the jobs he felt (probably rightly so) he was entitled to get. For context, that was when the rails hypetrain was in full force, and people with terrible ideas (and even worse devs) could get funding by saying they were using rails as their platform.
[Comment removed by author]
It’s probably because you weren’t there at the time.
Old Rails people have this joke, back in the old days, only Ezra and David knew how to deploy a Rails app. Mongrel was a huuuuge step forward, and let Rails really take off by providing a consistent, easy way to deploy apps. And then, most of the community shit on him.
By now I’m sure many people have moved on from Mongrel anyway (Unicorn?)
Essentially every web server after Mongrel uses Mongrel’s HTTP parser, because it’s super badass. Even non-Ruby servers take advantage of it. Even the newest, bleeding edge server (http://puma.io/) was originally just a fork of mongrel.
Commits: https://github.com/puma/puma/commits/master?page=11 specifically, https://github.com/puma/puma/commit/190a81c55a1cbf215658b8fd6bb7ce2a0326b6c6
| most of the community shit on him
I don’t remember this happening. I thought he only had issues with a few people before the ‘Ghetto essay.
The OS, filesystem, and C libraries are not very ‘close’ to what a web startup is doing – you would expect people working on that stuff to be employed by other kinds of companies (router makers, infrastructure companies, toolmakers, hpc companies etc). Code editor writers you would expect to find work in tool making or ‘software’ shops. The front-facing web server and Rails plugin writers are the ones who you would expect to get jobs at web startups, and as I understand it lots of them do find work in web startups or in ‘software’ shops in the related ecosystem (I only have anecdata for this, though).
As far as items on your CV go, having written a crucial piece of infrastructure proves both that you can code and that you have significant project management and product development skills. If the stuff you have written is well documented, you have demonstrated technical writing skills. If the infrastructure is ‘close’ to the startup’s ‘area’, you have demonstrated that you can do pretty much everything that they need a programmer to be able to do and then some. So, if there is any trace of employment on merit in the web section of the programming world you would expect job offers to be flowing in pretty much constantly. Does that make sense?
I think at a certain point the more experienced ‘answerers’ should move on and simply help others in the channel. I find that teaching can be a good learning experience in itself so let some of the more advanced beginners help these less advanced beginners.
It’s win-win, the advanced beginners gain more confidence and skill through teaching, the less advanced beginners get some help without monopolizing the advanced user’s time.
Is there a sales-pitch somewhere on why I’d use this over Rails? If it’s on the site, I’m missing it.
See: http://hanamirb.org/guides/#why-choose-hanami-