« first day (1704 days earlier)      last day (3259 days later) » 

11:01 PM
This sort of thing makes me so hungry for lambdas.
 
@caps We set the stream state (which will have std::ios::failbit set on extraction failure). Mmm. Actually. I don't set failbit if the expect(ch) extracts an unexpected character. Fixing
 
@sehe Okay, that explains why I was confused. If I'm reading you right your fix should clear up all my confusion.
 
well
I overate like a bitch today
 
Huh. CR.SE has weird moderation. I just rolled back that edit
 
not gonna meet my weight target
 
@sehe hm
I wish I could comment
But I don't have the rep yet
Gotta do some reps, brb
 
Could you please explain why you rolled back my edit? — Jamal ♦ 1 min ago
@Puppy he had butchered the [tag:iostream] tag :)
 
I don't understand the kind of person that sits around making trivial edits like that.
 
@Jeremy Incremental edits, woo!
 
Jamal is like that
 
11:07 PM
@VermillionAzure Incremental edit implies progress. That edit was a lateral move at best
 
IMPROPER USE OF KEYBAORD MARKDOWN WHAT A CRIME
 
@AlexM. I have not had the pleasure of meeting him before
@Jamal That's not a tag for the iostreams library. I'll remove the keyboard markup if that annoys you. (Personally, I can see a lot of posts where energy would be better spent polishing up the formatting. But, I guess I'll be happy with the attention the question is getting. Cheers) — sehe 1 min ago
 
@sehe I can't believe my stuff is actually getting attention
Also btw I didn't want to get into locales and other boilerplate stuff like that since that type of basic parsing is meant for people that haven't touched on the stream classes or options of such anyways
 
@sehe aaaaand now the comments are gone
lol
 
not surprised lol
 
11:17 PM
wait
 
@VermillionAzure It's important they realize right away that they're not dealing with trivial libraries here. Your code will break if decimal separator is ','. Your code would not parse correctly "(0, 0, 3)" either :)
 
@sehe but that's fine.
the point is to introduce delimination anyways
 
@caps edit completed. Sadly this made it considerably longer codereview.stackexchange.com/q/93783/4569
 
I don't need to make the example code modular; the important part is concepts
 
@VermillionAzure please pick a better sample
> concepts
I think you mean "tricks".
 
11:18 PM
@sehe i guess
 
@sehe That's how it goes sometimes.
 
@VermillionAzure And that's the worst kind of teaching you can do. Blind copying of tricks is what creates trouble down the road
 
if(hereHaveSomeCookiesBecauseIThinkYoureNice || IWillBlowThisRoomUp) {shortCircuit = true};
 
Make the goal much simpler, and explicitly mention what is off-topic.
 
@sehe lol
 
11:19 PM
what the @ell?!?!??
 
*sigh*
I was hoping the drama from Captain "I need a type of length two characters, not bytes" from this morning was more epic.
From the way some of the regulars were in the comments, I assumed it was going to be more than half a page of mockery.
 
Sorry to disappoint son.
Maybe if you get us a few more beers ¹
(¹ I don't drink beer)
 
@sehe There are just 7 examples
 
Then your potion of wisdom penalty of choice?
 
@VermillionAzure Which is the reason why sample #5 should be simplified. And/or the title should be fixed
3 hours ago, by sehe
@VermillionAzure I'd say the input "tokenizing" sample should be called "parsing" because that's what it does. And here's how I'd expect it to be written (barring use of e.g. Spirit of course): http://coliru.stacked-crooked.com/a/c6448e558da126e7
That's 3 hours ago
 
11:23 PM
Hey idiot who flags things please go away
 
What is with the flagging today.
 
@sehe I did mention that it is extremely crude and it is flawed, but it's simple enough to understand
 
Preferably forever
 
@sehe I'll modify the writeup to go with it
 
@VermillionAzure What use is it if you can only learn how not to do it (but you won't know it because you're learning?)
@VermillionAzure Ok :)
 
11:24 PM
@sehe that's true
wait, mind blown....
 
do you need rep to flag things?
 
You need rep to be here
 
No, but a brain is a nice to have
2
 
I think that's even required
 
You'd think
 
11:26 PM
@sehe Okay I added a small line
 
