« first day (1631 days earlier)      last day (3333 days later) » 

user3010322
12:00 AM
Guess I'll just make a dummy window, pray it works.
 
user3010322
Maybe force it so IWindow has a copy constructor of some sort.
 
They're device capabilities
 
user3010322
So I just need to make sure the dummy HWND and HDC I create are on the same device.
 
user3010322
That, I can do!
 
user3010322
... Aww fuckin' titties I need to get the original window plus a bunch of other shit in order to spawn up a random HDC....
 
user3010322
12:03 AM
... oooor I can just use a new dummy windooow...
 
user3010322
Hnnnggh..... but I dun wannnaaaa.
 
> U.S. Deploys Twelve A-10s to Romania to Deter Russian Aggression
oh man I thought I was smelling some democracy around
it was the US visiting, hehe
 
No that was farts
 
@sehe woah. No need to get aggressive. I'm clearly here to learn. No I have not implemented cookie support, but I have used them before in my PHP applications. There are session cookies and regular cookies (with expirations) right? My question is how you send and receive them using boost sockets, that's all. — Francisco Aguilera 1 min ago
Oh god
 
user1804599
I like the code I just wrote.
 
12:07 AM
How untypical of you
You send them as you would with any other mechanism. Cookies are (sub)protocol, they're unrelated to the transport. I won't even go into the mechanics because the RFCs have been public for almost 20 years now. tools.ietf.org/html/rfc6265 (from rfc2965 from rfc2109) — sehe 2 mins ago
 
user1804599
It's gorgeous.
 
Also untypical of you
 
user1804599
Rewriting parts of the VM.
 
user3010322
@CatPlusPlus I tried to cheat by juuust creating a DC without a window. It worked up until SetPixelFormat. q_q
 
@AndyProwl Not yet.
 
12:20 AM
The "I want to do cookies manually" guy throws up more false premises than I can handle
 
user1804599
Alright, I will have a tape class that can be asked to read an instruction and that can be seeked.
 
@Jefffrey Good to hear
 
user1804599
Can you make Catch run the same test with different inputs?
 
use stdin?
or use different tests
 
Sounds like work. Remember "I'm clearly here to learn"?. Well, I'm clearly here to help. Seems I did. I think each of these things have their canonical answers, even on SO. Go read them. Upvote some of them. Good luck. — sehe 32 secs ago
 
user1804599
12:31 AM
@Rapptz yeah good idea writing a bunch of std::vectors to stdin and have tests read from stdin and find the data they're looking for.
 
@райтфолд Yes. Scenarios can be nested.
 
user1804599
Nice.
 
Oh you mean the BDD stuff?
 
They act a little bit like.. well. State machines with trap doors?
 
I'm not sure this is what he's after. It seems to me he wants data-driven tests, or parameterized tests, or whatever they're called. I could be wrong though
 
12:33 AM
@райтфолд I meant SECTIONs, e.g. paste.ubuntu.com/10734606
 
Nested sections in Catch help "forking" scenarios
 
Forking, that's the appropriate word. Except for sequential execution and repeated execution of the "lead in"
 
I'm not sure Catch supports data-driven tests. GTest doesn't either. Boost.Test is the only one I know of, although I have never used it
 
Oh. That's a pretty lame sample I picked. I have no code in the common path
 
user1804599
@sehe What I want is more like this:
 
user1804599
12:34 AM
my_test { foo(x); }

my_test(x: 1);
my_test(x: 2);
my_test(x: 3);
 
user1804599
Although I guess a lambda should do.
 
@райтфолд That's what I have. I think I even use free functions. No need to be in lambda
 
user1804599
foo should do the same for all of those.
 
user1804599
(Throw bad_instruction in this case.)
 
user1804599
Can you have an initialiser list literal of initialiser lists? :P
 
user3010322
12:36 AM
@CatPlusPlus Ended up going with a convoluted dummy method, which I ended up cleaning out into a single function! So it's not too bad anymore, I guess. /cc @Borgleader
 
oh actually GTest does support parameterized tests
TIL
 
