Re: NOW what?

2010-02-16 Thread Gary Kline
On Tue, Feb 16, 2010 at 11:32:29AM +0900, Byung-Hee HWANG wrote:
 Gary Kline kl...@thought.org writes:
 
  [...]
  If you look is /usr/ports/audio you will find the festival
  ports.  
2 drwxr-xr-x  3 root  wheel512 Jan 25 20:13 festival
2 drwxr-xr-x  2 root  wheel512 Jan 27 03:07 festival-freebsoft-utils
 2 drwxr-xr-x  2 root  wheel512 Apr  8  2009 festlex-cmu
 
  are some of them.  When you use the Konqueror browser and
  have festival correctly installed, you can mouse-swipe a
  bunch of text and click on the Tools drop-down and have the
  text read aloud to you.
 
  It is fairly difficult to get a computer produce human
  speech.  I found out just some of the problems recently when
  I began looking at some of the code.  Much of festival is
  written in C++; that I understand somewhat.  Other parts are
  written in some kind of LISP; I do not understand LISP very
  well. 
 
 LISP is from Tao. That's why it is not easy to people. 
 
Anyway, the point here is that when I find a long,
  long essay on some philosopher and have to read it, having is
  spoken to me is *MUCH* easier than making my eyes struggle
  thru the essay.  
 
  So far, there are plug-ins to firefox-3 that attempt to read
  text to you, but nothing I can get to work.  Gnome probably
  does have speech apps by now, but they probably rely on
  festival as a back-end.
 
 Well i cannot produce the problem on my desktop -- FreeBSD
 8.0-RELEASE. And for now, actually i can't launch firefox because my
 memory is so low (256M). Instead i use epiphany, which play well under
 low memory system. Then your -RELEASE version and default GUI
 environment(eg., KDE, GNOME)? 
 
 Or i'd like to say that you should take to report as bug by send-pr. 
  


My environment is primarily KDE, with some Gnome apps.  I'm
running 7.1 right now but will soon upgrade to 7.3.  It is
not a bug that Konqueror is the only browser to offer the
festival speech uyilities;  but it would be nice if other
browsers had the same option.

gary


 Sincerely,
 
 -- 
 ? ?(?) | .. ?? 15??..
 
 My voice is out of shape. And honestly, I'm sick of hearing myself sing.
   -- Johnny Fontane, Chapter 12, page 155
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
http://jottings.thought.org   http://transfinite.thought.org
The 7.79a release of Jottings: http://jottings.thought.org/index.php

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: NOW what?

2010-02-15 Thread Gary Kline
On Mon, Feb 15, 2010 at 07:34:45AM +0900, Byung-Hee HWANG wrote:
 Gary Kline kl...@thought.org writes:
 
  On Sat, Feb 13, 2010 at 04:38:54AM +0900, Byung-Hee HWANG wrote:
  Gary Kline kl...@thought.org writes:
  
   On Fri, Feb 12, 2010 at 10:10:38AM -0800, Gary Kline wrote:
   [... long line snip ...]
I just tried again and now Konq did send me to the hyperlink...
Was i hallucinating? dunno
  
  Hi Gary, how about GNOME's epiphany? Recently i settled down at
  epiphany for web work. That looks good to me.
  
 
 
  I like epiphany more and more; the thing it lacks, and the Only
  reason I  use Konq is that it lets me use the festival
  text-to-speech apps.  
 
  If *anybody* knows of any other browser that can be set to have
  festival stuff work, please, Pulsseeze let me know:)
 
 Gary, what is festival text-to-speech apps? Can you please tell me what
 that is? in detail... If i have good idea, i can give you some
 information -- maybe there is some apps you want for in GNOME
 packages. 


If you look is /usr/ports/audio you will find the festival
ports.  
  2 drwxr-xr-x  3 root  wheel512 Jan 25 20:13 festival
  2 drwxr-xr-x  2 root  wheel512 Jan 27 03:07 festival-freebsoft-utils
   2 drwxr-xr-x  2 root  wheel512 Apr  8  2009 festlex-cmu