@sehe You need rep to chat, not to be here
 
@nick yes
 
@CatPlusPlus Then, certainly
 
I think so
 
@nabijaczleweli You're right. That's what I meant
 
11:26 PM
for K = 1:4
  K=3;
end
 
huh
 
Ell
@BartekBanachewicz seriously fuck those trains :P
 
@sehe Well I've used a method like this for my own program and it works fine
 
Ell
Twice in the exact same spot
 
the format for the parser is well defined and it works fine
 
11:26 PM
apparently in matlab changing the value of the counter inside the loop doesn't modify the loop itself
 
don't stand on the rails
 
it will continue as normal
 
Ell
I was walking over
 
@VermillionAzure Go away, Satan!
 
11:26 PM
when we get proper tech we'll be able to migrate the trains out
 
Ell
Both times
 
and just keep nice ifaces with drones
 
Ell
I was just crossing them :L
 
@VermillionAzure Right. Did you miss a few messages again?
 
like, keeping the stations completely closed
yeah i know
 
11:27 PM
@sehe probably i went out to lunch
 
it's still rough
 
3 hours ago, by sehe
You missed this too I bet. I know because you'll ask inane questions later that have all been addressed in that snippet that you conveniently missed
 
there's way too many stations to care about every single one
 
That's also 3 hours ago
 
@sehe But YAGNI as well. And I saw your example.
I don't really know locales and I think it's outside of the scope for the examples as well.
 
11:28 PM
@VermillionAzure YAGNI doesn't cut it when you're teaching
@VermillionAzure Then state as much. And fix the rest
 
@sehe But it does, really. A beginner needs to know the next step, not the entire path of the course.
 
You can't be lazy when teaching. That's irresponsible
 
Also they don't have iomanip
And we haven't gotten to lambdas
 
Of course they do. They have C++
 
i think its best to show someone the simplest way possible first
 
11:29 PM
@VermillionAzure They make it a free function :)
 
@sehe I've covered <iostream> and that's it
 
The simplest way possible does not involve C++ at all
 
agreed
 
@nick Agreed. Which is why I have repeatedly asserted "Example #5" is way too complicated.
 
using only maybe <string> and <iostream> how do I do this?
 
11:29 PM
@VermillionAzure Ok ^^
@VermillionAzure You don't.
 
@sehe But I did.
Just for an example's sake, but it's there to show how you might build something more complex from something simple.
 
Explain more tools before that example maybe then?
 
A beginner will not understand how to build a parser, but using even simple tools from just two basic headers, we can build something a bit more complex
@CatPlusPlus I did
 
A bit more complex and a bit more broken
 
I explained <iostream> and <string> a bit
 
11:30 PM
Yes I know you said that
46 secs ago, by Cat Plus Plus
Explain more tools before that example maybe then?
 
@CatPlusPlus It's hard to, really. I mean the path goes like this:
 
bangs head against (a draft of) The International Standard
 
Hello World -> iostream/string
And these examples come after that
After this, I might go into more string manipulation and formatting
and then I'll introduce lambdas
 
Did a god tell you to use that exact order and that's why you have to shoehorn parsing of all things right after hello world
 
@CatPlusPlus No it's not right after parsing
 
11:32 PM
You're bad at reading
 
Here, look at it.
I go over a lot about <iostream> and how it works in the hello world example
and then I introduce the basics of std::cin
I then give some basic examples of std::cin to illustrate more about how it works
 
Explicit << std::endl. Ouch
 
#5 is a somewhat more advanced example as well
@nabijaczleweli I also gave the explanation on why not to do this as well and why you'd want to do this
 
hm
 
Ctrl+F "Flush the stream"
 
11:34 PM
maybe you should break up some of those examples into separate tutorials
 
@BartekBanachewicz Can we like agree on some rules if we ever get to play again?
 
so you can explain things a bit better, and maybe give alternatives
 
@nick They will be touched over soon, but it's more like supplementary/introductory material
 
Australian richest person, isn't she lovely :p On the news day in & day out for doping her children out of family trust fund
 
@nick I'd say no because people don't need to go through all of them, but it's good if they just do it.
Did you read the page?
 