user1804599
test/instruction.cpp:7:24: error: cannot use type 'void' as a range
    for (auto&& code : { {}, { 0x00 } }) {
                       ^
 
user1804599
ugh, fuck C++
 
@райтфолд This is a better sample, see how I re-use the roundtrip (template) function paste.ubuntu.com/10734628
 
user1804599
Cool.
 
12:38 AM
Yeah. Reading that I think I might actually be a good programmer. You know. I've seen worse
 
user1804599
This works very well:
 
user1804599
auto test = [] (std::vector<unsigned char> const& code) {
    REQUIRE_THROWS_AS(
        decode_instruction(code.begin(), code.end()),
        bad_instruction
    );
};
test({ });
test({ 0x00 });
test({ 0xFF });
 
user1804599
 
@райтфолд Okay, lobster. Prepare to be ashamed
Dec 31 '13 at 12:56, by sehe
@rightfold Seriously though, you should check out the way Catch.hpp treats SECTIONS. It's pretty sweet. It allows you to get precisely the RAII semantics that you'd want for your test fixtures. It's the reason why I haven't yet jumped to Boost Test or Google Test
I even have a better sample there for this /cc @AndyProwl
Dec 31 '13 at 12:57, by sehe
In this sample the sections are completely isolated, and the connection string is parsed again for each section!
 
user1804599
Nice.
 
12:46 AM
Also. Time flies
 
user1804599
I know a guy who is obsessed with the idea that a test case must contain exactly one assertion.
 
user1804599
He would make this into 7 separate test cases all with their own names: github.com/mill-lang/mill/blob/feature/mill/rewrite/mill/test/…
 
@райтфолд I've heard of these people too. Usually the reason ends up being that the name of the unit test is printed with the failure report.
Look at this sample: paste.ubuntu.com/10734696
 
user1804599
btw what's the second argument to TEST_CASE?
 
user1804599
Can you filter on the bracket-enclosed tags?
 
12:52 AM
Yes
TEST_CASE("Parse SAS connection string", "[azure][sb][connectionstring][sas]") {
    SECTION("parse a dual-endpoint sample") {
        SECTION("connection string parsed into expected elements")
        SECTION("end points are both present and whitespace trimmed")
        SECTION("endpoint check is protocol-sensitive")
        SECTION("clear after parse yields empty builder") {
            SECTION("individual constitutuent elements are empty")
        }
    }
    SECTION("url properties")
    SECTION("case sensitivity")
 
user1804599
I found a use-case in C++ for a feature in Mill. :[
 
That's the skeleton of those cases. You can see how the section titles really work a lot better than the obligatory Kent-Beck endorsed test case naming conventions
 
user1804599
I WANT MILL
 
He wants the M
 
user1804599
The feature is multiple names for a parameter.
 
user1804599
12:54 AM
I have mill::instruction mill::decode_instruction(CodeIt begin, CodeIt end) { … } and in the body I want to mutate begin but also keep the original.
 
user1804599
In Mill you can say func decode-instruction(begin $begin: CodeIt, end: CodeIt): Instruction { … }.
 
Xeo
meh, just make an explicit copy
 
decode_instruction(CodeIt begin, CodeIt end) { auto $begin(begin); ... }
@райтфолд That's syntactic acid?
 
user1804599
@sehe Ugly!
 
whatever
No more reponse from cookie monster‌​. Either I convinced him, or disappointed him.
Either way, time to hit the sack
/exit
Dammit. My userscript is broken.
 
12:59 AM
kek
 
oh hey that's from Sherlock.
 
user1804599
test/../src/instruction.tpp:22:14: error: calling a private constructor of class 'std::__1::__wrap_iter<const unsigned char *>'
        it = std::copy(it, it + 4, data.begin());
             ^
 
user1804599
I am so confused. :(
 
@Rapptz <3 that show
 
user1804599
I want a compile-time debugger.
 
1:09 AM
@Borgleader I don't seem to remember that...
@Borgleader Me too!
 
first episode IIRC
 
I do.
There's so much shitposting in that show.
 
shitposting?
 
shit talking in this context
 
Well yeah it's Sherlock. :D
 
user1804599
1:10 AM
Oh, fuck, std::copy returns the output iterator.
 
Sherlock doesn't shit talk in the books!
 
Just enjoy the show alright!
 
user1804599
Time to generate this code with AWK or Perl.
 
1:28 AM
It would be cool if malloc was also an api. like:
malloc(29836); malloc(26220); malloc(28075); // unlocks god mode
 
@StackedCrooked There was an article talking about how hardware could be backdoored like that.
 
cool ..or maybe not cool
 
Given the right sequence of instructions, someone could get the processor into a "god mode" that will give access to everything - including what's inside your pants.
 
no thanks
I don't want what's in my pants.
 
user1804599
 
user1804599
@StackedCrooked welcome to the club.
 
user1804599
But don't rename the room to "Lounge<StackedCrooked's Vagina>" please.
 
I'll try not to.
 
user1804599
Generating code is fun.
 
user1804599
It saves a lot of work.
 
user1804599
1:48 AM
Is there a proposal for allowing trailing commas in template and function argument lists?
 
@ThePhD @Rapptz is it possible to instantiate a boost.any object in lua?
 
In case anyone has missed it:
-4
Q: Anyone else annoyed by this advertisement?

David WallaceThere's one advertisement that frequently appears in the right margin of Stack Overflow pages, that I find annoying and distracting. Does anyone else feel the same way? The advertisement in question is for a Microsoft Developer Camp. It has a man with his arms folded. To the left of the man, ...

 
user3010322
@Cinch Hook it up to a usertype and yes.
 
user3010322
Better question, why are you making a Boost.Any object in lua?
 
user3010322
Lua's already dynamically typed.
 
1:59 AM
^
I've already said this like 4 times.
No point.
 
@ThePhD Sending messages.
Or packing them idk
I want to pack and unpack boost::any in Lua that's it
 
so bored
 
@Rapptz Well you got a thing right in front of yo
> print(unpack(b))
--do stuff with the unpacked code and call C++ functions
--basic logic stuff

--after computing, let's send new events
--perhaps it would be best to create C++ hooks...
--but this defeats the purpose of going to lua
data = boost_any.new('ello poppet')
 
sounds boring
 
wow after dealing with c generics for a while, c++ is like heaven.
 
2:04 AM
@Veritas And then we get into C++ supergenerics and it all gets so... weird.
 
'super generics'
Btw @Mysticial don't know if I told you but I attempted a sane API for your BigFloat but shit's hard m8
 
anyways
 
well sure but I at least don't have to write slow ugly code just to overcome the language limitations.
 
I actually got somewhere though
 
@Rapptz Lemme guess, it was the precision control that made it ugly?
 
2:07 AM
Nah.
I actually know how to make that part sane fairly easily.
It's just sugar for creation.
Another difficult task was hiding the FFT stuff but I figured I could just.. not use it :v
 
Welp I can unpack
but I cannot pack
'tis very strange.
 
what are guys working on ?
 
@Rapptz What's hard about hiding it? It's a completely separate entity that is only called in one place from the multiply method.
 
are you *
 
Or is it the stupid lookup table?
 
2:08 AM
@Veritas I'm working on adapting Boost.Any to Sol.
 
the look-up table
 
Which people say is pointless but it's what my event queue relies on.
 
@Rapptz Yeah, there's no running away from the look-up table with this FFT algorithm. If you try to hide it statically, you'll need to be able to resize it at run-time and that means locks to make it thread-safe.
 
yo
lol wrong chatroom
 
y-cruncher knows ahead of time what the largest multiply will be, so it builds it early and never resizes it. But for a generic library, it's not that easy unless you expose the interface.
 
2:12 AM
I was messing with your thing to see what would happen in cases where the integral part of the float (i.e. 2 in 2.1) would go over 2^32-1
it stores it in the array like my uintx which sparked some ideas
 
It shouldn't be a problem at all. The numbers in Mini-Pi get much larger than that. The division at the end divides two numbers with massive integer values resulting in one that is close to 1.
 
yeah I figured
since I'm bored I feel like torturing myself again by working on it more
 
lol
 
@Rapptz finish ogonek, kthx ;)
 
messing with unicode is not very fun
already done that and hated it
 
2:16 AM
 
Hmmm... C generics?
 
sexy
 
This weekend, I'm actually gonna work on a custom floating-point type with a 64-bit mantissa. Basically, a substitute for the x87 FPU when I'm unable to use that.
 
you should add some sugar next time
C++ code can never be too sweet.
 
But it needs to be fast, and I need to support logarithms. Which I'll need to do some research on. Probably something that will take more than a few weekends.
 
2:17 AM
@Mysticial i would never finish, my math foo is terrible
 
@HWalters basically the most ugly and boring generics
 
@Borgleader I may be able to do millions of digits of anything, but I can't do 64-bits efficiently.
Because the only algorithms that I know of to do special functions like log(x) are all asymptotically fast algorithms that perform terribly on word-sized precisions.
 
So.
Given a string
 
Not only that, it needs to be precise without using extra precision.
 
12345.6789123e-10
what would jesus do with this string
 
2:20 AM
I can't just "taylor series the shit out of it" because that accumulates a lot of round-off error.
 
@Rapptz jesus_cast it to some unrelated type
 
jesus_cast too op
 
pls nerf
 
@Rapptz Are you trying to print it out in a different format?
 
I'm trying to turn it into your thing
 
2:22 AM
Oh. Right, since I don't have a parser.
 
I may think I suck but this is really non-trivial for me
 
Obviously, split it up into 3 parts: integral part, fractional part, and exponent.
 
yeah I was thinking of using std::regex
 
Actually, since there's no radix conversion needed, you won't need to split it up.
 
but then my compile speeds increase by a fuck ton
 
2:24 AM
Isolate the exponent and parse it separately.
Then you're left with 12345.6789123.
Parse it as an integer ignoring the decimal place. Then count how many digits are to the right of the decimal place and adjust the exponent accordingly.
So you'll get something like 123456789123 *10^ (-7 - 10)
 
hmrh
 
The exponent is -17. That doesn't divide evenly into 9. So round it down to the next multiple of 9. (-18) and shift the mantissa up by that many digits.
1234567891230 *10^ (-18)
Internally, that becomes:
mantissa = {567891230,1234}
exponent = -2
 
Oh right. The radix is 10^9.
I never considered turning it into an intermediate format.
Which is actually part of the reason why I thought it was complicated
I like to do parsing and transformation in a single pass
Makes life complicated.
 
You can keep the mantissa as an std::string. Adding zeros for the shift will be a trivial += or push_back. Then parse it as an integer directly into the mantissa.
btw, this gets much more complicated when the representation is binary and you're trying to input/output a decimal exponent.
 
whatcha mean
 
2:32 AM
Allman really sucks for do-while loops.
 
Imagine the representation is base 2^32. Now you want to convert 123456789 * 2^(32 * 156) into a decimal string: 6.8116657951677 * 10^1510
That's much more difficult.
 
I can imagine... 2e0 is simply 10b; 2e-1 is 1/5... in binary
 
good thing this is base10 :v
 
I wrote an entire blog about how to do binary <-> decimal conversions. Both using simple approaches as well as with sub-quadratic run-time methods.
 
Oh right.
You do the binary conversion for your Pi algorithm.
BBP right?
 
2:37 AM
I only have implementations for Binary -> Decimal. Not the other way around. Mini-Pi is similar in that it only has internal -> string. And not string -> internal.
@Rapptz That's a completely different thing.
 
What am I thinking of
Hm.
Never mind.
I'll let you know how this goes
 
user3010322
... Oh.
 
user3010322
So there's no way to have a Scanner that doesn't shut down the internal System.in in Java.
 
user3010322
At least, not if you use try-with-resources.
 
Hi
 
user3010322
2:44 AM
You have to allocate it outside the try, and then refuse to dispose/call .close()
 
user3010322
Gggreeeat. <_>
 
user3010322
private static Scanner scanner = new Scanner(System.in);
 
user3010322
Singleton, here I come! \o/
 
private static final Scanner m8
step it up
 
2:50 AM
private static final Scanner scanner = new SingletonScannerFactory(context).initialize(singletonFactoryListener).createSing‌​leton().initialize(System.in);
Android has poisoned me.
 
My eyes
Not on a saturday morning pls
 
Friday evening nub
 
^^
It's fucking Friday right now. And I'm still at work.
 
American Timezone best Timezone?
It's 11 am here
bubs
 
@Mysticial Go home.
 
2:59 AM
I'm supposed to move flats but everything is so fucking expensive
 
hong kong problems
 
@MomotapaLimpopo tell me about it, i was looking for a condo near work... holy fucking shitballs
 
I bet housing in Uganda is cheap.
tfw need an entire parser for this
 
Not in Kampala, the capital!
 
3:01 AM
@Rapptz An entire parser?
 
An entire parser.
 
use spirit kek
 
@Borgleader I pay 1700 usd for a single room in a flat share :)))))))))))))))))
 
