« first day (745 days earlier)      last day (4429 days later) » 

Xeo
Xeo
14:00
Too bad you need to have two-phase initialization for the tuple stuff in C++. :( liveworkspace.org/code/47cd20da5656262c75a45722d0e7f36a
there are libs you can download which are similar.
or just use std::list<char>
oh the horror
@TonyTheLion what you are saying is Erlang strings are implemented as a list/tree. (or some other similar data structure). Iteration will involve pointer chasing. You can't have everything unfortunately.
As I mentioned, haskell has the same behavior, but if you want to do large string processing you usually use a different type of string. This is no slight on erlang, just your idea of that somehow being special does not really add up. The parallelization features of erlang are way more interesting than how it handles strings IMHO.
Why doesn't the percentile no longer appear next to the rep in the user profile?
is it a bug?
it only does that if you have an impressive percentile, IIRC.
Xeo
Xeo
14:09
What percentile?
Oh, the "0.xx% this month, year, week"?
@Xeo yup
@DeadMG 0.01% this year ;)
Xeo
Xeo
Even Skeet doesn't have the percentile.
user142019
@FredOverflow me too.
14:37
awfully quiet in here...
user142019
I OBJECT!!
user142019
I want more bacon.
user142019
MOAR BACON.
@StackedCrooked no, you can simply nest one function inside the other
user142019
@StackedCrooked no, you can pass a function pointer as an argument.
14:46
well also, function pointers could be stored in globals. funny i didn't think of that
Xeo
Xeo
Funny. I was calling Funatics, asking when I'd get to see the contract, and a minute before I called they sent it out per mail for me to check / revise.
user142019
eww globals
sbi
sbi
Hi.
Ohai
user142019
I had a coworker who handled emails from customers. Once he had to forward it to me, but he sent it back to the customer instead.
14:48
@Zoidberg'-- Global variables save you from having to specify arguments in functions. Take full advantage of this. Elect one or more of these global variables to specify what kinds of processes to do on the others.
sbi
sbi
As you might have guessed, I have a question. :-/
No kidding. I didn't guess it
Xeo
Xeo
@sbi Shoot.
user142019
@LuchianGrigore Please, please, I beg you, please shut up. I had an annoying discussion about this in the Python room yesterday. T_T
sbi
sbi
I have to use a proprietary, printf-like logging mechanism. What is the correct format specifier for printing an address using printf()?
Xeo
Xeo
14:48
%p, IIRC
@Zoidberg'-- If God didn't want us to use global variables, he wouldn't have invented them. Rather than disappoint God, use and set as many global variables as possible. Each function should use and set at least two of them, even if there's no reason to do this.
Is that in hex?
sbi
sbi
@Xeo Ah, would make sense. Lemme see...
user142019
@LuchianGrigore God doesn’t exist, you fool.
@Zoidberg'-- prove it
Xeo
Xeo
14:49
5
Q: How to simulate printf's %p format when using std::cout?

kagali-sanunsigned char *teta = ....; ... printf("data at %p\n", teta); // prints 0xXXXXXXXX How can I print variable address using iostreams? Is there a std::??? feature like std::hex to do this kind of conversion (address -> string), so std::cout << std::??? << teta << std::endl will ...

Remembered from there. :)
user142019
@LuchianGrigore If God didn’t want us to kill people, he wouldn’t have given us the ability to do so. Rather than disappointing God, kill as many people as possible.
2
sbi
sbi
@sehe No need. The statement it was aimed at was already faulty. ("If God didn't want us to make war, he wouldn't have invented war.")
@Xeo Ah, thanks.
Off.
user142019
@Xeo That was exactly the same answer I gave to the first C++ question I answered. A dupe, lol.
Instead of using exceptions to handle error processing, have your error message routine set a global variable. Then make sure that every long-running loop in the system checks this global flag and terminates if an error occurs.
Wait, this ^ actually happens...
Xeo
Xeo
@Zoidberg'-- lol, linky?
user142019
14:53
@Xeo it was on my deleted account, give me a second.
sbi
sbi
@Xeo Works. Thanks!
Xeo
Xeo
lol
^ Your move
14:57
user142019
@Xeo I can’t find it, but it seems there are a lot of dupes. :P
user142019
Anyway, it’s time to get up. It’s four PM.
0
Q: Is '0' guaranteed to be 48?