11:35 PM
@chmod711telkitty 10/10 would wife
@VermillionAzure yeah, well more like i skimmed it
its kind of a wall of text to me right now
but i have the attention span of a fly so
 
Ell
I feel low
Really low
 
@Ell ?
 
@sehe If you're going to be giving an example of good code, shouldn't the namespace name be more descriptive than mylib?
 
@VermillionAzure That's a problem :)
@caps No, because that's depending on context not given. It's purposely clear that this is a placeholder name :)
@VermillionAzure coliru.stacked-crooked.com/a/1fd51e16bfa80de6 There. Just the two headers. Still not broken.
 
@chmod711telkitty she looks like you
 
11:41 PM
?
 
> On the news day in & day out for doping her children out of family trust fund
 
didnt read that oops
 
Poor kitty
 
I am chinese I don't have brown hair
 
11:42 PM
no pics no care
 
Also chinese people are never fat
 
I have plenty of pictures ... even on this site, you are just too dumb to find them
 
Here we go
 
Aiming a bow with pad sticks is terrible
 
WAT U SAY FREN?
 
11:43 PM
that's japanese you ignorant ass grass
 
are you playing shadows of mordor with the controller
 
@sehe looks quite nice
 
@chmod711telkitty that's discriminant as fuck
*cruck sorry typo
 
lol
 
@sehe I'll keep it for additional tutorials
 
11:46 PM
@DonLarynx lol no calling a chinese person japanese is discriminant as cruck
@VermillionAzure would you consider expanding the text column on your blag?
 
Hi @nick
 
@DonLarynx 10000 nicks are about to come in here and wonder wtf is going on
 
yes, good one nick.
 
@VermillionAzure And you shot yourself in the foot: oops and uhoh
@VermillionAzure cheers
@VermillionAzure It's a bit funny to me that you /gratuitously/ introduce the concept of a "token" (with a very unusual meaning) and don't like my samples because "people don't know how to build a parser". The contradiction is stark
 
@sehe the second one looks alright
 
11:50 PM
one would think that deleting a pointer sets it to null but that is simply not true
> Now, when you "delete" that pointer, the reverse happens: the warehouse staff notes that this particular box is available again. Contrary to real warehouse staff they aren't doing anything with the box -- so if you look into it after a "delete" you might see your old stuff.
That can't be possibly true....
How can you free up memory and still see your old memory in there? Sense makes this none.
23
A: What does delete command really do for memory, for pointers in C++?

Christian StieberThink of memory as a big warehouse with lots of boxes to put things into. When you call "new", the warehouse staff finds an unused box large enough for your needs, records that box as being owned by you (so it's not given to someone else), and gives you the number of that box so you can put your ...

 
@DonLarynx Indeed it isn't. It's undefined
 
lol the checked answer is wrong (yet again)
 
@DonLarynx even "checked" is wrong :) (accepted)
@DonLarynx How not? You didn't think memory was physically being deleted?
3632
A: Can a local variable's memory be accessed outside its scope?

Eric Lippert How can it be? Isn't the memory of a local variable inaccessible outside its function? You rent a hotel room. You put a book in the top drawer of the bedside table and go to sleep. You check out the next morning, but "forget" to give back your key. You steal the key! A week later, you retu...

Incorrect. It's undefined. How can you possibly see the same memory you just freed? This is a good attempt at an answer, though. — Don Larynx 1 min ago
@DonLarynx ^ feeling a bit uppity, are we?
 
@sehe Not sure what you mean by physical?
It's not uppity if it's true
 
guys we should meet up one day and fight
should we have teams or just FFA?
 
11:57 PM
Thanks for that answer (the hyperlinked one with 3632 votes) @sehe
 
@DonLarynx "This is a good attempt at an answer, though" makes me cringe. You write your answer please.
It's just a bit preposterous that you¹ come around after ~3 years and brightly declare the answer "incorrect" even though 32 other people thought it was valuable.
 
I can't add my answer, it's marked duplicate.
 
Way to skip the point
 
Now 32 people will walk away with an incorrect understanding of C++
 
SAVE THE WORLD. Or maybe fix your own understanding. He said nothing outrageous.
 

« first day (1704 days earlier)      last day (3259 days later) »