« first day (616 days earlier)      last day (4346 days later) » 

12:00 AM
The logic inside of the thread should frequently check if a cancel flag has been set.
That's the safest way.
IMO.
 
A simple atomic bool with acquire-release semantics should be the most efficient realization.
 
I'm pleasantly surprised that Visual Studio's Unicode handling in source files is actually pretty good.
 
Except on x86 that's the same as one with sequential consistency.
 
alright, my code compiles. I'll see if it runs next week
 
@georgemano not my code but, any use? daniweb.com/software-development/cpp/threads/351851/…
 
12:03 AM
@Insilico I'm pretty sure that VS has a really nasty habit of converting source code files to Extended ASCII in the dev machine's codepage.
 
@MooingDuck Why not try running it now?
 
@DeadMG Isn't that a configurable default?
 
@Insilico it might not work, and I want to go see my fiance instead. Right now I'm in a good mood. It compiles.
 
@DeadMG When I save the file, it asks me what encoding I should save it in (if it can't be saved in the current code page)
@MooingDuck Ah okay.
 
@Insilico That's not really a safe behaviour when you consider that most text content can probably be saved in the local codepage.
 
12:04 AM
If you save it as UTF-8 without BOM then you can compile it without the compiler fucking with the string literals
 
@RMartinhoFernandes Dunno, but it's still very nasty behaviour.
 
@DeadMG does it actually convert files? That would be wierd.
 
@MooingDuck I know that VS will convert files with inconsistent line endings (e.g. \n vs. \r\n)
But only after asking you
 
Asking is good.
 
It seems that even without a UTF-8 BOM Visual Studio will open a file encoded in UTF-8 correctly
Oh there's an option for that: "Auto-detect UTF-8 encoding without signature"
Do other IDEs do that?
 
12:08 AM
@Insilico that's quite different from silently changing the encoding
 
@MooingDuck I haven't actually seen the IDE silently changing the encoding
If I copy-and-paste in some text in Unicode in a new file and I try to save it VS asks me what encoding I want
 
I think I've seen the 'your line endings are inconsistent, do you want me to fix' in a few editors. Can't recall where though.
 
@Liam VIM doesn't
 
Well, I'm sure there's plenty which don't. It is quite a Win-esk kind of activity really (Hey, that looks like a text file, would you like me to screw it up?).
 
"Some Unicode characters in this file could not be saved in the current codepage. Do you want to resave this file as Unicode in order to maintain your data?"
That's the message I get if I try to save a file with some Unicode characters in it in VS.
And there's an option for "Save in other encoding" or something
 
12:13 AM
Do you code in Chinese?
 
@Liam No, but I would like to be able to compile with Unicode string literals
The rest of the code is in English.
 
Ah. I'm mostly stuck using VS6 so such things don't concern me!
 
@Liam: You do realize we're living in the 21st century, no? :-P
 
It isn't by choice. :-/
 
@Liam: Ouch. :-(
 
12:15 AM
Yeh
 
call your headhunter
 
The cool thing is that if you save the file as UTF-8 without a signature the VC++ compiler won't screw around with the string literals. It'll just pass though.
 
Hmm, how can I yield a thread's slice on ideone? It doesn't support std::this_thread::yield()
 
@RMartinhoFernandes I think you're SOL. Those kind of things kind of require OS support.
Actually can you obtain a handle to this thread?
 
@Insilico Do you know how to do it on POSIX?
@Insilico this_thread is a namespace.
 
12:18 AM
@RMartinhoFernandes Does ideone support POSIX?
 
I wasn't aware of that.
 
do it in le wides!
 
@DeadMG I'd be glad to. I can't. You know why.
 
@RMartinhoFernandes Yes I know that. I don't remember the API of the top of my head, but can't you get a std::thread that refers to the current thread?
 
12:19 AM
No.
 
Or am I severely mistaken?
 
@RMartinhoFernandes stop hurting me with your truth and your words :(
 
You can get its id, but that's all.
 
There's a sched_yield() in POSIX but I have no idea if it does what you want it to do.
 
I just want this thing to not execute sequentially.
 
ARgh. Didn't work. Whatever, I'll test on my machine.
 
btw
 
@RMartinhoFernandes How about pthread_yield()?
 
I decided to change my type inference to all value
the old type inference, well, you would get mutable reference by default, which could lead to some nasty surprises
 
Are you talking about Wide?
 
12:22 AM
yep
 
Concerning C++ auto.
 
@Insilico No. I have a feeling GCC 4.5's <thread> library doesn't use threads.
 
well, I apply it in a hell of a lot more cases, but yes
 
Or something.
 
According to Herb you should nearly always use auto instead of explicit type. Do you follow this advice?
 
12:23 AM
@StackedCrooked I do, and I greatly increase the number of places where it can be done.
 
@StackedCrooked I personally don't, unless said type requires 2342323488 characters to type.
Although I don't see anything wrong with using it more often
 
@StackedCrooked Yes. I got used to it from C# and Haskell.
 
my problem is that something like x := 5; f(x); gives f a mutable lvalue reference
this is great because perfect forwarding is simple and easy (and also simplifies the type system and lvalue/rvalue stuff).
but not so great because the value of x is not very predictable
 
@RMartinhoFernandes Yeah auto is pretty nice. Now for something to take the pain out of std::string::npos and stuff like that :)
 
Does VS autocompletion work with auto types?
 
12:25 AM
@StackedCrooked Yes.
 
For some definition of "work".
 
@StackedCrooked Intellisense is actually based on the EDG front end, I think.
 
In QtCreator it works sometimes..
 
ah, fuck it, I'll stick with reference
if you want to ensure unchanged then make a copy or const ref or someshit like that
 
@Insilico D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READS_PER_INST like things come to mind
 
12:27 AM
@StackedCrooked Something like this: ideone.com/84TrF (ideone seems to be refusing interleaving the threads, but it should work...)
 
@Insilico IMO, it's not about the length of the type (just)
it's also about the fact that type inference is flat out more maintainable
it adheres to DRY
 
@RMartinhoFernandes LOL:
> I'm in your thread
 
@DeadMG Yeah I realize that.
 
so it's my Professionalâ„¢ opinion that auto should be used abso-fucking-lutely everywhere
 
lol, Professional.
 
12:29 AM
With a capital "P" of course.
 
@RMartinhoFernandes Are the "normal" operators not correct when using atomic_bool? E.g while(!cancel) { ...} and cancel = true;?
 
hmmmm
what's the difference between fmod and modf?
 
@RMartinhoFernandes I wouldn't be surprised if ideone just restricts you to a single core, thus making actual concurrency rather absent
 
@StackedCrooked Yes, but they use sequential consistency ordering, which is unnecessary and can be less efficient.
 
@sehe Might be needed to prevent abuses similar to fork bombs. I would think... I know nothing about that actually. Just pretending to be knowledgeable.
 
12:31 AM
(It's irrelevant on x86, as everything is seq_cst).
 
"modf: Decomposes given floating point value x into integral and fractional parts, each having the same type and sign as x."
"fmod: Computes the remainder of the division operation x/y."
 
@sehe Shouldn't yield force a switch to the other thread even then?
I'm not looking for speedups, only interleavings.
 
well, I don't see the need to provide modf and I can just use % like a sane person for fmod
btw, robot, opinion on cutting increment and decrement operators?
 
Meh, I don't really like the new design of cppreference.
 
@DeadMG Go ask the C++ standards committee why such a thing exists.
@StackedCrooked Would you rather I link to cplusplus.com?
 
12:33 AM
@Insilico Go ask the IEEE754 standards committee why suck a thing exists. FTFY
 
@Insilico It's your life man.
 
@DeadMG I'm not particularly fond of them. If you don't make some idioms necessary, I think it's perfectly fine to cut them.
 
hmmmm
might define vector, matrix, and quaternion ops in my Standard?
... nah
 
@DeadMG Are your for loops such that ++ isn't necessary for 99% of cases?
 
@RMartinhoFernandes Any specific idioms? A lot has changed for Wide.
@Insilico Yes.
 
12:35 AM
@DeadMG People will likely want to write their own for the usual reasons.
 
yeah, figured so
 
@DeadMG whos cutting in/decrement operators?
 
now I look like a numpty
 
@DeadMG Is it extremely painful if I happen to be in the 1% of cases?
 
mathematical support: trigonometrical, and other
:P
 
12:35 AM
@DeadMG 0-N for loops, and then some iterator-related things.
The need for those goes away with proper ranges, IMO.
 
@Insilico Not really.
@RMartinhoFernandes Which I have. You'd only have to deal with increment and decrement if you write a range-based algorithm.
 
MATLAB doesn't have ++ or -- operators, I think
And it's annoying at times
 
@RMartinhoFernandes Eh, you could just write a numerical range.
 
But then again Wide != MATLAB
 
but, but...it's C*++*
 
12:36 AM
@melak47 No, it's Wide.
 
@DeadMG Yeah, that's the idea.
 
@melak47 We don't even talk about C++ more than half the time in Lounge<C++>.
 
that explains a lot
 
I considered cutting ++ and -- earlier, but I didn't really have much of a specification back then.
now that I do, I feel more confident that I can geniunely assess how redundant they are.
and my grammar is much evolved too
 
Killing those prevents a stream of "what is the result of +++++++i++++++++i++++++i+i++++" questions.
That's good.
:)
 
12:40 AM
well, ultimately, I just don't see the need for ++i over, say, i.increment().
 
(Assuming you get a big enough userbase to make that a problem cough)
i+=1?
 
my heart, it bleeds all over the floor
@RMartinhoFernandes Also that.
of course, in Wide, you could just take the integer as a compile-time argument, and assert it to be 1...
damn how I keep not noticing how flexible my own damn language is
 
@DeadMG Poetic now are you?
 
always, you're just too much of a peasant to notice normally :P
 
@DeadMG That may be as symptom of something else. Like, holes in your chest.
 
12:42 AM
As always I'm too much in awe to be offended.
@RMartinhoFernandes Or lack of carpet.
 
@RMartinhoFernandes rofl
 
@RMartinhoFernandes "It's only a flesh wound."
 
@DeadMG what's this language :p
 
@melak47 The one I am in the process of inventing.
 
so, when can we try it out
 
12:45 AM
when I'm finished inventing it
 
@DeadMG So we can expect version 1.0 in 10 years?
 
hopefully before that
 
I'm confident it will be finished before Dwarf Fortress.
 
eh
I'm nearly done enough to begin an implementation, I'd say
still many things to specify
 
Yeah, it looks so simple at first, but it's massive.
 
12:53 AM
curious
ICU doesn't appear to provide Unicode casing?
 
They have foldCase or something.
 
is it called ICU because that's where you end up when you use it for extended periods?
 
That actually sounds quite accurate.
 
ah
 
If you want the ctors of UnicodeString to be explicit, you need to #define some macros to explicit.
That thing sucks way more than I expected.
It's driving me nuts.
 
12:58 AM
I know
was actually considering pulling the UCD and implementing break iteration myself
 
All good things come to those who wait. I'm off :-)
 
the algorithm's not actually that complex
 
@DeadMG Unicode algorithms actually aren't that complicated in general, IMO
 
yeah
it's mostly about the fact that you'd have to pull the UCD and convert it to C++ source that's le nasty
 
Probably the hardest thing is the weird boundary cases due to the way human languages work
 
1:01 AM
@DeadMG I've been considering the same too. I'm going to finish a simple wrapper and then I'm going to tackle that crap for real. It's personal now.
 
It's too bad too many people don't actually understand how Unicode works
 
wonder if it's possible to make a Unicode rope?
 
@Insilico too many negatives...my head is hurting
 
@DeadMG I don't see why not.
@melak47 There. :-)
 
1:02 AM
@DeadMG My toy text class is template on the underlying container.
 
@Insilico thanks :p
 
The algorithms should be independent of the container.
 
yeah
I just changed all my Unicode functions to deal with ranges of Unicode codepoints, not the String class.
 
The problem with people trying to implement Unicode handling functions is that most of them probably doesn't realize all UTF formats are variable-length encodings
A character in UTF-8 might be represented by 1 to 4 bytes
A character in UTF-16 might be represented by 2 or 4 bytes
 
@Insilico 1 to 4.
 
1:06 AM
And multiple characters might encode a single glyph (think: combining characters) so UTF-32 is not even fixed-width either!
 
There are no codepoints above 10FFFF.
 
@RMartinhoFernandes Correct. I got confuzed. :-P
 
(Which makes UTF-32 extra wasteful because one byte is always 0)
 
yeah, UTF8 can be extended as far as 6 bytes maximally, but as Unicode only goes to 10FFFF, you maximally need 21 bits, which can go into 4 UTF-8 bytes.
 
Yeah, until we have computers that handle 21-bits natively. :-)
 
