« first day (782 days earlier)      last day (4159 days later) » 

10:00 PM
Do the tests compile?
 
@R.MartinhoFernandes Whoa whoa, let's not get ahead of ourselves here.
 
@Quuxplusone Could be a bug in your allocator
 
(Not passing is ok)
 
They're not exactly trivial
 
One tiny step at a time.
 
10:00 PM
Does the standard say anything about what the allocator<T> is actually used for? Seems like libstdc++ is using its allocator to allocate a big chunk and then making &vec[0] be a pointer into the middle of that big chunk.
 
No, probably not
 
@CatPlusPlus It seems pretty trivial in this case. ;) But yes, I should test the hypothesis I just stated. :)
 
Also vector is a big chunk of memory
 
one second
 
I don't know about making vec[0] in the middle of it
 
10:02 PM
@Quuxplusone Theres an entire article in one of the books by Scott Meyers on how allocators probably don't do what you think they do.
 
Also there's std::align for aligning things
 
You may find it interesting
 
@Quuxplusone Likely not relevant, but the hint should be super::const_pointer.
 
user1182183
hmm nah it's not an index out of bounds error.. loop number: 295, arr size: 298
 
Also there are working aligned allocators out there
 
10:03 PM
@CatPlusPlus posix_memalign allocates already aligned memory.
 
@R.MartinhoFernandes No, it should be std::allocator<void>::const_pointer. :P Or something like that.
 
@R.MartinhoFernandes It overallocates to align anyway.
 
Oho. libstdc++ isn't calling my allocator code at all. :P
Well that answers that.
 
Also boo POSIX
 
user1182183
temp[0] = DPoint(Thread_xNode[tbcway.at(k)].xPOS,Thread_xNode[tbcway.at(k)].yPOS);
temp[1] = DPoint(Thread_xNode[tbcway.at(k+1)].xPOS,Thread_xNode[tbcway.at(k+1)].yPOS);
 
10:03 PM
rebind.
 
user1182183
one of these 2 lines is crashing...
 
I guess libstdc++ doesn't do allocator stuff, at least not for std::vector.
 
@Quuxplusone You need to take over rebind.
 
Yes it does
 
10:04 PM
@Quuxplusone It does.
 
user1182183
i don't see anything that would be wtrong
 
I put a printf in my allocate() member function, and it never gets hit.
 
But it might rebind and the std::allocator rebind gives out new std::allocators.
 
aha
 
Allocators: not trivial
 
10:05 PM
Touché.
Let's see if overriding rebind helps...
 
-6
Q: g++ char NULL error

Catalin FestilaI try to compile with gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) The input file has a const char : #include <stdio.h> #include <stdlib.h> #include "textfile.h" ... const char * vs=NULL; vs = textRead("myfile.file"); const char * vv = vs; free(vs); This chars vars are used ...

 
Also, error-checking with assert is bad
 
I have an immense urge to retag the shit out of this...
 
Don't link this question here AGAIN tia
 
@GamErix out of range?
 
user1182183
10:06 PM
@TonyTheLion nope :/
 
user1182183
maybe it has something todo with my =operator
 
@CatPlusPlus It's been linked before? Oops...
 
@CatPlusPlus the asserts in the code look like real asserts (i.e. the world must have ended for them to fail)
 
@Borgleader Why do you think it's at -6 :v
 
@R.MartinhoFernandes @CatPlusPlus bam. rebind fixed it. Thanks guys!
 
10:07 PM
Because it's a crappy question? Which it not why I linked it... I have issues with the tags...
 
@GamErix can you post the code surrounding it in a ideone thingy?
 
Maybe
 
@Borgleader I hope OP steps on Lego :P
 
@Quuxplusone You're welcome.
 
user1182183
oh I think I see the issue
 
user1182183
10:08 PM
I hope..
 
user1182183
for(int k = tbcway.size()-1; k > 0; --k)
 
If everyone in China jumped at the same time, they would lose all credibility as a nation for organising such a pointless excursion.
 
Oh damnit...
 
