« first day (834 days earlier)      last day (4104 days later) » 

user142019
8:00 PM
Because they're noobs.
 
@Rapptz It doesn't seems as bad now, so I don't complain as much.
 
@R.MartinhoFernandes Well I only complain now because the interface is pretty ugly :(
 
btw
 
The examples are still awful.
 
I can't quite decide whether this is right.
 
8:01 PM
tl;dr
 
fair enough
 
I didn't read it but nCr?
Most tree problems are nCr problems.
 
@Rapptz Yeah, I said ncr in my answer.
 
0
Q: Issue with namespace in c++ '<type error> is not a namespace'

ChrisI am working on a c++ program and I have made a TextUserInterface class and am trying to call an instance of it inside of the main method. Here is the TextUserInterface.h, TextUserInterface.cpp, and GasStationFinder.cpp(houses main method). #include <iostream> using namespace std; using ...

 
Type errors are no namespaces, indeed.
 
8:05 PM
what's nCr?
 
Combinations.
 
n Choose r
 
user142019
In mathematics a combination is a way of selecting several things out of a larger group, where (unlike permutations) order does not matter. In smaller cases it is possible to count the number of combinations. For example given three fruit, say an apple, orange and pear, there are three combinations of two that can be drawn from this set: an apple and a pear; an apple and an orange; or a pear and an orange. More formally a k-combination of a set S is a subset of k distinct elements of S. If the set has n elements the number of k-combinations is equal to the binomial coefficient : \binom nk...
 
In mathematics, binomial coefficients are a family of positive integers that occur as coefficients in the binomial theorem. They are indexed by two nonnegative integers; the binomial coefficient indexed by n and k is usually written \tbinom nk. It is the coefficient of the x k term in the polynomial expansion of the binomial power (1 + x) n. Under suitable circumstances the value of the coefficient is given by the expression \tfrac{n!}{k!\,(n-k)!}. Arranging binomial coefficients into rows for successive values of n, and in which k ranges from 0 to n, gives a triangu...
 
thanks for the translation
 
8:06 PM
Wait, blind people need exceptions to the DMCA?
 
@R.MartinhoFernandes Apparently so.
 
DMCA as in Digital Millennium Copyright Act?
 
Never heard of that before.
 
@Rapptz It was in the link you posted.
 
8:07 PM
@Rapptz I hope that's not a pun.
 
@DeadMG What does that have to do with the DMCA though?
 
> Every three years groups like the American Foundation for the Blind have to lobby Congress to protect an exception for the blind allowing for books to be read aloud.
 
The blind reading books out-loud thing?
 
@Rapptz The law banning unlocking smartphones (and blind people, apparently) is part of the DMCA. Previously, the Librarian of Congress issued an exemption for it, but not anymore.
 
You guys are just fucked up.
 
8:09 PM
and the blind people have to keep going back and begging the librarian for an exemption, also.
 
sigh
 
just read the whole thing you linked to
it clearly explicates these things
 
I already did
 
Heyoo
 
Hi
 
8:17 PM
hi
 
Hullo
I give up, I can't design a matrix class that's worth using.
 
I've got a few useful matrix functions if you'd like
 
I gave up when I couldn't use the syntactic sugar I wanted to use.
 
What are you trying to do?
 
:(
I blame initializer_list
 
8:19 PM
uniform initialization is fundamentally broken
so unfortunate.
 
@Borgleader What kind of matrix class? (And what does "worth using" mean?)
 
user142019
s/uniform initialization/C++/
 
@DeadMG I can't get to emulate matrix<int,3,3> v = {{1,2,3},{4,5,6},{7,8,9}}
 
@Rapptz initializer_list<std::array<int, 3>>.
 
@R.MartinhoFernandes Well you know in the mathematical sense 2D matrix (for various linear algebraic shenanigans). And worth using means I can't come up with an interface clean enough that I feel good about it.
 
8:21 PM
But small? Large? Sparse? Dense?
 
@Borgleader, have you tried glm.g-truc.net ?
 
Kimi we're reinventing the wheel here.
Jesus.
 
> 2013-01-27 21:01:39 [INFO] [Minecraft] Kopfsalat was slain by Angry Zombie
 
I don't know what a sparse matrix is, so I'll go with dense. And I'm not looking to make huge matrices either, it's mostely a templating exercise
 
What part of the interface is messed up?
 
user142019
8:22 PM
@sehe good idea, will join in a few minutes.
 
@Zoidberg I won't :) I dunno how many are on. Easy way to check?
 
user142019
list command.
 
@R.MartinhoFernandes did you know the K-Ballo guy started a blog? talesofcpp.fusionfenix.com
Looks good (only scanned the one post though). The same goes for Jeff Snyder by the way
 
Well it doesn't seem clean to me.
http://ideone.com/8Lh4SR
 
@Zoidberg Okay. Sorry for noticing your command a bit late. Can it wait, or should I interrupt my wife now?
 
user142019
8:25 PM
I don't care at all.
 
@Zoidberg Ok, good. Then maybe later
 
@Borgleader Certainly because of all those capitals.
:P
 
Oh you're_one_of_those ...
 
@Borgleader And too many question marks in the comments :0
 
one_of_us_one_of_us
 
8:27 PM
Oh, runtime size.
 
user142019
Too many comments. FTFY.
 
That is not what I would call small.
 
@R.MartinhoFernandes I like snake_case, but whenever I start a project with someone they insist on PascalCase.
 
@R.MartinhoFernandes How is it so big? I mean, 2xsize_t and a vector
 
@Borgleader By small/large I meant the size of the actual data.
 
8:28 PM
Damn. The "Haskell is[n't] faster than C" guy must have committed suicide. It's been 4 days since I commented my C++ version (for the second time) and it is still "pending moderation"
 
And in fact, I mean compile-time sized (small) vs runtime sized (large)
 
Anyways, my C++ version (unoptimized) appeared to be 40x as fast as his -supposedly optimized-to-death- C version gist.github.com/4590998
 
maybe he's just busy writing comments on HN.
 
Reminds me of a comment from a teacher I had back in college who said that C++ could run faster than C because a C++ compiler has more knowledge about the source and as such can make better optimizations.
 
@DeadMG error: could not convert '{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}' from '<brace-enclosed initializer list>' to 'matrix<int, 3u, 3u>' same thing.
 
8:34 PM
0
Q: c++ OOP design - binding between two managers

SyndicatorBBBToday I was wondering about few OOP dilemmas happen to recur in some of small and specifc designs I develop from time to time. I mostly find our that you guys have the best solutions or a new point of thinking which could really asist me here. (much more than books which mostly give me the feelin...

 
@EtiennedeMartel That is true. It just assumes that no one has time to spend endlessly hand-optimising either version.
 
@Rapptz Cut the =.
 
Hello, Lounge!
 
@R.MartinhoFernandes He gave std::sort vs qsort as an example.
 
I know how to do it without the = though.
:(
Hence the syntactic sugar that will never happen.
 
Raymond Chen and Rico Mariani ran a performance competition with C# vs C++ with some dictionary problem some years back. Rico won by over 10x, but after a week spent optimising the C++ code Raymond managed to beat the C# code by 2x.
 
So the C# code went from being 2000% faster to 50% slower?
 
language doesn't matter, what matters is how much the programmer knows the language he uses.
 
@Borgleader The C# code did not change.
@bamboon We are talking Raymond Chen here.
Come on.
 
@R.MartinhoFernandes So the reverse?
I'm lost
 
8:39 PM
The C++ code went from taking 10x as much time, to taking half the time.
 
@R.MartinhoFernandes My memory of that guy is that he is very C with Classes.
 
@R.MartinhoFernandes That's what I said :P
 
I read his code, and he sucked pretty hard.
not that I'm saying that he sucks in general; just that I was very unimpressed with that specific series.
 
11 mins ago, by sehe
Anyways, my C++ version (unoptimized) appeared to be 40x as fast as his -supposedly optimized-to-death- C version https://gist.github.com/4590998
 
stackoverflow.com/questions/6964392/… I think this post is a pretty good example
 
8:40 PM
^ anyone able to tell me what I did wron comparing (C version to C++ version) there? I can hardly believe my "naive" c++ code is actually 40x faster
 
ah, yes
 
?_? wtf?
11 minutes for problem 12? Oh thank god never mind
 
Wasn't that posted like 10 min ago?
8 mins ago, by Pubby
0
Q: c++ OOP design - binding between two managers

SyndicatorBBBToday I was wondering about few OOP dilemmas happen to recur in some of small and specifc designs I develop from time to time. I mostly find our that you guys have the best solutions or a new point of thinking which could really asist me here. (much more than books which mostly give me the feelin...

 
Why are you reposting stuff?
 
Well played
 
8:45 PM
listening to DKC2 soundtrack Good stuff
 
@Borgleader :P
 
@R.MartinhoFernandes seeing my link did you get what I meant?
 
@bamboon Yeah.
 
right.
 
8:51 PM
time to write up that allocators proposal.
 
:(
 
user1182183
does anyone know a site or program where I can watch Discovery Channel from my laptop?
 
user1182183
all the google results are crap.
 
hmmm
how do object pools speed up allocation of arrays of objects?
 
@Rapptz oh nice. my screenie was nicer, of course :)
 
8:58 PM
they can't.
 
@DeadMG depends on context.They might not. Regardless, you may have wanted to ask "how do they perform allocation or arrays of objects" in the first place?
 
well
in the degenerate case, you could consider the regular heap to be an object pool, of objects of size 1.
in that case, any algorithm which can allocate arrays from an object pool is also a general-purpose heap algorithm.
 
hahaha
 
implying that object pools cannot allocate arrays faster than the general heap.
 
problem solved
Of course they can, but not in the general case. It depends. If you have fragmentation, lots of small arrays and specific aligment requirements, allocator can be better.
Also, a threadlocal allocator can eliminate the need for locking of it's private heap (pool) making it intrinsically better (faster, safer)
 
9:01 PM
@Rapptz game solved? What game?
 
25 mins ago, by sehe
http://notarealquestion.appspot.com/stackoverflow ^ /cc @insilico
Interesting. Chat transcript show that message before the screenshot. The open chat window shows it after the screenshot (which is also the order in which I posted the messages)
Mmm. I'm sure this has to do with uploads to imgur taking too long (I got the retry/cancel prompt for the image)
 
I use my application to upload to imgur. :D
 
@Rapptz "your application".?
 
yes
 
An object pool may eliminate the need for continual calling of a complex and lengthy ctor/dtor chain - another case where a pool will win, even if it is shared and requires locking.
 
9:12 PM
@sehe Actually, I intend on offering optional synchronization in general.
 
@DeadMG Yeah, obviously. However, the point was that allocators can achieve better than global heap for array allocation
@Rapptz link? share?
 
the question is not whether "allocators" can, but whether "object pools" can.
 
@MartinJames Allocators never do the construction unless asked for, IIRC
@DeadMG Wokay. Object pools, they are passive, no?
 
passive?
 
@DeadMG Oh you mean, pools of objects of 'fixed' type then?
 
9:17 PM
fixed size.
object pool doesn't care about type, only size and alignment.
but yes
 
@sehe I'm thinking of making it open source but I'm afraid of being made fun of. :(
 
Oh - all my object pools have the same 'size' for any class - one pointer.
 
@Rapptz reading too many tweets/ blogs, are you :)
 
9:19 PM
hmmm
I got (optionally synced) object pool, (optionally synced) memory arena, unsynchronized regular heap
I'm sure I had more than that.
 
Ell
@Rapptz does it have a context menu entry? so I can right click on a file and click upload to imgur?
 
small object
 
@Ell no but I can try adding that I guess
 
Ell
that would be kewl :D
 
I don't know how to go about doing that.
^^
 
9:22 PM
@Rapptz well, a linux port should be higher on the list ... :)
 
shell extensions are WinAPI.
 
Ell
Anyone seen django?
 
@Rapptz you can think of that as a way of learning. If that is not enough you can think f all the stupid sh*t I push :)
 
@Rapptz I'm going to try
function uploadImage {
  curl -s -F "image=@$1" -F "key=486690f872c678126a2c09a9e196ce1b" imgur.com/api/upload.xml | grep -E -o "<original_image>(.)*</original_image>" | grep -E -o "http://i.imgur.com/[^<]*"
}

scrot -s "shot.png"
uploadImage "shot.png" | xclip -selection c
rm "shot.png"
notify-send "Done"
 
what API is that?
 
9:26 PM
It's linux, silly
 
no I meant the url
you're using imgur.com/api/upload
I don't think API is supported anymore. It looks like v1, they're in v3.
 
@Rapptz Well, it's the imgur api, obviously. Apparently they have some kind of restful API going
@Rapptz Oh shit, I was still going to try it for the first time...
 
:O
 
@Rapptz Works alright.
Now, I prefer to have it editable... but hey, Lessee how this goes in practice
 
I was wondering because I use https://api.imgur.com/3/upload instead.
 
9:35 PM
Green tea sucks.
 
but it's good for you!
 
“Whatcha doin’?” “Writing code that makes it easier to write code that writes code.” “…whoa.”
 
js> ['10','10','10','10','10'].map(parseInt)
[10, NaN, 2, 3, 4]
 
lolwoooot
 
@R.MartinhoFernandes Unicode?!
 
9:39 PM
parseInt takes 2 arguments (radix), and map passes the index as a second argument to the function.
 
@sehe Nope. No tricks. Just pure unadultered JavaScript weirdness.
 
@R.MartinhoFernandes Aha. Well. Doesn't seem any worse than std::transform with std::toupper, really
 
Yeah, that's nasty too.
 
std::toupper or ::toupper?
 
Either is bad.
(They're the same, actually)
 
9:44 PM
I've never had an issue besides the fact the former doesn't compile unless I cast
I always hear it's bad though
 
That's with isspace. The same issue will occur with toupper, though, since it shares the silliness of taking an int argument.
 
I've included GIMP in the workflow, and made the script somewhat nicer (error handling/reporting):
fname=/tmp/shoot_$RANDOM.png
trap "rm -f '$fname'" INT EXIT LEAVE ERR
scrot -d 3 -c -m -s "$fname" -e "gimp '$fname'" && uploadImage "$fname" | xclip -selection c && notify-send "$0 Done" || notify-send "$0 Aborted"
(why does "fixed font" use line wrapping)
 
When will I ever encounter that issue in my code?
 
9:49 PM
Wait, I think I got a bug in that code :S
WTF was I using UINT_MAX instead of UCHAR_MAX...
 
@Rapptz everytime you use that function. But using it with algorithms is making it especially hard, since it can be spectacularly unintuitive/hard to implement the proper casts and select the proper overload (think C++03, but really, in C++11 having to do a lambda for this stinks too)
 
@Rapptz Whenever you have any character outside of the ASCII range (0-127).
 
@R.MartinhoFernandes yeah but that's like.. never for me :(
 
@R.MartinhoFernandes Oh, well, since that depends on input (99% of the time), I'd venture to say that using the function is enough to trigger the issue
 
2
Q: Warn if accessing moved object in C++11

Philipp ClaßenAfter you called std::move and passed the result to a function, you generally have to assume that accessing the moved object later will result in undefined behavior. Are there tools that can detect those accesses and warn you. For example: { Widget w; foo(std::move(w)); // w may be undef...

 
9:51 PM
guess I'll see.
Thanks for the example code.
 
The problem is: you might not. The result is UB, IIRC
 
ARGH
YOUTUBE, Y U NO KEEP BITS I'VE ALREADY DOWNLOADED
 
Add &gl=UK to the end of your URL see if that helps
actually never mind, I don't know what you're talking about
 
lol
@Rapptz I think he was jumping back in the video and the player stopped to buffer that portion again.
 
Ah that doesn't happen to me.
 
9:58 PM
@R.MartinhoFernandes And then re-buffered the part I'd just watched.
 
next time try the &gl=UK tag
 
I am thinking about writing docs for my projects. Anyone has related experiences they'd like to share?
 
@MartinJames Ring a bell?
 
hmm
 
@R.MartinhoFernandes did you find the sacrificial goats you were looking for?
 
10:01 PM
IME, decent interfaces require little documentation
 
@Borgleader lol, no, not yet. I still don't know what is confusing GCC.
 
Well, my bathroom window is sealed shut by a 1cm thick layer of ice.
 
@DeadMG But reading through the code to find them is annoying (the code can be quite dense in parts, due to 10-lines of TMP followed by one line of implementation).
 
@EtiennedeMartel that doesn't sound very safe
 
@R.MartinhoFernandes Right, but what I mean is that "documentation" doesn't have to be a lot, or a detailed spec, or whatever.
you can just be like, "f(t1, t2)- foo's the bar."
 
10:03 PM
@Rapptz I like how you have two "Initial" commits.
 
I don't know why it shows up as two..
Oh.. one is when I changed hgignore
 
Btw, you should not version the obj/ folder.
 
this was a private repo
I made it public 45 minutes ago :(
 
and gave us the opportunity to point out your myriad failings
 
I don't see how that makes a difference though :/
 
10:04 PM
:P
 
@R.MartinhoFernandes because it was for me myself and I ;_;
 
(I'm just trying to help, btw)
 
yeah I'm changing the hgignore
 
@DeadMG You bastard, you made the same mistake before!
 
@JohanLarsson Yeah. IKEA table
 
10:06 PM
and had unmentionably large amounts of fun trying to fix it, too.
 
@DeadMG I think I'd like having you reviewing my code, I don't think you would like it, might invoke the bin script.
@sehe lol cat person bear!
 
@JohanLarsson I am
 
how do I make strikethrough?
 
@JohanLarsson Well, you could probably expect a long list of issues.
---shit--- shit
 
TIL this
 
10:08 PM
@DeadMG "no shit"?
 
lol
 
@R.MartinhoFernandes that'd be shit.get() == nullptr
 
@DeadMG or just a formatted repo?
 
@JohanLarsson What? Why would I do that?
 
& ban
I'm just being silly
 
10:09 PM
@R.MartinhoFernandes your tuple includes tuple? o.O oh.. for the ordering?
 
@Borgleader I wanted to make it be tuples all the way down :P
More seriously, I don't want to reimplement the basic tuple machinery. There is enough crap to implement on top of that.
 
(I'm not done reading your blog entries, I'm at "Manhood insecurity inducer, part 3")
 
That's the last one so far. Part 4 goes up next Saturday.
 
man I suck at hgignore
 
Cool
 
10:12 PM
@Rapptz I found out I suck at pulling hg stuff using git, downloaded a zip. Trying t tomorrow.
 
Which one should I take a look at?
 
Whatever you want?
 
I mean, maybe some of the engines are better constructed than others?
 
how do you feel about my edit ^?
 
10:19 PM
@Borgleader When Doom was new I had a friend who knew most Doom maps well enough to be running backwards on them.
 
lol
 
I can't ignore the obj folder
:<
 
Yes, you can.
syntax:glob
obj/
# this works
 
The Doom 3 BFG Edition GPL Source Code release does not include functionality enabling rendering of stencil shadows via the "depth fail" method, a functionality commonly known as "Carmack's Reverse". ... He has a technique known after himself?
 
You need to hg rm it afterwards, though, since you already have it added.
 
10:22 PM
@Borgleader Yeah.
but some other cock patented it
 
I am watching girls dancing on youtube
2
I use the term dancing loosely.
 
@Rapptz hah
 
Theres porn on youtube?
 
> I CAN FAP TO THIS.
...
 
10:29 PM
There are still better places to look for prn than youtube imo
 
that isn't porn, it's just two women dancing suggestively.
 
please remove the porn
 
where's the porn? o.o
 
what? that's not porn
they still have their stuff on
 
why else would it be on youtube
 
10:30 PM
@Rapptz they are hot I give you that
 
this is not porn
unless youre superman
 
that looks like children?
 
they're not children.
what
 
theyre asian of course they look young
 
ok I have no clue think they look very young, maybe it's just me being old
 
10:33 PM
they look like 13
 
Girls' Generation (; So Nyeo Shi Dae) is a South Korean girl group formed by S.M. Entertainment in 2007. They are also referred to as SoShi () or SNSD, both abbreviated forms of the group's Korean name, and are known in Japan as Shoujo Jidai. The nine member group consists of Taeyeon, Jessica, Sunny, Tiffany, Hyoyeon, Yuri, Sooyoung, Yoona and Seohyun. The group gained attention at the beginning of their career with songs such as "Into the New World" and "Kissing You" but it was not until 2009 when they gained significant popularity with their hit single "Gee", which would be named as...
theyre 21-23
 
who's feeling charitable today and wants to vote to reopen?
 
if I ever get married it's to an asian girl :C
hands down.
 
hands down...
 
10:35 PM
@Rapptz OMG you're racist :P
 
no need to marry to get your hands on her privates
 
@JohannesSchaub-litb not sure if trolling or doesnt know the expression
 
just put a friend declaration and step in
 
@R.MartinhoFernandes No, I just have a strong preference. I swear.
:(
 
lol @Borgleader
 
10:38 PM
Morning
 
Morning CET?
 
No, Morning CAT.
It's 23:40 CET.
 
Is Poland CET?
 
ok both are correct then?
 
10:42 PM
How so?
It's not morning in CET. It's only morning for the Cat, because he has supposedly woken up.
 
I had a questionmark (I'm in CET, woke up two hours ago, second time today)
never mind I should not try advanced stuff in English :)
 
user142019
10:56 PM
I'm in Europe/Amsterdam.
 
@Rapptz Eh, you'd probably feel different if you found a non-Asian girl who's stunning.
 
I've met non-Asian girls that are pretty.
Doesn't mean I don't still have a preference for Asian girls!
 
fair enough
besides, that's simply "What I assume to be probable"
 
> My favourite drink is the blood of my enemies.
 
I also have a strong preference for some kinds of women.
 
10:59 PM
my own double negative made me cringe.
 

« first day (834 days earlier)      last day (4104 days later) »