« first day (196 days earlier)      last day (4734 days later) » 

12:00 AM
Is there any risk in overloading (unexpected casting)..? I remember reading that it's better not to overload pointers and integers. Perhaps this advice somehow also applies to overloading enums?
 
I'm using different names. I guess practice will show if that's a good idea, or not. Name is overridable, anyway, with X ## ToString and StringTo ## X as defaults.
 
@PiotrLegnica I prefer that also. Then there is never any doubt if the right function is called.
Btw, providing a mechanism for iteration would also be nice. @JohannesSchaublitb posted some nice ideas here: stackoverflow.com/questions/1390703/enumerate-over-an-enum-in-c/…
 
ForEachX(std::function<void(X)>) maybe?
 
Something like:
for (RGB::iterator it = RGB::begin(); it !=RGB::end(); ++it) {
RGB & rgb = *it;
std::cout << rgb::name() << std::endl; // I liked the syntax in @JohannesSchaublitb samples
}
 
Xeo
last closing vote on here stackoverflow.com/questions/5838526/…
 
12:10 AM
Does anyone know how to vertically increase the size of the chat text input box?
 
@StackedCrooked Would that work in that code? I think it won't compile, because rgb is not a type.
Anyway, we have lambdas so that wouldn't be too bad:
 
Xeo
oh well, I'll leave for tonight, g'night everyone
 
ForEachRGB([](RGB value) {
    std::cout << RGBToString(value) << std::endl;
});
 
@PiotrLegnica yeah, this is what I ended up with after toying with Johannes' code that used namespace containing integers instead of a real enum. It probably won't work in your code.
@PiotrLegnica Ok, that's pretty advanced already.
 
Also, I think that PP_NARG trick doesn't work on MSVC. :(
 
12:32 AM
@StackedCrooked Zooming in works on Firefox, but it also increases the height of each character ;v)
 
@PiotrLegnica Dang.
 
12:45 AM
@JohannesSchaublitb Heh, I've been meaning to try that experiment. I don't really give the strategy a high chance of success. However, that code doesn't work because &Name in sizeof(f(&Name)) does not resolve the function overload. The first declaration does not depend on a prior declaration; the second declaration finds just one overload; the third finds two overloads and requires a typecast per §13.4.
However, the cast cannot be constructed without knowing the value of the counter. So you need to put the SFINAE into a recursive template. However, the template must be called with an initial value of zero, as (again) you don't know the value of the counter. This will probably break with memoization, and is likely ill-formed, as you are redefining names which the template depends on between implicit instantiations.
 
@StackedCrooked Dunn dunn dunnnn, Crazy Unnamed Enum-Making Library v0.2.0: bitbucket.org/piotrlegnica/stuff/src/ac3924a3e17a/enum.hpp
Now I need some sleep, enough with the preprocessor abuse for today.
 
What's up with this? It's late Friday here — even later everywhere else — and all the discussion is serious.
VAGINA!
 
It's 3AM.
And we're abusing enums.
 
@PiotrLegnica 3AM Saturday, right?
 
Yeah. I think.
 
12:51 AM
@PiotrLegnica That looks very nice..
 
Anyway, supports custom values and strings now, and is configurable and everything.
I wrote more preprocessor code today than ever.
 
 
1 hour later…
2:07 AM
hi @potatoswatter:
 
@Miss I noticed you didn't post a question to programmers.stackexchange.com.
Also, I'm busy right now.
 
 
1 hour later…
3:30 AM
I put in a pretty cool responce here stackoverflow.com/questions/1717701/… it's C++/CLI :)
 
4:15 AM
@potatoswatter: oo My dear SO people i solved problem .. instead of uninstalling the window
 
hy i was going to tell you when you appear offline..
 
now i guess here people would like to tell you about my problem
 
cpx
@Miss Are you talking to yourself?
 
4:18 AM
um…
 
@cpx no
actually i discussed my problem here
but people said me that uninstalled the window.. i was discussing with them for any other way.. but i guess they do't want to discuss.. so they said me to figure out myself
but finally, i solved myself.. thats a good news from my side..:)
@potatoswatter: i am pretty sure that people will now discuss me here..
i mean regarding my problem... anyways ... they will tell you better than me ..
you can read Mr.sbi message that he suggest me...
i am glad that i did this myself..
but even then i say thanks to people here on lounge<C++>
 
