|
Hav YOU analyzed the chemical componund of that wall??
|
|
|
|
|
Please when you write parsers, separate your parsing logic from the rest of your app's logic so the app's main code isn't actually tied directly to your parser's grammar!
I mean, I get there's going to be some intermingling between different areas of your code
but when I crack open a project, and I find a codebase where every section of the app is intimately tied to every other section of the app it's really frustrating.
For example, the parser in this case returns LexSpan classes which hold a text buffer, and start and end positions within that buffer. Great for parsing, so you know where your fragments of text are.
But then when you build say, your Regex syntax tree with it, DO NOT use LexSpans as your member fields! unpack the values therein for witch's sake!
Now if i want to implement a different parser i have to completely tear apart the app's core logic.
Lovely.
Real programmers use butterflies
|
|
|
|
|
Take yourself to QA, and peruse a few dozen questions before you ask that.
Most of 'em can't spell "Emcapsull..." "Encapcalation" "Encrapsilating" "Encapsuoolasion" the word let alone use it!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: Most of 'em can't spell "Emcapsull..." "Encapcalation" "Encrapsilating" "Encapsuoolasion" the word let alone use it!
can be a bit tricky, so I do the other ting thng one.
after many otherwise intelligent sounding suggestions that achieved nothing the nice folks at Technet said the only solution was to low level format my hard disk then reinstall my signature. Sadly, this still didn't fix the issue!
|
|
|
|
|
I don't think I have ever seen lexer/parser code which wouldn't struggle to pass most code reviews.
|
|
|
|
|
Mine got a commendation ...
|
|
|
|
|
Sounds like you need to send Uncle Bob around to visit them...
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
honey the codewitch wrote: LexSpan classes which hold a text buffer, and start and end positions within that buffer
So, a ReadOnlySpan<char>[^], but not as efficient?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Well in this I will defend them, as ReadOnlySpan is only available on the latest non-DNF framework
Real programmers use butterflies
|
|
|
|
|
It's available in DNF 4.5 or later via a NuGet package:
NuGet Gallery | System.Memory 4.5.3[^]
The DNC version has slightly better performance, because some of the BCL methods have been updated to use it. But the DNF version should be at least as good as rolling your own.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
That's interesting. At one point i heard the DNF couldn't support stack alloc'd ref types the way DNC could but maybe I heard wrong.
Adding, the author intends to target .NET 2.0+ although i think that's a little silly.
Real programmers use butterflies
|
|
|
|
|
Some patterns don't become obvious until later on. If you're not into constant refactoring (due to fatigue or whatever), things stay.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
i don't think this code was all that factored to begin with. I think was just intended to be a quick and dirty port of lex basically, but then grew from there
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: Please when you write parsers,
That's all I needed to read.
You can take comfort in the fact that I've somehow managed to make it thus far in my programming career without ever having to write any sort of parser. Well, certainly not at the level you're dealing with.
|
|
|
|
|
I mean, aside from the regex the parsing isn't even that complicated, but the way it was built into the project just stinks.
Real programmers use butterflies
|
|
|
|
|
After extensive testing, for a period of just over a year, with two identical phones (one set on high accuracy, the other on GPS only, and swapping them around after six months), I have seen no profit in using high accuracy over GPS only -- if one was bang on, so was the other, and any drift was pretty much the same.
I live in the sticks, where there are fewer towers, etc; and work in cities. The results are the same wherever I am.
So is there any real advantage, except to data-slurpers?
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Me think location services are not for you to find your way, but for them to find you...
"The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012
|
|
|
|
|
They don't need location services for that.
|
|
|
|
|
I have recently been looking into the location awareness of Android. I tend to turn off such things (and other tracking) yet it regularly notifies me of the weather in my location despite WIFI and BT being off (well, from a UI perspective anyway). Although the notification can be blocked, it will obviously not stop the hidden tracking that is clearly going on.
I am aware that Google's core business model is based on the harvesting of individuals' data, but this is just too blatantly dishonest. The walled garden of the more fruit based provider is not something which appeals to me.
It goes without saying
|
|
|
|
|
The "enhanced accuracy" uses information they "accidentally" gleaned while doing google street view due to a "bug" in their code. Definitely a mistake as google respects your privacy.
The reason google is pushing for dominance in the browser space is so that when browsers implement "no tracking" or any other privacy settings, google can just ignore those settings for its own services. Ad blockers will block only adverts not coming from their ad servers and so on. All just part and parcel of not being evil.
|
|
|
|
|
...and to further prove just how benevolent they are--they've already announced they intend to kill off cookies. How nice of them. Total privacy, here we come...
|
|
|
|
|
1 - flip phone
2 - often turned off (OK - battery still in)
3 - often forgotten at home (power on or off - who pays attention)
4 - no "apps"
So, they know where I live - but they knew that to get the phone. And, if they bother tracking the thing, I'm home a lot, or just plan gone.
Wipe the junk off the phone - use it for a telephone.
Even if they could still find you, your engagement with reality makes you a harder target than the cell-phone zombies, anyway.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Mark_Wallace wrote: I have seen no profit in using high accuracy over GPS only
"Benefit"?
"Advantage"?
|
|
|
|
|
I don't understand why you're asking. That's a perfectly normal usage.
Profits are not always monetary.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Sorry, my dictionary must be broken then.
And Google's.
And pretty much the entire first page of search results.
But I'll take your word for it.
|
|
|
|