wowwwwwwwwwwwwwwww
 
@Rapptz I guess it might be more complicated if you're trying to input validation.
 
3:03 AM
did you call the cops? cuz thats robbery
 
I don't need an entire parser if I remove my obsession of doing this in a single pass or input validation
 
lol
The entire neighbourhood belongs to 1 guy btw
He sets the prices as he sees fit
= high as fuck
 
@Borgleader Depends on where. In the Bay Area, 1700 usd is dirt cheap in and around the tech companies.
 
@Mysticial Probably, but the salaries are probably 2-3x mine
 
@MomotapaLimpopo As he sees the trend.
 
3:04 AM
I pay $1200/month for a 3 floor, 2 bedroom, 3 bathroom apartment.
Come at me.
 
Sir Ka-shing Li, GBM, KBE, JP (born 29 July 1928 in Chaozhou, China) is a Hong Kong business magnate, investor, and philanthropist. According to the Bloomberg Billionaires Index, as of April 16, 2014 he is the richest person in Asia, with a net worth of $31.9 billion. He is the Chairman of the Board of Hutchison Whampoa Limited (HWL) and Cheung Kong Holdings as of 2008; through them, he is the world's largest operator of container terminals and the world's largest health and beauty retailer. Considered one of the most powerful figures in Asia, Li was named "Asia's Most Powerful Man, Li Ka-Ching...
Hi there landlord
 
@Rapptz what do you need 3 bathrooms for?
 
One for the piss, one for the shit, one for the shower
 
There are multiple people living here.
 
how much is it collectively?
 
3:05 AM
> Education School drop-out[1]
Truly inspiring.
 
@MomotapaLimpopo "Ka-shing" is like an onomatopoeic sound of a cashier box.
 
@Borgleader What do you mean?
The price is just $1200/month.
 
@Rapptz You said you paid 1200$, was that you or all of you?
 
All of us.
 
djesus thats cheap
 
3:06 AM
@MarkGarcia Exactly :p
 
user3010322
comes at Rapptz for that kind of price.
 
user3010322
That's goddamn cheap.
 
user3010322
SHARE YOUR SECRETS.
 
> comes
:p
 
user3010322
Is your neighborhood like, infested with crime or something?
 
3:07 AM
Nope.
 
user3010322
@MarkGarcia You're a horrible person. D:
 
I live in an inverted cul-de-sac.
 
ITT @ThePhD is Professor Oak
 
The road is a circle
And in that circle there are houses/apartments.
I live in one of those.
 
3:09 AM
You live in a rotary?
 
lol no
 
@HWalters sounds like he lives in the center of a roundabout
 
user3010322
Sounds like a badass place to hole up agaisnt an invasion.
 
