« first day (1093 days earlier)      last day (3853 days later) » 

mjr
6:12 AM
hi there, anybody has any useful idea about the problem above?
ahhhhhhhhhhhhhhhh
 
mornin folks
 
mjr
6:38 AM
@scott when is the peak time for discussion usualy?
 
6:51 AM
@mjr Usually, we're always slinging mud at each other.
But today seems to be a little quiet.
 
when people come into the room and the top few messages are some guy help vampiring, then people don't really feel like talking
 
help vampiring?
i have no clue what that means
 
dude up there begging for help on his question
 
actually, mystical started it :P
 
so here's my new testing strategy for Wide
write test -> load test in Visual Studio -> observe that intellisense produces the correct error or lack thereof.
if it doesn't, then fix intellisense, analyzer, or both.
 
7:15 AM
Sounds like a plan.
Go for it.
 
yay
I managed to convince VS to give me the include paths of your C++ project, and to tell Clang about them, so now I can actually find user headers.
 
7:42 AM
@mjr Stop dumping your question. Please.
 
@ScottW were you ever not hungry :p
 
Scott is always hungry and Etienne always wants beer.
 
@sehe I modded the BIOS successfully, and I just installed the SSD. The write speed went up from 40 MB/s to 150 MB/s :-)
@Pawnguy7 Most interesting things in C require pointers.
 
gtfo
 
7:57 AM
@Mysticial oops
 
mjr
sry man @gamesBrainiac I was testing how to start a problem!
you know ! newbie to lounge
 
Please take a look at our Newbie hints before you post anything.
 
@sehe Oh, it even climbed up to 210 MB/s (the first test wrote 1GB of zeros to the disc, the second test filled the entire disc). Awesome :-)
 
8:30 AM
huh.
all this time, and my optional copy constructor has been bugged to shit.
hmm
the debug version of the Wide analysis package is too slow for real-time typing.
 
8:51 AM
Dammit, where's a yank when you need one?
 
9:07 AM
I nearly perfected over night hiking BBQ skills.
 
9:35 AM
you need a yank?
 
@DeadMG questions, I haz dem
you know 'sky bar' chocolate bar?
well that went well
yeah... I had one yesterday, but I swear it had three caramel sections.
 
marning
 
I don't know it.
 
@DeadMG it's american
 
orite
 
9:46 AM
> The peanut section of the Sky Bar is not filled with peanut butter, but in fact a peanut-flavored caramel.
what a gip!
still doesn't explain why the fudge section was like caramel too... or have americans broken fudge too?
 
MOTHERFUCKING FUDGE NOM NOM
 
ah, something we can agree on :D
I think all the non-chocolate in your chocolate play a big part in that
 
@ScottW What did you do?
 
oh I'm hardly a sweet fiend
 
@ScottW oh you ran 8.2 miles
good excercise
aren't you hungry? :P
when you're sleeping?
haha
inb4 I'm fat
ahahah
lol
was that pic of the dog on FB your dog?
wait I thought he was a brown lab?
 
9:58 AM
just went to the market
there was rain and wind
 
just he looks brown on your avatar here
hmmm
so you take him with you when you go running?
hahaha
lol
 
@thecoshman y<motion>, yy, Y or :yank
@FredOverflow though again, the real gain isn't usually in the improved transfer rate, for the OS disk. Instead all the absences of latencies combined can lead to much higher responsiveness and, thus, perceived performance improvements
 
@sehe Installing Windows, Java and Visual Studio took 40 minutes instead of 60. Nice.
@ScottW Have you tried forwarding it instead?
 
user1804599
Hello.
 
@FredOverflow comparing boot times or time to launch visual studio is gonna be so much more impressive :)
 
10:08 AM
@ScottW Your leg hurts to move -> maybe forwarding your leg doesn't? You know, std::move vs. std::forward...
 
user1804599
Suck it, xhamster! I mean not literally.. ah, never mind. http://t.co/o1ll6LkdqE
 
user1804599
lol
 
Isn't it scary that in those caves (at where our overnight hiking group stayed over night), wildlifes come in when we are asleep, searching our bags for food? It is a popular cave for overnight hikers ...
 
> Xhamster is a community of open minded people.
fascinating
@FredOverflow lol
 
shouldn't that be "open legged people"?
 
10:12 AM
posted on October 13, 2013 by Anders Schau Knatten

