« first day (2117 days earlier)      last day (3057 days later) » 

12:00
@Griwes But you might want to do relative seeks from iterators without having the file object.
The fun part is that for systems that actually fully mmap this thing, the bookkeeping would be much simpler.
@Griwes If you want you can avoid the extra logic with two read modes, one where you can only read forward (call it "streaming") and one where you can read back too (name?)
I wonder if current standard libraries on POSIX mmap files in their entirety, or just segment-by-segment.
@R.MartinhoFernandes The logic's not really that different, so I'm not sure if it actually is more logic (or at least, not much more).
> sorry, unimplemented: mangling binary_left_fold_expr
void Testf( U );
12:07
...and now I'm grepping glibc for things.
what am I doing with my life
Hey guys I've got a problem. I have an implementation file and a header file with declarations. In the declaration file I have a template function, example:

template < class U >
#define _IO_XSGETN(FP, DATA, N) JUMP2 (__xsgetn, FP, DATA, N)
FUCK YOU GLIBC
I JUST WANT TO KNOW HOW YOU FREAD
In the impl file I have the definition:

template < class U >
void Testf( U ) { }

And in my msain file, i call Testf( ), and it does compile, but fails to link.
Helperino pls!
Deep-fread chicken.
I'm confused.
@EnnMichael rtfm
/* FIXME handle putback buffer here! */
Ugh.
put stack
820
Q: Why can templates only be implemented in the header file?

MainIDQuote from The C++ standard library: a tutorial and handbook: The only portable way of using templates at the moment is to implement them in header files by using inline functions. Why is this? (Clarification: header files are not the only portable solution. But they are the most convenien...

@Griwes lol, is that an obsolete comment or does the code not really handle it?
@Morwenn IFREMER?
12:16
@Rerito Nope, CLS. I worked for IFREMER 3 years ago. But it's like ~500m away from IFREMER.
Oh just next to my former school
Yup, just next to my former school too.
enib?
@R.MartinhoFernandes also lol go review some of the others FIXME's there. :D
@Griwes Not too many FIXME's, but some of them look like they'd affect some corner cases.
And one of them is just "well we don't really check for safety with NULL".
12:24
The GNU C Library is free software;
right, no wonder the code is so 'pretty'
I give up trying to figure out if or where glibc calls mmap in the context of file IO. :/
@Griwes Is the dynamic polymorphism bit really so bad? After all, there's a lot of code that handles the base classes of std:: streams and then uses those.
it's a C library ...
@ThePhD Yes - it stops you from having different iterator categories for different streambufs and shit.
Granted, they probably do that because it's the only way right now, but I would imagine a lot of developers are thankful they don't have to nail their choice down to a specific type of stream (see the FILE* fiasco of many C APIs which for some reason only take a FILE* file pointer or a const char* fname c-string, and usually have to be hacked up later to deal with a section of memory or otherwise).
12:28
> First, and not limited to concepts, we need to treat a member template as dependent if its signature depends on template parameters of its enclosing class […]
really? that deserves looking into
@Rerito Yes :)
I had some classes in Télécom Bretagne too.
image processing?
correction: this deserves looking into by someone else
Sob.
Not even 3 days and I already thought of another feature sol2 needs.
Someone save me.
@R.MartinhoFernandes Now what about the other direction? How do you do writes? And more importantly, how do you connect that with async IO? Or is the async IO layer just the layer that the iterators build upon?
12:41
Euuugh.
*it = (something); gross
that time of the month special!
coz anything could look like a panda
I guess for "synchronous" writes you could make it possible to write through those iterators, and that's okay, but async IO needs to be an actual thing (though it probably should be the layer below).
Would need a way to flush all the changes done through iterators.
@ThePhD how is it any more gross than something = *it;?
@Griwes The way IO works right now, when you read something, it generally moves ahead.
I know that.
And I also dislike the way IO works right now. :P
12:44
And when you write something, it also moves ahead.
So iterators are kinda borked because they generally point at a specific position.
Because I consider the way IO works right now to be ancient.
44 mins ago, by Griwes
auto file = open("asdf"); auto it = file.seek(1024); ++it; peek(it); is fully reasonable IMO; not sure if giving the option to do it += 10000; would make sense (especially since you already have seek).
There's a bit more of discussion and random attempts at online design in the discussion above.
If you could write an IO layer beneath that that allowed you not to be forced to move forward or backwards when doing a read or write that'd be the first part of making iterators more viable, right?
1 hour ago, by Griwes
It'd behave basically like a segmented iterator, where each segments has a control node that keeps a shared pointer to a buffer segment and to the next control node.
These are the two messages most important for understanding what I'm getting at, I think.
Oh. Well, okay.
So, at least to maintain a bidi iterator,
you'd need to have a buffer for your current stuff, a buffer for stuff behind you, and a buffer for stuff in front.
Yes.
If you wanted you could go further with random access, but then bookkeeping goes nuts.
12:48
Yeeah... true random access is really hard. I think bidi is the most sane you can get?
I think so too.
I'm going to once again throw myself an interrupt from current personal project on the table and try to implement something like this.
(...despite the last one being thrown like on Sunday. :D)
@Rerito Nope. It was the the research master degree. I don't remember which classes exactly but it was boring and I was bad.
Ell
Ell
I still don't see the rationale of putback
It's not even guaranteed or anything
One could just not support it on a stream
@Ell You want to parse stuff.
@Griwes What's the current one?
12:50
Your memory is limited, so you can't just read the entire file.
And your API is so braindead it doesn't have peek().
That's when you need to start putting things back.
Ell
Ell
I mean, putback shouldn't be in the stream :P
Obviously.
Ell
Ell
But even then they would have known that
@Morwenn Oh! T'as joué de la flute alors ? :D
Ell
Ell
I think there I something I'm missing
12:51
IMHO it's just one of the signs that the API's foundations are braindead and/or ancient.
@Rerito Belle métaphore, mais non. On n'était pas obligés de valider toutes les UEs x)
Du coup j'ai eu le master de recherche à la moyenne générale.
Avec 2.5/20 et 4/20 aux cours de Télécom.
@ThePhD Vapor, sitting on top of an UEFI bootloader and a brand new greenfield kernel following it, sitting on top of a CPU toyed with in Verilog (where I'm currently mostly fighting with the language), sitting on top of Despayre (which's my build system thingy), sitting on top of constant improvements to my general purpose libraries.
Ell
Ell
I'm writing an LZMA2 decompression stream BTW
I might've forgotten something. Sorry.
@Griwes That's quite the stack.
12:53
@Ell Well, if you've never seen code that thinks that getc (+ ungetc after failed peek...) is a right interface to use when parsing text, then you'll keep missing it.
If you've seen such code, you are probably hating it and hoping to forget it ever existed one day.
@ThePhD Yep.
Hahaha nice
My current stack is {SCHOOL WORK HAHA FUCK YOU}, chat wubsite, sol2, gladell
@Griwes Not sure. I'd need more time to think about it than I can currently dispense with.
I can't imagine asynchronous iterators.
@ThePhD Wow, that's quite shallow.
13:00
@R.MartinhoFernandes I'm leaving the bottommost pits of the stack out...
@R.MartinhoFernandes Fair enough.
But do ping any time if you have a random idea about it.
And by bottomost I mean like 50% of my aspirations and goals and dreams.
Gladell is one of them. The others are {video game and graphics stuff}, {the engine I need to revisit now that I'm not so bad at design}, etc. etc.
So much I want to rewrite. =/
And so much new stuff I want to make.
wdhawjdkwd I need 5 me's.
nwp
nwp
@ThePhD or learn to delegate first :P
@nwp I am delegating.
Why do you think school work is at the top, alongside sol2 and the website stuff?
Of course, graphics and video game stuff are getting the shaft.
oh good, looks like support for mangling fold exprs did land in GCC
Ell
Ell
13:09
Boost::iostreams looks much nicer :V
nwp
nwp
@ThePhD I think you are confusing delegating with prioritizing
@nwp Oooh. Right, other people.
... Lel, other people interested in the things I work on XD.
13:21
@Xeo interestingly I attempted a first stab at a fold expr’d tuples::scan but repeated calls to tuples::append makes me think it’s not really worth it—although I’ll probably sleep on it first and revisit it some time later
Ell
Ell
You know what's amazing
Bloomberg
bloomberg sux
honestly, Hillary Clinton???
Ven
Ven
@LucDanton mangling that?
@Ven yes
Xeo
Xeo
13:55
@LucDanton Speaking of sleep, I just had a nice nap!
(Thanks to having to take a vacation day because the kitchen window repair took so long that it wasn't worth it to go to work anymore)
Although I'm not sure it really was a nice nap, cuz right now I feel super exhausted and lethargic.
Maybe the nap was too short.
@ThePhD Oh, I forgot about that allocator thing of mine.
(As in, raw memory allocator.)
14:13
@Xeo Nap more.
Repeat.
Happiness achieved. Maybe.
lol I thought I was typing into the search thingie :)
> ioterator — A C++ I/O library that doesn't suck.
Empty project.
it doesn't suck at least
@Morwenn it's not empty, it has a readme.
14:23
now commit 1 source file and you'll have gone further than 99% of badfold's projects
Oh man.
I gotta not let my ego shoot through the roof.
@Morwenn Where is it?
> "To be honest with you, Sol2 is the first binding library that I have compared against where I have had to disable runtime checks in OOLua, so credit to you for that."
FeelsGoodMan
@Griwes Even my soul is less empty.
@LucDanton Tu survis ou bien
14:51
@AndreasPapadopoulos à quoi ?
à vrai dire jsuis accaparé par les quotidiennes (normales + la nouvelle zone + fractales)
15:18
accaparé?
@AndreasPapadopoulos It's been a long time since your last half-greek-inspired nick, isn't it :0
@Ell what about it (or do you mean a person from the family)
@sehe a cappella
Ah. That explanes
@sehe 'engrossed' looks like a very good translation for both the literal and figurative meanings
Ven
Ven
Reusing avatars, K.K.di?
@LucDanton nice words
Ell
Ell
15:58
@sehe I just think the speed at which they gather data is amazing
Oh yeah. Reuters and Bloomberg are nice. Until automated trading over satellite connections (but they no-doubt offer that too these days)
Because having zero width spaces inside an indentifier is an abomination, that's why. — Robert Harvey Jul 26 at 14:45
@RobertHarvey That would be awesome.
@Mysticial Would definitely make debugging interesting...
@AndreasPapadopoulos That's not true at all. Fully 4% of his projects have at least 1 source file. Now if you'd asked for a source file that actually worked, that might be a different story...
16:23
> But that means the compiler is not standards-compliant. Oh noes.
First of all, does the standard actually mandate that zero-width space be allowed in identifiers?
@Mysticial it’s pretty good at excluding non-letter things
I don't think the standard says much about Unicode, or specific characters/encoding. (aside from maybe codecvt) I'd assume it was all implementation-dependent.
16:31
@RobertHarvey At first glance, it looks like just a specific compiler is allowing it. I'm searching through the comments to see if anyone says anything about what the standard itself says.
@Mysticial it does, there’s an annex for it
Yeah, that's the one I was just reading.
Why any sane programmer would use a zero width space is beyond me.
Or really anything but A-Z, a-z, 0-9 and the underscore.
Maybe they're overly progressive: Don't discriminate against anything that's not English.
Ack. Social Justice Warriors.
I've seen the lambda character used in lambda expressions in C#. Amusing but harmless in that context.
16:37
Obsession with inclusiveness. Wait, that sounds oddly familiar...
@LucDanton E.1, to be precise.
Ell
Ell
@RobertHarvey I can see greek letters
I've used greek letters before
@RobertHarvey Although C++ doesn't allow it (yet, anyway) I can see the attractiveness of being able to overload symbols for set operators and such.
Ell
Ell
Hmmm. What is the name of the algorithm used for multiple concurrent processes to signal a lock on some resource without atomic primitives?
16:42
@JerryCoffin C# does [maniacal laugh, rubs hands together]
@Ell Mutex?
Mutex or Semaphore.
@JerryCoffin Perhaps you can combine that with some macros to get the same effect?
Ell
Ell
A mutex is what I would call a primitive
Semaphore then.
@Ell a mutex is not atomic though
Ell
Ell
Oh right
Ell
Ell
I thought locking a mutex was atomic
2nd comment - so true
@Ell I suppose it depends on how you look at it.
Ell
Ell
@RobertHarvey I'll investigate, thanks
Unless you mean the whole lock-free, immutable space. But that doesn't require lock signals.
Also: "Memory Barrier" or "Fence."
16:49
That word "lock-free" has been resonating in my mind for the past 4 months.
@Mysticial Maybe, but it would be non-trivial at best. I was thinking of things like getting std::set_intersection(a, b, c) to look like c = a ∩ b.
Since I've literally been doing nothing but writing lock-free data structures for the past few months.
@Mysticial Damn, must be rough going without eating or sleeping for months at a time. (I know: taking things too literally is getting old. Sorry.)
@JerryCoffin I can eat while I'm not holding a lock.
Ell
Ell
if that makes sense?
@RobertHarvey I guess I'm thinking about something you can only do with loads and stores
16:54
Transactions?
Lock-free programming is literally what the name implies. No locks, no mutexes.
Everything is done with atomic load/stores, fences, acquire/release semantecs.
Wow--took the time to write (what I think is) a better answer, and for once it actually got a couple of up-votes and an accept...
2
A: what is the difference between exit and std::exit in C++?

Jerry CoffinThey're two names for the same function that does the same things. Note, however, that in C++ std::exit/exit (regardless of how you get to its name) does have some behavior that's not specified for the exit in the C library. In particular, exit first destroys all objects with thread storage du...

Not at all
It just means you don't have to pay for locks which are usually $5 a piece
@AndreasPapadopoulos You obviously haven't read the GPL V4. Lock-free actually means the locks have freedom!
@JerryCoffin So part of the correct approach is to throw an exception? O_o
16:57
@JerryCoffin Freedom as in beer?
Ell
Ell
All of these are good search terms, thanks :D
Or freedom as in WinRar
Ell
Ell
@AndreasPapadopoulos lol
@RobertHarvey if you want a nearly immediate but "normal" exit from somewhere other than main (in C++) yes.
@AndreasPapadopoulos Drunken locks. Almost as fun as drunken Jenga.
@RobertHarvey The correct approach is not using C++ to begin with
If you notice you have a C++ compiler installed on your machine, call your local pest control team asap.
17:00
[sigh] I hear that every time I come in here.
On the bright side you have good memory, on the bad side you're still ignoring our expert advice
@Ell Not very nice of you
Ell
Ell
haha
@RobertHarvey C++ is in that odd position where it's (barely) good enough to give a glimpse (or at least a notion) of how much better things could be. Users of most languages never really think much about it. I wish I had a link handy--there was a fairly recent thread on Reddit, where a guy using Haskell was bemoaning the fact that he couldn't find a way to enforce even more via a type (and a Java user jumped in, clueless that Java not only wouldn't fix it, but couldn't do nearly as much).
Xeo
Xeo
17:25
It's like the languages are baiting you, telling you that something should be possible.
@JerryCoffin One of the folks on Programmers is adamantly against unit testing, and I finally found out why: because the unit test tools don't force people to use them properly.
The paper that he always cites ("Why most unit testing is a waste") seems more like an indictment of object-orientation and human behavior than about anything relevant to unit testing as a practice.
18:02
@JerryCoffin Based on some of the stuff I've read from Java people, there are a good number of them who really think Java is better than all other languages for everything. It's almost as crazy as FOSS evangelism.
@AndreasPapadopoulos No user description? That's boring D:
18:14
@RobertHarvey You have to read that paper really carefully to get much of out of it. What it comes down to is that he (largely) advocates in favor of testing an integrated system more than individual bits and pieces. The problem he cites (and I think it's quite real) is that many unit tests are written at a level where their passing is pretty much a given, but doesn't really tell you anything about the likelihood of the system working as a whole.
The opening of the paper is unfortunate, because it's easy to misunderstand it as an indictment of OO programming, and saying (in essence) that back in the Fortran days, life was better.
Wasn't it?
@Morwenn God no! At least not when I wrote Fortran, anyway. When you get down to it, his only real point is that back then systems in general were so simple that it was easy to compare inputs and outputs, and be (at least reasonably) certain that the transformation from one to the other was either right or wrong. Now they're enough more complex that you often can't.
Less problems with cache effects and branch mispredictions back then I guess?
hello
after years of identifying as a C programmer, I've been considering learning C++.
Damn. My power source fan is rattling.
18:19
@Morwenn That depended on the computer. Certainly lots of programmers (especially on small machines) didn't need to know or care about such, but for those using machines that had them (and they did exist) they mattered at least as much as they do now).
@wilx sux
I bought Bjarne Stroustrup's book, but it talks too much about OOP, which can go to hell.
@JerryCoffin Well, it makes sense :)
The reason I want to learn C++ is because it will drastically make my life easier in programming contests, because of all the builtins.
Is there a good reference for using C++ in a C style (avoiding OOP) ?
18:20
just skip to the later parts
ohh
like what chapter?
@thepiercingarrow Isn't that just C?
P.S I have the first edition if that makes a difference.
@thepiercingarrow "In a C style" and "avoiding OOP" are two entirely different questions.
dunno I don't have this book
templates are a thing though
18:21
@JerryCoffin Well, both.
@Mysticial But I still want to use std::map or std::vector, or std::random and those stuff.
And I would like to define my own operators for my structs XD
I feel like everyone currently thinks I'm stupid.
9
anyway, C++ is a multi-paradigm language for a reason, and I'm fairly sure Bjarne's book will be comprehensive enough to cover them
hmmm
alternatively I could just copy-paste the libc++ assembly into the top of all my programs... :P
Okay I will look through the index - thanks!!
@thepiercingarrow Stupid? Hard to guess about that. Ignorant? Probably (but then, we all are, just about different subjects).
you can try Effective C++ to compare the C approaches to the C++ approaches to the same problems, and you can choose the one that you prefer
if you just want reference over the APIs, then just go to cppreference.com
18:26
Effective C++?
question mark?
I think, however, that you're taking a relatively poor approach. If you want to learn to use C++ well for a particular type of situation, you're probably best off asking about that directly, rather than asking about the methods you currently believe will give the result you want. You've created a classic XY problem.
it's a book by Scott Meyers
ah okay
@JerryCoffin ahh I see. wowowowow that is the first time I've seen the XY term used in context!!! o.O o.O o.O
« a classic XY problem » is sexist :o
@Morwenn Sexist? Yeah, I'm strongly in favor of sex.
#disgusted
"sexist" is one letter away from "sexiest"
And one letter away from saxist.
@milleniumbug I doubt anybody has ever accused me of being (or thought of me as) sexiest though.
18:34
@Morwenn Which is only on letter away from sadist. Levestein would be so impressed bored, saying "I told you so."
I saw that coming from a distance :D
@JerryCoffin He could have said that in a paragraph or two. It's the one thing in the paper I happen to agree with.
@JerryCoffin Is your (mis)spelling of Levenshtein a subtle pun?
@RobertHarvey Nope--I'm just a lousy typist with an even worse memory.
So I'm gradually coming to the unpleasant realization that I'm going to have to read a 500 page book about Git to become productive in it.
Git is a
When all you really need is a
18:41
@RobertHarvey He does say a few other things I think are probably reasonable, at least for some problems--for example, test driven development and refactoring doesn't always lead to good architecture. At times it can, but nowhere close to always.
It's hard to sift through all of the straw men and non-sequiturs to get to the parts that actually say something meaningful.
Lies, all you need is this:
@RobertHarvey Nope. All covered in one xkcd.
Not good enough, you need to take a class on it. Or rather a set of classes:
- Introduction to Git.
- Git 101
- Git 102
- Git 201
- Git 310
@JerryCoffin You don't know how true that is... or how many times I've actually done that.
18:43
Once you have your degree in Git, you'll be able to do a pull request.
bah, all you really need is git push --force
If you want to merge, you'll need a doctorate.
@RobertHarvey Dunno about you, but I certainly know I've done it...
I hardly ever ask for help with Git these days, but I type more and more random commands when there's a problem and I still don't know how to cherry pick.
18:44
Merging is the difficult part. I can commit, push, pull and fetch in SourceTree. Those things are all I really care about. But I haven't found a good way to resolve merge conflicts in SourceTree yet.
> Was git reset or git revert again?
stopping using source tree is actually when I became fluent with git
Yes. Because command line.
@Griwes lololol
18:45
@RobertHarvey Yeah--problem is that I'm pretty sure a lot of it is written as fairly specific rejoinders to/comments on papers others have written (and such) so many of them make little or no sense in isolation.
I've managed to avoid the command line for years. Why would I start using it again now?
My life became significantly easier the day I discovered git stash.
Ell
Ell
Yeah I love that thing
@Morwenn what does revert do?
In other news I shortened my hair a bit today.
18:47
Sure, but then how do you get your stash back out so that you can merge it?
@Ell I don't know.
@RobertHarvey git stash pop?
Oh, wait. That's command line. We discovered fire a long time ago. We don't need to use sticks and stones to make it anymore.
git is supported fairly well by Visual Studio
Ell
Ell
@RobertHarvey what source control do you use currently?
> SourceTree
Ell
Ell
18:49
Oh then you haven't discovered fire :P
SourceTree isn't SCM. It's a visual client over Git.
@RobertHarvey Looks like I finally found a fellow command line hater. :)
Or, more precisely, it's probably a visual metaphor over the Git command line.
Ell
Ell
Ah okay
my bad
@RobertHarvey I guess I don't understand why you prefer moving the mouse to click words instead of typing them
I prefer clicking Commit and Push to reading a 500 page book to understand Git and its command lines.
Ell
Ell
18:53
you mean git commit and git push ;)
@Ell Why not? I'm used to command-line Git but also to merge stuff on GitHub where I don't type anythong.
Once you're used to something, it's not that bad.
Ell
Ell
I have never merged with a graphical tool
@Ell Were it that simple.
Ell
Ell
It is :D
it's not
Ell
Ell
18:53
I've used GUI tools for looking at git repos
Subversion workflow:
Ell
Ell
I've always preferred them for doing commands though
Git workflow:
Ell
Ell
@RobertHarvey *github
Is there a difference?
Ell
Ell
18:54
@RobertHarvey yeah
:32078978 lol git manpages
GitHub is just a git server service.
Ell
Ell
there are various git workflows
might as well wipe your butt with a sandpaper
Ell
Ell
18:55
@milleniumbug git manpages are some of the best imho
Honestly git has amazing docs.
Ell
Ell
I agree
stack overflow has amazing git docs, yeah
To be honest, the best Git doc I have found so far is to type my intent in Google and let it direct me to related StackOverflow questions.
or GitHub ones; just disregard the manpages
Ell
Ell
suuuper helpful
and the command pages are the man pages verbatum
There are too many things in Git and I never know where to look for. Typing the intent and then sometimes reading a bit of an explanation is so much easier ._____.
@Ell Yeah, I love that source.

« first day (2117 days earlier)      last day (3057 days later) »