user1182183
and then accessing vector.at(k) (k+1) and (k-1)
 
@Borgleader wat
 
10:09 PM
@Borgleader Quickmeme sucks.
 
Oh, and also, is there a stylistic improvement over my stupid typedef std::allocator<T> super; ?
 
using super = allocator<T>?
 
At first I thought I could just use pointer instead of typename super::pointer, but it didn't work.
 
I don't see anything else.
 
10:10 PM
Don't use int for indexing into containers
 
@GamErix it'll do an out of range access when k = size() - 1 on k+1
 
Also counting backwards suck
 
@R.MartinhoFernandes Indeed it does...
 
Reverse iterators.
 
Use iterators/ranges probably
 
user1182183
10:10 PM
test #383485838758387
 
They already hold the correct logic for iterating backwards.
 
@Borgleader lol
 
In a neat package.
All you need to do is use them~.
 
I don't know about neat
But it works
 
oh that cattitude
3 hours ago, by Etienne de Martel
@EvanCarroll Hi. Who the fuck are you?
is that ^ a new way of saying "welcome"?
 
10:12 PM
To trolls? Yes.
 
user1182183
ow yeah
 
user1182183
that was the problem
 
oh I see
I missed some action
I was out bowling
with coworkers
 
user1182183
@TonyTheLion ;)
 
and I lost epically!
 
10:14 PM
@TonyTheLion It's how I say "hi" to assholes.
 
Hmm, work party thingy tomorrow.
 
Emma Stone has a nice face
I'd watch a movie with her in it, just because she's in it.
 
FlameWar::Ignite("Emma Watson > Emma Stone");
 
Warblegarble.
Goddamn nullptr.
 
10:18 PM
@Borgleader hmmm not entirely true
 
user1182183
I thought vectors are safe to access with .at(x) .. well then I can just the fuck use vector[x] !
 
hmmm not entirely untrue
is what I meant say
 
They are safe, at() throws exception when you're bad
That you don't handle exceptions is another matter
 
@Borgleader Both are hot in their own way.
 
user142019
I use at only on std::maps when I don’t want a new object to be stored if the key isn’t there.
 
10:22 PM
@EtiennedeMartel True.dat but I have preference for Miss.Griffyndor
 
@Zoidberg'-- I don't think std::map has an at member, you're thinking of find
 
user142019
@MooingDuck I do.
 
@CatPlusPlus To be fair, handling exceptions from at is just bad.
 
user142019
@MooingDuck How would you access an object on a const std::map?
 
@Zoidberg'-- find?
 
user142019
10:23 PM
oh yeah xD
 
user142019
Well, it has at(). :P
 
Even with top-level handler that's not std::terminate
 
Whatever
 
@Zoidberg'-- oh hey, so it does. That's new
Didn't know they added that
 
10:24 PM
The real solution is to not be terrible at writing code
 
user142019
The real solution is to abandon C++ and use a sane language
 
@Zoidberg'-- like java?
 
user142019
> sane language
 
@Zoidberg'-- example?
 
user142019
Like Haskell.
 
user142019
10:26 PM
But all languages suck.
 
why can't I follow facebook on github?
 
user142019
Because Facebook is an organization and for some useless and terrible reason you cannot follow organizations on GitHub.
 
@Zoidberg'-- This again? Srsly?
 
@Zoidberg'-- that seriously sucks
 
user142019
@bamboon email GitHub.
 
10:29 PM
@Zoidberg'-- that will definitely make them change that.
 
user142019
@bamboon niet geschoten is altijd mis.
 
@Zoidberg'-- well, I might do that tomorrow
 
user142019
(Dutch proverb.)
 
@GamErix Why/where/when are you using [] or at on a vector? At one time I did that a lot, but most of my recent code just uses algorithms that operate via iterators.
 
@Zoidberg'-- All.
 
user142019
10:30 PM
@EtiennedeMartel All, especially French.
 
