Click here to Skip to main content
15,887,214 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralWordle 882 Pin
Sandeep Mewara17-Nov-23 18:43
mveSandeep Mewara17-Nov-23 18:43 
GeneralRe: Wordle 882 - 3 4 me Pin
pkfox17-Nov-23 20:35
professionalpkfox17-Nov-23 20:35 
GeneralRe: Wordle 882 Pin
GKP199217-Nov-23 21:03
professionalGKP199217-Nov-23 21:03 
GeneralRe: Wordle 882 Pin
Cp-Coder17-Nov-23 23:33
Cp-Coder17-Nov-23 23:33 
GeneralRe: Wordle 882 Pin
StarNamer@work17-Nov-23 23:35
professionalStarNamer@work17-Nov-23 23:35 
GeneralRe: Wordle 882 Pin
Amarnath S17-Nov-23 23:57
professionalAmarnath S17-Nov-23 23:57 
GeneralRe: Wordle 882 Pin
jmaida18-Nov-23 14:30
jmaida18-Nov-23 14:30 
QuestionLittle victories and an ask Pin
honey the codewitch17-Nov-23 14:20
mvahoney the codewitch17-Nov-23 14:20 
Some background (story time):

Today I found and fixed a parsing bug in Slang. Slang turns a subset of C# into an abstract syntax tree that can then be analyzed, transformed, or outputted in any language that ASP.NET can use. That's right, you can use it to turn C# code into VB.NET code for example, but that's not its primary purpose, so much as language independent code generation, code analysis and code transformation is.

Deslang takes that C# subset and creates code that builds that Abstract Syntax Tree in code. It constructs a source file, that has methods that build the object model using constructors, setting fields, etc, until the entire tree is built out.

Your first question might be, "why in heck would you do this last bit especially except out of boredom?"

The answer is several fold, but primarily has to do with performance. Slang doesn't get enough information from just parsing C# because C# is highly ambiguous without applying type information, which isn't done typically during a parse. So after the fact, I have to analyze the parse tree and determine for example, which identifiers refer to fields, and which ones refer to properties. This takes a long time, but that's what it takes to build the tree. Deslang does this once, and gives you code to rebuild the tree instantly.

I didn't have to go into so much detail above but I'm proud of that mess. It's probably the most ambitious thing I've ever done in C#.

Anyway, my lexer generator, Rolex uses this technology to do language independent source code generation that's highly templatized. I insert the necessary code in Slang (C# subset) and then perform some visits and transformations on it to get the final tree to generate, which can then be emitted in one of many .NET languages.

Are you with me so far?

Okay, question time:

Rolex uses that along with some other tools I built in order to be built from source in the first place.

This requires me to either include the executables for the build tools with the project or include the projects, like Deslang and all supporting projects (there are several) in a giant solution. Keep in mind these aren't traditional dependencies - they are build tools that are run during pre-build events to generate code.

But I've gotten flack for checking executables into git on my public projects. Like, I've even been insulted over it (not that reddit isn't full of toxicity in general)

So what would you do? (reddit hecklers aside) - should I include these build tool projects as source in the solution? The executables? The executables and their links to dependent projects in the README? (will be kind of a mess to structure everything for reasons, but I'm game if it's the best solution)

I'd love input on this. I'm so torn. Dead | X|
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix

AnswerRe: Little victories and an ask Pin
MarkTJohnson17-Nov-23 14:32
professionalMarkTJohnson17-Nov-23 14:32 
GeneralRe: Little victories and an ask Pin
honey the codewitch17-Nov-23 14:57
mvahoney the codewitch17-Nov-23 14:57 
AnswerRe: Little victories and an ask Pin
Mircea Neacsu17-Nov-23 15:41
Mircea Neacsu17-Nov-23 15:41 
GeneralRe: Little victories and an ask Pin
Greg Utas18-Nov-23 2:24
professionalGreg Utas18-Nov-23 2:24 
AnswerRe: Little victories and an ask Pin
Roger Wright18-Nov-23 5:44
professionalRoger Wright18-Nov-23 5:44 
AnswerRe: Little victories and an ask Pin
lmoelleb18-Nov-23 6:04
lmoelleb18-Nov-23 6:04 
GeneralRe: Little victories and an ask Pin
honey the codewitch18-Nov-23 6:22
mvahoney the codewitch18-Nov-23 6:22 
AnswerRe: Little victories and an ask Pin
Grotsoft19-Nov-23 22:31
Grotsoft19-Nov-23 22:31 
AnswerRe: Little victories and an ask Pin
jschell20-Nov-23 8:12
jschell20-Nov-23 8:12 
GeneralRe: Little victories and an ask Pin
honey the codewitch20-Nov-23 8:21
mvahoney the codewitch20-Nov-23 8:21 
GeneralRe: Little victories and an ask Pin
trΓΈnderen20-Nov-23 9:16
trΓΈnderen20-Nov-23 9:16 
GeneralRe: Little victories and an ask Pin
honey the codewitch20-Nov-23 16:32
mvahoney the codewitch20-Nov-23 16:32 
GeneralRe: Little victories and an ask Pin
jschell21-Nov-23 4:55
jschell21-Nov-23 4:55 
GeneralRe: Little victories and an ask Pin
honey the codewitch21-Nov-23 4:57
mvahoney the codewitch21-Nov-23 4:57 
GeneralRe: Little victories and an ask Pin
jschell22-Nov-23 7:17
jschell22-Nov-23 7:17 
GeneralI Drank My Beer Pin
Steve Raw17-Nov-23 12:36
professionalSteve Raw17-Nov-23 12:36 
GeneralRe: I Drank My Beer Pin
englebart17-Nov-23 13:14
professionalenglebart17-Nov-23 13:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.