« first day (841 days earlier)      last day (4109 days later) » 

9:00 AM
The terrible part is all the people saying it doesn't matter. And all the accepted answers saying it is coding style
 
Hello all!
 
@Insilico Hi
 
9:23 AM
@doug65536 link?
 
@doug65536 Your not happy with the answers?
 
there are correct answers in there. just saying that it amazes me that anyone would use int* a
 
@doug65536 Of course. One should really use shared_ptr<int> or std::vector<int> instead. :-)
 
yes, but then you stir up the whole T& a or T &a debate lol!
in parameters, it actually doesn't matter. no possibility of multiple definitions with one type name.
 
9:50 AM
2
Q: New phenomenon: Rage Unaccepting

Sha Wiz Dow ArdNow that accept rate is no longer displayed users can silently unaccept answers without anyone noticing. I happend to notice by chance that this user (who is long time member without any other activity for long time) has just unaccepted all answers just like that. No single comment. Three recent...

 
10:13 AM
 
10:27 AM
@StackedCrooked For being featured on isocpp.org
 
What?
lol I see it now
 
It would be nice if it was a Star Wars walker instead.
 
Ell
Hi guys
 
10:57 AM
Hi
 
@doug65536 It actually kinda is.
 
well
AWS charged me $0.63 for hosting last month
hardly a problematic cost
 
but then I do only get a few hundred visits a month
 
11:07 AM
so no problem. right?
 
yep
 
user142019
I'm awake!
 
user142019
@TonyTheLion lol
 
argh fuck you VS
I'm busy writing an article about N-way associativity in cache
then you crash
 
user142019
@DeadMG VS is Dutch for US. :D
 
Ell
11:13 AM
C is hard to read :(
 
user142019
You suck.
 
user142019
Read Haskell, not C.
 
user142019
Hmm.
 
Ell
someone write a tutorial on parsers by implementing a lua parser!
 
11:15 AM
I have no idea what to do today
 
user142019
I use immutable chunks in Lambda Ore.
 
user142019
That means that every time something changes in a chunk, almost the entire chunk must be copied.
 
user142019
lol
 
Ell
@TonyTheLion teach me to write a lua parser <3
Or a parser of any kind really.
 
user142019
Try a Lisp parser.
 
user142019
11:17 AM
Much easier.
 
@Ell lua.parse(); done :)
don't you need a lexer first?
 
Ell
Yeah, but I can do a lexer
 
also, there's plenty of Lua parser implementations around that you can use as an example
 
Ell
actually I'll write a simple parser for a calculator :3
 
hmmm
I've never written a lexer or parser
maybe I should
 
11:22 AM
damn, I can't get cache associativity to manifest
 
Did you sacrifice a goat
 
no.
even at 8192 vs 8193, I can only get a 50% slowdown on the "bad" size
it should be more in the realm of 200%.
 
@DeadMG Not necessarily.
Depends on the test.
 
yeah
 
And don't underestimate the processor's ability to hide these latencies.
 
11:28 AM
I made an 8192 and 8193 square matrix
then iterated through the rows and doubled the first value
 
50% sounds about right actually - since that's in the same ballpark as that matrix question.
 
@Mysticial That guy had 200%, IIRC.
 
8191: 1.499 seconds
8192: 2.122 seconds
8193: 1.582 seconds
@DeadMG Which matrix question? The small one or the big one?
 
0.3 to 1.2 are the figures I remember
@Mysticial Dunno, I don't keep track
but that'll do then
 
This one?
28
Q: Matrix multiplication: Small difference in matrix size, large difference in timings

KVMI have a matrix multiply code that looks like this: for(i = 0; i < dimension; i++) for(j = 0; j < dimension; j++) for(k = 0; k < dimension; k++) C[dimension*i+j] += A[dimension*i+k] * B[dimension*k+j]; Here, the size of the matrix is represented by dimension. ...

 
11:32 AM
yea
 
That's on a very old Opteron machine.
 
