Re: [vox-tech] Postfix question: restricting domains
Wes Hardaker wrote: RSC == Richard S Crawford [EMAIL PROTECTED] writes: RSC Is there a quick and dirty way of configuring PostFix so that it can only RSC deliver mail to addresses within a particular domain? Our system has a RSC number of email addresses in our database, but I don't want mail going to RSC any but those from a particular domain. You might be able to use a transport map to route only stuff you want to the right places, and to map everything else to, um, /dev/null? It wouldn't be particularly great for an MTA that knows it's not going to handle delivery to emit 200 OK messages. -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] bash scripting question
Cylar Z wrote: Hey programming gurus... I want to write a script which takes a block of text and extracts any numbers which match a 123.456.789.012 pattern. I am not looking for any numbers in particular (so I don't think the grep command will be of much help) but rather, any set of numbers that looks like an IP address. Why /not/ grep? egrep -o '\[0-9]{1,3}(\.[0-9]{1,3}){3}\' does a decent job, though it will match invalid components like your 456 or 789 above. A more thorough regex could be constructed to match exactly 0-255, but it's somewhat painful. -- HTH, Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] location of DBL_EPSILON definition
On Fri, 2007-01-26 at 08:24 -0500, Peter Jay Salzman wrote: Where is DBL_EPSILON defined? I thought it was in float.h. But I've looked at float.h in: /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/include /usr/lib/gcc/i486-linux-gnu/3.4.6/include and neither one actually defined it. Where is the numerical value held? All you really need to worry about is that it gets defined when you #include float.h. My float.h simply defines DBL_EPSILON to __DBL_EPSILON__. There does not appear to be an inclusion of some other file, or a definition of __DBL_EPSILON__. So the answer to your question would seem: compiler magic. :) -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] C preprocessor - soft reference?
On Thu, 2007-01-18 at 13:20 -0800, Micah Cowan wrote: #define CHECK_FOR_NULLITITY(var) \ if ( (var) == NULL ) \ { \ printf(%s is null.\n, #var); \ exit(EXIT_FAILURE); \ } Forgot to point out, that since the # stringizing operator produces a string literal, you might make things just /slightly/ more efficient by taking advantage of C's string literal concatenation: #define CHECK_FOR_NULLITITY(var) \ if ( (var) == NULL ) \ { \ puts( #var is null. ); \ exit(EXIT_FAILURE); \ } Also, in real applications you might consider printing that to stderr, since that's where most folks expect error logging to happen--and especially if you put other, legit text on stdout. In case you feel like playing around with the # operator, be aware that the stringizing operation takes place before macros within arguments are expanded recursively. So, if you were to try something like: #define MY_EXPRESSION (__foo-special_ptr) CHECK_FOR_NULLITY(MY_EXPRESSION) would print out MY_EXPRESSION is null, rather than (__foo-special_ptr) is null. To fix this, you can force the stringization to happen after the parameter has been expanded, with something like: #define DO_STR(a) #a #define CHECK_FOR_NULLITITY(var) \ ... /* use DO_STR(var) instead of #var */ ... (Oh, hey, just noticed there's too many ITs in NULLITITY :) ) This will expand out any macros in var before using it as the argument to the DO_STR() macro. -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] strerror deprecated?
On Tue, 2006-12-26 at 12:30 -0500, Peter Jay Salzman wrote: Hi all, Trying to write portable/correct code between Linux and MS Visual C++. The cl.exe compiler is telling me that strerror() is deprecated. Is that true? I never heard such a thing. Tried Googling and couldn't find any mention of strerror() being deprecated. I recently saw a similar message (for some other user: I'm not compiling on MS these days) about strncpy(). Rest assured, strerror() is not and will not be deprecated. The compiler also told me that strerror() was unsafe. After thinking about it for a second, I'm guessing it meant thread unsafe. Thread unsafe... I'm starting to think they're going to issue that warnign for anything that's actually portable and in the standard library... Lastly, the compiler told me that I should use strerror_s() which is more safe. Same for strncpy(): strncpy_s(). I looked at the prototype for this function and it requires a buffer, the buffer's length, and the errno. Passing a char * to be filled by a function when you don't know how large of a buffer that function wants hardly sounds like a good idea. Well, since you pass the buffer's length, it will probably safely truncate the message. If it was designed well enough that it works like snprintf(), you could pass it a 0 to get the size of the buffer you could pass it. How should this function be used safely? Keep allocating memory until the buffer isn't filled all the way? Sounds like I would need to write my own strerror function just to make sure the buffer is large enough. Why would a standards committee do such a thing? Oh, they wouldn't. The Standard has absolutely no concept whatever of strerror_s() (or indeed, of thread safety). It's an MS-ism. Lastly, strerror_s doesn't appear in any man pages on my Linux system. However, it does appear to be similar to strerror_r() which my man pages say is POSIX compliant (under a suitable #define). I'd forgotten about that. It seems to suffer from the same problem, though: no way to determine appropriate string buffer size. What's the quickest fastest way of using strerror_r if on Linux and strerror_s if on Windows? Are you writing a threaded program? If not, ignore Windows' broken warnings: they're completely bogus. Better yet, find a way to disable them. If you are, I'd suggest wrapping strerror() with a locking mechanism, use plain strerror() to get the static string and check its size, and proceed however you like. I'd probably use a snprintf()-style mechanism, or perhaps something more like strerrordup(). I'd start the wrapper with something other than str followed by lowercase letters, as that's reserved to the implementation. str_error_dup() would be fine, though. -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] strerror deprecated?
On Tue, 2006-12-26 at 16:46 -0500, Peter Jay Salzman wrote: For the record, strerror_r() isn't implemented in VC++, but it does appear to be a drop in replacement for strerror_s(). BTW, when you say that all the error messages are a line long, are you speaking pragmatically or from a standards view? I'm really trying to write this by the books. He's speaking pragmatically, I believe. The standards place no restraints on the size of an error string; but as a quality-of-implementation issue it'd be fairly broken to go beyond roughly that limit. I'd feel fairly safe, for instance, in using a 256-char buffer to store the result in: if it gets truncated to 255 chars, well so be it. :) -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Standards sticklership [Re: [vox-tech] Fwd: css: cell width and height]
From: Peter Salzman [EMAIL PROTECTED] I'm always amazed that I aced through a year of quantum field theory but CSS continually baffles me to no end. If I have some html tables, and set the height and width CSS property for each td element, is it guaranteed that each cell in each table will be the exact same height and width under all circumstances? If not, is there some way of saying Look here, browser. As Zeus is my witness, you will make this cell 3em by 2em no matter what! I'm pretty sure the answer is: no. I don't think there's a way to make an absolute guarantee that your size will not change. There's something you should know about CSS, too: it is a very powerful and flexible stylesheet language, but it's not quite complete, and support for it in any browser I can think of has never been, either (this includes Firefox and Opera, though AFAIK Opera is the better of the two in that regard). This and other W3C specifications insist that CSS should always be used for formatting instead of things like tables, and yet they have more or less failed to provide some of the /precise/ levels of control available via old-fashioned, reliable-but-deprecated HTML table formatting (or, in some cases, mainstream support for CSS has failed to provide the appropriate level of precise control demanded by the spec). I am ignoring the cheat of using CSS to trick the browser into thinking that a given element should be rendered as a table or table cell: that amounts to pretty much the same thing, in the end. For this reason, CSS is one of those things where it is often impossible to be both pragmatic /and/ completely correct (from a standards perspective). This actually is true of HTML itself in certain cases as well. I myself am very much a standards stickler, and tried for years to write only ever standard-conforming code (as I still pretty much continue to do with C and C++). This is not possible in many applications. So: use CSS wherever possible. It is by far the best choice, where it is reliably supported. Where you can't get CSS to do what you need it to on all of your target browsers, don't be afraid to use HTML tables or other tried-and-true tricks in defiance of W3C recommendations. Web markup and formatting technologies is one of the worst areas for trying to match up specifications with real-world implementations support :( -- Still lamenting MSIE's abysmal support for the object/ tag... Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] apache2: NameVirtualHost and VirtualHost
On Sat, 2006-11-18 at 22:05 -0800, Micah Cowan wrote: On Sun, 2006-11-19 at 00:31 -0500, Peter Jay Salzman wrote: Why is the NameVirtualHost directive necessary and how do I use it? ... I imagine one might want to add *:443 for virtual hosts on the https ports. http://httpd.apache.org/docs/2.2/vhosts/name-based.html Actually, at the start of that page, you may notice: Name-based virtual hosting cannot be used with SSL secure servers because of the nature of the SSL protocol. However: 1. It goes on to say a couple paragraphs later that if you plan to use named virtual hosts with SSL, you should add the port to the NamedVirtualHost directive (as I mentioned). 2. That phrase appears in the when to use IP vs. Named virtual hosts. Because of this, I think what is meant by the phrase is not that you /can't/ use it with SSL, but that doing so gives up the server authentication part of the security that SSL offers, leaving just the encryption benefits. -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] adding line numbers to an HTML file
On Thu, 2006-10-26 at 14:23 -0700, Dylan Beaudette wrote: Hi everyone, wondering if there is a simple way to add line numbers to every non-html tag in a webpage: here is a dirty hack that does not work very well: lynx -source http://casoilresource.lawr.ucdavis.edu/drupal/node/319/print | cat -n test.html or - if there is a way to add line numbers to non-tag data, similar to how the paste (http://rafb.net/paste/) service works. any ideas would be very helpful! The link you show doesn't seem to distinguish tag data, and it's really not clear to me exactly what you're trying to accomplish. Perhaps if you could post a short before-and-after example? Depending on what you want, Perl or Python--or possibly even just awk--should be able to meet your needs, but I can't really give you a solution until I understand the problem properly :) -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] adding line numbers to an HTML file
On Thu, 2006-10-26 at 15:13 -0700, Dylan Beaudette wrote: On Thursday 26 October 2006 14:25, Micah Cowan wrote: On Thu, 2006-10-26 at 14:23 -0700, Dylan Beaudette wrote: Hi everyone, wondering if there is a simple way to add line numbers to every non-html tag in a webpage: here is a dirty hack that does not work very well: lynx -source http://casoilresource.lawr.ucdavis.edu/drupal/node/319/print | cat -n test.html or - if there is a way to add line numbers to non-tag data, similar to how the paste (http://rafb.net/paste/) service works. any ideas would be very helpful! The link you show doesn't seem to distinguish tag data, and it's really not clear to me exactly what you're trying to accomplish. Perhaps if you could post a short before-and-after example? Depending on what you want, Perl or Python--or possibly even just awk--should be able to meet your needs, but I can't really give you a solution until I understand the problem properly :) some clarification is indeed warranted: the page in question (http://casoilresource.lawr.ucdavis.edu/drupal/node/319/print) produces printer-friendly output (simple html). I would like to add line numbers to this document so that the students in my class can easily refer to specific lines of code. In my hack posted above, i add a line number to *every* line - even html tags like head, body , etc. I would like to add line numbers to the text in-between html elements. i.e body 1 something 2 about 3 some other thing 4 here ... /body perhaps some regex-fu is required? A quick awk script I whipped up earlier when you first posted was: awk 'BEGIN{ l=1 } $1 ~ /^[^]/ { $0 = l++ $0 } { print }' Which takes its input and prepends an incrementing line number before any lines that don't start with a as their first non-space character. That's almost as stupid as cat -n, though, as it will add attributes before lines that are part of a tag spread across multiple lines, and will fail to add line numbers before lines that consist of mostly textual content (such as a line that is wrapped in a b tag). Given your specific example, I notice that most of the examples consist of lines ending in br, so for this specific case, you might use: awk 'BEGIN{ l=1 } $0 ~ /br$/ $1 ~ /^[^]/ { $0 = l++ nbsp; $0 } { print }' Which helps limit it to the lines in the examples. If you want them to reset for each example, the following might work: awk 'BEGIN{ l=1 } { if ($0 ~ /br$/ $1 ~ /^[^]/) $0 = l++ nbsp; $0; else l=1; print; }' -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Apache and group permissions
On Fri, 2006-10-06 at 13:35 -0700, Rod Roark wrote: However, as you have probably guessed, the PHP script cannot read them. If I chmod o+r /var/spool/fax/doneq/q157 then it can. If I exec the whoami command within the script it reports nobody, as expected. I did restart Apache after updating /etc/group. Try having it execute /usr/bin/groups as well. -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Apache and group permissions
On Fri, 2006-10-06 at 14:38 -0700, Rod Roark wrote: Replying to myself: On Friday 06 October 2006 13:35, Rod Roark wrote: I have a very puzzling (to me) problem. I'm working with a Mandriva box running Apache 2.0.54. It runs as user nobody with its group ID set to -1 -- i.e. httpd.conf includes: User nobody Group #-1 It turns out if I change it to Group nogroup, everything works. So is setgid(-1) supposed to disable group permissions? I have never seen that documented No, it would probably set the group id to 65535 on most systems (which is frequently called nobody). The problem is that the groups listed in /etc/group are supplementary groups, and a simple setgid or setuid don't by themselves load the supplementary group information for the new user into the kernel's process table for that process. Something else is required, but I'm not entirely sure what that something is for non-interactive scripts. -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Apache and group permissions
On Fri, 2006-10-06 at 14:47 -0700, Micah Cowan wrote: On Fri, 2006-10-06 at 14:38 -0700, Rod Roark wrote: Replying to myself: On Friday 06 October 2006 13:35, Rod Roark wrote: I have a very puzzling (to me) problem. I'm working with a Mandriva box running Apache 2.0.54. It runs as user nobody with its group ID set to -1 -- i.e. httpd.conf includes: User nobody Group #-1 It turns out if I change it to Group nogroup, everything works. So is setgid(-1) supposed to disable group permissions? I have never seen that documented No, it would probably set the group id to 65535 on most systems (which is frequently called nobody). The problem is that the groups listed in /etc/group are supplementary groups, and a simple setgid or setuid don't by themselves load the supplementary group information for the new user into the kernel's process table for that process. Something else is required, but I'm not entirely sure what that something is for non-interactive scripts. The command newgrp is used to log in as a new group. This can be used to spawn a new shell with the specified group. For instance, running a shell-script CGI program, you could probably get it to do what you want by changing the shebang line from: #!/bin/sh to: #!/usr/bin/newgrp faxgroup newgrp uses the system call setgroups() to accomplish what it needs to. I'm still not sure what the appropriate way to get this working in PHP would be, though. -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] date question
On Thu, 2006-09-28 at 08:44 -0700, jim stockford wrote: which distro and what release? $ # suggests BASH, generally sh is a link to bash, # is there a /bin/sh program for real, not just a symlink? Well, it'd be hubris to call a program simply sh, as if it were /the/ sh... but originally, sh was a program in its own right (the original Bourne shell). And while sh is almost always a link, it won't necessarily be to bash. I think most folks on this list will be surprised to learn that Ubuntu 6.10 (Edgy Eft) will have /bin/sh symlinked to /bin/dash. This has resulted in a need to fix a variety of broken Makefiles that assumed bash extensions were available in /bin/sh, but it has also made dramatic differences in boot time and other important areas. IIRC, ash was also a popular sh for some folks. And, of course, there are those that have it pointed at the Korn shell, which is, after all, a POSIX-compliant shell. -Micah -- Barracuda Networks makes the best spam firewalls and web filters. www.barracudanetworks.com ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] date question
On Thu, 2006-09-28 at 11:31 -0400, Peter Jay Salzman wrote: Oh, wait. I think I know. I already have date aliased to $ alias | grep date alias date='date +'\''%a %b %d %l:%M %p'\''' So I'll bet if I do this, it'll work: $ date +%Y date: extra operand `+%Y' Try `date --help' for more information. $ \date +%Y 2006 And when I use a fully qualified path, the shell doesn't use the alias. OK. Mystery solved. Thanks Bill! In the future, you may find type more useful than which, which will also reveal when a command you're running is a builtin, keyword (such as the time command in bash), or (as in your case) an alias. -Micah -- Barracuda Networks makes the best spam firewalls and web filters. www.barracudanetworks.com ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] GUI mail client recommendation
Peter Jay Salzman wrote: I'm very particular about the tools I use, but if there are any mutt lovers here who also use a point and click MUA, then whatever makes you happy will prolly also make me happy too. Currently, Thunderbird does not make me happy. I'm planning on switching to something else (unknown as yet: hence I too am keenly interested in how this thread turns out). -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] GUI mail client recommendation
Peter Jay Salzman wrote: Micah, before I take the plunge, I need to ask because I think we have similar tastes in apps -- why doesn't Thunderbird make you happy? There have been some very annoying quirks: There have been occaisions where, for some reason, it doesn't realize that it has already fetched a shit-load of mail from the past, and redownloads it again. Maybe several times. A little more rare: I often leave my Thunderbird going for a couple weeks, without shutting it down. Every once in a while, it silently stops fetching my mail, and I don't realize that I'm not receiving things that have been sent to me. There's also the dumbed-down configuration. One thing that is nice, though, is that I can configure it to share the same mailboxes between Windows and Linux. Perhaps I will try Kmail next, but I think I may go back to mutt as my main e-mail client: I never had any problems with it; it always did what I wanted. It'll be a little clunky to use it in reading HTML messages, but oh well. -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] GUI mail client recommendation
Troy Arnold wrote: At one time I played around a lot with Sylpheed. I liked it. It is highly customizable and fast, but the killer feature for me (at the time I was coding something that parsed and processed email attachments) was that it would let me easily resend/edit a message, attachments and all. It didn't work for me as an everyday MUA because it really only got along well with MH mail folders and that didn't play well with mutt. Thunderbird supports this as well. And I do very much like the fact that it uses UNIX mailbox files. -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] GUI mail client recommendation
Troy Arnold wrote: On Tue, Apr 26, 2005 at 10:12:20AM -0700, Micah Cowan wrote: Perhaps I will try Kmail next, but I think I may go back to mutt as my main e-mail client: I never had any problems with it; it always did what I wanted. It'll be a little clunky to use it in reading HTML messages, but oh well. I stuck this in my .mailcap: text/html ; lynx -dump -force_html %s ; copiousoutput Yes, but I think I'm wanting to see images sometimes (for example, from ThinkGeek or Amazon mails). So I'll probably use Mozilla instead. -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] vnc terminal only
tech_dev(Alex Mandel) wrote: Well I was hopeful the solution made sense, but not quite. Now instead of a greenish background and a terminal window I can move, I have a grey background and the terminal window is stuck. Here's what I've got: #!/bin/sh xrdb $HOME/.Xresources xsetroot -solid grey x-terminal-emulator -geometry 80x24+10+10 -ls -title $VNCDESKTOP Desktop startgnome #x-window-manager I commented out the x-window part and added the startgnome. Next I tried to comment out the x-terminal part. Then I uncommented the x-window-manager and put it before the startgnome. No luck and more ideas? It appears to me that this script above is /not/ being executed... You might verify this by toying with the -geometry of x-terminal-emulator, and verifying whether or not it moves. -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Self-replacing license [was Urgent news: Linux may be relicensed]
Rick Moen wrote: It's their interpretation of a specific sentence in 17 USC 201 that I find extremely questionable. My point was that it _is_ the way copyright law is applied, as a result of a couple of hundred years of caselaw. Now, I'm sorry if that differs from what a lot of programmers assumed to be the case, but it's nonetheless true. Can you cite specific examples? That's kind of what I was complaining that she didn't do. It seems very strongly to go against what the actual text of the law says. -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Self-replacing license [was Urgent news: Linux may be relicensed]
Rick Moen wrote: Quoting Bill Kendrick ([EMAIL PROTECTED]): What I THINK Micah is saying... or, at least, the concern I can think of having, as a developer of GPL software, is if I create something under GPL 2 with the or later clause, get dozens of contributions by others, and then GPL 3 comes out and I don't like it, I would imagine that I'd have to ask all of the other contributors[*] for permission to strike the or later clause in any subsequent releases/updates. Yup, that's what I'm saying. 1. Even aside from the broad rights one would have as the developer of a collective work, you could just drop the or later clause as to your portion of the code. But only to your own. 2. But as the Licensing HOWTO points out, the common assumption that such a developer must secure everyone else's permission as a matter of law (as opposed to courtesy and tradition) is incorrect. Again, I feel the HOWTO (rather, DRAFT HOWTO) is wrong. The text of the actual law they specifically cite is rather explicit that you receive only rights over your own contribution to the work, in the absense of any explicit assignments. I'm not sure how they read whatever they read into it, and if it's case law, then I'd like to see some references to decisions to that effect. Obviously, she's a lawyer, and I'm not: but I would like a little more backup than because I say so. -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Self-replacing license [was Urgent news: Linux may be relicensed]
Rick Moen wrote: Excuse me, but that's not what the clause in question says: In the absence of an express transfer of the copyright or of any rights under it, the owner of copyright in the collective work is presumed to have acquired only the privilege of reproducing and distributing the contribution as part of that particular collective work, any revision of that collective work, and any later collective work in the same series. Holder of the collective-work copyright implicitly acquires a privilege of reproducing and distributing. Any change in terms for the collective work used for such reproduction and distribution that doesn't injure (in a legal sense) the interests of contributors would not create any actionable tort. Of course, it might be rude and unwise, but that's different from being a tort. Complications arise if contributors have explicit copyright / licence statements of their own -- and nobody's going to be able to successfully sue without registering his/her copyright claim (which hardly anyone does). Umm, right, sorry. Thanks for the correction: must've had a brain fart. ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Urgent news: Linux may be relicensed
Bob Scofield wrote: I can't find anything about this on the CNN website. And judging from the two replies to this message I don't know if this is serious. It wasn't. I was almost willing to accept it at first, but even then, I knew one simple fact: no matter what Linus' intentions might be, it is legally impossible for him (or anyone else) to relicense Linux as anything other than GPL. This is because he doesn't own the Linux source code: only a small fraction of it, basically. That and the trademarked name Linux, itself. In order to change the lincese, the entire community of everyone who ever contributed source code to Linux would have to agree with the move, which is of course logistically impossible. Happy April Fool's Day! :-) -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
[vox-tech] Self-replacing license [was Urgent news: Linux may be relicensed]
Henry House wrote: Do you have a URL that you could share? The prank seems to have been taken down already. I don't think CNN ever had that prank. I think it was entirely vox-tech's, courtesy of Mr Salzman. :-) Linux is licensed under the GPL, version 2 (i.e., 2 and 2 only, not version 2 or at your option any later version as most GPL-licensed code is). This means that Linux will not migrate to GPL version 3 when it becomes available because it will not be feasible to obtain agreement from all code contributors to do so. If they had done the version 2 or at your option thing from the beginning, then they wouldn't have had to obtain agreement from other code contributors. Of course, it depends on the copyright notice for each bit of code: if there are any files that /do/ have the at your option bit, then those alone could be farmed out and used under a later GPL. As far as I'm concerned, limiting to version 2 is the best way to go. I have generally taken that approach with my own code (not that I have much to worry about), and I didn't even know until now that Linux does the same thing. The beef I have with the at your option part is that you are placing the future of your code entirely within the hands of the FSF. Now, maybe those are good hands. But theoretically, the FSF could come out with a /completely/ different, and not necessarily better, license, and call it GPL 3.0. Maybe it's suddenly not even free (not that it's likely, but who knows what RMS's successors will be like?); or maybe it tweaks the definition of free in a way I don't like. The thing is, I don't /know/ what's going to go into GPL 3, and by putting the at your option bit, I'm trusting that any changes down the road are going to be good ones. Maybe I'd feel left out if a truly amazing sucessor appeared; but right now I /know/ what the GPL 2 is, and at the moment it's a great license. Perhaps the later one will be a /terrific/ license, but that won't change the fact that, at this time, the GPL 2 was a smart way to go, and it won't negate the fact that the GPL 2 will still be a great license. Basically, I think the at your option part makes absolutely perfect sense for GNU code; and if you plan to assign your copyright to the FSF, then it makes sense to include it. For all other situations, I personally would not choose to include it. -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Self-replacing license [was Urgent news: Linux may be relicensed]
Rick Moen wrote: Quoting Micah Cowan ([EMAIL PROTECTED]): Rearranged to suit my purposes. The beef I have with the at your option part is that you are placing the future of your code entirely within the hands of the FSF. Now, maybe those are good hands. But theoretically, the FSF could come out with a /completely/ different, and not necessarily better, license, and call it GPL 3.0. Maybe it's suddenly not even free (not that it's likely, but who knows what RMS's successors will be like?); or maybe it tweaks the definition of free in a way I don't like. Then, you (the recipient) elect GPLv2. Well, yeah: as a recipient, I have no problem whatsoever with the at your option part. I will always choose whichever license gives me the most freedom, whether that's GPLv2, 3 or 27. As an /author/, I elect GPLv2 (no or later). However, there is an interesting situation: when I'm both recipient and author (as in the case of modifying-and-distributing). In this case, my somewhat tenuous understanding is that I could actually elect to limit the entire body of code to GPLv2. But as IANAL, I would not feel very confident to do this, particularly if my own contribution were slight. If they had done the version 2 or at your option thing from the beginning, then they wouldn't have had to obtain agreement from other code contributors. Of likely interest: http://www.catb.org/~esr/Licensing-HOWTO.html#id2790762 In reading that section, I've already seen what I believe to be a glaring error of legal interpretation. This paragraph in particular: A collective work is a creative work of a group of individuals who do not share a common copyright in the result. Individual portions of such a work may (and often do) have copyrights, and there may also be a collective-work copyright on the work as a whole. The difference is practically relevant because, according to 17 USC 201 the holder of the collective-work copyright is legally privileged to set the distribution terms for the package as a whole (in the statute, this expressed negatively as a statement that the collective-work copyright holder acquires only those rights). Reads a lot into 17 USC 201, more than I think is viable. I see nothing in the referenced text whatsoever that allows for the holder of the copyright on a portion of a collecive-work to set the distribution terms for the package as a whole.---especially at the only part of the section that includes the referenced words, acquires only those rights. If I believed this to be a legitimate reading, I'd be a helluva lot more scared. But I note that the document you've referred to is still in draft stage, so perhaps this position will be altered at a later date. As I've already said, IANAL, and one of the authors of the document you link to appears to be one, at any rate. But I'd at least like to see better justification for the paragraph I've quoted then I currently see in this document, or a reference to a case decision that bolsters this interpretation. (There is a case referenced a short ways down, but it's actually an unrelated point.) Regardless, it looks to be an informative document, and I'm interested in seeing how it reads in the end. Thanks for the link! -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Self-replacing license [was Urgent news: Linux may be relicensed]
Rick Moen wrote: Quoting Micah Cowan ([EMAIL PROTECTED]): As an /author/, I elect GPLv2 (no or later). As an author, you have no downside from or later if FSF issues a proprietary-leaning GPLv3, because (1) your recipients can always reject it and elect GPLv2, and (2) you would probably follow up latest release n with an n.001 that newly omitted the or later. (2) is more or less pointless, though, as the code is already available to people in GPLv3 now, until I (or others) have added sufficient code to make it less attractive to downgrade to an older version of the software. (2) is also impossible to execute if it is a collective-work, collaboratively authored by enough other people that it would be impractical to obtain their permission. This is, of course, still assuming that the paragraph I indicated earlier as being an obvious misinterpretation, is in fact what I claim it to be. I.e., obviously the threat of then forking release n-or-less under FSF's new restrictive terms isn't of concern. Less restrictive, more restrictive... licensing is a balance between restriction on the developer and restriction on the user. GPL is relatively liberating to the user, and relatively restrictive to the developer (as a consequence, not as an intention). Proprietary licenses are liberating to the developer (well, no: IP owner) and restrictive to the user. But if the GPL were to step a little further past the edge of what I deem reasonable to give up as my owner privileges, that's when the or later becomes a problem to me as an author. While I cannot imagine a specific example, I'm sure it could exist. A little more possible: it could simultaneously be both more restrictive and more liberating in separate ways... or just more different in ways that I don't condone. The bottom line is that I want the person who decides the limits of what can happen to my code to be me, and no one else. This is why I dislike using the or later. However, there is an interesting situation: when I'm both recipient and author (as in the case of modifying-and-distributing). Then, you enjoy rights over the codebase without needing to accept the licence on any instance of it in the first place. I'm having problems parsing that sentence. But certainly, I enjoy only the rights specifically granted to me by the license notice that is (hopefully) at the top of each source code file. My understanding of the or later bit is that, if it is included, I could actually remove the or later part from all of the source code, and re-release it with my changes. But I would not feel comfortable doing so, and am still not entirely certain that's legal. Reads a lot into 17 USC 201, Actually, into caselaw. Not sure what you mean here. It's their interpretation of a specific sentence in 17 USC 201 that I find extremely questionable. -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] xhost+: Why you should NEVER DO THAT
Peter Jay Salzman wrote: However, it should be pointed out that once someone gets access to your LAN, even ssh, sshd and gnupg are all suspects. I disagree. Were this the case, then you could not use ssh or sshd over the internet; or gnupg while connected to the internet. There's little difference between them. And in the specific case of using ssh for X port-forwarding on the very same machine, nothing's going over the wire anyway. Now, if someone gets remote access to your /host/, and you don't have reasonable measures in place, that's another matter. If someone gets physical access to your host in any way, of course you can't be sure of anything. But for instance: if I specifically allow someone access to my home LAN--say, a neighbor--and do not know him well enough to be sure that he wouldn't try to sniff passwords or packets, I am still very safe in using ssh, whether on one computer or between two; provided he doesn't have inappropriate access to either host. -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] linux on Mac iBook
Bill Kendrick wrote: On Fri, Mar 18, 2005 at 03:58:08AM -0800, Henry House wrote: Otherwise, Linux on a Mac is pretty much indistinguishable from Linux on any other platform. Good luck! I believe Linus has recently switched from Intel-compatible arch to PowerPC (a Mac). I think I read that in Linux Journal or on Slashdot. Or maybe I dreamt it. ;) http://linux.slashdot.org/article.pl?sid=05/03/09/1314250from=rss -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] seq command on Mac OS X
Dylan Beaudette wrote: ok... this might be a dumb question... but as my home machine is now an OS X machine, a few little things are driving me nuts... the lack of the seq command is one of those things. I have tried searching for the source code for the version that is normally found on most normal *NIX distributions, but have not been able to find anything of the sort. Would it be easier to simply re-write it in bash, or some other scripting language? if so, anyone have some ideas on said script? thanks in advance for considering this non-linux question. seq is apparently part of GNU coreutils (used to be part of shellutils): http://www.gnu.org/software/shellutils/shellutils.html http://www.gnu.org/software/coreutils/ HTH, Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Exporting displays
Mark K. Kim wrote: BTW, John, you can add a hostname after the '+' sign to allow connections only from that computer. Example: $xhost +remote_host_ip_or_name which would be the next next best thing to ssh -X and MIT magic cookie thingy. This is still fairly insecure on the internet, however, as it is vulnerable to IP and DNS spoofs. -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Spyware For Linux?
Bob Scofield wrote: A friend of mine was recently complaining that her Windows computer was too slow. She said it ran much faster after running a spyware program. I have to assume that what your friend meant was spyware-/removing/ program, and that you mis-read the UCSC quote. There is no way that running spyware can make your computer run faster. And to answer your question: no, Linux most certainly does not need spyware. One thing that I thought was pretty cool, is that Windows Updates for XP automatically checks for known spyware, and sends a fresh spyware-remover every month. Pretty neat! Of course, on Linux, I don't /need/ a spyware remover... -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Apache question: preventing direct access to files
Richard S. Crawford wrote: We've got some .pdf documents on our website that we'd rather people not view by directly typing the URL into the browser; we want them to get there via a link. My boss is convinced that we can do this using the same tricks with the .htaccess file that can be used to prevent images from being stolen. I'm not entirely sure about that. Isn't it exactly the same problem, though? In either case, you're trying to make sure that HTTP's Referer field is set. #FilesMatch \.pdf$ #SetEnvIf Referer http://152.79.198.7; local_referrer=1 #Order Allow, Deny #Deny from all #Allow from env=local_referrer #/FilesMatch The above seems right. I don't know whether there are bugs in it, or what, but that's the idea. 'Course, nothing's gonna work if it's commented out ;-) It's not foolproof: with wget, for example, you could forge a Referer field. But the chances of encountering that are pretty low; and anyway, there's not much you could do about it, short of actually authenticating the tokens. Since you seem to be using ColdFusion (evidence has been snipped), you could probably write a short wrapper that will serve up the pdf file if the person deserves it; and remove the PDF files to outside of the web docs repository. BTW, don't ColdFusion suck? :-) -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Apache question: preventing direct access to files
Richard S. Crawford wrote: Yeah. Oh, yeah. More than you can imagine. I doubt it: I've had to work with the sucker before. Had to make a living... It's great for doing really simple things. Anything beyond that, and you're better off using practically anything else. Fortunately, we're going to start transitioning over to a PHP solution starting next month (the transition will probably take over a year, but I'm really excited about it). Good for you! I don't understand how people can actually justify paying good money for ColdFusion, when PHP or mod_perl is free! But it's one of those products that look terrific and likely to save lots of development time, to managers; until someone actually tries to accomplish something with it. -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] (Moved from [vox]) Errors in software compilation
Dylan Beaudette wrote: After copying the GDAL-specific headers to /usr/include: find . -name *.h -exec cp '{}' /usr/include/ \; .. make seems to be chugging along fine... I wouldn't have recommended that. At the very least, a -i option to cp would seem appropriate, to ensure against clobbering existing files. Also, a number of those .h files may not have been intended for installation to system include directories, so you're cluttering things up in there. -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Cygwin's Identity Crisis
Richard S. Crawford wrote: I love using Cygwin; it's a great tool, since I find that manipulating files is much easier for me from the CLI than with a GUI. This morning I SSH'ed into a remote box, though, and executed Vi; instead of pulling up the editor, though, I got this message: I don't know what kind of terminal you are on - all I have is 'cygwin'. [Using open mode] I can run Vi through PuTTY on the same remote computer, but it feels inelegant to have two separate tools that can do the same thing. Is there a way to make Cygwin deliver a different terminal type, or to get the remote machine to understand Cygwin? As others have pointed out, a more permanent solution would be to add the appropriate things for terminfo. I've never had this problem, as I almost always use Cygwin via its X server, and get a much more Linux-like environment thereby. I can't really stand to use Cygwin through a Windows command window; too many key combos don't work right for me. Maybe that's fixable, but I'm more comfortable with its X environment by now. Even though my Cygwin is fairly old, and doesn't have rootless X. Or clipboard translation :-( (Need to get my Cygwin updated...) -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] inkscape
Henry House wrote: [Inkscape's] native format is a subset of SVG. [] indicates modificiation of original quote. IIRC, sodipodi, which I found out a few days ago became Inkscape(?), could read in any SVG and would preserve markup it didn't fully understand, even through modifications and changes. I'm not actually sure about that: but I do remember using it to edit some hand-written SVG into which I had placed arrow-style line-endings. Sodipodi didn't understand the arrows, but didn't mess with 'em, either. -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] EPS file size
Dylan Beaudette wrote: quick question: i have heard about possible ways to make an EPS file smaller...but I can't remember where I heard it, and how to do it. Any ideas? Well, since PostScript is a programming language, the ways of compressing an EPS program are virtually infinite; it's much like contests to fit a solution to a given problem into the smallest Perl program you can manage. I'd be happy to take a look at it and offer some small suggestions for hand-tuning, if you're interested. I won't be able to actually dig in and hand-tune it, though, unless you'd be willing to pay me. ;-) I won't be checking my e-mail over the weekend, so I'd get to looking at it on Monday. -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] PHP Question: Includes and Variables
Richard S. Crawford wrote: Here's the situation. My script, page1.php, calls a script in another directory called config.php via require_once. config.php declares several variables which should be accessible in page1.php. For example: --- http://myphpsite.net/dir1/page1.php ?php require_once(http://myphpsite.net/dir2/config.php;) echo myVariable = $myVariable-daValue; ? --- http://myphpsite.net/dir2/config.php ?php $myVariable-daValue = Hello, World; ? --- So when I execute page1.php, I should get: myVariable = Hello, World But I don't. Instead the variable is undefined. If I put the echo command inside config.php, though, it displays properly. I've confirmed that all permissions and ownerships and all that are the same, and I can't find a configuration value in php.ini which might have something to do with this. It's acting as though $myVariable is only defined within the scope of config.php, but I have no idea why that would be. It makes no sense to me at all. Any suggestions besides taking a large sledgehammer to the server? Not certain it's required, but have you ensured that allow_url_fopen is enabled in php.ini? Also, it should *not* be required, but have you tried braces? HTH, -Micah ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Four week test of Firefox versus Opera
Bill Kendrick wrote: On Tue, Feb 01, 2005 at 01:36:22PM -0600, Jay Strauss wrote: 3. Rendering is wonderful: pages render more faithfully under FF than Opera. I've been using FF for a couple of months on both M$ and Linux and unfortunately I'd have to say the rendering is not so wonderful when compared with IE (at least in my experience) for example when I look at: http://www.sheddaquarium.org/mem_individual.cfm FF smashes the ticket options together, IE has them nice and separated. Hrm, as it should. There doesn't seem to be anything in there that says there should be space after the ul.../ul list. The part of the page in question is a table, with /zero/ cellspacing or cellpadding, so it's no wonder it's pretty tight in there... The descriptions of each are within a div.../div, but the style in question (ltbluetext) simply sets color, font and font size. Nothing about spacing, margins or padding around the enclosed section of text. The lack of specification of margins does not dictate that margins should not exist. A portable HTML coder ought to have explicitly set the margin size desired, rather than rely on the existence of a default margin on div elements. My current biggest pet peeve about IE's mishandling of things would include its broken support for absolute positioning. Should be relative to the enclosing box, but instead is relative to the window coords. Awful. ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Email vs. FAX Security
Peter Jay Salzman wrote: It would seem easy for an ISP's system administrator to use the root password to read the email of the ISP's customers. ( I know I can log in as root on my Linux system and use the more command to read my downloaded email.) Does anybody here believe that ISP system administrator's ever do such a thing? Yes, but in the same kind of way that 16 year old McDonalds employees spit into the hamburgers (or worse). It's probably VERY rare. The statistics are such that it would (probably) NEVER happen to you. I doubt that it's as rare as you seem to think. In particular, I have heard enough stories of bosses reading employees' emails to believe that at least some of them must be true. Especially since a company can be held liable for sexually harassing or otherwise inappropriate comments sent over company email: it would probably be unwise /not/ to check employee e-mails. However, I think it's very unsportsmanly not to at least ensure that everyone is acutely aware of the public nature of corporate e-mail. Also, consider that mail might also be read incidentally by a sysadmin trying to trace problems with the mail service or a mildly corrupted mailbox. Or just a BOFH-style sysadmin: I suspect there are plenty with the BOFH attitude, if not the BOFH skill. Another case where I personally have read mail not intended for my eyes is when I have deemed it unacceptable to lose any mail sent to a particular domain, and have all mail not matching an actual mailbox sent to me. This helps catch misspellings and other problems, but if the mail is of a personal nature then I might rather have lost it... ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Re: vox-tech Digest, Vol 9, Issue 2
Peter Jay Salzman wrote: I forgot to list another major annoyance for me: I'm so used to emacs style editing in bash, that ctrl-u is burned into my brain as clear line. Unfortunately, it displays the page source on FF. I've clicked away more page sources than I care to admit. C-u is not an emacs thing (take it from an emacs user). It's a terminal thing. Emacs uses C-u for something *completely* different. This means you can also use it to erase your currently entered password at a login prompt, if you completely lose track of where you were. ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Re: vox-tech Digest, Vol 9, Issue 2
David Hummel wrote: On Thu, Feb 03, 2005 at 05:36:06AM -0800, Micah Cowan wrote: Daniel A. Lorca-Martinez wrote: Actually, the Mozilla Foundation folks are all fairly geeky-which explains the vi command. On the other hand, this same text search feature is available using Control-F (Or Command-F on Macs). Though that doesn't excuse the lack of documentation you mention for this particular feature... Such is not the case with the regular Mozilla browser; just Firefox AFAICT (I have just recently used the latest versions of both). What are you replying to? If it's: On the other hand, this same text search feature is available using Control-F (Or Command-F on Macs). It is. Then no, CTRL-F does indeed produce a text search box in Mozilla (1.7.3 in my case). The vi-style / find-as-you-type feature is also there. But it's not this same text search feature. Firefox has control-F mapped to a (IMO) better version of the vi-style thing. ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Re: vox-tech Digest, Vol 9, Issue 2
David Hummel wrote: On Thu, Feb 03, 2005 at 10:40:21AM -0800, Mark K. Kim wrote: On Thu, 3 Feb 2005, Micah Cowan wrote: Peter Jay Salzman wrote: I forgot to list another major annoyance for me: I'm so used to emacs style editing in bash, that ctrl-u is burned into my brain as clear line. Unfortunately, it displays the page source on FF. C-u is not an emacs thing (take it from an emacs user). It's a terminal thing. Emacs uses C-u for something *completely* different. It's a readline thing, no? Yep. readline defaults to emacs-style line editing commands, which is augmented with additional commands like C-u. From the man page: unix-line-discard (C-u) Kill backward from point to the beginning of the line. The killed text is saved on the kill-ring. It works without readline, on typical terminal default settings. Login's password prompt obviously does /not/ use readline. Nor does cat, where you can see the effects very clearly. Probably readline wants to do special handling; especially in cases where line-wrap occurs. $ stty -a speed 38400 baud; rows 24; columns 80; line = 0; intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = undef; ... The kill setting is the relevant one. ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Four week test of Firefox versus Opera
Bill Kendrick wrote: On Thu, Feb 03, 2005 at 05:15:13AM -0800, Micah Cowan wrote: My current biggest pet peeve about IE's mishandling of things would include its broken support for absolute positioning. Should be relative to the enclosing box, but instead is relative to the window coords. Awful. I'm sorry... do you mean, literally, the position of the IE window on the screen/desktop!? Is that surprising? You wouldn't want an absolute element to remain in the same place on the screen if the window itself had moved... no browser would do /true/ absolute positioning (and it would be broken from a CSS POV). Technically, I actually mean the top-left corner of the display area, since obviously expanding toolbars and whatnot should shift the entire display downwards. What I was trying to say is that CSS's idea of absolute positioning coordinates is that they are relative to the enclosing block-level element; whereas relative coordinates are relative to the location at which the element being positioned would otherwise have been placed. But IE's idea of absolute positioning is that they are always relative to the display area's top-left corner. ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Copyright and license
Rick Moen wrote: Quoting Peter Jay Salzman ([EMAIL PROTECTED]): Suppose someone writes a useful document. They put a copyright notice onto the document, but no license. They put it on the web, for free, and it stays there for years. This implies the right to download, read, and do the normal sorts of things one does with a document -- but not to redistribute or create/distribute derivative works. Note: That copyright notice has been a NOOP since adoption of the Berne Convention on Copyrights, which among other things makes copyright title vest automatically in the creator of any covered creative work, at the moment it's put in fixed form. (Arguably, a copyright notice tends to remove people's assertion of ignorance, and is a good idea on general grounds, but it no longer has legal effect, otherwise. Prior to Berne, it was possible to lose copyright title by distributing instances without notices. No longer.) I recall reading once, a very long time ago, that the inclusion of the phrase, All Rights Reserved would in certain countries (not US) provide the author with additional rights that would otherwise be forfeited. Do you know more about this? ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Copyright and license
Peter Jay Salzman wrote: Suppose someone writes a useful document. They put a copyright notice onto the document, but no license. They put it on the web, for free, and it stays there for years. At some point I download a copy of that document. The *intention* (although not explicitly stated) is for people to download the document and play around with it (the document in question is an OpenGL programming tutorial). Now suppose they decide to make money off the document, so they set up a commerce site and charge for access to that document. Am I allowed to give my copy of the document, from when it was freely available off the web, to somebody? Am I now obligated to delete the document off my hard drive? Obviously, IANAL, but... To the latter question: /no/. If it was freely given, without stipulations, you needn't worry about it. As to the former; this is a little tricky. The copy you currently own is validly yours under whatever license (explicit or implicit) through which you originally obtained it. The same thing applies to software: if someone distributes GPL code, and then at some point stops distributing it under GPL but rather through some other (proprietary, say) license: he has a right to do that. But you also continue to have the right to use, modify, sell or distribute the GPL'd version you obtained. Of course, in this case, there is no explicit license, and while it seems clear that there is an implicit license for your copy, the right to redistribute it may not have been implied. If you can hunt through archives and find reason (from the author's writings) to believe this, you may be safe. Probably the very best practice would be to obtain *explicit* permission from the author to redistribute your copy. However, note that even if he explicitly tells you to throw out your copy, I don't believe that constitutes a legal obligation to do so, given that it was given to you without stipulation or restriction. ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Copyright and license
Peter Jay Salzman wrote (in reply to Richard): Thanks for the two cents! One of the reasons why I didn't think the 2nd question was clear is because I have audio CD's that actually DO say something to the effect of this is a prerelease, and this CD must be surrendered if we ask for it. But then again, that can be considered a rudimentary license, whereas the OpenGL tutorial didn't have anything like that. I think that's exactly the case. There is an implied license in the OpenGL case. There are some things which I believe you can take as definitely implied--that is, they'd almost certainly hold up in court. I think there are other things which you might be able to support as being implied, but which might be less stable a case. ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] CVS problem: .cvsignore is being ignored
Peter Jay Salzman wrote: Hi all, I have a file: foo.tex in CVS. I want to modify foo.tex on my local hard drive, but keep the repository copy as-is. In other words, I don't want my changes to foo.tex to be added to the repository version. If I place 'foo.tex' into .cvsignore (located in the root of my checkout directory), and do a general: cvs commit isn't foo.tex supposed to be ignored by the commit command? I'm asking because it's not. :) Although 'foo.tex' is in .cvsignore, whenever I make changes to that file, cvs commit still wants to commit my changes. Using strace, I determined that CVS IS reading .cvsignore, and even reads foo.tex from that file. Yet when I do a cvs commit, it still wants to update the repository copy of foo.tex with my local modified copy. Any ideas why? Pete Isn't that why it's called .cvsignore: so CVS will ignore it? (jk) If .cvsignore is only intended to keep files out of the repository that are not already in it (this sounds possible), then it may have been a design decision (or merely an accidental consequence of the algorithm used) to pay it no heed in the updating of existing repository entries, but only in the initial commitment of new entries. I'm sure the docs must cover this somewhere. ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
[vox-tech] perl: quoting strings with spaces
Peter Jay Salzman writes: sorry for the line length. when using a quoting operator like qw and friends, how does one one quote a string with spaces? in the code snippet below, my code chokes on El Dorado. i also tried foreach my $county (qw/Amador Calaveras q+El Dorado+ Humboldt Lake Tehama Trinity/) and expected it to work, but it didn't. Lake Tehama also looks like a problem. Normally, I'd suggest doing: What about (qw/Amador Calaveras/, 'El Dorado', qw/.../) But qw doesn't really pack much punch for your case. Use just a regular list of strings? -Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
[vox-tech] FW: Your Amazon.com Inquiry
:23:19 PST 2003 Subject: Character encoding To: [EMAIL PROTECTED] , [EMAIL PROTECTED] From: [EMAIL PROTECTED] On loading a page such as: http://www.amazon.com/exec/obidos/ASIN/043935806X/ref%3Dilm%5Frc% 5F431819/10 4-9833950-7355109 Non-ASCII characters (such as the name of Mary GrandPré) are not displaying properly. The browser I was using to view it was MSIE 6.0 on Windows XP. The problem appears to be due to the fact that niether the web page nor the server are sending information about the character set in use for this web page, and MSIE assumes that UTF-8 is being used, rather than probably Windows-1252 or ISO-8859-1. A fix for this would be to cause the server to fill in information about the character encoding in the HTTP Content-Type field, e.g.: Content-Type: text/html; charset=iso-8859-1 or to replace 8-bit characters with equivalent HTML character or entity references, such as: Mary GrandPré Hope this helps, Micah Cowan ---End Message---
[vox-tech] RE: Your Amazon.com Inquiry
Trust me, it is certainly *not* a memory cache problem. It is very assuredly a server misconfiguration. Steps to fix the problem are outlined in my original email, which may be found below. Cached web pages have never been known to produce erroneous character encoding information. -Micah -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 5:10 PM To: [EMAIL PROTECTED] Subject: Your Amazon.com Inquiry Dear Micah, Greetings from Amazon.com. It sounds like you may be experiencing a memory cache problem. Most web browsers cache pages, meaning they temporarily store a local copy of every page you visit on the web. The quickest solution is a forced reload to ensure that you are looking at a fresh copy of the page, and not the version stored in your cache. A forced reload instructs your browser to bypass the cache and retrieve the page from the original server. To force reload, hold down the Shift key and click on the Reload or Refresh button in your browser. To help prevent this problem in the future, you can reset your cache size. Go to the Cache or Temporary Internet Files option on your web browser (in Netscape, go to Options and choose Network Preferences; if you use Internet Explorer, go to Tools and choose Internet Options), and make sure you have your memory cache set to 3000 kilobytes, and your disk cache set to 5000 kilobytes. You may also want to clear your cache; you can do this by following the path outlined above for resetting your cache size. By clearing your cache, you are deleting all of those files and allowing more room for new ones. I hope these suggestions help. Thanks for shopping at Amazon.com. Please let us know if this email resolved your question: If yes, click here: http://www.amazon.com/resolved-yes?comm_id=bhxu4148 If not, click here: http://www.amazon.com/resolved-no?comm_id=bhxu4148 Best regards, Vivek Dubey Amazon.com... And You're Done http://www.amazon.com == Check your order and more: http://www.amazon.com/your-account Date: Fri Jan 31 14:23:19 PST 2003 Subject: Character encoding To: [EMAIL PROTECTED] , [EMAIL PROTECTED] From: [EMAIL PROTECTED] On loading a page such as: http://www.amazon.com/exec/obidos/ASIN/043935806X/ref%3Dilm%5Frc% 5F431819/10 4-9833950-7355109 Non-ASCII characters (such as the name of Mary GrandPré) are not displaying properly. The browser I was using to view it was MSIE 6.0 on Windows XP. The problem appears to be due to the fact that niether the web page nor the server are sending information about the character set in use for this web page, and MSIE assumes that UTF-8 is being used, rather than probably Windows-1252 or ISO-8859-1. A fix for this would be to cause the server to fill in information about the character encoding in the HTTP Content-Type field, e.g.: Content-Type: text/html; charset=iso-8859-1 or to replace 8-bit characters with equivalent HTML character or entity references, such as: Mary GrandPré Hope this helps, Micah Cowan ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Question: mod_dav.1.0.3 + apache.1.3.26 and CR/LFissues w/ MacOS+MSWin
ME writes: On Fri, 5 Jul 2002, ME wrote: I did not want to have it adjust all text/* files because some (uu, hqx, etc) may be better off not modified. This allows me to specify which text/? to map over to alter. I may change to text/* over the long term, but for now, extention specific seems to work rather well 8-D q should not be there. hqx should have read hx. Really? I thought it was written, binhqx. I used to be a Mac user... (Henry'll know...) -Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Question: mod_dav.1.0.3 + apache.1.3.26 and CR/LFissues w/ MacOS+MSWin
ME writes: On Thu, 4 Jul 2002, Micah Cowan wrote: HTTP (RFC 2616) specifically excludes text/* media types from having to be in canonical form, in sect. 3.7.1. Therefore, your arguments are unfortunately incorrect; a server is 100% within its rights to send CRLF, CR or LF- terminated output (in the entity-body, that is - naturally, headers and such are CRLF terminated). Every server I've ever come across (including Apache, which I have a great deal of respect for) sends text media exactly as it finds it, which is perfectly acceptable. It is required of the client to correctly interpret any of the above as line terminators (which is why pretty much every browser will display a text URL correctly, regardless of the EOL terminator - it's required to). However, the clients described above (at least, the ones I know about) don't do any parsing or display of text at all, and so aren't beholden to recognize *any* EOLs (even though they're being incredibly stupid not to). Yeah, I included this part of the RFC in one of the earlier message in this discussion here and in the WebDAV workgroup. I don't like it that the WebDAV isn't be considered an HTTP application with local OS rewriting of line breaks for saved text files. The item of arguement used by the workgroup effectively stated that they see that rule only applying when displaying the content in the browser and there is no explicit policy on how the files should be saved. (Not my ideas on ths subject.) They're absolutely right, too - but that's no excuse. The goal of any piece of software is hopefully to be somewhat useful, and by not saving text files in an appropriate format, they're not being that. To me, it's analagous to mail clients - according to RFC822 or RFC2822, messages must be sent in canonical form; however, in practice, most mail clients are very forgiving toward other formats. Regardless of whether they accept them in canonical form, however, have you *ever* seen a mail client for UNIX that fails to save text/* messages in LF format? Not me. Same for the Mac and CR format. Because they'd be stupid to save them in any other format. Same for WebDAV clients - but apparently they haven't figured that out yet. Well, I now I have a proof of concept unweildly hack for the Apache web server with mod_dav to allow the server to deal with text files that have known text extentions. When they are puled from the server, the files are modified on the fly to meet the line breaks of the OS associated with the DAV client. When the DAV client pushes a file with same known text extentions to the server, the file is also modified to be stored in the server's line-break format. (Bi-directional linebreak conversion.) This of course does mean that the text file's content is at risk for change but only with linebreak chars (CR,LF). That reverse conversion shouldn't be necessary. But I don't count linebreak transliterations as content modifications, especially since they're probably allowed. In addition to parsing being set to use only explicitly included extention names, it also only works on clients by their offered name - so if the clients ever get fixed, the routine for this can be removed/changed and left to the client to deal with appropriately. You shouldn't use extensions at all - you should be basing it on the MIME type, no? (for receiving, that is - not sending, where the MIME type will be based on the extension anyway). -Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] html question
Jim Angstadt writes: Table rows may be grouped into a table head, table foot, and one or more table body sections, using the THEAD, TFOOT and TBODY elements, respectively. This division enables user agents to support scrolling of table bodies independently of the table head and foot. When long tables are printed, the table head and foot information may be repeated on each page that contains table data. In practice, I've not seen these used in that way. Yeah - I always thought that'd be cool; especially with very large tables. Using them could also help provide hints to audio web browsers; or audio style sheets could be specifically written to take advantage of them. -Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Question: mod_dav.1.0.3 + apache.1.3.26 and CR/LFissues w/ MacOS+MSWin
Jeff Newmiller writes: On Wed, 3 Jul 2002, ME wrote: Attempts to copy *.txt files created on the server (from scratch in emacs, or vi or jov) lead to files when copied through WebDAV MS Internet Folders to the windows desktop lead to files (when opened with notepad) that have small block chars representing the linux ^J and no line breaks for the content shown in notepad. Server issue... server should have produced CRLFs on output. snip If the 3 of the 4 can be changed, I expect the 4th can be changed. If 4 of these 4 are changed, then it can become a defacto standard, and may get added to the RFC as a should or may even if it is not a must. Now it is my turn to be confused. What are you enumerating? I was looking at inertia in code development. If you can get 75% of the market to swtch, you have more leverage to convince the last 25% to switch. (1)cadaver, (2)Goliath, (3)iDisk, (4)MS Web Folders. Getting two to switch should be possible. If either Apple or MS switch it might be easier to convince the last to switch. Yes, 1 through 3 have to change. 4 does not. snip Read Step 2 Conversion to canonical form in http://RFC.net/rfc2049.html. This is as close to MUST as I have found so far. HTTP (RFC 2616) specifically excludes text/* media types from having to be in canonical form, in sect. 3.7.1. Therefore, your arguments are unfortunately incorrect; a server is 100% within its rights to send CRLF, CR or LF- terminated output (in the entity-body, that is - naturally, headers and such are CRLF terminated). Every server I've ever come across (including Apache, which I have a great deal of respect for) sends text media exactly as it finds it, which is perfectly acceptable. It is required of the client to correctly interpret any of the above as line terminators (which is why pretty much every browser will display a text URL correctly, regardless of the EOL terminator - it's required to). However, the clients described above (at least, the ones I know about) don't do any parsing or display of text at all, and so aren't beholden to recognize *any* EOLs (even though they're being incredibly stupid not to). I'm shocked that so many DAV clients have this mindset. And didn't one of them cite FTP? FTP *does* support transliteration, of course, so they don't seem to know what they're talking about - but how can they expect their products to be useful if they don't accomadate the OS? And it's such a trivial thing to do, too. Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
[vox-tech] advanced gdb question
Peter Jay Salzman writes: hey there, every tutorial on gdb says compile with -g within the first few lines. but what if you don't? or rather, what if you can't compile with -g? but how do you inspect arguments, local variables, etc. in a given frame if you don't know the address of these variables because the symbol table is unavailable? Well, without compiling with -g, you obviously don't have the convenience of debugging symbols and whatnot - but you should still be able to examine the program as raw assembly (hey, it's better than raw machine code). I just tried it on /bin/echo (stripped). You can set the initial breakpoint with: b main after beginning the run, you'll be in main, and you can use: disas to disassemble the current function. You'll get the whole function. You can set breakpoints at specific addresses, and move on that way. It's a mess, but it's something. I'm no gdb expert, so I'm sure someone can offer better advice than this...? Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Which cipher to use?
Ryan writes: Correct, a passphrase would violate the xor sequence longer then the data rule. Passing PID or time as a seed to random would also be a very bad idea. Md5 checksums of random noise (transistors, radio reception of static, radioactive decay etc) is the level of randomness that is idea. Hey, now there's an idea... I could use my TV tuner to gather data for the kernel entropy pool when I'm not watching tv with it. Anyone know of something to do that? It'd be cool to play with. You'd have to make sure you don't get interference from actual signals - but Bill's suggestion of MD5 checksums would probably minimize that, as long as the noise-to-signal ration is quite high (never thought I'd be recommending *that* on a public forum ;) ) I've heard of someone using a lava lamp as an entropy source, or thermal noise in semiconductors. Also, radioactive decay makes a good source... http://www.fourmilab.ch/hotbits/ And atmospheric noise (www.random.org). -Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Which cipher to use?
Mark K. Kim writes: On Tue, 4 Jun 2002, Micah Cowan wrote: Bill Broadley writes: Xor is 100% secure if your key is as long as your data, otherwise known as the otp = one time pad. If it's less, it is indeed rather easy to break. This is really picky of course, but the other criteria for secure use of Xor, in addition to having a key at least as long as your data, is: 1. That it be a random sequence - *truly* random. This rules out using passphrases and the like. *All* passphrases or passwords are extremely insecure for Xor, regardless of length. 2. That it be used only one time, and then discarded - never to be used again. The combination of those three requirements (counting yours), is what makes something a one-time pad, or Vernam Cipher. (I know you know this stuff, Bill - but I'm pointing it out for any who don't). ==8-- One-time-pad (of which XOR is one method) is still not secure even if you follow the standard rules (the ones Micah points out.) Good point about XOR being one method - the canonical method is to rotate the letters by the value, not XOR it. But either way, the probability distributions work out the same. One way the message could be compromised is if the adversary messes up your communication. Example: 1. I send the message I'll meet you at 10 O'Clock, XORed. 2. Aversary intercepts the message. S/he has no clue what it says, but s/he knows it's about some meeting. In a random spite, s/he changes a random character. 3. The recipient receives the message I'll meet you at 11 O'Clock. The message has now been compromised even though the adversary did not know what the original message was. It took a little luck, but it's not a bad chance, if all the adversary wants to do is confuse the recipient. More luck than I'm willing to worry about, frankly. The chances of choosing the right spot to change (1 out of 17), *and* the right value to change it to (9 out of 256) to affect it in a way that is meaningful are pretty slim. The odds are *much* greater that the message will just be garbled slightly. I guess if the adversary could do the above, s/he could also simply not forward the message until the recipient dies from old age, too. But all these issues are important concerns one should be aware of in security; one can't blindly use a technique just because someone tells you it's secure, but one also needs to be aware of all the issues. This still makes OTP by far the most secure encryption mechanism, bar none. However, complications arise because it's also damned inconvenient for most situations. You can't use it to encrypt internet communications, for instance, unless you physically transport the key to the other site in advance, or use some other means of communications that is already secured. Also, the fact that once you've used up the key, it's done. And you have to ensure that both parties are very good at destroying the keys, unless you don't care what happens to the message once it's been received (which is a possibility). All in all, OTP isn't much more convenient than just driving over to the recipient's house and delivering it in person. Which is why it's almost never used - security is always a balance between practical usability and ultimate security. After all, security's no problem if you're enclsoed in a shielded room, with no connectivity, and you're the only one there. But that makes it kinda difficult to communicate. But anyway, in general, I agree with you - there's no perfect solution for every situation. Everything's a trade-off: finding the right one is always important. Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
[vox-tech] External IDE Drive Converter
David Margolis writes: Has anybody had any success using a USB or parallel IDE drive converter. I've got both an extra hard drive and an extra 4x2x24 CD-RW I'd love to do something creative and portable with. One or both of those would go nicely in one of several available external drive kits. So I guess this is a few questions. Has anyone pulled off using an external USB drive kit? If not, what's a good parallel one? Has anyone pulled off burning CDs in a converted IDE CD-RW (USB or parallel)? I've been less than impressed with the current state of the USB stuff - it's gotten very good, but it's still got a few too many bugs for me to get comfortable with it. It is actively progressing, so it's entirely possible that the chief problems I'm aware of have been fixed in the last month and a half... My most recent experience with it was in using a USB Mass Storage Device camera. I could mount it and transfer files from it, but there was some frequently occuring situation which the drivers handled incorrectly, resulting in a permanently zombied, unkillable kernel thread. I couldn't close even close the xterm running the program which was reading from that mount point. And all further attempts to access the device would fail. -Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] xlib question
On Mon, 2002-05-20 at 23:24, Peter Jay Salzman wrote: what's the difference between an xlib Window, Display and Drawable? as in: Window win; Display dpy; Drawable drw; pete I'm quite far from an xlib expert; but I do have volume 1 of the O'reilly series handy... Drawables consist of windows and pixmaps (offscreen memory regions you can draw to). You can safely specify a Window or Pixmap anywhere Drawable is expected as argument (they're all integer types, so no nasty, unsafe casting required). Displays hold information about an X server and its screens. Think of the common -display option in X apps. The Display type is a struct, whereas (as already mentioned) Window, Pixmap and Drawable are int types. HTH, Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Linux's Vulnerability to E-mail Viruses
On Wed, 2002-04-24 at 21:21, Richard S. Crawford wrote: I'm operating under the assumption that while viruses for Linux that spread like Windows viruses are very rare, there are still some out there. So, given that, what level of vigilance is necessary against incoming viruses in a Linux system? Viruses for Linux exist, but are rare. E-mail viruses, as per your subject line, don't exist at all (yet). This is because Windows has default settings which will actively run any scripts embedded in HTML mail, which means that as soon as you read your email, that embedded script can run, say, an attached executable with massively destructive capabilities :] :] :] ...Linux has no problems of this sort, for the simple reason that nobody has been stupid enough to write mail clients which are capable of automatically running executables. However, if you have an attachment which is some sort of script, or is a file which takes advantage of a buffer overflow, etc. it could still do damage if you have mailcap settings which will automatically run it or load it into an insecurely buggy program - that latter, however, is extremely unlikel - still, with the zlib buffer problem that was recently discovered, such things are certainly not impossible. So, the rule for Linux is basically the same as for Windows: never view attachments when you don't know the source. But, as to Linux viruses in general: the reason they are so rare is that they are not very effective unless the victim is unusually moronic. Because they can only do damage to things over which the victim has privileges. If you're an average joe-type user, the best it can do is wipe out your particular files. It can't touch anybody elses files, and can't screw up your system, generally speaking. Most of the viruses around today aren't really viruses at all - they're trojans, which require the user to run them as root (or at least a very priveleged user). Since root tends to be suspicious (hopefully) of strange programs, such problems are rare indeed. -Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] writing free getopt, ran into a dilemma...
On Sat, 2002-03-30 at 04:45, [EMAIL PROTECTED] wrote: I often had find alot of interesting (to me) material while digging around on things like this. I would be fabulous if someone could point me at a online source for the ANSI C or ISO C standards. It would be cool to be able to site a section for or against various theories. I do this frequently on news:comp.lang.c - Great place to get your theories/conceptions trounced :) (Well the technically official standard is something you have to pay hundreds of dollars for, which is why it's not available everywhere and is part of the reason so many opinions about what it actually says exist... but some _through_ coverage would be nice). I have an electronic copy. You can download it for $26 (it was $18 when I got it): http://webstore.ansi.org/ansidocstore/product.asp?sku=ISO%2FIEC+9899%3A1999 On Thu, Mar 28, 2002 at 09:13:19AM -0800, Mark K. Kim wrote: The one I tried to link statically on Windows one time said it was GPL, but according to Micah it's apparently LGPL with misdocumentation. :P readline is GPL, getopt is LGPL... maybe some maintainer got confused? getopt's license would seem to be debatable - the sourcefile itself claims to be plain ol' GPL, though the accompanying, seperate license file claims LGPL. Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] writing free getopt, ran into a dilemma...
On Thu, 2002-03-28 at 00:35, Mark K. Kim wrote: Keywords: getopt, license issues, GPL, BSD, optind I implemented everything. optarg, opterr, and optopt work exactly identical to GNU's getopt. However, optind is a little different because my library doesn't reshuffle argv[] like GNU's getopt. That's okay with me, but things get hairy if optstr doesn't have '-' as its first character -- then the programmer is expected to search the remaining argv[] starting with optind... but due to GNU getopt's flexible nature, there could be unhandled entries in argv[] not only at the end but in the middle, too (creating holes of unhandled optarg in argv[]). So where should optind point to by the time getopt finishes processing all the options and there are holes of unhandled optarg only plain strings remain? (That's a little long and confusing; I hope you understand all that :) I think I now understand why GNU shuffles argv[]. But I don't need this to be fully compatible with BSD's getopt; I just need it to behave in reasonable manner. I'd like to hear some ideas and what you think the behavior should be and how it's better than others. Well, POSIX says that options should always be supplied before arguments, so that's why POSIX-conforming implementations don't need to permute the order in argv. Intermixing options with arguments is a GNU extension, and GNU pulls some mildly dirty tricks to get it (such as permuting argv, despite the fact that it's elements are declared const). Permuting is probably the easiest way to go; but another alternative would be to create another function, increment_optind(), instead of doing ++optind. This function could then automatically skip options. Oh, but you mentioned it doesn't currently even handle the middle options (which is what I thought the point was for your getopt()?). In that case, if you hate permuting argv, you could copy it into a seperate, temporary string, and permute that instead. You'd still need increment_optind()---or you could break getopt()'s parameter list by passing back the allocated string (make sure it gets freed somewhere...). If you email me the code, I'd be happy to comment on it (comp.lang.c is a hobby of mine, though one I haven't gotten around to lately). I won't get to it this weekend, though, since I'll be out of town (and away from email). Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Where setjmp/longjmp went after C
On Sat, 2002-03-16 at 13:25, Jeff Newmiller wrote: The attached two files demonstrate a rudimentary structured setjmp/longjmp that mimics the exceptions of Ada and C++ (and other languages). I wrote an article about this in spring 1991 for C User's Journal, and my bad luck was that two other people beat me to the punch, so it never got published. What I have here is pulled from memory, but I think it gets the idea across. The real value of this technique comes into play when everyone uses the same system... and you need language support to avoid certain problems with auto variables... so I would only recommend using this if you are stuck in C. :) The real problem with using setjmp()/longjmp() these days: C99 has added a very cool type, the variable length array. Unfortunately, the standard declares that calling longjmp() when the call stack includes functions which have defined VLAs which still exist, they may not be deallocated by the stack-unwinding. :( So, you get memory leaks... That sucks. The one thing I really dislike about the new C. Other than that, it rocks. Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] reading files into a web page
On Sat, 2002-02-02 at 23:44, Peter Jay Salzman wrote: jim, just out of curiosity, in my hypothetical webpage: HTML HEADTITLEBulletin Board/TITLE/HEAD BODY PRE `cat /www/pcgm/bulletins` /PRE /BODY /HTML where would the perl code go? (i am a total newbie in dynamic webpage content). sorry if this question is painful, but i honestly don't know. :) It, uh, wouldn't :) You'd need to generate the entire page from a Perl CGI - or, use a Perl package such as Mason (HTML::Mason?) to create web templates where you can stick your Perl code, and edit your configuration file to know how to automatically invoke the Perl stuff appropriately. Can't really help you there. Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] C question: global vs local const
On Fri, Jan 18, 2002 at 01:42:11AM -0800, Peter Jay Salzman wrote: begin Mark K. Kim [EMAIL PROTECTED] On Thu, 17 Jan 2002, Peter Jay Salzman wrote: begin Mark K. Kim [EMAIL PROTECTED] You're initializing K with a variable. Because globals are calculated at compile time, Since Jeff will sooner or later jump in to correct me, I'll correct myself before that happens: I didn't meant to say that globals are calculated at compile time -- they can certainly be modified during runtime. What I meant was that initial values of globals have to be calculated at compiletime -- due to the way they are stored in memory. does this apply to static variables too? i have a situation where a function is called many times over: void function( ..., long double dr) { long double variable = expensive_calculation * dr; ... } It does apply to static variables. i'd like to declare variable as static, since both expensive_calculation and dr remain constant through the entire program. i can't declare dr as being global because it depends on other parameters that need to be calculated at run time (but otherwise don't change). What I would do is perform a test at the beginning of function as to whether variable should be assigned an initial value or not. void function ( ..., long double dr) { static bool inited = false; /* Need stdbool.h for this - it's C99-specific, so don't #include it if you intend for it to be portable to C90: instead, define bool and false yourself. */ static long double variable; if (!inited) { variable = expensive_calculation * dr; } ... } Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Questions about building my own box
On Thu, Jan 17, 2002 at 12:20:50PM -0800, ME wrote: On Thu, 17 Jan 2002, Micah Cowan wrote: I disagree. Leave it in, as I suspect it will be clear from the final resulting thread what happens to these sorts of offenders - let it be a warning to future prospective idiots. Humorous side note: This assumes that idiots take time to read archives, and (*gasp*) learn from others mistakes/experiences. Excellently put. Still, if we don't at least make the *attempt*... at the very least, we can warn them by saying, look what happened to the last guy who tried that... Not that anything is going to happen to Takashi, provided he makes a very immediate 180-degree spin. Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] DocBook
MOn Thu, Jan 17, 2002 at 01:31:04PM -0800, [EMAIL PROTECTED] wrote: On Thu, 17 January 2002, Micah Cowan wrote: As to Office - I haven't used a Word Processor in a couple years. Not nearly enough power to 'em. Sure, the interface is convenient, but it's *power*, not convenience, that I crave - and for that, the choice is clear: content-oriented (vs. format-oriented) typesetting tools like TeX or FOP. Nobody's ever made a Word document can touch my DocBook documents. And I'm not even that good. Micah Hey, maybe you could do a presentation on DocBook. Why people should use it and tools that would be useful, etc. That could be good. But it'd probably need to include some overview on SGML, DSSSL, XML, XSLT, XSL-FO, Norman Walsh's stylesheets, OpenJade, Xalan, FOP, PassiveTex, and maybe a little SVG. Actually, if I talked on just the variety of options you have for processing tools, and left the DocBook format itself for another talk, it might be possible to give a broad overview of those things. If people are interested in learning more about DocBook, allow me to make the following introduction to it. I love DocBook. I also love TeX (but am somewhat less comfortable with it). I think that XML/XSLT and TeX cover roughly the same niche in terms of document publishing, and either one can be used as tools of approximately equal power (though of course XML/XSLT covers a much broader range than just document publishing). Since many more UNIX/GNU/Linux users are already familiar with TeX (especially in using the LaTeX package), that is probably more often the ideal documentation tool for many people. My personal chocies have led me to prefer DocBook. The biggest differences in my mind between DocBook and LaTeX, are: 1. Both are considered to be content-oriented, versus word processing or desktop publishing which are considered format-oriented. In actuality, though, LaTeX is a *pseudo*-content-oriented high-level wrapper around what is really a format-oriented typesetting language (TeX), that happens to be powerful and flexible enough to allow you to be sort-of content-oriented when you want to be, due to the fact that you can wrap low-level functionality in high-level packages. However, at any point in writing a LaTeX document, you can immediately drop down to low-level again, writing in pure TeX commands. But even when you're dealing with LaTeX-only, there are many elements to it which are decidedly more format-oriented than content-oriented - i.e., there is nothing content-oriented at all about using /hfill or /vbox (or whatever they are). In contrast, DocBook really *is* purely content-oriented. DocBook has no mechanism for describing formatting at all - only content-oriented markup describing what a thing *is*, not what it looks like. This is not necessarily a good or bad thing - it is simply a distinguishing point. All formatting is described by a totally seperate document - the stylesheet driver, with which you specify exactly what you want the DocBook elements to look like. There is no point in a DocBook document at which you can drop down into low-level format-oriented stuff like you can in LaTeX - instead, you use the appropriate element, and edit your stylesheet to format it how you like it. This has the advantage of forcing your document to be highly structured, but it has the disadvantage of placing your power-of-formatting under the flexibility of DocBook (or whatever DTD or Schema you use for publishing). If you want to get a particular formatting element into your document but DocBook doesn't supply an appropriate element of which you can take advantage in your stylesheet, then you are out of luck. If you needed that element sorely, then the best thing you can do is make your own DocBook-like DTD, and invent the element you're lacking. There's nothing wrong with doing this - and so you're never really constricted in what you can do format-wise with XML/XSLT; however, once you go outside the realm of pure DocBook, you can't expect other people to take your XML or SGML as-is and do stuff with it unless you also pass around your DTD and your stylesheets. 2. I consider XML a more universal language of expression than LaTeX or TeX. Not that TeX isn't available on pretty much every platform that matters, but XML is in much more widespread use outside the realm of UNIX. Also, XML is newer than TeX - although it's really a redesign of SGML, which is about as old as TeX (don't know which is older). DocBook is available in both XML and SGML, and has itself been around for some time (but not as long as TeX), so this is a somewhat flimsy argument :) ...but mainly, XML (in general) has massive attention right now, in comparison with TeX, and so various XML-related technologies are constantly being improved. Anyway
Re: [vox-tech] DocBook
On Thu, Jan 17, 2002 at 03:33:33PM -0800, Peter Jay Salzman wrote: begin Micah Cowan [EMAIL PROTECTED] MOn Thu, Jan 17, 2002 at 01:31:04PM -0800, [EMAIL PROTECTED] wrote: On Thu, 17 January 2002, Micah Cowan wrote: In conclusion: If you are already a TeX- or LaTeX-guru, you probably have little reason to switch to DocBook (except that you need to write in DocBook format to write LDP HOWTOs, as Pete discovered). I picked it because it suits my particular needs, and YMMV, as always. heh. i consider myself a docbook layperson. i know enough to use it effectively, but not enough to really understand all the terminology and bit's and pieces of docbook. as a layperson, i definitely defer to micah who seems to have attained guru status in this area. Not even remotely. After I've done some serious XSLT and XSL-FO study, then maybe call me that. from my own POV, here are some comments for other laypeople: 1. docbook hurts the fingers. whereas latex users can talk about \url{http://slashdot.org}, {\bf vmlinuz} and {\it important stuff\/}, docbook users talk about: systemitem role=urlhttp://slashdot.org/systemitem, filenamevmlinuz/filename and emphasisimportant stuff/emphasis Maybe vi-users get their fingers hurt, but psgml-mode Emacs-users have a plethora of key-sequences which make the job much more palatable. Tag-name autocompletion, automatically end-tag, etc. My favorite feature is that if you tell psgml where to get the DTD from, whenever you tell it to insert an element it automatically adds any attributes or elements that you need to fill in. For instance, if I type C-c C-e section RET (to use emacspeak), I'll get: section title/title !-- one of para, simpara, figure, the full list of possible elements placed here -- /section With my cursor at the title element, ready for me to type in a title. If I type C-c C-e link Then I'll get a query for the value of the mandatory linkend attribute, and then: link linkend=foobar/link Saves a lot of typing. god forbid you write a paper about something like applicationdosemu/application, and you have two choices: enumeratedlist listitemparaCarpal tunnel syndrome./para/listitem listitemparaMake good use of applicationvi/application macros./para/listitem /enumeratedlist compare with: \begin{enumerate} \item Carpal tunnel syndrome. \item Make good use of {\bf vi} macros. \end{enumerate} Might want to look into Blatte, which was actually written by a new coworker of mine (works in my group). It's basically a programmable shorthand language which is converted to HTML. Easy enough to adapt to SGML or XML in general, I should think. it may look like a small difference now, but write a 10 page document, and you're talking about a significantly higher typing to content ratio. With the Emacs functionality I described, it's not a problem. Especially since if I have text I'm constantly using, I can write an entity to save myself typing: !ENTITY foo-class link linkend='my-foo-class'classnameFoo::Bar/classname/link And then I can just use foo-class; instead of all that stuff. 2. for the average latex user, docbook is a loss of control of format. for me, the HYPER use of content based markup is a double edged sword. i know you can modify stylesheets. but danged if i know how! it doesn't look easy. with latex, i can control the location of every single dot of my document. and sometimes latex isn't happy about the choices i make, like under/overfull hboxes and vboxes, pictures that don't float well, i can ALWAYS force the issue. No real argument here. Of course, an extremely well-designed DTD could give you this same power, but DocBook doesn't have the same level of detailed power control. ok, that being said, my recommendation is: if you have a choice of latex or docbook, definitely pick docbook, hand's down. micah's reasons for using it are much more persuasive than my reasons for not using it. and the fact of the matter is, i do use docbook, grudgingly. I'm surprised at your conclusion. What reasons were those? From my perspective, I didn't think that any of the reasons I offered were very strong advantages over LaTeX. And the loss of direct control is usually a very big deal to me (somehow not big enough in this case, I guess). Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] totally confused about C promotion
On Mon, Jan 14, 2002 at 03:16:18PM -0800, Peter Jay Salzman wrote: from kernighan and ritchie, page 45: For example, the library routine sqrt expects a double argument, and will produce nonsense if inadvertantly handed something else. snip what happens when you hand a long double to a math function which expects a double? i can't find any rules for demotion in K+R. does code2.c work by accident or is there a concept of demoting floating points to a narrower width when the function expects them to be narrower? Do you have the old KR, or the second edition? The old one was before prototypes were invented, so it'd make sense for them to say something like that. Prototypes will force the argument to be the correct type, automatically converting them. Of course, this doesn't apply to variadic functions such as the printf() examples. Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] totally confused about C promotion
On Mon, Jan 14, 2002 at 03:46:59PM -0800, Peter Jay Salzman wrote: begin Rod Roark [EMAIL PROTECTED] It's not sqrt that is producing nonsense, but rather printf. Printf accepts any types in its arguments, and it's your responsibility to make sure that the data types match up with what's in the format string. The compiler can't fix it because it's a runtime issue. This is generally considered a weakness in the way that printf works. i understand printf well enough (and printf really isn't important to me, since i'm not really printing these values. just calculating them). Regarding the math function, the compiler can cast the argument (perhaps with a warning) because it knows how sqrt is declared. so you're saying it's fine to pass sqrt a long double, or it could be fine? Definitely fine. But you'll get a double back, not a long double (except when you're using tgmath.h in C99). You have an old copy of KR. Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] minicom help
On Thu, Jan 03, 2002 at 03:24:22PM -0800, Henry House wrote: I have two machines connected by serial crossover cable. I can write data to /dev/ttyS0 on the one machine (headless server) and receive on the other (terminal) using 'cat /dev/ttyS0' but I can't get minicom to work. Symptom: nothing at all appears on the receiver! As far as I can tell I did have the correct comm settings. If anyone has done this and would be willing to enlighten me, I would be very grateful. In case you did not guess already, I plan to redirect grub to the serial port and run a getty on the headless server. Have you tried lower baudrates? Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] quoting question in perl
On Thu, Dec 20, 2001 at 06:13:25PM -0800, Rod Roark wrote: On Thursday 20 December 2001 05:59 pm, Peter Jay Salzman wrote: begin Micah Cowan [EMAIL PROTECTED] ... Well, the direct answer to your question would be to use: system(rm '$filename'); or something similar so that the shell sees the quoting. I read somwehre that the single quote is a valid character in an identifier, so you might need something like system(rm '${filename}'); to make it work, but am not sure offhand. It's not a valid character in an identifier - unless it is the entire identifier (i.e., '). From perldata, an identifier is, a string beginning with a letter or underscore, and containing letters, underscores, and digits. Of course, all the punctuation identifiers don't follow this rule, but it's true in general. -Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] quoting question in perl
On Thu, Dec 20, 2001 at 05:06:29PM -0800, Peter Jay Salzman wrote: if you have: system(rm $filename); and $filename = a file, you get an error because you're trying to delete two files, a and file. what's the proper way of quoting $filename so that the shell sees the file a file and not the two non-existant files a and file? pete Well, the direct answer to your question would be to use: system(rm '$filename'); or something similar so that the shell sees the quoting. But if you actually want to delete a file, why not use Perl's builtin unlink() function instead? i.e.: unlink $filename; HTH, Micah ___ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Joysticks and kmod
On Tue, Nov 20, 2001 at 02:24:37PM -0800, Peter Jay Salzman wrote: begin: Micah Cowan [EMAIL PROTECTED] quote or in the kernel docs (admittedly outdated; the kernel docs still talk about kerneld, with a simple note at the top saying that kerneld is no longer supported). modprobe, insmod rmmod and family have nothing to do with the kernel. they are user space programs provided to the distibution for use with the linux kernel. usually in a package called modutils. Right. But the design of modutils obviously coincided with the design of the modular kernel - at least the concepts. Anyway, the document I was talking about is modules.txt in the kernel docs directory. At any rate, it probably isn't an issue with the modutils, but more likely (to me) a kernel or kmod issue, since it doesn't appear that the kernel detects that it *needs* a module at all. I'm currently suspicious that the new event-driven input interface must do some special stuff behind the scenes, that ends up affecting whether the kernel realizes you've just tried to read from a device file. snip your previous email got snipped -- it sounds like a bad modules.conf configuration. can you modprobe the driver in successfully? Yes, I can. And, even when I remove the relevant entries from modules.conf, I still don't get a couldn't find module char-major-13 style message anywhere. At this point, I suspect I'll be doing some kernel-source reading if I still want to know why. It could even be some sort of bug they've fixed by now (my home machine's currently 2.4.8). Thanks for your time, Pete Micah
Re: [vox-tech] WD HDs take X
On Tue, Nov 13, 2001 at 12:11:46PM -0800, Foo Lim wrote: Ok, WD HDs suck!! A few weeks ago, I complained about a clicking Western Digital HD, which was replaced by WD. I put it in a new machine with low usage, and the new one is freaking out also! It hasn't even been used for more than a few weeks! I do have it on 24/7, but it should be able to handle it. My advice: skip WD. Strange: I haven't had any problems with my WD 40 gig. Micah
[vox-tech] Re:
On Wed, Apr 18, 2001 at 05:50:24PM -0500, Jay Strauss wrote: Micah, your message was blank, was that intentional? - Original Message - From: "Micah Cowan" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 18, 2001 5:28 PM _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com Did anyone else have trouble receiving my message? Because I got my message back on vox-tech fine Micah
Re: [vox-tech] [john_zie_99@yahoo.com: help needed]
On Wed, Apr 11, 2001 at 07:15:10PM -0700, Peter Jay Salzman wrote: pete's intro snipped - Forwarded message from j ohnzie zie [EMAIL PROTECTED] - Date: Wed, 11 Apr 2001 18:57:22 -0700 (PDT) From: j ohnzie zie [EMAIL PROTECTED] Subject: help needed To: [EMAIL PROTECTED] Dear sirs: I am a freeBSD user. But now we want to install red hat linnux on our 2 web servers(HP made), and install MySQL to a database server(HP also). Could u please suggest which Linux version and MySQL version I should choose. Currently My OS is Free BSD, Mysql is 3.22. I may choose Red Hat prossional as OS in the two servers, because there are two servers there, should I need cluster server or not? Thank you for helping. Best regards John Zie If it must be redhat, then definitely use version 6.2. It was stable, whereas I don't consider 7.0 (is it 7.1 now? either way...) stable. I use it at home, but had to "downgrade" several things because they weren't stable enough for my needs. If they aren't stable enough for my personal needs, I'm sure that a production environment is "right out." As to what version of mySQL you should get, go with the "postgresql" version :) Okay, okay, if you really must use mySQL, the latest release version should be fine; but after having brief experience with both, I *strongly* prefer postgresql because it is much more robust, and is designed the way real database engines ought to be. For instance, mySQL doesn't support rolling back transactions, which IMO is very important for any critical database needs; and I also miss nested SELECT statements in mySQL, which are available in postgres. Micah