Click here to Skip to main content
15,900,461 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.

 
GeneralRe: Random though of the day Pin
Eddy Vluggen15-Jan-20 13:27
professionalEddy Vluggen15-Jan-20 13:27 
GeneralRe: Random though of the day Pin
Eddy Vluggen15-Jan-20 12:03
professionalEddy Vluggen15-Jan-20 12:03 
GeneralRe: Random though of the day Pin
Daniel Pfeffer15-Jan-20 19:15
professionalDaniel Pfeffer15-Jan-20 19:15 
GeneralRe: Random though of the day Pin
Eddy Vluggen15-Jan-20 23:12
professionalEddy Vluggen15-Jan-20 23:12 
GeneralRe: Random though of the day Pin
Mark_Wallace15-Jan-20 20:42
Mark_Wallace15-Jan-20 20:42 
GeneralRe: Random though of the day Pin
Amarnath S15-Jan-20 21:19
professionalAmarnath S15-Jan-20 21:19 
GeneralRe: Random though of the day Pin
the goat in your machine15-Jan-20 21:24
the goat in your machine15-Jan-20 21:24 
GeneralGosh this is interesting. Pin
honey the codewitch15-Jan-20 9:31
mvahoney the codewitch15-Jan-20 9:31 
I'm making a little virtual machine to run backtracking regular expressions. It only has a few opcodes but it's all I need for matching.

C#
enum Opcode
{
	Nop = 0,
	Char,
	Range,
	Match,
	Jmp,
	Split,
	Any,
	Save,
}


This is such a different approach than my non-backtracking expressions, which would basically be a subset of this machine with ... 2? instructions I think but it isn't implemented that way at all.

This is pretty cool. I can add regular expression features to the core runner by adding opcodes, but for the most part, I shouldn't need to add to these.

And they should be pretty easy to emit to either IL (as compiled) or C# (table driven) instructions

My instruction pointer is basically a List<Instruction> in tandem with an integer index. If I were doing it in C or C++ it would be an actual pointer, but I think a side effect of this is mine in some ways is a bit more efficient in that it doesn't need as many heap allocs as doing this in C in the most obvious way would, simply because of the way I've organized it.

I'm a long way from an article yet. I'm not even done with my machine compiler yet, but I'm still excited about it. This is cool stuff. Smile | :)
Steve Wozniak is the only thing at Apple that isn't evil.

GeneralRe: Gosh this is interesting. Pin
Eddy Vluggen15-Jan-20 11:56
professionalEddy Vluggen15-Jan-20 11:56 
GeneralRe: Gosh this is interesting. Pin
Greg Utas15-Jan-20 12:04
professionalGreg Utas15-Jan-20 12:04 
GeneralRe: Gosh this is interesting. Pin
honey the codewitch15-Jan-20 13:41
mvahoney the codewitch15-Jan-20 13:41 
GeneralRe: Gosh this is interesting. Pin
Eddy Vluggen15-Jan-20 13:54
professionalEddy Vluggen15-Jan-20 13:54 
GeneralRe: Gosh this is interesting. Pin
Greg Utas15-Jan-20 14:03
professionalGreg Utas15-Jan-20 14:03 
GeneralRe: Gosh this is interesting. Pin
Eddy Vluggen15-Jan-20 14:25
professionalEddy Vluggen15-Jan-20 14:25 
GeneralRe: Gosh this is interesting. Pin
Greg Utas15-Jan-20 14:47
professionalGreg Utas15-Jan-20 14:47 
GeneralRe: Gosh this is interesting. Pin
honey the codewitch15-Jan-20 14:12
mvahoney the codewitch15-Jan-20 14:12 
QuestionRe: Gosh this is interesting. Pin
Eddy Vluggen15-Jan-20 14:31
professionalEddy Vluggen15-Jan-20 14:31 
AnswerRe: Gosh this is interesting. Pin
honey the codewitch15-Jan-20 14:37
mvahoney the codewitch15-Jan-20 14:37 
GeneralRe: Gosh this is interesting. Pin
Greg Utas15-Jan-20 14:01
professionalGreg Utas15-Jan-20 14:01 
GeneralRe: Gosh this is interesting. Pin
honey the codewitch15-Jan-20 14:13
mvahoney the codewitch15-Jan-20 14:13 
GeneralUh-oh Pin
Mark_Wallace15-Jan-20 20:46
Mark_Wallace15-Jan-20 20:46 
GeneralRe: Uh-oh Pin
honey the codewitch16-Jan-20 2:19
mvahoney the codewitch16-Jan-20 2:19 
RantJumping on the hate Microsoft bandwagon Pin
ZurdoDev15-Jan-20 5:40
professionalZurdoDev15-Jan-20 5:40 
GeneralRe: Jumping on the hate Microsoft bandwagon Pin
Rick York15-Jan-20 5:43
mveRick York15-Jan-20 5:43 
GeneralRe: Jumping on the hate Microsoft bandwagon Pin
ZurdoDev15-Jan-20 5:53
professionalZurdoDev15-Jan-20 5:53 

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.


Straw Poll

Were you affected by the geomagnetic storms this past weekend?
Communication disruptions, electrified pipes, random unexplained blue-screens in Windows - the list of effects is terrifying.
  Results   488 votes