I noticed that your profile says ur in Earth, TX. That's only a day's drive from here.

You don't sond like a Texan. I'm guessing you don't really live there.
 
he he he...:)
ok if you say then i can show my location...
 
I'm not curious, I was just pointing that out.
 
well now i am feeling that my life is like problematic sex...
 
4:27 AM
Whoa, I'm outta here.
 
sex in c++.. but my sex in c++ is little weak... heheh
 
 
1 hour later…
5:31 AM
@potatoswatter: how could i upload my complete DTW folder to programmer SO website..?
 
 
3 hours later…
sbi
8:30 AM
@Alf, where have you been?!
We were worried about you!
 
cpx
8:41 AM
@Feeds Hi.
 
sbi
8:51 AM
@cpx He's a bot, posting stuff he's set up to at chat.stackoverflow.com/rooms/info/10/loungec?tab=feeds. I wonder why he's int his room, though. I can't see anything he has posted.
 
cpx
9:02 AM
I used to see messages from @Feeds at the top in form of a notification bar.
I was wondering that I haven't seen @Feeds in a long time.
Does it work now?
 
0
A: How detect if object deleted in place where it shouldn't compile-time?

Thomas EdlesonYou can't stop a malicious user from wreaking havoc, and your energies would be better spent documenting and educating users of the Graph class on how it should be used. Raw pointers are used in many different ways, so not using a raw pointer would help self-document the expected lifetime. A re...

@cpx it appears the busy/noisy feeds were removed from the channel (and that's good, they really were annoying)
 
cpx
I have mine set to 'none' for all.
 
what did you set?
the setting I'm talking about is per-room, without allowing each user to customize it
 
cpx
Sound notifications.
 
that is different
 
cpx
9:05 AM
Oh ok.
 
sbi
There's a difference. Feeds can be set up (by room owners) to either be posted at that top pane or from the feed guy. We used to have a feed here posting C++ questions in that top pane. And we have two feeds (answers/comments to that FAQ question on meta and new additions to the FAQ tag) setup to be posted by that @Feed guy.
That general C++ question feed was set up way back by Roger Pate to one of his interesting question collections on the SE site that found C++ questions all across SE. A while ago one of the room owners deleted that feed (probably because he was annoyed by it) and - lik
 
@sbi we should all be so lucky as he was to get a life :)
 
sbi
9:20 AM
@ThomasEdleson Actually, getting a life is the last thing I'm after. I feel like I'm already leading three of them.
3
 
0
Q: C++0x nested initializer lists

royI would like to use C++0x new initializer list feature to initialize a std::vector with a compile time defined number of items for a new API I'm currently working on. Something like this: template<int n> std::initializer_list<std::string> duplicate(std::string s) { // return s dupl...

somehow feel this isn't actually possible, but I'm really clueless
 
sbi
9:35 AM
@TonyTheTiger I made an attempt.
 
9:48 AM
hey is there any girl here?
i only see monkeys
 
@sbi nice :)
 
Once I start using the preprocessor I tend to use more and more. It's like a vicous circle.
Today I Learned that template specializations must be occur in the same namespace as the original class.
Btw, hi @TonyTheTiger @sbi
 
@StackedCrooked Hi
 
I settled with this syntax for creating my enums
`Futile_Enum(HTTPRequestMethod, 9, (HEAD, GET, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT, PATCH))`
 
how do you strip out the parens later?
why not just use a variable-arg macro?
or write it as a code generation step?
 
10:01 AM
And I can obtain additional info via a metadata object if (enumerator >= EnumInfo<Enum>::first() && enumerator <= EnumInfo<Enum>::last())
@ThomasEdleson I'm using the Boost preprocessor library.
@ThomasEdleson There seems to be no way to get the number of varargs at compile time. I eventually found a method, but turned out not to work on Visual Studio.
 