1:07 AM
and most of the Supplementary Planes are unallocated, IIRC.
 
Actually I think more than 90% of the Unicode code point space is unallocated
 
Very very most.
 
Is there a font that has glyphs for every single Unicode character thus far?
 
no
 
1:08 AM
Would probably be a huge font file.
 
@RMartinhoFernandes O rly?
well I guess I shouldn't be surprised that the content of my lecture was bullshit
 
It would help see if my Unicode handling functions aren't complete bullshit.
So far my UTF-8 parsing functions handles byte sequences from 1 to 6 bytes, rejects all codepoints above 0x10ffff, detects overlong sequences, detects surrogate pairs (and incomplete pairs), incomplete byte sequences (e.g. not enough continuation bytes, etc.).
Oh, and also detects BOMs in the middle of text
 
that's good stuff
 
Yeah, nice work!
 
1:11 AM
but the real question is, can it do extended grapheme cluster iteration?
 
@DeadMG Right now it just checks if the UTF-8 string isn't malformed. :-)
 
I guess someone could take all the wingdings variants and see if that are enough characters?
 
@Insilico locklakes
 
@melak47 I think Unicode already have code points for a lot of the symbols
 
1:12 AM
@Insilico aw.
 
@melak47 It's not.
 
I mean there's a Unicode character for a snowman.
 
