News for hackers. Stuff that matters.
Re:Why Python is Slow: Looking Under the Hood (2014) by baldfat on Wednesday October 25, 2017 @08:38AM (#15549514)
DEPLOYMENT

My ONE HUGE Gripe with Python. This and that Pandas (I understand why BUT it drove me away) Zero based for statistical work. Your math is 1 based and the language is 0 based.

Re:Why Python is Slow: Looking Under the Hood (2014) by peatmoss on Wednesday October 25, 2017 @09:12AM (#15549765)
It’s funny because deployment is one of the reasons I hear Python data people trash on R. In general, I’d agree with them that it’s slightly harder for systems people to grok R, but on the other hand I don’t exactly see Python as a shining beacon.
Re:Why Python is Slow: Looking Under the Hood (2014) by baldfat on Wednesday October 25, 2017 @06:06PM (#15554724)
R as a Domain Specific Language has great output for Reports, Word Documents or Power Point slides and a million of reports. There is also the shinny package and shinny server for web publishing.

This is why I went to R from Pandas. My company was impressd with all the reports but asked why they couldn't edit the themes. Then I did it in R in 2 days and haven't looked back. I love Python but I have been using it less and less and more Racket.

Re:Why Python is Slow: Looking Under the Hood (2014) by peatmoss on Wednesday October 25, 2017 @08:35PM (#15555475)
Haha, yes, I keep encountering your comments about R and Racket and have to do a double take to make sure you’re not me.

Would love to hear more about any data Racketeering you’re doing. I’ve been thinking of documenting up my wishlist for quanty things in Racket and maybe try implementing a data dsl in Racket.

Re:Why Python is Slow: Looking Under the Hood (2014) by baldfat on Thursday October 26, 2017 @12:21PM (#15560303)
I am thinking of doing a munging and data cleaning dsl and using OpenRefine as a way to implement the code. I really think that would be super handy for doing data cleaning.

A few people have done some R calls within Racket that is intresting.

Re:Why Python is Slow: Looking Under the Hood (2014) by peatmoss on Thursday October 26, 2017 @03:48PM (#15562357)
Let me know if you feel like combining forces either for implementation or for imagineering :-)

EDIT: I also know there’s a data frame package called munger, though I it’s undocumented and likely incomplete.

Re:Why Python is Slow: Looking Under the Hood (2014) by hasenj on Wednesday October 25, 2017 @11:05AM (#15550710)
Yup! This is what I meant by "lacking compilation".

For example, in Go, you can produce a single statically linked executable and run it on the server directly. No need for a dev-ops/infra team.

Re:Why Python is Slow: Looking Under the Hood (2014) by psynapse on Wednesday October 25, 2017 @03:33PM (#15553345)
Our Go code is built and tested by Jenkins. If green, the build is stored in an artefact repository. Another job is triggered to update the version in Puppet on potentially multiple targets.

The Puppet module is responsible for getting the binaries from the artefact repository, deploying them with config for the environment, running them as systemd units and shipping the journald output to Elasticsearch.

Static compilation does not obviate devops.

Re:Why Python is Slow: Looking Under the Hood (2014) by hasenj on Wednesday October 25, 2017 @10:42PM (#15555950)
Sounds like you have a lot of unnecessary cruft in your infrastructure.
Re:Why Python is Slow: Looking Under the Hood (2014) by throwaway894345 on Wednesday October 25, 2017 @09:42AM (#15549997)
Deployment and reproducible builds were so bad for us that we switched to Nix. It largely solved the problem, but it has us doing a lot of work to maintain our Nix infrastructure and definitions.
Re:Why Python is Slow: Looking Under the Hood (2014) by billfruit on Wednesday October 25, 2017 @10:08AM (#15550216)
Precisely the opposite reason R drove me away. R uses 1 based indexing.Seriously we should all be using Zero based indexing for all purposes.
Re:Why Python is Slow: Looking Under the Hood (2014) by peatmoss on Wednesday October 25, 2017 @11:17AM (#15550814)
One can make an appeal to aesthetics, but that’s no differentiator.

Or one could appeal to adherence to existing standards. Fortran is the oldest (portable) programming language and was 1-based.

Or one could appeal to consistency with the problem domain. Again, math [EDIT: indices are] 1-based.

Zero-based is consistent with C, but that’s about the best argument I can make for zero-based.

Re:Why Python is Slow: Looking Under the Hood (2014) by billfruit on Wednesday October 25, 2017 @11:05PM (#15556046)
I think Dijkstra established the case for using Zero based indexing strong enough: https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/E...
Re:Why Python is Slow: Looking Under the Hood (2014) by DonbunEf7 on Wednesday October 25, 2017 @12:11PM (#15551373)
Maths is zero-based. I'm not sure why you think that numbers start with one; every formulation of the integers in modern maths starts with zero.
Re:Why Python is Slow: Looking Under the Hood (2014) by peatmoss on Wednesday October 25, 2017 @12:18PM (#15551446)
Matrices, common in statistics because of applications of linear algebra, have long maintained the convention of i,j indexes starting with one.
Re:Why Python is Slow: Looking Under the Hood (2014) by dnautics on Thursday October 26, 2017 @12:12AM (#15556288)
It's not. Zero based is wise for offsets (CS) and fields where you have a zero element, and a few corner cases like factorial, but by and large any time you're enumerating an order over a nonempty set you start with one in math, because, max(indices) = |set|
Re:Why Python is Slow: Looking Under the Hood (2014) by baldfat on Wednesday October 25, 2017 @06:08PM (#15554740)
0 based was only for programming for iterations. This makes it a weird math for people. When the first column is 0 and 1 is the second column it is indeed weird and is why statistical languages are 1 based.