« first day (992 days earlier)      last day (3965 days later) » 

9:00 PM
@ThePhD Awful spaces.
 
Don't put spaces within function calls, they'll take less space.
 
@Mysticial The rules for default generated members are a bit messy, but yeah, implementing any move member suppresses the default copy members. I wouldn't frown upon explicit deletion, though.
 
Would be both shorter and sweeter with saner spacing.
 
@Mysticial Why are you writing a file handle?
 
@Griwes view(container); /// HNNG SO SHORT I LOVE IT <3
 
9:00 PM
@CatPlusPlus Because I need to?
 
@Mysticial Can you use C++11?
 
@ThePhD +container; // AWW OPERATOR OVERLOADING ABUSE
 
@StackedCrooked Yes.
 
@StackedCrooked He's talking moves, man.
 
@Griwes Wat.
 
9:01 PM
@Mysticial For what? There's fstream or Boost.IO.
 
@ThePhD Operator overloading abuse.
It's written right there!
 
+c; // can't get any shorter
 
Right now, I'm declaring copy and copy-assignment operators, but I'm not implementing them, to force a compilation fail.
 
@Mysticial No, that causes a linker error.
 
= delete.
 
9:02 PM
@Mysticial Mark them with = delete.
 
@PeterT yeah... sigh :/
 
@Mysticial One option is to use std::unique_ptr or std::shared_ptr with a custom deleter.
 
If you want a compilation fail use = delete; (or simply declare the move members and the copies will not be there).
 
@CatPlusPlus It's a wrapper over the Windows filehandle with DMA enabled and alignment.
 
Hm. This sounds like a job for my handle class~~
 
9:03 PM
@Mysticial Probably still better to use Boost.IO, or std::unique_ptr.
 
@Mysticial Doesn't matter. Writing your own file handle wrapper is not tolerated!
 
std::unique_ptr doesn't play nice with HANDLE, unless you down-cast it to void*.
 
What?
 
I'll just call it and we end it here. :)
 
@ThePhD HANDLE is void*, no?
 
9:04 PM
You probably just need to make your wrapper non-copyable.
 
Baking time!
Who wants cookies?
 
@ThePhD Isn't HANDLE a typedef for void *?
 
IIRC it's documented as LPVOID, which is documented as void*.
 
unique_ptr<void*, MyDeleter> yay;
unique_ptr<HANDLE, MyDeleter> yays; // Does not work if you have strict-typing on and Windows declares this as DUMMY_STRUCT_{GARBAGE}. At least, I don't think it does...
 
@R.MartinhoFernandes It's struct handle* or whatever these days.
 
9:05 PM
@ThePhD What.
 
@StackedCrooked Yeah, right now I realized that my file was being deleted because I didn't define a move constructor and it was doing an implicit copy + destructor call which deletes the file.
 
Just look at the windows.h header, it has a #ifdef for it. :c
 
So I need to implement the move constructor.
And disable all the copy-constructors.
 
@R.MartinhoFernandes don't worry, I wasn't about to abuse this. I'm usually in favor of passing default constructed empty classes (e.g. template<int...> struct X {}) or even pointers to incomplete classes
 
It either makes it a dummy-struct HANDLE or a void*, depending on some parameters or some weird stuff.
 
9:05 PM
And VS2012 doesn't like my = deletes...
 
Grep for it.
A handle to an object.

This type is declared in WinNT.h as follows:

typedef PVOID HANDLE;
 
@Mysticial Probably the =default and =delete syntax is all you're gonna need. You rarely need to implement them.
 
It might be defined like that in documentation, but SDK uses typed pointers.
 
Ugh, fuck you MS.
 
9:06 PM
@StackedCrooked VS2012 is bitching at the =delete. Does not support it?
 
Dunno..
 
Ugh, typedef signed char INT8. Seems quite evil when bytes equal 9 bits.
 
If you don't want it to be relied upon, don't fucking document it.
 
@CatPlusPlus well spoken
 
@Morwenn They don't.
 
9:07 PM
@R.MartinhoFernandes I saw some architecture where they did.
 
Does it run Windows?
 
@CatPlusPlus @R.MartinhoFernandes Going through half the windows.h headers, so many other components of WinNT typedef it as void* and treat it that way that you might as well just use void* -- strict typing loses, I guess. :3c
 
I don't think so.
 
So what was your point?
 
Should I have one?
 
9:09 PM
Finally... now it compiles!
Even without a move-assignment operator.
 
Or maybe HANDLE is void* and other handles are typed.
 
@Morwenn Not really, but...
yesterday, by R. Martinho Fernandes
I can spout more random facts if you want.
 
@R.MartinhoFernandes Well, pissing you off then :)
 
@CatPlusPlus I think it depends on the compilation mode. I believe in the lean/mean release builds it will all equate to LPVOID. And if I'm not wrong they only introduced the 'stronger' handle types around WINVER == 0x0500 (win2k IIRC)
 
@CatPlusPlus There are indeed other handles with different types.
 
9:11 PM
They consider it a debugging feature, like the leak checking malloc
 
But then, those docs are total crap.
 
WinSDK is awful anyway.
 
Yup. They didn't actually update the docs, apparently
 
HFILE

A handle to a file opened by OpenFile, not CreateFile.

This type is declared in WinDef.h as follows:

typedef int HFILE;
HANDLE WINAPI CreateFile(
_In_ LPCTSTR lpFileName,
_In_ DWORD dwDesiredAccess,
_In_ DWORD dwShareMode,
_In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
_In_ DWORD dwCreationDisposition,
_In_ DWORD dwFlagsAndAttributes,
_In_opt_ HANDLE hTemplateFile
);
Good job.
 
:)
 
9:11 PM
Dat code... B.t.w. why is that CreateFile you quote? The docs imply OpenFile uses HFILE
 
@R.MartinhoFernandes That's old 16-bit API thing.
I think.
 
I've found that although it takes a tremendous amount of effort, the Windows fileIO system can be made much more efficient than the Linux/Posix one.
 
@sehe Oh, I misread it. s/not/or
 
@Mysticial You mean the Async (IO completion ports?)
 
happy 4th everyone
 
9:13 PM
Once you enable admin privileges, Windows lets you do things that are very dangerous, but extremely efficient. Something I can't find in Linux or Posix.
 
@Mysticial There's libaio that works on all UNIXen (so Solaris, AIX, Linux)
 
0
Q: Is there a shorter way to output C int with puts?

josef.van.niekerkI'm having to do the following a lot in a USB (libusb) C based command line utility I am writing: char pid[20]; sprintf(pid, "Product ID : %#06x", anInteger); puts(pid); Is there a shorter, one-liner way to do this?

lol
 
You can always write directly to disk.
 
@Mysticial Search better. Of course it's all there. And worse. Look at the splice APIs added in kernel 2.6 (IIRC)
 
Filesystems only slow you down.
 
9:14 PM
@sehe Not quite. But rather SetFileValidData. I haven't been able to find this in Linux.
SetFileValidData lets you avoid the zeroing. Linux doesn't have it. Instead, it relies on sparse files to handle non-sequential writes.
 
@Mysticial Mmm gonna have to read up on that. But my guess is mmap + splicing is the answer. And you can always IOCTL your way out of it :/
 
And sparse files, I've found come with significant CPU overhead.
 
@Mysticial Mmm. I see what it does.
 
@Mysticial I think this should be a correct FILE wrapper. (It's been a long time since I did something manually like this.)
 
The main difference between Windows with FILE_FLAG_NO_BUFFERING + SetFileValidData. And Linux with O_DIRECT + fallocate(), is that one uses a ton CPU and the other doesn't.
The I/O speeds are still the same.
And that's a problem when I'm overlapping IO with computation.
The IO threads on Linux starve the computation threads because they hog all the CPU.
 
9:17 PM
@Mysticial Have you seen xfsctl XFS_IOC_RESVSP64 on xfs?
 
@StackedCrooked Something like make_unique(raw = fopen(...), deleter = fclose).
 
@sehe Not yet. I plan on looking in the XFS stuff at the end of next week so see what it can do.
But AFAICT, Linux and Posix is not enough to match the performance of WinAPI.
 
@R.MartinhoFernandes make_unique is C++14 right?
 
XFS is something else that's supported in all Linux?
 
@StackedCrooked Not that variant.
 
9:18 PM
@Mysticial In all linux, solaris, IRIX, aix etc.
XFS has "unwritten extents" - which is basically what you want, without having the kernel juggling 'sparseness'
 
@sehe cool
@sehe That might do it.
 
@Mysticial I don't think this is really as much a matter of WinAPI vs. Linux as it is Windows having better device drivers that do more to take advantage of the drive's intelligence (not that it makes much real difference).
 
> On ext2/ext3 the only way to get the same has been to (with the file system unmounted), parse the file system and implement it yourself
^ it appears you are right enough, this isn't ubiquitous
 
Or maybe. fallocate lets you do unwritten extents. But it still zeros upon first access. SetFileValidData lets you bypass even that.
 
user142019
@R.MartinhoFernandes Is that named arguments through thread locals? :v
 
9:19 PM
Javascript. Y U NO LET ME SET SEED?
 
@Pawnguy7 Because Javascript.
 
@JerryCoffin You have a point there. I tried messing with the file systems as well. So I'm comparing Windows + NTFS and Linux + ext4.
So you're right, it might just be the drivers that are left.
 
@rightfold No. There are indeed global objects involved, but they are merely markers to hang the behaviour on the right names. decltype(raw)::operator= returns a new object.
 
@rightfold Yeah, looks like expression templates.
 
user142019
@R.MartinhoFernandes Neat.
 
9:21 PM
@Mysticial Also, looking here it seems that the newer WinAPIs SetEndOfFile (win2k+) and SetFileInformationByHandle (Vista+) might be more useful to you because they (I assume) don't require the administrative privileges.
 
Ughgughgughgugh
I hate non-member static initialization restrictions
 
Xeo
So, @Mysticial is finally going to learn C++?
 
fuck you C++. D:<
 
@Xeo AFAIK he's been doing it slowly for a while now.
 
@sehe SetEndOfFile actually doesn't work. If you try to write beyond the "Valid Data" portion, it will zero the entire disk region up to that point. That's what SetFileValidData does, but it exposes raw data on the disk - hence it needs admin privileges.
 
9:22 PM
@Mysticial I can vouch for flaming spork to provide solid information. I think he's the main guy behind all disk IO for MySql (I know, that seems like mixed advertising). I know he's grated in the pitfalls of portable disk IO
 
@Xeo hey...
 
@Mysticial Ah.
The spork puts it this way:
> There’s SetFileInformationByHandle, which looks like it may do exactly what I want… if you read between the lines of the documentation. But it’s only supported starting with Vista. Which you all use of course, so that’s not a problem.
 
@sehe Yeah. Linux gets around it with implicit sparse files, but that fragments the data. You can get around that with fallocate, but it still keeps track of the region in blocks and will zero each one on first access.
 
typedef byte(&)[7] lbm_t; <--- this typedef is atrociously wrong...
 
<- stashes WIP changes on some problem; commits other changes; goes back to working on the original problem; wonders why he lost all the WIP.
 
9:25 PM
@R.MartinhoFernandes Soon, we'll have him on Haskell and Monoids. C:
 
Xeo
@R.MartinhoFernandes unstash?
 
@sehe I might look at that later since I already have a Vista or later requirement. But for now, I'm just trying to get the Linux version to match the performance of Windows.
 
Xeo
@ThePhD Do you even understand them?
 
@Xeo Sortakinda......
 
@Xeo Yeah. But it took me a lot of wondering to remember I had stashed the changes.
 
9:25 PM
@Mysticial We should really have something at the hardware level to tell the disk drive that a sector is empty, so it'll just return zeros for it, without even reading the raw data from the platter at all.
 
Xeo
@ThePhD Maybe
 
@JerryCoffin That'd be interesting...
 
Xeo
@ThePhD So, what's a monoid?
 
@Xeo maybe( optional<affirmation>() );
 
Xeo
@R.MartinhoFernandes Is stashing kinda like a temporary branch where stuff gets shoved off to?
 
9:26 PM
@Xeo that thing in the category of endofunctors, what's the problem?
 
@Xeo That is exactly how git implements it IIRC.
 
Xeo
@StackedCrooked Nono, a monad is a monoid in the category of endofunctors.
 
@Xeo Uh.... it's an element that has only one specification operation, and has an identity that's related to... uh. Itself? Or maybe what it returns...
 
details..
 
C++ looks so complicated
 
9:27 PM
STUFF AND MATH AND ACADEMICS AND <Haskell> AND SHIT I DON'T NEED THIS.
 
Xeo
@ThePhD What's the concept behind it?
 
monoid is opposite of stereoid
8
 
user142019
@H.J_Rios It is.
 
user142019
If you want a simple language, use a single language.
 
Xeo
@StackedCrooked lol
 
9:28 PM
I use python I just started coding..its good enough for me at the moment
 
user142019
Python is nice.
 
Xeo
Python is nice, but I want static typing :(
 
@Xeo Cython.
 
user142019
@Xeo RPython! Boo! Go!
 
what is static typing ?
 
9:29 PM
The natural numbers with addition and zero form a monoid. Strings with the concatenation operation and empty string form another.
 
@Xeo Um. Uh. Stuff and things and transformation operations and uh... Closure and stuff!
 
user142019
@H.J_Rios The type of every expression is known at compile-time.
 
Was Bartek coming back?
 
I've read complaints about python not being fast but couldn't that be fixed ?
 
user142019
In Python, that's not the case.
 
Xeo
9:29 PM
@R.MartinhoFernandes Natural numbers with multiplication and one yet another
 
user142019
@H.J_Rios It's fast enough for many applications.
 
@StackedCrooked But is there a Dolby 7.1 Surroundoid?
 
Xeo
@JerryCoffin I never wanna miss 7.1 ever again
 
user142019
If you have benchmarked and found a bottleneck that is caused by the interpreter and there is no other way around it than writing a Python extension, write a Python extension.
 
I suppose what I really like about python is that its syntax seems so much easier then other languages, it surprises me why new languages don't do something similar
 
Xeo
9:31 PM
Whenever I accidentally switch back to 5.1, my ears start to bleed.
 
I cannot, for the life of me, bfigure out this goddamn array reference typedef
Holy jesus fuck. =[
 
Xeo
@ThePhD using array_ref = Alias<T[N]>&;
Easy
 
._.
Ha ha rub it in I'm using VS. D:
 
@R.MartinhoFernandes Crap. I can no longer say I don't know what a monoid is.
:F
 
@JerryCoffin Sounds a bit like how Japanese would pronounce surround.
 
user142019
9:32 PM
@H.J_Rios Some new languages use Python-like syntax. An example is CoffeeScript.
 
Xeo
@StackedCrooked with the -id ?
 
C declaration syntax sucks. template<typename T> using dumb_ptr<T> = T*;. Much better.
 
@Griwes It's quite obvious from the examples, isn't it?
 
@Xeo Not really, saraundo.
 
I wish that new one D would use python like syntax, on paper it seems like a great language at least what I've read about it
 
9:33 PM
Close enough :P
 
Xeo
@StackedCrooked Yeah, that's what I thought
 
user142019
@milleniumbug s/declaration syntax //
 
There's another silly quote for monoids similar to the one about monads... Sec.
 
@Mysticial I'd probably just write to raw partitions (block device IOCTLs). This is guaranteed to be quick and there's lots of reference code available. Look at some fuse implementations (e.g. notice how ntfs-3g is way faster than ntfs on win7)
 
> A monoid is, essentially, the same thing as a category with a single object.
 
9:34 PM
singletoid is best pattern
 
@JerryCoffin TRIM?
 
@R.MartinhoFernandes Yes. Frankly, I was close to learning what it is on discrete math lectures, but we had only groups defined, never learned much about them and never got to monoids.
 
typedef byte lbm_t[7];
.... REALLY
 
So a monad is "A category with a single object in the category of endofunctors"
 
user142019
@R.MartinhoFernandes That seems false. Is there any further explanation?
 
9:34 PM
REALLY?!?!?!
 
Categories all the way down.
 
Fuck this gay earth,.
 
@sehe Does that even bypass the filesystem? Because I actually need the filesystem to keep track of the files and to fragment when the disk runs out of space.
 
@ThePhD typedef std::array<byte, 7> lbm_t; FTFY
 
@milleniumbug Impossibru.
 
9:35 PM
@H.J_Rios static typing is what happens when your cat gets to close to the keyboard with the tail on a dry winter's day
 
@ThePhD using lbm_t = byte[7];, I guess.
 
lol @sehe
 
user142019
It is true that a monoid has a value and a binary operator and that there are monoidal categories.
 
@rightfold Who told you that!?
 
@Mysticial block devices imply no filesystem (although, you can have your cake and eat it by using losetup)!
 
user142019
9:36 PM
@StackedCrooked My Little Poophole.
 
Xeo
@ThePhD Not a reference.
 
@Griwes Table-flip. I don't have using! stop rubbing it in ;~~;
 
@rightfold Ah, that one.
 
@ThePhD using compiler = compiler_supporting_using;
 
@rightfold Compare the axioms of the monoid operation and the axioms of composition in a category (except now all morphisms are a -> a, since there's only one object).
 
9:37 PM
T___T /wrist
 
user142019
I wish Go had D's $.
 
@Mysticial You can try something other than ext4.
XFS has unallocated extents, too.
 
@Mysticial I'm having trouble trying to decide whether the 'pass-through' to the vfs layer would reintroduce the zeroing problem on first access of a block in a loop-device. Probably will, considering Murphy
 
Xeo
@rightfold "max of this range" or what was it?
 
Or however that was called.
 
9:38 PM
@CatPlusPlus I've only tried NTFS and ext4 on Linux. ext4 was faster. (not surprisingly)
 
user142019
@Xeo Length of indexed array.
 
ext* is not exactly the king of speed.
 
Xeo
@ThePhD So did you want a reference or the pure array typedef
 
user142019
Not sure if it's generalized to ranges.
 
@Xeo I cheated and figured it out.
 
Ell
9:38 PM
Reiser is speedy isn't it?
 
@Xeo typedef byte lbm_t[7]; /* ... */ const static lbm_t& LeadingBitMark () {}
 
user142019
@R.MartinhoFernandes Heh, I see.
 
@Griwes static_assert(std::compiler_features<>::supports_all_goodness, "You're fucked") /cc @ThePhD
 
Xeo
@ThePhD lol
 
user142019
I was missing the identity axiom at first. I suck.
 
9:39 PM
Reiser is mostly for lotsa small files situation.
 
@CatPlusPlus And throwaway data :)
 
@sehe Jerry brings up a good point though. I'm not entirely convinced that it's the zeroing that's eating up all the CPU. It really might just be the shitty drivers. That I can't do much about.
 
Xeo
@ThePhD typedef byte (&lbm_ref)[7];
 
XFS is great for large files and sequential access throughput
 
@Xeo ..... Wat.
 
9:40 PM
But I can say for sure that on Windows, the IO operations use almost no CPU whatsover.
 
wdahjkdwhjkdw WHO THOUGHT THSI SYNTAX WAS A GOOD IDEA DWJHDKAWHDAWD
 
@ThePhD K&R
 
Don't use it.
lbm_t& is better.
 
Ahhaaha and litb actually argued that C declarator syntax is a good thing.
 
I think he was trolling.
 
9:41 PM
q__q I don't want to program a microcontroller in C anymore.
 
@sehe lol
 
@sehe :C I'll survive it!
 
Ell
@thephd then write it in arduino language!
Or c++
 
@Mysticial Mmm. I don't see how linux would have inferior drivers. IME linux is always significantly faster than windows for disk IO. Consistently.
 
@sehe That reminds me I have seen a lot of different styles of writing static assertion messages; I think I'll write a short diatribe about it.
 
9:42 PM
@Mysticial Of course. Why would they
 
@ThePhD C? this ->> (&lbm_ref) <<- doesn't quite look like C.
 
@R.MartinhoFernandes Make it a litany!
 
@sehe Depends on how the benchmark works. The IO speed is the same on Windows and Linux. The only difference is how much CPU it eats up in the process.
If they're only benchmarking speeds, it's the same (or better).
 
@Mysticial Ah.
 
Before I got O_DIRECT to work, each HD needed half a core. So 8 HDs, took up 4 cores of CPU.
 
9:43 PM
@Mysticial Well, my daily experience is that with Win7 I have to sit and wait for the simplest of operations. And the CPU usage is high. This never happens on linux
 
When I got O_DIRECT to work, it cut it in half. But there's still a lot left.
 
@milleniumbug It'll only get worse when I want pointers to arrays. :D
 
Ell
is category theory compsci or maths?
 
@sehe Don't forget that I got rid of the OS caching since I'm using FILE_FLAG_NO_BUFFERING.
 
CS is maths.
 
9:44 PM
And yes the Windows IO caching is complete shit.
 
I'm losing my mind, I think.
I should take a break.
 
@Mysticial Well, there was the time that my ext2 becamse suboptimal when it filled completely, and zfs had an issue with removing datasets from dedup-enabled pools. But those were clear 'bugs' or edge cases
@Mysticial I don't see how caching would slow anything down (well, anything but memory access :/)
 
@ThePhD Well, that's given.
 
@milleniumbug Ever heard of markdown's backtick for marking code...?
 
Hm.
I've gotten addicted to this song.
 
9:46 PM
@sehe On Windows, the caching pages out everything in memory to try to cache the IO. The effect, instant freeze. Hard shutdown is required.
 
@Griwes Well, the code is marked with backticks, so I don't know what's the problem.
 
Xeo
@milleniumbug ---stuff--- stuff
 
SHitty Sound Quality FTL
 
@Mysticial How much swap are you using?
 
9:47 PM
@milleniumbug Oh. right. Why did you use that ->> <<- then?
 
@Griwes Because I like pointy arrows.
 
@CatPlusPlus Precisely how much you'd want: 0 (just guessing, but he's doing number crunching, remember)
 
@CatPlusPlus Only a few GB of swap. But that's enough to hold all other programs. So the OS tries to page it all out. If I disable the pagefile, the IO operation fails with "insufficient resources".
 
@sehe Disabled swap works for you? I remember having trouble.
 
Ugh, the standard PDF uses U+2019 RIGHT SINGLE QUOTATION MARK with an apostrophe glyph instead of U+0027 APOSTROPHE to refer to the single quotes used for character literals '. It fucked up my copy&paste.
 
9:49 PM
I have 256MB set now.
 
@R.MartinhoFernandes lol
 
@CatPlusPlus Well, I don't voluntarily do windows. I admit to not completely disabling it (I think it refuses to do so in the UI)
 
user142019
Modernizr is front-end developer's angel WRT IE.
 
@CatPlusPlus I have not used swap since 2004
 
The point here is, Windows will try to buffer the entire file into memory at all costs. If it can't, it will page everything out. If it can't do that, it fails the operation.
 
9:49 PM
You can disable it, but it doesn't work very well.
 
@Mysticial Interesting. That's quite much fail
 
@CatPlusPlus It worked - when I disabled the IO buffering by using FILE_FLAG_NO_BUFFERING and took over all the alignment handling.
 
@sehe They've improve things since, but around the NT4 or early XP time frame, I wrote a file copier that ran about twice as fast as what was built into Windows, almost entirely by specifying FILE_FLAG_NO_BUFFERING when I opened the files. With that, it was within a percent (or so) of the rated speed of the drive and used essentially no CPU either.
 
@ThePhD If the language is restricting, people often use preprocessors. That's why it's used so often in C. Unfortunately, C preprocessor is also very restricting.
 
9:50 PM
@sehe Which is why I was saying, overall, Windows is shit for such workloads. But if you put in enough effort, it can be done.
 
@milleniumbug :3c The challenge I've imposed on myself is that while writing this project for the Microcontroller, I'm going to make 0 macros of my own.
That's right. COPY & PASTE OR BUST!
 
Why program in C while hand-standing?
Isn't programming in C painful enough?
 
Using Windows CopyFile or CopyFileEx took (literally) about twice as long and used noticeably more CPU time.
 
@ThePhD Hmmmm, so while programming in restricted language, you try to restrict yourself even more? IMO that's hardcore.
 
@milleniumbug /selfwhipping
 
9:52 PM
@JerryCoffin since when? I'm constantly vexed by abysmal performance of ntfs on Win7 (both 32bit and 64bit, both at work and at home, both with spinning rust and SSD, with and without virus scans)
 
@ThePhD Try to resist your (apparent) urge to write shitty code that you'll hate yourself for in a week or two.
 
@Mysticial That's a (shallow) comfort
 
@sehe Yeah. So I've done it for Windows. Now I'm trying to match it on Linux.
 
@JerryCoffin I'm already writing for a microcontroller - I can't hate myself more than I already do.
However, in C, I do look forward to:
 
@JerryCoffin Well, copying files isn't trivial :) There's atomicity, compression, permissions, encryption, alternate file streams, junctions, links, reparse points, sparseness, ... It's kinda tricky to implement is all
 
9:54 PM
void* addr = &mystruct;
my_other_struct_t* ohyes = (my_other_struct_t*)addr; // <333
 
That's C++, no? (assuming you add the missing star)
 
@Mysticial I think you're basically saying it's not a gimme on either platform. But to say that Windows 'affords' high performance disk IO more easily than Linux (or, even, linux actively resists it) seems very very counter to my experiences :)
 
And it gets even better:

union {
     int a[8];
     short c[16]
     complicated_type b;
} sogood; // <333
@R.MartinhoFernandes Nah, that's all C. :D
 
@sehe Or what I was trying to say is that: Given what tools and libraries I've used, (WinAPI, Posix, Linux-specific), I haven't not been able to match the performance of Windows in Linux.
 
user142019
@ThePhD at least use exact-size integer types.
 
user142019
9:57 PM
And stop using those stupid hearts.
 
@rightfold living dangerously on the edge~
 
@JerryCoffin According to my profile, I'm at 260/200 rep today. Almost 300! :P
 
@Mysticial I'd love to promise help, but I shouldn't be taking on more projects
 
Ell
@rightfold they're sideways ballsacks
3
 
user142019
9:58 PM
@R.MartinhoFernandes No, it's ThePhD++.
 
@sehe But the Linux code works fine without O_DIRECT, it's just slower. In Windows, FILE_FLAG_NO_BUFFERING is a requirement since it wouldn't otherwise. So it's two difference curves.
 
@Borgleader Quick, trigger a recalc! Or shall I delete my account?
 
@R.MartinhoFernandes The cast is still legal. D:
 
user142019
@Ell She <3 <3.
 
@ThePhD So what.
 
9:58 PM
@sehe Huh?
 
@sehe Nah. Just throwing a list of libraries at me is already good enough help. :)
 
I feel like given the time I work on stuff, I get far less done than I should :\
 
I wouldn't expect anyone to be able to look at my code.
 
@Mysticial cheers!
 
@R.MartinhoFernandes So it's still okay to have (my_other_struct_t*)! D:
 
9:59 PM
@ThePhD Ask any C programmer.
They'll hit you with a stick.
 
@Mysticial I've got a job. I'm occupationally immune!
 
But why? D:
 
@Pawnguy7 Well, now you're spending time on Lounge<C++>. Go figure why.
 
@Mysticial Is it invisible?
 
@ThePhD Because it can hide errors sometimes, and it add nothings in exchange. (C and C++ and completely opposite on this)
 
9:59 PM
@milleniumbug Longue Nonsigné? evil edits :)
 
@StackedCrooked No, it's C. You decide which is worse. :)
 

« first day (992 days earlier)      last day (3965 days later) »