Hacker News new | past | comments | ask | show | jobs | submit | m31415's comments login

Not being pedantic, but OP's script isn't Bash, it's POSIX sh. POSIX sh can be executed in Bash, but there are several differences. The only non-POSIX command I can spot in that script is shuf.


Which makes it a valid reference for bash.


That's like saying a well-written C program is a good reference for C++. In any case, writing POSIX-only shell scripts is much harder than writing Bash scripts, which can often be much faster (e.g., one can use {1..10}, which doesn't need an external call, instead of `seq 1 10` to iterate through a list of numbers). For POSIX-only shell scripts, the ones used in Git [1] are some of the best-written I've seen.

[1]: https://github.com/git/git/search?l=shell


Not being pedantic, but * something pedantic *.


What I meant is that I'm not being pedantic for the sake of being pedantic.


This is based on one person's (DHH's wife's) experience with an algorithm. Hyperbole much?


False. There are many other people in the replies saying they had the same experience.


This is an excellent article. Much of the discussion about digital vs. dead-tree books is similar to Stallman's "Right to Read" essay [1], which was published 22 years ago in 1997. As a graduate teaching assistant who has taught several introductory physics courses in an American university, I've noticed that book publishers like Pearson and MacMillan have been pushing students to buy/subscribe digital versions of their textbooks. Professors also increasingly assign homeworks online rather than make students do it on paper. This is really sad because it's really difficult to learn physics without actually doing pen-and-paper calculations. As an example, in a particular homework on vector addition, students were asked to draw the resultant vectors on some poorly-written JS based web notebook, and the students spent more time getting the thing to work instead of learning vector addition.

I can also understand why publishers push for digital subscriptions. Introductory physics textbooks have hardly changed in the past 30-40 years (I would even say they were less distracting and had better problems 30 years ago than now), and it should be obvious for the execs at Pearson and MacMillan that their business model is not going to survive unless they introduce subscription based textbooks. You really don't need anything more than an old (SI-units based) copy of Halliday & Resnick to learn introductory physics.

[1] https://www.gnu.org/philosophy/right-to-read.en.html


> Professors also increasingly assign homeworks online rather than make students do it on paper.

I saw this begin to get popular towards the end of my undergraduate studies. I fought against it tooth-and-nail, because all of a sudden students are required to pay a third-party in order to turn in their homework. Why in the fuck do I have to pay a publisher to submit homework to my professor?


> Why in the fuck do I have to pay a publisher to submit homework to my professor?

The argument is that it makes it easier for the professors/teachers to grade homework when they're submitted electronically. Of course, that's a stupid argument since part of a professor's job is teaching students, and that inevitably involves grading things. Few professors would be convinced by such an argument though.


> The argument is that it makes it easier for the professors/teachers to grade homework...

The entire world is always looking for easier and more efficient methods of doing work. I don't think that's an invalid argument at all. It's the professor's job, yes - and why can't they seek out "better" methods of doing their jobs? (I use quotes to suggest that 'better' is subjective.)

Is there an argument against these tools that says they're ineffective? That says they make professors less effective? Maybe, but that's not the same as "...makes it easier ... is a stupid argument..."


This is a place where free software and OER (openly-licensed educational resources) could really make a difference.

In my experience the online assessment solutions offered by most commercial publishers are horrible, while open source solutions like WeBWorK http://webwork.maa.org/wiki/Get_WeBWorK and MyOpenMath https://www.myopenmath.com/index.php are not bad and have been around for many years.

Yes they are not as "shiny" as the commercial offerings, but I'd trust them much more for actual learning/practice/quizzing than the mainstream publisher crap.


> Why [...] do I have to pay a publisher to submit homework [...]?

Indeed this is ridiculous. This should be part of your university tuition, whether they self-host or outsource, students shouldn't be paying beyond tuition to get their homework submitted.


Halliday and Resnik is what I used in High school, and when I went to college I disliked the intro text they used so much I bought my own ancient copy of H&R to work with


Indeed, I would say most "modern" introductory physics textbooks (including newer editions of old texts like Halliday and Resnick or Sears and Zemansky) are terrible. Of course, the quality of printing, graphics, etc. have improved, but I don't think students ought to pay $300 for just that.


RMS has even underestimated a few things:

> Ten percent of those fees went to the researchers who wrote the papers

Do researchers get anything from journal subscription fees? AFAIK they even have to pay to get an article published.

> Dan resolved the dilemma by doing something even more unthinkable—he lent her the computer, and told her his password. This way, if Lissa read his books, Central Licensing would think he was reading them.

This is definitely missing some biometry, like constantly doing face recognition with a builtin camera to ensure that the user is indeed the right one.


But not all American whiskys are spelt "whiskey", e.g., Maker's Mark: https://www.makersmark.com/


Some problem collections by Arnold:

* Problems for Children from 5 to 15: http://jnsilva.ludicum.org/HMR13_14/Arnold_en.pdf

* A mathematical trivium pt. 1: http://www.physics.montana.edu/avorontsov/teaching/problemof...

* A mathematical trivium pt. 2: https://www.latroika.com/mathoman/exos/arnold-exos-math-engl...


Thank you, Is there an answer key to those?


Not that I know of, but many of the problems have been discussed online, e.g, calculating the average of the 100th power of sin in under 5 minutes [1], which according to Arnold, if you cannot solve, you don't understand mathematics.