iirc, you can do that with 2 macros if you set an upper limit, something like a max of 100
but I now use code generation for everything you have; after I got done screwing around with the preprocessor
 
It was a fun experience.
 
sbi
@jsoldi If you#re looking for a girl, there's always @Xeo. :)
@StackedCrooked Hi!
 
@sbi Lol
 
10:10 AM
so @Xeo is a girl?
 
C++ is only backwards compatible with C?
 
cpx
lol
 
i had no idea. so i need to be more careful now
 
cpx
@JohannesSchaublitb I don't think so.
 
sbi
@JohannesSchaublitb Well, this got disputed, and since @Xeo meant to show up for the meetup, I promised to check. But then SHe failed to show up, and since then we're entertaining the thought that she wanted to hide her true sex and is a beautiful 19yo female C++ programmer. :)
 
10:12 AM
lol
 
sbi
Anyway, it's not as warm as it was in my vacation week, but it's 15°C here, and a sunny day with a blue sky, so I'd better leave the house and get something done in my garden.
See you guys later.
 
@Potatoswatter a function parameter can resolve the overload too
@Potatoswatter when the overload set is given to a template function parameter that needs deduction, the spec says that trail argument deduction is done for each of the members of the set, and if only one trail argument deduction succeeds, then that member is used for the argument deduction.
Thus, you make argument deduction with a single member, and have the parameter then have a single unique type (for the N<M> with M being the highest number), and the the call resolves the overload set to that void(N<M>) member
but all compilers I tried did moan for a different thing :(
that's why I have that strange SFINAE in there at all :)
 
10:28 AM
lol @sbi
I just posted a polemic question
cause im DRUNKY
I'm a frustrated musician
how many ppl here is frustrated musician?
hi jjj are u a frustrated musician?
 
jjj
no ..... maybe .. use to be
 
I am :(
 
I'm not even a musician!
 
how many programmers are frustrated composers like 99%?
hey I got another question how many programmers are INVENTORS?
Cause to me programming is the paradise of the inventor is the place where the only rule is logic. Screw physics or chemistry, logic is the rule
I just like inventing I hate bosses that's why I'm poor lol
 
10:36 AM
Quick question, when creating a enum to string mapping, how do you handle the error if the string is not valid? For example: MyEnum FromString(const std::string & value);
My options are throwing or returning some a special null-enum-value. Which would you prefer?
 
cpx
I don't even know if I'm a musician. lol
 
so you do think you might huh?
I do like programmers better than composers though
they are so freakin narcisist
 
cpx
I don't think about being a musician.
Maybe i'm a natural musician at times lol
 
they think they are beyond logic and that fake humility is annoying. Programmers are loyal to logics. They are all nice :)\
They always take their time to explain why... Composer would say "because freaking GOD told me!"
 
Kajiura Yuki is like a God to me. She's a composer.
 
jjj
10:44 AM
"Programmers are loyal to logics" .. maybe the most .."They are all nice " .. i don't think so..!
 
well they actually usually are. I never knew people so attached to having thing well explained and making things clear.
Kajiura Yuki: a hottie indeed
I'm sure u guys will like this:
 
11:15 AM
What is a good type to store the number of items in an enum? int? std::size_t?
I sometimes think that std::size_t is the better solution because it's harder to type.
 
11:33 AM
@Potatoswatter ah it doesn't work because it doesn't consider the SFINAE failure!
 
Hi All
 
after 2 years of KDE4, it seems finally the composite mode works fluently on my intel chip :)
 
@potatoswatter: i posted my question there and i did not get a good response.. its useless to share the problem on SO..
 
yeah, SO sucks for asking questions
 
i guess if SO can't understand other's situation and problems then ....................'..:(
 
11:57 AM
Programming with the boost preprocessor is like a whole different experience.
 
of all the languages to do code generation in c++, the preprocessor is one of the worst
it's only redeeming feature is that it's required by the standard
 
12:14 PM
@ThomasEdleson that's a pretty significant advantage though
 
12:32 PM
I have a class that stores some metadata about enum values:
template<typename Enum, Enum value>
struct MetaData { };

I can instantiate like this: MetaData<Weekay, Monday> { };

