« first day (1013 days earlier)      last day (3926 days later) » 

9:01 AM
OH WAIT... locked handsets. I've never used a locked phone, and I forgot they existed.
 
@Xeo Just sprinkling some Haskell/List Comprehension in C++
@jalf Oh. Well that's no good then. =[
 
@MartinJames or better still, ask them to find a SIM card which works with your phone. Hopefully they know what they're doing :p
@ThePhD well, I could be wrong, according to @MartinJames. :)
 
Xeo
@sehe I'm confused that nobody mentioned the easiest way yet: Add a deleter to unique_ptr that optionally doesn't actually delete.
 
hence, find a store which sells this stuff, and ask them
 
Guess I'm going on a trip, then.
 
9:03 AM
@jalf Fuck cellphones. The whole industry is a ripoff minefield.
I bought an unlocked S3 and shoved in a 'Three' network unlimited data SIM. So far, it's worked fine all over Europe.
 
@MartinJames but was it the GSM or CDMA version of the phone? Or does it support both? (I believe some modern phones do that, but afaik it's far from all)
I just know what I've read on the internet, and heard from an American friend who's travelling Europe atm (and who has so far been unable to use her phone for anything other than wifi). So idk
anyway @ThePhD ask at a store where they know about this stuff. :p
 
@Xeo Good idea. Add it as an answer
 
@jalf Oh shit - the more I look at the cellphone standards, the more confused I get.
 
@ThePhD If your phone is a US phone, maybe it doesn't accept EU SIM cards.
You should email me the times you expect to travel tomo
and I'm easy to spot, I have a crutch
 
@TonyTheLion Fuck it - buy a £9.99 burner phone. If you look in the airport wastebins, you may pick one up for free.
 
9:11 AM
@MartinJames Don't tell me, tell @ThePhD
 
It is a US phone, and it's got a "global" setting on it for the stuff...
adhjwdhwkajdw
This is so goddamn confusing.
Fuck cell phones. =[
 
> global setting
lol
 
@TonyTheLion Sorry! Invalid plink-pointer.
 
@ThePhD also I'll email you my mobile number, in case you need to call.
 
hi
 
Xeo
9:14 AM
0
A: Using a std::unordered_set of std::unique_ptr

XeoYou can also use a deleter that optionally doesn't do anything. template<class T> struct maybe_deleter{ bool _delete; explicit maybe_deleter(bool doit = true) : _delete(doit){} void operator()(T* p) const{ if(_delete) delete p; } }; template<class T> using set_unique_ptr = std::uni...

 
@ThePhD if all else fails, find a wifi hotspot and use that. That should work no matter what
 
@jalf not to make calls, unless you're calling through...mumble? :p
 
@melak47 true, but then you can at least email, or ping people here or something :)
 
@jalf Yeah - many pubs etc. have free WiFi. Mumble/Skype.
 
gah, why the hell can't VS deal with it if I move a file within a project. breaks intellisense for that file til I reload the project
 
9:23 AM
@melak47 Lol, Intellisense.
Just got VAX, dude.
Save yourself the nightmare.
 
Xeo
@sehe: Yeah, I was also tempted to leave off the explicit, but then I just decided to create the extra make_find_ptr function.
 
@ThePhD $99 for 6 months ;_;
 
@Xeo So, out of habit?
 
Xeo
@sehe It just felt... more right (righter? better? Whatever)
 
@melak47 Lolwat.
Oh, right. It is indeed that expensive.
This is where closing your eyes and pretending everything is free helps a lot.
 
9:28 AM
1
Q: Capturing "continuation" functors as const& vs &&?

StackedCrookedSometimes I use lambda's as a way to implement continuation-passing style. Here's an example: #include <iostream> template<typename Message, typename Decoration, typename PrintImpl> void print_surrounded(Message&& msg, const Decoration& decoration, const PrintImpl& print_impl) { print_impl(...

 
Xeo
Yes. Don't use std::forward when you'd do it multiple times. What you might want to do though, is PrintImpl&& and no std::forward, allowing function objects without const-qualified operator(). — Xeo 1 min ago
 
Xeo
The takeaway: T&& doesn't necessarily imply std::forward (although it is the case most of the time).
 
Right. That was my wrong assumption.
 
Xeo
I guess I could actually post it as an answer this time.
 
9:36 AM
However, what does it mean to forward a T&& without using std::forward? Does it only imply that the value won't be moved? Or will it also break the perfect forwarding?
 
Xeo
It's simply an lvalue
 
When won't you use std::forward<T> outside of using it twice when it might have a side effect?
 
@StackedCrooked It will 'break' perfect forwarding, but that's what you want, sometimes. E.g. you don't want a variable to be moved from twice.
 
Xeo
@Rapptz Come again?
 
@Xeo Never mind, don't know how to make it clearer than that.
 
9:38 AM
So basically replace const& with && and only use forward if you really want to move?
 
Xeo
Oh, wait, other times when one might not want to use std::forward together with universal references?
 
@Xeo Yes
 
Xeo
Can't think of anything except the double-move
My rule of thumb is "if you use the universal reference multiple times, don't std::forward it"
 
What about non-template arguments?
Take them by value and use move if desired?
 
Xeo
Btw, "capture" really is the wrong word here
 
9:43 AM
Right.
 
croissants for breakfast, methinks
 
Xeo
Croissant + Salad for lunch, methinks
@StackedCrooked Pass-by-value if you need a copy
@StackedCrooked Also, what you have isn't really CPS from what I understand, it's just code using callbacks.
 
I have no croissants left, but I can get more later - I have to go out to get some Euros and a fishpond liner.
 
room topic changed to Lounge<C++>: Croissants EVERYWHERE! [c++] [c++11] [c++-faq] [no-helpdesk]
 
Renamed the question.
 
9:52 AM
I wonder if I could make another overload for not contiguous containers
and prepare buffers for them if needed
it would probably be totally useless.
 
Hi, can I ask a question about Qt ?
 
No
You can ask on Stack Overflow though
 
@p1rox yes, of course. use Stack Overflow
 
Ok
 
we need a link to "ask question"
 
:D
> I do believe that we've reached consensus on the issue.
 
user142019
Prostitution is legal.
 
user142019
Go to a decent country.
 
user142019
@MartinJames You need to create a shared pointer first, I believe.
 
9:58 AM
@thecoshman Interferes with selecting/copying/etc. 0/10 would not use.
 
@R.MartinhoFernandes It also looks broken.
 
@R.MartinhoFernandes o_0 it only interferes with copying line numbers... which you don't want... do you? besides, that is one bit of CSS that you could remove... if you erally want line numbers to be copied too
 
Maybe it's because I have js turned off.
 
@Rapptz care to explain what you mean?
 
Xeo
@R.MartinhoFernandes I think his CSS is about not copying the line numbers
 
10:00 AM
Oh, only selection seems broken.
 
:O
I think I got my SIM card to work
 
Turning on js has the same result for me.
 
@Rapptz hmm... shouldn't be like that...
 
user142019
10:01 AM
@BartekBanachewicz same.
 
@R.MartinhoFernandes what browser?
 
user142019
Firecocks.
 
 #include <string> // a very long line that will hopefully wrap at some stage though I have no idea how long it will take to get this line to wrap, hopefully I can get It wrap a few times maybe
 2 #include "magic.hpp"
 3 #ifdef sample
 4 #endif
 5 template<typename T>
 6 class foo{
 7     T things;
 
I'm on Chrome.
 
10:01 AM
@R.MartinhoFernandes hmm... maybe that's why
 
@BartekBanachewicz lol, what?
 
user142019
I'm on XTC.
 
yeah, that kinda sucks
 
haha, yes, it does.
Great.
 
@BartekBanachewicz yeah... no idea why it does that :S
 
Xeo
10:02 AM
@BartekBanachewicz So, selection is correct, but copy is not on Chrome?
And the other way around on FF?
lol'd
 
Xeo
Who's going to try IE / Opera?
 
Amazing web dev skills.
 
10:03 AM
I like it. :D
 
IE?
 
@Rapptz hey, this is why I test shit out :P
 
user142019
Use google-code-prettify.
 
Also how do I figure out my new phone number on this new SIM card?
 
10:03 AM
@Xeo IE selects and copies numbers
 
I can't seem to call myself. xD
 
@rightfold the HTML for the code samples is generated by jekyll
@ThePhD call someone
 
Xeo
@BartekBanachewicz Oho, 3/4 behaviours done
 
user142019
Fork Jekyll.
 
@rightfold sigh
 
10:04 AM
@BartekBanachewicz At least it is consistent.
 
@rightfold no use, I'm hosting via github
 
@rightfold you know, there are people who actually want to do something in their life
 
@thecoshman Isn't it pygments?
 
@R.MartinhoFernandes ironically, I agree with you
 
@TonyTheLion Got a cell phone number? I wanna try calling you. <3
 
10:04 AM
I have CSS that injects line numbers but doesn't interfere with pasting.
 
> rightfold created repository maan an hour ago
 
@R.MartinhoFernandes part of jekyll
 
wouldn't look good with that theme though.
 
@thecoshman Not really a part of it.
 
user142019
@BartekBanachewicz my latest project. :D
 
10:05 AM
@R.MartinhoFernandes either way, it's part of the github hosting system that I can't change
 
It's pygments
 
rightfold created repository maan  an hour ago
rightfold created repository gebonden  3 days ago
rightfold created repository gear  4 days ago
rightfold created repository git-hooks  5 days ago
rightfold created repository shp  13 days ago
rightfold created repository rfsh  16 days ago
rightfold created repository vim  17 days ago
rightfold created repository gear  18 days ago
rightfold created repository wide-vim  19 days ago
rightfold created repository wide-gzip  19 days ago
rightfold created repository cobol-fun  19 days ago
8
@rightfold OIC
5
 
hmm... there is an option to have pygments generate a table for code with line numbers... but that seemed even more broken css wise to start with
 
> rightfold created repository gebonden 3 days ago
Is this about demonic possession?
 
user142019
@StackedCrooked Something with data binding.
 
user142019
L'experiment.
 
rightmold
 
user142019
rightcolt
 
@Rapptz lol you have to hardcode the numbers?
 
forgot about cobol-fun
 
10:08 AM
@Rapptz hmm... interesting...
 
@R.MartinhoFernandes yea :(
 
CSS seems awful.
 
@R.MartinhoFernandes and are limited to only 250 lines :P
 
There is a counter but I couldn't get it to work
 
@R.MartinhoFernandes it is :P
 
user142019
10:08 AM
@Rapptz lol max 250
 
well, to be fair, a code sample more then that isn't really a sample anymore
@Rapptz also, you are limited to ALWAYS use line numbers with that
 
@thecoshman Meh, just put it on another class.
 
I want to be able to tell pygments if I want line numbers or not
 
.lines pre code:before { etc
 
it looks like this
 
10:10 AM
Wait, fuck, so I can't commit markdown? @R.MartinhoFernandes ?
 
(not my code)
 
@BartekBanachewicz you can...
 
@BartekBanachewicz Where?
 
@R.MartinhoFernandes to gh pages.
 
@BartekBanachewicz yes you can
 
10:10 AM
Yes, you can.
 
lol someone put (TAB)(TAB) ;_;
 
Markdown doesn't have styling, though.
@Rapptz hahaha sucker
 
@thecoshman so where should I put it?
I see the generated html file :/
 
My fault for finding the first code snippet.
We can do what?
 
Okay!
 
10:12 AM
@BartekBanachewicz what are you trying to do? just look at the robots repo for it
 
My phone is working!
@jalf @MartinJames Thanks for the help. :D
 
"This article has been moved here."
 
I think you also have to have the special header thing in the markdown file to get jekyll to pass it
 
@ThePhD cool! So what was the trick?
 
10:13 AM
you need (I think) a basic index.hmtl that will include posts, the posts them selves can be markdown
 
----
-layout: post
-title: More type traits
----
ah, like that?
 
Oh, github pages?
I never found out how to do jekyll with it.
 
@BartekBanachewicz That's just some old junk so that links don't become dead ends. Should probably figure out a way to redirect, but lazy.
 
@BartekBanachewicz s/^-//g
 
So I used my little buildmd.exe thing I made.
 
10:14 AM
@thecoshman wat
 
@thecoshman It looks like a diff.
 
@Rapptz jekyll is fine, and getting pygments to generate lines numbers is fine, it's the css for it that is a PITA
@BartekBanachewicz remove the leading '-' from each line
---
layout: post
title: More type traits
---
 
Do you just commit .md files to GH pages and it does for you?
 
@Rapptz yeah
 
Oh. That's pretty piss easy actually.
lol
 
10:16 AM
seriously, just look at what the robot has done. it took me mere minutes to work out what to do for my self based on that
 
fuck i have no idea how to set it up just yet
 
It helps to be able to run locally so you can debug shit.
 
I thought I had to set up Jekyll locally, so I googled "Jekyll windows" and nope'd the fuck out.
 
yeah, running locally does help
 
@jalf Nothing; apparently my phone is both CDMA and GSM compatible. I don't know which network it's using now, but the SIM card worked once I put in the Lebara UK Access Point Name information
 
10:17 AM
@Rapptz o_0 get a linux machine to play with
 
Too lazy to dual boot. :(
 
@ThePhD ah, cool
 
@jalf I also had to cut the plastic off the card some more so it would fit.
 
I run it locally before pushing to make sure I don't break shit, and by "locally" I mean "remotely on my server".
 
@Rapptz ssh
@R.MartinhoFernandes yeah, I use my pi for it :D
 
10:18 AM
@thecoshman Can't ssh into something that isn't running.
 
@R.MartinhoFernandes what is {% for post in site.categories.unicode %} ?
 
@R.MartinhoFernandes I might do that later I guess
 
I mean site.categories.unicode exactly
 
@BartekBanachewicz 'for each post in the unicode category'
 
@thecoshman how do I create those categories ?
 
10:19 AM
@BartekBanachewicz 'site' is the _post folder, where all the posts go, _post/unicode is that category
seriously LOOK AT HIS REPO
 
@thecoshman He is.
 
not sure if you have to, but individual posts have a 'categories: unicode' in the header
 
it didn't parse the template -.-
 
a post can be in many categories you see
 
You'll get a +1 when you indent your code properly! :) — Lightness Races in Orbit 3 mins ago
 
10:20 AM
@BartekBanachewicz ¬_¬ just clone his repo and change it to suit your needs
 
I don't need your +1! @LightnessRacesinOrbit
 
I don't think it's indented wrong but it does get cut off :/
stupid SO.
 
ugh this crap
it doesn't parse the template anyway.
I've added _config.yml
 
@thecoshman Ha, the commit messages there are amazing.
 
10:23 AM
@R.MartinhoFernandes o_0
 
gqed
Fixed dashes
more stuff
updated rss templates for guest authors
caps
dashers
typo
caps
typo
 
I forgot I had to do git status -u to show everything in subdirectories when files are being added.
 
@R.MartinhoFernandes o_0
ooooh, your commit messages
 
There's also this commit that doesn't show there for some reason github.com/rmartinho/rmartinho.github.com/commit/…
 
Ell
Can I see the template that it didn't parse?
 
10:27 AM
Lol.
1920 x 1080 <--- that's the big 1080p resolution, right?
The next step up is 2560 x 1600, right?
 
Ell
Yah
The former is right, I think the latter is too but not sure
 
@ThePhD or 4K
 
4K is ridic.
 
@sehe "4. You open carried"? Seriously? WTF
 
Ell
2560*1440 is next after 1920*1080
 
10:29 AM
@ThePhD Nah, Riddick is probably in 1080p.
 
Ell
If we're talking about 16:9 ratios
 
Hehe.
 
0
Q: First step to study C++ Singleton design Pattern

user2336676Can you please point out the best material for studying singleton design pattern? Pravin

 
@Ell 16:10 ftw
 
Ell
4K is an 8:5 ratio
 
10:32 AM
@Rapptz I completely missread that as his first step in studying C++
 
I dunno what 16:10 would fit under
Or like, what resoution that would be
 
2560x1600
 
Ooh.
 
@Ell um, no, it's the same ratio as FHD
 
@ThePhD 1600x1000!
 
Ell
10:33 AM
@bartek that is 8:5 I thought
 
@Ell no, FHD is 16:9. 1920x1200 is 16:10
 
@R.MartinhoFernandes Well, obviously! Sheesh.
 
that's WSXGA+
 
Ell
@bartek its definitely 8:5
2560/1600 = 1.6 = 8/5
 
widescreen used to be crazy, they hand stupid things 3:1 ish ratios
 
10:35 AM
@Ell that's not 4K :/
> 4K Ultra high definition television 3840 × 2160
 
Ell
Oops. My bad sorry Haha
 
that's the only practical 4K format.
Wikipedia has the others, but that's simply 2x2xFHD
 
yeah... 4k is called 4k as itis (almost) 4k pixels wide
 
2560x1600 is WQXGA, and x1440 is WQHD
 
@Xeo So, uh. Yeah, right now trying to do unzip. It's gonna be fantastic. :D
 
Ell
10:36 AM
Imagine what a 8640p 21" monitor would look like
You would get lost in the sea of pixels
 
@Ell Have you ever seen Retina display?
 
I'm using 1094x680
because 1094/680 is close to the golden ratio
 
@Ell iPad has 2048x1536 on 10"
 
(In my applications. My monitor is 1920x1080)
 
Ell
I've never actually seen a retina display no
 
user142019
10:38 AM
Argh.
 
user142019
Fuck you PHP and your lack of multiple inheritance.
 
I currently have an iPhone 4S, the Retina display looks nice, but you get used to it at one point so it becomes nothing special really
 
Ell
The new nexus 7 will have 1920*1080 on 7"
 
@BartekBanachewicz What about HDSKJWQGA?
 
Damn. I was being nice to a new guy and I forgot to link him the book list. He already deleted the question.
 
10:44 AM
Moral of the story: don't be nice to people!
 
@Ell galaxy S4 has 1920x1080 on circa 5"
 
no wonder nvidia wants to put kepler in phones
:p
 
despite whatever cat says, mobile gaming is a thing and will become massive
 
bleh
 
Mobile gaming sucks. :3c
 
10:48 AM
I'd much rather sit in the park than in the basement
 
We'll see about "massive".
 
@BartekBanachewicz :getout:
...literally :p
 
@melak47 too bad you don't want to get your lazy asses outside
 
I would love to sit in the basement if the whole building is mine
and the park is public
 
@R.MartinhoFernandes devices are already powerful enough. It only now takes the interests of developers to start making more complicated titles for phones too
It would be amazing to play Uncharted on a tablet :3
or even better on something like Shield
 
10:51 AM
... Wat.
 
LANparties would be much funnier too
no setting up desks and shit.
just drop on a couch
 
@BartekBanachewicz "The easy part is done. Now it only takes one of the hard parts."
 
If any of those devices actually connected to each other.
 
@R.MartinhoFernandes I don't think it was an easy part
@ThePhD um, they do? Are you still on gameboy stage?. Oh wait, gameboys did too
 
@BartekBanachewicz Call it "least hard" if you prefer.
 
10:52 AM
VIA LAN?
 
@ThePhD via WiFi
it doesn't have to be a LAN, can be Direct I think
 
So you need to bring a router and punch it into the wall and give everybody credentials to join up.
 
And there are other hard parts you're ignoring (and incidentally they are all about the people not the machines).
 
Or you need to find a place with good enough Wifi to do it.
 
@ThePhD did you read the second part?
@ThePhD CAN YOU EVEN READ?
FFS
 
10:53 AM
I DON'T KNOW, CAN I EVEN READ?
 
48 secs ago, by Bartek Banachewicz
it doesn't have to be a LAN, can be Direct I think
 
I don't know what Direct is supposed to be.
 
@BartekBanachewicz yeah with what, up to 5 devices like smart phones? :p
 
WiFi Direct
 
I can't imagine that being fast.
 
10:54 AM
@ThePhD clearly Bartek wants a DirectWifi library from Microsoft :3
 
@melak47 up to how many you wish, it forms a mesh network. And yeah, like smartphones or tablets or Shields
@ThePhD you can't imagine many things, that's not at all surprising for me
uh why do I even bother.
I am trying to use sensible arguments in discussion with a guy that is implementing C++ reflection.
Now how stupid does it make me
 
That still doesn't address the apparent differences in GPU power and CPU power from desktop / console to something like a phone, not to mention the serious battery considerations therein.
 
"apparent differencies" my ass
you gamed on PC 3 years ago and it was still amazing. I also thought it's not exactly the graphics that makes a game good.
 
because there was a mouse :3
 
10:56 AM
And a keyboard.
 
@melak47 mouse isn't the best controller for everything
 
@BartekBanachewicz It does add something to a game though.
 
Touch isn't the best controller for everything.
 
@BartekBanachewicz Maybe not racing games.
 
10:57 AM
who said touch
 
(Therefore "massive")
 
@ThePhD I'll email you my cell no soon
 
Ell
I play on n64 on my tablet which is awesome
 
@TonyTheLion better no soon than no late! wait...
 
Ell
10:58 AM
The lack of awesome graphics isn't that much of a deal because the games are just awesome
 
that runs Hawken btw ^
I wonder how many of your PCs can't run that game.
 
Ell
I wish we could have decent gameplay android tablet games
 
and keeps your hands warm in winter!
 
@BartekBanachewicz Looks like an incredible experience.
I'm sure playing on a screen smaller than the controller will become massive.
 
@R.MartinhoFernandes I agree w/o the sarcasm.
 
10:59 AM
Maybe with massive controllers.
 
Image not found is currenty rocking my world.
 
@ThePhD must be blocked in the UK for (hardware) porn
 

« first day (1013 days earlier)      last day (3926 days later) »