« first day (776 days earlier)      last day (4171 days later) » 

9:00 PM
1) the extracted character or Traits::eof()
Is that what you were asking?
 
@Borgleader oh there it is
 
@jalf Way back when, programs were stored on decks of IBM cards ("Hollerith cards"), one line of code per card. If they got dropped, mixed up, etc., somebody had to sort them back into the intended order (by the strangest coincidence, every card I ever used/saw included a line number).
 
@Borgleader Breaking text into pieces. Grapheme clusters are an approximation of "user-perceived characters". The algorithms I have not implemented yet are those that break text into words, sentences, and lines.
 
@JerryCoffin ah, but then it's nothing to do with Fortran specifically
I was wondering if that was some obscure language "feature"
 
user image
2
lol
duck you couldn't moo on that bus
 
9:03 PM
@TonyTheLion I wonder where you take all these pictures
 
@jalf No, theoretically not specific to Fortran, but about the only alternatives at the time were Cobol and various assembly languages. Of those, Fortran is definitely the one I remember best.
 
I found this thing U+262B FARSI SYMBOL. It is not Farsi. It is not a symbol. It is the emblem of the goverment of the Islamic Republic of Iran. No one knows how it got into Unicode 1.0.
3
 
@R.MartinhoFernandes I smell a conspiracy :o
 
@sehe don't wonder.
oh, anyone up for Mumbling?
 
Okay. Stopped now.
 
9:05 PM
good :)
 
Mumbling?
Like, with the voice client Mumble?
 
Hm. I never installed it. I should probably get to that...
 
I'm on mumble now. FYI
 
@R.MartinhoFernandes Lots of peculiar symbols in Unicode. Nothing remarkable.
 
9:07 PM
@TonyTheLion Oh hey. I don't even have the mumble client handy as I'm currently win-bound
 
@R.MartinhoFernandes I forget, are you running on Unix on Windows.
 
(and I'm not about to meddle with setups just for mumble)
 
@sehe hahah
lol
 
@Borgleader Windows.
@jalf And in 2005 it was removed from some Iranian national standard for not being a character.
 
@sehe Did you like Rig windows or something and it's hard to use Setups?
 
9:09 PM
@Borgleader Why?
 
@ThePhD No. I did like, boot windows and that took all of my energy :)
 
@R.MartinhoFernandes Just wondering if it would compile "easily" in VS.
 
@Borgleader No. Full of template aliases
 
@sehe Haha, yeah. Though, funnily enough, when I had Fedora it took longer to boot than Windows.
 
@Borgleader Piece of cake. It will be done a lot faster too. And the binary has zarroo bugs!
 
9:10 PM
@DeadMG Srsly? Oh damnit...
 
@ThePhD You're doing it wrong
 
@Borgleader Template aliases <3
I use GCC.
 
@Borgleader Mingw does them nicely. Well, unless you push it. It's fairly to ICE 4.8 or to make it print "confused due to previous errors" (without any previous warnings/errors shown). /cc @R.MartinhoFernandes
 
@sehe Probably... but I was demanding that at boottime it linked a bunch of internal harddrives to similar locations, and map NTFS drives to directories just under root, so I could keep most project paths the same.
Which probably explains all the slowness.
 
I don't want to install MinGW on Windows. I might go for gcc. Or just try it in my VM.
 
9:11 PM
@ThePhD Nah. I don't see why. Except for crummy init scripts
@Borgleader Heh. It's the first thing that goes on!
 
There's no other GCC provider for Windows other than MinGW?
 
@sehe I am using a stable release now. I only used trunk builds when I was messing primarily on wheels.
 
... Huh. I never thought about that. I can use the MinGW Compiler with Windows SDK?
 
@Borgleader MinGW is gcc. With the minimum added tools. It's the Min imum GNU on Windows.
@ThePhD There's Cygwin.
 
Arrgggghh.
My MinGW script never works. :c
 
9:14 PM
MinGW indeed is minimal
 
@Cheersandhth.-Alf Minimalist
 