are some of them.  When you use the Konqueror browser and
have festival correctly installed, you can mouse-swipe a
bunch of text and click on the Tools drop-down and have the
text read aloud to you.

It is fairly difficult to get a computer produce human
speech.  I found out just some of the problems recently when
I began looking at some of the code.  Much of festival is
written in C++; that I understand somewhat.  Other parts are
written in some kind of LISP; I do not understand LISP very
well.  Anyway, the point here is that when I find a long,
long essay on some philosopher and have to read it, having is
spoken to me is *MUCH* easier than making my eyes struggle
thru the essay.  

So far, there are plug-ins to firefox-3 that attempt to read
text to you, but nothing I can get to work.  Gnome probably
does have speech apps by now, but they probably rely on
festival as a back-end.



 
 Ah and I'm not sure my word is correct english. 

My friend, your English is just fine.  I am, sadly, still
mono-lingual.  I am still trying to learn *French* that I
took in high school.  (*sigh*)


 If i speak wrong
 english, you have to communicate mind to mind without appeared
 word. 

Ha!  Yes, that would be nice, even if it required something
you had to wear on your head, :-)Well, maybe in a few
hundred years.

 Plus Gary you study Korean. Korean is easy to study ^^; 
 

Sure it's easy; so is climbing a sheer cliff face!  I think
anybody who can understand English as well as their native
language[s], is absolutely outstanding.   Congrats.

later on,

gary


 Sincerely,
 
 -- 
 ? (Hwang, Byung-Hee), KOREA
 
 Get in the car. If I wanted to kill you you'd be dead now. Trust me.
   -- Virgil Sollozzo, Chapter 2, page 77

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
http://jottings.thought.org   http://transfinite.thought.org
The 7.79a release of Jottings: http://jottings.thought.org/index.php

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: NOW what?

2010-02-15 Thread Byung-Hee HWANG
Gary Kline kl...@thought.org writes:

 [...]
   If you look is /usr/ports/audio you will find the festival
   ports.  
   2 drwxr-xr-x  3 root  wheel512 Jan 25 20:13 festival
   2 drwxr-xr-x  2 root  wheel512 Jan 27 03:07 festival-freebsoft-utils
2 drwxr-xr-x  2 root  wheel512 Apr  8  2009 festlex-cmu

   are some of them.  When you use the Konqueror browser and
   have festival correctly installed, you can mouse-swipe a
   bunch of text and click on the Tools drop-down and have the
   text read aloud to you.

   It is fairly difficult to get a computer produce human
   speech.  I found out just some of the problems recently when
   I began looking at some of the code.  Much of festival is
   written in C++; that I understand somewhat.  Other parts are
   written in some kind of LISP; I do not understand LISP very
   well. 

LISP is from Tao. That's why it is not easy to people. 

   Anyway, the point here is that when I find a long,
   long essay on some philosopher and have to read it, having is
   spoken to me is *MUCH* easier than making my eyes struggle
   thru the essay.  

   So far, there are plug-ins to firefox-3 that attempt to read
   text to you, but nothing I can get to work.  Gnome probably
   does have speech apps by now, but they probably rely on
   festival as a back-end.

Well i cannot produce the problem on my desktop -- FreeBSD
8.0-RELEASE. And for now, actually i can't launch firefox because my
memory is so low (256M). Instead i use epiphany, which play well under
low memory system. Then your -RELEASE version and default GUI
environment(eg., KDE, GNOME)? 

Or i'd like to say that you should take to report as bug by send-pr. 
 
Sincerely,

-- 
소여물 황병희(黃炳熙) | .. 출항 15분전..

My voice is out of shape. And honestly, I'm sick of hearing myself sing.
-- Johnny Fontane, Chapter 12, page 155
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: NOW what?

