« first day (545 days earlier)      last day (4616 days later) » 

1:00 PM
is C# context free?
I guess it has to be
@Collin No … almost no modern general-purpose programming language is
I think that most of them are, actually- for most intents and purposes, anyway
well that would explain how they get away with it, unless bison can do things that aren't strictly context-free?
var x = f(); cannot be decided without context in C#.
@RMartinhoFernandes Really? I didn't know that. What's the ambiguities?
1:03 PM
@DeadMG purpose = parse and verify as valid, let alone translate to IL
Hmm, maybe not at the parser level, nevermind me.
struct var {} is valid and would change the meaning of it, but I guess the parser can roll with it anyway.
really? var is a keyword, how can struct var{} be valid?
@RMartinhoFernandes wouldn't it be unhappy about using a reserved word?
@DeadMG Contextual.
lol
epic fail
1:05 PM
Many keywords in C# are context sensitive, such as select, from, group and yes - var.
Not really that epic.
It avoids breaking code that had struct var {} in it, and most C# code uses PascalCase anyway.
Do we have a stock answer to link to for non-deducible contexts?
very true
@Gleno Right, basically, everything that wasn't on v1.
@RMartinhoFernandes And even there … consider get, set in properties
1:07 PM
@KonradRudolph What about it?
a b { get; set; } can't be anything else.
@RMartinhoFernandes They are also contextual, and were present in C# v1
@RMartinhoFernandes Well, I can think of one exception - out keyword. :)
@KonradRudolph Oh, you meant that.
@Gleno out was on v1.
Ell
Ell
argghhh I can't think of a good data structure for my puzzle :L
has anyone played puzzle pirates before?
I played it like 10 years ago, wasn't at all impressed
1:15 PM
The problem with this issue: it's been asked loads of times, but you just cannot find any answer without using the "nondeduced" keyword. But then if you know the keyword, you probably know the answer... searching is difficult :[ — Matthieu M. Jan 13 '11 at 8:32
@Matthieu: but hopefully we eventually build up enough duplicates that the searches will find them! — Jefromi Jan 15 '11 at 6:11
@RMartinhoFernandes, I just checked you are right that there are no new non-contextual keywords in C# since v1. Pretty cool.
Mmmh, I think we should change the title for this one.
ALF?
He was all the rave back in the day.
@LucDanton I didn't actually look hard at the applicability of the Q (there are other Qs too). I just thought the comments speak a lot towards you search
1:17 PM
@Gleno That's actually a goal of the design team. New "real" keywords break existing code.
@sehe Well, you gave me exactly what I was looking for and now I don't know what to do with it.
Thanks nonetheless.
@LucDanton :)
So you can expect to see no "real" keywords in any new version of the language.
@RMartinhoFernandes At least, C++ has always had a "real" new keyword
I suppose I could link to the answer as opposed to the question. Doesn't work for 'close as duplicate' though.
sbi
sbi
1:19 PM
So @Konrad silently lurks around here all day and then suddenly drops into the discussion when C# is mentioned? Just to fall out of it again when he had his say about it? I must have pegged the guy totally wrong: I thought he was a C++ lunatic.
@RMartinhoFernandes well, give them a sufficiently good reason, and they'll add a keyword. It's just not something to be done lightly
sbi
sbi
Oh, look at it, @jalf, too!
I didn't jump into a C# conversation, did I?
1:22 PM
yes
sbi
sbi
@jalf Ah, so you knew exactly what I was talking about, and now try to pretend you didn't do it.
meta yawn
sbi
sbi
@sehe That one went over my head.
@sbi no problem, I didn't want to address it to you. Which is kind of why I removed the addressing.
sbi
sbi
That lower-case "lol" you guys always use, with my font settings looks a little bit like a robot seen from above, as it walks up my monitor. After some time, the conversation here made it walk behind my tab bar, from which I can only resurrect it for a while using the mouse's scroll wheel.
1:25 PM
@sbi The keyword wasn’t “C#”, it was “context free”
but it was a pure coincidence that I opened the window at an opportune moment … I’m unfortunately quite busy at the moment
sbi
sbi
@KonradRudolph And another culprit is trying to weasel out of it!
I shall file you guys under "Secret C# Spies".
Mar 5 at 12:57, by R. Martinho Fernandes
lol is never capitalised. Not even when it starts a sentence.
sbi
sbi
@RMartinhoFernandes LOL!
not even the Robot capitalizes "lol"
LOL has different meaning than lol
sbi
sbi
1:28 PM
@Pubby Tell me!
No, it doesn't mean "tell me!".
sbi
sbi
@RMartinhoFernandes I kinda knew that, you know.
@sbi Eh, I kind of like C# (although it still encourages you to right way too verbose code) and I never actually liked C++ … although I love its expressive power
> The name 'Lol' is an abreviated form of the name 'Laurence'.
Hmmm
1:31 PM
I'm gonna go, LOL!
sbi
sbi
@Pubby So in what way does that say that "lol" is different from "LOL"??
Really, as with all the other acronyms, we used to "LOL" in upper-case letters until deep into the nineties. Then, about 10-15 years ago, you lazy kiddies came along a-chatting and had trouble to find your shift key, and so it morphed into the lower-case "lol".
Really, you only LOL if you laugh while shouting.
sbi
sbi
@Gleno I hope you know that we already have two users here with the realname "Alf".
And I think that kind of laughter is more commonly expressed as "mwhahahahahhaah"
sbi
sbi
@RMartinhoFernandes Yeah, of course. And "AFAIK" is shouted, too. Try again, young padawan.
1:35 PM
Well, if you only had one, then you could make a "no alfs" sign, and I'd have to change my avatar. As it stands though...
man
Mar 5 at 12:57, by R. Martinho Fernandes
Yes, I'm making stuff up.
gamedev.stackexchange.com- it's like Stack Overflow, but lower populated and full of morons
3
I believe there is a difference between FUCK and fuck.
sbi
sbi
@Gleno Oh, I am absolutely fine with your avatar. I just thought you'd want to know.
Ell
Ell
1:35 PM
...and with a focus on game development?
@Abyx The capitalization :P
Ell
Ell
@DeadMG it's not all about programming there?
sbi
sbi
@Ell He already said it is full of morons.
You know, all the cyber-apocalyptic robots take over the world shit is fruitless. Once the robots get bored cause they murdered the only interesting thing on the planet, they'll rust and die.
Ell
Ell
haha
1:36 PM
@rubenvb Plastic doesn't rust.
gah, sometimes Stack Overflow is just annoying. Fruitless discussions and useless answers :(
@RMartinhoFernandes how does your "electronics" work?
plastonics
@DeadMG “full of morons” – really? Doesn’t surprise me, although I had higher hopes since at the beginning there was a quite high ratio of real experts active … pity :(
literally translated from dutch, that is actually piss-tonics
It sure isn't with metalonics.
1:37 PM
rust is easily defeated using modern chemical techniques
@KonradRudolph Soon, I'm gonna stop posting there. I'm developing a game and it's increasingly common that nobody there can answer my question, but cross-post to SO and correct answer in about twelve hours or less.
@DeadMG well then they'll just die. Without rust, without unboredom
@DeadMG How so? You can coat surfaces but they will inevitably nick and dent
and the quality of the code I've seen is quite horrendous
sbi
sbi
1:38 PM
@KonradRudolph If you think SO proper is bad, have a good look around the SO chat rooms.
@KonradRudolph Stainless steel and other things automatically re-coat themselves.
thesis size: 36 pages of joyous physics and counting. I'm just getting to the good part :D
@DeadMG You can capitalize on fuck. That pretty much defines internet
@DeadMG Ah. That’s embarrassing ;)
@sbi I’ve actually never been to any other chat room, as far as I can remember (well, apart from one-on-one talks)
ARfhgggakhgduh. This talk reminds me of a wonderful short story I read sometime ago, but I can't find it again :,(
Not finding stuff on the Internet makes for one sad plastic pal who's fun to be with.
1:40 PM
@RMartinhoFernandes WTF, robot. You're losing your mojo.
it'd be like if I found something I didn't dislike
sbi
sbi
@RMartinhoFernandes We know at least one of your RAM modules is broken. You can't help it, so stop fretting over it. In the end, you will only overheat and need to be taken to the service.
I think he only has a rojo
mojo is for men. rojo is for robots
fojo is for females
sojo is for shemales
sbi
sbi
Strangely, being with sad plastic pals never came across as fun to me.
I'm now going to learn if twitter feeds last years.
I remember I found it on Twitter.
1:42 PM
@rubenvb dojo is for... dorks ?
@sehe Dans.
@sbi It's from H2G2 (also referenced in about:robots)
please update when the progress bar reaches 70%
Loving the detailed progress reports
sbi
sbi
@RMartinhoFernandes If you try to find it in your web browser, open the feed you expect it to be in, hit Ctrl+End (or whatever is your OS's equivalent for going to the end of the page), and keep your plasteel fingers down for minutes. That will make Twitter keep loading older Tweets.
I'm not going to respond to that.
oh my god
-4
Q: How to add the answers

user1331579I have a piece of code from an exam paper that I'm doing for extra help. The code I need help with: def Denary(Hex): Result = '' ErrorFound = False DenaryEquivalent = '' EmptyInput="" for ThisHexDigit in Hex: if ThisHexDigit in ['1','2','3','4','5','6','7','8','9','0...

This is (allegedly) from a school’s AS level mock exam paper
i.e. this code was written to teach programming
Ell
Ell
really?
This is not my entire code. Maybe that is why? — user1331579 1 hour ago
^ I'm seriously doubting the OP's ability to copy and paste reliably.
My guess is that he just copied it by typing it from paper and isn't aware of the difference that matter. I mean, come on, if ^^ that is your line of defense on this:
Are you sure this is your up to date code? You say BB gives you 1111, but when I run the method, I get None. — Kevin 1 hour ago
I'm not taking it seriously
@sehe Sure, but making up a code this bad in the process? The sad thing is that I actually find it more plausible that it’s plucked, 1:1, from said exam paper
@KonradRudolph He sort of admitted to not being able to copy/paste the whole thing into the question. Why would the rest have been a faithful copy?
1:55 PM
He's trying to treat strings as numbers. Maybe PHP could be of help.
Ell
Ell
haha
oh boy, this little project is more work then I thought it would be
nearly finished though... just the tricky matter of 'labels' ¬_¬
@RMartinhoFernandes PHP helps all the things
You already have the gotos, but you don't know where to place the labels? Sounds fun.
:P
lol
@RMartinhoFernandes Dcpu16 assembler
1:56 PM
@RMartinhoFernandes We need a clippy animation! "It looks like you are trying to use strings as numbers. Would you like me to tell you about PHP?"
@thecoshman Oh, you're playing with that. I thought you were... erm... at work.
@RMartinhoFernandes yeah, I am :P
it's put my new perl skills to the test :P
yes, I wrote it in perl
@thecoshman I'm
Intermission!
Why do so many websites take you directly to their sign up page and hide the link to just sign in?
1:58 PM
at
a
loss
@RMartinhoFernandes ¬_¬
@RMartinhoFernandes Nah, that kills perls
@RMartinhoFernandes I think you meant rm -rf *.pl
@thecoshman NOOO!
Why the fuck would I need that?
If I have a hammer to drive a nail, I don't need a bazooka.
erm... what?
2:01 PM
rm *.pl already removes all perl files (well, at least if they are properly extensioned).
@RMartinhoFernandes You'll find that find / -iname '*.pl' -type f -delete is a bit more reliable
only from current folder though
@thecoshman ^
@thecoshman rm -rf *.pl also removes all directories with names ending in .pl and their entire contents too.
or rm -f **/*.pl
@thecoshman And it will not recurse any other directories
2:02 PM
@RMartinhoFernandes oh, never considered that :O
@thecoshman Maybe you'd want to stay away from rm -rf for a while
so yeah, you guys don't like perl
@thecoshman We like rm
@sehe It doesn’t have to be a faithful copy, the original code probably still was utter crap
I personal think white space was easier to understand then perl. Sure perl has a lot of short cuts for you, but my god are the obsuficated like hell!
2:04 PM
rm(1) is a real fast interpreter, it interprets any program in O(1) runtime, and if you factor in the calling context, can even be said to have O(<0) storage complexity
lol, obsuficated
@RMartinhoFernandes did I get close enough for you to be able to work out what I was trying to spell?
@KonradRudolph It was crap. But I'm not convinced that the exam question wasn't phrased 'can you fix this code' and the answer was more or less those 2 changes from the accepted answer.
@thecoshman You obsuficated the word!
You know how it is with SO and whoring
2:06 PM
I added to my ignored tags. :P
@RMartinhoFernandes close enough then :P
@thecoshman However, the chances that your cat will accidentally enter a valid whitespace program while sleeping on your keyboard are too slim to be of any practical value. Perl's obpussication beats obfuzzication.
@sehe is there any practical value to 'random cat code'?
cat /dev/random?
regex is definitely a lot easierto use in perl though, but I guess that is down the slutty weak typing
well, from what I have seen of C++11 regex
2:11 PM
Slutty typing. I like that term.
@thecoshman Isn't all perl code written that way?
@RMartinhoFernandes meow
@sehe My point is: it’s still incredibly bad code. You wouldn’t write code like that, unless you have peculiar requirements, and an exam question giving this code as an example (even with errors built in) sets a bad example
@thecoshman refer to UR"(This is a "raw UTF-32" string.)" raw literals
@sehe yeah, just say about raw strings, I feel sorry for people writing regex before that came out :P
coffe time :D
@KonradRudolph Perhaps they used real life student code. As real life code that they need to be able to spot and fix bugs in. I commend a class that shows real life problems. I do not trust this user to adequately portray the quality of his school's curriculum.
2:16 PM
hmm
@sehe Incidentally I recently realised that the parser code we had talked about was actually completely erroneous
2:32 PM
@KonradRudolph The code or the thing it implemented? Or both?
Ah! Just found out this comment was quite well-appreciated:
It's not about the optimizations. It is about the abstractions that can easily be expressed while still emitting optimal code. — sehe Apr 9 at 21:22
Thanks guys (girls?) I guess!
@ManofOneWay hi
fuck
why is Science so good?
@sehe The code … it parsed input such as a + b still wrong (i.e. as a function call to a with a single argument of +b)
@DeadMG because God said so.
2:39 PM
@KonradRudolph Oh, in that sense
@james See newbie hints
We really need a function to see who flagged
… and a button to stab them over the internet
2
I am helpless before the rigours of Science, and it shall categorise me with brutal effectiveness, and in the darkness, it shall teach me new techniques for the creation of light
@sehe hahahaha ok no more from my side.. i just checked it.
@KonradRudolph In that sense. Well the last thing I remembered adding was merely the plumbing so you could see what it parsed as AST. So it wasn't actually 'finished'.
@james Thanks so much.
@DeadMG What the fuck did you smoke?
2:41 PM
@DeadMG In my experience, you have to teach yourself science through rigorous mental effort
@sehe Hmm, well, you also took care of the associativity of the + operator after we had fixed the precedence
-1
Q: program stops after execvp( command.argv[0], command.argv)

AaronI am writing a small shell program that takes a command and executes it. If the user enters a not valid command the if statement returns a -1. If the command is correct it executes the command, however once it executes the command the program ends. What am I doing wrong that is does not execut...

There must have been a regression at some point … not that it matters, it was easy to fix
lol, why don't people even read the man pages?
@DeadMG Sounds like you read too much HPMOR
2:44 PM
@KonradRudolph The way I remember is that I suggested a modification for that, and after that you mentioned
in Room for sehe and Konrad Rudolph, Mar 21 at 22:52, by Konrad Rudolph
And it occurs to me that before I continue tweaking the grammar I need to generate an AST and pretty-print it, otherwise this whole thing devolved into guesswork as to how the expression is actually parsed
At which point I was really going to bed. So I jotted in the printing business and went to bed :)
in Room for sehe and Konrad Rudolph, Mar 21 at 23:38, by sehe
@KonradRudolph mmm. well nevermind, time to go to bed any ways. Let me post the current state of affairs so you can shoot down all the bugs :)
@KonradRudolph So, you had the tools to shoot down the bugs, in a way :)
I’d overlooked that last post
yes, and a great tool it was
I modified it to print S-expressions and the output looks quite well indeed
also, the grammar is now a bit simpler than before, unambiguous, and more logical (from the user’s point of view)
@KonradRudolph Neat. And thanks.
@KonradRudolph Could you avoid the parens when you liked to?
@sehe Well, s-expressions are unambiguously parenthesised anyway … so avoiding parens isn’t the issue
2:50 PM
@KonradRudolph Oh, you changed the input grammar to S-expressions. That was unexpected. I thought you meant the AST pretty printing :)
but it does coalesce nested partial function application
so instead of having (f (a (b)) it gives me (f (a) (b)) (and yes, I need those parentheses because a and b are function calls, respectively)
No, I meant the AST pretty-printing; sorry, I thought you meant the same
The input grammar uses parentheses in a logical way, was far as I’m concerned: every argument to a function that isn’t “simple” needs to be parenthesised
@KonradRudolph Ah, yes, but not about avoiding parens (pretty printing should help showing details, the input grammar was your design goals mainly)
so you’d write f (a + b), because f a + b would be parsed identical to (f a) + b
@KonradRudolph Ok, that is easy to remember
And I believe it’s the same rule Haskell uses
2:52 PM
Sadly I don't speak Haskell
f a + b is (f a) + b
@LucDanton That’s what I wrote, no?
Whoah I parsed that differently last time around (and yet still managed to write the same thing). I needs food badly.

« first day (545 days earlier)      last day (4616 days later) »