Now and again I see people forgetting the & in range based for loops, like this: What some people seem to forget, or don’t know, is that this creates a copy of the element for each iteration. Unless you actually need a copy, there is no need to perform it. And if the objects you […]

 
user1804599
@Feeds It’s Sunday, noob.
 
Ell
I want to subscribe myself to all the feeds feeds is subscribed to
 
there's a list on the room info page
 
10:16 AM
lol
 
@sehe o_0
 
user1804599
1 min ago, by DeadMG
http://blog.knatten.org/2013/10/13/prefer-using-references-with-range-based-for-loops/#comment-750
 
Oh okay.
 
I, of course, totally did not write that comment.
 
I don't really agree with your comment if it is yours
 
10:18 AM
why not?
 
But I'm too busy playing video games.
 
fair enough
 
I usually do auto&& anyway.
@DeadMG Because it's the same as using ++i instead of i++. I mean, sure, it's a micro-optimisation but you know it'll be better most of the time so might as well do it out of habit.
 
the difference is that ++i and i++ are the same characters and the same effort.
it's just that ++i is in a different order.
switching is free.
but going "Er mah gerd, would it be more performant to type substantially more characters?" is going to break my concentration
 
user1804599
foreach<tab> inserts for (auto const& x : vec) { … } anyway. :F
 
10:20 AM
fail autocomplete
 
user1804599
Nope.
 
it should be for(auto&& x : vec).
well, I'd personally stop at for(auto&& x : unless you have a psychic autocomplete that knows the container expression for you.
 
user1804599
It automatically selects x and if you hit tab it selects vec and if you hit tab again you can type the body.
 
mine does this too
 
user1804599
I can edit the snippet if I want but meh.
 
10:28 AM
hmm.
maybe I should just ban type t { } in favour of using t := type { }.
 
user1804599
How about declare t as data type … end declare t as data type.
 
Ell
struct Header { template<iterator_type> static Header parse(iterator_type i); };
struct Tag { template<iterator_type> static Tag parse(iterator_type i); };
struct Swf { template<iterator_type> static Swf parse(iterator_type i); };
// vs
class Parser {
    Header parse_header();
    Tag parse_tag();
    public: Swf parse_swf();
}
At the minute it looks like the latter. But the former would be easier to test
 
user1804599
@sehe how did you find your new job?
 
@not-rightfold no.
 
Ell
@DeadMG what do you use at the minute?
both?
 
user1804599
10:36 AM
-1
A: How array name has its address as well as its first element in it?