Also, there's a very old g++ (and gcc) in Microsoft's Unix layer thing, I forget its name.
@sehe yeah thx
 
@R.MartinhoFernandes Oh I thought MinGW was a dumbed down gcc.
 
@Cheersandhth.-Alf Unix Services, IIRC
 
u guise'
 
9:16 PM
@R.MartinhoFernandes Is there a better download source? It's doing ~1-5kB/s (oh, back at 20Kb/s now)
@Crowz No I'm unveiled
 
@sehe That's on your end.
 
@R.MartinhoFernandes Dam. Must be pretty bad congestion somehow. Mm. Doing speedtest
 
@Borgleader Nah. It just does not bring a full-blown POSIX environment (i.e. greps and seds and shit).
 
9:19 PM
@R.MartinhoFernandes I actually miss sed.
 
@Crowz Is that a play on TF2?
 
Yeah
 
@ThePhD Meh, I use vim.
 
I can't get the hang of vim.
It confuses the bejesus out of me.
 
I like vim the best because it's simplistic.
 
9:20 PM
Despite working with terminal for a while, I can't figure out what all these ^C symbols are supposed to mean.
 
All you really need to know is arrow keys, :line number, :wq, and i
 
@ThePhD ^X means Ctrl+X.
 
@Crowz and escape :)
 
lol, arrow keys
ZZ > :wq, btw.
 
The only thing I don't like is copy and paste can be a bit screwy
 
9:22 PM
@Crowz and G, $, ^, /, o, d, dd, p, e, :e!, a...
 
@netcoder Well someone is pro.
 
@netcoder . is the bestest.
 
@ThePhD You can get native Win32 ports of a fair number of the Unix utilities (including sed) from: unxutils.sourceforge.net
 
@JerryCoffin Thanks.
 
@R.MartinhoFernandes agree, . and n are crazy useful
 
9:24 PM
@JerryCoffin Ooh, shiny.
 
well, it's officially the weekend
have a good one all
time to GTFOH
 
@netcoder Later.
 
Can someone post the weird squiggly symbol used to quote the standard? :)
 
@LuchianGrigore §?
AltGr+4 on some layouts. Shift+3 on German.
 
thank you
 
9:27 PM
@LuchianGrigore § (Hold the Alt key, then 0167 on the num pad on Windows).
 
that worked
 
Of course, English layouts don't have it anywhere handy.
 
doubt I'll remember it though
 
@R.MartinhoFernandes yup. *, n, ., ;, ,, f_?_, %, viB, surround.vim
And ex mode: :g//, , :%norm A + then :%j, :g/^{/+1,/^}>> stuff like that
 
@LuchianGrigore 'bout the only one like that I do remember.
 
9:28 PM
Depends on windows version/regional options? `º` here
Ah wait. Leading zero: §
 
§
 
@LuchianGrigore You can also copy paste it from Wikipedia. Search for "section symbol".
 
Damn. I'm confirmed American. :c
 
@sehe No, it does not depend on that.
 
Oh, then nevermind.
 
9:29 PM
/ÇšEÝ
haha
 
The hell is that.
THat's not even a single character.
 
No shit
 
Tell me you didn't do this the first time you realised you can do Alt+0... :D
 
9:30 PM
Ah. I understand now. I though that was his ALT + 0167. I was like WTTFFFFF.
 
Xeo
Robot, got the .a?
 
Alt+nnn gives you a character from CP437. Alt+0nnn gives you a character from CP1252. If you add a certain key to the registry, you can use Alt+ <num+>xxxx (where x is an hex digit) to get Unicode characters.
 
Xeo
3 votes till my first gold answer badge x_x
 
@Xeo Yes.
@Xeo Amateur.
 
Xeo
9:34 PM
Tch.
 
FWIW, Alt+0423, and Alt+0679 also yield §.
 
@R.MartinhoFernandes I heard you're a Unicode expert.
 
Yeah, I finally know all the rules for this Windows crap. :P
 
@Xeo, Ok, that's funny but not your best answer
 