Is it also possible to instantiate with only the enumerator and let the compiler deduce the enum type?
@ThomasEdleson I think it would be great if the preprocessor was more powerful.
I recently wondered if Bjarne Stroustrup hates the CPP simply because it is something that he cannot control from within the C++ language.
He spends years working on a super nifty feature and in the end the developer ends up writing a macro because it's quicker and gets the job done. It's only natural he hates CPP then :)
 
Boost.PP is cool.
 
@PiotrLegnica @PiotrLegnica I started using it yesterday. It's pretty cool.
 
@StackedCrooked Me too.
 
12:50 PM
@PiotrLegnica My implementation of the enum generator turned out to be quite different than yours. It doesn't provide the options of custom strings or numberic values. On the other hand it provides various utilities through template specializations of metadata classes.
But I had to resort to the boost pp as well (and cheated a little by looking at your code :))
 
1:01 PM
interpretor and compiler have same meaning in programing..is it?
compiler translate high level language to machine language..
i guess interpretor also give same meaning
is't
 
@StackedCrooked I'm moving it to its own repo, and going to try some more crazy ideas. Feel free to copy anything you like. :)
 
@PiotrLegnica I sure will :)
 
so compiler and interpretation are used for same purpose..
 
@Miss no
 
as i read and understand.. its use is same but depend on programing language..
 
1:17 PM
the page you linked has several things misleading or just plain wrong about it
the gist of the truth is there, but it's only going to be apparent if you already understand
which is true of a lot of teaching materials -- teaching is hard
for example: "You might wonder why the Java creators designed things this way - why use a two stage approach instead of just compiling or just interpreting the code like most other languages do? Well, the advantage is that once a Java file has been compiled, any computer with a Java VM can interpret and run that file. So the code is a lot more portable."
this completely misleads you about portable C (e.g. C89, though related effort started much earlier)
or even sh, which is much older, can be written portably (e.g. POSIX), and doesn't require externally-visible separate compilation and interpretation phases
 
Most interpreters compile the code to some kind of bytecode. Many use JIT. The difference is blurry and arbitrary.
 
@Miss what really matters is the level at which the code is interpreted, and how many steps it takes to get there; e.g. infoq.com/presentations/click-crash-course-modern-hardware
exactly: blurry and arbitrary, just like "scripting language" vs "programming language"
also wrong: "Because the interpreter must be loaded into memory, there is less space available during execution; a compiler is only loaded into memory during compilation stage, and so only the machine code is resident in memory during run-time;"
I've heard anecdotes where, on much older hardware, a higher-level interpreter can fit both code and data into cache and thus run faster than a traditionally compiled equivalent
 
ahh i see.. actually i am reading form book and i searched it from net..
 
remember that a higher-level language (or bytecode) can represent much more in a smaller space. the interpreter for that bytecode can be relatively small if it can take common parts (e.g. function call overhead, though that's a poorer example) and only have them once, instead of duplicated throughout machine code
 
2:01 PM
 
i want to check that which thing my program is using for translating the high to low level language
how can i do that?
is that using compiler or interpretor
@thomasedleson how can i check it?
 
what language is that program written in?
it almost certainly won't matter for you
 
2:23 PM
i am using C.. because my given project is in C..
i just want to know...because i read .. so i want to check what thing i am using compiler or interpretor..
 
C is compiled in the traditional sense
it doesn't matter for you though
 
ah..hmm
 
what matters is when syntax errors are caught, etc.
 
Als
2:50 PM
hello
blah a dead room
 
Anyone else using Google Code Project Hosting?
 
Als
Not me...Whos the one using?
 
I am, but I am getting frustrated that large commits fail about 80% of the time.
So I have to retry a lot.
 
Als
is that a problem with your connection?
maybe drops off
 
I'm getting error messages that say the server closed the connection. Sometimes BAD_GATEWAY. I think it's google.
Again: svn: Server sent unexpected return value (502 Bad Gateway) in response to MKCOL request for '/svn/!svn/wrk/684af865-85d4-4e8c-a718-7015720973c5/trunk/Main/3rdParty/Boost_1_46_1/boost/mpl/aux_/preprocessed/bcc551'
 
2:56 PM
Migrate to Mercurial. :P
 
you ever thought about trying a dvcs instead of svn?
 
@ThomasEdleson Never really bothered.
 
just because a dvcs is distributed doesn't mean you have to always try to take advantage of that fact
use it like a non-distributed vcs and then take advantage of the additional benefits as they arise, like now
 
I would like to try out though. Seems like fun.
Perhaps commiting boost is overkill.
 
Als
@StackedCrooked: I think looks like google bug
see this
 
2:59 PM
Lol, I'm on exactly the same page.
Wow, this two year old thread is still active.
 
Als
yeah but then most open source projects do work this way
lot of old bugs kept lingering
 
Perhaps they have policy of killing long running connections.
 
Als
looks like we both use google search the same say ;)
 