I guess that I'd show a more extreme result if I accessed every cache line in the matrix in this fashion, rather than just one.
 
Probably with very different cache sizes and associativities.
IIRC, there's been 3 matrix questions involving the power-of-two slow downs.
Two that I answered (one big, one small). And one that Luchian asked and self-answered.
 
ah well
30% will do
 
30% is enough IMO.
I supposed if you used older hardware you'll see a bigger difference.
I assume you're using some sort of Core i-something?
Based the results from that loop question, Core 2 suffers MUCH more than Core i7 for the power-of-two stuff.
I don't actually have any numbers for a matrix with power-of-two size (on a Core 2), but I'd assume it'd follow much the same trend.
 
11:44 AM
i7 930
 
Yeah, those already are less sensitive to the alignment issue.
I dunno what Intel did, but they did something.
 
probably just added more slots.
 
@Mysticial I don't get this. is the difference really more than expected from the pure math?
 
Well, the associativity counts are still all the same.
Instead they actually went down from Core 2 to Core iX.
But...
the L2 and memory latencies are lower.
And they added an L3.
So that might explain it.
@JohanLundberg You can't really "calculate" the differences. Because you don't know how much the miss penalties are and how much they overlap.
Along with other effects like false aliasing.
 
@Mysticial Ok. actually I completely missed the point.
 
11:48 AM
@OlegOrlov Yes it is.
@OlegOrlov You got flagged 7 times in PHP.
And C#
 
I plonked him
 
screw that guy!
 
huh
I got the reverse result for branch prediction example.
heh
signedness fail
huh
the sorted loop is faster even including the time to sort it.
that result I did not expect
oh, wait, I miscounted the zeroes
 
user142019
What's the correct verb that means "making something immutable"? "Immutablify"?
 
12:03 PM
none.
 
user142019
Oh okay. xD
 
@DeadMG Watch your compiler options too. Since GCC under -O3 will handle it well.
Given how high profile that question is, I wouldn't be surprised if some of the top compiler vendors actually put in a special case to handle that example now.
 
yeah
but I epic failed the "fix"- it's still twice as slow as the sorted version.
> sum += (arr[i] < 128) * arr[i];
 
@DeadMG I wouldn't know how the compiler actually handles that.
Comparisons set a flag. But it needs to convert it into a 0 or a 1 in a register. So it might actually insert a branch. I dunno.
 
I checked the disassembly and there isn't one.
I figured it would be a lot simpler than your branchless code, and offer basically the same performance, but apparently not.
I'll just steal your branchless
hmm
the compiler unrolled the loop a bit, but did not cache the value in a register
 
12:15 PM
What compiler is this?
 
VS2012
 
I don't recall VS2010 unrolling it. But I guess VS2012 is better now.
 
another depressing fact: the compiler actually generated slightly faster and simpler code with iterators than indices
oh well
I showed my point well enough that I was trying to make
 
Ell
what was your point?
that iterators rule?
 
no, the branch prediction thing
I have a series of tutorials on various cache and hardware effects due to go up on my website soon
 
Ell
12:23 PM
ohh
 
The denormal float question has a performance difference that's probably big enough to reproduce in an interpreted language.
Not that I've tried it though.
 
How can I construct a function that accepts mutltidimensional square matrices arrays of any size(order)?
 
what is the name for the multi-tasking thing?
modern CPUs are... co-operative, isn't it?
 
Can anyone help me out please?
 
@DeadMG never heard it used in that context but can still be right
 
12:37 PM
Err.. design a class for the matrices, incuding enough metadata to completely define the matrix instance tree, (maybe recursive). Define a function that takes a reference or pointer to the top class instance.
 
@MartinJames I'm sorry but I didn't understand what you said. Can you write code please?
 
NO!!
Google for it - someone has probably already designed suitable classes. I'm not going to do it - it's hard work, and I'm hung over.
 
user142019
unsafePerformIO is awesome.
 
@Zoidberg I don't know what that is, but if you use it in a question title, I'll upvote it just 'cos the name :)
 
