|
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
|
|
|
|
|
Sander Rossel wrote: I'm so wrecked in the morning I can't hit nor talk to it
Oh you. I slept 3 hours last night. And I don't use an alarm.
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 slept nine and a half hours last night, got out of bed at 12:00 (but was awake a bit earlier)
That's what happens when I don't set an alarm.
When I do set an alarm I often sleep through it, especially after I wake up and snooze.
Snoozing is very risky when you sleep as tight as me
And after so much of sleep I wish I could say I feel well rested
|
|
|
|
|
I remember fondly days when I used to be able to sleep 6.
At this rate, by 45 I'll be sleeping 2 hours a night.
Conclusion: I'm turning into margaret thatcher with age.
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.
|
|
|
|
|
That can't be healthy, but at least you have plenty of time to do other things.
Like writing parsers... Wait, could there be a connection?
|
|
|
|
|
There's nothing to be done about it. It's a product of my madness. The meds help but folx with my condition either get too much sleep or too little. The part that regulates that goes haywire.
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: It's a product of my madness. The parser thing or the sleeping thing?
And did the madness cause parsers or did the parsers cause madness?
Must be tough, though
|
|
|
|
|
The sleep thing.
And honestly, i think the madness causes the parsers. I could never figure this parsing stuff out before - i've been at it on and off for years. Then one day, boom, I manage to implement LL(1) parsing and LALR(1) the same week. (This was what, a month, two months ago?)
A few years ago I went crazy - not related to parsing, but while it has a lot of downsides, and I don't want to downplay those, it helped me think differently and in many ways I'm smarter now because of it.
Now I don't have to think about code so much anymore. It just flows from me. Like some of my fellow crazies that speak in tongues I guess. That really helped with making these parsers. I can channel things in my head I never used to before. I can't easily explain it but the upshot is I can code things before I understand them. Once I code it, I can read the code to understand what I did.
And that comes naturally now. So bully for me.
On the other hand, it kind of screwed up my employability.
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.
|
|
|
|
|
But of course. Why would one not?
The truly great thing about it is that I can set the snooze duration. I chose fifteen minutes.
And I can use it when I'm sleeping elsewhere. The office, say.
|
|
|
|
|
Quote: I blame you for the moonlit sky
And the dream that died
With the eagles' flights
I blame you for the moonlit nights
When I wonder why
Are the seas still dry
Don't blame this sleeping satellite
|
|
|
|
|
Is it an android phone ? The latest update of Google play services drains the battery. Mine went from three days battery life to 2 hours after the update
|
|
|
|