user3010322
Clear streets all around.
 
user3010322
Gun anyone who comes close down.
 
3:11 AM
MS Paint Representation
 
@Rapptz I know, I was just teasing
 
you could have just said i live in a doughnut street
 
@Borgleader but then we would have teased about it being jam filled
 
I've never heard of that term
 
@Rapptz Okay, I was confused for a bit in "Houses go here" with common sense not working.
 
3:13 AM
@Mgetz traffic jams
@Rapptz probably cuz i just made that up, but it does look like a dougnut
 
@MarkGarcia between
 
@Rapptz I didnt know it was a girl
 
Dammit I edited it.
 
I don't have neighbours (right side, I have left and front neighbours)
So there's free space to live here.
 
@Borgleader Doughnut companies make all sorts of shapes for doughnuts nowadays.
 
3:16 AM
@ThePhD So I have this frankenstein monster like project which draws a triangle either in an sdl window, or a wpf one. What feature should i work on next.
(its supposed to be a game engine... eventually)
 
user3010322
@Borgleader Making it work with SFML#! :D
 
@ThePhD Why would I do that =/
 
time to use goto
 
:P
goto hell has lots of interpretations.
 
is 1.e-1 valid?
hm.
lol seems like it
 
3:31 AM
@MarkGarcia Gotoh hell
 
@StackedCrooked I don't understand...
 
btw
my friend says O(m^2) but I say O(m)
who is right?
 
@MarkGarcia Gotoh is a character from Hunter x Hunter. He loves to entertain people, but it's a hellish experience for them.
 
Did your friend miss the break statement?
 
@StackedCrooked Oh. I really forgot everyone on HxH except for the main ones. :(
 
3:36 AM
@MarkGarcia Ok. That probably doesn't interest you..
@MarkGarcia You watched it?
Cool!
 
@HWalters I think so.
 
Sep 27 '14 at 2:04, by Mark Garcia
It's awesome. It's also shown on our local TV station dubbed, since ever.
You forgot! :)
 
Oh right. I forgot.
You were already cool.
@MarkGarcia Just found that Coalgirls posted torrent for the whole blu-ray yesterday.
 
yummy 1 TB batches
 
@Rapptz ???
 
3:46 AM
Coalgirls BD batches are huge for no reason
 
;_;
> 169.7 GB
 
About 1GB per 23 min episode. I used to think a 650MB CD was the perfect medium for 90 minute movie.
 
Coalgirls is bad at encoding
 
@Rapptz Subgroup rivalry, I like it :P
 
I suspect many people use file size as an indicator of quality. So big files get more downloads.
 
3:48 AM
right, cuz bigger is better
 
p. much
 
If I want to find the blu-rays I sort by search results by size descending.
 

« first day (1631 days earlier)      last day (3333 days later) »