|
I sometimes wrestle with this because I find what's interesting to me is not to other people. I like theory a lot, and sometimes people are just more practical.
So I have an upcoming article I'm writing that is rather involved.
It's a tool that allows you to write .NET code in a subset of C#, and then it will render that subset to any .NET language (VB, C#, F#) whatever.
What it's for is to make it easier to develop code generation tools. You can use something like T4 text templating with it to render dynamic code instead of having to build a CodeDOM graph in code without sacrificing the language agnostic nature of the CodeDOM.
What it does is turn a CodeDOM compatible syntactic subset of C# into a CodeDOM graph
How it works involves parsing, type and name resolution, - basically everything a compiler does except the actual code generation part. So like, two of the three tiers.
So, the article could be an article about the tool, or it could be an article on like a beginners compiler writing guide.
Which is more interesting? The tool or the pseudo-compiler guide?
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.
|
|
|
|
|
Please both So two connected articles. Why?
a.) Both are interesting
b.) During christmas you have a lot of time
c.) But the most important: It will hopefully helps you having your hand on the keyboard and therefore away from cigarettes
It does not solve my Problem, but it answers my question
modified 19-Jan-21 21:04pm.
|
|
|
|
|
I agree with @0x01AA, both would be interesting. The tool alone would be useful and I believe that once one can try how it works, the theory becomes interesting.
Hope you have time to write both
|
|
|
|
|
Thanks! I appreciate hearing that. I write a lot of code generation tools - mostly lexers/tokenizers and parsers, but people don't always seem so keen on them. They're very specialized, I guess.
I'm not really sure if people just gave up on the CodeDOM in recent years, but I still use it a lot.
So I'm glad to hear someone else finds the topic of interest. It has kept me glued to my keyboard for days so far.
Console.WriteLine(CD.ToString(SP.ParseStatement("a=1;")));
Console.WriteLine(CD.ToString(SP.ParseStatement("while(true) return (1 + 2)* (Int64)1;")));
Console.WriteLine(CD.ToString(SP.ParseTypeRef("int[][,,][,,]")));
Console.WriteLine(CD.ToString(SP.ParseExpression("new int[][] { new int[] {} }")));
Console.WriteLine(CD.ToString(SP.ParseExpression("foo[10](1).bar")));
Console.WriteLine(CD.ToString(SP.ParseExpression("\"Hello World!\"")));
Still a long way to go. And don't worry, SP and CD aren't actual class names! I'm aliasing SlangParser and CodeDomUtility using using because I like my fingers to not be worn out.
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.
|
|
|
|
|
See my tool. That should generate clicks o' plenty.
|
|
|
|
|
|
Forogar wrote: seeing how you develop the tool itself could be very interesting
Winging it, mostly.
At some point I should probably pick up a book on parsers and compilers and stuff.
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.
|
|
|
|
|
maybe u should apply for a job at microsoft... and ya they will make you write a ebook which offcourse will be free ...so that dev will learn you great works and you will become immortal
Caveat Emptor.
"Progress doesn't come from early risers – progress is made by lazy men looking for easier ways to do things." Lazarus Long
|
|
|
|
|
I already worked there more than once.
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.
|
|
|
|
|
how about a compiler for the new quantum computer...its likes it will and will not compile ....
Caveat Emptor.
"Progress doesn't come from early risers – progress is made by lazy men looking for easier ways to do things." Lazarus Long
|
|
|
|
|
you could start by a - brief - description of the language subset and a rationale for its "design"
|
|
|
|
|
Well, obviously both would be nice.
But when it's, give a man a fish vs teach a man to fish...
|
|
|
|
|
The best way to find the answer is to publish the article(s). The opinions in the Lounge do not necessarily accord with those of the people who read articles.
|
|
|
|
|
These adverts telling me to "give blood" are all very well, but I still think it's going to freak the kids out on Christmas morning.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Be positive - I am sure they will enjoy it. Gift giving is almost never in vein.
I, for one, like Roman Numerals.
|
|
|
|
|
OriginalGriff wrote: but I still think it's going to freak the kids out on Christmas morning. simple, make it into blood sausage and stick it in a bun
... bit of cheese, bit of mustard (or being for kids drown it in tomato sauce)
they'll never know the difference.
sausage inna bun! sausage inna bun!
this internet has become nothing but fake news.
... time to fix it, time to get back to the fax!
|
|
|
|
|
Tell them it's OK, even Santa is on board with this, he named one of his reindeer 'Doner' didn't he?
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
jeron1 wrote: he named one of his reindeer 'Doner' didn't he?
As in kebab?
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Alas, sanguine puns. Aorta remind you that you can plasma readers if there's there's a clot of solid imagery involved.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Brains... we want brains...
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
|
I tried giving blood. They kept asking me where I got it from and why it was in a bucket.
|
|
|
|
|
I would give blood but when I try to give they ask all those silly questions;
Whose blood is it/
Where did you get it?
Why is it in a baggie?
I don't think they really want it!
They call me different but the truth is they're all the same!
JaxCoder.com
|
|
|
|
|
So I've inherited this WinForms project for a customer who's a two hour drive away.
It's a fun project and a good customer, but the code quality is... It (mostly) works, let's leave it at that
What's worse though, is the manner of deployment.
Which is each work station one by one
Software on a USB and go.
Of course a couple of people aren't at the office or have another work laptop at home.
In that case it's phone them one by one and update using TeamViewer.
Since I'm not going there for every update (which can be ad-hoc and unplanned) the phone and Team Viewer option is used frequently.
I wrote a little program that closes the application and then copy/pastes a newer version from a file server which also happens to be someone's regular computer.
That way I only need to copy/paste the new version to a single computer and everyone gets the new version.
That sounds great except not everyone has file access to that computer (even though it has all the reports and the database as well).
Seems like I'll be updating individual workstations for a while...
Any sort of version control wasn't present until now, so everyone has version 1.0.0.0, but they can still be different code bases (but the individual code bases can never be recovered unless you do some reverse engineering).
Time to bring some change around here!
|
|
|
|
|
Quote: Software on a USB and go.
And that children is how virus travel...
|
|
|
|