user1182183
@JerryCoffin for(int i..... vector[i].blabla
 
@Zoidberg'-- Aren't you Dutch?
 
@JerryCoffin I'm a noob and I use []. I don't use at though...
 
If I remember correctly, .at() demands bounds checking and [] demands nothing (except in debug mode)
Also, I've hit more errors in ogonek. =[
 
user142019
@EtiennedeMartel If you ain’t Dutch, you ain’t much.
 
10:32 PM
I'll never be free.
 
@Zoidberg'-- If you ain't Dutch, then you're probably not Dutch.
 
Yes, sure, I'll compile some random shit for you
How much do you pay
 
user142019
@EtiennedeMartel Your statement is true.
 
user1182183
@CatPlusPlus -$100 / compilation
 
@R.MartinhoFernandes is basic_text::storage a function or just a regular class member? VS is starting to complain about it suddenly. From what I can see, it's just class member...
 
10:34 PM
2 messages moved to bin
 
@ThePhD The debug mode thing is Microsoft only
@alan2here no, we don't do that here
 
@ThePhD It's a function.
 
@R.MartinhoFernandes .. Oh. Well there's no () on some of these, so let me change it...
 
1 message moved from bin
 
Wait, what?
 
10:35 PM
2 messages moved to bin
 
Uh.
basic_text(basic_text const& other)
            : storage(other.storage) {}
        basic_text(basic_text&& other)
            : storage(std::move(other.storage)) {}
        basic_text& operator=(basic_text const& other) {
            storage = other.storage;
        }
        basic_text& operator=(basic_text&& other) {
            storage = std::move(other.storage);
        }
 
oh I added those
the robot used = default;
 
=l
 
You suck puppy.
 
@DeadMG Did you accidentally bin my stuff?
 
10:36 PM
@EtiennedeMartel No.
 
    Container storage_;
 
Ah.
 
    Container const& storage() const {
 
@R.MartinhoFernandes Damn your crappy underscores :(
 
Xeo
@EtiennedeMartel It wasn't an accident.
 
user142019
10:36 PM
What. Why would you explicitly implement it when = default would suffice? Visual Shit++?
 
@EtiennedeMartel No he binned it on purpose :P
 
Xeo
@R.MartinhoFernandes Yeah, you should put them in the front!
 
@DeadMG I don't use them often. Only when it conflicts with a getter.
 
@Xeo I didn't bin anything by Etienne.
 
Xeo
@DeadMG You unbinned it again.
 
10:37 PM
no, that was by Zoidberg
 
Why not zoidberg?
 
indeed
 
Xeo
2 mins ago, by DeadMG
2 messages moved to bin
 
why not bin things that Zoidberg says?
5
 
Xeo
Click the "2 messages" link
 
10:37 PM
@DeadMG lol
 
Xeo
Now tell me who sent the message that is highlighted.
 
m_storage :3c
 
So, I guess the puppy has pretty lousy aim for a consummate FPS gamer.
 
zoidberg did, obviously
can't you read?
 
Xeo
@DeadMG Are you just trolling now?
 
user142019
10:38 PM
@DeadMG because he will cut your head off with his claws. (\/)(;,,;)(\/)
 
@alan2here: It's not a they so much as one guy, and it's relatively common for open source. (A) you probably forgot the submodules, or (B) you used the wrong Visual Studio. Either (A) suck it up or (B) use something else.
 
Did you fail your reply or are you pinging him into the chat?
 
user142019
Damn I still haven’t bought Erlang Programming.
 
@Borgleader he never left chat, he's still here
 
@MooingDuck Oh, well there no arrow to the previous message :(
 
10:40 PM
._. Maybe I should just marry curly braces or something...
 
@Borgleader his messages all got binned
@ThePhD you're strange sometimes
 
@ThePhD Not if you wanna keep using buggiform initialization
 
@EtiennedeMartel Which is fine for something like Team Fortress though...
 
Well, even simple stuff that you didn't think would need curly braces has curly braces in ogonek.
 
@MooingDuck Ohh... lol
 
10:41 PM
@ThePhD It doesn't need it, often.
the robot just does it because he's gratuitous like that
 
@ThePhD curly braces are a shortcut. You use them because they're awesome, not because you need them.
Why do it the hard way?
 
@MooingDuck Well, there's too much awesome in this library for me to handle in one sitting. :c
@MooingDuck Because MSVC doesn't like it, apparently.
 
You know what? If you ever file a bug for ogonek with a test case, the robot thanks you, but please do one of: #1 send the test case in UTF-8 or #2 make clear what encoding the test case is in.
 
fortunate you already spent several sittings on it
 
10:43 PM
@EtiennedeMartel afaik that's not new...
 
@EtiennedeMartel Sounds like a horrible place to be.
 
don't they do this regularly?
 
Yeah, well, I just saw that.
 
Some anon sent a bug report with expected output and full SSCCE and all, but the SSCCE contains u8"" strings and I don't know what encoding the source file is in.
 
user142019
@EtiennedeMartel inb4 new event Pray to Waste Your Time.
 
10:43 PM
:(
 
@R.MartinhoFernandes Sad face.
 
@R.MartinhoFernandes does the lib have a "guess an encoding" function? I needed one of those today. (Java, but still...)
 
I swear, I'm gonna do a find-replace for all curly braces =[
 
@MooingDuck Eventually, yeah.
 
user142019
@MooingDuck doesn’t Java have an FFI?
 
10:45 PM
@ThePhD That won't work. Functions and stuff, you know.
 
@Zoidberg'-- yes, a few
 
All my tears.
 
user142019
I am in the mood to eat food.
 
@Zoidberg'-- That's been cooked by a dude?
 
stewed by a dude
 
user142019
10:47 PM
I don’t care who cooked it, as long as he/she had clean hands and didn’t want to kill me.
 
So long as he's not rude.
 
user142019
But I’m preparing it myself right now.
 
Ell
From what kind of store does one buy a hip flask?
 
Ha, seems to be UTF-8, but this terminal seems to have trouble rendering the stuffs.
 
@VladLazarenko I wonder if your mother replied so to you after you asked her why your name is Vlad. — Beginner 6 mins ago
 
10:50 PM
@Ell an Internet store? :)
 
Is there a way to force FF to open a link itself, instead of downloading it?
 
Ell
@Quuxplusone A real life store
 
That was my answer.
@R.MartinhoFernandes Not as far as I know. That's a huge pet peeve of mine. I found and commented on the relevant FF issue report a few years back.
If you wanted to go to a ton of effort, you could "Open With..." a shell script that re-invokes FF as "firefox my-hypothetical-mimetype-erasing-proxy.com/?=original_url
(my-hypothetical-mimetype-erasing-proxy.com slash questionmark original-url)
 
Meh, it's an 80-line source file. I'll download it and open from the hard drive.
Thanks anyway.
 
@R.MartinhoFernandes I think I've gotten as far as I could.
I'm starting to hit errors about type deduction failing when using boost, and I'm not about to tussle with those.
 
10:54 PM
What's the big blocker now?
 
The type deduction failures are both in ucd_data.c++ and windows1252.c++ (I've taken the rest of the files out of the project to not be spammed by errors).
 
@ThePhD Make a pull request (please, make it clean, i.e. don't add unnecessary stuff, rename files like mad, etc). I will install VS12 and see if I can get the rest done.
 
On the bright side, there's no errors in ucd_data generating all that stuff from the headers, and you can generate new ucd data on the fly by just F5'ing the C# project in VS2012.
Do you want me to zip the new UCD data or just leave it out?
 
No, just send the compiler.
 
Hookay.
 
10:56 PM
I don't keep the data in the repo exactly because it can be regenerated easily.
 
0
Q: Hash map and ordered traversal

infoholic_anonymousI am to implement from scratch in C++ a hash map as a full featured abstract data type. Especially, I am to provide an iterator for this data container that would be able to traverse all of the records in an ascending order of the identifying keys. And this part makes me confused, I have no idea ...

he's going to be in for a surprise I think
 
Xeo
This game's a jerk.
 
@Xeo well given the name...
 

« first day (782 days earlier)      last day (4159 days later) »