@RMartinhoFernandes double aw.
 
☃
 
1:13 AM
and POO, PILE OF
 
lol
 
Variadic templates and perfect forwarding doesn't work when passing const char* when the interface expects std::string. Is there a workaround for this?
 
@DeadMG It annoys me that I memorized that codepoint.
 
I think there's a typo in the Unicode standard
 
1:14 AM
@StackedCrooked It should.
 
@RMartinhoFernandes lol
 
U+FE18: PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRAKCET
Yes, that is spelled "BRAKCET"
 
@StackedCrooked Perfect forwarding is not perfect, but this is not one of the imperfections.
 
@RMartinhoFernandes This. Sounds to me like you fuckled something.
 
@Insilico It annoys me that the standard is available as a PDF per chapter.
 
1:16 AM
@RMartinhoFernandes As opposed to a big single PDF?
 
Ah okay
 
It fucks with the greppability.
 
I would love to have a big PDF table of all Unicode code points.
But here's the "Brakcet":
Also, the PILE OF POO that DeadMG alluded to:
 
Yeah, we've had our fun with that one here a while ago.
 
1:18 AM
There needs to be "The Best of Unicode" list or something.
@RMartinhoFernandes Does Symbola have PILE OF POO in it?
 
Does it support the rest of Unicode 6.1?
 
