Pseuds and academics may also like this version:
http://www.willamette.edu/~fruehr/haskell/evolution.html
Tom_
@Tom_
Best posts made by Tom_
-
RE: Evolution of a Programmer
Latest posts made by Tom_
-
RE: Evolution of a Programmer
Pseuds and academics may also like this version:
http://www.willamette.edu/~fruehr/haskell/evolution.html -
RE: Braindead Assembly Code
What's with the editing time limit? I am incorrect regarding the link register, because getNextSubFrame (etc.) appear to be externally-provided function calls (as I assume UART_INIT is too). Sorry.
-
RE: Braindead Assembly Code
Regarding setting the SP then overwriting it, presumably there's no way to tell in advance whether UART_INIT is going to make further jumps, nor how many levels deep these jumps will be. My ARM is fuzzy but I think it will need to save the intermediate link registers on the stack if it does so, because the CPU never stacks the return address for you. So it needs a bit of stack somewhere. I take it that 7FFF is the top of memory, which seems like a good place to start the stack, if you don't know how large it will become.
And regarding the "crazy" MOV, can you shift the immediate values? I don't remember, but the reference sheet implies not. But whatever, you only get 8 (contiguous) bits; so MOV Rn,#0x100 (aka #1 LSL #8, assuming you get the shiftings) buys you nowt, because you still need to add in the 1. Surely you can't get 0x101 in 1 instruction! 255+2 is perfectly fine; an alternative might be MOV Rn,#1 then OR Rn,Rn LSL #8.
Disclaimer: was too young to afford an Acorn Archimedes, so only the 6502 coding has stuck. And I only replied because the epitome of terminal laziness is surely getting the computer to write the code out for you, and not bothering to optimize it, rather than bumming the code senselessly down to some teeny tiny number of lines.
I don't doubt, of course, that this particular solution really does suck very very badly indeed, and that the poster's solution was a significant improvement :) -
RE: Preprocessor
Yes... sorry. I was righteously drunk that evening. But you know what they say about teaching a man to fish...
-
RE: Vim vs. IDE (flame on)
"There is a perfectly valid replacement of "fewer". It is "less".
Contrary to what a hapless linguist might think when investigating
American English, "less" applies to both a number of separate objects
(less keys, less trees, less things) and quantities of
materials/substances (less water, less metal, less code)."
Au contraire.
That little thingy next to the top of your post says you are posting
from "Dutchland". Where is that? Do they speak English there? Real
English? I submit that whilst they might speak some variant thereof,
such that they (and you) can make themselves understood, and, indeed,
that they probably speak this variant rather better than many right
here in England speak their variant, their (and your) ability to
prescribe what is and what is not correct is somewhat limited.
That goes double when you (or anyone else) suggests that "less lines of code" is in any way correct.
With that
in mind, allow me to provide, with full warranty (but no fee), my years
of experience in
reading and speaking the language. It is my native tongue, it's true,
and it's therefore to be expected that I take some liberties, but any
liberties I take are taken with my eyes wide open.
The word "few" is only ever applied to countable items. As the name
might suggest, these are items that one may count, such as (to continue
your example) lines of code. From this word "few", one may derive (via
the "-er" suffix) the word "fewer". The "-er" suffix is used to
generate the comparitive(sp?) form of a word. If I have a few items,
and you have a few, and, having counted our respective sets of items,
it turns out the number of items you have is greater than the number of
items I have, one would say that I have fewer items than you.
"fewer" is only ever an adjective.
The word "less", on the other hand, is used for uncountable items --
or, more strictly, uncountable entities. ("Item" implies countability.)
An example of an uncountable entity would be water. If I have some
water, and you have some water, and, having measured our respective
amounts of water, it turns out that you have more water than me, one
would say that I have less water than you.
It's possible, as you've noted, to apply the "-er" suffix to the word
"less". This word is slightly confusing, since it can be used both as
an adjective and as a noun. When used as an adjective, it is not,
strictly speaking, comparitive; rather, it is taken to mean that
something is of generally low value. (And it seems you have correctly
inferred this, for your example of "lesser lines of code" is correct.)
When used as a noun, it is used in a comparitive sense: compared to
something else, the lesser thing is the, um, lesser. For example, when
comparing 2 and 3, 2 is the lesser. (Some may argue that 2 is
countable, but this is not actually the case.)
Anyway. To go back to the original point, "nowt" and "naught" are most
assuredly not -- quite -- the same thing. "nowt" is pretty much
equivalent to "nothing". "naught", on the other hand, isn't. I'd have a
hard time articulating the exact difference, but it's indicated by
an example, which will be perplexing only to Americans:
"There's nowt in the fridge."
In this case, somebody from Yorkshire is saying that the fridge
contains nothing. Substituting "naught" for "nowt", however, results in a sentence that borders on the meaningless:
"There's naught in the fridge."
That's not to say, though, that "naught" is meaningless. For example:
"All their efforts were for naught."
All well and correct. They expended effort, but the desired result
was not attained. Substituting "nowt" for "naught" in this instance sounds, to my
ears, wrong. Maybe those who have more experience with the
Yorkshire dialect will put me straight with regards to this particular
example, but, based on my first example, the point stands -- they are not the same word.
("Grammatical bullshit", by the way, is what you say when somebody
tries to tell you what kind of word one may begin or end a sentence
with.)
-
RE: Preprocessor
Since English isn't your native language, I'd like to point out that you misspelled "fuck".<br>
Returning to your original message, have you tried running "cl /?" from the command prompt?
If that doesn't work, then note that VS.NET installs a file called
"vsvars32.bat" (or something similar) -- this is a batch file that sets
up environment variables (including PATH) such that the command-line
tools will work. On my PC, the installer helpfully set up PATH so that
the folder with "vsvars32.bat" was included; if that's not the case on
your PC, then you'll have to search for it, and run it by hand.
This information is apparently valid (but provided without warranty)
for VS.NET 2002. I don't recall it's being any different for 2003. -
RE: This way.
I have now noticed the helpful "Reply" button.
I also know how to spell "moron".
-
RE: This way.
God's teeth, how do I respond to a particular post?! This was intended to be to the preprocessor guy!
Good thing I know how to spell "fuck" ;)
-
This way.
Since English isn't your native language, I'd like to point out that you misspelled "cunting fuck".
Returning to your original message, have you tried running "cl /?" from the command prompt?
If that doesn't work, then note that VS.NET installs a file called
"vsvars32.bat" (or something similar) -- this is a batch file that sets
up environment variables (including PATH) such that the command-line
tools will work. On my PC, the installer helpfully set up PATH so that
the folder with "vsvars32.bat" was included; if that's not the case on
your PC, then you'll have to search for it, and run it by hand.
This information is apparently valid (but provided without warranty)
for VS.NET 2002. I don't recall it's being any different for 2003.