Luchian GrigoreComing from a discussion started here, does the standard specify values for characters? So, is '0' guaranteed to be 48? That's what ASCII would tell us, but is it guaranteed? If not, have you seen any compiler where '0' isn't 48?

@LuchianGrigore AFAIR the num chars are guaranteed to be sequencial e.g. '0'+5 == '5' but the rest is implementation-defined
@LuchianGrigore again?
15:01
@sehe there's a dupe?
Some older computers are known to use EBCDIC for example
The question is essentially "is the character set of a char litteral guaranteed to be ASCII?"
Wait, I also think that EBCDIC is incompatible with the C standard so disregard that
@EtiennedeMartel I stole that, hope you don't mind.
user142019
@LuchianGrigore wouldn’t surprise me, really.
15:04
@Zoidberg'-- me neither, but good luck finding it :)
+1 because you know a guy that knows a guy. — Luchian Grigore 1 min ago
^ funny :)
And true
It's always like that.
user142019
> In both the source and execution basic character sets, the value of each character after 0 in the above list of decimal digits shall be one greater than the value of the previous.
user142019
@kbok you are right.
It's like when I bang on my colleague by telling them that a byte isn't necessarily 8 bits. They always ask me for a counterexample. Bleh.
15:06
^ Hurricane (?) Sandy
Nobody cares about EBCDIC or non-8-bit-bytes.
@kbok Seems legit;
@CatPlusPlus The standard does, so it's not "nobody".
"Nobody" cares about the standard either
The standard caters to obscure platforms nobody uses any more, that doesn't make them relevant.
@kbok Define "nobody".
@CatPlusPlus is a Sith, for only a Sith deals in absolutes.
15:08
Unless you're writing for that, then my condolences.
Find me a modern platform that uses non-8-bit bytes.
Isn't the burden of proof on your end?
@EtiennedeMartel People who don't care, they are the "nobody" @cat talks about.
Sorry, I don't know any platforms that use non-8-bit bytes.
@kbok Aaaaah.
> Sedulously eschew obfuscatory hyperverbosity and prolixity.
dafuq?
15:10
There was one that fell out of use 40 years ago, I think
I'm glad you understood because after I hit the return key it looked even more confusing to me.
Silly QA
ARM and x86/64 is majority right now, with some Itanium lingering around and bit more obscure ones like MIPS used academically.
Reference implementation crashes -> test case takes longer on the new implementation -> performance regression
-_-'
user142019
DCPU-16 uses 16-bit bytes, but I don’t know of any hardware implementations.
I'm sure some guy with too much time on his hands will come up with a DCPU-16 chip.
15:13
Embedded crap like Atmega, too, I guess. They use 8-bit bytes as well.
@Zoidberg'-- that's the Notch thing, right?
user142019
@jalf Yeah.
Byte is pretty much defined to be 8 bits.
Ask someone how many bits is in a byte.
They will either look at you funny, or say 8.
user142019
Old people say 7.
@CatPlusPlus no it isn't. :)
15:14
@CatPlusPlus Or CHAR_BIT.
Today, a byte is almost universally defined to be 8 bits, but historically, it has been all sorts of wonky sizes
I don't care about what C++ says thanks.
Not just 7
user142019
byte |bʌɪt|
noun Computing
a group of binary digits or bits (usually eight) operated on as a unit.
@CatPlusPlus do you care what real hardware says? ;)
15:14
I don't care about history, either.
I'm talking about situation right now.
Well, what do you care about, then?
user142019
octet |ɒkˈtɛt|
noun
a group of eight people or things.
@EtiennedeMartel cake
Whatever makes you right? My god, it's like arguing with the puppy.
user142019
Haskell.
15:15
What.
:psyduck:
Yup, in French we don't have a word for "byte" that isn't eight bit.
7 mins ago, by Cat Plus Plus
The standard caters to obscure platforms nobody uses any more, that doesn't make them relevant.
6 mins ago, by Cat Plus Plus
Find me a modern platform that uses non-8-bit bytes.
See how history is very relevant here.
@CatPlusPlus Today, you can pretty much assume that a byte is 8 bits. However, it is not true that "Byte is pretty much defined to be 8 bits."
So we say "a seven bit octet" which is really really stupid
That's what I'm saying, christ.
15:16
@CatPlusPlus I can't think of any modern platform, regardless of byte size. x86 is ancient, and so is ARM
That's like saying a dozen eggs of 14 eggs
user142019
Real people use trytes.
Fine, modernly used platform, whatever.
@CatPlusPlus you think that weird old hardware isn't still in use? ;)
15:17
"Modernly used", lol
You know we're just a bunch of nitpicking motherfuckers here, so you can't take shortcuts when talking and expect we let that slide.
I'm just disagreeing with you "pretty much defined to be" statement. I agree with you that the relevance of non-8 bit bytes is pretty vanishingly small
user142019
Here is a modern platform:
@EtiennedeMartel Yes, except it's not funny or practical, and just terrible.
user142019
15:18
@CatPlusPlus Hey, you look like you need a drink.
Yesterday, I felt a bit ashamed of myself when I googled "How to do a linear interpolation".
Really?
You suck.
Yeah.
Life is hard.
user142019
Linear interpolation is easy.
I feel a vanishingly small will to discuss anything here seriously.
@EtiennedeMartel I also find that algorithm irritatingly difficult to remember.
15:21
Yes, but we already knew you sucked.
:P
Like a shop-vac.
damn, what is it with you and sucking lately? you had sex with a vacuum-cleaner?
That sucks a lot.
15:22
Saturn is beautiful.
^ The only vacuum cleaner that doesn't suck
I don't know if it's a good thing or a bad thing.
damn, what was that iPod vibrator
iCum or something?
15:24
"J'pourrais vraiment pas vous dire".
@EtiennedeMartel No, I meant the large one in the sky.
@R.MartinhoFernandes Ah. Well, that robot does fall from the sky in the game.
15:25
@warl0ck If your process died you can read the RIP
boom binshot
duuuuude
Hey, I was reading that!
You're stealing the fun from me ! Give it back !
15:28
@EtiennedeMartel Stop that. I won't buy it.
@R.MartinhoFernandes Okay, it's cool. It appears you do not like shooting at loot piñatas.
There was a bunch of hand clapping coming from my online operations colleagues. Turns out they successfully booted up a VM.
even I booted up even a Ubuntu VM without too much hassle
@EtiennedeMartel Not that. I promised myself won't buy any games until Christmas. I can't let myself down.
@R.MartinhoFernandes Well, then, I'll remind you of Borderlands 2's engaging if somewhat repetitive gameplay in two months, then.
@DeadMG I think that was part of the joke.
I was about to ask what a "jole" is.
15:36
A typo.
yeah, it should have been a "joule"
Prout.
This is what I felt when installing Fallout: New Vegas yesterday.
@EtiennedeMartel I don't get it. Is that about every game running the DX installer to make sure it is installed?
@R.MartinhoFernandes Yep. And the MSVC runtime too.
yeppers
they should just statically link the libs
15:40
And then never get updates?
as if they ever ship meaningful updates anyway
it's hard enough to get meaningful updates to the CRT by upgrading your compiler
Yeah, let's just do it like we did in the 90's
@DeadMG I meant DX.
oh
you can't statically link DX
AFAIK DX9 had bi-monthly updates or something.
@DeadMG Ah, ok.
15:41
@R.MartinhoFernandes Yeah, but you had to recompile to get them, I think.
plus, they definitely don't do anything like "regularly update" anymore
There are no longer any DX9 updates, ASFAIK.
Xeo
Xeo
Anybody here with an up-to-date build of Clang?
Well, what annoys me is not the fact that they run the DX installer. I think that's a perfectly fine strategy. What annoys me is that the DX installer takes forever to do nothing.
So, no one went through the book question like @sbi suggested? Last edit is still from me one month ago.
15:45
> An unknown error occurred.
My colleague just got that when starting a build on Xcode.
His reaction took one word: "Xcode".
Translation: "The error reporting system of the software you're using is terrible."
Xcode is like that.
It's been a long time since I last used Xcode.
"Hey, I crashed. Wanna quit or continue in an unstable state?"
(True story)
user142019
@Xeo define up-to-date
15:48
@EtiennedeMartel Nuke plant?
user142019
What version? Trunk?
Xeo
Xeo
Aye
Some recent trunk build
@StackedCrooked Nah, just Xcode being a dick.
@EtiennedeMartel "Hey, I crashed. Wanna quit or QÊÿú>„‰Ráå~¦ <svAõ<~¹«Þ”)g©›·à“H™ä­ méN
> ä­ méN
It's a message from God.
Or a guy named Amen
Which is suspiciously close to "Ramen". And that makes me hungry.
@EtiennedeMartel Well, Eclipse is similar, except it always picks the unstable state option without asking.
Xeo
Xeo
@EtiennedeMartel I have instant ramen here. Nom.
15:52
@R.MartinhoFernandes Have I mentionned I dislike Eclipse?
Xeo
Xeo
And a list of stuff I can add to improve the flavour.
Do you have to use XCode for iOS dev ?
That's what I was led to believe.
@kbok You have to for the actual deployment on a device.
@kbok Theoretically, no, you shouldn't need to. In reality, for iOS, everything else is even worse (difficult to believe that such a thing is even possible).
15:55
@JerryCoffin That sucks.
@EtiennedeMartel Texas Instruments DSPs
@kbok I suppose I should add that I haven't even tried to write anything for iOS in a couple of years now, so I suppose things could have improved a bit since then.
user142019
For iOS I use TextMate and xcodebuild command-line tool.
@JerryCoffin I hope so, because I'm starting in one month
user142019
Objective-C is a pain without autocompletion, so I use C++ instead of Objective-C.
16:00
I thought boost::mpl::for_each<boost::mpl::range<int, 0, 2>> will iterate through 0, 1, 2 but it calls the function 2 times with same argument 2
So is there any thing in mpl that iterates over constant expressions ?
user142019
I use Objective-C only when I need to work with UIKit, Core Location or MapKit.
Most of our engine is in C++.
Xeo
Xeo
@NeelBasu Do you mean if the counter bounds are known constant expressions?
@Xeo What I meant is for_each<range_c<int, 0, 2>> will call function f thrice and first with argument 0 and second with argument 1 and third with argument 2
Xeo
Xeo
Decide, twice or thrice. :)
16:13
sorry thrice
What I see currently is f is being called twice and all times the value its being passsed is 2
@Xeo I edited ......... and its thrice now
posted on October 29, 2012 by Eric Battalio