[1]: https://math.stackexchange.com/questions/24533/find-the-aver...


Yes, and quite a few Mir books are available freely [1]

[1] https://mirtitles.org


Thank you for the link. A treasure trove. Their archive page [1].

[1] https://archive.org/details/%40mirtitles?&sort=-publicdate&p...


For mathematics, I would recommend:

1. "What Is Mathematics? An Elementary Approach to Ideas and Methods" by Courant and Robbins -- a general book on mathematics in the spirit of Feynman lectures.

2. Strogatz's "Nonlinear Dynamics and Chaos" -- it's a bit narrow in scope (mostly dynamical systems with a little bit of chaos/fractals thrown in) but very good nonetheless.

3. Tristan Needham, "Visual Complex Analysis", beautiful introduction to complex analysis.

4. Cornelius Lanczos, "The Variational Principles of Mechanics" -- this is a physics book, but one of the classics in the subject, and as Gerald Sussman once remarked, you glean new insights each time you read it.

5. Cornelius Lanczos, "Linear Differential Operators" -- an excellent treatment of differential operators, Green's functions, and other things that one encounters in infinite-dimensional vector spaces. This book has some very intuitive explanations, e.g., why d/dx is not self-adjoint (i.e., Hermitian), whereas d^2/dx^2 is.

For chemistry, I would recommend "General Chemistry" by Linus Pauling, even though it's a bit outdated.


"Nonlinear Dynamics and Chaos - Steven Strogatz, Cornell University" is available[0] on youtube as a series of 25 lectures. (From 2014.)

From the description:

"This course of 25 lectures, filmed at Cornell University in Spring 2014, is intended for newcomers to nonlinear dynamics and chaos. It closely follows Prof. Strogatz's book, "Nonlinear Dynamics and Chaos: With Applications to Physics, Biology, Chemistry, and Engineering."

The mathematical treatment is friendly and informal, but still careful. Analytical methods, concrete examples, and geometric intuition are stressed. The theory is developed systematically, starting with first-order differential equations and their bifurcations, followed by phase plane analysis, limit cycles and their bifurcations, and culminating with the Lorenz equations, chaos, iterated maps, period doubling, renormalization, fractals, and strange attractors.

A unique feature of the course is its emphasis on applications. These include airplane wing vibrations, biological rhythms, insect outbreaks, chemical oscillators, chaotic waterwheels, and even a technique for using chaos to send secret messages. In each case, the scientific background is explained at an elementary level and closely integrated with the mathematical theory. The theoretical work is enlivened by frequent use of computer graphics, simulations, and videotaped demonstrations of nonlinear phenomena.

The essential prerequisite is single-variable calculus, including curve sketching, Taylor series, and separable differential equations. In a few places, multivariable calculus (partial derivatives, Jacobian matrix, divergence theorem) and linear algebra (eigenvalues and eigenvectors) are used. Fourier analysis is not assumed, and is developed where needed. Introductory physics is used throughout. Other scientific prerequisites would depend on the applications considered, but in all cases, a first course should be adequate preparation."

[0] https://www.youtube.com/playlist?list=PLbN57C5Zdl6j_qJA-pARJ...


Just a note, "Visual Complex Analysis" is a terrible book to learn complex analysis. Proofs are very iffy, akin to sketches of proofs. With that said, it is a excellent supplement to another std. complex analysis textbook.


Is it just the normal difference between e.g. an engineer's approach to real analysis and a mathematicians (but complex analysis swapped in), or something else?

I can think of a lot of fields where a decent grasp of complex analysis concepts would be very helpful even without being able to do rigorous proofs.


This is nuts. Mozilla should at least allow the user to set a custom search engine using an about:config option, like the old keyword.URL [1] option, which was removed after Firefox 23. I use DuckDuckGo with several customizations as POST parameters and it would be very cumbersome if I have to write an extension to use DDG the way I want it.

[1] http://kb.mozillazine.org/Keyword.url


From the conclusion

> the FSF needs to focus on the algorithms that change people behavior

Is this satire or does the author really want the FSF to engage in mind control? This is such low-effort tripe and obvious personal attack.


Don't you notice a slowdown in your connection on using a 20MB hosts file?


In my experience, the size of the hosts file matters on some devices, and some os.

On older versions of Windows, for example, networking and browsing slows noticeably as the size of the host file increases.

The same can be said for rootable mobile devices, though it’s less noticeable off WiFi because cellular latency is so much higher.

I would guess, marginal consumer and home routers will suffer with larger hosts files, but I don’t have sufficient experience to claim this for certain.

Background: years of discussions and issues at https://github.com/StevenBlack/hosts, which I maintain.


No, I don't, but years ago [eons], hosts files tended to redirect to 127.0.0.1, which does incur a penalty. Directing to 0.0.0.0 [invalid IP] does not (or not any more).


Not at all.

I also just checked via dig if there is any slowdown and dig didn't report any. (I first queried google.com with the large hosts file, then replaced the hosts file with a default one, cleaned my DNS caches and requeried and it didn't show any speedup.)


Furthermore, I don't know how Pi-Hole works internally so I don't know if it's somehow specially optimized compared to /etc/hosts or implements any caching strategies but wouldn't introducing another server in your DNS chain slow things down more than /etc/hosts which is always present anyways?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: