« first day (775 days earlier)      last day (4172 days later) » 

5:12 AM
anyone still up?
 
yeah
@random: Yes, of course. I don't expect people to help or do something constructive, I only do it because it makes me feel superior to the other people here. — Ron Maimon 17 mins ago
 
do you know what these old-school browser password window thingies are called...you know, the sort you get if you browse an ftp server in the browser
 
@Mysticial omg... him again?
 
@melak47 pop-ups? I dunno...
@Borgleader yeah...
 
@Mysticial yeah, but what's that kind of password thingy called
 
5:17 AM
@RichardJPLeGuen: It would save me some time. I don't join communities, as communities have no brain. — Ron Maimon 18 mins ago
 
o_O
I have finally realized.
You know that argument that everyone bashed me for using SELF?
Well, now I know something that would never conflict with anyone else's implemention:
I'll just use Robot's zisse!
 
@ThePhD it's @Cicada 's zisse..
14 hours ago, by Cicada
@Borgleader "zisse"
 
Ah, too late to edit my message. :c
I'll just use Cicada's zisse* Old school edits, yo.
 
5:40 AM
1
Q: Why are trigraphs generating errors in modern C++ compilers?

Praveen Vinny Even in the GCC Compilers, the trigraphs are not getting compiled without explicitly specifying the trigraph attribute. #include<stdio.h> int main() { int a=4; if((a==4) ??! (a==5)) printf("\nHello world!"); return 0; } This program saved as try.c gets compiled in GCC Compiler...

 
That looks like it's attached to anything but modern C++, but uh.
Okay!
 
@Pubby I'm having a Windows 3.1 flashback right now...
 
Hm.
Something like realloc allows you to reallocate memory in the same pointer space?
Erm. Wait that's phrased horrendously.
I want to request memory at a specific location, because I don't want to invalidate other pointers I've handed out through my allocator.
 
You can't do that
 
Oh.
So the Pool I have has to be big enough the first time around, Or Else { Doom & Gloom }
 
5:50 AM
You could do it deque style
 
Que?
 
Linked list of large blocks
 
Sounds.... kinda gross.
Hm.
I think I'm thinking about Pool and Allocator in the most completely wrong/absurb way.
 
0
Q: Ability to convert a C++ class to json. Arduino?

JakeFirst off, I am sorry and don't know C++ very well. I am looking for an Arduino library capable of creating json from a class. Does anyone know if there is such a library? aJson does not include this.

I don't quite know how to answer this.
 
I think he means a data dump or a JSON that closely reflects what a C++ class looks like.
But yeah, it's unclear as fuck.
 
6:03 AM
@ThePhD That's my thought too, but I'm positive on that. I wished askers would provide an example of what they want, so I can at least salvage the question.
 
Minimal Examples are always great.
I just wish I had more of them on hand to throw out when I ask (dumb) questions.
 
I kind of imagine the OP of that question wants some kind of serialization solution for Arduino code e.g. sending data over a serial cable or something.
And just doesn't know about the term "serialization" or something.
 
Maybe.
 
Of course, that doesn't require JSON nor C++ to implement, so it seems to be another case of the XY problem.
 
Oh yeah @Insilico I totally went ahead and posted a second answer under yours in that 5 years questions about the delegates.
Also, yep. This question looks a lot like the XY problem.
There's a lot of those neat little FAQ entries in meta, it seems.
 
6:07 AM
@ThePhD Yeah, I saw that. Looks good.
Too bad I'm way too busy to play around with it at the moment.
 
What's got you pinned down?
 
Anyone know how to inline assembly code on an x64 architecture in VS2012?
__asm doesn't seem to be supported.
 
@IDWMaster Impossible.
 
@ThePhD School, mainly. Research (in a laboratory) and classwork and stuff
 
@ThePhD Why?
 
6:09 AM
inline assembly support was blown up for x64 code in the VC++ compiler. I don't know why. Ask Microsoft.
If you need closer-to-the-asm support, either compile x86 or use something like instrinsics.
I don't have experience in either of those, so good luck.
 
@ThePhD Wow. that sucks
 
The only assembly I've done is on microcontrollers, so I don't know if that MSDN page is of any help.
 
@Insilico Really it's not of any help. Just says it's not supported.
 