Experience the Build conference on Channel 9 and learn how to build fierce Windows 8 apps using C++ from the experts: Bringing Existing C++ Code to Windows Store Apps, Tarek Madkour, 10/30 11:45am. Beyond just learning how to write apps in C++, you will see how to create new libraries or reuse existing components that you can seamlessly combine with Metro style apps using JavaScr

posted on October 29, 2012 by George Mileka [MSFT]

Hi, my name is George Mileka. I’m a developer on the C++ Libraries team. I have been working on the Project Code Name Austin for many months with Jorge, Eric, and Alan. To learn more about what the Project Code Name Austin is, you can read this great post by Jorge Pereira. For Project Austin, we have used ESE (Extensible Storage Engine) as the storage engine. In this blog post, I will ex

Xeo
Xeo
range_c<int, 0, 2> is [0,2) though aka will only call twice
but when it calls f it calls f(2), f(2) I want f(0), f(1), f(2)
user142019
Feeds y u no flood protection. It’s not fair.
sbi
sbi
Well, it's only been 9hrs. I hadn't expect someone to immediately jump at my suggestion when I couldn't make the time myself.
16:19
@Zoidberg'-- A lot of the regs have Feeds on ignore.
@Xeo whether its twice or thrice is not a big issue. What I want is. for_each should call f(i) instead of f(n) where i iterates over begining to ending int. Is it doable with range_c ?
Xeo
Xeo
@NeelBasu Working fine over here.
sbi
sbi
Sigh. So my reworked trace file mechanism works like a charm. Well, except that it write the trace files backwards, with the oldest line at the top. Oh, and for inexplicable reasons it always keeps N-10 buffers around, rather than N. Also, after a while it crashes because it grabs some place where it isn't allowed to. And I had forgotten how nerve-wrecking it is to have to restart the machine every single time the damn thing crashes, because there's no memory protection between tasks...
I guess I'd better call it a day and go home.
@Xeo I donno Mine is printing 2,2 mine is 1.43 though 'll try copy pasting yours
sbi
sbi
@R.MartinhoFernandes BTW, this was meant as a reply for that. I dunno what happened, but this fuckup fits my day.
16:24
@DeadMG wait really?
sbi
sbi
@MooingDuck He has. I know of nobody else. Of course, that doesn't mean there could be others.
@Xeo Isn't that int template parameter ?
sbi
sbi
OTOH, when there's Feeds nobody is interested in, the owners could kill those.
Last time I left work with code in a catastrophic state, I didn't get a wink of sleep, which happened to be last night
Is that normal for you guys? It bothers me to no end
Even if it isn't committed
sbi
sbi
@Neil Oh, I have done that a million times, and am used to sleep anyway. I have kids to take care of, and when it's closing time for school/kindergarten/whatever, they don't care whether I have finished some task.
16:27
@Neil nope, the instant I stand up to leave my desk, it's gone from my mind.
sbi
sbi
@Neil I might have trouble with it not being committed. What if some accident wipes my HD? I usually commit everything to some branch.
@MooingDuck Well, that doesn't happen to me. I usually keep thinking about what I am hacking at. But I am fine with that, as long as I don't dream about it.
Xeo
Xeo
@NeelBasu ?
sbi
sbi
I had such problems before, though, @Neil, more than a decade ago. Sticking to regular hours for work and sleep plus allocating enough free time to be outside, play with the kids, and read books took care of that.
Anyway, time to get outta here, go home, and have dinner with (some of) the kids.
Later.
@MooingDuck Same here.
@Xeo I need 0,1,2 as constant expression
Xeo
Xeo
Okay, what's the code exactly that you're trying to get to work?
boost::mpl::for_each< boost::mpl::range_c<int, 0, T::depth> >( boost::bind(&SelfT::writeHeaderRows< PrinterT, T::depth >, this, boost::ref(stream), boost::ref(printer)) );
Xeo
Xeo
Okay, question, why again do you need 0, 1, 2 as a constant expression?
Somehow I want to be able to iterate i over <0 .... T::depth> and I need to pass it as SomeT::ancestorT<i>::Type
Xeo
Xeo
16:37
@LuchianGrigore o__o
@Xeo I take it you failed? :P
Xeo
Xeo
No, just my face at the wall 'o text.
Also, it's not closed yet.
@NeelBasu Your code above doesn't even come close to that.
What do you want to do with SomeT::ancestorT<i>::Type?
"When writing a specialization,
be careful about its location;
or to make it compile
will be such a trial
as to kindle its self-immolation."

