 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Jim Henderson wrote:
> And you need to look up again the definition of "DLL Hell".
You know, they solved this problem quite some time ago... Like, around
2000 or earlier.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Jim Henderson wrote:
> You've been lucky. Last company I worked for had many applications with
> DLLs in common but requiring different versions.
FWIW, that's actually easy to fix. You just put the right version of the
DLL next to each executable, and create a file in the same directory
with a magic name (that I disremember offhand but something like
"loadseparate"), and the DLL loader will look at the directory with the
executable first for any DLL. It's the same thing that the
"side-by-side" is supposed to solve, so googling for that would probably
lead you to the right place.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
> Now, if Linux supported the thing that NTFS supports where you can
> delete the beginning of a file, maybe I'd use that. But as it is, I have
> to chop the file up so I can delete parts of it.
>
Could "split" possibly help you?
--
Eero "Aero" Ahonen
http://www.zbxt.net
aer### [at] removethis zbxt net invalid
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chambers wrote:
> When you're writing a single, simple tool, with well defined inputs and
> outputs, it's much easier to make it work *no matter what*.
I saw a study done a number of years ago where researchers took each
UNIX tool and piped random data into its input. The only ones that
didn't dump core were programs that didn't care (e.g., cat) or programs
specifically designed to parse its input (e.g., gcc). Something like
70% of the tools they tested dumped core.
A couple years later, it was all cleaned up or at least vastly improved,
apparently.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 11 Mar 2008 15:34:28 +0000, Invisible wrote:
>>> Who said anything about the kernel? I'm talking about the entire Linux
>>> OS. (Most of which is actually GNU, if you want to be technical about
>>> it...)
>>
>> So yes, be technical about it, then - I don't know of any Linux distro
>> that uses "standard" tools that aren't GNU, be it awk, sed, perl, bash,
>> etc.
>
> Except that Unix /= Linux. There's also BSD and Solaris and random stuff
> like that... and autoconf works with all of them.
Yes, I'm aware - have used Solaris, BSD, and SYSV. And autoconf is there
to make sure what's there.
> "Windoze" is more or less one product line. Binaries work unmodified on
> most versions of it. (Assuming the features they use are there.) "Unix"
> is not one product. It's not even close to being one product. It's a
> vast stew of different products all bolted together in a giant mess.
An OS can be called a "UNIX System" only if it meets certain standards,
as defined by The Open Group. So right away, you're operating under a
fallacy that you can compare UNIX to Windows - Windows is a product, UNIX
is a set of standards that define the operation of a product.
Microsoft occasionally deigns it's OK to follow standards they didn't
define - they use the BSD TCP/IP stack in most versions of Windows; they
follow (to a greater or lesser extent) standards for web browsing
software; they even have in the past (not sure about today) incorporated
a POSIX-compliant subsystem. They don't own any of these standards, but
they use them.
>>> I have yet to experience "DLL Hell". I'm told it exists, and it's not
>>> fun, but I haven't seen it personally. (Don't ask me why...)
>>
>> You've been lucky.
>
> Let's hope it stays that way...
The longer you work in IT, the less likely it is to happen.
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 11 Mar 2008 11:33:41 -0700, Darren New wrote:
> Jim Henderson wrote:
>> chkdsk
>
> It's actually not even chkdsk at boot time. It's autochk, which is a
> different program to do the same thing. And the recovery console has yet
> a different version. Why they felt the need to implement it three times
> I don't understand. :-)
Yeah, that's what I was thinking. Last time I did something like this
with Windows, it was Partition Magic that inserted itself into the boot
process.
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
> ad-hoc *mess* of haphazardly interacting command switches that you have
> to spend 20 minutes studying the manpage to decode the interactions for?
Don't forget that it also changes behavior depending on whether it
things stdout is a terminal, a different character device, or a file.
> Also: autoconf exists. Need I say more?
And ptys.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> Portability is a key feature of unix-like systems.
I always have to cringe a bit when someone decides that two different
versions of source code in one file means it's "portable".
#ifdef isn't a sign of portability. It's a sign of lack of portability.
If your 32-bit code breaks on a 64-bit machine, your language isn't
portable.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> (Sure, the code could have been written so that endianess doesn't matter,
> but then it wouldn't have been so efficient.)
And of course, in *portable* languages for doing system-level
programming, you simply specify that particular variables have a certain
endianness, and you let the compiler write the code to do the
byteswapping at the places it's needed. :-)
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Phil Cook wrote:
> But wasn't it v7 that introduced the ability to layout and print
> multiple images? Such a handy little thing.
Actually, it's rather annoying. And v8 tried to improve it and just
made it way more suckful.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 11 Mar 2008 11:41:02 -0700, Darren New wrote:
> Jim Henderson wrote:
>> You've been lucky. Last company I worked for had many applications
>> with DLLs in common but requiring different versions.
>
> FWIW, that's actually easy to fix. You just put the right version of the
> DLL next to each executable, and create a file in the same directory
> with a magic name (that I disremember offhand but something like
> "loadseparate"), and the DLL loader will look at the directory with the
> executable first for any DLL. It's the same thing that the
> "side-by-side" is supposed to solve, so googling for that would probably
> lead you to the right place.
Yep, that's what we ended up doing. The problem is that most software,
when installed using the installation routines, will install any DLLs to
the system directory (at least that was the experience at the time, maybe
it's gotten better by now). Our software testers used the trick you
describe to make programs work together that had this type of conflict.
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 11 Mar 2008 11:39:07 -0700, Darren New wrote:
> Jim Henderson wrote:
>> And you need to look up again the definition of "DLL Hell".
>
> You know, they solved this problem quite some time ago... Like, around
> 2000 or earlier.
Took 'em long enough. ;-)
That is about the last time I had anything serious to do with Windows.
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
> Invisible wrote:
>> ad-hoc *mess* of haphazardly interacting command switches that you
>> have to spend 20 minutes studying the manpage to decode the
>> interactions for?
>
> Don't forget that it also changes behavior depending on whether it
> things stdout is a terminal, a different character device, or a file.
I presume you mean "don't forget" as in "if you forget this, it's likely
that your scripting will malfunction horribly"...
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> I'm
> not really sure why it's even limited, given I've got 16 gig of real
> memory and twice that of virtual memory. :-)
Well, it is an open-source OS after all. There ought to be some magic
constant in the source code of your favorite shell which limits the amount
of command-line parameters. Just increase it an recompile... :P
(Why isn't it dynamic? Probably because it's written in C, and C sucks.)
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> Warp wrote:
> > (Sure, the code could have been written so that endianess doesn't matter,
> > but then it wouldn't have been so efficient.)
> And of course, in *portable* languages for doing system-level
> programming, you simply specify that particular variables have a certain
> endianness, and you let the compiler write the code to do the
> byteswapping at the places it's needed. :-)
Which would be slower than writing the bytes in the proper order in
the first place...
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> I saw a study done a number of years ago where researchers took each
> UNIX tool and
I'm not sure there's such a thing as a "UNIX tool". There are specific
implementations of several established command-line tools (many of which
are standardized by POSIX, plus others). GNU is one example of such
implementation.
Which one did they use, specifically?
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Eero Ahonen wrote:
> Darren New wrote:
>> Now, if Linux supported the thing that NTFS supports where you can
>> delete the beginning of a file, maybe I'd use that. But as it is, I
>> have to chop the file up so I can delete parts of it.
>>
>
> Could "split" possibly help you?
I already have millions of files. That's the problem. :-)
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> The source code has to
> know the endianess of the target system in order to be able to write
> bytes in the proper order.
> Which would be slower than writing the bytes in the proper order in
> the first place...
I'm not sure how these two jibe. Either you're processing the muti-byte
objects in native order and writing them in a different order, or you're
writing them without processing them. In either of those cases, I don't
see compiler-generated code being slower than programmer-generated code.
The only way I can see it being slower is there's actually two different
sets of code, based on what order things are in, such that (for example)
one branch adds two numbers using "+" and the other does some magic to
add 0xA000 and 0xA000 to get 0x4001 automatically without actually
treating them as binary integers. Is that what you're referring to?
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> Which one did they use, specifically?
I don't remember. I think it was the GNU one, but it might have been BSD.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Jim Henderson wrote:
> Our software testers used the trick you
> describe to make programs work together that had this type of conflict.
I wouldn't call it a *trick* as such. It's a part of the design in the
OS to support exactly the situation you had. :-)
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
>
> I already have millions of files. That's the problem. :-)
>
Well yes, now, but possibly in the future? :)
--
Eero "Aero" Ahonen
http://www.zbxt.net
aer### [at] removethis zbxt net invalid
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Eero Ahonen wrote:
> Darren New wrote:
>>
>> I already have millions of files. That's the problem. :-)
>>
>
> Well yes, now, but possibly in the future? :)
I am saying that I fail to see how split would *reduce* the number of
files I have, considering its functionality.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> The only way I can see it being slower is there's actually two different
> sets of code, based on what order things are in, such that (for example)
> one branch adds two numbers using "+" and the other does some magic to
> add 0xA000 and 0xA000 to get 0x4001 automatically without actually
> treating them as binary integers. Is that what you're referring to?
If I remember correctly, what mplayer does (well, some of its video
filters, actually) is to build 4-byte pixels into words and then it
writes those pixels on a per-word basis to some output buffer. Naturally
the endianess of the architecture determines if the R channel goes to
the lower byte or the upper byte of the word.
If endianess is not taken into account, in architectures with the other
endianess the color channels will be effectively swapped. (I know this
from actual experience.)
Naturally it could write the bytes themselves, ie. on a per-channel
basis instead of a per-pixel basis, but those would be 4 writes instead
of 1. Another possibility would be to build the word always in the same
way and have the "compiler reverse it in architectures with the other
endianess" (if that's even possible in any compiler of any language),
but that would mean a bunch of extra steps in that other endianess
architecture, for no good reason.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 11 Mar 2008 13:45:25 -0700, Darren New wrote:
> Jim Henderson wrote:
>> Our software testers used the trick you describe to make programs work
>> together that had this type of conflict.
>
> I wouldn't call it a *trick* as such. It's a part of the design in the
> OS to support exactly the situation you had. :-)
Well, you know what I mean - the standard installer wasn't smart enough
to leverage this "feature" of the OS so the conflict didn't happen.
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> Another possibility would be to build the word always in the same
> way and have the "compiler reverse it in architectures with the other
> endianess" (if that's even possible in any compiler of any language),
> but that would mean a bunch of extra steps in that other endianess
> architecture, for no good reason.
No, you'd declare a four-byte integer in native endianness, and a
four-byte word in the buffer in little (or big) endianness, and have the
compiler either generate code to directly copy (if the native
architecture's endianness matches the spec's endienness) or have it
generate the optimal machine code sequence to do the swap if they don't
match.
The "build four-byte pixels into words" works just fine too.
(I forget the exact syntax, but it's something like)
outint : new integer 0..2^32-1;
outint'endian = little;
buffer : array [0..N] of outint;
buffer[i] = r * 256*256*256 + g * 256 * 256 + b * 256 + a;
If outint is in native form, it does the shifts and stores it, or
assigns the bytes, or whatever the compiler can come up with.
If outint is in byte-swapped order, the compiler can *also* deduce it
needs to do the shifts differently, and just assign bytes to the
appropriate places in the word.
(Note that compilers aren't dumb enough to actually multiply when you
say r * 256 * 256 * 256.)
Makes it much clearer code, methinks, and no ifdefs.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
>
> I am saying that I fail to see how split would *reduce* the number of
> files I have, considering its functionality.
>
Composing with some of those 49,999 other tools it gives you the
possibility of eg. removing a part (beginning, ending or from the
middle) of a file.
"Now, if Linux supported the thing that NTFS supports where you can
delete the beginning of a file, maybe I'd use that."
Well ok, after that you wrote about chopping the file, which practically
is what split does, but it should be able to work without creating
millions of (temp)files in the middle of the process.
--
Eero "Aero" Ahonen
http://www.zbxt.net
aer### [at] removethis zbxt net invalid
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>>> But if I wanted it to work all the time, I'd write it in C and be done
>>> with it - then the shell doesn't come into play. :-)
>> Yah, as I said, when it gets messy, I use Tcl. :-)
>
> Really the best option - remove the shell. :-)
Cool. I just hope your filenames don't contain any of the characters
that Tcl considers to be "special" either. :-P
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> outint'endian = little;
Exactly which language is this? And have you actually corroborated by
examining the resulting machine code that it indeed does as you say?
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Wed, 12 Mar 2008 09:15:42 +0000, Invisible wrote:
>>>> But if I wanted it to work all the time, I'd write it in C and be
>>>> done with it - then the shell doesn't come into play. :-)
>>> Yah, as I said, when it gets messy, I use Tcl. :-)
>>
>> Really the best option - remove the shell. :-)
>
> Cool. I just hope your filenames don't contain any of the characters
> that Tcl considers to be "special" either. :-P
Well, I use C, and it deals with literal strings, but I suspect TCL is
the same in that regard.
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nicolas Alvarez wrote:
> And also one reason why command-line tools are better for many things.
> (image editing probably not one of them)
Funny, there's a set of commandline tools for just that called
ImageMagick. :D
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Mike Raiford wrote:
> Nicolas Alvarez wrote:
>
>> And also one reason why command-line tools are better for many things.
>> (image editing probably not one of them)
>
> Funny, there's a set of commandline tools for just that called
> ImageMagick. :D
Image "editing"? Or simple image transformation operations?
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> Cool. I just hope your filenames don't contain any of the characters
>> that Tcl considers to be "special" either. :-P
>
> Well, I use C, and it deals with literal strings, but I suspect TCL is
> the same in that regard.
Tcl encodes all data types as strings. I've been bitten by this
before... You write a Tcl script, it works fine, and then it encounters
some input that happens to contain a curly-bracket or a dollar sign and
Weird Crap happens...
[I'm sure there's a way to avoid this. It's just tricky, and it makes me
nervous.]
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Mike Raiford escribió:
> Nicolas Alvarez wrote:
>
>> And also one reason why command-line tools are better for many things.
>> (image editing probably not one of them)
>
> Funny, there's a set of commandline tools for just that called
> ImageMagick. :D
Well yeah. But you can't do as much as you can in photoshop.
Can you make a good-looking POV-Ray scene *without ever looking at the
result*? :)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Wed, 12 Mar 2008 19:02:00 +0000, Orchid XP v7 wrote:
>>> Cool. I just hope your filenames don't contain any of the characters
>>> that Tcl considers to be "special" either. :-P
>>
>> Well, I use C, and it deals with literal strings, but I suspect TCL is
>> the same in that regard.
>
> Tcl encodes all data types as strings. I've been bitten by this
> before... You write a Tcl script, it works fine, and then it encounters
> some input that happens to contain a curly-bracket or a dollar sign and
> Weird Crap happens...
That's one of the potential pitfalls with most scripting languages.
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Eero Ahonen wrote:
> Well ok, after that you wrote about chopping the file, which practically
> is what split does, but it should be able to work without creating
> millions of (temp)files in the middle of the process.
The problem is the size of the file. If I split it after the fact, I now
have *two* files, the original and the new one. So now instead of half
an hour of deleting directory entries, I have three hours of copying
data, followed by five minutes of deleting one directory entry.
Split doesn't split a file. It writes new files, each of which contain
pieces of the previous file.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
> Cool. I just hope your filenames don't contain any of the characters
> that Tcl considers to be "special" either. :-P
I have, on occasion, got caught by a file whose name starts with ~. But
none of the other characters are special in Tcl file names. In
particular, spaces and brackets and such just don't come into play.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v7 wrote:
> Tcl encodes all data types as strings. I've been bitten by this
> before... You write a Tcl script, it works fine, and then it encounters
> some input that happens to contain a curly-bracket or a dollar sign and
> Weird Crap happens...
Only if you don't treat your lists as lists and your strings as strings.
Otherwise, the rules are extremely straightforward.
> [I'm sure there's a way to avoid this. It's just tricky, and it makes me
> nervous.]
I never get bitten by this. The only time this happens is when you pass
a string to something that indexes into a list, without first splitting
the string into lists appropriately.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> Darren New <dne### [at] san rr com> wrote:
>> outint'endian = little;
>
> Exactly which language is this?
Ada. I am pretty sure it supports this.
> And have you actually corroborated by
> examining the resulting machine code that it indeed does as you say?
No. Never needed to. It's not the sort of thing you leave out of a
language you're programming flight control software in.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
> Warp wrote:
>> Darren New <dne### [at] san rr com> wrote:
>>> outint'endian = little;
>>
>> Exactly which language is this?
>
> Ada. I am pretty sure it supports this.
It turns out the syntax is
for My_Type’Bit_Order use High_Order_First;
(The ' indicates a compile-time value, in much the same sense that
sizeof() is a compile-time function in C. Ada lets you read dozens of
these and set others, like the address, volitility, atomicity, etc.)
It also turns out it's not *quite* so straightforward especially for .
But clearly it's better to let the compiler do it in cases where it can
than to code different routines with #ifdef in there. Autoconf doesn't
make C portable - it rewrites your code to be non-portable to that
specific machine. :-)
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> Tcl encodes all data types as strings. I've been bitten by this
>> before... You write a Tcl script, it works fine, and then it
>> encounters some input that happens to contain a curly-bracket or a
>> dollar sign and Weird Crap happens...
>
> Only if you don't treat your lists as lists and your strings as strings.
> Otherwise, the rules are extremely straightforward.
>
>> [I'm sure there's a way to avoid this. It's just tricky, and it makes
>> me nervous.]
>
> I never get bitten by this. The only time this happens is when you pass
> a string to something that indexes into a list, without first splitting
> the string into lists appropriately.
I'm pretty sure I remember several occasions where if a certain
expression happened to return only 1 item, it tried to interpret the
item as a list. IOW, when the expression finds multiple matches,
everything works fine, but when it finds exactly 1 match it malfunctions
horribly. Took me ages to figure out why...
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> Tcl encodes all data types as strings. I've been bitten by this
>> before... You write a Tcl script, it works fine, and then it encounters
>> some input that happens to contain a curly-bracket or a dollar sign and
>> Weird Crap happens...
>
> That's one of the potential pitfalls with most scripting languages.
Now you know why I dislike scripting languages in general. ;-)
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> Autoconf doesn't make C portable
It only makes the C program to compile and work in a multitude of
different architectures. Yeah, it doesn't make it portable, only portable.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Darren New" <dne### [at] san rr com> wrote in message
news:47d6ca98@news.povray.org...
> Again, I tend to work with tens of thousands of files at once.
Tens of THOUSANDS?? I'm not that shocked at what a programmer can do,
but fair play for handling that.
~Steve~
> Darren New / San Diego, CA, USA (PST)
> "That's pretty. Where's that?"
> "It's the Age of Channelwood."
> "We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
St. wrote:
> Tens of THOUSANDS?? I'm not that shocked at what a programmer can do,
> but fair play for handling that.
Yeah. A couple weeks of raw audio, in 20-second chunks. Sadly, we throw
most of it away. :-)
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
> I'm pretty sure I remember several occasions where if a certain
> expression happened to return only 1 item, it tried to interpret the
> item as a list. IOW, when the expression finds multiple matches,
> everything works fine, but when it finds exactly 1 match it malfunctions
> horribly. Took me ages to figure out why...
You would need to either return a list, or return one item. If you want
to return either, you need to return a list of one item. Otherwise, yes,
if you sometimes return a list, and sometimes return one item that looks
like a malformed list, then you're going to confuse yourself.
if {$count > 1} {return $a}
if {$count == 1} {return [list $singleton]}
# Wrong:
# if {$count == 1} {return $singleton}
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Nicolas Alvarez
Subject: Re: Adventures with digital painting
Date: 13 Mar 2008 16:35:45
Message: <47d99e31@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Darren New escribió:
> Eero Ahonen wrote:
>> Well ok, after that you wrote about chopping the file, which
>> practically is what split does, but it should be able to work without
>> creating millions of (temp)files in the middle of the process.
>
> The problem is the size of the file. If I split it after the fact, I now
> have *two* files, the original and the new one. So now instead of half
> an hour of deleting directory entries, I have three hours of copying
> data, followed by five minutes of deleting one directory entry.
>
> Split doesn't split a file. It writes new files, each of which contain
> pieces of the previous file.
With dd you could copy any section of the file into a new one.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
> Invisible wrote:
>> I'm pretty sure I remember several occasions where if a certain
>> expression happened to return only 1 item, it tried to interpret the
>> item as a list. IOW, when the expression finds multiple matches,
>> everything works fine, but when it finds exactly 1 match it
>> malfunctions horribly. Took me ages to figure out why...
>
> You would need to either return a list, or return one item. If you want
> to return either, you need to return a list of one item. Otherwise, yes,
> if you sometimes return a list, and sometimes return one item that looks
> like a malformed list, then you're going to confuse yourself.
If was more that I was processing a list, filtering out some of its
content, and if it turned out that the result was exactly 1 element the
script behaved in a different way than it did when the filtering yielded
several elements.
But anyway, why worry? Just stop using Tcl. ;-)
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Nicolas Alvarez
Subject: Re: Adventures with digital painting
Date: 13 Mar 2008 16:54:38
Message: <47d9a29e@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Orchid XP v7 escribió:
> But anyway, why worry? Just stop using Tcl. ;-)
For some reason that reminded me of...
<FarSide> i had a guide that told u to put the 1.1.3 firmware file on
the touch
<Brethil> It will be way faster even if you decrypt it on your computer
and put the decrypted.dmg file on your iPod (should work, but I'm not
100% sure
<FarSide> then run the upgrade
<PovAddict> FarSide: I did that to save myself from a hour-long download
<PovAddict> but the iPod still did decryption, extraction, patching, etc
<FarSide> i chose the ron popeal method...set it and forget it
<FarSide> i just went to bed
<FarSide> lol
<PovAddict> okay, time to try this again
<PovAddict> ah wait... to copy the firmware I need ssh
<PovAddict> to install ssh I need BSD subsystem
<PovAddict> BSD subsystem messes with Cydia (which I haven't installed yet)
<FarSide> yup
<PovAddict> or, I could install Cydia and get saurik's ssh
<Brethil> you can also use iPHUC
<Brethil> to copy over usb
<FarSide> i just suggest suicide
<FarSide> a lot easier
<FarSide> lol
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nicolas Alvarez wrote:
> With dd you could copy any section of the file into a new one.
But again, it would take a long time to copy that. The point is to not
slog a half a terabyte of data from one disk to another in order to do
the processing.
It works out OK. It just takes surprisingly long. :-) It's automated at
this point, unless I specifically take it off automation, so it's not
like I'm waiting for it. It just kind of surprised me that deleting a
big file could take over a minute. Must be the ext3 journaling or
something going on. Ext was never really optimized for big files.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New escribió:
> Nicolas Alvarez wrote:
>> With dd you could copy any section of the file into a new one.
>
> But again, it would take a long time to copy that. The point is to not
> slog a half a terabyte of data from one disk to another in order to do
> the processing.
>
> It works out OK. It just takes surprisingly long. :-) It's automated at
> this point, unless I specifically take it off automation, so it's not
> like I'm waiting for it. It just kind of surprised me that deleting a
> big file could take over a minute. Must be the ext3 journaling or
> something going on. Ext was never really optimized for big files.
What do you do with the small section once you cut it? Can't you use
pipes to avoid so many temporary files?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |