News for hackers. Stuff that matters.
Re:Outperforming everything with anything: Python? Sure, why... by yvdriess on Sunday January 27, 2019 @04:26PM (#19013888)
When such statements in the style of "you don't have to learn a new language" is uttered, it is usually completely ignoring the fact that solving the problem at hand is many times harder than learning some new syntax. Learning C when coming from Python is not hard because as a language C is hard.

To generalize, I have the impression that the general CS/programmer culture values initial easy of use much more than long term usefulness. And that's not directed at the younger generation, you will find plenty of old farts that only want to use or learn git when it's been thoroughly lathered the thick sugary syrup of a pretty GUI.

Re:Outperforming everything with anything: Python? Sure, why... by comicjk on Sunday January 27, 2019 @04:44PM (#19013965)
Learning C is easy, but getting a piece of C integrated with your Python code isn't. It can be done well, but bad software is littered with things that could have been done well. I recently had a project at work of ripping out a bad C implementation of a high-performance section of code and replacing it with faster and shorter piece of numpy, so this is definitely a practical issue.
Re:Outperforming everything with anything: Python? Sure, why... by mlthoughts2018 on Sunday January 27, 2019 @06:07PM (#19014321)
I find the opposite to be true. With numba & Cython, it’s ridiculously simple to target a segment of Python code for compiled specialization, often required for custom pieces of work not directly expressible in NumPy, especially when processing non-ndarray data structures.

I find I am frequently removing sections of inscrutable “vectorized” NumPy code that is inefficient, not because NumPy is inefficient but because conforming the data to a structure amenable to NumPy is too inefficient in the first place, and rewriting in straightforward, simple Cython functions.

Re:Outperforming everything with anything: Python? Sure, why... by carlmr on Monday January 28, 2019 @04:56AM (#19016281)
>I find I am frequently removing sections of inscrutable “vectorized” NumPy code that is inefficient, not because NumPy is inefficient but because conforming the data to a structure amenable to NumPy is too inefficient in the first place

Also the next maintainer will thank you for it.

Re:Outperforming everything with anything: Python? Sure, why... by yvdriess on Monday January 28, 2019 @03:38PM (#19020851)
To generalize, learning C is easy, but doing anything with it is not.

To be clear, this is not meant as a critique on C, on the contrary. Put simply, it is just that making computers do stuff is hard. This is especially true if you want it to do it in a very particular way such as in high-performance code. If you cannot already leverage the work of other experts, you need to know about modern optimizing compilers, language runtimes, modern processor architectures, OS/system, ...)

To continue your Numpy example, that framework entombs the know-how and man-years of work of specialist in a certain area. If you need to do simple dense algebra, you will a hard time beating Numpy/Julia/Eigen/MKL etc. If your problem goes slightly off-track (e.g. sparse problems) where you cannot easily leverage the hard work and expertise of others, you better start rolling up your sleeves and open that main.c

Re:Outperforming everything with anything: Python? Sure, why... by comicjk on Wednesday January 30, 2019 @07:20AM (#19034472)
I used scipy's sparse matrices - that was actually a key part of the project.
Re:Outperforming everything with anything: Python? Sure, why... by jsymolon on Monday January 28, 2019 @09:03AM (#19017446)
> values initial easy of use much more than long term usefulness. ... to use or learn git ... (in a) pretty GUI.

With more experience you'll find that certain operations are easier with particular workflows.

Git vs other ... well, Subversion is the standard. I'm not getting paid to move repositories on a whim. I have to make a business case ... etc. Guess what, I've got better things to do (i.e. do things that make money) than chase the newest shiny thing.

Sometimes a multi-hundred line git dump works and sometimes it doesn't. In some workflows the GUI scans better. e.g. pick out the hot spots in functions.

Re:Outperforming everything with anything: Python? Sure, why... by d33 on Sunday January 27, 2019 @04:34PM (#19013922)
Git CLI is universally agreed to be absolutely terrible, with its manuals actually making it worse. Just flick through one or two blog posts you can find here, many of which already made HN:

https://www.google.com/search?q=why%20git%20cli%20sucks

Re:Outperforming everything with anything: Python? Sure, why... by Tarean on Sunday January 27, 2019 @05:19PM (#19014101)
There are two ways to use git:

- learn a basic workflow and ask/google for help for problems. A gui makes this slightly easier

- learn the underlying model for git. Then you probably still have to google for invocations occasionally but you would have to do the same with a sugary gui. And for complex actions in a gui the answer usually is 'use the cli'

Plus occasionally a gui does something incredibly weird like giving direct access to `git clean --force` like vs code did a while back.

Re:Outperforming everything with anything: Python? Sure, why... by btilly on Sunday January 27, 2019 @05:47PM (#19014234)
https://xkcd.com/1597/ is a sadly accurate description of how most of us use git.
Re:Outperforming everything with anything: Python? Sure, why... by marktangotango on Sunday January 27, 2019 @06:03PM (#19014303)
People used to say that about svn to which I akways found so odd. Perhaps I was fortunate to start out on a team that actually understood branching, merging, and most importantly, how to resolve merge conflicts?
Re:Outperforming everything with anything: Python? Sure, why... by mlthoughts2018 on Sunday January 27, 2019 @06:02PM (#19014300)
I like git cli and find it to be amazingly well-designed and intuitive.
Re:Outperforming everything with anything: Python? Sure, why... by anon4242 on Sunday January 27, 2019 @07:11PM (#19014587)
Ah, irony. Or maybe you could explain what's intuitive about the number of completely different things that for instance 'git checkout' is used for?

I like git, but the cli is only usable after a dash and a spoonful of aliases.

Re:Outperforming everything with anything: Python? Sure, why... by d33 on Sunday January 27, 2019 @06:22PM (#19014396)
If you could expand it into a longer answer, I would appreciate that - perhaps there are some pieces of good design (git add -p?) in Git, but overall it's too messy for many.
Re:Outperforming everything with anything: Python? Sure, why... by mlthoughts2018 on Sunday January 27, 2019 @07:03PM (#19014555)
git add, push, pull, fetch, bisect and rebase, along with git grep and log commands, are very easy to use and exceedingly rarely is anything else needed. Just use a rebase-only workflow and the cli essentially is self explanatory in terms of how your mutations affect the revisions.

Other commands like stash, checkout and branch are equally simple. It’s just a very simple user experience.

I think where people express confusion over git is that they don’t expect to be interact with revision history, rather just inflicting changes onto a head-only svn style repo.

People are mistakenly encouraged to bring that mentality to the table when it’s not useful. You need bring a mentality that you’re mutating and sculpting branches.

It’s like a beginner saying “snowboards are complicated” because they come in expecting it to be like a sled. You hear the same complaints about other systems like darcs and mercurial too, for the same reasons, even though each of those offers respectively super easy to use cli experiences as does git.

Re:Outperforming everything with anything: Python? Sure, why... by mathblocks on Thursday January 31, 2019 @04:24AM (#19043556)
As much as I find Git's all magic incantations difficult to master, I have to agree with your comment 100%.

Once you grok rebasing branches, git add, push, pull, bisect, rebase, log, commit --amend are all I have needed to work with Git and the experience has been far better than working with any other version control like SVN or Mercurial.

Re:Outperforming everything with anything: Python? Sure, why... by anon4242 on Sunday January 27, 2019 @07:31PM (#19014660)
> Other commands like stash, checkout and branch are equally simple

Ok, so they are the simple because you say so? Stash in all but the simplest cases is a sure-fire way to shoot yourself in the foot. Checkout is a weird guy, he does too many different things, and what's up with the double dashes? Super-weird! Also beware that any of your branch names happen to match any of the file names in the repo :O.

> I think where people express confusion over git is that they don’t expect to be interact with revision history

This is one of the things that confuses beginners about git, but it's not a confusion about git cli. You are conflating the criticism of git cli with criticism of git. Git is good, git cli is (notoriously) bad. However, eventually you'll (hopefully) learn the proper incantations and then using git cli will seem simple to you.

Re:Outperforming everything with anything: Python? Sure, why... by mlthoughts2018 on Sunday January 27, 2019 @10:14PM (#19015137)
I never claimed any of this was anything more than my own technical appraisal / opinion. But to be clear, you’re not offering any counter argument, just unsupported assertions of your different opinion, including things like “what's up with the double dashes?“ which makes it hard for me to believe I could personally find value in your view on it.

> “You are conflating the criticism of git cli with criticism of git.”

Not at all. I’m saying most of the time when people say they are confused by git cli, that it behaves counter to their expectations, they are not actually expressing any design limitation of the cli commands themselves, but instead blaming cli commands for the conceptual confusion they have about git’s model in general.