2010-02-14 Thread Byung-Hee HWANG
Gary Kline kl...@thought.org writes:

 On Sat, Feb 13, 2010 at 04:38:54AM +0900, Byung-Hee HWANG wrote:
 Gary Kline kl...@thought.org writes:
 
  On Fri, Feb 12, 2010 at 10:10:38AM -0800, Gary Kline wrote:
  [... long line snip ...]
 I just tried again and now Konq did send me to the hyperlink...
 Was i hallucinating? dunno
 
 Hi Gary, how about GNOME's epiphany? Recently i settled down at
 epiphany for web work. That looks good to me.
 


   I like epiphany more and more; the thing it lacks, and the Only
   reason I  use Konq is that it lets me use the festival
   text-to-speech apps.  

   If *anybody* knows of any other browser that can be set to have
   festival stuff work, please, Pulsseeze let me know:)

Gary, what is festival text-to-speech apps? Can you please tell me what
that is? in detail... If i have good idea, i can give you some
information -- maybe there is some apps you want for in GNOME
packages. 

Ah and i'm not sure my word is correct english. If i speak wrong
english, you have to communicate mind to mind without appeared
word. Plus Gary you study Korean. Korean is easy to study ^^; 

Sincerely,

-- 
황병희 (Hwang, Byung-Hee), KOREA

Get in the car. If I wanted to kill you you'd be dead now. Trust me.
-- Virgil Sollozzo, Chapter 2, page 77
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: NOW what?

2010-02-13 Thread Gary Kline
On Sat, Feb 13, 2010 at 04:38:54AM +0900, Byung-Hee HWANG wrote:
 Gary Kline kl...@thought.org writes:
 
  On Fri, Feb 12, 2010 at 10:10:38AM -0800, Gary Kline wrote:
  [... long line snip ...]
  I just tried again and now Konq did send me to the hyperlink...
  Was i hallucinating? dunno
 
 Hi Gary, how about GNOME's epiphany? Recently i settled down at
 epiphany for web work. That looks good to me.
 


I like epiphany more and more; the thing it lacks, and the Only
reason I  use Konq is that it lets me use the festival
text-to-speech apps.  

If *anybody* knows of any other browser that can be set to have
festival stuff work, please, Pulsseeze let me know:)

gary



 Sincerely,
 
 -- 
 We'll meet him later.
   -- Michael Corleone, Chapter 1, page 42

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
http://jottings.thought.org   http://transfinite.thought.org
The 7.79a release of Jottings: http://jottings.thought.org/index.php

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: NOW what?

2010-02-12 Thread Gary Kline
On Fri, Feb 12, 2010 at 10:10:38AM -0800, Gary Kline wrote:
 
 Guys,
 
 this has happened once before with kde Konqueror; but i can't remember
 where/what i clicked.  maybe somebody onlist can help me.   When i click on
 a link on Konq, a popup / dialog displays asking where i want to save the
 link; it =does not= move me to the linked page.  --there are some links i
 want to save but i chose those links, rarely, from the Location menu.
 
 i just clicked on the Location - Open with firefox3  dropdown.  On FF, I
 can click on various links and actually go there.  {{ sometimes a reboot
 fixes this save-page problem; not this time. }}
 
 anybody?
 
 gary
 
 


I just tried again and now Konq did send me to the hyperlink...
Was i hallucinating? dunno

-g

 
 -- 
  Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
 http://jottings.thought.org   http://transfinite.thought.org
 The 7.79a release of Jottings: http://jottings.thought.org/index.php
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
http://jottings.thought.org   http://transfinite.thought.org
The 7.79a release of Jottings: http://jottings.thought.org/index.php

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: NOW what?

2010-02-12 Thread Byung-Hee HWANG
Gary Kline kl...@thought.org writes:

 On Fri, Feb 12, 2010 at 10:10:38AM -0800, Gary Kline wrote:
 [... long line snip ...]
   I just tried again and now Konq did send me to the hyperlink...
   Was i hallucinating? dunno

Hi Gary, how about GNOME's epiphany? Recently i settled down at
epiphany for web work. That looks good to me.

Sincerely,