AFAIK, yes.
 
Is there a way to make Symbola the "fall back" font if a text editor runs into a character it can't display with the current font?
 
@Insilico Firefox does that by default.
 
1:24 AM
Or is that something that's specific to the text editor in question?
Oh okay, so it's an application-specific thing then.
 
Yeah, I think so.
 
What's the license on the Symbola font? The included PDF doesn't mention anything about it
 
@Insilico in that case, $20 my way and it's yours to use as you see fit ;)
 
Never mind, I'm a lazy ass.
> lieu of a licence: Fonts in this site are offered free for any use; they may be opened, edited, modified, regenerated, posted, packaged and redistributed.
 
aw, shucks
 
1:29 AM
> // TODO: Add dynamic method calling after that shit's been specified, yo.
a genuine quote from the Wide Standard
 
1:40 AM
right
I pushed next version of the Wide Standard onlin
 
I'd rename Binary{Map|Set} to Tree{Map|Set}. I think binary is needlessly confusing there.
At least to me, it is.
 
noted
 
Btw, couldn't you fucking link whenever you write "See X for details"?
 
I actually have like, 99999 crosslinks to put in
 
The Android NDK docs do the same crap ("See X" without link) and it pisses me off.
 
1:45 AM
I sure don't intend to leave it that way
I just left it at the relative bottom of the prio list
I think there's only like, 1 place where I specifically referred to another page for details, though
 
