|
I like the state machine setup that is basically an abstract/pure virtual super class where each possible input is a method that returns the next state. Each state is a concrete class that must implement all of the input methods.
It would likely take up more memory with vtables than your approach, but I like that it makes the introduction of a new input a compile time check on all of the states. Same if you add a new state; you have to define transitions for every input.
I prefer compile time checks, but I work on a memory hog of a system where we have that luxury.😊
|
|
|
|
|
If you take a look at Reggie: A Non-Backtracking Streaming Regular Expression Code Generator[^] you'll see that since the state machines end up compiled, the input states are about as checked as they're going to get.
In this way you dictate the state machine specs, it then creates an in memory digraph of the states, which it then does some transformations on before compiling into code, at which point *everything* is compiled - in this case into goto tables - one label for each state. Although it can also generate a table/array based matcher
Because of how that works, your solution actually doesn't actually fit that particular application (and this is how i most often use them). Because it goes spec->state-machine->code, not spec->coded-state-machine
At least if I understand you.
Real programmers use butterflies
|
|
|
|
|
Whenever I let the blessing of my intelligence go to my head, as happens from time to time - which makes me foolish as a result - I try to solve Arden's Theorem in code. It's readily doable. It's proven possible. A CS major could do it over lunch. I've been trying for years.
I've also tried to implement an alternative algorithm. It's equally frustrating.
But it reminds me that I don't know everything, and certain things may remain beyond my reach.
Part of me hopes I never solve it. It's a wonderful lesson in humility.
Real programmers use butterflies
|
|
|
|
|
I thought you were going to say it's chow mein.
|
|
|
|
|
I like the Ardens in Belgium too
|
|
|
|
|
I prefer the Ardennes.
Good paté.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Ah, spelling error, all too common amongst developers
|
|
|
|
|
Best smoked ham I ever had was in the Ardennes.
|
|
|
|
|
Ardens, Ardennes, smoked ham .... now my head hurts!
Get me coffee and no one gets hurt!
|
|
|
|
|
|
You should probably pose the question to a butterfly
Thar's only two possibilities: Thar is life out there in the universe which is smarter than we are, or we're the most intelligent life in the universe. Either way, it's a mighty sobering thought. (Porkypine - via Walt Kelly)
|
|
|
|
|
Interesting problem... I've never looked into it because there was no such thing when I was programming for a living. It seems that the Keene's algorithm is key to the solution. This is something worth investigating, as I love state machines, and they seem to have gone out of favor.
Will Rogers never met me.
|
|
|
|
|
Vexed - Epiphany[^]
Last week I was checking out my bookmarked album on Spotify and decided a lot had to go.
Vexed was on the nominee list, added them some weeks ago because the (debut) album got good reviews, but it didn't stick with me and never listened to it since.
So I gave it one last chance and then removed it from my bookmarks after the third song or so...
Except after a few songs more I really got into it and re-added it to my list.
Been listening pretty much nothing else since.
Love the mix of technical brutal death metal with the female vocals (all the vocals are sung by that same woman by the way).
Some reviewer gave them the label "brutal 'female-fronted' progressive metalcore", so there's that.
It's a bit hard to choose just one song because the entire album is just killer, but Epiphany has a nice clean refrain (just like Aurora, but this one also had a video).
Not just song of the week, but album of the week
|
|
|
|
|
|
I must confess, I expected more bleeps and bloops.
Still good stuff though
|
|
|
|
|
Greetings Kind Regards Surely you're joking Mr. Feynman May I instead suggest Beverly-Glenn-Copeland Her work is available on Spotify - Cheerio
|
|
|
|
|
PaltryProgrammer wrote: Greetings Kind Regards Surely you're joking Mr. Feynman You keep saying this, but you really have to explain this one to me.
PaltryProgrammer wrote: Beverly-Glenn-Copeland Some of his music reminds me of Moby, good stuff
|
|
|
|
|
Surely-Youre-Joking-Mr-Feynman[^]
I enjoyed learning of Moby In particular it was a pleasure to hear his "Extreme Ways" It took me a while to recall the film which utilized it as its' opening theme - Kind Regards Cheerio
|
|
|
|
|
|
Checked out the new Whitechapel last week, made a very bad start with Orphan and kind of didn't want to listen anymore after that
Now Fallujah I like
|
|
|
|
|
Concerning Quote: made a very bad start with Orphan and kind of didn't want to listen anymore true words idd as after "Mark of the Blade" they became less captivating, also for me ... Their earlier albums had some good moments, but they are now superceeded ...
Cheers,
[and back to work as I have things to do, and I still hope to find time to write articles for CP, too ...]
|
|
|
|
|
I have just started watching this, in my country only two episodes are available so far. It is pretty, eh, elephanting intense. Some amazing screenwriting on The Beeb. Starring Sureanne Jones whose characters in others have not knocked me to the floor but here she is spot on.
BBC iPlayer - Vigil[^]
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
And now I have this song Blue Oyster Cult - The Vigil - YouTube[^] stuck in mind.
GCS d--(d-) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
|
Refreshment in science room makes stats methods in dismal science. (12)
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|