Last time I just commited individual files out of desparation.
@Als The copy/paste way :)
 
They must have some bug, it doesn't make sense to limit the connection time for version control.
 
3:02 PM
find . | xargs svn commit -m "Add this file."
:D
 
Als
@StackedCrooked: its an art too...I noticed lot of people cant even do a good search on google
 
Hmm... if only there was some solution to this version control problem where you could make your commits locally and then upload all your changes in a single efficient compressed upload...
 
@StackedCrooked "hg addremove" does approximately that, except 3 orders of magnitude smarter
 
@CharlesBailey Subversion is certainly using some form of compression though.
Ok, this time it's already started transmitting data. Promising.. (after 7th try)..
@Als btw the image I just posted describes superbly how bad people are at using google.
This time I only uploaded the headers, not yet the libs. Perhaps that was the magic trick.
I've been thinking of uploading the code first to a SliceHost and from there upload it to google. It's already in the cloud then, so perhaps it'll go faster.
And I'm not burdening my own machine anymore.
Oops, it failed again.
My command was: svn commit -m "Add boost headers." ;svn commit -m "Add boost headers." ;svn commit -m "Add boost headers." ;svn commit -m "Add boost headers." ;svn commit -m "Add boost headers." ;svn commit -m "Add boost headers." ;svn commit -m "Add boost headers." ;svn commit -m "Add boost headers." ;svn commit -m "Add boost headers." ;svn commit -m "Add boost headers." ;svn commit -m "Add boost headers." ;svn commit -m "Add boost headers." ;svn commit -m "Add boost headers."
Perhaps that wasn't good.
But, it automates the retrying :)
 
3:15 PM
Oh, how much I don't miss SVN. ;)
 
Somebody posted a follow up 2 hours ago that he's getting this error a lot today.
Well, it's better than FTP :)
Which is still used at some workplaces.. shudder
 
@StackedCrooked while true; do svn commit -m "..." && break; done
 
@ThomasEdleson Yeah, but I like brute repitition also.
Ctrl-A Ctrl-Y Ctrl-Y Ctrl-Y Ctrl-Y ...
Damn, I'm not very smart. I started this command: find . | grep -v "\.svn" | xargs -I File svn commit File -m "Adding a boost file."
And the first "file" found was the "boost" directory. :)
Well, now it will at least systematically try smaller directories.
 
Xeo
I see @sbi is spreading baseless rumours again
 
Is it about you being female?
 
Xeo
3:30 PM
What other rumours does he spread?
 
Yeah, there are not really any other rumors he spreads I guess.
I suddenly feel like playing Age of Empires II.
 
Xeo
the IRC channel where I idle most of the time is infected with a minecraft fever
 
Heard a lot about it, but never played it.
 
Xeo
Wow, I didn't answer any question on SO for 3 days straight
 
With Minecraft you won't be able to be productive ever again.
 
3:49 PM
minecraft looked somewhat interesting, but I haven't tried it yet
 
Looks kind of monotonous to me.
Ok, I already have 1064 dots of progress in my commit.
I love "irb" for this.
@Xeo have you seen anything "Mahō Shōjo Madoka Magika"?
 
Xeo
@StackedCrooked Yep
 
You're well up to date :) I'm at ep 3 or so. I'm not really impressed yet but it seems to be getting really good reviews.
 