-- 
We'll meet him later.
-- Michael Corleone, Chapter 1, page 42
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: NOW what?

2009-12-31 Thread Jon Radel


Gary Kline wrote:


	My new server is back out of harm's way, but now, upon reboot, no mail.  I have 
	tail -f maillog and get Domain not found


	Yes, i did edit my DNS files, but I think i have a backup.  Can anybody clue me 
	in so i don't do this by mistake again?  thanks.





Are we talking about ethic.thought.org?  (Personally I think it's a bit 
arrogant of you to assume we all remember the details of your network 
from week to week, but I'm a grouch, and other's mileage almost 
certainly varies.)


Is your mail server on ethic.thought.org?  If so, you're probably just 
running into a race condition, given that your *only* nameserver for 
thought.org is also on ethic.  Or at least your only announced 
nameserver.  In other words, your mailserver is quite possibly starting 
up, attempting a dns lookup and timing out, all before your nameserver 
is up and running.


What happens if you restart just your mailserver at this time?

If that doesn't resolve the matter, give us some details about where 
your nameserver and mailserver live, and give us the contents of 
/etc/resolv.conf on the mailserver, and tell us for which e-mail 
addresses e-mail isn't flowing.


--Jon Radel
j...@radel.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: NOW what?

2009-12-31 Thread Gary Kline
On Thu, Dec 31, 2009 at 11:10:15AM -0800, Jon Radel wrote:
 
 Gary Kline wrote:
 
  My new server is back out of harm's way, but now, upon reboot, no 
  mail.  I have tail -f maillog and get Domain not found
 
  Yes, i did edit my DNS files, but I think i have a backup.  Can 
  anybody clue me in so i don't do this by mistake again?  thanks.
 
 
 
 Are we talking about ethic.thought.org?  (Personally I think it's a bit 
 arrogant of you to assume we all remember the details of your network 
 from week to week, but I'm a grouch, and other's mileage almost 
 certainly varies.)
 
 Is your mail server on ethic.thought.org?  If so, you're probably just 
 running into a race condition, given that your *only* nameserver for 
 thought.org is also on ethic.  Or at least your only announced 
 nameserver.  In other words, your mailserver is quite possibly starting 
 up, attempting a dns lookup and timing out, all before your nameserver 
 is up and running.
 
 What happens if you restart just your mailserver at this time?
 
 If that doesn't resolve the matter, give us some details about where 
 your nameserver and mailserver live, and give us the contents of 
 /etc/resolv.conf on the mailserver, and tell us for which e-mail 
 addresses e-mail isn't flowing.
 
 --Jon Radel
 j...@radel.com
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Well, apologies all around, more or less.  To resolve my DNS problems 
I just copied over my backup SAVED/db.thought.org to my newer, broken 
copy, updated the Serail njmber, and restarted things.

It was a good lesson that I should NOT have ever dared to mess
around with IPv6 ... but I did.  And yup, after moving the server
everything restarted.  And that v6 stuff busted things.

[ten mins later with coffee kicking in]:: a question on the
nameserver stuff: given that I have only one ISP, how could I have
another nameserver?  ethic is DNS, mail, and web.  I've got two
secondary nameservers.  One in Dallas, a second in England.  

I did restart dovecot last night; it didn't help.  


p0 11:44 ethic [1031] cat resolv.conf
domain  thought.org
nameserver  10.47.0.230

What I really think broke things was to have left the  addr rec
in their blindly.  :


NS  ns1.thought.org.
@   IN   2002:d1b4:d5d2::






-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
http://jottings.thought.org   http://transfinite.thought.org
The 7.79a release of Jottings: http://jottings.thought.org/index.php

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: NOW what?

2009-12-31 Thread Jon Radel


Gary Kline wrote:



It was a good lesson that I should NOT have ever dared to mess
around with IPv6 ... but I did.  And yup, after moving the server
everything restarted.  And that v6 stuff busted things.


H...yes, putting IPv6 addresses into your DNS w/o your IPv6 network 
actually working does tend to break things all over the place.