@Insilico Research where at / what for? (If you can tell?)
 
6:11 AM
@IDWMaster Well, there's your answer. You can't do it.
 
@Insilico Unless I use a 3rd party assembler it looks like
Probably what I'll end up doing
Could also hand-code the OPCODES
 
@ThePhD I'm actually juggling around some projects, some that are still in the design phase.
 
@Insilico Sounds like potential! Do you get your choice of which one to pick, or is it a Shotgun-hit-all-the-things kind've deal?
 
The "theme" is actually in bioengineering (e.g. medical implants, etc.)
 
EXOSKELETON.
 
6:13 AM
@ThePhD Oh, I came up with the projects. With my PI's blessing of course.
 
I mean, yes yes, prothestics and such.
@Insilico Sweeeeet deal.
 
I just happen to use C++ for any software-related components of my research projects.
 
A pretty good choice.
So long as it's not gnarly embedded C. ._.
 
For a demonstration at a science fair I made an RC car controlled by muscle neural activity.
 
That sounds badass.
So I could flex and it'd accelerate?
I mean it wouldn't go very fast, but still.
 
6:16 AM
Guess Microsoft just doesn't want people using VS to write fast apps anymore
2
 
@IDWMaster Totally the reason.
 
Basically. The circuit I made picked up electrical signals from your muscles (an EMG, basically), amplified it and sent it to a computer.
The computer did signal processing on it to clean it up and interpret it to control this RC car and stuff
Essentially a glorified toy for the kids to look at.
 
Sounds pretty swcheet.
 
@IDWMaster In assembly? You'd be pretty hard-pressed to beat the compiler for a majority of tasks.
(Not saying that you should avoid assembly at all costs, of course.)
 
I think I'm utterly confused at how allocators are really used in the standard library.
 
6:19 AM
@ThePhD They allocate memory and construct objects in that memory.
 
Well, I understand that description of it, but now I'm starting to think what kind of beating it can take.
For example, I'm trying to write a Pool allocator. I allocate a giant block of memory.
I then proceed to hand out memory based on Allocate, and return it back to that giant block at Deallocate.
At a certain point, because the block is fixed-size, it will run out of memory (the same way something like Vector runs out of memory eventually).
 
Haven't other people tried making pool-based C++ standard library allocators?
 
I'm trying to figure out how to deal with that: at first, I thought "I'll just new up a whole better, bigger block", but then I realized: that'd invalidate every other single pointer I've passed out ever.
People have told me Boost::Pool.
But I'm library-less, so I'm either going std:: or going hard in the paint.
 
Found a solution!
Code it using OPCODES as an unsigned char* array, use VirtualProtect to mark the pages as executable, then run it!
In case you're wondering what on Earth I'm trying to do, I'm writing a VM
 
Sounds like fun.
It's a clever way to go about it.
Strangely enough, I haven't ever learned Assembly or OpCodes yet, which probably makes me a bad Computer Scientist. =[
 
6:26 AM
@IDWMaster Good luck! Be careful of the whole memory protection business.
 
@Insilico I will!
 
@ThePhD Are you planning to use this pool allocator for things like std::vector?
 
The goal with the VM is actually for security
 
@Insilico For anything. I'm just trying to think about how it's going to be used in the first place.
 
Executing untrusted applications on a secure workstation without compromising its security
 
6:27 AM
@IDWMaster Please don't make another Flash or Java thingy. As in please make it not buggy and security-hole-ridden pieces of shit.
 
Basically application-level virtualization
 
Like, does std::vector call allocate() with how much data it wants up-front, or does it call it a million bilion little things and also call construct on them?
 
@ThePhD "For anything (general purpose)" and "pool allocators" don't mix very well.
@ThePhD Oh, std::vector can ask you for memory of any size whenever it decides to.
 
@Insilico I won't. I'm pretty sure if it was too buggy Oracle would sue me for patent infringement. Last time I checked they had quite a few patents on the whole concept of "buggy code".
 
~Sigh~
 
6:28 AM
@IDWMaster lol.
 
Yeah, as I thought, my attempt to make an allocator is LeSucks.
 
@ThePhD Pool allocators work way better for something like linked lists.
 
