|
lopatir wrote: rather they will only ever get the best bullshit artists.
Sounds like the perfect process when hiring for a sales position then
|
|
|
|
|
"You're asking me to predict the future. If I could predict the future I wouldn't need your stupid job now, would I?!"
|
|
|
|
|
"Programming - because I'm pretty good at it, I like doing it, and have absolutely no desire to be a leader or manager. I'll help the new guys, and learn from the more experienced guys, buy you really don't want me in a position of authority, because I'm a programmer, not a politician."
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Same way I see myself today, in a mirror, next question.
|
|
|
|
|
CodeWraith wrote: Useless HR drone: "Where do you see yourself in five years?"
Early Family Guy has the answer to this one.
|
|
|
|
|
In a place very similar to this one, answering dumb questions.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
So parsing a C# subset has lead me to all kinds of interesting questions
[System.AttributeUsage(System.AttributeTargets.All,true)]
class TestAttribute<T> : System.Attribute
{
}
does that work? (it doesn't)
why do I even ask?
because if it worked I'd have to look for
[Test<string>()] class Foo {}
and the like.
Don't get me started on the weirdities of array declarations.
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.
|
|
|
|
|
C#
Weirdness = job security!
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
This can be valid c#
public class var
{
async async async(async async) => await async;
}
|
|
|
|
|
yick. Fortunately, I don't have to support any of those keywords, but i need to check to see if my stuff will parse that.
Edit: The compiler chokes on the async specifiers
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.
|
|
|
|
|
because async / await etc are new(ish) keywords there might be code out there which has types named "async", "await" so the C# compiler does context tests for new keywords - in the example I gave some are keywords, some are types (which I omitted)
|
|
|
|
|
Yeah but in this case, the compiler I'm using (c#7? VS2017) bombs on that statement you gave me.
I know about contextual keywords as I've parsed C# quite a bit, and LINQ and other language additions have forced it. I've watched the keyword list in C# grow over time, and some old keywords like __stackalloc finally given life in the latest incarnations of the language
But async will break in the context you used it. I'm not sure about C# compilers before it was a keyword
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.
|
|
|
|
|
You need to create types with those keywords and not use var anywhere
|
|
|
|
|
Like in Fortran IV where you can have an integer named REAL and a REAL named COMPLEX. No reserved words.
Or you could name your function SOLVE REAL PROBLEM. Spaces are ignored.
I don't know if these are still valid in modern variants of Fortran; I haven't written a single line of Fortran for 30 years.
(C.A.R Hoare, in the Fortran-77 discussions, stated "I don't know what programming languages will look like in year 2000, but they will be named 'Fortran'" - when I saw a few Fortran 2003, my immediate reaction was: He hit the nail on the head!)
|
|
|
|
|
PL/1 didn't (and probably still doesn't) have any reserved words either
|
|
|
|
|
|
Won't matter to me as it will never be supported by the CodeDOM =)
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.
|
|
|
|
|
They don't buzz, but they are definitely insects! (7)
HUMBUGS[^]
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Urgh.... so obvious once you know the answer.
I gathered it would be some sort of confectionery, but the sweet shop was just too large!
|
|
|
|
|
I'm really glad it was "obvious with the answer" - means it wasn't impossible!
So ... I'm up tomorrow ... :EvilLaugh:
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Simple and Difficult at the same time.
Knew it was something sweet but was focusing on Honey for some reason
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
super wrote: was focusing on Honey for some reason
He's busy playing with nested classes.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
That's the problem with honey, once you are in it's difficult to get out.
|
|
|
|
|
In C#, this is valid:
class A<T> {
class B<TT> {
}
}
therefore, this is valid:
typeof(A<int>.B<int>)
The trouble is, there's absolutely nothing out there online I can find about representing such a nested generic typereference as a CodeTypeReference properly.
Which leads me to an arcane comment in Microsoft's reference sourcecode - the last hope of the desperate.
while (current >= 0)
{
if (typeName[current] == '[')
{
if (--unmatchedRightBrackets == 0) break;
}
else if (typeName[current] == ']')
{
++unmatchedRightBrackets;
}
else if (typeName[current] == ',' && unmatchedRightBrackets == 1)
{
if (current + 1 < subTypeNameEndIndex)
{
subTypeNames.Push(typeName.Substring(current + 1, subTypeNameEndIndex - current - 1));
}
subTypeNameEndIndex = current;
}
--current;
}
So now I get to figure out what this is doing, just so I can figure out how to properly use what it is implementing.
Microsoft Docs: Technically correct, but practically useless.
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 don't think that's quite the same thing is it?
The MS one is a Dictionary<string, List<int>> which isn't really "nested" in the same way as yours is.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|