For the best experience on desktop, install the Chrome extension to track your reading on news.ycombinator.com
Hacker Newsnew | past | comments | ask | show | jobs | submit | history | Altreus's commentsregister

False. print is a language construct

http://uk1.php.net/manual/en/function.print.php


+1 - oddly enough, my first thought in reading someone's report on the 'incorrectness' of their answers, and yet, adding to the misinformation.

Hint: any php 'function' that can be called without parens, is a language construct. Some of our favorite impostor 'functions' in php: echo, unset, isset, die, include, require


This site and I share a very strong link.

Apparently neither of us consider PHP to be programming.


Author here! I've created a page with a button so you can see how it functions: http://altreus.github.io/colourblind/index.html

HTH HAND


I totally had an awesome picture to link to here to prove my point but I can't find it.

Suffice to say that Apple pricing their bog-standard SATA hard disks at 39 cents a gigabyte (a high market price being 19 cents), and a similar attitude to the rest of their perfectly average hardware, explains the "overpriced toy" reaction to their products.


well it might explain the "overpriced" reaction but not the "toy" part


It's as though there's a sort of threshold of computer-ness, above which the general public become blithering idiots. Apple's removal of as many controls as possible make these items friendlier; but when they have been around as long as washing machines and toasters, I bet we'll find that this article applies to them as well.


Why use the command line at all when you can use a GUI?

Understanding how your system works is a different level from choosing the tools in the first place.


You may not always have your optimal tool set, such as when you're remoting into someone else's environment (common for sysadmins or contractors), or when you're stuck using someone else's computer rather than your own.


It depends on what you do, I suppose. If your work doesn't have a large command-line component, using the command line might be disruptive.

A large part of my job involves working with remote Linux servers, so I chose to invest time learning Linux command line tools and vim. Now I'm more productive in a terminal than in a GUI environment. I use common tools that are installed by default on Linux/Unix/OSX, so I can sit down anywhere and do my work, or SSH directly into my machine and have my exact work environment securely and without latency.


A command line is a poor mans gui.

A gui is a poor mans command line.

Whichever I'm using there are always aspects of the work that you could do better with the other.


Give me an example of something that you could do better with a gui. Just curious.


Selecting a number of unrelated items from a list. Example: You have a folder with music files and want to select some to copy onto your portable music player. It's easier to click on the items to select them than typing all the names, even with file name completion.


- interactively increasing the contrast of an image

- browsing the web (sorry, lynx users)

- play games (not that I'm a gamer)

- desk-top publishing

- routing a PCB

- CAD

and so on...

But then, each of those has moments when you think to yourself 'Man, I wished I could script this' (well, maybe not the games).


Sure, but given that I already use screen, what use cases would I find easier using job control instead of plain screen?


Simple command line timer:

    remind() {
        [[ $# -ge 2 ]] || { echo >&2 "Usage: $FUNCNAME time msg"; return 1; }
        local sec="$(($1*60))"
        (   trap "echo \"\$sec seconds left\"" QUIT
            while ((--sec > 0)); do sleep 1; done
            say "${@:2}" # OS X only, replace with your favorite notifier
        ) 2>/dev/null &
    }

    $ remind 30 get the laundry
Query time remaining with kill -QUIT %jobspec. Good for systems that don't have at(1).


Hm. That looks like quite a typing exercise. What's wrong with:

    ( sleep 1800 ; say "get the laundry" )&


His can be added to your .bashrc/.bash_profile, and then all you have to type is:

  remind [minutes] [message]
Functions can be imported to your shell. =)


neat trick


Thanks, that's useful!

Favorite notifier:

  echo "${@:2}" | growlnotify -t Reminder -s -m -


Ah, the only viable use for an iPad.

Except of course you can't write software for the iPad without spending money so screw it.


The future is here! Two USians and a European working successfully on a 2-day hackathon using such technology that blurs the boundary between server and client ... what more could we ask for!

Except robots


Would you rather she golfed it? ;)


I disagree. The post seems to me like it is aimed at learning new things, not an in-depth investigation on how the things you're already doing work in the background.

The things in the article are explained on their own level, and then a level below it, i.e. the file descriptors. How the file descriptors work, where they're stored, things like that, are well out of the scope of the article.

IMO.


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

Search:

HN For You