user142019
I don't have any questions about it.
 
12:47 PM
@Zoidberg I like how it's called unsafe
 
user142019
It's called unsafe because it is unsafe.
 
@Zoidberg Exactly ;)
 
user142019
It allows side-effects to be performed in "pure" functions.
 
@DeadMG Modern processes are pre-emptive
 
user142019
In my case I don't do that, though.
 
12:48 PM
@rvalue That's what I was thinking of.
co-operative is the old processors where you had to explicitly yield time to the OS or another program.
 
user142019
Though thinking of it, I could use unsafeFreeze instead.
 
user142019
Damn.
 
@DeadMG Yep. Co-operative is where each process must yield() or similar for the scheduler to run. Mac OS was cooperative up to 9.0, I think; although the OS would call sched() on most IO functions as though the calling process had.
The effect being that it 'felt' pre-emptive except in tightly CPU-bound workloads
@DeadMG But if you mean the CPU hardware itself, instead of the OS-level scheduler, I think what you're looking for is hardware interrupts (interrupt-driven)
but by "modern" that's pre-x86 technology
 
morning, kids
 
Kids?? Where?? GET OFF MY LAWN!
 
12:57 PM
Is it possible to play things from my NAS using a Nexus?
 
Ell
Probably
 
Why does the VS2012 Update 2 CTP thingie not say anything about the C++ innards?
 
@JohanLarsson Just install VLC on it from the Play store and off you go.
 
probably because it doesn't involve updating them
 
well that sucks.
 
1:00 PM
nah
 
'night all.
 
the Nov CTP is seriously buggy and I'd rather they took their time and fixed all the fuckin' bugs
rather than rush it out
 
@rvalue ok ty installed vlc gonna find out how to browse my way to the nas
 
@DeadMG they've had 3 months.
There's XBMC for Android now.
You can make your Nexus the NAS :P
 
"int var = world.getLayer(5).getObject(0).getY();
printf("%d\n", (world.getLayer(5).getObject(0).getY()));"

debug: var is always 100-500, and prints are always 0's
No idea what's wrong, any ideas?
 
Ell
1:10 PM
ahh I love interactive youtube videos
 
@R.MartinhoFernandes Z.
 
@DeadMG is the standard in British- or in American-English?
 
Oh printing the float as %d was rounding all to zeros, weird. %lf had it done well
 
@GigaBass wtf, dude.
you can't mismatch printf type specifiers.
learn to not suck- don't use printf.
 
1:17 PM
I expected it to work well since despite being float values all were natural numbers... I thought printf was the way to go
 
no, and no.
if the type specifier is not exactly the type you gave it, then UB.
and printf sucks massive piles of unsafe donkey dick
 
The more you know, I might've just found out the problem I was trying to debug. Setting float internal values with int argument :>
What do you recommend as alternative to printf then?
 
perfectly safe as long as you don't want to accept arguments which are not integers
@GigaBass cout?
 
Ah, okay, thanks
 
@bamboon there is no such thing as "British English"!
England is already in Britain
 
1:22 PM
dafuq have I done?
 
@rubenvb Failed to to find server, thanks for your help. I'm gonna go cry in a corner for a while now then try again :)
 
_itoa causes stack corruption, but only inside the ctor of my class
the same code inside main is fine
how the fuck?
 
@JohanLarsson how is the NAS a NAS? NFS or SMB?
 
worked now, maybe a typo on my part
 
How did you create this "ascii-style table"? Did you type every char by itself or is there a tool or something for doing this? — Michael 4 mins ago
 
1:25 PM
@rubenvb don't know those acronyms it is a readynas
 
@TonyTheLion The stack is probably already corrupted at this point
 
@JohanLarsson NFS = Network File System (Linux) and SMB is the Microsoft stuff you're probably using.
 
ok I think the nas has a linux os
it worked now anyway ty sir
 
for (int digit = 1; digit < 10; digit++)
{
	char ch_digit;
	_itoa_s(digit, &ch_digit, 1, 10);
}
this crashes
something about the size of the digit
 
I doubt that you wrote it by hand. — Michael 3 mins ago
 
1:32 PM
but it's not wrong
 
I feel SOOO stupid right now :(
2
 
yeah man starry mcstar is back
 
Making ASCII tables is hard man
 
1:39 PM
prolly the best idea
fuck itoa
it's not even standard C
 
user142019
lol Lisp with XML syntax.
 
boost::lexical_cast then? :P
 
user142019
show
 
Installing Arch Linux always takes longer than you'd hope
 
0
Q: What is the technical reason this _itoa_s fails?

Tony The LionI'm trying to convert the digit's 0 to 9 to ASCII using _itoa_s and I find myself running into stack corruption errors using MSVC2012. I thought that the ASCII table only occupied one byte, but from the looks of things, one byte isn't enough. Where is my thinking wrong? for (int digit = 0; dig...

ok I've turned it into a Stack Overflow question
because I don't think I get why this even fails
it's silly
fuck C strings, every damn time. Null terminators! arrghhhh
 
1:57 PM
That's just stupid of you.
Shameful really. Go watch some porn to compensate.
Now.
 
@MartinJames THANKS
 
user784668
2:14 PM
Does the standard guarantee reinterpret_cast<int>(reinterpret_cast<void*>(some_int)) == some_int?
 
@Fanael: 5.2.10/5: "A value of integral type or enumeration type can be explicitly converted to a pointer. A pointer converted to an integer of sufficient size (if any such exists on the implementation) and back to the same pointer type will have its original value; mappings between pointers and integers are otherwise implementation-defined."
 
wow, first time i borked an Arch install.
Utterly completely borked.
 
user784668
@rubenvb Good job. What happened?
 
@Fanael It was a clean install so no real worries. First, the Intel driver on my laptop makes KWin crash Virtualbox, so that happened first. THen I disabled 3D in Virtualbox settings, rebooted VM. KDM wouldn't start
So I tried systemctl reenable kdm.service
and then everything started going from bad to worse
bunch of packages that apparently were half-installed
so I tried reinstalling themm
which resulted in an unbootable system
so now I'm trying again.
[/SPAM]
 
Grats
 
2:24 PM
this really sucks. I wanted to do something today
It's funny that the "secure" version of a C function causes stack corruption. — rubenvb 6 secs ago
to boot, I now also have a segfault in my code, resulting from a line reading std::cerr << T
fuck me for using nullptr
 
Out of curiosity: when looking for something, do you first search @ SO or google it?
 
@GigaBass google looks at SO first for me.
 
Heh, I came up with the question because when I google nowadays I always skip to the first SO question I find there x)
 
@Nil
 
2:43 PM
0
Q: In C++, is there a way to programmatically open a webpage in Chrome and access its content?

WartinMy problem is that I cannot access the page directly. However I can access it in Chrome and see its code. So I wonder if there is a way to access it indirectly through loading it in Chrome first.

 
note to self: do not check an iterator against the std::end() of another container object of the same type.
 
user784668
@rubenvb Sounds like a good idea.
 
and I've discovered a(nother) problem with my internal dependency handling
fuck
 
user784668
@rubenvb Dependency handling? What kind of square wheel are you reinventing?
 
@Fanael brace yourself.
A build system.
 
user784668
2:57 PM
@rubenvb A silly build system on a silly hosting site using a silly VCS? Makes sense.
 
@Fanael Thanks for the encouragement.
 
user784668
@rubenvb You're welcome.
 
I had it building itself on Windows and Linux, with GCC, Clang, and MSVC (windows only)
I was proud. Then I started messing with the innards.
 
user784668
@rubenvb Does it work on z/OS?
 
> It's main goal is to be fast
It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's It's
 
2:59 PM
@Fanael wtf is z/OS?
 
@rubenvb Doddering old mainframe os
 
user784668
@rubenvb Exactly.
 

« first day (841 days earlier)      last day (4109 days later) »