« first day (727 days earlier)      last day (4447 days later) » 

21:00
@JerryCoffin Can someone else star this? I want to star it more than once but I can't.
Hmm. Where the fuck did I find the UCD in XML the other time?
Why did we decide on Unicode, anyway?
@CatPlusPlus Hipster stuff.
On the other hand we need text rendering and possibly TrueType regardless.
Ah, found it.
21:02
Pretty much every project goes throw a couple of rewrites before it becomes anything good.
Xeo
Xeo
I'm afk once and the talk seems to have gone to gamedev ... what did I miss?
@CatPlusPlus Possibly FreeType2?
Possibly.
Though maybe it'd be better to use Cairo.
FT2 is really low-level.
@Xeo A chance to hop back on Kyrostat bandwagon.
If you're using OGL then go with FT2
But we'll let you in anyway.
Xeo
Xeo
21:05
What was Kyrostat again?
Oh fuck. Seems I did lose some data in the dead drive: my scripts to parse the UCD.
Doing proper text rendering with FT2 is a pain.
Not that I'm going to be writing that.
You're not going to be writing anything!
Nobody is going to be doing full text rendering which is why you should use bitmap fonts and get it over with
Xeo
Xeo
Guys?
21:09
@Xeo A space game. In space.
With spaceships.
Xeo
Xeo
Ah
More like IN SPACE.
In reality it's half a website, crappy BB wiki, a build system, a CI server and 15 lines of code.
> Can't bitch, ping on email
21:12
@EtiennedeMartel relevant? youtube.com/watch?v=fVDzuT0fXro
@CatPlusPlus For all practical purposes there is no website at all.
What are some good ways to optimize code for the CPU cache in C++? (increasing cache hits)
Oh, yeah, account is expired, I can't push new Buildbot config.
And how do you determine when values are loaded from the CPU cache vs from RAM?
@IDWMaster 1) Put on a wizard outfit 2) ?????
21:13
@Pubby Thanks. Which wizard outfit would you recommend?
@R.MartinhoFernandes Well, there's the group.
^^ That's not entirely incorrect.
Of course it's correct.
I highly recommend going with Merlin Chic
I've never tried CI, workflow always has been edit-compile-run. Is CI fun?
21:13
@Mysticial the wizard arives!
@LucDanton Yes.
@IDWMaster Keep your data structures "dense" (minimize pointers and such) and maximize locality of reference (as much as possible, do everything you need to with one item, then move on to the next, rather than one operation on each item, then the next operation on each item, etc.)
@R.MartinhoFernandes Dom really spent a lot of time building that site.
Because workflow is edit-push-edit-push-edit-push-fix
@CatPlusPlus Edit, receive notification while still editing?
21:14
Well, not really. Local workflow doesn't change much, but you get more feedback on push.
You can test multiple configurations/platforms at once and in background.
@IDWMaster If you need to badly enough, the CPU has performance monitoring registers that can count cache misses.
I see. That makes sense.
And on clean state and all that.
Plus, nightly builds.
@EtiennedeMartel And then fell off the edge of the world. (related video.google.com/videoplay?docid=2498206364209961454)
And release builds from an uniform environment.
@EtiennedeMartel I'm making a forum.
And by making a forum I mean I'm installing phpBB and not even changing the theme.
I'll install emoticons though.
Buildbot's reconfigured to bb.kyro.piotrl.pl
(We still need Windows and OSX slaves)
21:17
Hmm. Also I've been given a terrible API with IRandomAccessStreams with all asynchronous methods. Is there a better way to call it synchronously other than calling the asynchronous method, waiting on a mutex, then returning (synchronously)?
@IDWMaster nope
except maybe futures
@MooingDuck That's what I'm using
(the .then)
Has to be implemented synchronously for obvious reasons, because I'm writing a file system driver for Metro apps in Windows 8, and synchronization is necessary, but performance is also very important.
I found out they do have synchronous methods on the stream implemented internally
but I'm not sure if it's a good idea to "hackishly" call them.
I made a method called Stream_SyncRead which works like this:
Stream_SyncRead(IRandomAccessStream,IDataBuffer,int);
@CatPlusPlus Now that my MacBookPro is essentially gathering dust in a corner, I might lend it for that purpose.
for_each(replacer.begin(),
         replacer.end(),
         bind(protect(bind(bind(&ReplacerValue_t::second,_2),
                           _1,
                           bind(&ReplacerValue_t::first,_2))),
              boost::ref(hol), _1));
protect is kinda bad.
21:23
TRWTF is alignment style.
I like my answer better. But ^ that intrigues me
@CatPlusPlus What's wrong with that? It'd be what I'd use too
@R.MartinhoFernandes For fuck's sake?
It's LISPy and bad.
Fugly like hell.
@sehe Yeah, that thing is just unreadable.
21:25
@R.MartinhoFernandes I have a hunch that it could be soooooo much simpler even with Phoenix. You know, apart from the obvious C++03 approach in my own answer
some_func(
    arg1,
    arg2,
    arg3
)
I can decipher the protected expression to be arg2.second(arg1, arg2.first). That's not usual.
@sehe That piece of code makes me cry.
@R.MartinhoFernandes Kinda of an achievement. FWIW, I can't compile it, but it's probably something simple I missed. Technically only 45 lines of compiler messages
Meh anything with less than four digits doesn't scare me anymore.
21:26
Outer bind pass a ref to hol and (outer) arg1 to the protected expression such that the result is arg1.second(hol, arg1.first). Am I right?
@R.MartinhoFernandes Well, try it maybe? I'm also not easily intimidated (Spirit, remember?) but I didn't see a clue in the compiler messaage.
@LucDanton No clue, I haven't used protect ever before. And it looks like I will keep it that way, if this example is indicative at all
@LucDanton Oh god you're trying.
Looking at the actual question and answer, I think I got it right. So much for 'trying'!
Let's try some fun Phoenix features.
I'm surprised there isn't a way to list open windows in C++ without using a callback
@LucDanton Ah yeah. I was going to as well. I bet you'll be quicker to it
21:34
@sehe: what does that even mean
Replace C++ with C everywhere.
Do any of you know of any good Pacman ANSI art?
When I tell Google Maps I wanna go to Texas from the Netherlands, it tells me to travel all the way through Russia. That makes no sense.
@Kian "good ... ANSI art" is an oxymoron.
I hope no one decontextifies that message.
21:35
@Borgleader s/C++/C/; and there's your reason: win SDK didn't want to impose any data structures on any client programs. To me that might be one of the very few design choices WINAPI got right
@R.MartinhoFernandes Fixed. Ah. Your message :)
I just want something that looks like Pacman chasing a ghost and nomming pellets
There are programs that generate ASCII art from images.
@Kian Looks like you have got some drawing typing to do. Really, Ascii art is not difficult. Just tedious
Hmm I see. Would have been nice to have the synchronous option though.
AFAIK, it's synchronous.
21:37
@Borgleader Wait, they are synchronous. They just use a callback. An output iterator is no different, really
Err by synchronous I meant, without using a callback.
@Borgleader I take it you hate std::copy, std::transform etc. too?
@daknøk it doesn't seem to know how to cross the Atlantic
@sehe: there are callbacks in std::copy?
21:38
@MooingDuck by plane??!
@Borgleader Yes, *out++ calls two user-supplied functions.
@Borgleader Never used std::ostream_iterator<T>?
I remember some day Google Maps told you to use a kayak if you needed to cross the Atlantic.
352. Sail across the Pacific Ocean 6,243 km
364. Sail across the Pacific Ocean 4,436 km
@daknøk google maps doesn't do planes
I see your point, I just didn't consider callbacks the same as "here's a function, apply it to all these elements" (in the case of for_each)
21:41
@MooingDuck ah sucks.
By the way; I gave a speech to a group of computer science students today at a college
@daknøk Actually, that's a good thing. It certainly should be doing spherical geometry, not plane.
I was very surprised that none of them even knew what a pointer was.
What are they teaching in schools these days anyways?
@IDWMaster java
@KillianDS Why?
21:43
@IDWMaster iPads
@sehe iPaid for the I notation from MS-COM. (Apple)
:)
@IDWMaster if they're first years just learning maybe...
@MooingDuck What about juniors in an "advanced data structures" class?
@IDWMaster Burn the place down
21:44
College juniors?
@Pubby Yes
@IDWMaster realistically: it was most likely a communication error of some sort
@IDWMaster I have no clue, I just noticed that almost every school here java is the default language, with some exceptional courses in C/C++ or scripting languages.
because even Java guys know pointers (if by a different name)
@MooingDuck "references" was how they were taught
Not really correct naming though
21:46
Even though Java spec calls them pointers.
But also, many students are lazy, so it could very well be they just didn't want to react if you asked "does anybody know what a pointer is?"
Java has NullPointerException.
@IDWMaster it's a pointer by a different name
@KillianDS I even gave the students a sheet which explained what pointers are, introduced them to C++, and went over inheritance, polymorphism, slicing, etc.
Prior to my talk
@KillianDS At least here there's some variety, even if it's all static typed languages.
21:47
I wonder if any of the students even read my handout
> error: no type named 'map_type' in [ overly long type ]
nvm im an idiot
overly long int x = 100000000000000000000000000000000000000000;
@IDWMaster Did you have "This will be on the final test" in large, bold type at the top of the page? If not, they undoubtedly ignored it.
@R.MartinhoFernandes really really long long x = 99999999999999999999999999999999999999999999999999999999999999999999999999999999‌​999999999999999999999999999999999999999999999999999999999999999999999999999999999‌​99999;
21:48
@Borgleader AFAIK, WinAPI callbacks are well-designed, i.e., they take a void* for user data.
loooooooooooooooooooooooooooooong int = 1000000000000000000000000000000
@LucDanton typename?
@JerryCoffin No, the professor in that class apparently never has exams or tests.
@R.MartinhoFernandes: oh is that what the LPARAM thing is for?
Instead they're graded based on labs
21:49
@Borgleader I don't know details, but I do know they have that. Lemme check the docs to confirm.
@LucDanton map_type? reminds me of key_type/mapped_type in std::map (in addition to value_type)
@MooingDuck lol. The error points into Boost code.
@IDWMaster In that case, just showing up is probably more than you could have expected.
@sehe Ya, tried to use let + local variables -- a map makes sense.
@JerryCoffin What is with today's US education system anyways? Even at private schools.... wow!
21:51
@Borgleader Yes, that's exactly it.
@IDWMaster It's simple efficiency -- they're smart enough to ignore anything that doesn't directly affect their grades.
Ah cool tyvm :)
(What kind of type is an LPARAM?)
sbi
sbi
It's rare nowadays, but once in a while it still happens: I just turned on the radio in the bathroom for brushing my teeth and happened to catch the last 70secs of a song — and those few secs swept me off my feet. I only caught that they're a Scottish band, and that their album is a somehow intelligently misspelled "Something For The Weekend", so it took some googling, but I found this.
I have no idea if the rest is any good, but I so want this now.
@R.MartinhoFernandes void* usually
21:52
Ah, cool.
@MooingDuck For the record the usual error message in that case is 'type/value mismatch'. It's very telling.
Well, after so many times it is.
@IDWMaster It's not a void *. From MSDN typedef LONG_PTR LPARAM;
#if defined(_WIN64)
 typedef __int64 LONG_PTR;
#else
 typedef long LONG_PTR;
#endif
So LPARAM is a type that is large enough to contain a pointer to a long
anyone know under what conditions windows will appear to "randomly" choose a program to open a file with? Various .wav files on my computer open with audacity, WMP, or another program, seemingly randomly chosen.
hi, im juan orozco from mexico, im doing an interpreter for class (something like windows cmd) but im having some troubles to do a copy command
@Prætorian not so. LONG_PTR is a long (i.e., some sort of int) large enough to hold a pointer, not a pointer to a long.
21:57
@MooingDuck Even if you shift+right-click, open with and set default?
@Prætorian I just did that now
but I was wondering why it wasn't consistent.
@R.MartinhoFernandes: It worked perfectly, ty again.
@JerryCoffin Isn't that what I just said?
Or meant, at least :)
@Prætorian well it's not what you said
@Prætorian Maybe what you meant.
21:58
im using the code from this post stackoverflow.com/questions/10195343/… especifically the COPY-ALGORITHM-C++-WAY
@LucDanton If you ever come with something remotely palatable using Phoenix, I'll upvote it unconditionally. I'm giving up right now, I don't think it's worth it (beyond illustrating the limits of Phoenix vs. the merits of c++11 lambdas)
Oh, large enough to hold a pointer, not necessarily pointer to long
its great to copy text, but if the file is binary (lets say an exe) it dont copy the full file just the first 1k, any ideas how i can solve this?
im using vc++ 2008
@JuanAntonioOrozco If you're going to go from that post, use the "KISS-C++-Streambuffer-WAY".
but it works whit text and binary data as well?
22:00
@JuanAntonioOrozco yes
@JerryCoffin But if that's the case, why have UINT_PTR, ULONG_PTR etc?
And their signed counterparts
@JuanAntonioOrozco It's up to you to specify std::ios::binary when you open the files, but yes. Since you're just copying anyway, you might as well always use that though.
im using std::ios::out | std::ios::binary | std::ios::trunc for output and std::ios::in || std::ios::binary for input
@JerryCoffin I don't know whether it matters since you're using rdbuf() directly?
22:03
oh im thinking i found the error already, just letme check
@sbi hmm.... I'll have to give that a proper listen when the GF is not trying to watch TV
@sehe let(_s = first(arg1), _f = second(arg1)) [ bind(_f, ref(hol), _s) ]
The trick was to use bind instead of operator() to 'call' _f apparently.
@LucDanton I did that. My problem was I couldn't find phx::first/second? What header are they in?
Uh I hand-rolled them. TTBOMK they're not provided.
Was quick to prototype in C++11 mode.
Want a C++03 implementation?
any way, time to hit the sack
see ya'll
22:08
@LucDanton I'm also in C++11. I thought in my naivety that this would work:
    auto first  = phx::bind(&Replacer::value_type::first,  arg1);
    auto second = phx::bind(&Replacer::value_type::second, arg1);

    std::for_each(replacer.begin(), replacer.end(),
            phx::bind(first(arg1), phx::ref(hol), second(arg1)));
It's definitively not unreasonable to think so.
I tried it with phx::lambda[] for first/second too. I bet you need BOOST_PHOENIX_ADAPT_CALLABLE but it didn't appear to work. Again, I'd be missing an header, maybe
Except you hit the protect problem I guess: too many arg1s.
O wait. There phoenix::function<> these days, right
Yeah, that's what I used.
22:10
@sehe Probably doesn't matter, but using std::ios::binary certainly won't hurt anyway.
@LucDanton yeah. I just thought to try
@JerryCoffin True. Code with explicit intent :)
well i tried both changing std::ios::in || std::ios::binary for std::ios::in | std::ios::binary and COPY-ALGORITHM-C++-WAY works with text files but no whit binaries ones (i jusk getting the first 1k) and KISS-C++-Streambuffer-WAY giveme just tre characters (no one from the original file), what else i can try?
I have constexpr auto first = get<0> {}; as operators somewhere just for the convenience!
@Prætorian To be honest, I think largely that's largely a mistake on their part. Having signed and unsigned makes sense, but INT_PTR vs. LONG_PTR really doesn't (and I'm pretty sure in all cases those are really the same type anyway).
@LucDanton Oh. My. How did I miss the pair-is-also-just-a-tuplelike-sequence thing
Ell
Ell
22:12
She's a fucking whore
Fu k hwr
Her evwtrrbovy
@Ell Pardon us?
Also std::array!
Ell
Ell
Sues a common wgir
whorw
Whilee
whore
@Ell you've been drinking
22:13
Ell's finally gone bananas.
Ell
Ell
ucje here
I suppose providing first and second out of line defeats the purpose of the exercise though.
To the flagger: No need. Just ignore Ell for today
As a drunkard, I am very good at identifying drunk people.
22:14
@EtiennedeMartel Sadly those epic skills weren't really required in this situation
Ell
Ell
I'm Larry :( I have drabbk.
@sehe One day, they shall come in handy. Mark my words.
Ell
Ell
I qwhllc lea e you in pea e nwo
"I will leave you in peace now"
2
Maybe I'll validate the flags. This is inappropriate
22:14
(Drunk text translation, ha)
@EtiennedeMartel Just in time. I was going to honour the flags
lol
I love how many answerers did not notice that.
@sbi Is that supposed to play something? It doesn't seem to work here.
I wonder if clang considers whitespace and mentions stuff like that. it should
@R.MartinhoFernandes Too many Python fans.
22:17
@R.MartinhoFernandes I was pinging him for this - stackoverflow.com/questions/12193170/…
@LuchianGrigore Yeah, I know.
We didn't see eye-to-eye on that one - this is proof that it does happen.
@Ell please hold your thoughts in check @ell. because you're lying to yourself (most likely), and self-deception is ungood.
@sehe Try bind(first, ref(hol), second). Although I think you messed up your reminiscing, I recall the functor being in the second position.
@R.MartinhoFernandes wat. How could you have known that?
22:18
A second
@LuchianGrigore Well, maybe not that particular comment, but I know his particular views on that matter.
ah. 'aite
or is it aite'
ok... 'aite' just to be sure....
So when you plinked him, I figured out immediately why it was.
@LucDanton Erm. What reminiscing? I'm lost
@LuchianGrigore At that point, you might as well shorten it a bit more to just '' :-)
22:20
I think it's a'ite.
@LucDanton oh right. That! Functor is the 'second' in the pair
You put the apostrophe where you skip stuff.
Interesting. Now the error message suggests that the nested bind expression is too protected.
@R.MartinhoFernandes so... a'i't...
@LucDanton Oh ahah. This worked after all:
    auto first  = phx::bind(&Replacer::value_type::first,  arg1);
    auto second = phx::bind(&Replacer::value_type::second, arg1);

    std::for_each(replacer.begin(), replacer.end(),
            phx::bind(second, phx::ref(hol), first));
22:23
Can't get it to work on my end.
@LucDanton We have a saying here that goes something like "all the protection is not enough".
@R.MartinhoFernandes But I want less of it!
@sehe Now that doesn't look bad at all.
Hm.
Fuck... accidentally deleted the wrong partition.
Now if I can get an elegant C++03 definition for first/second. What header has get<>?... Damn. I'm slow today
22:25
@sehe Can't you just #include the whole Phoenix shebang?
@R.MartinhoFernandes I used the main header, phx::get not defined
Ah.
#include <boost/phoenix_shebang.hpp>
@sehe None of them! From what I can tell. get is my own thing as well.
@LucDanton I think I need at<> from phoenix/fusion.hpp
22:27
Ya that's worth a try.
Note that you would need first(arg1) this time! Getting the hang of nested bind expressions yet?
hmmmm... bounty on 4-year-old Q -> stackoverflow.com/questions/331536/…
@LucDanton Nope. Not endeavoring to, anyways. I'll write a functor if it gets this far :)
@LuchianGrigore It's urgent!
LOL Urgent... silly bear
I add a comment with "@abeschneider" but this part gets removed from the comment, what am I doing wrong?
Aw. Gist of it is that if you define first to be bind(&value_type::first, arg1), then arg1 is already involved. A placeholder always denotes the final parameter to the final, outermost bind expression. Never a 'local' parameter to the current bind expression.
22:31
@MichaWiedenmann Your replying to a post by abeschneider and no one else is participating in the comment thread.
@MichaWiedenmann you need to move the implementation to the header.
@LucDanton Only for boost::bind, IIRC. std::bind doesn't do this
This is what makes things like bind(foo, arg1) == bind(bar, arg1) work, too. Conceptual equivalent to bind(operators::equal_to {}, first_bind_expression, second_bind_expression).
@sehe No, same rules. All the binds are really, really and I mean really similar.
@LucDanton Hmmm. I remember running into this difference once. Let me think.
Anyways, that settles it. This works: C++03
std::for_each(replacer.begin(), replacer.end(),
        phx::bind(
            phx::bind(&Replacer::value_type::second, arg1),
            phx::ref(hol),
            phx::bind(&Replacer::value_type::first, arg1)));
