|
|
That's the one I got:
Tiny picture PIC
for endless (lose last letter)
pleasant NICe
family outing
I suspect you are up tomorrow!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
yeah, you are up tommorow
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
(Reference source provided below)
So optimizing my lexer machine is slow going, but i'm feeling clever.
Introducing a new switch/case instruction worked, cutting the lexing time for the DFA version of my simple test lexer to as little as half what the NFA version costs
NFA lex: fubar bar 123 1foo bar -243 0
Lexed in 0.0217 msec
DFA lex: fubar bar 123 1foo bar -243 0
Lexed in 0.0134 msec
The trouble i'm having is
A) loading lazy quantified regexs into the NFA graph. I don't know how to represent them
B) Doing a partial, opportunistic transformation from NFA to DFA. I am running into trouble due to my use of a rangeset as my basic input alphabet element among other things.
Once I can do that though, I'll have significantly optimized this little machine. And I'll have what will be pretty close to a "real" optimizing compiler for it.
NFA version:
jmp id, int, space, error
id: ; [A-Z_a-z][0-9A-Z_a-z]*
set "A".."Z", "_", "a".."z"
id_loop: jmp id_part, id_done
id_part: set "0".."9", "A".."Z", "_", "a".."z"
jmp id_loop
id_done: save 1
match 0
int: ; (0|\-?[1-9][0-9]*)
jmp int_zero, int_nonzero
int_zero:
char "0"
jmp int_done
int_nonzero: jmp int_neg, int_pos
int_neg: char "-"
int_pos: set "1".."9"
int_loop:
jmp int_part, int_done
int_part: set "0".."9"
jmp int_loop
int_done: save 1
match 1
space: ; (\t|\n|\v|\f|\r| )
set "\t", "\n", "\v", "\f", "\r", " "
save 1
match 2
error: ; anything not caught above returns -1
any
save 1
match -1
DFA version:
save 0
switch case "A".."Z","_","a".."z":id_part, case "0":int_done,case "-":int_neg,case "1".."9":int_digits,case "\t", "\n", "\v", "\f", "\r", " ":space,default:error
id_part:
switch case "0".."9","A".."Z","_","a".."z":id_part, default:id_done
id_done:
save 1
match 0
int_neg:
set "1".."9"
int_digits:
switch case "0".."9":int_digits, default:int_done
int_done:
save 1
match 1
space:
save 1
match 2
error:
any
save 1
match -1
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: but i'm feeling clever. That can't be good
Everything else from your post seemed like unintelligible witching gibberish.
I tried to read it to a coworker, but I summoned a demon who is now getting me tea
|
|
|
|
|
Oh great! Can you email me the Dutch you used in the hope I'll get a Coffee Demon?
Even a Tea Demon would help - Herself wouldn't bother me quite so much if she had one ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I'll email you coffee.sh
you can stick it in initd
Real programmers use butterflies
|
|
|
|
|
Just make sure you read the witch' code out loud with a hard, guttural, Dutch G, so "GGGar" instead of "tsjar" for char.
Demons really love that G!
|
|
|
|
|
YOU READ IT ALOUD?
Oh no. Burn your screen, all your personal effects, and move to a different postal code.
I should have included a warning.
Real programmers use butterflies
|
|
|
|
|
Why?
Did it somehow send my address to you?
|
|
|
|
|
Worse. So much worse.
*hides*
Real programmers use butterflies
|
|
|
|
|
Quick, someone call Bob Howard[^]!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Will it go away if you say its name three times or does that cause it to summon its associates?
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
honey the codewitch wrote: lexer machine
i'm feeling clever You know that if you do actually manage to kill Superman, you won't have many friends around these parts.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Hahaha
I didn't kill him though. I think a horse riding accident was the beginning of the end for him.
Real programmers use butterflies
|
|
|
|
|
|
But... But that's like... The very first test you automatically run if you run any tests at all
|
|
|
|
|
I know! Unbelievable, isn't it?
They didn't even try running the thing on a phone!
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Luckily I have no 'Android app' installed on Twitter...
"The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012
|
|
|
|
|
|
I'm currently designing 26 new programming languages and I already know what to name them.
AA, AB, AC...
The next 26 are going to be a hassle though
|
|
|
|
|
For string processing languages, you have the 26 names A$ to Z$.
I really think you should name the other languages A0 .. A9 .. Z0 .. Z9.
(Sometimes I miss the simplicity of the first programming language I learned: BASIC, 1975 vintage.)
|
|
|
|
|
|
In my student days, we had printers with ISO 646-60 character set - that is "ASCII" with the positions available to national letters assigned to ÆØÅæøå. Unicode/UTF-8 was years into the future then - we were still fighting to make Americans understand that there could possibly exist more than 26 alphabetic characters. We were in the transition from Pascal to C as the major programming language, going from "if x > 5 then begin ... end" to (as it came out on the printer) "if (x > 5) æ ... å".
Now, the sound of the 'æ' letter is quite close to "Eeeee?". The sound of 'å' is close to "Oh!". So for a few years, until the printers and software were updated to handle more characters, when verbally referring to source code, we commonly read it out as "if (x > 5), Eeeeh??? ... Ooooh!!", with a very pronounced questioning tone for the 'æ', and the 'å' like an "Aha!" - "Now I get it!" tone. In some situations, the Eeeeh???s and Ooooh!!s fit perfectly in!
Another memory: Algol 68 was considered a crazy language in those days, proving mechanisms next to impossible to implement (but every language offers today...). One thing was that it defined abstract tokens; a compiler writer could (at least in principle) choose to look for an English "if", a Norwegian "hvis" or a German "wenn". And there was in fact a German Algol-68 compiler out there. I saw some source code example, knowing German well enough to easily follow the program flow. (There is even an example of German Algol-68 in Wikipedia!)
|
|
|
|
|
While I appreciate the idea of localized dialects of programming languages, I think we're better off without them. I still remember the pain of 'copying' an Excel spreadsheet to Google docs, resulting in lots of manual work to translate the localized Excel functions like 'WENN' and 'SUMME' into the corresponding english function names...
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|