@Insilico So I've found out just by thinking / using / watching my code explode.
On the bright side, I'm 'smarter' now. Thumbsup.
 
But even then, the pool allocator has limitations on it that makes it unsuitable for general purpose use. That's why pool allocators can be made very fast.
 
Mmm. Well, in the end, I know this pool allocator will work great for my custom Dictionary class.
So I'm going to go slap it on it and see how ti all works out.
 
6:30 AM
@ThePhD When you say you know is that backed up with any data whatsoever?
Because you can't claim to know that it works until you've tried it. :-)
I actually don't see how pool allocators would work for your Dictionary class. What's it supposed to do?
 
Well, my Dictionary class by default front-requests everything it wants from memory, save for delayed-initialization of key-value pairs (it pointerizes those and lays them on the heap at times). My idea was to have a fixed Pool of memory - one for Keys, one for Values - that it used for memory: kind of like a std::vector for keys, and one for values.
 
@ThePhD And how do you intend to search for the value when given a key?
 
@Insilico A hashing technique called Hopscotch Hashing I had implemented already in my dictionary class (though I think I need to revisit how I did it). It's an open-addressing scheme that agrees with having all the buckets laid out in memory before hand, and resizing (or fail-safing) if it doesn't have room.
 
@ThePhD Oh okay so you're not just doing a dumb linear search through the arrays. :-)
 
The idea with a Hopscoch table is that rather than have a list of values attached to a bucket or a fixed pool of values in a bucket, it'll just defer values to a bucket in the same general area based on a Hopping algorithm. Buckets that have collisions will keep this data in a Hop value,w hose bits represent nearby buckets to do searches.
You can chain these Hop values between buckets to create complex search-lists for little cost, which in most cases resolve to only 1 or two jumps to get to the data you want (in most cases, 0 jumps, if the hash table is sufficiently large).
 
6:38 AM
@ThePhD I still don't see how a pool allocator helps with your Dictionary, unless you intend for all the keys or values to be of the same size.
 
The idea is that having a Pool for the keys and values will work very well in an open-addressing type scheme, or even just having a pool that has Key-Value pairs allocated together: because this is an open-addressing scheme (basically a giant-array, with hash values and other such things), a pool works extremely well for allocating, constructing, and destructing the individual bucket members.
Rather than have to constantly new keys or values, they'll just get copied into the preallocated space of the Pool, and when a resize is necessary the pool itself will just get resized too. Or at least, that's my thinking.
It's also agreeable to have data types - things like keys - next to each other in contiguous memory.
It makes it ridiculously cache-friendly.
 
@ThePhD The fact that your Dictionary uses an open-addressing scheme is neither here nor there. What makes the pool allocator useful is if you need to allocate lots of relatively small but equal-sized blocks of memory.
The "equal-sized" part is the defining characteristic of pool allocators.
 
Well, generally, most keys and value will be of equal-size, right?
Sorry, most keys will be of equal size to each other, most values will be of equal size to each other, right?
So it'd make sense to Pool them together.
 
Yes. I'm just making sure your reasoning was sound. :-)
 
I think TMP is one of the most impressive things I've learned in C++
@_@
 
6:45 AM
Lol. Don't tell me you've been sucked in.
 
Dude recursion is so fast now
It's hard not to like it
 
@Rapptz Of course you pay for it in compilation speed. :-)
 
Compilation is instant though, way faster than waiting for it at run time
 
@Rapptz For now.
Once you make diesel templates.... Dem compile times.
 
@Rapptz You should see the really gnarly TMP code. Some of them cause internal compiler errors.
 
6:46 AM
:( 92 loops of fibonacci => over 5 minutes
with TMP it took me 0.2s :|
 
@Rapptz The really recent compilers have been really good with handling TMP code, to be fair.
 
Either way, I love it :3
 
TMP is basically an accident derived from the way the rules of the C++ language worked, so of course the early versions of C++ compilers failed to work.
And also why TMP code looks really, really screwy. :-)
 
ideone.com/8elW23 doesn't look that ugly :(
 
@ThePhD Just make sure you profile your code to see if it really helps.
 
6:49 AM
Why are you using enums?
static constexpr all the way!
 
used to it actually
does ideone support constexpr?
 
Pffff, I'd be surprised if it did.
 
No, but static const works too
 
@Insilico Well I've been profiling my code and so far std::unordered_map is murdering me right now. Dx
62% of all execution time spent in ::insert !!!!
 
@ThePhD And you're sure that time is spent in allocating memory?
 
6:52 AM
@Insilico It seems to be eating crap at _Buynode, which is where allocation happens and where insert goes if collisions happen.
 
Of course, whether 62% is a bad number or not depends on the rest of your code.
 
Well, the context is this: there's one and only one function running, which calls Insert.
It's doing it for upwards 160K entries
 
@ThePhD Well, how long does it take to insert 160k entries?
Because if all you're doing is insert(), of course it would take up a large proportion of your running time.
If I ran std::cout << 42; and only that line a thousand times in a loop, of course that would take a large proportion of the running time.
 
5.702 seconds. It used to be 7.xxx, but I made to hard optomizations with the String that's being copied over.
 
@ThePhD 5 seconds for 160k entries doesn't sound that bad. Still, now what you're saying about the pool allocator makes more sense.
 
6:56 AM
@ThePhD What exactly are you trying to accomplish that has all these strings?
 
So I encourage you to try out the pool allocator, if this is an actual problem you have.
 
@Mysticial ISN'T IT A RITE OF PASSAGE TO WRITE YOUR OWN STRING CLASS?
Are you not entertained?!?! (I actually don't know..)
 
@Rapptz I've done it before. But it didn't need to be efficient. :)
 
@Mysticial Oh, making a String class is easy. Making it efficient and correct is the hard part. :-)
 
I actually needed it for wide-characters. This was before the days of wstring.
 
6:57 AM
@Mysticial As per [Using the NTFS Change Journal](http://www.microsoft.com/msj/1099/journal2/journal2.aspx), I need a way to take a USN_RECORD's FileReferenceNumber and convert it into a path. The recommended way is to scan the Master File System with FSCTL_ENUM_USN_DATA, and to save a database of the following:

File Reference Number ( A Directory ID, the main one that represents the below string)
Parent File Reference Number (A Directory ID, the parent of the directory, int 64)
The Name of the Directory ( system32, for example )
 
I've actually made a vector class that took advantage of SSE instructions. It was blazing fast but really complicated to code for.
 
@ThePhD And it's not I/O bound?
 
@Mysticial Hardly. SCanning the master file system with a buffer of 8192 bytes takes less than 0.1% of 5.702 seconds.
 
@Insilico A generic (templated) vector class? Or just for a primitive type?
@ThePhD Interesting...
 
@Mysticial It was generic. It uses template magic to select the code that took advantage of SSE when the type was POD and the target processor supported SSE.
 
6:59 AM
So really, it's jreally just a battle of figuring out how to get unordered_map to be performant.
 
@Insilico ah
 
@Insilico Sounds boss.
 
I supposed all the alignment crap was messy?
 
I didn't implement the entire interface though. It was just a crazy experiment. :-)
@Mysticial Yes. That was the "really complicated to code for" part.
 
I'm ready to give up on unordered_map, though.
I don't know what's causing insert to be so painful, especially when I give it 252162 buckets to work with for 160K (a little over that) entries.
It blows my mind, all of these insertions should be O(1) <___>
 
7:01 AM
@Insilico Believe it or not, alignment is mostly a non-issue in numerical stuff since you have full control over the allocation of the data.
 
Or fairly close to O(1)
 
@ThePhD That critically depends on your choice of hash function.
How do you know unordered_hash isn't putting a lot of entries in one of your bucket?
@Mysticial True, although the problem I sort of had was the fact that you couldn't ask the allocator piece for memory of at least a certain alignment. (I was trying to make this vector conform to the std::vector interface)
 
I don't know that.... I should find out.
But why have a std::list-type of addressing anyways? Why not just open-address, like the rest of everyone else? D:
 
@Insilico I wonder if there's any movement towards providing alignment support in the allocators.
 
@ThePhD Perhaps you should try looking for other implementations of std::unordered_map.
 
7:07 AM
I'll try a few more hash functions...
 
@Mysticial I recall that EA (Electronic Arts) programmers made a document outlining their STL implementation they call "EASTL" and basically extended the STL with an interface supporting alignment, etc.
 
MurmurHash doesn't seem to be helpful here. @_@
 
@Insilico Sounds like it was a big deal.
 
@Insilico Sounds like Eastle, or Eastel.
 
7:08 AM
Since I write mostly C, I just use a custom malloc(). So I've never had to deal with this.
But once I start doing more C++ HPC, then yeah, I'll have to face it.
 
As far as I know the EASTL article I linked was just an "informational" document, not a proposal for the C++ language.
 
Tempted to open the two HDs my mom wanted me to buy...
The Black Friday $100 3TB drives sold out instantly back at home. But here at school, it's too rural, and the students either don't have cars, or have small budgets. So that Black Friday deal never sold out.
 
@Mysticial It's kind of hard to open a hard drive that you don't own yet (without someone being very cross with you). :-P
 
@Insilico I already bought them. My mom actually wanted me to buy 4, but I was like... eh... I have plenty of perfectly good older drives that I'll be handing down to them anyway.
So I only bought 2.
 
@Mysticial Ah, that makes more sense.
 
7:12 AM
I'm probably just gonna keep those two for myself and give them a whole bunch of older (slightly smaller) drives.
 
Jeez, the state of commerically available mass storage technology is moving faster than I am keeping up. I remember a 1 TB hard drive selling for more than $100 way back then.
 
I felt proud about my 1 TB HD.
And then Mysticial comes strolling up in here with his mega-million TB platters of wide girth.
 
Damn newegg reduced the quantity of the Black Friday $90 internal 3TB to 1 instead of 2. So now I won't be able to build my 6TB Anime box.
 
But do you use all 6 TB currently?
 
But now I have 4 of these 3TB externals - all $100 from Black Friday.
 
7:14 AM
I mean, if you can fit it all in 3 at the moment, then just hold onto the 3.
 
@ThePhD I'm at 4.2 right now. That's why I needed to upgrade from my 2 x 2TB box.
 
@ThePhD He's obviously using the rest for his pron number crunching sessions.
 
Ah.
 
I need a primary and backup copy.
 
I could probably sit down for a whole summer with @Mysticial's collection and I'd never finish ever.
 
7:15 AM
Prior to Black Friday, my Anime was stored on a pair of 2 x 2TB boxes. Two boxes, primary and backup. Then I had a naked 2TB drive to hold the overflows.
So now I have 4 x 3TB externals. Slightly harder to manage since they aren't in 2-slot boxes.
 
Eh. No matter the hash function I use, I'm apparently doing something violently wrong with Insert.
So you know what? Fuck it.
 
That frees up my two 2 x 2TB boxes - which I'll be handing down to my parents.
 
Rolling my own special class just for this Directory Database.
 
I store my anime in the p2p cloud...
 
@StackedCrooked That wouldn't happened to be called "The Internet", no?
 
7:18 AM
I guess :D
 
oh god constexpr :(
C++11 sure is treating me nicely today
 
My internal 3TB that arrives tomorrow. I need a second to pair with it in a 2-slot box. But in the meantime, I'll use it to test 3TB compatibility of a number of things.
 
I only save the anime I really like, the rest I delete. I can always download it again later if I want.
 
@StackedCrooked It's harder for older shows as well as the large Bluray releases.
 
What's the maximum volume size NTFS can handle?
 
7:20 AM
@Insilico a lot?
 
I don't remember.
 
True.
 
But it's suppsoed to be mega fuckton large.
 
It's definitely way larger than 3 TB.
 
And I know they've also implemented a 128 bit storage FS, called ReFS.
 
7:20 AM
Looks like 16TB
 
"16 exabytes − 1 kilobytes"
 
I can only imagine how mother fucking gigantic that one will go up to.
 
16 EB − 1 KB (format);
16 TB − 64 KB (Windows 7, Windows Server 2008 R2 or earlier implementation)[3]

256 TB − 64 KB (Windows 8, Windows Server 2012 implementation)[4]
 
@Pubby Really? Only 256 TB for Windows Server 2012?
 
only 256 TB
 
7:21 AM
Smells like a waste for implementing a 128-bit based File System.
 
it's a server o.o
 
So basically a whole shitload of 3 TB drives.
 
256 TB fits inside of NTFS, so why bother with the 128 bit stuff?
 
640K is enough for anybody
 
Why is cygwin considered bloated? It's just bunch of exe files in a bin directory I think.
 
7:22 AM
@Pubby And so was 2^32-1 IPV4 addresses. :-P
 
@StackedCrooked It takes an assload of a long time to download and has some real penalties for common operations its supposed to emulate from Linux.
 
@StackedCrooked How big is cygwin?
 
What I don't get right now, is why there are still $100 3TB external drives. But the internals ones are all $150+...
 
I don't remember how big it is. I last used it two years ago I think.
Recently I work on Windows much anymore.
 
Hm.
 
7:25 AM
@Mysticial From the same manufacturer?
 
@Insilico Yeah
 
Well, this si about as flat as I'll ever get my personal ma class for this directory database to go...
 
@Mysticial Perhaps the internal ones are more expensive because they are more reliable?
 
@Insilico I dunno...
 
People typically use them to store the operating system partition on them, after all.
 
7:26 AM
Both external and internal ones use the same drives.
 
	class DirectoryDatabase {
	protected:
		std::vector<int64> keys;
		std::vector<ulword> hash;
		std::vector<ulword> hop;
		std::vector<JournalDirectory> values;

	public:

	};
 
The externals one just have a plastic case for them.
So it should be more expensive.
 
All the vectors.
All the time.
 
@StackedCrooked The LaTeX installation I have on my computer is 2.32 GB. And yet I haven't seen people call LaTeX bloated.
@Mysticial Now that is puzzling.
 
@Insilico I've called LaTeX many a thing.
 
7:27 AM
@Insilico But your argument does have some water though.
The external ones have a higher tendency to overhead because the cases are plastic and have no airflow.
 
Usually external ones don't last if used often.
 
Internal HDs get the airflow of the computer case.
 
@ThePhD My portable hard drive has actually survived for quite a long time now. And I carry the thing between my laptop/desktop and all over the place all the time.
 
@Insilico Lucky you. The only reason mine is still around is because it's usually off for months at a time.
 
I'm probably just lucky.
 
7:29 AM
I don't backup frequently.
 
I do keep backups of the thing weekly.
 
Well, I'm not doing anything drastically important with my life right now.
I mean, if my engine blows up I'd lose it, but it's cloud-safe and on 5 different computers and synced to those 5 computers on-the-save.
 
@ThePhD Hehe I put my research data in it, so I definitely have an incentive to back it up often. :-)
 
@Insilico One time, 1 week before I had to do a presentation on the research on Anthrax I did at a conference, my entire computer tanked.
Everything went under, including the HDD.
I had a backup, but it was before I had made my presention or touched up my paper.
 
@ThePhD Ouch. :-(
 
7:31 AM
I spent 4 days trying to revive the damn thing. Then in the end I just refused to sleep and remade the whole thing.
 
It's amazing that computers work at all.
 
I was working up until an hour before my presentation.
Pulled it off.
 
@ThePhD LIKE A BOSS.
 
Yeah, that's how I scored my third Research internship. But since then I've never trusted a computer again.
Devilish bastards.
They'll ovary-punch you before you can even bat an eyelash. :c
I'm really afraid of starting on this endeavor. It feels so wrong to want to actually create something sex-related.
But the problems it presents I've never tackled before, and it's interesting.
 
Ell
7:45 AM
What's this sexual project?
 
For those interested in installing VS2012 Update 1 on an offline computer, read: blogs.msdn.com/b/robcaron/archive/2012/11/26/…
2
 
user1182183
Hey everyone
 
user1182183
could anyone here extract the visual c++ 2012 runtime files for me from the setup and place them in a zip?
 
user1182183
I'm at school and I can't install it so I need the DLL's
 
user1182183
or is there a command to unpack the vcredist_x86.exe in a specific directory?
 
7:58 AM
@GamErix Have you tried placing the DLLs in the same directory as the exe?
Or is that what you're asking for?
 
user1182183
@Insilico ye I want to do that but I need to extract the DLLs from the installer
 
user1182183
I tried downloading 2 dlls
 
user1182183
msvcr and msvcp 110.dll
 
user1182183
but my main app still can't load the DLL
 

« first day (775 days earlier)      last day (4172 days later) »