« first day (865 days earlier)      last day (4098 days later) » 

11:00 AM
@thecoshman Yeah, that's what the indices trick is all about.
 
@R.MartinhoFernandes now... let's just start over... what is this indices trick you speak of?
 
@Xeo Now build the pack and post it!
 
Xeo
@R.MartinhoFernandes Yeah, still thinking what would be the nicest way to do that.
Nicest, as in, cleanest interface for the end-user.
 
@thecoshman Basically, you build a compile-time list of integers somehow (in the example I hardcoded it, but it could be generated with some TMP), and use that as argument in a variadic template function.
Most useful for "iterating" tuples. Kinda like static for. Without the for.
 
Xeo
Or arrays or argument packs
 
11:03 AM
@R.MartinhoFernandes yeah... I now most of what you are on about... I've done very little with variadic templates...
oh yeah, I see what you are up to with all that TMW
 
Though, again, for generating compile-time tables, I prefer actual codegen these days.
 
as in just just have the code there for it? rather then try to let the compiler generate the code via templates?
 
Xeo
Let external tools generate the code.
 
@thecoshman Generate it with an external script/whatever
 
yeah I worked that bit out :P
well, I assume you have the output from the codegen saved, or do you do some build time black magik to generate it then?
 
11:09 AM
For ogonek I run the generators manually.
 
in a string, is checking for char* p == '\0' the same as doing char* p == 0 ?
 
yeah, I think that makes more sense
 
Currently I don't keep the UCD in the repo, but I've been considering it, since it won't change that often.
 
@TonyTheLion a string is not a char* :P
 
whatever
 
11:10 AM
@R.MartinhoFernandes I think it makes sense to store it, it is part of the code base... then maybe have a script the triggers generating the rest of it, rather then store the output
 
Xeo
@TonyTheLion No
 
// Have reached the end of the line?
		if (	Character == 0
			||	Character == '\n'
			||	Character == '\r')
then this is wrong? where Character is char
 
Xeo
Err, no dereferencing?
 
@thecoshman No, I don't think there's a point in storing the original data. It's publicly available in the official site. I was talking about storing the output.
 
why is the \ in front of a zero termination char?
 
11:13 AM
@R.MartinhoFernandes well, you have to store one of the other don't you?
@TonyTheLion it signifies 'null' rather then '0'... it could be anything in theory
 
@TonyTheLion '\0' is more correct, I think, as that is a character, whereas 0 is a literal.
 
God dammit, PHP room
 
@thecoshman I believe that both C and C++ guarantee that 0 is '\0'.
 
@thecoshman I'm not storing any right now.
 
I just closed my browser tab for that room
 
11:14 AM
but 0 is just unnecessarily confusing- it's of the wrong type.
 
@R.MartinhoFernandes tut tut
 
@BoltClock Hey, you're back.
 
@DeadMG do they... seems... wrong to me
 
are we going to get to keep a moderator as a pet.
7
@thecoshman Nah, it's more right than normal- wtb 2's complement, 8bit byte, and IEEE754 support :(
 
The thing is, I was thinking of keeping ogonek versions separate from Unicode versions, but I am not so sure that's a great idea.
 
11:15 AM
I am a stray in need of a home
 
New versions can change both data and algorithms.
It makes no sense to use new algorithms with old data or vice-versa.
 
@BoltClock Here, I'll make you a kennel
 
in PHP, 10 secs ago, by thecoshman
What ever you are doing, please stop it. You are upsetting our pet mod!
 
@DeadMG but checking against \0 or 0 is essentially the same?
 
@TonyTheLion Basically, yes.
 
11:16 AM
ok
 
@TonyTheLion but not semantically
 
the real question is, "Why are you dealing with shitty NULL-terminated strings in C++?".
@thecoshman The Standard defines them to be the same, so...
the only difference is that 0 is unnecessarily confusing.
 
@DeadMG static_assert(std::numeric_limits<double>::is_iec559, "Fuck off");
 
good lord, php room is an angsty place
 
@R.MartinhoFernandes lol
 
11:17 AM
@thecoshman It is
 
Well, actually, old algorithms can sometimes work with new data, since some properties are guaranteed stable.
 
@R.MartinhoFernandes Ha ha, Jon Skeet has his hand hand up @Tony's arse :)
 
But the reverse never makes sense, I think.
 
so apparently adding a default constructor to my code that inits all members to a default value, changed the behaviour of my program
fuck UB
 
So yeah, fuck it, I'm sticking the UCD in the repo. It will also shorten the setup instructions considerably.
 
11:18 AM
@FredOverflow What?
I didn't read that article
 
@TonyTheLion You should. It's good.
 
@R.MartinhoFernandes which is a very good thing
 
I'm not a pony
I'm a lion
 
I was surprised. You would think that any room where the occupants struggle to take 20% of a value would not have enough fire for a decent flame up.
 
11:19 AM
He actually used a pony sockpuppet in the talk.
 
@TonyTheLion Maybe you should rename yourself to "Brian the Lion"?
 
@TonyTheLion that is a lion, a lion with a comb over
 
Tony the Pony was later featured in The Regex Answer
 
lol! php room can't handle me, see
 
11:20 AM
@R.MartinhoFernandes I remember there being a video of this... is it linked in his blog?
 
> ALL IS LOŚ͖̩͇̗̪̏̈́T ALL I​S LOST the pon̷y he comes he c̶̮omes he comes the ich​or permeates all MY FACE MY FACE ᵒh god no NO NOO̼O​O NΘ stop the an​*̶͑̾̾​̅ͫ͏̙̤g͇̫͛͆̾ͫ̑͆l͖͉̗̩̳̟̍ͫͥͨe̠̅s ͎a̧͈͖r̽̾̈́͒͑e n​ot rè̑ͧ̌aͨl̘̝̙̃ͤ͂̾̆ ZA̡͊͠͝LGΌ ISͮ̂҉̯͈͕̹̘̱ TO͇̹̺ͅƝ̴ȳ̳ TH̘Ë͖́̉ ͠P̯͍̭O̚​N̐Y̡ H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ
3
@BoltClock Yes.
 
That's probably where I found the video then
@thecoshman That's kind of like what casperOne does to long C++ comment threads
Or angsty threads in general
 
@BoltClock ah well, a lot of them do turn into pointless back and forths
 
@R.MartinhoFernandes Why is the accent on the s and not on the e here?
 
@FredOverflow Jon explains it in the post: he messed up :)
> Combining characters always follow their base
@FredOverflow Should have been ideone.com/ER37Nc
 
