Re: how to seamlessly play audio clip

2020-02-08 Thread Erik Christiansen
On 07.02.20 23:53, Long Wind wrote:
> i use mplayer -loop 0 to play white noise(it might help sleep by masking 
> other noise)
> but when it reach end and restart to play againthere's some interval, which 
> isn't desirable
> any mplayer option or other player i can use so that it plays seamlessly??

I find it very effectively masks barking neighbourhood dogs and dripping
water. Most pleasant has been a Surf Sound Generator I built from a kit
around 40 years ago. It adds 3 long-period (several seconds) RC
oscillators, which amplitude modulate the slightly pink noise. Their
different periods keep them out of phase, like random waves whooshing up
a beach.

A little bit of low-pass filtering of white noise makes it a bit pink. I
find modest low frequency emphasis more relaxing - and perhaps a little
better at masking, as it is the low frequencies which travel.

And it's cheaper than double or triple glazing.

Erik



Re: Howto?

2020-01-26 Thread Erik Christiansen
On 26.01.20 03:03, Gene Heskett wrote:
> Greetings all;
> 
> Trying to sort out how to xz compress.  But xz is rejecting directories, 
> like it expects tars output as its input. And the  manpage is silent on 
> redirections.
> 
> I want to compress the directory foo into foo.xz, keeping foo as there 
> may be further patches applied in the future.
> 
> Syntax?

Gene,

While the manpage says "xz is a general-purpose data compression tool
with command line syntax similar to  gzip", it appears to lack the -r
option. That'd be why the examples found with a "xz directory
compression" google use tar, I figure. (Like in the old days.)

Now we know what "similar" means.

Erik



Re: Displaying an arbitrary file in _both_ HEX and ASCII

2020-01-25 Thread Erik Christiansen
On 25.01.20 05:51, Richard Owlett wrote:
> My current project is dealing with oddly formatted data. Mostly just plain
> ASCII. Progress on another aspect of my project has made this thread moot.

For the thread, there's also: $ apt-cache search bvi
  bvi - binary file editor

found at: http://bvi.sourceforge.net/

But if it's mostly ASCII, with a few funnies, then I'd just vim the
file, and type ga to display the decimal, octal, and hex value of the
character under the cursor. To insert funny characters, I've found
digraphs sufficient. (Mapped more mnemonically if used often, e.g. ;e for æ)

And for a quick hex/ascii dump of a file, I've used this for over 30 years:

$ od -xc < /etc/issue
000654469626e614720554e4c2f6e697875
  D   e   b   i   a   n   G   N   U   /   L   i   n   u   x
02037205c20206e6c5c0a0a
  7   \   n   \   l  \n  \n
032

There are options for fudging the offsets, if needed.

Erik



Re: sed question

2019-12-06 Thread Erik Christiansen
On 06.12.19 14:40, songbird wrote:
> Greg Wooledge wrote:
> ...
> > Ideally, you'd just stop trying to use sed with user-supplied variables
> > injected into the code.  Sed was never built to be safe for that kind of
> > work.
> 
>   sed was designed to operate on streams.  a sequence of 
> characters is a stream.  i don't see any reason why 
> putting the variable into the middle of that expression 
> means anything different.

If the sed implementation of variable regexes proves problematic, then
there's awk with its Dynamic Regexps. (Section 2.8 of the pdf manual
floating about out there.)

With its C-like syntax, it's less write-only than perl, perhaps because
it is of the same vintage as sed. (And from the same stable.) It does
admittedly tend to view its input stream a line at the time.

Erik



Re: Is this ALL good advise

2019-12-05 Thread Erik Christiansen
On 04.12.19 17:33, Gene Heskett wrote:
> My point exactly.  That means two accounts at your isp, I think mine 
> charges only after the 2nd one, and two active fetchmail/procmail 
> sessions = more trouble than it worth. Me? I got the heck off gmail 
> years ago for lack of privacy reasons, and I frankly don't understand 
> why the rest of the planet hasn't bailed out for the same reasons.

Hi Gene, I can't fault the idea of avoiding gmail.

Incidentally, one fetchmail/procmail session will handle a bunch of mail
sources, given more than one "poll" line in .fetchmailrc, AFAIR. And
multiple recipients just needs multidrop-mode, which it enters on
finding more than one "user" line in the config file. So it should be
pretty straightforward. If you really wanted to do it, that is.

Erik



Re: is it possible run 32-bit app on 64-bit amd system??

2019-08-13 Thread Erik Christiansen
On 13.08.19 07:47, rhkra...@gmail.com wrote:
> On Monday, August 12, 2019 10:56:22 PM riveravaldez wrote:
> > >> btw which option should i add to mplayer command line
> > >> so that it play only audio part (not video part)  of a file?
> > 
> > $ mplayer -novideo file
> 
> I'm in a strange mood today (I end up here often) -- I like to see things 
> like 
> that written as:
> 
> mplayer -novideo 
> 
> or 
> 
> mplayer -novideo 
> 
> It makes it more clear what is "fixed text" and what is a variable / 
> parameter.

Yes, to those of us who have done a bit of reading, especially from the
days when clarity of written expression was more highly valued. (Or at
least given greater formality.)

But not everyone has been exposed to the above long and widely established
substitute for italics or similar to denote non-literal text, so your
"teaching moment" is an act of generosity.

Erik



Re: Error with logrotate.

2019-08-12 Thread Erik Christiansen
On 13.08.19 00:38, Gene Heskett wrote:
> Its good that we can fix it, BUT IF you are going to restrict where we 
> keep logfiles like this then FIX the /var/log perms so that fetchmail, 
> procmail, spamassassin, clamav and its ilk, running as the user can 
> access /var/log to keep its logs.  Debian's legendary paranoia about who 
> can write a log in /var/log has long since forced most of us that want 
> that log, into moving it to /home/username/log and reprogramming 
> logrotate to maintain it there years ago.

Nuthin' wrong with that. An individual user's logs in his tree, and
system logs in theirs. No effort:

$ grep log .fetchmailrc .procmailrc
.fetchmailrc:set logfile "/tmp/fetchmail_log"
...
.procmailrc:LOGFILE=$MAILDIR/tmp_log.$$
.procmailrc:FINAL_LOG=$MAILDIR/log

If you had a house full of rowdy teenagers, would you really want them
all able to wallop /var/log? And what if it were a tribe of uni
students? (I think I have you sufficiently worried now, Gene.)

Erik
(Who was both, once.)



Re: 3 phase power (was Re: Wireless home LAN - WiFi vs Bluetooth?

2019-07-31 Thread Erik Christiansen
On 30.07.19 11:34, rhkra...@gmail.com wrote:
> Most residential power in the US is created using a single phase transformer 
> (so called because (1) it only takes power from one of the 3 phases mentioned 
> above and (2) darn -- it's a bitch getting old.

Tell me about it. ;-) I'd offer that (2) is simply that there's only one
primary and one secondary, not three of each, on multiple arms of the
core.

> The secondary of that 
> transformer is center tapped with the center tap almost always grounded, such 
> that the other two taps from the secondary both produce 120 volts (RMS 
> nominal), but out of phase with each other by 180 degrees.

Those details on this thread have been interesting, because 120v is unknown
down under - and, I think, in the UK.

Erik



Re: Wireless home LAN - WiFi vs Bluetooth?

2019-07-30 Thread Erik Christiansen
On 29.07.19 20:46, David Wright wrote:
> On Mon 29 Jul 2019 at 18:00:25 (-0400), Gene Heskett wrote:
> > On Monday 29 July 2019 17:26:17 ghe wrote:
> > 
> > > On 7/29/19 1:57 PM, David Wright wrote:
> > > > Irrelevant in a domestic setting: it's illegal to have more than one
> > > > phase in an ordinary house.
> > >
> > > FYI, and significantly OT:
> > >
> > > I don't think that's true in the US.
> 
> IIRC Joe's in the UK. 3-phase there is lethal. 1 is bad enough.

Here in Australia we also have only "240v", generally closer to 230v
nowadays, and domestic 3 phase is no big deal, just a couple of thousand
dollars more, as it's just a 3 phase cable, 3 fuses on the pole instead
of 1, and then what you want to cram in your switchboard. Good for a big
aircon in a big house on a 43°C day. (110°F)

People who have it and a nice big PV array on the roof are allowed to
feed much more power back into the grid than someone with only one
phase. Now that the feed-in tariff is better, some consumers have close
to zero electricity bill, despite using grid power at night. (Much
cheaper than batteries.)

Should have no power-line signal leakage on my new build, it's off-grid,
with a mile to the nearest neighbour. ;-)

Erik



Re: Wireless home LAN - WiFi vs Bluetooth?

2019-07-29 Thread Erik Christiansen
On 29.07.19 14:44, Joe wrote:
> On Mon, 29 Jul 2019 09:34:25 -0400
> Dan Ritter  wrote:
> > 
> > In a single-family house, Powerline is about as secure as wired
> > ethernet: you need to come in and plug something in to spy on
> > it.
> 
> Most people won't have RF blocking filters at their house electricity
> inlet, so there may be some leakage to the next house that's on the
> same phase.

Several of those clamp-on ferrite noise suppression cores, of a size to
fill a partly closed fist, would do some good without requiring wiring
alteration.

> I can get a reliable connection on the end of about 100ft of house and
> extension cable, so I wouldn't be surprised to be able to find a signal
> in another house. 