-- ISO C++ Standard, section 14.7.3 [temp.expl.spec], paragraph 7
^ According to Tommy Svensson on Google+
@Xeo That (tries to) calls the function writeHeaderRows<i> that function calls SomeT::ancestorT<i>::Type* a = SomeT::ancestorT<i>::of(node)
16:42
@Cheersandhth.-Alf The wording has changed since
Xeo
Xeo
Ah, mpl::for_each will just pass the i as a runtime argument, it's categorized as a runtime algorithm too.
@kbok Nope.
Oct 25 at 23:25, by Xeo
When writing a specialization,
be careful about its location;
or to make it compile
will be such a trial
as to kindle its self-immolation.
/* §14.7.3 [temp.expl.spec] p7 */
@Xeo I is there any compile time alternative ?
or I've to write by My own ?
Xeo
Xeo
@NeelBasu Not really, for some reason..
Oh, the first one who found that quote was @LucDanton it seems
Oct 16 '11 at 21:31, by Luc Danton
> When writing a specialization, be careful about its location; or to make it compile will be such a trial as to kindle its self-immolation.
@Xeo for what reason ? isn't it supposed to be simple CRTP ?
Xeo
Xeo
Oct 16 '11
16:44
Is the nuke building class over?
Xeo
Xeo
@NeelBasu CRTP has... nothing to do with this.
@R.MartinhoFernandes Seems I did find that quote before: chat.stackoverflow.com/transcript/10?m=2124732#2124732
Dec 16 '11
I must have an old version then
@Xeo This compile time iteration can be achived with CRTP
so why there is no such function in mpl ?
Xeo
Xeo
@NeelBasu Ehm, CRTP still has nothing to do with compile-time iteration.
@LuchianGrigore I have no idea what you are referring to
16:46
I have no problems not committing
It has to be at a somewhat stabile point before I'll commit
> The placement of explicit specialization declarations for function templates, class templates, member functions of class templates, static data members of class templates, member classes of class templates, member class templates of class templates, member function templates of class templates, member functions of member templates of class templates, member functions of member templates of non-template classes, member function templates of member classes of class templates, etc.,
@Xeo why ? I'll do CRTP and decrement enum value do achive this
Isn't that CRTP ?
> and the placement of partial specialization declarations of class templates, member class templates of non-template classes, member class templates of class templates, etc., can affect whether a program is well-formed according to the relative positioning of the explicit specialization declarations and their points of instantiation in the translation unit as specified above and below.
> When writing a specialization, be careful about its location; or to make it compile will be such a trial as to kindle its self-immolation.
@Neil commit to personal, not to master
Xeo
Xeo
@NeelBasu template<class T> struct X{}; struct Y : X<Y>{}; // CRTP
16:47
Oh, stupid I am
@Xeo Yes Thats CRTP. But I thought even if I recursively decrement enum thats also CRTP
It's just a different formatting.
Xeo
Xeo
Eh, no. That's just a form of self-calling code.
It's not even true recursion. :)
@Xeo Oh! Ok. Thanks. But why there is no compile time iterator in mpl ?
@MooingDuck Hah, as if I had such a luxury
16:49
@sehe ok... again what?
Xeo
Xeo
@NeelBasu There is one: fold (and its variants).
I thought you were implying there's a dupe of that.
Xeo
Xeo
(note: accumulate is a synonym to fold.)
How is everybody doing today?
@LuchianGrigore You never said 'what' before.
16:50
@Chimera i think waiting for ponsfleischer whatevers-the-name to provide full details of cold fusion process
@sehe you said again though.
@LuchianGrigore A dupe of what? You didn't reply to a subject message, so it's impossible/hard for me to find out what you are referring to
@Cheersandhth.-Alf Yeah, that could be a while huh?
@LuchianGrigore cough
@Xeo does it take range_c ?
16:51
Should I ask about cold fusion in physics.se?
Xeo
Xeo
It takes a sequence, so yes.
Xeo
Xeo
Btw @Neel, I know why your old code called the function with 2 always
@Xeo Ya I also noticed
I am passing T::depth
Xeo
Xeo
Right
16:52
@LuchianGrigore oh. that - see, linking helps :) I think I saw people discussing that - at length. It might have been in this room. I half remembered you being involved, but I could very well be misremembering that
I don't know precisely how I missed the context though. I now see it was right above it :)
Ok so you were referring to a dupe (but in the chat) :)
@LuchianGrigore I'm not sure where. But if it at all, it was this room/a chat room here/Stack Overflow proper
Things I should probably not do: use the same wallpaper in host and VM
0
Q: Cold fusion. Will it every become a reality?

ChimeraI am an absolute neophyte regarding physics. But I keep hearing about cold fusion and great it will be. But it never seems to be accomplished. What are the challenges to creating cold fusion and will we really ever see the day that it becomes a reality?

oops.. gotta edit the title
Xeo
Xeo
@Chimera > and great it will be
Anyways @Neel, I don't think even mpl::fold will help.
Since that one is pure compile-time. :/
16:58
@Xeo fixed that also :-) thanks
Xeo
Xeo
You'll need a custom solution
@Xeo then I neddto write my own ?
Xeo
Xeo
Also, I think you'll want to swap the template parameters of writeHeaderRows to make it easier on yourself.

« first day (745 days earlier)      last day (4429 days later) »