Xeo
madoka is pretty controverse
the one half praises it into the sky, the other hates it down into hell
and then there are some like me who say "yeah, was pretty funny to watch, but not the best thing ever"
 
I suspect magical girl anime isn't really my thing. :/
 
Xeo
3:57 PM
but that reminds me, I need to finish seitokai no ichizon and write my review on it..
@StackedCrooked Try Mahou Shoujo Lyrical Nanoha
That will blow your opinion on magical girls away :)
 
Ok, I'll give it a try.
I watched the first few episdes of Sailor Moon a while ago. I stopped watching, but the humor was good at times.
I guess Fruits Basket doesn't count as magical girl?
 
Xeo
@StackedCrooked Nanoha has three seasons, and the first one starts a bit slow. That's why I'd recommend the movie remake of the 1st season that came out last year. It's just mind-blowing and waaay cooler than the real 1st season. :) The best season is still the second though. it's plain epic imho. And yes, I'm a fanboy. :(
 
Ah, good to know.
Lol, the movie is a 10 GB file.
 
Xeo
A friend of mine was really against watching nanoha, after he tried watching the first season. he stopped at ep ~5 or so. later, he watched the movie and then all 3 seasons and came to like it pretty much :)
Yep, 1080p HD :D
 
So I can skip the first season then?
 
Xeo
4:03 PM
I think there are 720p versions out there though
the movie is the first season
so yes, you could
 
1080 wa ii desu ;)
Ok
 
Xeo
@StackedCrooked Don't make me shoot you. :P
 
How are you going to shoot me? Send a ping message?
 
Xeo
who knows :)
 
Lol, know I'm scared. The uncertainty...
Any junk food recommendations?
I'm tired of pizza.
 
Xeo
4:05 PM
Geh, really need to watch ichizon now, there are 9 episodes left.. that's gonna take some time x_x
@StackedCrooked Salad :P
 
@Xeo do you really cultivate the discipline of watching all animes to the end? even if you don't like them?
 
Xeo
@StackedCrooked Oh, no, I drop anime I don't like. But Ichizon is pretty funny. The problem is that my review is due tomorrow
 
I'm watching the "Snow Queen". Not really exciting, but nice enough..
Ah you review them also? On a blog?
Btw, do you know whether Hitman Reborn is worth to continue watching? I'm kind of tired of it at ep 16..
 
Xeo
@StackedCrooked Yep. I got a poll at the beginning of every month, lasting one week, featuring 5 anime names. Whichever gets voted the highest I watch and review until the next month
@StackedCrooked Don't know, never watched it, but one person in the IRC channel really liked it and watched it all the way till the end
 
Hm, I guess I'll stick to it for a while.
I've also started watching Detective Conan, which is really old. I feel way to old for this. But the review on the THEM-anime-reviews-website is so motivated that I don't have the heart to give up on it. It also gets better I heard...
My commit failed again apparently.
 
Xeo
4:14 PM
@StackedCrooked I remember watching it on RTLII like 10 years ago. xD
 
RTLII? Do you live in Europe?
 
Xeo
@StackedCrooked Berlin, Germany
 
For some resason I assumed you lived in the US.
But it does explain why @sbi expected you to go to the meetup..
 
Xeo
:)
 
That's probably an even nicer city than were I live.
Anyone know a good hosting service other than Google Code?
 
4:23 PM
@StackedCrooked What VCS are you using?
 
Subversion.
 
Assembla was good once.
 
well, I guess then google code is still the best option
 
I could try mercurial on Google code perhaps.
 
that, or try git
 
4:24 PM
Bitbucket is better for Mercurial, IMHO.
 
GitHub is TEH awsome
 
One thing I like about Google is this: Your project is using approximately 375 MB out of 4096 MB total quota.
 
The only other SVN hosting except for Assembla that I know is Sourceforge, but you don't really want to go there.
 
@StackedCrooked GitHub gives you 300mb by default, if your stuff is open source, send them a mail if you need more than that (although GIT has way better compression than SVN)
 
Bitbucket gives you unlimited space. :P
 
