|
Faarrrkkkk. Just changed to plastic schooners. Got last glass, gotta get Missus to go home or move to another pub, won't drink beer from plastic
Michael Martin
Australia
"I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So I had to leave the place as soon as possible."
- Mr.Prakash One Fine Saturday. 24/04/2004
|
|
|
|
|
|
28th? Congrats!!
6 of the happiest years of her life!
This space for rent.
|
|
|
|
|
27 for me and mine the other day. I had a beer.
|
|
|
|
|
|
So, we have two different styles of parsing algorithm for the purposes of this post.
LL(1): Parses from the root of the tree down to the leaves. The grammar directs the parse. The input is validated against the grammar. One token of lookahead
LALR(1): Parses from the leaves of the tree, up to the root, "reducing" as it goes. The input directs the parse. The grammar is validated against the input. One token of lookahead.
Obviously they work in radically different ways despite doing basically the same high level thing (parsing input)
Both of them take the same input - a Context Free Grammar, which is simple a collection of rules of the form:
A -> B C
B -> b
C -> c
C ->
What they do isn't important here, but both algorithms take this stuff as input.
And it occurred to me that both algorithms produce a triple nested array of ints (int[][][] ) as output. This is the parse table representing the grammar.
That's a hell of a coincidence. The common inputs I understand, but the triple nested array of ints is just funny considering how different what they represent is.
The parse tables look nothing alike. The columns are different and the rows are different. LALR(1) is actually two tables merged into one - usually called the ACTION and GOTO tables. But it's like an outer join of two tables on a DB the way it's represented
In LL(1) the columns are terminal symbols and the rows are non-terminal symbols. each cell is a rule.
In LALR(1) the rows are STATE indexes, the columns are both nonterminal and terminal symbols, and each cell varies depending on what is happening. For terminals it will be a state ID to jump to, for non-terminals it will be a rule id, and usually the bits of the rule itself follow.
It's bizarre.
3 nested arrays either way.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
reminds me of: [^]
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot
|
|
|
|
|
Edit: Adding Files to the Windows MRU/Recent Document List - Rick Strahl's Web Log[^]
And there it is.
When you right click on an app on your taskbar you get a most recently used file list for the app.
Historically, I thought each app's MRU was proprietary to the app - like how it was stored in the registry was individual to the app.
So how the hell does windows 10 do this?
Basically i want it to happen with my app, and i want to understand it before i go and just dump an MRU in the registry.
maybe my google fu is just off tonight, but after hunting everywhere, including ForensicWiki it seems that i wasn't wrong to assume each app's MRU is proprietary - they appear to be.
The only other possibility that occurred to me was that windows was monitoring all app starts and openfiledialog calls to build its own MRU for each application. However, that doesn't make sense for a number of reasons.
I'm stumped.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
modified 17-Aug-19 1:37am.
|
|
|
|
|
|
I'm staying away from 3rd party components for this app. Plus I'd have to test it to see if it would work with this - and based on the answer i found - it wouldn't at least without additional stuff on my part (registering a file extension with windows - didn't know that was a requirement, but i understand how global MRU management works now at least)
After perusing that component, no it will not work as it does not use the shell API to register recent files
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Hi Griff, Using working code would distract HTC from posting on the Lounge, so that's a no go
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot
|
|
|
|
|
Microsoft *almost* has a PEG parser generator built into .NET
I believe the Regular Expression engine already does memoization in matching.
So all that would really need to be added is
a) an op like PERL5's regex recursion
b) a grammar model for a PEG grammar
c) a simple way to compose a compound series of regex to match the PEG
Unless i miss my guess they really did us all a disservice by stopping with regex.
They made their regex so advanced it may as well be a parser, but for some stupid limitations.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
I may not be as familiar with pegging as you, please explain?
|
|
|
|
|
I believe PEG = Parsing Expression Grammar.
Not that I know what that exactly means....
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
You're right. And PEG is just a style of parsing based on what is essentially a souped up regex engine with backtracking and recursion. Memoization (keeping track of partial matches) is used to make the backtracking feasibly efficient.
Microsoft has implemented like 75% of one maybe in their regex engine.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
sorry, it's a style of parsing. PEG stands for "parsing expression grammars" and it's basically a glorified backtracking regex matcher with memoization and recursion.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
honey the codewitch wrote: Unless i miss my guess they really did us all a disservice by stopping with regex. back of the line mate:
#1. ms did us a disservice by stopping with windows, why not a complete operating system?
#2. ms did us a disservice by stopping with metro (or whatever it's called now), why not a proper window manager
...
not to mention the disservice of things introduced and then dumped, hard & soft (notwithstanding things long promised and never delivered)
not to mention the the disservice of other peoples toys they grabbed (stole, or if that failed squeezed the life/market out of then bought for pennies) and smashed
and not to mention joining other clubs (linux, opensource/github...) and [in their usual approach] swamping those with their ms-only toxic crap (as they've been known to do in the past with iso/industry standards/consortiums)
Message Signature
(Click to edit ->)
|
|
|
|
|
don't hold back man. Tell us how you really feel! (maybe over at soapbox though )
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
For no reason I can discern, my phone didn't charge last night. It ran down its battery and shut itself off instead. So no alarm this morning.
Then, to add injury, once I had ensured that it was charging and powered it up... it informed me that I had missed an alarm.
Oh, thank you _very_ much.
|
|
|
|
|
You use a phone for your alarm clock?
K.
|
|
|
|
|
I think about 90% of phone owners use a phone as their alarm clock.
|
|
|
|
|
I used to use my phone for my alarm. Now I use Cortana [substitute your voice assistant device here]. It's easy just to tell her what time I want to wake up (as opposed to thumbing through the alarm settings on the phone). And I haven't hit snooze once since I've stopped using my phone alarm.
I suppose if the power goes out I will be hosed (but if I had a traditional alarm clock this would also be true).
I wonder if they listen to me sleep
“The palest ink is better than the best memory.” - Chinese Proverb
|
|
|
|
|
littleGreenDude wrote: I wonder if they listen to me sleep
NSA guy 1 - "Oh no, he's asleep"
NSA guy 2 - "Oh, what does he say ?"
NSA guy 1 *switch on loudpseaker* - *ELEPHANTASTIC SNORING NOISES*
|
|
|
|
|
littleGreenDude wrote: if I had a traditional alarm clock this would also be true
Not if you remember to wind it before you go to bed... Proper alarm clock.[^]
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
littleGreenDude wrote: I wonder if they listen to me sleep Yes they do.
Apparently, a lot of the voice assistant recordings are "accidental" recordings (yeah, right).
littleGreenDude wrote: And I haven't hit snooze once I'm so wrecked in the morning I can't hit nor talk to it
|
|
|
|