Thursday, April 23, 2015

Interview: Linux Journal with Larry Wall (1999)

Larry Wall, the Guru of Perl | Linux Journal http://m.linuxjournal.com/article/3394

Entertaining.

Posted via mobile.
Vasudev Ram
Software training and consulting.
Python, Linux, SQL databases, open source technologies.
www.dancingbison.com

Sunday, April 19, 2015

asciiflow.com: Draw flowcharts online, in ASCII

By Vasudev Ram



Saw this today: asciiflow.com

asciiflow.com is a site that allows you to draw flowcharts online, on their site, using the metaphor of a drag-and-drop paint program like MS Paint, but the flowcharts are drawn entirely using ASCII characters.

I tried it out a bit. Innovative.

One point is that to save the flowchart, it requires access to your Google Drive account.

The image at the top of this page, is of a flowchart that I created with asciiflow.com. I did not use the Save feature, but instead took a screenshot and saved it as a PNG file (using MS Paint, ha ha). The flowchart shows a diagram that illustrates the concept of a UNIX command pipeline, where the standard output of a preceding program becomes the standard input of a succeeding one (in the pipeline). (How's that for using web-based and Windows software to illustrate something about UNIX? :)

For another example of the innovative use of ASCII characters, check out this post I wrote somewhat recently, about the Python library called PrettyTable, which lets you generate visually appealing tables of data, bordered and boxed by ASCII characters:

PrettyTable to PDF is pretty easy with xtopdf

Also, since we're talking about standard input and output and UNIX pipelines, these two posts may be of interest:

1) [xtopdf] PDFWriter can create PDF from standard input

(The post at the above link also has an example of eating your own dog food.)

2) Print selected text pages to PDF with Python, selpg and xtopdf on Linux

Generalizing from a fragment of code in post 1) above, I'll also note that making a Python program usable as a component of a UNIX pipeline, can, in some cases, be as simple as having something like this in your code:
import sys
# ...
    for lin in sys.stdin:
        lin = process(lin)
        sys.stdout.write(lin)
which could be shortened to:
for lin in sys.stdin:
    sys.stdout.write(process(lin))
Due to this (being able to easily make a Python program into a component of a UNIX pipeline), you can do things like this (and more):

$ foo | bar | baz

where foo may be a built-in UNIX command (a filter) or a shell script, bar may be (for example) a Perl program that leverages some powerful Perl features, and baz may be a Python program that leverages some powerful Python features, thereby leveraging the UNIX philosophy concept of writing small programs, each of which do one thing well, or in this case, leveraging the features of different languages (each of which may do some things better than others), to write individual components in those respective languages. The possibilities are limitless ...

- Enjoy.

- Vasudev Ram - Online Python and Linux training;
freelance Python programming

Dancing Bison Enterprises

Signup to hear about new software products that I create.

Posts about Python  Posts about xtopdf

Contact Page

Friday, April 17, 2015

Linux skills in high demand in 2015, says Linux Foundation newsletter

By Vasudev Ram


Just saw this news via the newsletter that I get from the Linux Foundation:

Linux skills are going to be in high demand in 2015, according to a survey carried out by Dice.com and the Linux Foundation. This is the 4th year in a row that the survey has been done.

Excerpts from the report:
[
“Competition for Linux talent is accelerating, as the software becomes more ubiquitous,” said Shravan Goli, President of Dice

”Demand for Linux talent continues apace, and it’s becoming more important for employers to be able to verify candidates have the skillsets they need,” said Jim Zemlin, executive director at The Linux Foundation.
]

- Vasudev Ram - Online Python and Linux training and programming

Dancing Bison Enterprises

Signup to hear about new software or info products that I create.

Posts about Python  Posts about xtopdf

Contact Page


Saturday, April 11, 2015

Google integrates Blogger with Google Domains

By Vasudev Ram


The Google Domains service was started recently. (It is US-only as of now, but you can sign up to be notified when it is available in your own country.)

Today I saw on Blogger that Google has integrated Google Domains with Blogger. So you can now buy a domain from Google via Google Domains, from within Blogger.

Here are a couple of posts about this:

Custom domains for your blog made easy

Making it easier to get your business online with Google Domains

- Vasudev Ram - Online Python training and programming

Dancing Bison Enterprises

Signup to hear about new products or services from me.

Posts about Python  Posts about xtopdf

Contact Page

Friday, April 10, 2015

A four line Python quine

By Vasudev Ram




Something that happened today made me think of writing a quine, in Python.

A four line Python quine;
how's that for a rhyme?
# Not so good.

A four line Python quine;
Yes, this one is mine.
# Ah, better.

A four line Python quine;
Sure, this too is mine.
# So-so.

A four line Python quine;
Can you stretch that to nine?
# It may not be worth my time.

A four line Python quine;
Hello, sir, rise and shine!

Of course, since the quine prints itself (by definition) when run, I don't need to show the code separately from the output:
$ python quine.py
import sys
with open(sys.argv[0]) as program:
    for line in program:
        sys.stdout.write(line)
Let's check that it works right:
$ python quine.py > pq.py
$ fc /l quine.py pq.py
Comparing files quine.py and PQ.PY
FC: no differences encountered
The quine could be shortened to:
import sys
with open(sys.argv[0]) as p:
    for l in p:
        sys.stdout.write(l)
I'm sure someone can come up with a shorter quine; is it thine? but this was my first time writing one, and I had fun :)

- Enjoy.

- Vasudev Ram - Online Python training and programming

Dancing Bison Enterprises

Signup to hear about new products or services from me.

Posts about Python  Posts about xtopdf

Contact Page