> An implementation is only obliged to be able to perform this conversion for all UTF but must reject other encodings.
I think this is overly restrictive.
Any encoding can be converted to a UTF.
 
I think it is misleading
 
Only the reverse is not true.
 
having read it
what I meant is that implementations should not perform a best fit or approximation to some other encoding
either it's a lossless perfect translation, or error.
which page has that in it?
 
Specification/Libraries/Text/string
 
1:50 AM
cheers
 
@RMartinhoFernandes what, no link? :P
 
@melak47 I suppose he wants to access his local copy. I can't link to that.
 
@melak47 That's more than specific enough.
 
Oh, wait, you mean you want to see it?
 
@RMartinhoFernandes I just pushed, so right now, they're identical.
 
1:51 AM
@melak47 wide-language.com It's not secret, I think.
 
@RMartinhoFernandes I was just thinking, you know, with you complaining about the articles not cross linking...:p
 
@RMartinhoFernandes Wouldn't have it in public hosting if it was
 
> The Standard regular expression facilities are intended to enable construction of the function at compile-time. Thus, all regular expressions are of undefined type.
Should I infer from this that the regex bits don't allow the building of regexes dynamically?
 
not right now
I actually do intend to specify that at some point in the future
 
That's a niche use, but still useful.
@DeadMG Ah, ok.
 
1:54 AM
> An implementation is only obliged to be able to perform this conversion for all UTF but must reject other encodings which it cannot convert losslessly.
improvement?
 
Hey look it's Alan Turing's 100th birthday today.
 
that poor guy
still can't believe that homosexuality was illegal after WW2
and that they would castrate such a useful, let alone undeserving, person
 
Regexes need a facility to match single codepoints, or codepoint ranges, I think.
 
when you pass a string, there's nothing saying it cannot be only one codepoint.
 
1:57 AM
So you can, for example, find all accented As.
 
nothing wrong with Standard.Text.Regex("á").Many(begin := 0) for that
 
@RMartinhoFernandes What if I want to search for a glyph made up of one or more combining characters?
I think you want to search via substrings, no?
Well, the string has to be normalized first, I think
 
@DeadMG No, not what I mean. I mean a regex that finds both á and à and other forms.
By saying something like: "a followed by a combining accent"
 
@RMartinhoFernandes So you want a regex that searches only on the basis of the base character?
 
Hmm, I guess.
 

« first day (616 days earlier)      last day (4346 days later) »