You really need a test server to play with rather than subjecting your 
main [only] server to these experiments.  ;-)





[ten mins later with coffee kicking in]:: a question on the
nameserver stuff: given that I have only one ISP, how could I have
another nameserver?  ethic is DNS, mail, and web.  I've got two
	secondary nameservers.  One in Dallas, a second in England.  


Wellwhich is it?  One or three nameservers

I find it helps to think of nameservers as being of two types:

1)  Resolving nameservers

These are the servers that *your* machines use to look up addresses, 
both your own and things like www.google.com.  You can use your own 
server.  Your ISP would also have one or more available for customer 
use.  I'd suggest using a list of servers rather than just one.  This 
list is what you'd set up in /etc/resolv.conf.


2)  Authoritative nameservers

These are the servers that tell everyone about thought.org (in your 
case).  You say that you have one on ethic.thought.org and 2 secondaries 
in Dallas and England.  However, given that neither your parent servers 
nor your own zone file as found on ethic mention those two other 
servers, it's very unlikely that they're doing you any good at all. 
(There are advanced scenarios where hidden secondaries are useful, but 
I don't think any of them apply to your network.)


BTW, a single install of a name server on a single machine is perfectly 
capable of acting as both a resolving and an authoritative server, but 
it still helps, IMHO, to consider it as serving two different roles. 
(All of which leaves aside the security issues involved)


I would suggest you find out what servers your ISP makes available as 
resolving servers for customers, and use ethic followed by those servers 
in resolv.conf and other such setup.


I would suggest you find out if those secondary servers are actually 
syncing the data from ethic, and if so, list them with your domain 
registrar and in NS records in your dns zone.


With those two steps, dns as a whole will become a bit more resilient 
for you.


--Jon Radel
j...@radel.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: NOW what?

2009-12-31 Thread Gary Kline
On Thu, Dec 31, 2009 at 12:48:07PM -0800, Jon Radel wrote:
 
 Gary Kline wrote:
 
 
  It was a good lesson that I should NOT have ever dared to mess
  around with IPv6 ... but I did.  And yup, after moving the server
  everything restarted.  And that v6 stuff busted things.
 
 H...yes, putting IPv6 addresses into your DNS w/o your IPv6 network 
 actually working does tend to break things all over the place.
 
 You really need a test server to play with rather than subjecting your 
 main [only] server to these experiments.  ;-)
 