11:30 AM
robot
 
The regex answer at stackoverflow.com/questions/1732348/… is interesting.
 
does that mean I need to offer a Unicode reverse() algorithm in my proposal?
 
It could serve as a benchmark/test for Unicode rendering engines.
I have just tried in IE10, Chrome 25 and Firefox 19 and each renders it differently.
 
man
I woke up ten million years too soon today
 
@DeadMG Dunno. I'm not really sure how useful that is. I am planning to simply leave that to bidirectional grapheme cluster iterators.
 
11:32 AM
yeah, there is that
 
@FredOverflow How do you reverse a string in Java?
 
ICU
 
Also, ew Java does not have code point escapes in strings.
 
@R.MartinhoFernandes ideone.com/aNG31D
IIRC, reverse has special support for surrogate pairs, but nothing else.
 
@FredOverflow Yeah, seems so ideone.com/PfGSUc
 
meh, some of my code never gets executed, and that is why it doesn't work
 
gets
 
fucking cocksucking piece of crap
 
Btw...
70
A: Best way to reverse a string

PeteTpublic static string Reverse( string s ) { char[] charArray = s.ToCharArray(); Array.Reverse( charArray ); return new string( charArray ); } I think the above works not tested, although the stringbuilder class may also have a reverse function I haven't checked that though.

Needs more downvotes.
 
user1357851
best way to revert a string is using stack
 
11:40 AM
Argh, enough downvotes on that question.
@Telkitty Not in .NET.
Not in Java.
More often that not, also not in C++.
 
oh, robot
enlighten me with more of your gripes about iterators
 
@R.MartinhoFernandes what's wrong with it?
 