@R.MartinhoFernandes Anyways, that 4.7.2 build is printing precisely the same messages as my 4.8 build. No workey. It's probably my own wonky code, in part, but still, it ought to have a syntax error in store in such cases
 
9:35 PM
@EtiennedeMartel See my chat profile description.
 
1
Q: interesting issue operator overloadin c++

André HincuI am trying to play a little bit with operator overloading and genericity in C++ and I seem to have 3 little errors when I try to compile. Have a class named Grandeur with template D, and then I inherit 3 classes from this one, named Temps(time), Longueur(size), Vitesse(speed), and I am trying to...

Ho ho ho wheres @Cicada
 
@R.MartinhoFernandes Aww, you're killing the gag.
@Borgleader Eh ben.
 
@Borgleader or etienne, kbok, any number of 'them' here
 
@sehe Oh well. :/
 
I just improved the wiki of "template templates"
see ^^
 
9:38 PM
what an ugly tag name. (I understand the interest of brevity there)
 
@JohannesSchaub-litb I've never even heard of that term. lol
 
@Mysticial :)
 
@Mysticial Never heard anyone mention VVTTs?
 
@R.MartinhoFernandes wtf is that?
 
Jan 3 at 18:45, by Xeo
Variadic variadic template template parameter
No joke. That thing exists.
 
9:39 PM
oh geez...
 
yes
but I don't lik ewhen they say "variadic variadic template templates"
there is no template template lol
 
I'm going back to Java...
5
 
@Mysticial First line here ideone.com/0JOwW
@Mysticial lol
 
WTF<X,Y,Z> wtf; How appropriate...
 
@R.MartinhoFernandes dafuq is that?
 
9:41 PM
@LuchianGrigore VVTT.
 
I don't want to know actually.
 
Oh look... Even Luchian speaks up...
 
@JohannesSchaub-litb That reminds me of a question I've had for some time: most of the time you end up with things like "container of T", where we specify one container type (e.g., vector) and the type it contains can be whatever. Is there an easy way to do the opposite: specify that I want a parameter that can be any container type, as long as it's a container of (say) char?
 
@Mysticial how the hell did that get starred?
 
9:42 PM
actually, webkit'S "tools" library is stored in a wtf/ directory
 
@LuchianGrigore Because of context, obviously.
 
so there happens to be a wtf/NullPtr.h or something that throws a warning on every damn webkit file saying "WARNING: nullptr will be a keyword in c++11"
oh my god, i stopped compiling Qt after waiting 2 hours
and disabled building webkit xd
@JerryCoffin what about template<template<typename ...T> class C> using CharContainer = C<char>;
you can then say CharContainer<std::vector>
 
@JerryCoffin I'd use something in the spirit of template<typename Container, Requires<is_convertible_to<ValueType<Container>, char>>...>. Can use std::is_same if you really, really want char and nothing else. Can also be EnableIf depending on what is going on. There is a lack of concepts for containers though.
(Actually my Requires thingy only works with concepts and not arbitrary metafunctions, I need to rethink that.)
 
@JohannesSchaub-litb I'm not sure. The idea here is a template that receives a parameter, which can be any sort of container, as long as it's a container of char (or unsigned char).
 
can you make a usage example plz?
i cannot understand what you mean
ah you want SFINAE?
not sure but I think it's not too easy to write a "is_container" type trait
it will need to query all the typedefs..
 
9:49 PM
^ how I feel when things get technical
 
@JohannesSchaub-litb It came up when I was writing a cryptographic hash. I want the hash function to receive essentially anything, as long as what I get out of that something is char (or unsigned char). I'd be fine with iterators as well, but again, need to ensure that *it is a [unsigned] char.
 
Sounds like you want a range (or a pair of iterators, as you noted), not a container. But it's the same idea.
 