Stefano SanfilippoThis happens because a and &a are equivalent syntax in C. If you want to take the address of the pointer to the array (or the first element of it, it's the same), then use &&a.

 
user1804599
WTF. Who upvoted this crap.
 
user1804599
Also hahaha.
 
@Ell Yeah, I permit both.
 
Ell
./configure # this may take a while if this is your first time, as it downloads LLVM :/
wtf rust -.-
forget it!
 
@Ell I remember my first time, it didn't last long at all.
 
Ell
10:43 AM
I already have llvm though
I'll do it some other time when I have a new hdd >.<
 
alright, so
do I attempt to debug the release build, or attempt to optimize a debug build, or attempt to optimize a release build and pray the debug build will be suitably faster by inference?
 
Ell
I guess optimise the debug build
@DeadMG Do you unit test your parser?
 
not currently.
I will resume doing so as soon as I'm back to focusing on the correctness.
 
Ell
Because I want to start unit testing my basic parser, but I don't know how to go about it
 
I'm the wrong person to ask about unit testing of complex systems.
I don't know much about it myself.
 
Ell
10:49 AM
All the functions are private and I'm not sure if they should be
 
I only have some really basic tests for Wide.
 
Ell
Ah right fair enough
It was the reason I was thinking of changing from the latter to the former in the code I posted above
 
personally, I made all my subfunctions public.
there's nothing illegal about deciding you want to parse an expression only with the Wide parser.
and it's helpfully named ParseExpression.
 
Ell
I guess
I think I might move the parse methods out of the big parser class for another reason though. You know that big list of tags I had yesterday? Well each is parsed differently so I'm going to have to write a function to parse each. I think that might be better to have in the struct of the tag
 
not unreasonable.
why are you writing a swf parser, btw?
 
Ell
10:54 AM
Well originally I wanted to extract bytecode
I know there are already tools available for it but I want to do it myself now, and it has a spec available
I don't know really, it was just the project I chose
 
fair enough.
it's not like there aren't many other projects I could have pursued other than making Wide.
 
Ning
 
sir,,i have C++ Project for assignment,need ur help plz to make working the same,,,thx
 
Tomalak: the other C++ room
 
11:07 AM
// My assignment project:
int i = 0;
 
Oh yeah? i+=2;!
 
user1804599
i+=3/*p; /* adds 3 divided by *p to i */. Comments are misleading!
 
i = INT_MAX;
 
@FredOverflow missing a +1
 
user1804599
11:12 AM
@FredOverflow the compiler will now optimize out the three first reassignments of i.
 
@not-rightfold careers
 
user1804599
@sehe OIC.
 
'Please design my complex, distrubuted, transactional, restartable processing system for free':
http://stackoverflow.com/questions/19344288/choosing-the-right-design-pattern-for-computational-nodes
 
user1804599
If you are “choosing the right design pattern,” you’re doing it terribly wrong.
3
 
@sehe Are you happy with it?
 
11:14 AM
I hope so.
 
Ell
Hmmm where to put parsing functions like parse_fixed_8_8 and parse_int_le
 
Obviously I think I will
All the external factors are looking good
 
user1804599
@Ell in a namespace.
 
okay family business, be back later
 
Ell
@not-rightfold namespace BasicParsing? :S
I have all my other parsing stuff in the classes which is parses
 
user1804599
11:15 AM
Do those functions change the state of the object?
 
what's wrong with namspace SWF { namespace Parser { /* stuff */ } }?
 
user1804599
Do they need to access private variables of the object?
 
What does a double ampersand mean, I mean & is a reference, so is && a reference to a reference?
 
@GamesBrainiac Rvalue ref
 
Ell
@not-rightfold they don't
 
user1804599
11:16 AM
@GamesBrainiac it means logical AND.
 
Ell
they are static functions
@DeadMG okay maybe I will go with that after all
 
@not-rightfold I was talking about the for loop you and dead were discussing
 
Ell
I'll just do that and not have a parser class
I'll just have a big load of free functions
 
user1804599
It’s a universal reference.
 
You had for(auto const& var: vec)
 
Ell
11:17 AM
@GamesBrainiac && is an rvalue reference
@not-rightfold only if the type is deduced, no?
 
user1804599
 
user1804599
> auto&&
 
Ell
@not-rightfold oops. my bad
 
@Ell Yes.
 
user1804599
Not sure why you would use auto&& though. Dead any reference (dat pun)?
 
11:20 AM
on the contrary
there's no reason to not use auto&&.
you always get the correct result.
 
@DeadMG Apart from them not being const?
 
@NikiC If the RHS is const, then auto&& will be a const ref.
 
286
Q: What is move semantics?

dicroceI just finished listening to the Software Engineering radio podcast interview with Scott Meyers regarding C++0x. Most of the new features made sense to me, and I am actually excited about C++0x now, with the exception of one. I still don't get move semantics... What is it exactly?

 
@DeadMG but if the iterated container is not const, then you will also get a non-const reference, or not?
 
the only way in which auto&& ever fails is if you need to take by value- auto&& is always a reference.
else, it is perfect.
@NikiC Yep.
 
user1804599
11:22 AM
Wasn’t there some issue with xvalues?
 
xvalues don't get their lifetimes extended, but that happens with both const& and &&.
 
> if you need to take by value- auto&& is always a reference.
 
user1804599
Ah. :P
 
:12329208 Er, no you won't, it can add const implicitly.
 
@DeadMG yeah, sorry, brainfart ^^
 
user1804599
11:24 AM
What if I do auto&& r = std::move(o);?
 
@not-rightfold How is your new desktop build coming?
 
user1804599
lol
 
@not-rightfold You'll get an rvalue reference to o.
 
@FredOverflow You gave that question two answers?
 
user1804599
Oh duh. :facepalm:
 
11:25 AM
@GamesBrainiac Yes, but they are two years apart.
 
I upvoted both of them forever ago.
 
user1804599
@FredOverflow not.
 
Too lazy? Not enough money? Don't know what to buy?
 
user1804599
The former.
 
What are move semantics vs What is move semantics
:s
 
user1804599
11:26 AM
Move Symantecs.
 
@Rapptz Thanks, I couldn't have afforded my first Porsche without your upvotes 3>
 
@FredOverflow Whatever helps pay for it.
 
@Rapptz Yeah, the edits are really stupid. Why didn't he just leave it at "Can someone please explain move semantics to me?"?
 
user1804599
I am annoyed by the fact that stackoverflow.com/questions/28002/… has more upvotes than stackoverflow.com/questions/332030/…. The former should be closed as dupe IMO.
 
user1804599
The latter has more complete answer.
 
11:27 AM
@Rapptz I haven't written a long C++ answer in a long time, but there's nothing C++ish on my chest, so...
 
user1804599
I voted to close once but people started bitching THIS ONE IS OLDER.
 
Hm, I don't think age should make a difference. Either merge the questions into one, or mark the worse as a duplicate of the better.
Ask on meta?
 
@not-rightfold It's a more general question.
 
user1804599
It’s a superquestion of the other one.
 
user1804599
:P
 
11:31 AM
super and sub sucks.
 
user1804599
Sub Base.
 
Is type(object) really a cast?
 
yep.
hard to believe isn't it.
 
I was under the impression it was just a fancy construction.
 
s/fancy/unnamed/, I believed that too.
now I know slightly better
 
11:32 AM
@TonyTheLion Tonnyyyy! :D How ya been man?
 
Unfortunately, it only works if type is one identifier and nothing else. You cannot say char*(s) or unsigned long(x).
 
one of the many things Wide fixed.
 
removing C-style casts?
 
yep.
(type)object is illegal, and type(object) is a construction.
 
Ell
How do you cast in wide?
 
11:34 AM
in fact, it's really just a function call, where that function happens to be a constructor.
 
In the end, is the only difference between wide and C# going to be that Wide has an LLVM backend, and that the syntax is different?
 
Ell
@GamesBrainiac lolno
 
@GamesBrainiac Er, no.
 
@Ell inb4 StaticCast<T>
 
no way would I sign up for that enforced-GC, nonexistent useful deterministic destruction semantics, Object all-the-shit, no strong higher-level typing.
also
 
11:36 AM
"nonexistent useful deterministic destruction semantics" -> thats a mouthful :P
 
I'm pretty sure that (type)object is legal C#
 
Jon
what is Wide
 
user1804599
@DeadMG It’s not legal.
 
@not-rightfold It's a cast.
 
user1804599
11:37 AM
You can’t cast a type to another type.
 
@DeadMG Yeah that's how you cast in C#.
 
user1804599
You can only cast objects.
 
How overly pedantic and silly.
 
har har, very funny nubfold.
 
user1804599
It’s time for apocalypse.
 
Ell
11:40 AM
uh darn I just realised I need to take an iterator pair
there is no way to get an end iterator from an iterator is there?
 
no.
the Wide parser uses a range design.
 
user1804599
Hmm.
 
user1804599
Are vector iterators still valid after moving the vector?
 
not guaranteed by Standard I believe
 
no
 
user1804599
11:43 AM
lolk
 
user1804599
Showertime.
 
@not-rightfold no, because vector may use a stack-based allocator
 
one of the many deficiencies in the Standard when it comes to iterators
 
if you move a to b, a isn't guaranteed to be valid iirc.
 
the question is whether or not the iterators must now point to b.
 
11:49 AM
Hm. 7:49 AM. Should probably go.
 
user1804599
@DeadMG ah, right.
 
@DeadMG they won't if they point in a.internal_buffer
 
@Abyx Small vector optimization is banned.
 
@not-rightfold Most of the time, you don't cast objects in C#, but references ;)
 
11:51 AM
this cracks me up
 
@DeadMG really? as well as stack_allocator<N>?
 
user1804599
@FredOverflow lel
 
@Abyx No, funky allocators aren't banned, but the vector itself is banned from doing anything like that.
 
Ell
When taking an end iterator, should I do const iterator_type& eof or iterator_type eof?
I shuold google first
 
Jon
@DeadMG fair enough
 
11:52 AM
@Ell Use a range design.
 
user1804599
@Ell latter.
 
@Ell Take iterators by value.
 
@Ell I'd take it by value and then use a profiler
 
Ell
Well, good practise was my concern, as opposed to performance
@DeadMG I think iterators suffice for what I'm doing
 
lol
 
Jon
11:57 AM
try boost::range
 
not really much better
let me tell you something
I gave up on every iterator-based parser I ever wrote.
 
Ell
Why? What do ranges offer over iterators? In this use case
 
simple
iterators involve endless "Am I at the end yet" bullshit
 

« first day (1093 days earlier)      last day (3853 days later) »