@TonyTheLion See Jon's post I linked. It even has the exact same example.
(The data in that slide is wrong, because Jon messed up, but the problem does exist, it just produces a different wrong result; see Fred's ideone link ideone.com/aNG31D)
 
3
A: Best way to reverse a string

richardtallentOk, in the interest of "don't repeat yourself," I offer the following solution: public string Reverse(string text) { return Microsoft.VisualBasic.Strings.StrReverse(text); } My understanding is that this implementation, available by default in VB.NET, properly handles Unicode characters.

^ Looks good. but i dunno
 
@Cheersandhth.-Alf Yeah, I upvoted that one.
 
11:47 AM
@R.MartinhoFernandes I'm not sure what the pony talk is about.
 
ponies
obviously
 
@LucDanton Just the general mismatch between reality and its realisation in code.
 
user1357851
Are more people here on twitter than linkedin?
 
I'm not on twitter
because fuck birds
 
@R.MartinhoFernandes Jon messed up?!?!?!?
 
user1357851
11:50 AM
don't you just want to squeeze the little fluffies a lot? ;)
 
@TonyTheLion wouldn't that be a reason for you to join?
 
@BoltClock Yes, he put the combining accent before the e, when it should be after. Apparently by default WinForms rendering renders the accent on the e, even though Jon unknowingly put it on the s, so he did not notice.
 
@thecoshman it's a bad pun
 
@R.MartinhoFernandes Ah
 
11:51 AM
@TonyTheLion oh look at you, knowing what a pun is
 
I deleted my LinkedIn and Facebook accounts. Close to deleting Twitter too but eh.
 
@Telkitty why do you keep removing what you say?
 
user1357851
Last time I checked there is no such thing as an anti-social entrepreneur :p
 
user1357851
@TonyTheLion I am paranoid sometimes
 
meh
you'll get over it eventually
 
user1357851
11:55 AM
I had 'exciting' experience of people posting pictures/songs I have posted 10 years ago or strangers making remarks on the phone while giggling because I think they read what I said on public forum/chatrooms like this.
 
I hate solaris
it's so similar, yet so broken
@R.MartinhoFernandes huh... so not only are you a TMW but a UW too
 
hmmm
if I have a concurrent_memory_arena, and construct a single concurrent_arena_allocator from it, should it be safe to call that one allocator from multiple threads?
wait,of course it is
 
user142019
I'm using std::unique_ptr with a file descriptor and a custom deleter but I get an error because the implementation of std::unique_ptr tries to compare an int to an std::nullptr_t. I wrote a custom deleter with a pointer member so it should work right?
 
user142019
struct epoll_delete {
    using pointer = int;
    void operator()(int fd);
};
 
12:04 PM
scrub.
you have to write a wrapper struct that can handle comparisons, constructions, etc, from nullptr.
you can't just using pointer = int; because int is not nullable and does not offer indirect access.
 
user142019
Ohh I see.
 
0
A: Best way to reverse a string

R. Martinho FernandesHere a solution that properly reverses the string "Les Mise\u0301rables" as "selbare\u301siM seL". This should render just like selbarésiM seL, not selbaŕesiM seL, as would the result of most implementations based on code units (Array.Reverse, etc) or even code points (Array.Reverse with special...

3
 
that's just the beginning of what I used
there's still some stuff missing, like wrapper-to-wrapper comparisons and whatnot.
huh
you have to apply to be able to read SG8's group
 
user142019
Thanks.
 
user1357851
12:24 PM
You lot aren't terribly efficient are you - still on tabs and string reverting :p
 
user1357851
after previous 182 days of 'intensive discussions'
 
@R.MartinhoFernandes my god that API is primitive … returning a bare IEnumerator rather than an IEnumerable
 
user1357851
@TonyTheLion what a sexy kitty! Not
 
@KonradRudolph It's from 1.0!
It's been there since ever.
@Telkitty As you should have learned, reverting text is not trivial. Actually, you should learn that pretty much nothing related to text is trivial.
 
user1357851
12:43 PM
@R.MartinhoFernandes I assume the burden with string manipulation lies with C, not C++
 
@Telkitty You assume wrong.
 
user1357851
@R.MartinhoFernandes Are you sure you are not just reinventing the wheel?
 
Which wheel?
Neither C nor C++ have the tools for this. (It's in ICU, not the C nor C++ libraries)
 
user1357851
rStr = string ( rStr .rbegin(), rStr .rend() );
 
@Telkitty Right. Congratulations on being wrong.
Have you read anything about the entire discussion?
 
12:49 PM
You suck.
 
Hello room
 
@Telkitty You reverse a string once :)
Ah. I see people have been telling you already
 
user1357851
I did the stack way once, should have that version floating somewhere on my server
 
user1357851
Are they putting up an official C++ library?
 
user1357851
for strings?
 
12:53 PM
@Telkitty Still failure.
 
user142019
I like the Visual Basic answer. :)
 
Look, I'll even do it with the precomposed character, no combining marks involved: ideone.com/Xdy4SQ
 
@BartekBanachewicz Well that was hardly a secret. Where did you spot it this time? github? alioth? etc.?
 
@Zoidberg It works, at least to the point that it does not corrupt a string with bananas in it, unlike most all other answers.
2
 
I remember QBasic...
 
12:55 PM
@Telkitty (If you are wondering why there is no output, the reason is that the result is corrupted)
 
my old romance
 
Me too. I remember GW Basic, TurboBasic, PowerBasic (and Amiga Basic - on paper only, I didn't have a PC)
 
user142019
I wonder whether I can make another thread switch context using Boost.Context.
 
@R.MartinhoFernandes Useful stufff
 
user142019
But that would probably break system calls.
 
12:56 PM
@sehe Thats awful... I couldn't live without my PC
 
Dammit, I messed up all the replies.
 
user142019
lol
 
@RolandSams Meh. That was pretty standard in 1985 :) Also, I think you might mean "the internet" where you said "my PC"
 
There's a big difference between getting weird output (i.e. accent on the "r"), and getting corrupted data.
 
The internet too
 
12:57 PM
Poor kids :)
 
Up all night programming... <yawn>
I have a hot tub appointment at noon
X)
 
Poor kids :)
 

« first day (865 days earlier)      last day (4098 days later) »