Click here to Skip to main content
14,455,289 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 14:27
professionalEddy Vluggen15-Jan-20 14:27 
GeneralRe: Random though of the day Pin
Eddy Vluggen15-Jan-20 13:03
professionalEddy Vluggen15-Jan-20 13:03 
GeneralRe: Random though of the day Pin
Daniel Pfeffer15-Jan-20 20:15
professionalDaniel Pfeffer15-Jan-20 20:15 
GeneralRe: Random though of the day Pin
Eddy Vluggen16-Jan-20 0:12
professionalEddy Vluggen16-Jan-20 0:12 
GeneralRe: Random though of the day Pin
Mark_Wallace15-Jan-20 21:42
MemberMark_Wallace15-Jan-20 21:42 
GeneralRe: Random though of the day Pin
Amarnath S15-Jan-20 22:19
professionalAmarnath S15-Jan-20 22:19 
GeneralRe: Random though of the day Pin
the goat in your machine15-Jan-20 22:24
Memberthe goat in your machine15-Jan-20 22:24 
GeneralGosh this is interesting. Pin
honey the codewitch15-Jan-20 10:31
mvahoney the codewitch15-Jan-20 10: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.

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 12:56
professionalEddy Vluggen15-Jan-20 12:56 
GeneralRe: Gosh this is interesting. Pin
Greg Utas15-Jan-20 13:04
professionalGreg Utas15-Jan-20 13:04 
GeneralRe: Gosh this is interesting. Pin
honey the codewitch15-Jan-20 14:41
mvahoney the codewitch15-Jan-20 14:41 
GeneralRe: Gosh this is interesting. Pin
Eddy Vluggen15-Jan-20 14:54
professionalEddy Vluggen15-Jan-20 14:54 
GeneralRe: Gosh this is interesting. Pin
Greg Utas15-Jan-20 15:03
professionalGreg Utas15-Jan-20 15:03 
GeneralRe: Gosh this is interesting. Pin
Eddy Vluggen15-Jan-20 15:25
professionalEddy Vluggen15-Jan-20 15:25 
GeneralRe: Gosh this is interesting. Pin
Greg Utas15-Jan-20 15:47
professionalGreg Utas15-Jan-20 15:47 
GeneralRe: Gosh this is interesting. Pin
honey the codewitch15-Jan-20 15:12
mvahoney the codewitch15-Jan-20 15:12 
QuestionRe: Gosh this is interesting. Pin
Eddy Vluggen15-Jan-20 15:31
professionalEddy Vluggen15-Jan-20 15:31 
AnswerRe: Gosh this is interesting. Pin
honey the codewitch15-Jan-20 15:37
mvahoney the codewitch15-Jan-20 15:37 
GeneralRe: Gosh this is interesting. Pin
Greg Utas15-Jan-20 15:01
professionalGreg Utas15-Jan-20 15:01 
GeneralRe: Gosh this is interesting. Pin
honey the codewitch15-Jan-20 15:13
mvahoney the codewitch15-Jan-20 15:13 
GeneralUh-oh Pin
Mark_Wallace15-Jan-20 21:46
MemberMark_Wallace15-Jan-20 21:46 
GeneralRe: Uh-oh Pin
honey the codewitch16-Jan-20 3:19
mvahoney the codewitch16-Jan-20 3:19 
RantJumping on the hate Microsoft bandwagon Pin
ZurdoDev15-Jan-20 6:40
mveZurdoDev15-Jan-20 6:40 
GeneralRe: Jumping on the hate Microsoft bandwagon Pin
Rick York15-Jan-20 6:43
mveRick York15-Jan-20 6:43 
GeneralRe: Jumping on the hate Microsoft bandwagon Pin
ZurdoDev15-Jan-20 6:53
mveZurdoDev15-Jan-20 6: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.