@JerryCoffin I did that in places with ogonek. I take a pair of iterators or a range (according to boost's concept) and static_assert that the value_type is what I want.
 
@LucDanton Right -- I'm fine with any of the above, really. A range is probably the ideal, but given that (current) C++ doesn't have ranges, I'm happy to settle for iterators or containers.
 
@JerryCoffin you can check type of *std::begin( c )
 
9:53 PM
@JerryCoffin iterators?
 
If you want soft errors, SFINAE on some std::is_convertible and value_type computation. If you want hard errors, you can static_assert on the same -- but it doesn't appear in the declaration. I know it is possible to have self-documenting code that hard errors (see the Requires bit) that doesn't look too bad (unlike the macro-based solution of Boost.Concepts), but atm the hard error looks really, really iffy. I haven't investigated if it is possible to improve that aspect.
 
like modulo memory erors std::is_same_type< decltype( *std::begin( c ) ), char >::value
 
@R.MartinhoFernandes Yeah -- that's pretty much what I have now. I was just wondering if there was a way I'd missed to specify something like that more or less directly as the type of a parameter, but it sounds like the consensus on that is "no".
 
Supposedly someone (Eric Niebler?) found a way to produce nicer errors but I don't really know if it's only for soft errors or not. Haven't tried it myself.
 
it would of course be simpler to answer with a concrete example
i can't see any reason why it should be difficult
 
9:56 PM
@JerryCoffin You could take any_iterator<char>! </joke>
Anyone here knows if the current range proposal(s?) follow Boost.Range?
 
@Cheersandhth.-Alf The concrete example (sans static_assert) is on codeReview. I'd like to parameterize it so it can take any iterator/range/container, as long as what I get from there is a sequence of chars.
 
@JerryCoffin What should happen if something else is passed?
 
@LucDanton Well, if it was signed char or unsigned char, that would be fine. If it's anything larger, it'll produce bad results.
 
I don't think that's an answer to my question. I meant what do you want in the contract of your interface?
 
@JerryCoffin but, well you don't have any templates and arguments of operators/functions are not char?
 
10:01 PM
It wouldn't be a major problem to make it work with, say, uint32_t either, but given the nature of the hashing it does, the code needs to be specific to the size of the type it's accepting.
 
are we talking about
std::vector<uint32_t> operator()(std::string const &input);
changing that to e.g. take a pair of iterators?
 
@Cheersandhth.-Alf Yes -- right now it just uses overloading to accept only strings or streams. I've written a template version that accepts iterators, but it's ugly as sin and I'm uncertain enough about my use of static_assert that I'm not at all sure it even works correctly.
 
lemme code it up, but i gotta pee first
 
static_assert( std::is_same<typename std::iterator_traits<Iter>::value_type, char>::value, "Hi" );
Beyond the ugly syntax the essential functionality here is assert( value_type(Iter) == char );.
 
@LucDanton Hm...what is the "Hi" doing there? Just providing a pointer to char?
 
10:09 PM
No it's the error hint the compiler is supposed to give when the static_assert is triggered.
 
@LucDanton Oh, okay. I couldn't quite figure out how that fit with the rest...
 
@LucDanton Thank you -- doing a bit of coding and testing now.
 
8
A: double? = double? + double?

Jeff Franks I don't always use nullable double But when I do, I wait until it is referenced to check the value in x64

 
does the stdlib have a function for calculating Probability Density Functions or similar? Also does it have a way to pick a random number based off of probabilities in a table?
 
10:21 PM
this answer sucks
 
@MooingDuck Chimera asked this question about 4 months ago.
Or something similar
 
@MooingDuck No for the first question. Let me check for the second one.
 
I think the second one would be a uniform distribution?
 
I need to figure out in my head exactly what it is I need to do
 
@Rapptz I want to fill a table with probabilities, and have an RNG pick an index based based on the probability associated with each index. Has nothing to do with an RNG. It's fairly trivial to implement in terms of a linear RNG actually, just wondering if the std has it built in.
@R.MartinhoFernandes excellent
now I have to figure out how to calculate that table
 
@MooingDuck, that's a multinomial distribution
 
@JohanLundberg looks like it
 
I wrote an answer about that way back.. hmm
it easy
 
@JohanLundberg Isn't that about the probability of repeated experiments?
 
10:28 PM
4
A: Fixed Proportionate Selection

Johan LundbergWhat you describe is a multinomial process. http://en.wikipedia.org/wiki/Multinomial_distribution#Sampling_from_a_multinomial_distribution They way to generate such random process is like this: ( I'll use pseudo code but it should be easy to make it in to real code. ) Sort the 'boxes' in rev...

if you have say 7 cases
 
hm this was curious
 
each with probability p[i]
p summing to 1
 
here code what on Earth am i Doing Wrong?
template< class Iter >
auto write( Iter const i0, Iter const iN )
    //-> typename enable_if< std::is_same< decltype( i0 ), char >::value, void >::type
    -> void
{
    cout << typeid( decltype( *i0 ) ).name() << endl;
    cout << is_same< remove_cv< decltype( *i0 ) >::type, char >::value << endl;
    for( auto it = i0;  it != iN;  ++it )
    {
        cout << *it;
    }
}
 
then picking one of them based on that is multinomial
 
^ The second cout produces "0" (i.e. false)
 
10:30 PM
@R.MartinhoFernandes No...
 
Type of *it is reference, not value_type, so it is char& or char const&.
I recommend traits over decltype.
 
oh, remove_reference or something!
 
@JohanLundberg Well, a binomial distribution is.
 
@LucDanton well, i don't agree. with traits the client programmer has to do extra work. it is better to centralize the extra work (be lenient in what one accepts, strict in output)
 
10:32 PM
....well what do you mean? A multinomial is what I said..
 
Wikipedia says a multinomial distribution is a generalization of a binomial distribution.
 
Um, I don't recommend writing traits, I recommend using them.
28 mins ago, by Luc Danton
static_assert( std::is_same<typename std::iterator_traits<Iter>::value_type, char>::value, "Hi" );
 
yes
true
like a coin for example, binomial with both p = 0.5
 
I once wrote a utility class you could use like overload_set<void(int), void(long), void(char), void(int*)>()('a') and which would output [void(char), void(int), void(long)][void(int*)]. That is, first list the accepting functions in order of priority, and then the non-accepted functions (that could either not accept the argument by themselfs, or were ambiguous with the other overloads still in the set). — Johannes Schaub - litb 1 min ago
xD
 
I have that! Sort of.
 
10:35 PM
it actually worked with perfect forwarding in c++03
by abusing surrogate call candidates xD
recursively inheriting a class that has operator typename replace_return_type_by<ThisFnType, identity<ThisFnType> >::type *();,
all those angle brackets ><
 
i don't understand what i'm doing wrong: expression that yields 1 in body of function is apparently yielding 0 in -> type spec
 
If I want to estimate rolling N D-sided dice and keeping the highest K (for large N), what should be my approach? If N==K, I can use a normal distribution, but that K thing screws it up big time.
 
@Cheersandhth.-Alf At least you're not going extra work :/
 
> I had a crush on a prof so I found his thesis online and fapped to it
oh reddit, reddit, reddit
 
10:49 PM
oh lol
 
@Cheersandhth.-Alf weird
 
indeed. it is probably just a STUPID error due to late in day/night for me. still!
 
Hi all
 
news: it compiles fine with g++, it's only visual c++ that won't have it
[D:\dev\test]
> cl foo.cpp
foo.cpp
foo.cpp(23) : error C2039: 'type' : is not a member of 'std::enable_if<_Test,_Ty>'
        with
        [
            _Test=false,
            _Ty=void
        ]
foo.cpp(41) : error C3646: 'type' : unknown override specifier

[D:\dev\test]
> _
 
@Cheersandhth.-Alf , hi dude
 
10:53 PM
hi
?
 
how you doing?
 
oh, this is the lounge
 
Hurray. I’ve got a race condition with one thread.
What.
 
Where has daknok been?
 
He died.
His ghost is tweeting in loving memory
 
10:57 PM
isn't daknok professor lobster or something?
4
 
Sounds like he's stuck in a infinite loop.
 

« first day (776 days earlier)      last day (4171 days later) »