And ethernet cable is twisted pair, minimising radiation. Power wiring
is just parallel conductors, so a sniffer has more signal to pick up.
Additionally, transmitted power levels in a Powerline network would
likely be higher than on a clean ethernet cable, due to the intermittent
electrical noise found on power circuits, due to switching loads,
motors, etc. (It's either that or retransmit corrupted packets.)

The analog designers in an R lab I worked in about 40 years ago spent
their lunch hours on a powerline intercom. Pushing a good clean signal
through the noise was a challenge.

> Presumably, when we speak of security here, we're not talking about
> accidental reception, wi-fi WEP would be sufficient to prevent this,
> but a deliberate attempt to break in. We could assume that someone
> trying to get into a power-line link would be able to amplify the
> signals involved.

The street wiring would act as an extension of the antenna provided by
the house wiring, and with much larger loop area between conductors,
radiate much better. Acting against that is masking RF noise from
everything else in the street, requiring either selectivity or at least
a capacitive connection in the street or the comfort of a neighbour's
house.

But even if you have a wireless keyboard, the your passwords are out there
several times per day, I figure.

Erik



Off-topic: Action [Was: Re: Off topic: remaja (teens)

2019-06-22 Thread Erik Christiansen
On 22.06.19 12:23, Thomas Schmitt wrote:
> Hi,
> 
> deloptes wrote:
> > Please stop!
> 
> You know what happens if you try to issue commands here, do you ?
> 
> 
> > BTW you are also a carbon dioxide producer ;-)
> 
> Voluntarily i'm only part of the athmospheric carbon cycle, not of the
> unearthing of carbon for oxidation. I'm doing my best to reduce the
> profits which carbon diggers can make from me.

Sitting here, in the down under winter, heating with carbon-neutral biomass
as I've done for the last 30 years, doing paperwork to progress my
off-grid 100% solar and biomass (i.e. stored solar) powered rural build,
I'd suggest that moving at least 2m above current sea level before the
end of the century, is not wasted effort.

> But i am not a teenager any more. So i am glad to see how well they are
> doing their job of annoying us in a constructive way.

Not all old folk are slow learners. I'm 65, and am accelerating the
action I've been taking for over three decades. What we're seeing
socially is the late adopters finally catching on. (Including bankers
and insurers, showing the problem is not imminent - it is here now.)

With Chennai running out of water now, and the Himalayas losing 1% of
snow mass yearly (28% already gone), the CIA's projection of water wars
by 2030 is optimistic, I expect. Here, in southern Australia, our farm
is destocked, because the last dam, dug in a watercourse, deepened to 6
metres, has run dry. Neighbours dams have been dry for a year. Never
before has there been no water at all.

The national (arguably vanity) rice crop over the last three years is:
807,000 ; 635,000 ; 52,000 tonnes. Hay prices have tripled, despite a
steady high stock slaughter rate. Usually one of the world's largest
wheat exporters, we are now importing increasing quantities to try to
keep core breeding stock alive. 

The extra 1 billion human mouths to feed every 12 years puts increasing
strain on decreasing food supply reliability. Loss of farmland to
suburbia is compounding the problem, also due to water use.

Feedback effects are small snowballs yet, but measurably growing:

http://www.bbc.com/future/story/20190612-the-poisons-released-by-melting-arctic-ice

We're slow to the party down here, but even we can pick up our game:

https://www.abc.net.au/news/2019-06-14/australias-largest-solar-and-battery-farm-opens-in-kerang/11209666

Let's all act before "Children as young as 10 were being sent to fetch
water a train ride away, hauling back containers of water almost as big
as they were." becomes symptomatic of the next generation's fate:

https://www.abc.net.au/news/2019-06-22/chennais-telling-the-globe-a-story-about-water-scarcity/11229084

Erik



Re: Reading pdf files

2019-06-15 Thread Erik Christiansen
On 15.06.19 07:51, Curt wrote:
> curty@einstein:~$ mupdf
> usage: mupdf [options] file.pdf [page]
> -p -password
> -r -resolution
> -A -set anti-aliasing quality in bits (0=off, 8=best)
> -C -RRGGBB (tint color in hexadecimal syntax)
> -W -page width for EPUB layout
> -H -page height for EPUB layout
> -S -font size for EPUB layout
> -U -user style sheet for EPUB layout
> 
> So I guess, 'mupdf -C FFEFD5 foo.pdf' (which gives papaya, not wheat--can't 
> find
> wheat--but at least it's a foodstuff). Works here.

Many thanks, Curt. I'll have to update my mupdf:

$ mupdf -C FFEFD5 ~/Personal/domestic/shed/design/plans.pdf
mupdf: unknown option -C
usage: mupdf [options] file.pdf [page]
-b -set anti-aliasing quality in bits (0=off, 8=best)
-p -password
-r -resolution
-A  disable accelerated functions

And that seems to need an update of my ancient debian version, as an
"apt-get install mupdf" offers nothing newer. Procrastination does seem
to catch up on one eventually.

Erik



Re: Reading pdf files

2019-06-14 Thread Erik Christiansen
On 14.06.19 10:51, Celejar wrote:
> On Fri, 14 Jun 2019 18:50:22 +1000
> Erik Christiansen  wrote:
> > I only use mupdf for problem pdf files, but it's very nifty to have on
> > hand.
> 
> I actually love mupdf, and I use it as my main pdf reader. It's just so
> lightweight and easy to use for basic pdf reading.

On trying it again, it does look very promising. Is there a way to set
the background colour? With xpdf I use "-papercolor wheat3" to avoid
eyestrain from the white background.

Erik



Re: Forgot name of Debian "configuration" {wrong word?} file

2019-06-14 Thread Erik Christiansen
On 14.06.19 06:10, Richard Owlett wrote:
> I can't remember the name of the file which identifies the association
> between a directory (i.e. \home) and which physical partition it is on. The
> file I'm looking for also identifies which partition is used for swap.

Easier than looking in /etc/fstab is just running the "mount" command.
The "df" command also includes what you seek in its output.

Erik



Re: Reading pdf files

2019-06-14 Thread Erik Christiansen
On 13.06.19 16:29, k. jantzen wrote:
> 
> in general I do not have a problem reading a pdf file with either xpdf or
> documentviewer.

Yup, documentviewer will sometimes show faint lines better, I find, but
it's easy to set the background colour in xpdf.

> But once in a while I get a pdf file that they cannot read and then I have
> to go to Windows to open it.
> 
> What is so spectacular about these files that they cannot be read by the
> above mentioned programs?

That varies, and a reader with good error messages is the easiest way to
find out.

> Is there another program that would read such a file?

Well, given s/would/could, try mupdf:

$ apt-cache search mupdf
mupdf - lightweight PDF viewer
mupdf-tools - commmand line tools for the MuPDF viewer
libmupdf-dev - development files for the MuPDF viewer

In my case, a pdf certificate from a state authority displayed the logo
and signature in xpdf, but none of the text - not much use at all.

A quick install of mupdf not only allowed the whole document to be
displayed, but issued (a squillion times) the following error message on
stderr:

Error: Couldn't create a font for 'ABCDEE+Calibri,Bold'
Error: Found a bad table definition on true type definition, trying to 
continue...

after an initial:

Error: PDF file is damaged - attempting to reconstruct xref table...

I only use mupdf for problem pdf files, but it's very nifty to have on
hand.

Erik



Re: What is agetty, and why can't it be stopped?

2019-06-09 Thread Erik Christiansen
On 09.06.19 19:11, Brian wrote:
> On Mon 10 Jun 2019 at 00:52:21 +1000, Erik Christiansen wrote:
> 
> > 
> > On 09.06.19 06:59, Gene Heskett wrote:
> > > And what do we call that Erik, thats much bigger than a normal foop, a 
> > > megafoop maybe?  Good grief, Charley Brown.  And we're stuck with it. :(
> > 
> > Well now, there are folks who have observed that not all progress is
> > forward, .
> 
> Indeed there are; their promotion of "backward progress" mangles the
> English language and brings into doubt any subsequent argument being
> promoted. Are these the same people who observe "forward regression"
> in some processes?

No, that's just your lack of understanding being expressed by you. Many
of the nuances of the meaning of "progress" may be found in:

 1. To make progress; to move forward in space; to continue
  onward in course; to proceed; to advance; to go on; as,
   railroads are progressing. "As his recovery progressed."
--Thackeray.

Please think on the following example. A party might progress (continue
onward in course) deeper into a swamp, the mire might progress (advance)
up the sides of their boots, and their progress (procession) may grow
progressively slower and more laboured. Does this progress (advance)
their goals?

Once you apply your mind to it, I'm sure that you can understand these
nuances of the English language. (If English is not your first language,
then your uninformative overly opinionated interruption is excused. ;)

> Incidentally, the OP has no intention of changing the init system he
> is using. He has enough problems on his plate already.

How fortunate Gene is to have you to tell him what he wants. Perhaps
you'll also tell him to be grateful for your decisionmaking on his
behalf? 

Incidentally, I thank you for leaving the task of providing informative
contributions, outlining real-world options, to the helpfully inclined.
It'll save confusion.

Erik



Re: What is agetty, and why can't it be stopped?

2019-06-09 Thread Erik Christiansen


On 09.06.19 06:59, Gene Heskett wrote:
> And what do we call that Erik, thats much bigger than a normal foop, a 
> megafoop maybe?  Good grief, Charley Brown.  And we're stuck with it. :(

Well now, there are folks who have observed that not all progress is
forward, and not all code bloat and pervasiveness is a benison,
resulting in at least two ways to remain essentially debian without
remaining stuck in the foop, mega or otherwise.

One simple method is from the "Insidious systemd" thread on this list.
Quoting from <20190527144308.0398ce4b@debian9>:

On 27.05.19 14:43, Patrick Bartek wrote:
> I used the "approved" conversion documented on Debian's web site
> somewhere: apt (or apt-get) install sysvinit-core.
...
> Totally automatic. All of systemd's libraries remained along with udev
> and a couple others I don't recall.  It freed up about 6 or 7 MB of
> RAM over a systemd boot.

One apt-get install is about as easy as it could be.

Some residual unused libraries mouldering in the background do no harm,
but if they offend, then there is devuan. While my laptop and main
desktop are pre-systemd debian, I've run devuan on another host for some
time. It is only sans-systemd debian, remaining true in other regards.
Downloading an image, putting it on a usb stick, and doing yet another
install is a bit more work, and another list to subscribe to. There are
a number of debian users who appear satisfied with the sysvinit-core
package. To my mind it neatly solves the problem of an old bloke, happy
with traditional sysvinit, having to load wetware RAM with a completely
new way to get the same bucket of water from the well as we've been
doing for decades. (Speaking of self, here.)

Erik

-- 
"If you want to eat hippopotamus, you've got to pay the freight."
 - attributed to an IBM guy, about why IBM software uses so much memory.



Re: What is agetty, and why can't it be stopped?

2019-06-09 Thread Erik Christiansen
On 08.06.19 11:28, Gene Heskett wrote:
> On Saturday 08 June 2019 10:20:09 am deloptes wrote:
> > Did you try running this without systemd? I recall you mentioned
> > somewhere you removed it
> >
> > regards
> 
> No. And I doubt there would even be a running system left. I don't think 
> I wrote that it had been removed...
> 
> I just didn't know that it could be made so pervasive in one swell foop.

Err, Gene, this foop has swelled to 1.2 million lines of code while your
back was turned. Pervasiveness is its essence.

https://linux.slashdot.org/story/19/05/25/0538206/systemd-now-has-more-than-12-million-lines-of-code

Erik



Re: What is agetty, and why can't it be stopped?

2019-06-06 Thread Erik Christiansen
On 06.06.19 07:14, Gene Heskett wrote:
> >   # Example how to put a getty on a serial line (for a terminal)
> >   #
> >   #T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
> >   #T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100
> >
> Yes, I recall those days. But until now ttyS0 and S1 if it existed, were 
> free for my to use. Now it seems to want to grab everything in sight.

Er, Gene, does your /etc/inittab have either of those lines uncommented
to activate a getty on them? If so, just comment them again. If not, did
your upgrade land you in systemdix land, so the traditional way is gone.

> This is MY machine, and it should be able to do what I want it to do.  I 
> finally did kill the one that was grabbing ttyS0. In fact it appears I 
> killed them all, htop cannot find one running now, and neither can an 
> lsof, Yet the machine seems to be running normally.
> 
> > Cf. man inittab for details. See? Still gettys being started
> > here, for the Linux virtual consoles. And some examples on
> > how to do it for serial terminals.
> >
> No man page for inittab seems to be installed.  That seems to be a head 
> scratcher right there.

Nah, systemd replaces the traditional SysV init stuff, if you let it be
installed. Then you have to learn new ways.

Erik

-- 
manual, n.:
A unit of documentation. There are always three or more on a given item.
One is on the shelf; someone has the others.
The information you need is in the others.   - Ray Simard



Re: That time IPv6 farted in Gene's church (Was Re: forcedeth?)

2019-05-28 Thread Erik Christiansen
On 28.05.19 08:59, Gene Heskett wrote:
> On Tuesday 28 May 2019 08:34:37 am Erik Christiansen wrote:
> > That said, one could upgrade just that one package, and try it out. If
> > it is fixed, you're on a winner then and there. "Fixed" beats
> > "reported", as you can get on with the next issue.
> >
> > Erik
> 
> A great idea Erik. What then is the deb line in sources.list to enable 
> that?  Thats what I was alluding to when I said inner circle.

At https://wiki.debian.org/DebianExperimental#To_configure_APT
we see a sources.list line and how to pin a specific package install to
that, either on the command line or in /etc/apt/preferences.

Here's hoping that your wife's COPD is bearable, she doesn't throw your
cooking at you, and you can maintain the stamina each day to be her
palliative carer despite your 84 years. 

Erik




Re: IPV6 hosts file (was: Re: That time IPv6 farted in Gene's church (Was Re: forcedeth?))

2019-05-28 Thread Erik Christiansen
On 28.05.19 14:59, to...@tuxteam.de wrote:
> On Tue, May 28, 2019 at 08:51:41AM -0400, Gene Heskett wrote:
> 
> [...]
> 
> > But who or what is the gatekeeper to make sure the address you choose, 
> > supposedly at random, isn't in use someplace next door or half the 
> > planet away?  There may be some sort of an enforcement in ipv6, but I've 
> > not heard of it. That doesn't mean it doesn't exist, just that if it 
> > does, I've never read about it.
> 
> I refer you (second time today, hint, hint) to this page from Wikipedia:
> 
>   https://en.wikipedia.org/wiki/Link-local_address#IPv6

That gives a vague nebulous overview, but Gene needs a bit more detail.
A quick google of "linux static ipv6 address howto" gave some promising
looking hits. I liked the look of the third hit:

https://kb.wisc.edu/ns/page.php?id=14099

While the example is aimed at a specific site, it shows the files to be
edited, and IIUC, FE80 is for local addressing, like ipv4 non-routable
address ranges, so it should be generally applicable, I figure.

The tutorial in the second hit:

https://www.cyberciti.biz/faq/ubuntu-ipv6-networking-configuration/

might be worth a try next, using an FE80 address, I figure.

Use your google foo, Gene! There's so much chaff out there, and life's
too short to be sorting the wheat out with tweezers.

Erik



Re: That time IPv6 farted in Gene's church (Was Re: forcedeth?)

2019-05-28 Thread Erik Christiansen
On 28.05.19 08:02, Gene Heskett wrote:
> On Monday 27 May 2019 11:18:49 pm Joe Pfeiffer wrote:
> 
> > Gene Heskett  writes:
> > Your version (1.14.6-2) of network-manager appears to be out of date.
> > The following newer release(s) are available in the Debian archive:
> >   experimental: 1.18.0-1
> > Please try to verify if the bug you are about to report is already
> > addressed by these releases.  Do you still want to file a report
> > [y|N|q|?]?
> 
> And this exposes something in debian's policy I object to, as strenuously 
> as I can. A newer version may well fix the bug, but its never given to 
> the users until they upgrade to the next release, and that brings a 
> never shrinking list of new bugs.

Gene, you're just too shy and retiring. In such a case, if experimental
is not your cup of tea, why not conclude "It needs to be fixed in stable.",
and hit 'y' to still file a report. After all, until it's backported to
stable, it's still an outstanding bug.

That said, one could upgrade just that one package, and try it out. If
it is fixed, you're on a winner then and there. "Fixed" beats
"reported", as you can get on with the next issue. 

Erik



Re: That time IPv6 farted in Gene's church (Was Re: forcedeth?)

2019-05-28 Thread Erik Christiansen
On 27.05.19 23:32, Jimmy Johnson wrote:
> No, seriously I would like to get some user feedback to the question.
> And also why is net-tools being deprecated?

It's not. You and I fully approve of it, so it's fine for the use cases
in which it gives the desired results. (See ifconfig use on this thread.)

It's Network-Munger which I have had to deprecate right off my machines
in the past, in order to get static networking running. 

If I were Gene, I'd blow it away first, ask questions afterwards. But
that's just my experience. His WV mountain gremlins might have placed
other obstacles, but one less can only help in this case.

Erik



Re: IPV6 hosts file (was: Re: That time IPv6 farted in Gene's church (Was Re: forcedeth?))

2019-05-28 Thread Erik Christiansen
On 27.05.19 17:06, Gene Heskett wrote:
> Thats fine, shows the loop local stuff, but how does one determine the 
> ipv6 address for picnc.coyote.den for instance. I think it somehow 
> related to picnc's mac address, but thats just a WAG.

On coyote, it'll look something like line 3:

$ ifconfig -a
eth0  Link encap:Ethernet  HWaddr 00:31:20:c2:5f:5e  

  inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
  inet6 addr: fe81::231:19ff:fea1:4f4e/64 Scope:Link
  ...


But if in doubt, set it to something you like, then add it to /etc/hosts on
the others, I figure. (Haven't yet fussed with IPV6, myself.)

Erik

P.S. Yes, there's doubtless an "ip" way to show addresses too. BMG.

-- 
Habit is habit, and not to be flung out of the window by any man, but
coaxed down-stairs a step at a time.
  - Mark Twain, "Pudd'nhead Wilson's Calendar



Re: pmount could perhaps be of greater utility?

2019-05-12 Thread Erik Christiansen
On 12.05.19 13:45, Eric S Fraga wrote:
> On Sunday, 12 May 2019 at 17:52, Erik Christiansen wrote:
> > On 11.05.19 14:38, Eric S Fraga wrote:
> >> This is nice; is there an equivalent for FAT file systems?  Most of the
> >> devices I mount using pmount are sd cards (cameras etc.).
> >
> > Pmount is just a wrapper around the standard mount program, and that
> > will try to guess the fs type if not specified in the invocation - as
> > above. That manages ext2 and ext3 without assistance, but ... Ah, yes,
> > with a vfat stick it gives:
> 
> Sorry, I should have been more explicit.  I use pmount all the
> time.  Works fine.  What I was looking for was an equivalent of e2label
> for vfat, if that even makes any sense.

Dunno how much sense can be found here, as dosfslabel doesn't do it, but
this gives the appearance of doing it for me:

$ blkid | awk --field-separator '"' '/sdb1/ { print $2 }'
4DAB-09E3

from blkid's line:

/dev/sdb1: UUID="4DAB-09E3" TYPE="vfat"

As it replicates the automounter's behaviour, and that uses the label
for ext[23] sticks, I'm happy to take that UUID as the label, since I
have nothing else to go on. (Never had a winderz box in 30 years in IT,
or the 11 years since.)

Erik



Re: pmount could perhaps be of greater utility?

2019-05-12 Thread Erik Christiansen
On 11.05.19 14:38, Eric S Fraga wrote:
> On Saturday,  4 May 2019 at 16:43, Erik Christiansen wrote:
> >  To provide that convenient automation, I use:
> >
> >  $ which lmount
> >  lmount is a function
> >  lmount () 
> >  { 
> >  pmount $1 `e2label $1`
> >  }
> 
> This is nice; is there an equivalent for FAT file systems?  Most of the
> devices I mount using pmount are sd cards (cameras etc.).

Pmount is just a wrapper around the standard mount program, and that
will try to guess the fs type if not specified in the invocation - as
above. That manages ext2 and ext3 without assistance, but ... Ah, yes,
with a vfat stick it gives:

$ lmount /dev/sdb1
e2label: Bad magic number in super-block while trying to open /dev/sdb1
Couldn't find valid filesystem superblock.

And "tune2fs -l /dev/sdb1" says the same. Quite what the automounter
does to overcome that, I haven't yet figured out. A quick rewrite of
the tiny wrapper wrapper does improve matters somewhat:

lmount () { # Mount a USB stick at 
/media/read_stick_label
   if [ mp=`e2label $1` ] ; then# if e2label can grok the label.
  pmount $1 $mp
   else # When that fails, TRY TO
  pmount -t vfat $1 vfat# use fs type as mountpoint, for now.
   fi
}

mounts vfat OK, but the "label" argument, now third, is ignored despite
being compliant with the manpage. So it falls back to mounting on
/media/sdb1 in a most wilful manner:

/dev/sdb1 on /media/sdb1 type vfat
(rw,nosuid,nodev,noexec,relatime,uid=1000,gid=1000,fmask=0177,dmask=0077,codepage=cp437,iocharset=iso8859-1,shortname=mixed,quiet,utf8,errors=remount-ro)

Either I'm not holding my mouth right, or that looks like a bug.

> Thanks.

We're not home yet.

Erik



Re: Netiquette [Was: Re: pmount could perhaps be of greater utility?

2019-05-07 Thread Erik Christiansen
On 07.05.19 09:05, rhkra...@gmail.com wrote:
> So, I'll use "publicly" -- I was going to do that, but it just seemed wrong 
> at 
> the time ;-)

It seems harder to remember uncommon spelling now than when I was
younger, and until the spellchecker disagreed, I'd gone with your
spelling - it's more consistent. But then English isn't famous for that.

Erik



Netiquette [Was: Re: pmount could perhaps be of greater utility?

2019-05-07 Thread Erik Christiansen
On 07.05.19 07:38, rhkra...@gmail.com wrote off-list:
> On Tuesday, May 07, 2019 12:01:49 AM Erik Christiansen wrote:
> >  only the author is dumb enough 
> 
> Why use language like that?  (It does not contribute to the welcoming 
> environment that I'd like to see cultivated here.)
> 
> Aside: I've replied privately, but I would like to reply publically (sp?) in 
> order to spread the message, but only if you feel comfortable with that 
> (which 
> I don't expect you will).)

If my judgemental wording has offended the author on the other list,
then I will admit to careless use of language. The out-of-the-blue shot
across my bow from David, using that awkwardly and unproductively
constructed use case looked like a deliberate straw man attack, coming
hot on the heels of a deprecation attempt. Where a shell provides syntax
alternatives, all still documented and supported, it may be perceived as
unwelcoming and unproductive to spontaneously hound one usage in favour
of one's own bias. Still, it would be better if my response had been more
sanguine.

Erik

P.S. s/publically/publicly   (Yep, spellchecking in Vim in Mutt is OK
  with that. Caveat: I use a British
  dictionary. Haven't checked for possible USA
  divergent spelling.)
-- 
Time is a great teacher, but unfortunately it kills all its pupils.
  - Hector Louis Berlioz



Remove nautilus to stop automounts? [Was: Re: pmount could perhaps be of greater utility?

2019-05-07 Thread Erik Christiansen
On 04.05.19 13:48, Jonas Smedegaard wrote:
> Quoting Erik Christiansen (2019-05-04 08:43:53)
> >  There doesn't seem to be an option for pmount to mount at
> >  /media/label_read_from_the_media
...
> I don't personally use pmount since some years, but that sure sounds 
> like a nice suggestion: Please consider filing as a bugreport against 
> pmount with severity "wishlist".

Hmmm, reportbug says:

Your version (0.9.23-2) of pmount appears to be out of date.
The following newer release(s) are available in the Debian archive:
  experimental: 0.9.99-alpha-1
  unstable: 0.9.23-3+b2
Do you still want to file a report [y|N|q|?]? N

but

# apt-get update
# apt-get install pmount

gives:

pmount is already the newest version.

so I'd probably have to move from wheezy to something newer to be up to
date on that utility. No time for that now.

The nifty pmount feature becomes unnecessary if I instead disable the
automounter, eliminating label-defined mountpoints. But:

# apt-get install dconf-editor  # gives:

The following packages have unmet dependencies:
 dconf-editor : Depends: libdconf1 (>= 0.25.1) but it is not going to be 
installed
Depends: libglib2.0-0 (>= 2.55.1) but 2.33.12+really2.32.4-5 is 
to be installed
Depends: libgtk-3-0 (>= 3.22.0) but 3.4.2-7+deb7u1 is to be 
installed

so the easiest way might just be to remove nautilus, as it's never been
used here. The gnome DE wouldn't fall over without it?  

Erik



Re: pmount could perhaps be of greater utility?

2019-05-06 Thread Erik Christiansen
On 07.05.19 10:12, David wrote:
> On Mon, 6 May 2019 at 23:53, Erik Christiansen  
> wrote:
> > On 06.05.19 09:03, Greg Wooledge wrote:
> > > On Sat, May 04, 2019 at 01:48:01PM +0200, Jonas Smedegaard wrote:
> > > > Quoting Erik Christiansen (2019-05-04 08:43:53)
> 
> > > > >  pmount $1 `e2label $1`
> 
> > > and is using the ancient deprecated command substitution syntax (which
> > > will work in this case, but is not a good habit).
> 
> > That does appear to remain opinion. The venerably traditional syntax is
> > still fully legal supported bash syntax, e.g.:
> >
> > http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_03
> >
> > The recent (late last century, IIRC) introduction of the $(...)
> > alternative syntax has admittedly brought newer *nix users who know
> > nothing else, and so delude themselves that there is nothing else. That
> > is a misapprehension. To each, his own, especially amongst adequately
> > equivalent alternatives.
> 
> Hi Erik
> 
> Maybe you would enjoy answering this question then?
> https://lists.gnu.org/archive/html/help-bash/2019-05/msg0.html
> 
> Because apparently no-one else has, hehe :D

I can see why - the question wilfully exploits the fact that bash is not
a full programming language, and only the author is dumb enough to construct
such self defeating perversity as using two echos to fabricate difficulty
where none need exist. (Please read next paragraph before kneejerking.)

In a real case of substitution of more substantial commands, it is both
simple and convenient to perform the operations sequentially (i.e. on
separate lines), rather than obfuscate with unnecessary nesting.

Having an intermediate result in a shell variable can often save a lot
of debugging time, both during script development and later, when
unanticipated input causes undesired effects. Having to deconstruct a long
nested assemblage in order to debug it leads to a chained implementation
in any event.

Erik

-- 
Good judgement comes from experience.
Experience comes from bad judgement.  - Jim Horning



Re: pmount could perhaps be of greater utility?

2019-05-06 Thread Erik Christiansen
On 06.05.19 09:03, Greg Wooledge wrote:
> On Sat, May 04, 2019 at 01:48:01PM +0200, Jonas Smedegaard wrote:
> > Quoting Erik Christiansen (2019-05-04 08:43:53)
> > >  $ which lmount
> > >  lmount is a function
> > >  lmount () 
> > >  { 
> > >  pmount $1 `e2label $1`
> > >  }
> > 
> > I recommend to install package shellcheck and run "shellcheck lmount".
> 
> My initial reaction was similar, but he might not be using a regular
> shell.  At the very least, his "which" command is not the standard
> which(1) utility, because that wouldn't know about shell functions.
> 
> So, either he isn't in bash/ksh/dash, or his "which" command has been
> overridden with a function or alias.  (On the other hand, his output
> from "which" looks identical to bash's "type" output.  So maybe he
> did something like alias which=type.)

Well surmised, good sir. It's more than 30 years since I found "which"
on HP-UX inadequate and "type" meaninglessly mnemonic of "print", thus
the alias. Through SunOS, Solaris, and Linux, the inadequacy has
remained - and so the remedy.

> At the end of the day, if this is supposed to be a bash function, it
> has three quoting errors,

Yep, if the robustness required for users other than an author were
applicable, then I see two absences of double quotes. But it is worth
remembering that there are no robustness requirements when the author is
the only user, and supporting a space in "/dev/xxx" is in any event a
pointless exercise.

> and is using the ancient deprecated command substitution syntax (which
> will work in this case, but is not a good habit).

That does appear to remain opinion. The venerably traditional syntax is
still fully legal supported bash syntax, e.g.:

http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_03

The recent (late last century, IIRC) introduction of the $(...)
alternative syntax has admittedly brought newer *nix users who know
nothing else, and so delude themselves that there is nothing else. That
is a misapprehension. To each, his own, especially amongst adequately
equivalent alternatives.

HAND

Erik
(Who has used the newfangled syntax on occasion, just to see if it works.)

-- 
Do not do unto others as you would they should do unto you.
Their tastes may not be the same.
  - George Bernard Shaw



Re: apache2 missing a file, won't run.

2019-05-06 Thread Erik Christiansen
On 05.05.19 17:16, Gene Heskett wrote:
> You have made it very clear not to assign a pw to root, do everything 
> with sudo.

That's just religion, Gene, promulgated to minimise queries and
complaints from people getting themselves into trouble. Like
vaccination, it only needs 95% coverage to provide herd immunity. To
avoid having to fuss with getting the sudo thing to actually work here,
I still do a "su -" in a spare xterm, and leave the root session open
for a while, till the current problem is sorted.

To remind that more than ordinary user care is warranted in that xterm,
in the event of leaving it open beyond short term memory, I put this in
/root/.bashrc

export PS1="\[\033[1;31m\]\u@\h:\W\$ \[\033[0;0m\]"

to make root's prompt red, and declare itself as root.

It takes more than a generalisation to alter my habits of more than 30
years. My take is: Use what works best for you, especially if you accept
the consequences without complaint. But I figure I'm treading a parallel
path to yours there.

Erik



pmount could perhaps be of greater utility?

2019-05-04 Thread Erik Christiansen
>From the pmount manpage for stretch:

»
 pmount device [ label ]

 This will mount device to a directory below /media if policy is met
 (see below). If  label is given, the mount point will be /media/label,
 otherwise it will be /media/device.
«

 There doesn't seem to be an option for pmount to mount at
 /media/label_read_from_the_media

 To provide that convenient automation, I use:

 $ which lmount
 lmount is a function
 lmount () 
 { 
 pmount $1 `e2label $1`
 }

 Is it worth adding a pmount option to provide that simple but useful
 convenience for general consumption?

 Why? Well some days the automounter just doesn't work on my old Debian
 install. The little LED on the stick blinks furiously for seconds on
 end after stick insertion, but then ... nada. No joy on running mount
 to see if the absence of the GUI navigator-thingy really is indicative.
 And my script for off-site backups expects the backup media at the
 mountpoint which the automounter normally sets, based on the label.
 
 Just a thought.

 Erik



Re: which mutt?

2019-05-03 Thread Erik Christiansen
On 03.05.19 18:01, Russell L. Harris wrote:
> P.S.  Would someone kindly tell me how, while in Mutt and reading a
> message such as this, to launch a browser to open links such as [1]
> and [2] above?

A convenient alternative is to just double-click on a link in mutt's
display in an xterm, then paste anywhere in the middle of firefox/iceweasel
(not in the URL box up top). That works with a simple config:

URL Drop to Invoke:
   To be able to drop a URL anywhere in the window, to open it:
   Put about:config in the URL box, scroll to  middlemouse.contentLoadURL, and
   click to toggle it to true. Now a URL highlighted in an xterm can be pasted
   to firefox (and opened) with one middlemouse click - even if it has a
   spurious space/line-break in it.  (Thanks to John L. Fjellstad)


Then html messages can generally be subjected to e.g.:

text/html; /usr/bin/html2text '%s'; copiousoutput; description=HTML Text

which preserves the recipient's text experience, keeping display in
mutt. (Yup, the real one - since late last millennium. ;-)

Erik

-- 
HTML is not email, and email doesn't contain HTML, so please turn HTML
formatting OFF in your email client. We have filters in place that will
reject your message if your posting contains HTML.
   - http://gpl-violations.org/mailinglists.html



Re: Net::DNS::Nameserver

2019-04-26 Thread Erik Christiansen
On 26.04.19 23:09, mick crane wrote:
> I did wonder if was some scheme I was unaware of.
> I noticed a couple of weeks ago somebody used these "::" between words to
> identify something.
> Like in apt you have
> /var/lib/apt/lists/security.debian.org_debian-security_dists_buster_updates_main_source_Sources
> made me think that these dots was some way of identifying a thing so that
> everything is the same over the whole wide world .
> Or something like that.

More the opposite. i.e. make the tail end of the long::name::thingy
identifiable in a _restricted_ scope. The :: nomenclature first appeared
(to my eyes) in C++ several decades ago. For perl to adopt an existing
convention is a step forward for the language.

Here's a brief exchange describing ::, the scope-resolution operator:

https://stackoverflow.com/questions/15649580/using-in-c

Erik

-- 
Arguing that Java is better than C++ is like arguing that grasshoppers taste
better than tree bark.   - Thant Tessman



Re: Simple Linux to Linux(Debian) email

2019-04-08 Thread Erik Christiansen
On 08.04.19 17:43, to...@tuxteam.de wrote:
> On Mon, Apr 08, 2019 at 09:33:03PM +0900, Mark Fletcher wrote:
> > Hello all
> > 
> > As I wrote this I began to consider this is slightly OT for this list; 
> > my apologies for not putting OT in the subject line but mutt won't let 
> > me go back and edit the subject line.

As already mentioned, mutt allows editing of the headers prior to
sending. 's' invokes editing of the Subject.

> Mutt can do that, too. To send via an alternative SMTP server, I do
> roughly:
...

That seems very convenient for a mutterer, yet (out of ancient habit) I
use mailx to fling off a quick short missive constructed on the command
line, here any calendar events looming in the next fortnight:

x=`calendar -l 14 -f ~/Personal/calendar`
( [ -n "$x" ] && echo "$x" | mail -s "$x" erik )

(Yes, popular bash idiom has recently (maybe even this century) morphed
from backquotes to $(...) gumpf. \Whatever/ )

You may want to put something other than the first line of the script
output in the subject line, -s "...".

$ apt-cache search mailx | grep mailx
bsd-mailx - simple mail user agent
heirloom-mailx - feature-rich BSD mail(1)

Even more manual would be to employ netcat or telnet to port 25, and
talk raw SMTP. (Handy when diagnosing a remote mailhost's
peculiarities.)

Erik



Re: Measuring (or calculating) how many bytes are actually written to disk when I repeatedly save a file

2019-04-07 Thread Erik Christiansen
On 07.04.19 08:12, rhkra...@gmail.com wrote:
> Sorry, I should have tried to be more clear -- sort of a digression, but I 
> came from an environment where anytime someone used the word assume, someone 
> else would point out what (they thought) that meant (it makes an ass out of 
> [yo]u and me).

Not the boys in blue, by any chance? Station sergeants tend to plant
that lesson early in a rookie's consciousness, I hear.

> I still use the word, but use the "(I know)" as a defensive mechanism to 
> stave 
> off the expected response.

Given that the implication of "assume" is to take something on faith,
without supporting evidence, a safer word might be "surmise". A guess
with an implication of thoughtful deliberation behind it leaves little
for the overly opinionated to gnaw on.

Erik



Re: text editors

2019-03-29 Thread Erik Christiansen
On 30.03.19 01:29, deloptes wrote:
> John Hasler wrote:
> 
> > I'm not trying to persuade anyone to use Emacs.  I am trying to convince
> > people not to be deterred from trying it because of myths such as "You
> > can't use Emacs if you can't program in Lisp".
> 
> Sorry John, but all of this is obsolete, if you are pragmatic enough, you
> would admit it. Just take a step back and have a look from the other side.
> What I am trying to say is that it is not worth investing time in learning
> it - learning not lisp, but the whole emacs stuff and partially lisp,
> because as someone said sooner or later you need this or that - finally
> this is THE feature of emacs. If you do not take advantage of lisp, then
> why not use any other editor. Sorry!

As a 30 year vim/vi veteran, I'm not wildly predisposed to emacs, but
some of its users might prefer 3-key chords to vim's modality - having
to remember whether you're in normal or insert mode for minutes at the
time. (Unless you turn on an indicator. I change the cursor colour as
well as having mode displayed in the status line. Over-65s may be granted
that dispensation, perhaps.)

The only other editor I've used is the line editor, CREDIT. (Yes,
everything was in capitals only, IIRC.) That was 1981, and it was on
the Intel "Blue Box" MDS, complete with 8" floppy drives. (Harddrives
were only know on mainframes and top end minicomputers back then.)

Erik



Re: text editors

2019-03-29 Thread Erik Christiansen
On 29.03.19 10:50, Gian Uberto Lauri wrote:
> >>>>> "EC" == Erik Christiansen  writes:
> 
> EC> Yes, yes, reflexive combativeness is jolly good fun, but
> EC> understanding is more useful in the long term.
> 
> In my experience, if the language is elegant and wise, you can write
> your code "easily" and often you get better coding.
> 
> EC> word used refers to being an analogue, i.e. taking the same place
> EC> in the other editor.
> 
> As someone else wisely pointed out in this thread (my apologies for
> forgetting the name), Emacs is built in Lisp, the interpreter and some
> speed critical parts are coded in C, but the latter are somewhat "C
> coded Lisp objects".
> 
> Differently from other tools that can be extended with "plugins", in
> Emacs is simpler to pass from the "I know which key to press" to the
> "I know what code to write" - provided you have some minimal knowledge
> of Lisp syntax and constructs - because in Emacs every keystroke
> triggers a function call and you Emacs tells you which function is
> invoked, how to use it and even, if you have the lisp sources
> installed, see its implementation. That's how some "random amateur
> lisp coder" was able to bang the original html-helper-mode to the tool
> he used to survive ASP pages :).

Yup, again, output-only mode - unrelated to input. A ROM-based monologue
doesn't make for much of a conversation, certainly not a thoughtful one.

Erik



Re: text editors

2019-03-29 Thread Erik Christiansen
On 29.03.19 10:44, deloptes wrote:
> One can live and do everything without Emacs. 

Can't resist paraphrasing that in light of Emacs' OS-like reputation:

One can live and do everything within Emacs ... or without.

I would be tempted to have a look at ne, except that my fingers would
just continue to work vim-wise, after more than 30 years of daily vim/vi 
use, up to 8 hrs per day. 

When leading software development teams, I never asked team members
which editor they favoured, either at hiring interview, or later. We
just agreed on coding standards, and they configured their editors to
conform. 

Erik



Re: text editors

2019-03-29 Thread Erik Christiansen
On 29.03.19 08:47, Gian Uberto Lauri wrote:
> >>>>> "EC" == Erik Christiansen  writes:
> 
> EC> On 28.03.19 21:32, Matyáš Bobek wrote:
> >> I reckon writing vim extensions in C must be quite obscure... How
> >> is it done?
> 
> EC> It's not. They are written in vimscript, analogous to elisp.
> 
> Sorry not. While Elisp is a Lisp dialect, therefore is a language that
> has been formally proved to be equivalent to turing-machine, that is
> not certain for vimscript.

Yes, yes, reflexive combativeness is jolly good fun, but understanding
is more useful in the long term. The statement you think you've replied
to would seem to use "equal"¹, but the actual word used refers to being an
analogue, i.e. taking the same place in the other editor.

Erik

¹ As in "of equal standing", perhaps.

-- 
No one really listens to anyone else, and if you try it for a while
you'll see why.
   - Mignon McLaughlin



Re: text editors

2019-03-29 Thread Erik Christiansen
On 29.03.19 17:26, Erik Christiansen wrote:
> " Toggle relative line numbering.
> function! NList_toggle()
> if  == 1
>  set nornu" For absolute, elide the 'r'.
>   else
>  set rnu  " For absolute, elide the 'r'.
>   endif
> endfun

Apologies. There's almost always something omitted when pasting from
elsewhere. Let's include the connection to the F1 key:

noremap  :call NList_toggle()

A more meaningful function name would be better, too.
(but important here is only the connection, and the toggling, for the
moment.)

Erik



Re: text editors

2019-03-29 Thread Erik Christiansen
On 27.03.19 11:07, mick crane wrote:
> On 2019-03-26 19:27, Wayne Sallee wrote:
> > I use vim.
> > 
> > Log in as user that will use vim, and run the following command:
> > 
> > cat > .vimrc << "EOF"
> > set nosi noai
> > set number
> > 
> I have line numbers as the default but copy/paste with the mouse also copies
> the numbers so I have to turn it on and off.

True, so it's handy to be able to toggle them on and off on a single
keystroke. I use F1, as it is easy to find. This vimscript in .vimrc
then implements the switch, in my case for _relative_ line numbers, as
they allow e.g. y7+ to copy current line plus the lines down to a chosen
point, without having to count the lines. That's a greater productivity
improver than just knowing you're on line 27423:

" Toggle relative line numbering.
function! NList_toggle()
if  == 1
 set nornu" For absolute, elide the 'r'.
  else
 set rnu  " For absolute, elide the 'r'.
  endif
endfun

To avoid stairstepped insert when pasting that here from the clipboard,
I have F12 mapped to:

set pastetoggle= "  is easier. (See "Paste")

I tend to forget that I also have the alternative:

" Paste
" Paste without needing pastetoggle to avoid staircase text, due to ai always 
set.
" Works with "+y in another vim instance. Also avoids wrapping.
nnoremap  "+p
inoremap  ^["+p^Mi
nnoremap  "+y

(The ^[ is entered as control-v Esc, and ^M as control-v Enter, but you
knew that.)

 is Alt-p. Your choice of invoking key may differ.

So, yep, Vim does allow two-key chords, and the distinction from Emacs
reduces a little when you do that. Vimscript may look a little C-like in
places, but that can't be helped. (Awk is also significantly C-like.
Perl is much more successful at voiding the benefit of common language
know-how.)

Erik



Re: text editors

2019-03-28 Thread Erik Christiansen
On 28.03.19 21:32, Matyáš Bobek wrote:
> I reckon writing vim extensions in C must be quite obscure... How is it
> done?

It's not. They are written in vimscript, analogous to elisp. There is a
large landscape of add-ons written in the language, and a choice of
managers to automate the minor tedium of installing them in the right
place. The few bits of vimscript in my .vimrc are minimal, such as a
function to append section length in lines or pages when the section is
folded.

Erik



Re: text editors

2019-03-28 Thread Erik Christiansen
On 28.03.19 12:34, rlhar...@oplink.net wrote:
> Once you start using Emacs macros and see the benefit, you likely shall find
> yourself creating and using numerous macros within each editing session.
> You demonstrate once to the robot, and the robot faithfully mimics you,
> without error.  The only question is whether you are willing to teach the
> robot by recording your keystrokes in a macro (it takes two keystrokes

in Vim or Emacs. 

> ).



Re: text editors

2019-03-26 Thread Erik Christiansen
On 26.03.19 11:52, John Hasler wrote:
> mick crane wrote:
> > there it is then, although I've so far managed to avoid Emacs since
> > heard it is more of an operating system than an editor.
> 
>  Teemu Likonen writes:
> > There are those who know Emacs, and there are those who know decades
> > old jokes about Emacs.
> 
> And there are those who avoid learning what Emacs is actually like
> because they have heard decades old jokes about it.

IME, the real reason why we won't consider the other editor is because
of the time and energy spent learning the first good one we came across,
and the grating frustration and lost productivity of dropping to the
bottom of the learning curve to switch to horse of a different colour
but similar performance. The "typing chords" vs modality difference
essentially becomes moot once you adapt to your choice. Probably.

Erik



Re: text editors

2019-03-25 Thread Erik Christiansen
On 25.03.19 07:53, mick crane wrote:
> not heard about folding.

It can be very handy. I have around 420 pages of notes in one file. They
present as a one-page contents table with section page counts. While
cursoring down and then across opens a chosen fold, there are several
folding levels to the bottom. Hierarchical groping and digging is an
inefficient constraint suffered by GUIs; it is much quicker to just use
vim's '/' to search for a keyword. Given capitalised headings and
keywords, suffixed with a ':' for the major section on that topic, the
right line in 28532 lines is quickly found, and the required folds
opened automatically.

> I'm not very good at this.

Give it 30 years. Experience creeps up on you.

> kind of related I'm having difficulty copy and pasting.
> If on windows [sorry] and in putty session for Debian no gui vi, if

Commiserations. I'd be sorry too if I had to use windows. (Avoided it
entirely during 30 years in IT - took a fat redundancy package when
windows finally caught up, and retired.

> highlight text with mouse then it is automatically saved to windows
> clipboard for pasting but then in putty cannot scroll past bottom of screen.

Sounds like a putty limitation? I'll admit to only ever having copied to
an X11 clipboard, so can't offer relevant experience. I've never used
gvim - plain vim in an xterm works fine with the X11 clipboard, so long
as I remember to turn off autoindent before pasting, to avoid a
stairstep paste. (I have the F12 key mapped to toggle vim's "paste"
attribute, so a single key handles both on and off.)

> If set marks and then yank to other mark text is yanked but is not in
> windows clipboard buffer for pasting.

Have you checked whether the yank goes into the "* (clipboard) register?
Check also the "+ register, in case the windows clipboard is looking
there instead. A post on the vim-use ML might elicit more info related
to your environment. Back in 2011, Gary Johnson had a "Copy and paste
problem" which was fixed for windows with "set clipboard^=unnamed".)

:help 'clipboard'
:help :set^=

I tend to just use a mouse drag to grab text to the X11 clipboard for
pasting into something GUI.

> In visual mode I can highlight all text with go to mark but that is not in
> windows buffer either.
> I tried all different commands to try to get text into windows buffer but
> nothing seems to work.

Check   " :set clipboard ? "

IIUC, it should include unnamed and unnamedplus for problem-free
communication with the windows clipboard - inferring from a couple of
archive posts from 2011,12. Including unnamedplus isn't good for the
linux clipboard, though.

If all else fails, the vim-use mailing list is a darned sight more
knowledgeable on vim/windows stuff.

Erik



Re: text editors

2019-03-24 Thread Erik Christiansen
On 25.03.19 04:38, mick crane wrote:
> Is there any text editor, preferably in a terminal that has the facility to
> protect lines in the document, not the document itself ?
> I've got 2 blocks of "code" that look similar and I keep editing the wrong
> one and then it doesn't work.

The only thing I can think of, using vim (haven't used anything else for
30 years), is to turn on folding, and include a warning in a comment on
the first line of the block. Whether folding is on blank lines (simple
paragraph/block folding), or foldmethod=marker, the first line line is
displayed while folded.

Having to unfold the block, with only the warning and a short initial
line of code or block identifier visible, ought to be sufficiently
alerting if the blood level in the caffeine stream is not too high.

Putting the warning in "foldtext" wouldn't work, because then it'd
appear on all folded paragraphs - unless you used foldmethod=manual, and
only folded the troublesome blocks.

In extremis, you could write a vimscript function to do all sorts of
weird stuff on folding, but I think it would be a bit of work to put a
password on unfolding.

:help folding

Erik



Re: Looking for advise to replacy Pan newsreader

2019-02-17 Thread Erik Christiansen
On 17.02.19 12:07, hdv@gmail wrote:
> On 17/02/2019 11.58, Erik Christiansen wrote:
> > On 17.02.19 10:16, hdv@gmail wrote:
> >> On 17/02/2019 05.05, Juan R. de Silva wrote:
> >>> Can your share with me what do you use for newsgroups reading. I do not 
> >>> care 
> >>> about binaries. All I want to follow several Linux usenet newsgroups. 
> >>> Plain 
> >>> text reading.
> >>
> >> For text-only groups I use mutt.
> > 
> > Which patchset do you use to enable that? (And is there any doco on the
> > set-up?)
> 
> If my memory serves me well I always just used the version taken from the 
> Debian
> repository. Nowadays that would be neomutt.
> 
> Maybe you can use this page for the set up?
> 
> https://neomutt.org/feature/nntp

Many thanks. I'll have to think about a switch from mutt to neomutt.

Erik



Re: Looking for advise to replacy Pan newsreader

2019-02-17 Thread Erik Christiansen
On 17.02.19 10:16, hdv@gmail wrote:
> On 17/02/2019 05.05, Juan R. de Silva wrote:
> > Can your share with me what do you use for newsgroups reading. I do not 
> > care 
> > about binaries. All I want to follow several Linux usenet newsgroups. Plain 
> > text reading.
> 
> For text-only groups I use mutt.

Which patchset do you use to enable that? (And is there any doco on the
set-up?)

Erik



Re: backintime

2019-01-17 Thread Erik Christiansen
On 17.01.19 18:35, David Christensen wrote:
> On 1/16/19 2:15 PM, Andy Smith wrote:
> > I second the suggestion to learn version control...
> 
> +1
> 
> I started with RCS.  The concepts and commands are straight-forward, but the
> granularity is per-file.  It works great for managing key /etc/* files on
> remote servers.  But, RCS gets tedious when you want to manage many files.
> 
> I soon discovered CVS, which operates on directories (projects).  I put the
> CVS repository on my file server and can access any project from any machine
> over SSH with the CVS client.  This arrangement has proven to be incredibly
> useful.  (Every night, the file server is backed up and the CVS repository
> is also archived.)
> 
> The canonical CVS book is "Open Source Development with CVS", which has been
> released under GPL3:
> 
> http://cvsbook.red-bean.com/
> 
> David

Seconded. After a couple of decades using CVS, I'm not likely to shift
to the newfangled offerings either. The manual which served us well in
the old days was "The Cederquist":

https://ftp.gnu.org/non-gnu/cvs/source/feature/1.12.13/cederqvist-1.12.13.pdf

The thing with RCS's per-file focus is that two different versions of
the application may use the same version of some of the sourcefiles, but
will have different versions of others. CVS's "tag" command facilitates
identifying that set of file versions, with a meaningful name. Being
able to also apply a check-in comment is also nifty.

When managing software projects across three countries, I found its
automatic merge ability to be an incredible productivity boost.

It will, though, take some getting used to, as will any VCS.

Erik



Re: About /dev/sr impatience with automatic tray loading

2018-12-11 Thread Erik Christiansen
On 11.12.18 09:44, Dan Ritter wrote:
> mick crane wrote: 
> > On 2018-12-10 20:02, Thomas Schmitt wrote:
> > > For the purpose of sr_drive_status(), the loop is really inappropriate.
> > > This function shall obtain the drive status and not wait until the
> > > status of the medium is decided.
> > > 
>  
> > completely off the topic but I have noticed that people whose first language
> > might not be english use
> > "shall" as apposed to "will" or "should". It seems a little bit old
> > fashioned but maybe it isn't.
> 
> The English use it more than Americans do.
> 
> "Shall" has a connotation of ordering future action. Americans
> nearly always prefer "should".

Here down under, my exposure to "shall" over the last four decades has
primarily been in communications products specifications, where it meant
"must" as far as we the system designers and implementers were concerned.
"Should" would not be an adequate substitute, I think, where failure to
comply is breach of contract.

Erik



Re: Non-GUI Arduino IDE ?

2018-12-07 Thread Erik Christiansen
On 07.12.18 16:42, Jason wrote:
> On Fri, Dec 07, 2018 at 05:05:30PM -, Dan Purgert wrote:
> > Jason wrote:
> > > Does anyone know if there is a console based Arduino IDE available for 
> > > Debian? I am interested in making a portable programmer that could be 
> > > taken out on a job to edit and upload Arduino programs on site, without 
> > > messing with a mouse.
> > 
> > Don't know of any IDEs for the commandline, but you can always use
> > avrdude straight from the commandline to handle writing the compiled hex
> > to the thing.
> 
> And what could I use to create the compiled hex?

The Arduino IDE uses the GNU toolchain behind the scenes. There are
people who use the toolchain on the commandline, eschewing the GUI.
Since the AVR crosscompiler and binutils will already be installed with
the IDE, it is just a matter of editing sourcefiles with your favourite
text editor, then running "make". If the IDE doesn't produce a makefile,
instead using something nonstandard, you could look at the upthread
link to Arduino-Makefile.

As I program AVRs directly (without bootloader), using avrdude, I had to
check the manpage to see if it is compatible with the Arduino
bootloader:

» The Arduino (which is very similar to the STK500 1.x) is supported via
   its own programmer type specification ``arduino''.
«

That would presumably merely use a laptop USB port to interface to the
Arduino target board.

It looks pretty straightforward, but reading a few of the hits for a google
of "arduino gnu toolchain", it seems that after editing the source with
e.g. vim or emacs, the Arduino IDE itself can be commandline invoked
without any GUI:

» Alternatively, if any of the following command line options is given,
  no graphical interface will be shown and instead a one-off verify
  (compile) or upload will be done.
«

https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc

(I think that link has already been cited upthread.)

Erik



Re: librecad

2018-12-07 Thread Erik Christiansen
On 07.12.18 09:17, John Hasler wrote:
> Gene writes:
> > Thats a huge part of the problem, but theres another fence to
> > jump. most of these so-called cad programs cannot generate even the
> > most basic gcode.
> 
> I can see not wanting to learn even a small part of a CAD program if all
> you want to do is draw a simple floor plan and then never use it again,
> but doing CNC without CAD is baffling.
> 
> Freecad can produce gcode which you can inspect and modify.  The
> post-processor can be customized for your particular machine.
> Solvespace can also output gcode.  I have no idea how good the gcode
> produced by either of these programs is because I have no way to use it.

Gene would have no trouble tweaking that if it was in the ballpark,
after his years of writing the stuff from scratch. (Although
auto-generated gcode will be a bit primitive, with a lot of data points,
rather than a few optimised functions.)

While I'm the one who did the 8 house plan drawings in Postscript, I
wouldn't advocate that path for CAD for CNC. OK, Postscript can "print"
text to stdout in addition to its drawing operations, so it could spit
out gcode equivalent to what is drawn for inspection, _but_ you'd have
to hand knit the gcode to be generated by each of your hand knitted
drawing functions. After a couple of months of development you'd have a
nifty library available for re-use, but it's quite a hike to get there.

> The major feature of these CAD programs is the constraint solver, which
> understands geometry and does a huge amount of work for you.  You can
> draw a part with dozens of equally spaced holes, change the length of
> the part, and the holes will move appropriately.  Draw an angle bracket
> with a brace, change the angle, and either the bracket length or
> position will adjust appropriately depending on how you constrained it.
> Draw a gear specifying pitch and tooth count and the diameter will be
> computed. Change the pitch or tooth count and the diameter will
> change. The diameter will only change by a commensurate amount: no need
> for you to calculate allowable dimensions (unless you want
> fractional-tooth gears).

If moved to try that in Postscript, you'd have to program the
computations, and therefore decide in advance what would be
auto-adjusted, e.g. input gear pitch and tooth count, then diameter will
result. (While tolerances may appear on a drawing, gcode specifies a
precise toolpath, and it's up to the machine to do its best to follow
that. LinuxCNC will issue a "following error" and stop if it can't meet
run-time tolerance specs.)

> You can also do assemblies and specify constraints between assemblies so
> that a change in one part will cause appropriate changes to others.
> Interferences that would result in two objects occupying the same space
> won't happen.  You can animate assemblies and watch the machine run.  No
> more making cardboard models of linkages and then having to stick to the
> tested ratios.

Hmmm ... D for design, not just drawing. Powerfully tempting, if I ever
have to do more than shuffle bits of house plans around on a sheet.
(There the human utility, convenience, and comfort considerations, and
even building regulations aren't amenable to automation, so drawing
suffices, I found.)

Sounds like Gene's bitten the bullet and done the job with what he has,
by the sound of it. That's never a wrong move when it works.

Erik
(Who's gone owner-builder (swore I wouldn't do that again), and is
currently too flat out to look at Freecad.)



Re: Looking for a "friendly" e-mail service

2018-11-26 Thread Erik Christiansen
On 26.11.18 21:12, Celejar wrote:
> On Mon, 26 Nov 2018 09:37:21 -0500
> Mark Neidorff  wrote:
> > Now, I don't like the webmail interfaces and the limited storage for old 
> 
> Limited storage? Who - big or small player - offers unlimited storage
> for old emails?

There are various values for old and limited, in reality. When I'm out
of town for a fortnight, there's usually 1500 to 2k emails piled up on
the ISP's mailhost. Fortunately only a small subset of them are over 1
MB in size.

It is fortunately rare for ISPs to block multi-megabyte emails now that
we've left the old millennium behind, as I'm in the process of building,
and local authorities, building surveyors, fire authorities, etc.,
mostly issue their documents by email now.

Still, a few hundred MB usually does it for the fortnight, and the
longer absence over the new year is an email drought, so size would be
similar.

Those who leave read mail on the ISP's mailhost, due to accessing from
multiple client hosts, are at greater risk of exceeding their quota, and
would naturally look for some extra, I figure.

Erik



Re: Looking for a "friendly" e-mail service

2018-11-26 Thread Erik Christiansen
On 26.11.18 17:13, Gene Heskett wrote:
> Get on the horn and ask your isp if they run a mailserver. Mine does, and 
> I use it, but when I first started, I had to call their network guy and 
> have him whitelist all the mailing lists I an on.

Here, down under, that's the norm - I've never heard of an ISP which so
despises the 'S' that there's no mail. We generally have a choice of
IMAP or POP3. (I have fetchmail set to use the latter.)

> Other than that, it just works, and I'm only getting perhaps .01% of the 
> spam I was getting thru a qmail server I used previously as an ex 
> employee.

Ditto. I've had to use my ISP's GUI utility to relax their spam
filtering, else I miss out on even notices of specials from the vendors
I deal with. The few unwanted which then also sneak in are just diverted
with an additional procmail recipe, as that utility is already in place
for distributing list mail to individual mailboxes. (Saves learning
yet another app when not really needed.)

Erik



Re: Online copies of textinfo content available?

2018-11-01 Thread Erik Christiansen
On 29.10.18 10:58, David Wright wrote:
> On Sat 27 Oct 2018 at 09:19:15 (+0100), mick crane wrote:
> > I made the mistake of printing out man bash once. It's really, really long
> 
> Some of the longer man pages (eg bash, fvwm, video programs) are
> rather unmanageable when just presented as flat text, even when
> coloured, but I find this line useful for generating a little
> library of PDFs that are much easier to skim through with your
> favourite viewer:
> 
> $ man -t foo | ps2pdf - - > path-to-your-library/foo.pdf

There's also:

man2html - browse man pages in your web browser
man2html-base - convert man pages into HTML format

(Not tried here - I'm fine with monochrome manpages.)

Erik



Re: Help me Linux

2018-10-31 Thread Erik Christiansen
On 31.10.18 11:49, Ben Caradoc-Davies wrote:
> On 30/10/2018 21:17, P M wrote:
> > Although right now I am using Windows but still I feel very enthusiastic
> > and energetic with Linux; even I don't know what the reason is.
> 
> You are feeling the potential of open source: a community open to all and
> your freedom to change anything. Even Microsoft is embracing it.
> 
> > I TRIED TO INSTALL DEBIAN MANY TIMES BUT FAILED BADLY. I NEVER USED DEBIAN.
> 
> Debian is harder to install than Ubuntu because it gives you more choice.
> Choice reduces happiness:
> https://www.ted.com/talks/dan_gilbert_asks_why_are_we_happy

For the use case, ubuntu might be a good lead-in for confidence
building. I once read on luv-main, in slightly longer form:

"My grandmother currently runs ubuntu. This was not my doing, but she
managed to wipe her windows and install it accidentally when someone
handed her the live CD to deal with a windows problem she was having.
The computer asked her to do things. So she did."

Erik

-- 
Debian is for people who can read man pages.
  Robert Moonen (on luv-main ML)



Re: Online copies of textinfo content available?

2018-10-29 Thread Erik Christiansen
On 26.10.18 22:39, Brian wrote:
> On Fri 26 Oct 2018 at 15:13:20 -0500, Dennis Wicks wrote:
> > I agree, and I have found a lot of info "complete manual"s
> > to be exactly like the man page!
> 
> Please give an example.

Anyone who has tried info a number of times, in the hope of finding a
bit more information than the manpage provides, will have experienced
the info fudge, I submit. Here's the first which I recalled:

$ info xpdf

File: *manpages*,  Node: xpdf,  Up: (dir)

xpdf(1)xpdf(1)



NAME
   xpdf - Portable Document Format (PDF) file viewer for X (version 3.03)

SYNOPSIS
   xpdf [options] [PDF-file [page | +dest]]

DESCRIPTION
   Xpdf  is a viewer for Portable Document Format (PDF) files.  (These are
   also sometimes also called 'Acrobat' files, from the  name  of  Adobe's
   PDF  software.)   Xpdf runs under the X Window System on UNIX, VMS, and
   OS/2.
...

-Info: (*manpages*)xpdf, 781 lines 
--Top
Welcome to Info version 4.13. Type h for help, m for menu item.



Re: Online copies of textinfo content available?

2018-10-29 Thread Erik Christiansen
On 26.10.18 19:17, Brian wrote:
> On Fri 26 Oct 2018 at 13:20:36 -0400, Gene Heskett wrote:
> > Agreed, a good man page is the best. I've no clue why there seems to be 
> > an aversion to a man page that has to be scrolled to read it all. All of 
> > us have up/down arrows on our keyboards, and 99% have a mouse wheel, so 
> > there is no excuse that holds water to not put it all in the man 
> > page. "man bash" if you man page authors want to see what a real man 
> > page looks like.
> 
> An excellent man page. Intended for masochists and those who have all
> the time in the world to read and absorb it. :)

TBT, I've never read more than the few islands of text brought up by a
search for a term of interest, then a second search term learnt from
that. In-search-read-out. Job done in minimal time. Much faster and
easier than info bumpf, unless it's flattened with vim, to make it like
a manpage.

Erik



Re: Online copies of textinfo content available?

2018-10-29 Thread Erik Christiansen
On 26.10.18 13:20, Gene Heskett wrote:
> On Friday 26 October 2018 10:41:54 Richard Owlett wrote:
> > 1. I don't want to install unneeded packages just to find out whether
> > or not the package might be useful.
> > 2. The info output has an annoying format. A browser acceptable format
> > {plain text fine --  HTML *NOT* needed} is MUCH more functional.
> 
> Agreed, a good man page is the best. I've no clue why there seems to be 
> an aversion to a man page that has to be scrolled to read it all. All of 
> us have up/down arrows on our keyboards, and 99% have a mouse wheel, so 
> there is no excuse that holds water to not put it all in the man 
> page. "man bash" if you man page authors want to see what a real man 
> page looks like.

Yup, the info menu maze is an irritating impediment. But there is so
much more information in the "as" and "ld" info files than their
corresponding manpages, that they are an essential resource.
Solution: View the info files with vim. Now they're flat files, just
like a manpage, and you can search and weave freely. Problem (info)
eliminated! (And productivity restored.)

Erik



Re: versioning file system

2018-10-28 Thread Erik Christiansen
On 26.10.18 13:05, David Christensen wrote:
> When programming, I tend to do check-in's when I make some kind of progress
> (ideally, the code builds and the test suite passes).

Yup, the smaller edits of bugfixes aren't going to threaten code stability.

> 
> The trap is when I work for a while, make some progress, make a wrong turn,
> and then make a mess.  A versioning file system makes it easy to get back to
> "make some progress" and try a different turn.

Yes. If the major hack can be limited to one file, I've been known to
rely on Vim's undo capability to buffer all the changes long enough for a
build and test. That could perhaps be extended to several editor
instances for a couple of files, for a quick but disruptive tentative
test of a divergent approach.

The more robust way is though to develop on a VCS branch, check in prior
to jumping off the cliff, and merge back to trunk when it's all sorted
and tested.

> 
> The compromise is to do a "work in progress" check-in prior to risky turns.

Yup, but risk can grow after initial edits reveal that additional
structural changes are needed in order to enable the revised strategy to
be completely implemented. In response to that late awareness, I've been
known to ifdef out the old, to leave it in the file for recovery if a
massive stone ball comes rolling down the path I've hacked through the
jungle.

And yes, if CVS is the VCS you're most familiar with, then it's still
fit for use. Traffic on the ML is rare now, but there is still some
legacy use out there, and I use nothing else for my own versioning,
having used it for multi-team international software development for
many years. Its automatic merging capability alone is a dream.

OK, git is quicker and preferred for big projects, but for small teams
of greybeards who were weaned on it, CVS is still fine. (And if you're
fumble-fingered and flummoxed by cryptic error messages, then take a
snapshot of the entire repository before any major operation on it, so
that deletion and replacement entirely undoes any embarrassing stuff-up.

Erik



Re: Micro-report: using Stable without systemd

2018-10-14 Thread Erik Christiansen
On 14.10.18 12:36, Patrick Bartek wrote:
> FYI: Testing Devuan ascii now for future consideration.  No problems so
> far.  Still like runit though.  And it's easy to convert the
> default sysvinit to it.

+1  (Running pre-systemd debian on laptop and one old desktop, devuan
ascii on the new one and any future hosts.

Erik

-- 
(5)  It is always possible to agglutinate multiple separate problems
 into a single complex interdependent solution. In most cases
 this is a bad idea.
 RFC-1925



Re: any program that search for same files?

2018-10-14 Thread Erik Christiansen
On 14.10.18 22:06, Long Wind wrote:
> given two directories, the program can print files that are in both 
> directories
> 
> to make it easy, if file name and size are same, then they are same
> 
> i've to admit my memory is poor, if good, who need such program?
> 
> i'm about to write it in java, it can be completed in a few hours
> but i think there might be simple solution
>  

What I use with full satisfaction is just "diff -qr dir1 dir2", though
that does actually diff the files. So it suits well for double checking
a backup to flash stick. N.B. My paranoia began after one stick showed
corrupted bytes _without_ any change in file size. I.e. size is no guide.

My favourite was once the dircmp script, from AT, back in 1988. Google
shows others have sought it since, but I've not seen it on Linux.

Erik



OT: The vagaries of English [Was: Re: calibre ebook project?

2018-09-26 Thread Erik Christiansen
On 25.09.18 20:19, Brian wrote:
> On Tue 25 Sep 2018 at 14:08:23 -0500, Nicholas Geovanis wrote:
> 
> > Brian wrote:  Note to non-English speakersnatural English politeness
> > will get you a nod of the head but there will be incomprehension
> > in the mind
> > 
> > That also works with Americans who are native English speakers, that same
> > mute incomprehension. I think that works with Australians too.. :-)
> 
> Americans? Are you referring to the ones who live in Patagonia?
> 
> Are Australians native English speakers?

That depends. Youth less so¹, I find, but those of us who had the benefit
of schoolteachers who were educated prior to WWII retain a certain
mastery of English - even realising that it once had a grammar.

But back to coaches; here they are only sports coaches. Any other
connotation will whistle over the head of an Aussie, unless you put
"stage-" in front, to trigger recollection of wild west movies.


¹ Now the young resort to a tautological pidgin indistinguishable from
  A-mayorkhan, complete with major disregard for singular/plural and many
  other grammatical niceties. (I thought Socrates had made a similar
  complaint, but it was more general, it seems.)

Erik



Re: ext2 for /boot ???

2018-09-15 Thread Erik Christiansen
On 14.09.18 16:10, Michael Stone wrote:
> On Fri, Sep 14, 2018 at 01:23:31PM -0400, Stefan Monnier wrote:
> > I just find it amazing that the kernel has grown to be so big as to be
> > comparable to a complete unix distribution on a workstation of some
> > years ago (with GUI, compilers, ...).
> 
> Have you tried one of those lately? I keep some around on VMs, and they were
> *terrible*. It's nice every once in a while to remember how far we've come.

Yep, as Stefan implied, not a step forward. I cannot detect any difference
between the SunOS-4.1.3 workstation I used just over a quarter of a
century ago, and my current linux box. The four xterms I put up are
still yellow on darkslategrey, from the same rgb.txt file as back then.

GUI stuff now runs slower than back then, and developers futz with look
and feel, without adding life-enriching new functionality. I stopped
upgrading Eagle years ago, as its UI just became harder to use. And
Firefox/Iceweasel is slow as a wet week, sometimes crashes, and is
mostly a PITA. Kdon't kget kme kstarted kon KDE.

At least the fusspots can't stuff up vim, mutt, fetchmail, procmail,
awk, and the other daily basics.

Erik



Re: File with weird permissions, impossible to delete

2018-09-11 Thread Erik Christiansen
On 11.09.18 13:52, Pétùr wrote:
> I have some files, with weird permissions:
> 
> # ls -la
> d-wS--S--T 2 1061270772 2605320832  4096 oct.   7  2412 index.html

OK, you have the suid, sgid, and sticky bits set, and it's a directory.
Execute (directory navigate) permission is off.

> Cannot delete, cannot change owner or group (what is this user
> 1061270772 and group 2605320832 by the way?) even for root.

Linux supports 32 bit uids and gids, so those numbers seem OK.
The blockage will be the sticky bit, if your effective UID is not root. 

> How can I get rid of these?

I'd also check that the filesystem is not mounted "noexec", and please
post the permissions on the parent directory, as its ownership and
permissions are just as relevant as what is shown.

Erik



Re: Cannot Install/Uninstall sendmail

2018-08-29 Thread Erik Christiansen
On 29.08.18 11:57, Jonathan Dowland wrote:
> However both sendmail and update-inetd are orphaned at the moment (no
> regular maintainers, although Andreas Beckmann has done a lot of work
> via the QA team)

After favouring sendmail for a decade and a half, I thought I was slow
to switch to postfix around 15 years ago when sendmail was already
showing signs of age, such as security issues, IIRC. That anyone would
use it today is quite a surprise.

Postfix has a nice set of sendmail compatibility functions, and the list
is very helpful. From the manpage:

   mailq(1), Sendmail compatibility interface
   newaliases(1), Sendmail compatibility interface
   sendmail(1), Sendmail compatibility interface

Erik



Re: df -h shows insufficient precision

2018-08-26 Thread Erik Christiansen
On 26.08.18 12:25, Zenaan Harkness wrote:
> A regular itchy annoyance for years now:
> 
> df shows bytes, df -h shows only one decimal place, so e.g. on a
> 1.8TiB drive "1.6T" is the free space, but that resolution/ precision
> is insufficient.

For more than 3 decades I've just used "df -k". OK, even on smaller
disks than yours, that's a lot of digits, so a bit of mental juggling:

$ df -k
Filesystem1K-blocks Used Available Use% Mounted on
/dev/sda9 293477416 15376432 263193184   6% /home

Better is "df -m". On larger disks, you'll have more digits than here:

$ df -m
Filesystem1M-blocks Used Available Use% Mounted on
/dev/sda928660015017257025   6% /home

> Of course I can fire up bc, set scale=20 and do some
> powers of 1024 division, but that's all very clunky.
> 
> How hard would it be to add an option to bc, to choose the number of
> decimal places to use in the output, or the number of digits of
> precision to display?

Harder than putting the output of df -k through two lines of awk in a
shell function, I figure.

Erik



Re: Installing package *NOT* in repository

2018-08-14 Thread Erik Christiansen
On 14.08.18 06:44, Richard Owlett wrote:
> On 08/14/2018 01:43 AM, Erik Christiansen wrote:
> > The whole thing is just a plain text file, edited and read with Vim,
> > using multi-level folding, so it all presents as a one-page TOC. My
> > version is probably of limited use to anyone else, as it e.g. only deals
> > with dpkg and apt-get in the current context. All else is completely
> > unknown.
> > 
> > Now that we have google, I must admit that there's an alternative, but
> > it won't tell you whether that's what you did last time, giving the
> > particular outcome which you prefer, or confidence of the same result.
> > 
> 
> I'm working on it :} Someone pointed me to CherryTree. I have much
> information in saved emails.

Please don't tell anyone, but I too have quite a number of list posts
flagged in mutt for adding to the notes - just not done yet. While
deleting 95% of posts and flagging 1% does distill the local archive
to a useful essence, it's still not as accessible as structured notes,
where related information is colocated, mixed with personal experience.

The optimal balance between doing and documenting depends significantly
on how good the wetware memory still is, but the act of documenting can
significantly improve that memory. (I have forgotten the numbers put
forward, at a seminar decades ago, for the percentage retention of what we:
hear, read, write, carry out in practice, but the difference is marked.)

Erik



Re: Installing package *NOT* in repository

2018-08-14 Thread Erik Christiansen
On 13.08.18 06:47, Richard Owlett wrote:
> PREAMBLE:
> I've downloaded a .deb file.
> I've recently done such an install but don't remember how.
> Looking at the man pages for apt, apt-get, aptitude didn't help.
> Couldn't come up with useful search term for wiki.
> Eventually recalled "dpkg -i" which worked.
> 
> QUESTION:
> How would someone find the answer if the answer wasn't already known?
> I went thru the same sequence last time.

Personal survival notes, arranged by topic, focused on how a task was
accomplished last time, and with searchable tags of some sort. My 420+
pages of bumpf has accumulated over 3 decades, so some of it is perhaps
dated now, but still preserves what sanity remains.

If I search for "PACKAGE INSTALL:" or "\.DEB:", it's my first hit, as I
uppercase headings & tags shoved over to the RHS for minimal
intrusiveness. The trailing ':' may be superfluous, but reminds me I
intend it to be a tag.

The whole thing is just a plain text file, edited and read with Vim,
using multi-level folding, so it all presents as a one-page TOC. My
version is probably of limited use to anyone else, as it e.g. only deals
with dpkg and apt-get in the current context. All else is completely
unknown.

Now that we have google, I must admit that there's an alternative, but
it won't tell you whether that's what you did last time, giving the
particular outcome which you prefer, or confidence of the same result.

Erik



Re: mailing list vs "the futur"

2018-08-10 Thread Erik Christiansen
On 10.08.18 11:46, Dan Purgert wrote:
> Rich Kulawiec wrote:
> To expand on that with my own personal prejudice -- the people using
> these "sub-par" tools are also the ones who're the cause of some of the
> existent (modern?) problems with mailing lists.
> 
> Namely:
> 
>  - HTML Messages
>  - Not wrapping messages at ~80 characters
>  - top posting
> 

It is easy to delete posts so egregiously presented that reading them is
too much trouble. (When I return from a week out in the country, every
month, there's usually over 1200 emails waiting - down to half that after
procmail has done some weeding. So a post should also chop out all
quoted text not explicitly related to the reply, if it is to be read in
the time which can be given to it.)

> >
> > Serious email users should be using mutt, which is fast, compact,
> > resistant to attack, and has an astonishing number of features.
> 
> Guess I'm not a "serious" email user then.  Half the time I'm still
> using Tbird.

Having moved to mutt between 15 & 20 years ago, I've found it powerful
and highly configurable. It'll see me out.

> > Those who receive large volumes of mail should be using procmail
> > to pre-sort it, and they should be aware of RFC 2919 (and thus
> > the existence of List-Id) as an excellent means for doing so.
> > These two tools in combination make dealing with large amounts
> > of traffic to large numbers of mailing lists quite easy.

And then with the list mailboxes arranged in order of interest in
"mailboxes" line(s) in ~/.muttrc, they are presented in priority order.
If domestic management, kids, or walking the dog intrude, then it's
automatically the less important emails which must wait for another day.

> Not familiar with procmail.  A quick perusal of the manpage seems to
> indicate this is a local mail "processor" for sorting things, as opposed
> to say something on the mailserver itself?

Yup. Details on how to direct its filtering/distribution are in the
procmailrc manpage. Its development stabilised some time ago, and those
of us who use it are very content with that.

Erik



Re: Please help with error message

2018-08-07 Thread Erik Christiansen
On 07.08.18 09:05, Rodolfo Medina wrote:
> dpkg: warning: 'ldconfig' not found in PATH or not executable
> dpkg: warning: 'start-stop-daemon' not found in PATH or not executable
> dpkg: error: 2 expected programs not found in PATH or not executable
> Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin

Looks like your root $PATH is mangled. Could you post the output from:

# echo $PATH

Here I have:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

That's consistent with what you read:

> Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin
> and /sbin

If setting up a proper root $PATH isn't the simple fix, then we need:

# type ldconfig

Here I have:   ldconfig is /sbin/ldconfig
which will be found in root's PATH.

If "type" returns a full path to ldconfig, then we need the output of:

$ ls -l /sbin/ldconfig # Or wherever your's finds it.

Does it have execute permission for root?

If that doesn't hit any paydirt, it would be interesting to see if you
have an ldconfig anywhere at all:

$ locate ldconfig

Erik



Re: Cross-Platform Assembly Language Compilers?

2018-08-05 Thread Erik Christiansen
On 05.08.18 18:59, Erik Christiansen wrote:
> If you make it as far as tweaking linker scripts, then the info page is
> infinitely more informative than the manpage.

s/the info page/the info page for ld



Re: Cross-Platform Assembly Language Compilers?

2018-08-05 Thread Erik Christiansen
On 30.07.18 08:11, cyaiplexys wrote:
> On 07/27/2018 12:31 AM, Erik Christiansen wrote:
> > On 26.07.18 08:29, cyaiplexys wrote:
> > > I'd like to try a native compiler but also I would like to have something 
> > > I
> > > could compile for Arduino (here we go again) and ARM and other CPUs as 
> > > well.
> > 
> > $ apt-cache search avr | more
> > arduino - AVR development board IDE and built-in libraries
> > libavresample-dev - FFmpeg compatibility library for resampling -
> > development files
> > libavresample4 - FFmpeg compatibility library for resampling - runtime
> > files
> > gcc-avr - The GNU C compiler (cross compiler for avr)
> > avrdude-doc - documentation for avrdude
> > avr-libc - Standard C library for Atmel AVR development
> > gdb-avr - The GNU Debugger for avr
> > avrdude - software for programming Atmel AVR microcontrollers
> > binutils-avr - Binary utilities supporting Atmel's AVR targets
> 
> Awesome! I also will hope that there is an x86 assembler and maybe even an
> ARM assembler in there as well (I just want to tinker with assembly language
> for different types of systems).

If your desktop/laptop has an Intel chip, then the native toolchain will
be x86. What I tend to do for that is:

# apt-get install gcc
# apt-get install build-essential linux-headers-$(uname -r)
# apt-get install gcc-4.1-doc glibc-doc manpages-dev binutils-doc

Where the "4.1" will be a higher number now. (See what apt-cache search
finds.)


And for arm:

$ apt-cache search gcc-arm
gcc-arm-linux-gnueabi - GNU C compiler for the armel architecture
gcc-arm-linux-gnueabihf - GNU C compiler for the armhf architecture

You'll be able to get yourself into no end of interesting (not to
mention challenging) situations if you tackle those two and AVR at the
same time.

If you make it as far as tweaking linker scripts, then the info page is
infinitely more informative than the manpage.

Good luck!

Erik



Re: Cross-Platform Assembly Language Compilers?

2018-07-26 Thread Erik Christiansen
On 26.07.18 08:29, cyaiplexys wrote:
> I'd like to try a native compiler but also I would like to have something I
> could compile for Arduino (here we go again) and ARM and other CPUs as well.

$ apt-cache search avr | more
arduino - AVR development board IDE and built-in libraries
libavresample-dev - FFmpeg compatibility library for resampling -
development files
libavresample4 - FFmpeg compatibility library for resampling - runtime
files
gcc-avr - The GNU C compiler (cross compiler for avr)
avrdude-doc - documentation for avrdude
avr-libc - Standard C library for Atmel AVR development
gdb-avr - The GNU Debugger for avr
avrdude - software for programming Atmel AVR microcontrollers
binutils-avr - Binary utilities supporting Atmel's AVR targets

When you install gcc-avr, binutils-avr will also be installed, else
gcc-avr can't produce executables. You can use avr-as to assemble your
own assembler source files, but if you put your *.S files through
gcc-avr, then you can use the 'C' header files, with cpp doing the macro
mappings.

Unless arduinoing, you'll probably want to install "make", as it's very
handy for building a code suite. (Duno what arduino uses, but IDEs
usually try to appear to do something more than the elements of a CLI
build environment - aka "*nix is the IDE")

Once entangled in the peripherals (initialisation and utilisation) of
one CPU, you'll find enough to learn that hopping on to the next target
will not immediately appeal. However, what you learn of the GNU
toolchain on one target is equally applicable to the next. (E.g. ld,
objdump, nm, ar, gprof, gdb, readelf, ...)

Read the avrdude manpage and avrdude-doc for suitable programming
dongles, or just hop on ebay. Maybe buy a couple of arduinos while there,
leave the bootloader intact, and produce your code with the GNU toolchain
if arduino "sketches" seem too naff. They're easier, than a laptop, to
screw to a post if the project is a computerised birdfeeder. (And easier
to power out there.)

Arduino: # apt-get install arduino
 Then read all doco, and google.

X86: Similar to above.

Erik



Re: If not "newbie" then ????

2018-07-23 Thread Erik Christiansen
On 23.07.18 10:28, Eric S Fraga wrote:
> On Sunday, 22 Jul 2018 at 05:39, Tom Browder wrote:
> > Sounds like there are a lot of fellow travelers here.  If you lean
> > more towards loving programming as I do (started in FORTRAN IV in
> > 1961), you might check out the new world of Perl 6 (https://perl6.org)
> 
> Interesting.  I started way back when with FORTRAN 66 and APL but I have
> moved on to Julia (julialang.org) these days.

In 1972 we were still submitting FORTRAN IV jobs on Hollerith punched
cards, to run on an ICL1901 24-bit mainframe, which half-filled a room
with its fridge-sized chain printer and big card reader and disk drives.

But the electrical engineering department had its own little HP2100A
16-bit minicomputer, with 16k words of 980 ns ferrite core memory. (Very
spiffy stuff, back then.) If you overwrote the punched tape bootloader
in the first dozen words or so of RAM, then you had to load it by hand
from the frontpanel switch register, word by word, in octal.

The three-chip 8080A CPU had become the single-chip 8085 by the time I
programmed it, before moving to the 8051 microcontroller, but sprinkling
13 of 'em in a system, 12 mask programmed, so no coding errors permitted,

My first home CPU was a TMS9900, which like the COSMAC had 16 x 16 bit
registers, but not on-chip. A pointer register set the location of the
register workspace in RAM, so that on interrupt or subroutine call,
changing one register gave a new set of registers instantly. It also had
a barrel shifter, rotating a register any number of bits in a single
instruction, optionally controlled by the 4 LSBs of R0. (Magic for
computing sine and cos by the CORDIC method.) And it had 16x16 multiply
and 32/16 divide.

But the contemporary COSMAC was well ahead of its time - a CMOS CPU in 1976.

Erik



Re: Arduino and Python or gcc compiler?

2018-07-22 Thread Erik Christiansen
On 22.07.18 10:29, cyaiplexys wrote:
> I think my mindset also came from my days of trying to program the WowWee
> RoboSapien RS Media (ARM/Linux with Java). That was like a fully
> programmable computer and robot all in one.

Then the full arduino environment will be more comfortable than raw C on
bare iron. While I program AVRs, including the ATmega328P used on most
arduino boards, in C and assembler, I understand that the arduino
environment provides a high level programming interface which allows
e.g. artists to write "sketches" to perform real-time tasks.

There is quite a bit of peripheral hardware on an ATmega328P, from
serial USART, through timer/counters useful for e.g. PWM motor control,
through multi-channel 10 bit Analogue to digital converter. The chip
datasheet is 440 pages in length, and learning to initialise and drive
the on-chip paraphernalia is a non-trivial task. The arduino environment
provides a library of drivers AIUI, to allow programming at the
application level, rather than writing your own drivers¹. It won't
necessarily give you the last microsecond of real-time performance, but
it should be a low-pain introduction. (Must be some reason for its
popularity, I figure.)

> I don't mind using C, but am pretty bad at it. Maybe this is the time to
> finally get better at it.

Learning two things at once is for self-driven stoics only, at least if
they're both non-trivial. Beginning with a friendly development
environment and application framework, complete with examples which
could be downloaded and used for tutorial purposes, avoids the pain of a
lot of stuff failing not because of coding errors, but because not yet
grokking the 440 pages of hardware spec left one bit in that other mode
enabling register unset, so it'll never work until you find the clue in
the doco.

There must be an arduino ML or forum, which would be a sanity saver.
Once master of that, then there's the AVRfreaks forum when the more
serious C journey begins.

OK, there are one or two arduinos with ARM chips, but I don't count that
as original arduino.

A raspberry Pi, running linux, would be a more familiar environment by
the sound of it. No problem running python there, but would there be
python I/O libraries?

¹ OK, drivers for e.g. 2x20 character LCDs can be found on the net, but
where there's an arduino LCD "shield" (plug-in daughterboard), there'll
be an arduino driver ready to use.

Erik



Survival Notes [Was: Re: If not "newbie" then ????

2018-07-22 Thread Erik Christiansen
On 21.07.18 10:42, Richard Owlett wrote:
> P.S. I've saved ~6 years of useful posts from this group. I've been trying
> to figure out how to organize it in order to create a QWSBFA rather than a
> FAQ. QWSBFA=="Questions Which Should Be Frequently Asked" ;/

There are so many paths that people have trodden, and so many levels of
expertise, that survival notes are somewhat individualised, I figure.

How best to manage it probably depends on your vintage. Over three
decades I've accumulated ~ 420 pages of *nix user & sysadmin, embedded
programming, and text munging notes. With folding enabled, Vim presents
the single plain text file as one page - the table of contents. Headings
are capitalised, and a ':' follows keywords (also capitalised). A search
hit automatically unfolds to the fold level required. It's simple, easy
to manage, and fast - but most importantly, my fingers know Vim.

Stuff from technical lists which doesn't make it to the survival notes,
i.e. the few % of posts worth keeping, are sorted on first reading to
topic-specific mailboxes. Tonight there are:

$ ls -1 mail/* | wc -l
1266

and

$ ls -1 mail/cnc* | wc -l
454

are LinuxCNC-related. (Gene's favourite hobby.) Even with automated
search, it's a lot easier to look for one keyword in a hundred posts
from a single context, than try to make keyword combinations which will
fight off out of context hits in a hundred thousand posts.

> OWL ducks fer cover ;}

Hopefully owl ducks make good cover.

Erik



Re: Looking for ratings of all-in-one printers for Linux (Ubuntu in particular)

2018-07-11 Thread Erik Christiansen
On 10.07.18 12:53, David Wright wrote:
> On Mon 09 Jul 2018 at 19:05:52 (-0400), Dan Ritter wrote:
> > On Mon, Jul 09, 2018 at 06:53:44PM -0400, Michael Stone wrote:
> > > On Mon, Jul 09, 2018 at 06:39:29PM -0400, Dan Ritter wrote:
> > > > You're both missing the main point, which is that a Brother
> > > > printer with BRscript/3 is essentially a Postscript printer, and
> > > > you can treat it as one. No drivers needed.
> 
> I'm not really interested in a PostScript printer per se, but in a
> printer that handles PDFs natively. Is this the same thing?

So long as CUPS can translate for the printer what the app (even as
simple as lpr) hands over, then the only cost is a print delay if the
postscript is computation-intensive - but that has to be done either in
the printer or on the host anyway, and the host is probably faster.

I'm using a decade-old HP Laserjet 3050 all-in-one, and the hplip
drivers in CUPS sufficed during a recent software update.

> > > So you can use it as an all-in-one postscript printer/scanner?
> > 
> > You can use it as a printer. As far as I know there is no such
> > thing as a "postscript scanner".
> 
> What I would understand by the expression "postscript scanner" is
> something that scans a document and yields a PDF file. I think
> a lot of scanners (most?) will also scan to a JPEG file.

When arcing up my Epson Perfection V350 flatbed scanner in xsane or the
other image scanner, I tend to save as jpg. ISTRC that it's a smaller
file.

_But_ I wouldn't buy an all-in-one again. The scanner in that is useless
for books, and even magazines can be too valued to allow ripping out
pages. Only the flat-bed scanner has seen any use in the last half
decade. OK, the all-in-one has an integrated fax - but I've never used
it, and doubtless now never will.

> > The Brother all-in-ones tend to have "scan-to-network" abilities,
> > though, and that doesn't require a driver -- just an internal
> > FTP or SAMBA server to receive the files. My workplace has a 
> > bunch of these. Walk up, select Scan, select Network, and put
> > your document(s) in. You get PDFs or TIFFs in your filesystem.
> 
> That's the sort of thing, but I'm used to it writing the files
> onto a USB stick (and prefer that).

Both the Laserjet 3050 and Epson V350 are USB, but no sticks needed.

ISTM that quite a range of printers and scanners work with linux, and
the only thing I'd like to add is an A3 printer, but can't justify the
expense while I can drop into the local library with a usb stick and print
the very occasional large format page for negligible cost.

Erik



SOLVED, mostly. [Was: Re: Have managed a CUPS printer addition, but the queue is a black hole.

2018-06-24 Thread Erik Christiansen
On 24.06.18 10:04, mick crane wrote:
> On 2018-06-23 13:12, Erik Christiansen wrote:
> > The new CUPS & HP-LaserJet-3050 addition prints the printer self-test
> > page immediately, the CUPS test page after several minutes, but other
> > print jobs not at all. Again, printing from xpdf, the job is queued:
...
> > but no printer output.
> 
> > The CUPS test page includes "Driver: HP3380_6.PPD". I don't know if it
> > has selected the best one, or if that's relevant to this print job
> > evaporation.
> 
> any error messages on the printer ?
> more than 1 tray ? right tray selected ?

No errors on the printer, and now I find that in addition to the test
pages mentioned, it prints a .ps saved to file from libreoffice
immediately, without any problems. But postscript output by xpdf, which
is what I had to hand for the post-installation tests, is still queued
and lost without output or visible symptom. So, to probe what's up
there, I printed to file from xpdf, then lpr-ed that, as I had done with
the saved .ps from libreoffice. That disappeared too, so it seems that
the ps from xpdf is somehow unprintable, though they're all %!PS-Adobe-3.0. 

For the moment, I'll put it down to an xpdf problem, rather than cups,
as another .ps I had to hand prints too. Ah ... printing directly from
libreoffice, something I very rarely use, works too. It's mysterious
rather than a show-stopper now, so we'll see how much effort I put in
later to try to print from xpdf and anything else which fails similarly.

Thanks for the inquiring mind.

Erik

-- 
If at first you don't succeed, try again.
Then Quit. No use being a damn fool about it.  - W.C. Fields



Re: Have managed a CUPS printer addition, but the queue is a black hole.

2018-06-23 Thread Erik Christiansen
Aargh! Apologies for committing a subthread hijack. That wasn't intended.

The new CUPS & HP-LaserJet-3050 addition prints the printer self-test
page immediately, the CUPS test page after several minutes, but other
print jobs not at all. Again, printing from xpdf, the job is queued:

$ lpq
HP-LaserJet-3050 is ready and printing
RankOwner   Job File(s) Total Size
active  (null)  5   untitled8192 bytes

then

$ lpq
HP-LaserJet-3050 is ready
no entries

but no printer output.

In /var/log/cups/error_log, for that job, we see:

  2 I [23/Jun/2018:21:49:26 +1000] [Job 5] ready to print
  3 D [23/Jun/2018:21:49:26 +1000] [Job 5] Set job-printer-state-message to 
"ready to print", current level=INFO
  4 D [23/Jun/2018:21:49:26 +1000] Discarding unused job-progress event...
  5 D [23/Jun/2018:21:49:26 +1000] cupsdMarkDirty(-S)
  6 D [23/Jun/2018:21:49:26 +1000] cupsdSetBusyState: newbusy="Printing jobs 
and dirty files", busy="Printing jobs and dirty files"
  7 D [23/Jun/2018:21:49:26 +1000] [Notifier] state=3
  8 D [23/Jun/2018:21:49:26 +1000] [Notifier] PrinterStateChanged
  9 D [23/Jun/2018:21:49:26 +1000] cupsdReadClient: 24 POST / HTTP/1.1
 10 D [23/Jun/2018:21:49:26 +1000] cupsdSetBusyState: newbusy="Active clients, 
printing jobs, and dirty files", busy="Printing jobs and dirty files"
 11 D [23/Jun/2018:21:49:26 +1000] cupsdAuthorize: No authentication data 
provided.
 12 D [23/Jun/2018:21:49:26 +1000] cupsdReadClient: 24 1.1 CUPS-Get-Printers 1
 13 D [23/Jun/2018:21:49:26 +1000] CUPS-Get-Printers
 14 D [23/Jun/2018:21:49:26 +1000] Returning IPP successful-ok for 
CUPS-Get-Printers (no URI) from localhost
 15 D [23/Jun/2018:21:49:26 +1000] PID 9829 (/usr/lib/cups/backend/hp) exited 
with no errors.
 16 D [23/Jun/2018:21:49:26 +1000] cupsdMarkDirty(-S)
 17 D [23/Jun/2018:21:49:26 +1000] cupsdSetBusyState: newbusy="Active clients, 
printing jobs, and dirty files", busy="Active clients, printing jobs, and 
dirty files"
 18 I [23/Jun/2018:21:49:26 +1000] [Job 5] Job completed.

but still nothing printed.

The CUPS test page includes "Driver: HP3380_6.PPD". I don't know if it
has selected the best one, or if that's relevant to this print job
evaporation.

Erik



Have managed a CUPS printer addition, but the queue is a black hole.

2018-06-23 Thread Erik Christiansen
After a fresh update of CUPS, and a fresh "Add Printer", selecting the first
(gutenberg) model option, printing a pdf page from xpdf caused display
of GUI message boxes indicating "printing started" and "printing
completed", but no printer output.

At localhost:631 -> Job Management, "Show all jobs" gives:
▲ ID ▲   Name User  Size  PagesState
HP-LaserJet-3050-1   Unknown Withheld 8k Unknown completed at Sat Jun 23
20:42:53 2018

so CUPS processed the job, but the printer stands silently oblivious,
displaying "Ready". So why no printing?

$ lsusb
Bus 001 Device 005: ID 03f0:3217 Hewlett-Packard LaserJet 3050

$ lpstat -t
scheduler is running
system default destination: HP-LaserJet-3050
device for HP-LaserJet-3050: hp:/usb/HP_LaserJet_3050?serial=00CNCKR73450
device for HP-LaserJet-3050-Fax: hpfax:/usb/HP_LaserJet_3050?serial=00CNCKR73450
device for HP_LaserJet_3050: hp:/usb/HP_LaserJet_3050?serial=00CNCKR73450
HP-LaserJet-3050 accepting requests since Sat 23 Jun 2018 20:42:53 AEST
HP-LaserJet-3050-Fax accepting requests since Sat 23 Jun 2018 20:27:56 AEST
HP_LaserJet_3050 accepting requests since Sat 23 Jun 2018 20:40:42 AEST
printer HP-LaserJet-3050 is idle.  enabled since Sat 23 Jun 2018 20:42:53 AEST
ready to print
printer HP-LaserJet-3050-Fax is idle.  enabled since Sat 23 Jun 2018 20:27:56 
AEST
printer HP_LaserJet_3050 is idle.  enabled since Sat 23 Jun 2018 20:40:42 AEST

$ lpq -PHP-LaserJet-3050
HP-LaserJet-3050 is ready
no entries

I'd like to try an "lpc up", but lpc seems not to be there, and I don't
know which package would have it.

Any prodding in the direction of an exit from the maze would be most
welcome.

Erik



Re: Simple spreadsheet program.

2018-03-14 Thread Erik Christiansen
On 13.03.18 10:48, David Wright wrote:
> On Tue 13 Mar 2018 at 21:31:00 (+1100), Erik Christiansen wrote:
> > Too true. After a couple of hours of failing to get any GUI drawing
> > package, not least LibreOffice, to do anything useful, I used Vim to
> > textually produce the 8 drawings for my house; plan, elevations &
> > sections, and site plan. It took about 800 lines of Postscript, and I
> > didn't have to crack the inscrutable secrets of an obstructive GUI
> > interface.
> 
> OTOH the results of your work were highly scrutable?

Adjectives describe nouns, in the quoted text that is "interface secrets".
The quoted text did not refer to output/results.
The quote of my function to draw a door in a floorplan shows my text
input, not output/results.
The result of conversion of the postscript to pdf is a suite of drawings
when displayed with e.g. xpdf. (Scrutable even to local government
officials, at considerable cost saving compared to using an architect.)

But there is perhaps an unstated point - that the postscript language
(the interface) is not equally scrutable for all. I found it infinitely
easier to learn a fully discoverable textual language than how to crank
a mouse engine in mysterious ways. Eric Raymond perhaps said it best.
(See sig)

Cheers,
Erik

-- 
The meta-problem here is that the configuration wizard does all the approved   
rituals (GUI with standardized clicky buttons, help popping up in a browser,
etc. etc.) but doesn't have the central attribute these are supposed to achieve:
discoverability. That is, the quality that every point in the interface has
prompts and actions attached to it from which you can learn what to do next.
   - Eric Raymond, in "The Luxury of Ignorance."



Re: Simple spreadsheet program.

2018-03-13 Thread Erik Christiansen
On 13.03.18 09:59, Joe wrote:
> On Tue, 13 Mar 2018 20:42:08 +1100
> Erik Christiansen <dva...@internode.on.net> wrote:
> > An sc description: "Its keybindings are familiar to users of 'vi', and
> > it has most features that a pure spreadsheet would, but lacks things
> > like graphing and saving in foreign formats. It's very stable and
> > quite easy to use once you've put a little effort into learning it."
> > makes it look as simple as it gets.
> > 
> > Erik
> > (Who just uses a line of awk when needing to sum a column or two in a
> > table.)
> > 
> 
> It's the 'little effort' that stood out for me. Someone familiar with
> the operation of a piece of software always grossly underestimates how
> much they know about it, and how much someone else coming to it cold
> needs to know.

Too true. After a couple of hours of failing to get any GUI drawing
package, not least LibreOffice, to do anything useful, I used Vim to
textually produce the 8 drawings for my house; plan, elevations &
sections, and site plan. It took about 800 lines of Postscript, and I
didn't have to crack the inscrutable secrets of an obstructive GUI
interface.

But I persevered with the Eagle GUI schematic capture & PCB layout app,
putting in the weeks to tame it.

It probably comes down to whether you think you'll ever use it again.

Erik



Re: Simple spreadsheet program.

2018-03-13 Thread Erik Christiansen
On 13.03.18 08:59, Joe wrote:
> I'm not aware of a 'simple' spreadsheet, as it is the kind of
> application that begs for feature-creep. Synaptic turns up sc, which I
> know nothing about, but the description doesn't look compatible with
> 'simple', unless the user interface is similar to something you already
> know.

An sc description: "Its keybindings are familiar to users of 'vi', and
it has most features that a pure spreadsheet would, but lacks things
like graphing and saving in foreign formats. It's very stable and quite
easy to use once you've put a little effort into learning it." makes it
look as simple as it gets.

Erik
(Who just uses a line of awk when needing to sum a column or two in a table.)



Re: Does bash have a tool ?

2018-03-05 Thread Erik Christiansen
On 05.03.18 03:06, Richard Owlett wrote:
> 
> As to "manpages not a tutorial"   *ROFL*
> I'll admit content is there, but ...  
> I've been referred to vim. Although awk and cousins are probably under the
> surface, vim.org is fascinating and accessible to end users such as myself.

A good text editor (and it's hard to be as good as Vim) will reduce the
workload of repeated edits which are not consistent enough to be easily
automated with Sed or Awk.

It's amazing how much can be done by repeating the last search with 'n',
then deciding whether to hit '.' to repeat the last edit (e.g. a
change-word or delete-to some pattern)

There's also the ability to put any sequence of actions onto a key.
If you arc up vim and type ":help q", the on-line help will describe how
to start keystroke recording with "qx", where x is the key you'll use to
re-run the macro, via "@x". Although both search and action can be
packed into the macro, it's usually better to repeat the search (for
next edit target) with 'n', so you get to see the "before", then hit @x
to run the macro, then eye the results before repeating.

Vim is modal editor, with a normal mode and a couple of editing modes.
Thinking you're in insert mode while in normal mode, can in a few
keystrokes wreak random havoc, requiring a stab at Escape then a few
stabs at 'u', the undo button, to restore order. (If too many undos,
then ^r is redo.) To reduce the need to rely on memory, a line with

set showmode

in ~/.vimrc will display the current mode in bold text. (Blank for
normal mode) If you also add these lines:

" Cursor Appearance and behaviour:   !!!
" (Insert_Mode == Green, Normal_Mode == Red)
if  =~ "xterm"
   let _SI = "\]12;green\x7"
   let _EI = "\]12;red\x7"
endif

the cursor will also serve as a reminder, so you don't need to glance to
the bottom of the screen.

What serves best varies not only with the task and the tweaks you've
made to the tools, but what techniques you have absorbed on the
text-whacking journey.

Erik



Re: Does bash have a tool ?

2018-03-04 Thread Erik Christiansen
On 04.03.18 10:28, Richard Owlett wrote:
> 
> I don't have any background in Perl and the last formal course in
> programming was in the 60's.
> 
> However awk and/or sed may be what I'm looking for and are well documented.
> Your description of nedit is interesting. I'll investigate. I'm on my way
> out at the moment.

Awk and Sed were created in the unix big bang, and might indeed be just
be your speed. (Some enhancements have been added to Awk since, such as
co-processes, but the current use case won't need that.)

It seems you're onto some doco, but this is hard to beat:
The Addison Wesley "The AWK programming Language" is a slender concise
exposition of the tool's use and capabilities, written by Awk's authors,
Aho, Weinberger, and Kernighan. The permuted index greatly eases finding
stuff in it.

This is a quick start: www.gnu.org/software/gawk/manual/gawk.html
Like the Addison Wesley dead-tree book, its "Sample Programs" shows that
Awk has a C-like syntax, supercharged with posix regexes, associative
arrays, etc.

A quick intro to regular expressions can be found in:
$ man regex
(Awk defaults to the more compact and easily read EREs, rather than
obsolete BREs.)

The awk manpage is a good reference, but as with all manpages, not a
tutorial.

Over the last three decades or more, I've found that Awk and shell have
more than adequately handled all my text munging requirements, right up
to a C-code generator taking structured English input to create
heterogenous communities of interacting state machines.

Erik



Re: Firefox too slow when opening new window or typing in the URL

2018-02-17 Thread Erik Christiansen
On 17.02.18 10:00, deloptes wrote:
> Since couple of months firefox is taking too long to open a new window or
> new page.

Whenever that happens here, I just clear the cookies & cache with
CTRL+SHIFT+DEL. That puts a spring in its step again.

Admittedly, my old mobo is too slow for video streaming, so I bought a
Udoo-X86 for that - with very satisfying results. Except very
occasionally, when video freezes just as on the old slow mobo, and it's
necessary to click on the progress bar under the display. Relevance? I
suspect there's a kilo and a half of gummy sludge in every instance of
Firefox, and you have to knock it loose regularly to keep the thing
working. (If there's a commercial version out there, that might explain
it.)

Erik



Re: Ethernet is not started at boot

2018-02-08 Thread Erik Christiansen
On 08.02.18 08:42, to...@tuxteam.de wrote:
> On Thu, Feb 08, 2018 at 01:36:41PM +1100, Erik Christiansen wrote:
> 
> [...]
> 
> > [...] Fastidious fusspotting on minor terminology matters [...]
> 
> Yikes :-)
> 
> May I steal this one when I need it badly?

It's escaped now, so please feel free. Here's hoping it's not badly
needed too often.

Erik



Re: Ethernet is not started at boot

2018-02-07 Thread Erik Christiansen
On 07.02.18 12:13, to...@tuxteam.de wrote:
> On Wed, Feb 07, 2018 at 09:58:55PM +1100, Erik Christiansen wrote:
> > Michelle, that netmask is 0b1001 , which is
> > the first I have ever seen with a hole in it.
> 
> No, that would be       0111     (some spacing
> added for legibility). But the "hole" thing still is there. I have no idea
> what network equipment will do on that.

Rats, yes, a late-night addition of one when a subtraction was needed.

On 08.02.18 03:33, Richard Hector wrote:
> On 07/02/18 23:58, Erik Christiansen wrote:
> > Not trusting the software to handle an unusual netmask, I might have
> > been tempted to just use a class B netmask, 255.255.0.0 , but then I can
> > be a Feigling in such matters.
> 
> Please don't use "class B" to mean /16. Firstly, it's decades out of
> date, and secondly, that range was never in the class B section.

I'm decades out of date too, so it's apt. The intended audience can
probably discern the message that a broader common netmask doesn't weigh
more than a precisely fitted one which might or might not work as
expected. Fastidious fusspotting on minor terminology matters does not
contribute anything to the meat of the matter, no matter how much it
massages the author's ego.

Erik



Re: Ethernet is not started at boot

2018-02-07 Thread Erik Christiansen
On 07.02.18 09:33, Michelle Konzack wrote:
> Good morning,
> 
> Am 2018-02-07 hackte Gene Heskett in die Tasten:
> > On Tuesday 06 February 2018 14:07:55 Brian wrote:
> >> 1. auto enp0s25
> >>  iface enp0s25 inet
> >> static address 192.168.0.202
> >> netmask 255.255.255.0
> >> gateway 192.168.0.1
> >> network 192.168.0.0
> >>
> >> netmask and network are not needed. ifupdown will compute them. Note
> >> there are no examples in interfaces(5) which use these parameters.
> >>
> > You should go and read that man page again.
> 
> Who do you mean?
> 
> I have als a network with
> 
> auto eth2
> iface eth2 inet static
> address 192.168.4.12
> netmask 255.255.127.0
> gateway 192.168.4.1
> network 192.168.4.0
> 
> So, it is not so good idea to leafe it out

Michelle, that netmask is 0b1001 , which is
the first I have ever seen with a hole in it. For 512 addresses, I'd
have expected 255.255.254.0, which has contiguous bits:
0b1110 (If 10 bits (1024 addresses) were the
aim, then it would be 252, but never 127, if I have any kind of grip on
this stuff.)

Not trusting the software to handle an unusual netmask, I might have
been tempted to just use a class B netmask, 255.255.0.0 , but then I can
be a Feigling in such matters.

Erik



Re: policy around 'wontfix' bug tag

2018-02-06 Thread Erik Christiansen
On 06.02.18 19:16, Richard Hector wrote:
> On 06/02/18 18:38, Erik Christiansen wrote:
> > Perl is the quintessential write-only language, which with a bit of luck
> > will die out before it catches on
> 
> Now you're getting to fighting talk ... :-)

Whoops, forgot the <$0.02> ...  markers. 
But planning to replace a formal BNF grammar with perl/python/ruby/...
spaghetti would be a most dubious design strategy, IME.

Around 23 years ago, I bought three O'reilly perl books - the cookbook,
the nutshell, and another one, but couldn't stand the language, despite
the investment. Never had that trouble with awk, sed, lex, yacc/bison,
bash, expect, C, makefiles, ld linker scripts, assembler for half a
dozen targets, postscript, ...

Erik

-- 
Once, adv.:
   Enough.
   - Ambrose Bierce, "The Devil's Dictionary"



Re: policy around 'wontfix' bug tag

2018-02-05 Thread Erik Christiansen
On 05.02.18 10:02, Michael Stone wrote:
> IIRC it started out as a YACC function in the late 80s, and is now a Bison
> (YACC+GNU extensions) library.

In that case it has a precise grammar, expressed in BNF (Backus Naur
Form), though the lexer (I've always used lex together with
yacc/bison) could add a bit of elastic if the designer had a
free-wheeling approach. The existing flexibility then arises primarily
from explicit alternatives in grammar rules.

A BNF grammar is ideal for discussing in abstraction from the code, and
could be tweaked, both to correct erroneous results, and to add
alternative syntax which is more user-immune, if that is desired.
(But GIGO can also be cured by eliminating the GI.)

In any event, the one purportedly strange grammar example presented so
far was straightforward, both in behaviour and analysis. The one other
proposed as a challenge was nothing other than dd/mm order ambiguity.
(Purely a geographically isolated input confusion, having nothing to do
with "date".)

> There are still people who work on it--the debug option added a couple
> of years ago has made it *much* easier to understand why it does the
> things that it does. I'm not sure that if I were implementing a new
> option I'd use the bison code at all (it does probably limit the
> contributor pool).

A fork, with a new name, is on open prairie. For my money, the BNF
grammar and bison is an asset. (Even if debugging shift/reduce and
reduce/reduce conflicts can necessitate resort to old notes from previous
efforts, until one is back up to speed.)

> The bigger issues aren't the choice of implementation language,
> they're 1) getting buy-in on what the replacement should look like and
> 2) getting people to use something different. It's tough, because
> almost every linux system out there has date(1) with the existing -d
> parser, and it's easier to assume that's there than to use something
> else. (E.g., it's possible to use python or perl or other scripting
> language one-liners with any number of date libraries to add much more
> maintainable date handling to their scripts, but most people just
> stick with the date(1) they know rather than using one of the
> alternatives.)

But date(1) is fine as-is, as great now as 30 years ago - better even.
If newcomers would suggest grammar extensions (in BNF), then they could
perhaps be trialled.

Perl is the quintessential write-only language, which with a bit of luck
will die out before it catches on, and is python that monstrosity which
lacks code block delimiting, and so uses indenting in lieu?

Erik

-- 
> Am I correct that perl5-porters is the proper forum for submitting
> my ideas?
I think you didn't get a reply because you used the terms "correct" and
"proper", neither of which has much meaning in Perl culture. :-)
   -Larry Wall



[Was: Re: policy around 'wontfix' bug tag

2018-02-05 Thread Erik Christiansen
On 05.02.18 09:39, Greg Wooledge wrote:
> On Sun, Feb 04, 2018 at 04:04:34PM +0100, Nicolas George wrote:
> > All you describe is convenience for programmatic use. As I explained,
> > this parser is meant for interactive use.
> 
> What on EARTH made you think THAT?

The fuzzy grammar of the date string makes programmatic use a bit
empirical, I must admit.

> I promise you, people ARE using date -d '...' in shell scripts.
> LOTS of people.  Hell, I've done it.(*)

A data point: I have been using "date" for a good 30 years, on hp-ux,
SunOS, Solaris, and now linux - pretty much _exclusively_ in scripts,
even with -d. An example still in use even scripts the "human readable"
input:

#!/bin/bash
[ `date '+%H'` -lt 4 ] && day="yesterday" || day="today"
d="`date -d $day '+%a %b %_d'`"
...
echo "`date -d $day '+%a %b %_d'`" $n >> ~/fetchmail_traffic

If a new formal grammar largely consistent with the "mostly free format
human readable date string" were defined in the manpage, then that could
be a step forward.

> If I'm a human working in an interactive shell, and I want to see "the
> date of the Sunday that occurred in the previous week", I will simply
> run cal(1) instead.  (Or for that specific example on this specific
> day, "cal 1 2018" or even "cal 2018".)  It's a lot easier than trying
> to guess which recipe you can put into date -d to get the same result.

Yes, cal is less effort. I use date interactively only when developing a
script. For me, the "mostly free format human readable date string" is
irrelevant, as it merely serves as an undocumented grammar.

> 
> (*) One specific shell script use case was "Get the last date of a given
> month."  Now, obviously you can just set up an array of hard-coded month
> ending dates, and then write a function to determine whether the current
> year is a leap year for the February case.  But if you want to do it with
> GNU date -d, then you have to guess a magic incantation that actually
> works.  Usually by trial and error.
> 
> Anyway, here's what I came up with:
> 
> lastday() {
> date +%Y-%m-%d -d "$1 1 day ago + 1 month"
> }
...

> How does it work?  Who knows!

That's quite straightforward, I submit. Omitting the "+ 1 month", your
expression is equivalent to: (with $1 substituted for example 1)

$ date +%Y-%m-%d -d "2016-03-01 - 1 day"
2016-02-29

which simply steps backward from first of the month to last of the
previous. Then stepping forward a month merely avoids the need to input
first of next month for last of this one.

> But it seems to work.  It correctly
> handles the oddball corner cases like Feb 2100 (which is not a leap
> year), and the March-that-follows-a-leap-day as well as the
> March-that-does-not-follow-a-leap-day.  So that is where I left it.

And for the far past, cal is superior; compare:

$ cal -3 9 1752
August 1752  September 1752 October 1752  
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  
   1 1  2 14 15 16   1  2  3  4  5  6  7  
 2  3  4  5  6  7  8  17 18 19 20 21 22 23   8  9 10 11 12 13 14  
 9 10 11 12 13 14 15  24 25 26 27 28 29 30  15 16 17 18 19 20 21  
16 17 18 19 20 21 2222 23 24 25 26 27 28  
23 24 25 26 27 28 2929 30 31  
30 31

with

$ date +%Y-%m-%d -d "1752-10-01 - 1 day"
date: invalid date `1752-10-01 - 1 day'

Cal delivers the goods, but date lacks the time travelling range.

Erik



Re: UID 1000 on Raspberry Pi (Was: Re: Embarrassing security bug in systemd)

2018-01-09 Thread Erik Christiansen
On 09.01.18 15:04, Christian Groessler wrote:
> I just edited the password file directly, "vipw" and "vipw -s", and renamed
> the pi user.

When doing that, there is merit in running pwck before any powerdown/reboot, 
as any illegality in a line stopped processing of all following when I
last tried mucking it up. (A good reason for the root entry to be first.)

And for vigr there's grpck.

That's all we had in the decades before the newfangled useradd stuff
came along.

Erik



Re: How to create a PDF-Printer from the command line

2018-01-06 Thread Erik Christiansen
On 07.01.18 13:26, Erik Christiansen wrote:
> 
> This may be more delicate?:   https://www.gnu.org/software/a2ps/

Hmmm ... and if ps2pdf isn't yet installed at your end, then an apt-get
fixes that. It produces sterling pdf from ps for me - big prints come
out perfectly at the local printer.

Erik



Re: How to create a PDF-Printer from the command line

2018-01-06 Thread Erik Christiansen
On 07.01.18 00:19, Brian wrote:
> On Sat 06 Jan 2018 at 21:02:15 +, Curt wrote:
> > On 2018-01-06, Brian  wrote:
> >  unoconv -f pdf text.txt
> 
> 50+ megabytes of the libreoffice stack to install, But yes, that will
> do it. A sledgehammer to crack a nut.

This may be more delicate?:   https://www.gnu.org/software/a2ps/

Erik



Re: EDA software.

2017-12-13 Thread Erik Christiansen
On 06.12.17 08:57, pe...@easthope.ca wrote:
> Hi,
> 
> At https://wiki.debian.org/DebianTinker/Desktop#EDA is a list of 
> packages for electronics design automation.  According to various 
> documents, Electric, Fritzing and gEDA, at least, can help to create 
> schematics.  I use librecad but have never used schematic construction 
> software.  Which of the EDA packages will be a good starting point?  
> Is any integrated with Librecad?

Because Kicad and Geda were still in early development when I needed
schematic capture and PCB layout, I ended up learning Eagle, and have
found it very good. It's a commercial offering, but free for private
use, limited to 80 x 100 mm double sided in that version. I don't know
the current price of a full version.

As learning one GUI package was hard enough, I figure I'll just pay up
if I should ever make a board to sell.

It is a pain that the Eagle community is a newsgroup, rather than a
mailing list. There are innumerable libraries of component macros on
their website.

I've never seen Librecad.

Erik



Re: software to do drawings of houses, gardens, etc.

2017-11-28 Thread Erik Christiansen
On 28.11.17 21:41, Emanuel Berg wrote:
> Erik Christiansen wrote:
> 
> > After trying to get various GUI drawing
> > packages to function at the most basic level,
> > and failing to produce anything, I'm just
> > finishing the 8 drawings for my new house
> > build (floor plan, elevations, sections, and
> > site plan), using raw postscript. That has
> > proven a better fit for a retired programmer.
> > [...]
> 
> Sounds *great* and my thinking/style is exactly
> the same!
> 
> Do you mind sharing the source and Makefile?

It's not necessary to build anything - I've just defined a few
postscript procedures at the start of the postscript document.
Job done.

On 28.11.17 21:45, Emanuel Berg wrote:
> Erik Christiansen wrote:
> 
> > Interesting ... I had not heard of it
> > previously. Looking at it on wikipedia, I see
> > "Most operations in Xfig are performed using
> > the mouse," For the first, I've had no luck
> > mouse-wrangling GUI drawing packages - it's
> > all so counter-intuitive, and nothing works
> > for me. For the second, after my 8 drawings
> > I cannot imagine how I'd mouse-wrangle
> > something as simple as a wall cross-section
> > with complete positional and dimensional
> > precision. In postscript, it's just:
> >
> > /wall_height 2700 def % X Y X Y 3600 0 moveto
> > 100 wall_height box % Let's put it at 3600 mm
> > from origin, % at floor level.
> 
> This is, again, exactly what I want. Is there
> a collection somewhere of the postscript syntax
> or how did you pick it up?

The Adobe book "Postscript Language Reference", third edition, is useful
for looking up commands, but the bulk of the text is prolix and obtusely
dense reading.

Better for readability and examples is the BLUEBOOK.PDF, which is the
first hit on a google for "postscript blue book".

Two methods of specifying paper size are required for both printers and
software packages to pick it up. I found a way that works, by googling.

What I've put together is only a beginning - enough to satisfactorily
complete one drafting job of 8 drawings. It's only one way to do it.
(And a couple of things would need generalising, e.g the WC and kitchen
sink are currently just drawn in situ, rather than being in a procedure.

One thing which makes editing 840 lines of postscript more manageable
has nothing to do with the language. Enabling Vim's text folding renders
the entire document as 26 lines of top level headings. That greatly
simplifies navigating. (Though I also use search on the comments.)

If there's a place to put an example and some very basic howto guff -
enough for someone to get started, then I could clean up what I have,
and put together a little bit of intro text. (There'd need to be some
explanation of the way I chain and abut walls of differing rotation to
build rooms and dividers.)

After that, the seed can be grown into anything you care to program.

Erik



  1   2   >