I've tried making the rules different to e.g. allow for ref(f)(42) instead of the silly-looking ref(f)(arg1)(42), but it gets weird really quickly. Also I don't remember what are my current rules lol.
it is easier to define new languages in lisp
:)
Yeah, now I get suspicious when I think 'hey, if I tweak rule X then I can get Y!' for that EDSL.
There's a way to solve that: write them down.
Oh btw how are the elections in the state going? Any debates left? Who's winning?
@R.MartinhoFernandes I have.
Plus the unit tests. I'm checking right now.
Apparently I've kept the feature. I don't know what that 'costs' me, i.e. I expect some corner cases to fail that would be accepted by Phoenix.
Oh, perhaps something as simple as ref(f)() is different I think.
22:42
evening fellas
Ohai
@TonyTheLion Hello.
@n.m. I also fought for a good hour and came up with a Phoenix bind incantation that looks slightly less daunting :) — sehe 5 secs ago
^ @LucDanton fruit of labour. Lemme credit your help :) Editing
22:43
@LuchianGrigore I heard Obama Biden "won" this debate. More than that I'd ahve to check the news
np, I've taken a liking to lazy-eval EDSL after rolling my own.
Also I have gained enormous respect for Eric Niebler. I have very good hopes for C++11 Proto.
@n.m. I also fought for a good hour and (with some help) came up with a Phoenix bind incantation that looks slightly less daunting :) — sehe 12 secs ago
@LucDanton Yeah. He's the guru there. On Boost Proto, remind me of this 'floating discussion' that we had recurring a few times here:
sign is probably not used a lot ^
22:48
> Yep. Anyway,FYI, it's fixed in Spirit-3. You can use auto all you want. Joel de Guzman
well i still cant copy a binary file, text file just copy like a charm but binaries one oh my, i tried to copy an image (44k) and i get less than the half ( 12k) any idea about why is this happening
?
@TonyTheLion Well probably everytime the aircraft is used
@MooingDuck I'd tend to agree -- Biden came out pretty well. On the other hand, at least in my opinion, the margin of victory was fairly small. Given how poorly Obama did in the previous debate, I'd say Romney has gained more than he lost in the debates.
@JuanAntonioOrozco flush + properly close?
well i close them, but i havent tink of flushing, letme try
22:50
@TonyTheLion What's up?
@R.MartinhoFernandes Not much. Bored mostly
@JuanAntonioOrozco No, not without seeing your code.
@sehe I thought closing implied flushing.
If Romney wins the elections, I'm going for Pope.
@R.MartinhoFernandes Yeah. I'm too lazy to check the docs. I don't mind spelling it out: code for intent, again
22:51
@TonyTheLion With your reputation? Hhaha, good luck.
lol
@R.MartinhoFernandes that reputation is one I only have on this chat. Not IRL.
@sehe I disagree there. IMO, in the abstraction the streams provide, flush is a leaky bit that exists for special circumstances.
I don't turn up IRL everytime someone mentions sex or whatever
Ok s/code for intent/self document code/g
(explain and remind of the leaky abstraction, since we used it anyway)
* has higher precedence than +, right?
22:53
@TonyTheLion OTOH, turning up every time someone mentions sex seems like a superpower the pope might like.
@Pubby Yes.
Sex driven teleportation would be pretty cool
user image
5
holy fuck ^
@TonyTheLion korean?
@TonyTheLion That thing gave me cancer.
22:56
"This product is a medical food intended for use under medical supervision. It is not intended to diagnose, treat, cure, or prevent disease."
> This product is a medical food intended for use under medical supervision
????
@TonyTheLion Y u inline styles.
@MooingDuck It was intended to cause it.
@R.MartinhoFernandes lol
@daknøk U think I wrote that shit? Hell NO.
@TonyTheLion Also, it's NOT FOR PARENTERAL USE
22:57
I found it on the interwebs
I hope that that was automated code-gen. and not created by a person
user406009
Looks like something from thedailywtf
Who writes HTML by hand?
I do.
Hate drag and drop.

« first day (727 days earlier)      last day (4447 days later) »