|
Hah! The traditional problem that I should be old enough and wise enough to be sceptical about!
Just because one of my reference works declared something to be a constant, that does not mean I should believe them. It may have been a constant when people were using an abacus to add with, but it ain't now. looks like I have to do some research and then write yet another polynomial.
the first and second sets of errors, moved to an understandable range and rounded:-
1.7 -0.1
1.6 -0.1
1.7 0.0
1.8 0.1
1.9 0.2
2.1 0.3
2.2 0.3
1.7 0.1
1.5 -0.2
1.5 -0.3
1.7 -0.2
2.0 0.1
1.8 0.0
My target accuracy was -3.0 >> +3.0
I took the so called 'constant' and adjusted it by bracketing down to new values, and have learned that although the 'constant' changes very slowly, it does change. I tweaked the digit in the eighth
significate position.
Constants ain't!
[edit]Tabs don't stick![/edit]
|
|
|
|
|
the only constant is change. and I'm sure i'm wrong about that being constant.
we are adrift.
my code doesn't even execute the same way twice.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
|
I think I'll need all that and some more by the time I finish this.
|
|
|
|
|
Hi,
I've always been interested in learning parsing and compiler design, and especially parser generation just like the stuff you're doing.
I never had the time to sit down and study it. (It's not something I can pick up on the fly.)
You seem to have loads of practical hands-on experience based upon the projects you're describing here.
How did you first learn it? Is that what you did at Microsoft?
Thank you
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I was in your shoes actually, although I had played around with it some when I was young.
At microsoft I did not work on compiler stuff. I wish I did, I was hoping for a spot on the compiler team - even testing - over at MSR (back when Herb Sutter was there) to the point where I punted a separate position at MSR to hold out for it (i didn't get it but i'm glad i tried)
I taught myself. I can teach you.
It's a pain in the backside until you "get it" - then it's still a pain but you can at least navigate.
I can break down LL(1) parsing for you pretty easily though.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
honey the codewitch wrote: It's a pain in the backside until you "get it"
Oh I really know what you mean. A lot of things are difficult for me until they click. But once they click I'm able to do them well.
What's MSR?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
it's microsoft research. sorry. the lingo still sticks with me. MS is acronym hell. years of them being drilled into i use them without thinking.
have you used parser generators before at all?
if so I can probably teach you the birds-eye of generating an LL(1) parser in 10-20 minutes.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Yes, I once experimented with lex and Yacc but I just couldn't find enough real world examples of "scripts" for them. I understood BNF, but not how to use lex and yacc.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
lex and YACC are hard.
if i gave you a simple ruleset that's basically really stripped BNF, you might get it, eh?
How about
E -> E + T | T
T -> T * F | F
F -> ( E ) | int
or longhand
E -> E + T
E -> T
T -> T * F
T -> F
F -> ( E )
F -> int
This represents a very simple expression grammar with positive ints, +, * and () supported
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Well, I did understand it at the time. Only by now I have forgotten it all. <nervous laugh>
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
well that's a variant. I mean, things like XBNF are a lot friendlier but the computer can't do much with them directly.
how about if i pretty it up some and put it in xbnf?
expr= expr "+" term | term;
term= term "*" factor | factor;
factor= "(" expr ")" | int;
it works using substitution. Every time it finds either "term" or "expr" "+" "term" it replaces that with "expr"
(note it's cyclical here, that makes a loop)
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Ah yes, I see. Each successive line defines the symbol that was declared on the line above it?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
in this case yes, but not necessarily. They can be in any order. They do reference each other though and that's how you figure out what replaces what
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Back when I was in undergraduate school, lexical analysis and compiler design were all taught in Computer Science. They don't seem to do that much anymore, though.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Ain't that the truth. Now it's only about learning how "to code".
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
i never went to school for it. I wound up at microsoft at 18 instead. But compilers and parsers have always been an interest of mine.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Isn't the Roslyn compiler open source?
And maybe Honey can contribute
|
|
|
|
|
A bug in Microsoft's CodeDOM for the VB language forced me to change my code if I wanted to support VB.
Well, I feel like i need a shower, but the next rev will support VB code generation
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
If changing your code so it works with VB feels like you need a shower, just wait until you write actual VB code to test it out.
Bring out the peroxide and pressure washer.
|
|
|
|
|
i have a "friend" i can fob that off on. poor guy
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Okayyyy...You've already said more than enough.
|
|
|
|
|
Sometimes I accidentally leave my project in "Release" configuration, and I barely notice or don't notice at all.
The debugger attaches, breakpoints hit, and unlike C++ I have the entire stack frame and everything else at my fingertips, in C#, just like in debug mode.
There's very little actual code optimization done at this phase, or at least that used to be the case, and based on a little test @Super Lloyd (don't know how to tag here) ran some time back still seems to be. This is perhaps Microsoft's dirty little secret, they don't do much whole program optimization.
But mostly, the debugger works great because all the type information is there, even release, so you have the offsets of every member, and all the names.
It almost raises the question of why bother even having debug mode in .NET aside from conditional compiles (#define DEBUG) and metadata attributes related to it.
I think i may have hit a snag hitting a breakpoint in some scenarios but most of the time everything just works.
Not that I recommend this. I just find myself in release without noticing for awhile because of it.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
With C#, I do both debug and release modes with full debug info.
|
|
|
|
|
honey the codewitch wrote: don't know how to tag here
It's pretty simple.
In many cases you can just use an "@", followed by the username: @OriginalGriff
And the system will replace it with the link, and send the email as it did with me.
But yours is harder: @honey the codewitch won't work, because that isn't what you started with, and it contains spaces. So I go to your homepage, and below your username is the correct code: @code-witch
For Super Lloyd, you do the same thing, and get @Super-Lloyd which is who you were trying to acknowledge.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|