Hm.  If live 'n' learn is the best teacher, than my experiences
last night were worthy.  

 
 
  [ten mins later with coffee kicking in]:: a question on the
  nameserver stuff: given that I have only one ISP, how could I have
  another nameserver?  ethic is DNS, mail, and web.  I've got two
  secondary nameservers.  One in Dallas, a second in England.  
 
 Wellwhich is it?  One or three nameservers
 
 I find it helps to think of nameservers as being of two types:
 
 1)  Resolving nameservers
 
 These are the servers that *your* machines use to look up addresses, 
 both your own and things like www.google.com.  You can use your own 
 server.  Your ISP would also have one or more available for customer 
 use.  I'd suggest using a list of servers rather than just one.  This 
 list is what you'd set up in /etc/resolv.conf.
 
 2)  Authoritative nameservers
 
 These are the servers that tell everyone about thought.org (in your 
 case).  You say that you have one on ethic.thought.org and 2 secondaries 
 in Dallas and England.  However, given that neither your parent servers 
 nor your own zone file as found on ethic mention those two other 
 servers, it's very unlikely that they're doing you any good at all. 
 (There are advanced scenarios where hidden secondaries are useful, but 
 I don't think any of them apply to your network.)


Would it help if I send you my named.conf.  And my
master/thought.org database file...?  I don't think it would 'hurt'
to share m y configuration, but why spent the bandwidth?  From what
I See, ethic is my SOA.  Ethic is my primary [ns1.thought.org].
Steve Bertrand said that I am missing including 'thought.org' A
record from the database file.  SO I followed his example and added the

^@  IN A209.180.213.210

(along with my  address record :( )

I have left out my own A record for the time being 

Jon Horne's DFW site as well as Daniel Bye's secondary are listed in
named.conf.  Note that two years ago when everything began
collapsing--mail, and the web, this guy in Dallas came to my
rescue.  Now that I am reorganizing *again*, I would like to have
things done right.  I won't even breath on the Dell.  Actually, I
can't now that it's back in the corner!



 
 BTW, a single install of a name server on a single machine is perfectly 
 capable of acting as both a resolving and an authoritative server, but 
 it still helps, IMHO, to consider it as serving two different roles. 
 (All of which leaves aside the security issues involved)


I have my DSL thru the telco, USQuest or Quest.  I have a set of 5
IPs from them.  For some reason, Quest consider me as a business,
[???], but their service has been pretty good so far.  Having a
second line from them or another provider might make sense if I
were making money from this.  Nada.

 
 I would suggest you find out what servers your ISP makes available as 
 resolving servers for customers, and use ethic followed by those servers 
 in resolv.conf and other such setup.
 
 I would suggest you find out if those secondary servers are actually 
 syncing the data from ethic, and if so, list them with your domain 
 registrar and in NS records in your dns zone.
 
 With those two steps, dns as a whole will become a bit more resilient 
 for you.


Thanks for the advice.  I'll see if Quest says what secondaries
they have.


 
 --Jon Radel
 j...@radel.com

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
http://jottings.thought.org   http://transfinite.thought.org
The 7.79a release of Jottings: http://jottings.thought.org/index.php

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Now what would you expect this to print out?

2008-05-21 Thread Jonathan McKeown
On Tuesday 20 May 2008 16:44, RW wrote:
 On Tue, 20 May 2008 11:33:50 +0200

 Jonathan McKeown [EMAIL PROTECTED] wrote:
  On Tuesday 20 May 2008 02:41, RW wrote:
   On Mon, 19 May 2008 21:46:03 +1200
  
   Jonathan Chen [EMAIL PROTECTED] wrote:
find /usr/src \( -name Makefile -or -name '*.mk' \) -print
  
   Why does that make a difference, when print always evaluates to
   true?
  
   x AND true   =   x
  
   so
  
   (a OR b) AND true   =   a OR b
a OR (b AND true)  =   a OR b
 
  It makes a difference (as in programming) because -print is used for
  its side-effect rather than its value, and the binding order
  influences when the side-effect happens.

 That's still a bit counter-intuitive because in normal programming
 languages the binding order modifies side-effects via the evaluation
 order. And in both cases the evaluation order would be expected to be
 left-to-right, with -print running last.

Yes. I'm actually talking rubbish. find evaluates its argument expression 
left-to-right, and the ``precedence'' actually applies to term grouping 
rather than evaluation order. (This does affect the outcome, but not in the 
way I glibly said it did).

What I should have said is that like a lot of programming languages, find is 
lazy when it comes to Boolean expressions: when it gets a TRUE in an -or or a 
FALSE in an -and, the value of the whole expression must be TRUE or FALSE 
respectively, regardless of what the remaining terms are, so why bother 
evaluating them? (It's usually referred to as short-circuiting).

 I guess what you are saying is that the side-effect of print is based-on
 a Boolean running-value. And without the brackets, the first test  has
 been evaluated, but not yet ORed into that running-value, by the time
 that print runs.

That's not quite how it works. Rewriting

find /usr/src -name Makefile -or -name '*.mk' -print

using extra parens to emphasise the implicit grouping, and including the 
implicit -and, gives:

find /usr/src -name Makefile -or \( -name '*.mk' -and -print \)

in other words, an -or with two terms, one of which happens to be an 
expression.

If -name Makefile is true, the -or is satisfied, so nothing else is evaluated, 
and find goes on to the next filename.

Otherwise, the expression in the second term has to be evaluated. If -name 
'*.mk' is false, the -and is satisfied (which also satisfies the -or) and 
find moves to the next filename. If it's true, the -and can't be satisfied 
without evaluating the -print. The end result is that only files matching 
'*.mk' are printed.

Rewriting the other case,

find /usr/src \( -name Makefile -or -name '*.mk' \) -and -print

If the first expression is false, the -and is satisfied and the -print is not 
evaluated. If the first expression is true (meaning either of the -name 
arguments is true), then the -and can't be satisfied without evaluating the 
-print.

The last case is

find /usr/src -name Makefile -or -name '*.mk'

find quickly analyses this, finds no output action, and converts it to the 
second form above, internally placing parens around the whole expression and 
an -and -print after it.

Jonathan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Now what would you expect this to print out?

2008-05-20 Thread Jonathan McKeown
On Tuesday 20 May 2008 02:41, RW wrote:
 On Mon, 19 May 2008 21:46:03 +1200

 Jonathan Chen [EMAIL PROTECTED] wrote:
  On Mon, May 19, 2008 at 01:49:35AM -0700, Garrett Cooper wrote:
   Riddle for the day for folks that have source trees... what would
   you expect this to print out (ask yourself the question and then
   execute the command)?
  
find /usr/src -name Makefile -or -name '*.mk' -print
  
   The expected output and what actual output differed in my mind, but
   maybe somebody else can shed some light on the logic behind what
   happened
 
  It's a problem that catches many young players with find(1). One has
  to remember from reading the man-page that all directives have an
  implicit AND operator on it; and that includes the -print directive.
  So to get what you want, you have to introduce brackets:
 
  find /usr/src \( -name Makefile -or -name '*.mk' \) -print

 Why does that make a difference, when print always evaluates to true?

 x AND true   =   x

 so

 (a OR b) AND true   =   a OR b
  a OR (b AND true)  =   a OR b

It makes a difference (as in programming) because -print is used for its 
side-effect rather than its value, and the binding order influences when the 
side-effect happens.

Jonathan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Now what would you expect this to print out?

2008-05-20 Thread RW
On Tue, 20 May 2008 11:33:50 +0200
Jonathan McKeown [EMAIL PROTECTED] wrote:

 On Tuesday 20 May 2008 02:41, RW wrote:
  On Mon, 19 May 2008 21:46:03 +1200
 
  Jonathan Chen [EMAIL PROTECTED] wrote:

   find /usr/src \( -name Makefile -or -name '*.mk' \) -print
 
  Why does that make a difference, when print always evaluates to
  true?
 
  x AND true   =   x
 
  so
 
  (a OR b) AND true   =   a OR b
   a OR (b AND true)  =   a OR b
 
 It makes a difference (as in programming) because -print is used for
 its side-effect rather than its value, and the binding order
 influences when the side-effect happens.

That's still a bit counter-intuitive because in normal programming
languages the binding order modifies side-effects via the evaluation
order. And in both cases the evaluation order would be expected to be
left-to-right, with -print running last.

I guess what you are saying is that the side-effect of print is based-on
a Boolean running-value. And without the brackets, the first test  has
been evaluated, but not yet ORed into that running-value, by the time
that print runs.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Now what would you expect this to print out?

2008-05-19 Thread Jonathan Chen
On Mon, May 19, 2008 at 01:49:35AM -0700, Garrett Cooper wrote:
 Riddle for the day for folks that have source trees... what would you expect
 this to print out (ask yourself the question and then execute the command)?
 
  find /usr/src -name Makefile -or -name '*.mk' -print
 
 The expected output and what actual output differed in my mind, but maybe
 somebody else can shed some light on the logic behind what happened

It's a problem that catches many young players with find(1). One has
to remember from reading the man-page that all directives have an
implicit AND operator on it; and that includes the -print directive.
So to get what you want, you have to introduce brackets:

find /usr/src \( -name Makefile -or -name '*.mk' \) -print

Cheers.
-- 
Jonathan Chen [EMAIL PROTECTED]
--
  If you're right 90% of the time, why quibble about the remaining 3%?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Now what would you expect this to print out?

2008-05-19 Thread Sébastien Morand
 Riddle for the day for folks that have source trees... what would you expect
 this to print out (ask yourself the question and then execute the command)?

 find /usr/src -name Makefile -or -name '*.mk' -print

 The expected output and what actual output differed in my mind, but maybe
 somebody else can shed some light on the logic behind what happened [I
 read through the find(1) code and can see why it does what it does, but I
 still don't find the result useful].

Looks like you wanted to do this:

find /usr/src \( -name Makefile -o -name '*.mk' \) -print

Implicit operator is and (-a) and is arithmetic, and is equivalent to
multiplication, or is equivalent to addition ... so and as the
priority.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Now what would you expect this to print out?

2008-05-19 Thread Jonathan McKeown
On Monday 19 May 2008 11:46, Jonathan Chen wrote:
 On Mon, May 19, 2008 at 01:49:35AM -0700, Garrett Cooper wrote:
  Riddle for the day for folks that have source trees... what would you
  expect this to print out (ask yourself the question and then execute the
  command)?
 
   find /usr/src -name Makefile -or -name '*.mk' -print
 
  The expected output and what actual output differed in my mind, but maybe
  somebody else can shed some light on the logic behind what happened

 It's a problem that catches many young players with find(1). One has
 to remember from reading the man-page that all directives have an
 implicit AND operator on it; and that includes the -print directive.
 So to get what you want, you have to introduce brackets:

 find /usr/src \( -name Makefile -or -name '*.mk' \) -print

Or, slightly bizarrely, just leave the -print off altogether - as the manpage 
says,

If none of -exec, -ls, -print0, or -ok is specified, the given
expression shall be effectively replaced by ( given expression ) -print.

[Note the parens around given expression]

I forget where I saw this quote first, but the last five words always make me 
think of the find command:

Real Programmers consider what you see is what you get to be just as
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a you asked for it, you got it text editor - complicated, cryptic,
powerful, unforgiving, dangerous.

Jonathan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Now what would you expect this to print out?

2008-05-19 Thread RW
On Mon, 19 May 2008 21:46:03 +1200
Jonathan Chen [EMAIL PROTECTED] wrote:

 On Mon, May 19, 2008 at 01:49:35AM -0700, Garrett Cooper wrote:
  Riddle for the day for folks that have source trees... what would
  you expect this to print out (ask yourself the question and then
  execute the command)?
  
   find /usr/src -name Makefile -or -name '*.mk' -print
  
  The expected output and what actual output differed in my mind, but
  maybe somebody else can shed some light on the logic behind what
  happened
 
 It's a problem that catches many young players with find(1). One has
 to remember from reading the man-page that all directives have an
 implicit AND operator on it; and that includes the -print directive.
 So to get what you want, you have to introduce brackets:
 
 find /usr/src \( -name Makefile -or -name '*.mk' \) -print
 

Why does that make a difference, when print always evaluates to true?

x AND true   =   x

so 

(a OR b) AND true   =   a OR b 
 a OR (b AND true)  =   a OR b
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Now what would you expect this to print out?

2008-05-19 Thread Giorgos Keramidas
On Mon, 19 May 2008 12:40:46 +0200, Jonathan McKeown [EMAIL PROTECTED] wrote:
 I forget where I saw this quote first, but the last five words always
 make me think of the find command:

 Real Programmers consider what you see is what you get to be just as
 bad a concept in Text Editors as it is in women. No, the Real Programmer
 wants a you asked for it, you got it text editor - complicated, cryptic,
 powerful, unforgiving, dangerous.

The page at http://www.pbm.com/~lindahl/real.programmers.html suggests
that this quote is from ``A letter to the editor of Datamation, volume
29 number 7, July 1983.''  The author of that page writes ``I've long
ago lost my dog-eared photocopy, but I believe this was written (and is
copyright) by Ed Post, Tektronix, Wilsonville OR USA,'' so it may be a
bit tricky to verify the claim.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]