 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
(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>
|
|
 |
|  |
|  |
|
 |
> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |