« first day (749 days earlier)      last day (4191 days later) » 

12:00 AM
That makes such a big dent in my argument.
 
.... I'm so lost.
Back to encoding.
 
Custom formatting flags and io manipulators actually sound kinda useful.
But the simpler way is just... more functions.
 
@R.MartinhoFernandes Humor detector not working today?
 
hmm
you know, one of the primary motivations that I wanted to add extension methods into Wide is that writing an I/O interface in C++ is a tad of a bitch.
 
12:02 AM
i now have 666 bronze badges
 
@JohannesSchaub-litb >:D
 
Ell
@DeadMG what is wide's IO interface?
 
Is Wide like your personal Library?
 
@ThePhD personal language
 
@DeadMG which is why I tend to just write named functions instead (that return void usually). :/
 
12:04 AM
no, my personal language, someday.
rofl that we all put emphasis in exactly the same place.
 
.... Language? It looked like regular C++ in that Lexer question...
Ah.
 
@ThePhD That was written in C++.
 
Really an iostreams re-take would be kinda nice, but splitting the various concerns of iostreams does not seem like a simple thing.
 
lol, he can't write his language in his language without writing his language first.
 
curses. Forgot a semicolon. Then copy pasted that line all over my code.
 
12:05 AM
@ThePhD I think it's safe to say that it's closest ancestor is C++, but definitely not the same.
 
@MooingDuck :s//? aka, find-and-replace?
 
Ell
@R.MartinhoFernandes he could hand compile it :D
 
lol
 
Well, I don't have the ambition to write a new language. At least not yet.
OH MY GOSH I CAN DELEGATE CONSTRUCTORS HNNNNNNNNNNNNGGGGGGGGGGH.
 
@ThePhD I don't have the ambition to write a new language -- at least not anymore.
 
12:07 AM
I'll be completely honest, as far as input/output goes, my favorite language is Mathematica. Mostly because it is very simple to dispatch on formatting/type of output/input. Nothing else really does that :/.
 
@nixeagle iostreams didn't really have any concerns, did it?. streambuff did the buffering, and actual IO, and the locale or codec thingy does the formatting? or something...
 
@MooingDuck well the problem is that they are so intertwined and extending them is non-obvious.
 
@nixeagle I admit that's a definite problem
I want formatter->encoder->buffer->sink.
With all but sink being chain-able. (formatter->formatter->encoder->encoder->buffer->buffer->sink)
 
Ell
I'm confused as to the difference between formatting and encoding
 
encoding is stuff like utf8/utf16
 
12:10 AM
@Ell it might be that the difference is only in my head. For "encoding" I was really thinking "place to insert compression"
 
Maybe it means output/input formatting? Like, where the comma (if any) goes, number of digits to output of double
 
Ell
what is formatting?
 
formatting is the difference between binary output, hex output, decimal output etc.
At least that is how I understand what he is saying.
 
@ThePhD no that's definitely formatting
 
@MooingDuck The iostream itself does have a concern, but it's fairly minor: basically to have/track a current state, so it knows what parameters to pass to the locale to format something (e.g., current width/precision).
 
12:11 AM
@MooingDuck Boost.IOStreams?
 
@R.MartinhoFernandes that's what people keep telling me to learn someday
I need to find a "introduction to boost" tutorial somewhere :/
 
The way I'm setting up my IO right now is Reader (Stream [Buffered or not], TextEncoding [defaults to UTF8, seeing as that's usually the most common for input/output and is compatible with ASCII])
 
@MooingDuck the documentation of the libraries is usually fairly good. What usually gets me is installing/distribution. boost uses its own special build system that I never seem to quite figure out.
 
(Doesn't cover IOStreams)
 
Ell
12:13 AM
./bjam or something
 
Reader's functions are affected bt the TextEncoding and Stream. I haven't given a thought to how something like ENcryption would be put in there
 
@nixeagle People keep saying that but I looked at boost streams twice and got confused over everything
 
@ThePhD It wouldn't.
 
Ell
@ThePhD I guess you would encrypt the final bytes just before they are written to network/disk/memory
 
ell, yes bjam drives me nuts and usually stops me from using some libraries. If you can't build it on all the targets, what is the use.
It is likely me more than bjam of course. :)
 
12:14 AM
if you want an encrypted stream, just write class encrypted_stream { ... };.
 
It's b2 now.
 
Ell
I've never had problems with bjam
 
@DeadMG @Ell well, that was the idea. An Encryption class that can also go onto the Reader and intercept final read/write calls to do byte messing, but thinking on it's now it's a limited way to do encryption/decryption of bytes...
 
@Ell I'd want the encryption before the buffering
 
class EncrpytedStream sounds way better.
 
12:15 AM
right, but there's really absolutely no need whatsoever for the I/O library to deal with that.
 
Ell
@MooingDuck oh yeah I forgot about buffering
 
True.
 
encryption is a form of encoding. You almost could just chain it in with the rest of it in mooing duck's thing.
 
@nixeagle it was part of MooingDuck's thing
 
as long as the IO library makes it easy to extend to chain it....
 
12:16 AM
no.
 
Commas are pretty easy to handle with the current library:
std::cout.imbue(std::locale(""));
std::cout << 12345.67;
 
or to extend it.
 
5 mins ago, by Mooing Duck
@Ell it might be that the difference is only in my head. For "encoding" I was really thinking "place to insert compression"
 
So I guess TextEncoding and the backing Stream are really all that's needed.
 
think about this for more than two seconds
encoding is just a function, an algorithm
it belongs in the algorithms library and with the algorithm's interface
and has sweet fuck all to do with I/O or streams.
 
12:17 AM
@DeadMG and yet it goes between formatting and buffering in IO.
 
so?
formatting also has sweet fuck all to do with IO.
you're just changing some text around.
 
@DeadMG Ah, in that case, you dont have a problem
 
Oh, but also Endianess.
 
and buffering is an implementation detail.
except for flushing
 
@DeadMG I see that, as long as there is an easy way to extend IO to include your custom formatting and encoding... you would be better than the existing IO streams.
 
12:18 AM
C++'s standard streams have the objects that join formatting and buffering, and I dislike that I can't stick stuff in the middle (easily)
 
@ThePhD That's irrelevant.
 
Ell
why is buffering an implementation detail?
 
@nixeagle What? IO has nothing to do with formatting or encoding.
by the time IO sees you, you should be long done with all that stuff.
 
DeadMG, well if the formatting and encoding is able to be done before... yea you beat me there
 
IO library is like, "Give me some bytes to write." "Ask me to read N bytes."
anything else is not it's problem
 
12:20 AM
@R.MartinhoFernandes Not exactly. Endianess of the stream compared to the native endianess of the reading system can really throw reading values from underlying buffer or device or network connection off.
 
@DeadMG But good luck making a proposal with that.
 
@DeadMG You could make a pretty fair case that I/O should really just be handled as iterators, and put nearly everything else into algorithms that would read/write those iterators.
 
ThePhD, no
 
Ell
I think IO should be just writing bytes to an abstracted backend
 
You do that in the encoding.
 
12:20 AM
@ThePhD Nope, that's irrelevant. That's some particular output format.
 
which is done before IO ever sees it. That is how networking stuff switches things from native encoding to network ordering.
 
Ell
Stream < FileStream, MemoryStream, NetworkStream,FooStream
Like .net's streams
 
I guess Endianess is just considered another issue of Encoding?
 
ThePhD, yes
 
@ThePhD yes
 
12:21 AM
@ThePhD sure
 
@JerryCoffin I agree, although you do need a class to deal with the actual abstraction at hand here.
not exactly
 
@JerryCoffin better off with something that doesn't screw up buffering I think.
 
In most cases you'd never get tipped off about Endianess unless you know that the format you're taking is going to be opposite of the system's regular endianess.
 
@ThePhD How would you even handle endianness at byte level? You don't have any information on how the data is structured.
 
@DeadMG, though your IO streams is going to have to have some basic encoding/formatting for primitives that are larger than 1 byte.
 
12:23 AM
@ThePhD of if the data has an endianness. UTF8 has no endianness.
 
else printing an integer is going to be verbose.
 
yes, it is, but that's not because I'd actually do that, it's because I want to provide a Dead Simpleâ„¢ interface for the quick operations
 
@nixeagle the streams not the IO functions.
 
if you actually give a shit about formatting, then IO is not the guy to talk to
 
Ell
I don't understand how UTF8 doesn't have endianness if it is a multibyte encoding?
 
12:23 AM
DeadMG ah ok I see that
 
@StackedCrooked You would have to swap the bytes if more than one is requested.
 
@DeadMG Good luck pushing a proposal with nothing but that.
 
@Ell the byte order is part of the encoding. UTF8 is a series of bytes.
 
Ell, the specification of utf8 allows you to do both big/little endian.
 
lol, what.
 
12:24 AM
@R.MartinhoFernandes Who said nothing but that? I also proposed a string and will probably add some formatting routines.
 
You just put a BOM at the start of the text
 
@nixeagle they're exactly the same
 
Ell
@MooingDuck then I misunderstand what an endianness issue is :L
 
@nixeagle UTF8 BOM has nothing to do with endianness
 
@Ell Because you're writing 1 byte at a time to the system. Endianess only plays a part when your code units are natively bigger than 1 byte.
 
12:24 AM
@DeadMG "proposed"? Past?
 
no
 
@MooingDuck maybe I misunderstand what you are talking about.
 
as in, "It's currently in my document which is the super-duper-wtf-alpha draft of what I intend to suggest".
 
But either way you treat it, as far as deadmg is concerned, utf8 does not exist anyway.
 
@nixeagle UTF16/32 BOMs tell you the byte order. The UTF8 BOM is the same in every byte order (since byte order doesn't affect UTF8), and is there merely to confirm the text is UTF8.
 
12:25 AM
@nixeagle I didn't say that.
 
@DeadMG IO does not care about uf8, no?
 
Ell
@MooingDuck why doesn't byte order affect UTF8? is it defined to be one of big/little endian??
 
IO has to care what format the external data is in.
 
When a byte array is written to disk, it's not written in a fashion that dictates whether or not the order of each chunk of bytes is written in 0x1234 order or 0x4321
 
how can you extract an integer from a text file if you don't know the encoding?
 
12:26 AM
@Ell no. UTF8 is a series of bytes. Endianness doesn't affect single bytes. UTF16 is a series of 2byte-things, and a 2byte is affected by endianness.
 
@ThePhD But each individual byte is not.
 
If you have bytes ( 0x1, 0x2, 0x3, 0x4 ), they will always be writtne in that order, no matter what happens, on every system ever.
 
Ell
@MooingDuck ohhh right
 
@DeadMG, the same way you encode it. IO passes it off to the decoders/readers
 
@DeadMG Oh. Ok.
 
12:27 AM
@nixeagle They can't do jack shit with it if they don't know the encoding.
 
Ell
so how on earth can UTF8 contain the same info as UTF16? in that it can hold the same actual information?
 
Ell, UTF8 is a variable width encoding.
 
@Ell The same as how both text and binary encodings can hold an integer.
 
Ell
does UTF8 just separate it into more code units?
 
Anyway, if you plan to replace iostreams, you need to replace all of it. Otherwise you'll just schism the standard library.
 
12:28 AM
code units.
@R.MartinhoFernandes Yep. Of that I'm aware.
 
Ell
right, ta :)
 
@Ell not-remotely-accurate-summary: UTF8 is always big-endian.
 
( Or always little endian? I actually prefer little endian )
 
@ThePhD big (as much as it's any endian)
 
I'm not sure why processors for phones and smaller dvices use big endian so much. There has to be some reason it's so widely used in that arena.
 
12:30 AM
@ThePhD Eh. It's one of those choices, like co-ordinate system handedness, that people like to fuck each other over with.
 
@ThePhD because they are not usually x86.
 
The reason is that the manufacturers make big endian chips.
 
@ThePhD it's simpler to understand raw data dumps, since their debuggers aren't as good.
 
Ell
Is little endian the logical one?
 
@MooingDuck I don't think it has to screw up buffering at all. The interface is just output_iterator<byte> or input_iterator<byte>. From there you can define versions with and without buffering.
 
12:31 AM
@Ell big endian
 
@MooingDuck I think little endian.
 
Yes. I am writing iterators with buffering.
 
big-endian is the human readable one
 
@DeadMG I thought little endian had things funny, but was faster for casts/conversions.
 
12:31 AM
But really, why do I care if Big Endian is in English-Language order?
 
@MooingDuck Little endian has the same address for reading every size.
 
@ThePhD raw data dumps
@R.MartinhoFernandes right
 
Ell
I guess most logical is subjective maybe? I would class most logical as like decimals, most significant first (is that right?)
 
(If anybody is bored, mind fact checking my last post ? rohitab.com/discuss/topic/39247-file-writing-problemc/… much obliged)
 
@MooingDuck UTF-8 works in single bytes, so it's independent of endianess -- you can write something on a BE machine and read it (without any extra translation) on an LE machine (or vice versa).
 
12:32 AM
@Ell that's big endian
 
See my link ell. :)
 
5 mins ago, by Mooing Duck
@Ell no. UTF8 is a series of bytes. Endianness doesn't affect single bytes. UTF16 is a series of 2byte-things, and a 2byte is affected by endianness.
 
@R.MartinhoFernandes It also reads addresses sequentially as they are needed. If you want to read a big endian integer, you have to read the MSB first, meaning that you can't be operating on the LSB in the meantime.
whereas a little-endian CPU can operate on the LSB whilst reading the MSB.
 
Xeo
Hm. SO acting weird for anyone else?
 
@JerryCoffin that would screw up any buffering on the code side, so all buffering would be entirely on the OS side.
 
12:33 AM
@Ell In fact, Arabs read right-to-left, and we use arabic notation... so they're actually in little-endian.
 
@Xeo Seems fine here.
 
@MooingDuck Either you're wrong, or I've completely misunderstood what you're saying.
 
That link fully explains what the difference is between big/little endian and kinda covers that whole holy war thing. Here it is again: ietf.org/rfc/ien/ien137.txt
 
My Mercurial plugins for Visual Studio are throwing a tantrum and not being there for me to tap into my repository...
 
12:34 AM
we just use big-endian on them because we're LTR
 
Ell
@DeadMG that's quite interesting
 
@JerryCoffin could be either or. I can't tell
 
Xeo
Yields an empty list for me. :(
 
@JerryCoffin He's wrong.
 
12:34 AM
Anyone here use Mercurial with VS?
 
yes
 
Ell
woo! It just finished parsing gen 2! that means it is workin :D
 
Do you have the Source Control integrated into VS with a plugin or something? I can't get VS to give me any Mercurial control at all and ahve been just doing it via commandline and Tortoise HG
 
I use TortoiseHg mostly
 
@R.MartinhoFernandes the iterators would have to know how big the buffers they're iterating over were AFAICT
 
12:36 AM
VisualSVN will integrate into VS, but that's just for SVN
 
Xeo
So no one else getting an empty list when searching for only?
 
there might be a VisualHg or something
 
@Xeo works fine here
 
There is a VisualHG and I gave it a swing, but it's... crapping out.
 
@MooingDuck Why is that a problem?
 
12:37 AM
@Xeo, same
 
Xeo
Oh, it's only the "active" sort order that's fucked up for me.
 
@R.MartinhoFernandes it's awkward, seems far simpler to give a pointer and a size. But yeah, if it has that information, then it works fine.
 
Xeo
Nvm, "votes", "active" and "unanswered" don't work. :<
 
Meh. Tortoise HG it is.
 
@MooingDuck Awkward for whom? The implementor, or the user?
 
12:40 AM
@R.MartinhoFernandes I think input iterators knowing about the structure they're iterating over seems like patterns for the sake of patterns.
 
What.
How do you write iterators that don't know the structure they're iterating over?
 
One thing that is needed (IMO), and would be crucial to the I/O as iterators idea, is a library to take some set of iterators, compose them, and create a single resulting object that sends data through that set. It seems like Boost iterators has something along that line, but I don't remember the details.
 
@R.MartinhoFernandes whoa, did I word everything wrong!
 
@JerryCoffin Range, and it can already do that, even with the existing iostreams, I think.
 
@R.MartinhoFernandes whatever the consumer of the data is, would have to know how many times to advance the iterators to get one buffer.
 
12:42 AM
@MooingDuck The output iterators write to the sink when the buffer is full. The input iterators read from the source when the buffer is empty.
 
@Xeo whoa, suddenly I get blank tabs for my queries too
 
@DeadMG Yeah, it seemed like it did. My dim recollection was of some clumsiness, but that may have been related to ranges when I didn't really want (or perhaps just didn't understand) them.
 
Boost.Range sucks.
Especially for composing.
 
@R.MartinhoFernandes we were talking about a hypothetical interface for code->OS IO right?
 
12:44 AM
@Xeo heh, but if I wait on the tab, new questions start popping up.
 
Ell
I don't like iterators >.<
 
Xeo
@R.MartinhoFernandes huh?
 
Since I've started writing my library @Ell, I haven't used iterators once. High-five, bro!
 
what I whipped up over the last couple of hours
 
@Xeo Boost.Range is all nice and dandy if your iterators adaptors produce one element per element in the source. Otherwise you get exponentially-sized iterators.
 
12:45 AM
time for bed
 
So, you can compose, but it's not scalable at all.
@DeadMG Use gist.io, man!
 
ah, whatever, as long as I can still get at it later
oh, you mean the "Always oneboxes giant'wall'o'paste in the chat" gist.io? :P
 
No syntax highlighting makes code ugly to me. Guess I'm really used to it.
 
@DeadMG No, I mean produces nicely formatted pages from markdown sources posted on gist.github.com.
 
@DeadMG I feel pretty proud that my classes and implementation very closely mirror yours for String, IO, and Streams.
I think I can go to bed now, happy that I'm getting better at this.
 
12:48 AM
@Rapptz It looks funny to me for a moment, but only takes me a moment to get used to it.
 
Yeah I can read it but it just looks weird.
 
> Reads until the next whitespace, as operator>>(std::istream&, std::string&);
Oh, come on... You're making this crap asymmetric as well?
You suck.
constexpr endian binary_endianness(); will never pass.
Endianness is not a compile-time property.
 
@MooingDuck the reason I asked that question is I'm getting sick of editors randomly breaking around C++11 features. They all seem to work just fine around C++03. I'm not 100% sure that the question is actually "good", but it does have a definate answer. Either editors that work fully or editors that get awful close.
 
Vim works just fine with C++11.
 
@nixeagle I'm still not sure what you mean by "full support".
 
12:52 AM
@nixeagle Odd.. I got pinged by this message.
 
@R.MartinhoFernandes really? Does not break around stuff like enum class { ... }?
 
No.
Why would it?
 
@R.MartinhoFernandes emacs does :P
 
Yeah, but saying that emacs sucks is just preaching to the choir.
 
well I don't mean this as a "flame war" thing. >.> I use emacs the most myself. :)
 
12:54 AM
Here's the C++11 syntax file vim.org/scripts/script.php?script_id=3797
 
@MooingDuck well satisfying the 3 items listed for a start. You know, highlighting noexcept, handling lambdas correctly. Highlighting constexpr and so on.
 
Ell
I use gedit on linux and notepad++ on windows
 
@nixeagle so, just highlighting?
 
A few keywords are missing, but adding those is just a matter of dropping their names in the lists.
Lambdas and list-initialization are fine.
 
@MooingDuck and tab indention working correctly. For example emacs will indent ,'s to the appropriate level inside an enum { ... } but breaks horribly inside of enum class { ... }
I get broken behavior from qt's editor as well, so I'm mostly trying to figure out which editors actually have majority/great support for C++11.
 
Ell
12:58 AM
how does c++11 differ from c++ with editor support? o.O
 
Anyway, the question is too localized. It will be out of date in the near future.
 
@R.MartinhoFernandes your answer with vim btw would be an acceptable question answer, even better if you find scripts that do correct highlighting for all keywords without edits.
 
YES
My Mercurial is live
WoooOoOooOoOoo
 
@nixeagle I have one such script in my hard drive (the one I fixed myself) :P
 
Still kinda wish it was a Dropbox but, hey.
 
Xeo
12:59 AM
@R.MartinhoFernandes Ah, well, to get around that, you need ranges all the way down, I think.
 

« first day (749 days earlier)      last day (4191 days later) »