4:27 PM
Bitbucket I'll have a look.
 
Still, GitHub tooling is way too awesome :P
 
I have used Assembla at my previous job and that was fine..
 
Xeo
If you're really desperate, try Dropbox. :)
 
@Xeo Yep, you could put a Git Repo into your Box and people can actually pull from that :P
 
You can put any DVCS repo on Dropbox, but they disable public links to files with too much traffic.
So it's fine for your own, but won't really work for anything else.
 
Xeo
4:29 PM
Anyone in here without a dropbox account yet? I want that free storage
 
How do you guys deal with big liraries like boost? Do you add them to your repository or is it just a dependeny for the user?
 
Yeah, but then again, if you have a project with actual traffic and it's GIT you'd mostlikely be on the Hubs anyways
anyways, I'm here because I got a rather simple question:
 
I have Boost in the repo (well, subset, but it gets bigger with time), it's not that big.
 
Yeah, boost isn't too big.
 
Xeo
@StackedCrooked Full Boost is ~300mb
 
4:31 PM
However, you should try committing it on Google code
 
It's 20MB in the working copy right now, and 3.7MB in the internal storage.
 
What's the best way to handle a failed allocation when it's "internal" e.g. I've got an array list implementation and the resize fails, what to do? abort()? (It's C)
 
It's text, it's highly compressible.
 
@Xeo yeah, I don't build all libs though, actually I only use the thread lib.
 
Xeo
@IvoWetzel In what context does the resize happen? user-request?
 
4:33 PM
@Xeo List->append(item) and the internal array needs to be resized to provide enough space for the added item
 
@Xeo Headers take 50MB, though. If you don't need all of the compiled libs then you can save a lot of space.
 
So it's not directly visible to the user, it's rather a implementation detail of the list
 
Xeo
@IvoWetzel Abort is a bit harsh then
 
You should throw an exception. ;)
 
Is it a bug or memory shortage? In both cases your chances of succesfully repairing the situation seem pretty dim.
 
Xeo
4:34 PM
But I don't code in C, but maybe a simple error value return "bad_alloc"? :P
 
@StackedCrooked Memory shortage
 
Xeo
Yay, one hour until the next Deadman Wonderland episode. @Stack If you have time to watch currently running series, try it.
 
Meh, if OS overcommits then you probably won't hit memory shortage. You might kill everything else that's running (hi, Linux), though.
 
I remember a chapter in Effecitve C++ that mentioned you need to set the set-new-handler. So that you can cleanly report and exit in case of memory shortage.
Ok.
@Xeo it's on my list.
 
Why are you writing C in the first place, it's tedious.
 
4:36 PM
@PiotrLegnica Exercise
Want to do some low level stuff on saturdays to steer my head clear from the JavaScript
 
@Xeo wow, that's a really recent one.
 
I'm no expert, but I think there are better excercises for fingers.
 
Like fingering.
 
Xeo
@StackedCrooked Like I said, currently running. :) Ep3 is due today, it's from the current season (spring)
 
@Xeo Interesting, I've already started downloading the first two episodes.
You are becoming an important source of information. :D
 
Xeo
4:39 PM
@StackedCrooked You'll like it if you're into action, mystery, drama and some blood. 29 dead people after 3 minutes 15 secondes, anyone? :)
 
@Xeo Sounds good.
 
Xeo
@StackedCrooked I really liked the first two episodes, so I started reading the manga.
 
@Xeo Good, I already lowered the priority of the Nahona Movie.
 
Xeo
@StackedCrooked Okay, that plan backfired
 
Well, my connection can't download faster than 500 KB/s, so the movie will take 20h anyway. Better let a few smaller ones in first.
 
Xeo
4:45 PM
@StackedCrooked Ah. okay then. :)
 
Phew, wipes sweat from forehead..
Meanwhile boost is still being committed...
825 dots of progress
Probably slowed down by other active downloads..
 
Now that I think about it, you could've svn:extern'd it.
 
@PiotrLegnica Yeah, but I don't like doing that. I want the full package.
Well, I would have had to upload it anyway...
 

« first day (196 days earlier)      last day (4734 days later) »