News for hackers. Stuff that matters.
Re:The Unix-Haters Handbook (1994) [pdf] by dsmithatx on Friday March 03, 2017 @08:38AM (#13782741)
When I read this 20 years ago I would never have believed I'd be typing this on a Mac laptop running yet another Unix variant. This line is now so funny...

As for me? I switched to the Mac. No more grep, no more piping, no more SED scripts. Just a simple, elegant life: “Your application has unexpectedly quit due to error number –1. OK?”

Re:The Unix-Haters Handbook (1994) [pdf] by dahart on Friday March 03, 2017 @09:39AM (#13783106)
Ha! I switched to Mac so I could have pipes, grep and bash. I personally believe a big reason for the Mac resurgence has to do with the switch to UNIX. I was on Windows using Cygwin for years before anyone I knew was using a Mac. Then OSX came out, and all of a sudden all the academics I knew switched to Mac, and a couple years later most of the professional programmers I knew had switched.

The great thing about a Mac is that I get to have my user level UNIX without having to know anything about the system level UNIX. I don't need to be a sysadmin to run the thing. I get grep and pipes without having to know all the crazy commands to tweak networks settings and display timings and boot scripts. When OSX came out, that was the state of Linux, you couldn't be just a user of it, you had to know way too much to get it running.

Re:The Unix-Haters Handbook (1994) [pdf] by andrewbinstock on Friday March 03, 2017 @05:15PM (#13787346)
> I personally believe a big reason for the Mac resurgence

Mac resurgence is more of a perception than reality. In 2016, Apple sold ~18.5M Macs, down from the previous two years [1] and off more than 10% from last year.

Granted that the Mac numbers are falling at a slower pace than the PC market as a whole, but resurgence is probably an over-characterization.

[1] http://finance.yahoo.com/news/state-apples-device-sales-1940...

Re:The Unix-Haters Handbook (1994) [pdf] by dahart on Friday March 03, 2017 @07:16PM (#13788200)
The other comments here are absolutely correct -- I was referring to OS9 vs OSX, on a 10-20 year time frame. OSX ushered in new waves of adoption that outshines previous numbers by an order of magnitude.

Given that Mac has gone from well under half a percent market share to over 7% today, I'd say "resurgence" is an under-characterization, relative to what I was talking about. ;) OS9 never had the market share that OSX has, so it's less coming back, and more dominating like it never did before.

Re:The Unix-Haters Handbook (1994) [pdf] by mwfunk on Friday March 03, 2017 @05:50PM (#13787629)
In this context, I think "Mac resurgence" refers to the Mac coming back from the dead over the past 20 years, not recent sales figures.
Re:The Unix-Haters Handbook (1994) [pdf] by mulmen on Friday March 03, 2017 @05:46PM (#13787602)
I think the resurgence refers to the market share Apple gained since the OS9 days.
Re:The Unix-Haters Handbook (1994) [pdf] by henrik_w on Friday March 03, 2017 @11:31AM (#13783955)
Agree! A real relief to get a proper Unix shell after getting by with Cygwin.
Re:The Unix-Haters Handbook (1994) [pdf] by apercu on Friday March 03, 2017 @01:47PM (#13785093)
As soon as I could install MySQL and Apache on OS X I had to have it. I no longer needed an internet/SSH connection to code.
Re:The Unix-Haters Handbook (1994) [pdf] by jackhammons on Friday March 03, 2017 @01:05PM (#13784735)
Have you tried the Windows Subsystem for Linux?
Re:The Unix-Haters Handbook (1994) [pdf] by TheGRS on Friday March 03, 2017 @01:15PM (#13784816)
Not OP, but I'm genuinely interested in how this experience is. What do you think of it compared to using, say, iTerm2 on OSX? I've been thinking of switching back to a Windows PC since I haven't been very impressed by OSX in the last couple of years.
Re:The Unix-Haters Handbook (1994) [pdf] by hermitdev on Friday March 03, 2017 @04:32PM (#13786845)
I've been using it since it's release to the fast insider ring and at work since it's release to the slow insider ring. It does everything I need to do. Build C++ with GCC or clang. ssh client works fine (have not tried ssh server, but supposedly supported). Python, Perl work fine. Have had some UI issues with the console, but those have been fixed on the fast ring.

The team behind WSL is also very responsive to issues reported at github.

Re:The Unix-Haters Handbook (1994) [pdf] by xorblurb on Friday March 03, 2017 @05:09PM (#13787271)
It's quite impressive. Ex Valgrind runs out of the box in last Insider versions.
Re:The Unix-Haters Handbook (1994) [pdf] by dahart on Friday March 03, 2017 @02:29PM (#13785513)
I haven't tried it yet, but I am looking forward to it.
Re:The Unix-Haters Handbook (1994) [pdf] by AsyncAwait on Friday March 03, 2017 @01:07PM (#13784746)
> The great thing about a Mac is that I get to have my user level UNIX without having to know anything about the system level UNIX. I don't need to be a sysadmin to run the thing. I get grep and pipes without having to know all the crazy commands to tweak networks settings and display timings and boot scripts.

Luckily, that is basically true for modern Linux as well.

Re:The Unix-Haters Handbook (1994) [pdf] by grecy on Friday March 03, 2017 @03:05PM (#13785872)
basically
Re:The Unix-Haters Handbook (1994) [pdf] by gshulegaard on Friday March 03, 2017 @05:16PM (#13787353)
Alright, I'll bite. What's missing?

I ask as I type from my Dell XPS 13" DE (aka Sputnik).

Re:The Unix-Haters Handbook (1994) [pdf] by aninteger on Friday March 03, 2017 @07:08PM (#13788155)
It's mostly hardware support still. As an example, try using a Baytrail/CherryTrail laptop with Windows 10. Now try in Ubuntu. Oh you need Linux 4.11. Oh that's not out yet, so you need to run a bleeding edge kernel directly from git. Even Ubuntu 17.04 is supposed to ship with 4.10 so you'll have to wait until Ubuntu 17.10 before your hardware might be usable.
Re:The Unix-Haters Handbook (1994) [pdf] by squarefoot on Sunday March 05, 2017 @04:19AM (#13795188)
Before blaming Linux devs for lack of support of new chips I would first check how Intel is cooperating with them by releasing proper documentation in due time.
Re:The Unix-Haters Handbook (1994) [pdf] by auno on Tuesday March 07, 2017 @12:32PM (#13812502)
As a counter-example, try buying a Baytrail/CherryTrail laptop with Windows 10. Now try to install OS X. Oh, you can't since it's not a Mac.

All the time the argument is given that OS X has much better hardware support than Linux, which is just not true. It might be true for OS X on a Mac compared to Linux on unspecified hardware. However, if you constrain the hardware choices even half as much as you do for OS X, that's not the case anymore.

Re:The Unix-Haters Handbook (1994) [pdf] by AsyncAwait on Friday March 03, 2017 @07:30PM (#13788287)
Yeah, but that's not really an argument for macOS, given Windows is not even Unix and OP mentioned macOS.
Re:The Unix-Haters Handbook (1994) [pdf] by gshulegaard on Friday March 03, 2017 @07:58PM (#13788431)
This and I was also under the impression that Ubuntu was experimenting with Bay Trail/Cherry Trail support in 16.10:

> http://www.cnx-software.com/2016/10/14/ubuntu-16-10-images-r...

Seemingly confirmed here:

> http://linuxiumcomau.blogspot.com/2016/10/running-ubuntu-on-...

Where this guy updated to say that current ISOs of 16.10 should work...

> Whilst two ISO sets of various Ubuntu flavours for both 16.04.1 and 16.10 releases are provided, I recommend first trying one of the 16.10 ISOs as these are the most recent and incorporate the latest kernel, patch sets and fixes based on previous releases and feedback. In particular, the Yakkety 16.10 ISO kernels support micro SD cards (although with some limitations), includes a patch for I2C bus, has improved RTL8723BS wifi and bluetooth support and most recently I've included support for full disk encryption on Lubuntu and fixed the home directory encryption for all flavours.

OpenSource tends to have a lag time to hardware by nature...but I do believe there was some exaggeration here.

Re:The Unix-Haters Handbook (1994) [pdf] by dualogy on Friday March 03, 2017 @02:30PM (#13785527)
> No more grep, no more piping, no more SED scripts

Fedora/Gnome here. I never use this sort of stuff, and modern power users really don't have to. That's why I categorically state that practically no-one in the real world "uses Unix", even though most OS-es incl mainstream mobile ones derive directly or indirectly from it, save for Windows and esoteric ones.

Do I enjoy modern Linux? Heck yeah. Do I want to use Unix? Piping and grepping and cat'ing and touch'ing and so forth? It's not rocket science but it's also a doggerel not smooth UX for me, and "not smooth" means not productive.

If I need to compose functionality for "shell"-based task automation, I whip up a small Go program. Portable across OSes should I ever move, bin dir is in PATH, compiles fast enough to not need script interpreter for iterating the "script" (tool) at hand, and the syntax and semantics are saner to me than sh scripts, aka no impedance mismatch vs other coding tasks.

(Sure enough though, for one-offs "search these for that" while already in the bash/etc, the built-in old-school tools still come in handy occasionally)

Re:The Unix-Haters Handbook (1994) [pdf] by xorblurb on Friday March 03, 2017 @05:24PM (#13787401)
If grepping and piping is not productive for you, you are simply doing tasks that do not require that to be productive.

OTOH working on some non-trivial code bases, maybe including system level code, typically requires grepping and piping, for at least some developers of the team, to be productive.

I too don't gratuitously use cat and touch and grep when I don't need to. I even less often use cmd stuff under Windows (using one of the dozen of bash that exists there is better for interactive command line use, when needed, on computers where I can have those), but if I need to I can do it.

Do I use Unix or not when I'm not typing into a traditional command line shell, but still using a Unix-based system as my direct terminal (or a light terminal connected to it)? "Interesting" question. Do I use an internal combustion engine when I'm driving a car? Do I use electricity when I switch on the light? I don't think we can answer any of those questions in a truly absolute way. But most of the time I would probably say yes.

Re:The Unix-Haters Handbook (1994) [pdf] by problems on Friday March 03, 2017 @08:56AM (#13782821)
How does one use a Mac without grep or piping?

I bought a macbook thinking I'd learn how to use it... but after 3 years, all I can do on a Mac is open a web browser and terminal.

Re:The Unix-Haters Handbook (1994) [pdf] by Gracana on Friday March 03, 2017 @09:00AM (#13782840)
This book was written long before Mac OS X.
Re:The Unix-Haters Handbook (1994) [pdf] by mcguire on Friday March 03, 2017 @10:26AM (#13783440)
I thought OSX was a weird Mach/BSD amalgam. In which case, not so much.
Re:The Unix-Haters Handbook (1994) [pdf] by pjmlp on Friday March 03, 2017 @09:51AM (#13783197)
> How does one use a Mac without grep or piping?

Using Finder, XCode, Objective-C and Swift frameworks,...

Re:The Unix-Haters Handbook (1994) [pdf] by problems on Friday March 03, 2017 @10:18AM (#13783385)
Bluh, don't get me started on Finder. Icons in directories would randomly be overlapping just because I hadn't been in them in a while and new files were added, they added this weird tagging system with colors that just doesn't make sense to me at all, it randomly thinks I want to view some sort of "recently used files and some random shit" list instead of my homedir. I don't know what the devs of it were thinking. Even bone stock Windows Explorer seems better. Easier to understand what's going on at least. I don't know why people seem to think Apple is some sort of UI god when they can't even make a usable file manager.

Objective-C looks like a clusterfuck and I never want to touch it. Swift seems like a quite good solution to that and I hope it eventually becomes the full replacement - but now more non-Apple laptops have high DPI screens, so I don't think I'll be around to see it happen.

Re:The Unix-Haters Handbook (1994) [pdf] by dahart on Friday March 03, 2017 @11:52AM (#13784118)
> Objective-C looks like a clusterfuck and I never want to touch it.

This is pretty much moot now, the Apple world is abandoning Obj-C, but AFAIK it's just old, not bad. Like, came out at the same time as C++ old, and has seen fewer changes to the language than C++ has. It's a compiled, C-like language, so yeah, hard to use and very easy to crash, just like C & C++.

Interested to hear your point of view on what makes it seem like a cluster, if you want to share. (And I'm only interested in hearing and understanding your opinion, not on debating or contradicting your experience.)

Obj-C had a pretty cool calling mechanism underneath, known as "message passing" -- more or less the analogy to C++'s virtual member functions. But it is the only compiled language I know where you can actually call functions by name, like construct a string dynamically and call, and you get those dynamic calls at the same speed as compiled code (minus a fast function lookup you can usually do once).

I used that mechanism in some games to build a nice state machine class for actor behavior. I did the same in C++, and the Objective-C code was way nicer & easier to use.

Re:The Unix-Haters Handbook (1994) [pdf] by seanp2k2 on Friday March 03, 2017 @12:18PM (#13784349)
I remember trying to do the "construct a function name as a string and call it" thing in VB6 many years ago before I "knew better". Any idea what that functionality is called? I always wondered why languages wouldn't let you do that.
Re:The Unix-Haters Handbook (1994) [pdf] by vram22 on Friday March 03, 2017 @02:51PM (#13785727)
>I remember trying to do the "construct a function name as a string and call it" thing in VB6 many years ago before I "knew better". Any idea what that functionality is called?

It's called by various names - not sure if there is an official one - such as dispatch tables, jump tables, dynamic dispatch, etc. It's a pretty old technique, I would say it probably dates from the time of early high-level languages, and I seem to remember that it was used in assembly languages too (so probably even earlier), by using various addressing modes (indexed, indirect indexed, etc. (those terms are from long-forgotten 6502 instruction set BTW), storing the address of a function at a location and then jumping to that address (where the address is dynamically set at run time by some other bit of code based on some condition), etc.

Here is a simple example in Python:

Simulating the C switch statement in Python:

https://jugad2.blogspot.in/2016/12/simulating-c-switch-state...

Edit: Googled and got a couple of relevant links:

https://en.wikipedia.org/wiki/Dispatch_table

https://en.wikipedia.org/wiki/Branch_table

Re:The Unix-Haters Handbook (1994) [pdf] by akiselev on Friday March 03, 2017 @12:44PM (#13784566)
I don't think there's another widely used name for it except dynamic or virtual dispatching (with inline caching of the lookup table). C is too low level and simple a language to have it in the string lookup form and in C++/Rust name mangling, symbol stripping from binaries, and generics would make the feature very difficult to implement and rather unergonomic. C#/F# and CLR C++/VB probably already have this in the form of the reflection/.Net runtime APIs (including JIT for generics) but implementing it in C++ or Rust would be very complex and it would be yet another feature that bifurcates the language ecosystem (like heap allocation for embedded). Python and Javascript do have this feature but you still have to have access to the scope to do it (self['fn_name'] or this['fn_name']) and this implementation exists in one way or another in most dynamic languages.

You can do this as a hack in most compiled languages by exporting symbols from a shared library and just using the OS specific dynamic linker but this is ugly, slow, and pointless in a static language.

Re:The Unix-Haters Handbook (1994) [pdf] by chaosite on Friday March 03, 2017 @12:37PM (#13784492)
You usually get that through either reflection or an "eval" command.
Re:The Unix-Haters Handbook (1994) [pdf] by dahart on Friday March 03, 2017 @12:05PM (#13784247)
The finder is a wart. Apple does have a lot of good UI elsewhere, but the finder needs an overhaul so bad it hurts.

Know what drives me the most nuts? That there's a single default key (Enter) to rename a folder, while you have to use a key chord (Command-O) to enter a folder. It's so backwards, renaming is not something I spend even remotely as much time doing as moving around. That's not to mention the so completely obvious missed opportunity to let the Enter key do what it says and Enter the folder.

Re:The Unix-Haters Handbook (1994) [pdf] by cmrdporcupine on Friday March 03, 2017 @12:37PM (#13784493)
What's ridiculously annoying is how good the Finder was under classic Mac OS compared to what exists now. The new Finder is a bad translation of some of the classic functionality overtop of the NeXT workspace manager. And it's a bad fusion of the two, in my opinion.
Re:The Unix-Haters Handbook (1994) [pdf] by derefr on Friday March 03, 2017 @01:58PM (#13785215)
> (Command-O) to enter a folder.

I use Command+Down, which opens Finder shell-objects generally. It's the "descend" to Command+Up's "ascend."

Re:The Unix-Haters Handbook (1994) [pdf] by dahart on Friday March 03, 2017 @02:38PM (#13785591)
Not sure why I haven't been using that, but that is better than Command+O for sure, thanks!

Still, all navigating should be single-key-able, right? I guess it is technically, with left & right arrow keys in the List & Columns views, but I don't use those or like those as much, for whatever reason.

Re:The Unix-Haters Handbook (1994) [pdf] by mustacheemperor on Friday March 03, 2017 @02:29PM (#13785520)
Finder is absolutely boggling to me. I've considered switching to Mac as a mobile development platform a few times, but every time I sit down to actually USE one I realize I'd rather just put Ubuntu on a windows laptop or something.

>I don't know why people seem to think Apple is some sort of UI god when they can't even make a usable file manager.

I know! I ask myself how this is possible every time.

Re:The Unix-Haters Handbook (1994) [pdf] by rileymat2 on Friday March 03, 2017 @11:11AM (#13783810)
I completely agree with you, the "All My Files" view that it defaults to seems to not fit me very well.

The nice thing is that it is configurable.

Re:The Unix-Haters Handbook (1994) [pdf] by DonHopkins on Friday March 03, 2017 @10:57AM (#13783694)
From day one, they should have called it the "Loser" instead of the "Finder".
Re:The Unix-Haters Handbook (1994) [pdf] by seanp2k2 on Friday March 03, 2017 @12:22PM (#13784385)
for anyone unaware, mdfind foo on Mac does the same as locate foo on Linux. CLI spotlight search. Also, open bar will open a thing (file, folder, application, whatever) in the associated application. I typically do open . to pop a finder if I want a GUI to mess with files in the current dir.
Re:The Unix-Haters Handbook (1994) [pdf] by BatFastard on Friday March 03, 2017 @09:02AM (#13782853)
As most developers do. Most everything else a pain in the Asteroid.
Re:The Unix-Haters Handbook (1994) [pdf] by jdblair on Friday March 03, 2017 @11:03AM (#13783730)
I switch back to Mac from Linux so I could have grep, pipes, sed and all the UNIX stuff alongside real commercial applications like Word, Excel and Photoshop.

The irony is now I run Linux in a VM because the toolchains for the embedded work I do all run there. In principle I can make it all work in MacOS, but it already works in Linux.

Re:The Unix-Haters Handbook (1994) [pdf] by ptero on Friday March 03, 2017 @08:42AM (#13782758)
You beat me to that respose! The book is a great fun to read. I read it in grad school 20 years ago (where Unix was the only option if you wanted to write your articles in TeX) and re-read it with much pleasure today (when 75% of my computer time is spent, by choice, on Linux variants)