« first day (785 days earlier)      last day (4177 days later) » 

2:00 PM
That seems unfair.
 
You need luck, mostly. A friend of mine bought an old iPod from the UK for €60. Paid €40 import tax.
I ordered a bunch of small accessories and never paid customs a dime. Once I got a package with a customs slip marking it as "commercial sample".
They do that for a reason.
 
IMO the cost should be fixed beforehand. They could charge a standard fee of $5 for everyone instead of $20 for some unlucky ones.
 
Ahahaha that would require the system to not be completely retarded
 
But I know nothing about trade, so I'm basically talking out of my ass.
 
We can't have that
 
2:04 PM
Talking out of my ass? Or the system being not retarded?
 
On what?
 
It's impossible to fix the cost beforehand. That would require cooperation and trust between countries.
The real problem is (in the case of the UK) that they're not part of Schengen.
 
user142019
I’m writing a C++ lexer.
 
Ell
2:06 PM
Goooooood. Something something something dark side.
 
quick question : I know how static_assert works. Is there a similar method to block class instantiation, or should I just place a static_assert in constructor?
 
user142019
It’s already a mess.
 
szx
make ctor private?
 
@BartekBanachewicz Not implementing the constuctor, only declaring it? Or make it private like szx says.
 
@StackedCrooked My constructor is trivial, if that's what you asking
 
2:07 PM
put a static_assert(false,...) in the constructor.
then you can at least give the "user" a message.
 
Don't put a static_assert in the constructor
Make it private
The message is "it's private"
(Also your class is probably bad if you need private ctors)
 
How to make it private by only static operations?
 
By making it private
 
@CatPlusPlus It just has an int template parameter. I'd like to check if it's greater than 1.
 
If the constructor can not be called then how can you ever create an object?
 
2:09 PM
@BartekBanachewicz enable_if
 
user142019
I have trouble with lexing >> and >>=.
 
Then overlearn it like a madman.
 
@bamboon So should I place two constructor declarations wrapped in enable_ifs, one in private scope and one in public?
 
user142019
Parsec y u no work.
 
Seems like a overkill compared to placing static_assert in constructor.
 
2:11 PM
@BartekBanachewicz no, just one constructor declaration that is private.
 
@rubenvb ah, indeed. Forgot about the default one.
 
user142019
foo<bar< baz >>= qux >> how is >>= lexed there? As >> =, > >= or > > =?
 
@BartekBanachewicz Show the code and tell us what the hell are you trying to solve in the first place
@Zoidberg'-- Probably depends on more context.
Have fun implementing C++ (you will kill yourself, hth)
 
user142019
*Parse> parseTest (operator True) ">>="
TokRShiftEq
*Parse> parseTest (operator True) ">>"
parse error at (line 1, column 2):
unexpected end of input
expecting ">="
 
user142019
2:15 PM
Fuck you, Parsec.
 
@Zoidberg'-- i think it needs to be interpreted as >>=
the spec talks about "the first non-nested >> is taken as two consecutive but distinct > tokens". the ">>" is the token produced by tokenization and then splitted into two distinct tokens there.
 
user142019
That’s what I’m trying to do.
 
it does not say "the first non-nested >>= is taken as consecutive but distinct > and >= tokens" or "the first non-nested >>= is taken as consecutive but distinct >, > and = tokens"
 
holy fucknibbles
so many operator overloads to support Unicode
 
@Zoidberg'-- although i wish the spec would be clearer.
 
user142019
2:20 PM
But when I do (string ">=" >> return TokRShiftEq) <|> return TokGT, parsec tells me it expected >= when I give it >>.
 
@CatPlusPlus Nothing more than what I said. I have a template class with integer template parameter. How to allow only instantiations of classes when this parameter is greater than 1?
 
What does that template mean
 
user142019
When >> is not expected to be two tokens, it works fine. When it is, it doesn’t.
 
@CatPlusPlus it's a size of data that's being processed
 
user142019
2:21 PM
Oh wait I think I got it.
 
And that's template argument
 
argument, parameter, whatever
 
static_assert( foo >= 1, "Ohnoez" );?
 
argument should not be confused with parameter
 
user142019
No fuck now it consumes the > when it shouldn’t.
 
2:23 PM
lol at "Ohnoez"
 
so many answers would have received an upvoted more if they wouldn't have confused them
 
@JohannesSchaub-litb Yeah, it's like, not important at all
Ever
@BartekBanachewicz I mean why
 
Okey, so I wanted to put it in constructor, but "Don't put a static_assert in the constructor
Make it private"
 
@CatPlusPlus yes it is
 
No, it's not
 
2:24 PM
@BartekBanachewicz You put it at the class declaration.
 
a template parameter cannot be 0, because template<0> struct A; is not allowed
 
template<int N> class X { static_assert(N >= 1, "Fucknuggets" ); ... }
 
@BartekBanachewicz You haven't mentioned any templates at that point
 
@DeadMG thanks. All that I wanted.
 
@CatPlusPlus and the type of a non-type template parameter cannot be of a class type, but a template argument can
 
2:25 PM
@BartekBanachewicz Oh, so you thank him.
 
Gods, nobody gives a shit about formal difference between "argument" and "parameter"
It's used interchangeably and meaning depends on context
 
struct A; template<struct A a> struct B;
invalid code
 
@LucDanton FFS, I said i know how to use assert. I didn't know where to use it
 
NOBODY CARES
 
So an argument is the instance of a parameter?
 
2:26 PM
lol
 
BUT struct A {} a; template<struct A& a> struct B; B<a> x;
valid code
 
Ask for help, proceed to flip out.
 
@CatPlusPlus no it is not used interchangeably
 
here, @LucDanton
 
it's a potato
 
2:28 PM
@JohannesSchaub-litb That is easily proven wrong. Only one confused person is needed...
 
@StackedCrooked I am confused by ppl using the term wrong
 
@JohannesSchaub-litb Yes it is, god shut up argh
 
@CatPlusPlus huh
 
You need to imagine that argument sounds like "arguhand". It's the actual thing "handed" to you.
 
2:30 PM
@StackedCrooked that's a good summary/help for remembering the difference
 
It's the level of pedantry that's not useful, funny and it just makes people cringe
 
The more sleep-deprived I get...
 
@CatPlusPlus no
it is a crucially important pedantry
 
No, it's not
Nobody. cares.
 
my argument is that it is not even pedantry
(pun intended)
 
2:32 PM
I used to think that it doesn't matter whether you say template function or function template. But once I thought about it it made sense and now I tend to be on the side of the nitpickers.
 
@CatPlusPlus it sounds as though you think that your opinion means that everybody else has to follow it
 
Wiki page says Eiffel uses a special convention, such that there is such a thing as 'formal parameter' and 'actual parameter' but also 'formal argument' and 'actual argument'.
You'd have to be blind to think that not everyone use those words the same.
 
if you say "you need to reverse the list of function parameters" it is not clear whether to change "int a, float b" into "float b, int a" or "0, 1.f" into "1.f, 0"
unless you consequently use the terms correctly
 
I almost never use "parameter" and I'm never confused
 
hence ppl that in their answer mean the latter will consequently be downvoted by me if it as a consequence results in a wrong answer
 
2:34 PM
:cripes:
 
@CatPlusPlus perhaps you don't try to understand things entirely
 
be more obvious
 
Perhaps I'm not sperging about things that don't matter
 
@CatPlusPlus you have been shown that it does matter
 
2:35 PM
No.
 
these examples should be most easy to understand
 
plonk
 
If we add operator argument() to parameter then we can all be friends?
 
obviously @LucDanton is your troll friend today
unless he meant to refer to your statement rather than to mine when he said "No.". unfortunately this chat is a mess when it comes to context sensitivity
 
2:37 PM
Trolls are your friends as long as you don't feed them.
 
No. The mess is you.
 
That's surgical.
 
@CatPlusPlus i recommend making a SO question if you are still confused
 
Okay, what’s wrong with these implementations?
namespace std {
    template <typename T, size_t N>
    T* begin(T (&a)[N]) { return a; }

    template <typename T, size_t N>
    T* end(T (&a)[N]) { return a + N; }
}
clang complains “candidate template ignored: failed template argument deduction”
 
2:38 PM
Okey, here's what I was writing : pastebin.com/Tr3q3An1
 
@KonradRudolph Convolution?
 
@StackedCrooked ?
 
okay how else to do it then?
 
Is the call qualified or not?
 
2:39 PM
@Luc The call is just begin(foo) where auto foo = "Hello";
 
Try qualifying it.
 
although it just occurred to me that this is bound to fail anyway …
 
@KonradRudolph these won't accept rvalue arrays
 
@LucDanton That defeats the purpose, doesn’t it?
 
altho this should not result in type deduction
 
2:41 PM
@KonradRudolph Dunno, anyway it's for debugging.
 
@KonradRudolph "foo" is a pointer here
try auto &&foo = "Hello";
 
@JohannesSchaub-litb Yes, I just realised that :)
 
I guess returning &a[0] is not going to affect the outcome?
 
Ell
is anyone up for some minecraft?
 
I hate Apple. Compiler ICEs
 
2:42 PM
@StackedCrooked actually it can make a difference
(for begin)
begin and end have subtly different requirements on T in that implementation
 
Because the need for decay?
 
both decay :)
i mean, the one has more requirements than the other
 
a + N is already decayed before it "touches" signature.
 
but this cannot be avoided so I think it is not an error in the implementation.
but returning &a[0] in "begin" would change the requirements of "begin" on T
@StackedCrooked true
this is actually very subtle :)
 
Mm, pizza
 
2:51 PM
@JohannesSchaub-litb undefined reference to a'` ?
Ah, I see.
 
@StackedCrooked add another TU to the mix that defines it :)
 
@StackedCrooked they instantiate the template at the end of the TU so we need a second TU to demonstrate the effect
 
Ah.
@JohannesSchaub-litb Like this?
 
@StackedCrooked yeah and putting the definition of "a" in "tu.cpp" i mean, so that it links fine when WELL is defined :)
 
2:59 PM
Oops, infinite recursion.
 
same for me xd
 
user142019
Oh I got it. Parsec fails horribly when it has already consumed input, so I needed to use try.
 
I guess this is a worse crime than macros?
 
oops, need to compare with 1. fixed
lol
 
3:02 PM
You could use the else branch of the macro instead of using argc.
 
oh i see
lol
 
@JohannesSchaub-litb trying for indirect fork bomb? I wager there is no problem since ulimit should still stop allowing child processes after n processes
 
@sehe no is a derivative of a riddle
 
@sehe nproc is set to 20.
 
3:04 PM
@JohannesSchaub-litb Oh. That time of the year again?
 
@sehe But we did run into accidental infinite recursion just then.
 
@StackedCrooked Well, ulimit should prevent mishaps, right?
 
@sehe Yes, process count can't go higher than 20. So in case of a fork bomb it remains stuck at 20 until it times out.
 
@StackedCrooked Well, that's perfect, IMO
 
3:05 PM
Until what times out?
 
Denial of service is still possible though.
@CatPlusPlus The command for compiling and running the program.
Oh, that reminds me that I should fix that code that causes zombie processes.
 
@StackedCrooked i broke the website
removed permissions on "."
 
I see :P
 
It's down!
 
3:10 PM
The script that starts the webserver does a routine permisssions repair. I need to move that to the script that runs requests.
 
ohh what did i do :(
 
No worries.
 
It's very shabby atm.
 
the geordi c++ bot is run with strace to forbid such things
 
3:11 PM
Interestingly, liveworkspace.org/code/3m71yB%240 is back up, and improved!
9
 
i did the same chmod to geordi and it crashed too
 
The thing is, I don't want to forbid.
@sehe Oh no, Competition!
 
Competition is good
 
No, I want to slack.
Just kidding.
Actually lws also looks shabby enough to be a worthy competitor.
But damn it has improved.
 
ah i see
wow that liveworkspace thing has good features.
 
3:15 PM
@JohannesSchaub-litb Indeed it does.
Please don't break it?
 
I wonder if Google will be angry if I store my archives in the code repository.
 
3:28 PM
@StackedCrooked Especially the "Логин" field -.-
 
@BartekBanachewicz I was trying to make sense of those
 
@sehe Well, it seems they only do matter for registered users anyway
 
yes
they do seem to have significantly upgraded LWS
and I'm glad it's back
 
user142019
3:42 PM
My punctuation lexer is done.
 
Ell
whuut why isn't c# throwing an exception? o.O
 
user142019
Now string literals and those are terrible in C++.
 
@Ell Sorry, I can't C your problem #.
 
what isn't?
 
@Zoidberg'-- what the freaking hark is a punctuation lexer? Definition of vanity?
 
Ell
3:46 PM
@DeadMG I gave it an incorrect filename and it just appears to exit the function silently
 
@Ell Because you failed to make it try hard enough
 
user142019
@sehe it’s a lexer that lexes punctuation. You know, as part of a complete lexer.
 
Ell
I don't really do c# though
 
@Zoidberg'-- How do you modularize lexers? And how
 
@Ell Just smile and wave.
 
3:47 PM
In Soviet Mono, C# does you!
 
Weak
 
user142019
@sehe identifier <|> punctuation <|> stringLiteral <|> numberLiteral
 
user142019
The first that succeeds wins. pastebin.com/atzmFHBY
 
@Zoidberg'-- missing specifications
 
user142019
Oh.
 
3:48 PM
oh aha the link
 
user142019
Wait, I’m missing ?.
 
Ell
Does anyone have experience with xslt or whatever that xml transform thing is?
 
user142019
@Ell I do, unfortunately.
 
Ell
@Zoidberg'-- what did you use it for?
 
user142019
@Ell for transforming RSS into HTML.
 
Ell
3:51 PM
Hmm. This xml loading in .net is awefully slow :/
 
user142019
lol .NET
 
@Ell sure
@Ell only if done wrong
 
Ell
@sehe I'm recursively going through each node and adding it to a treeview :P
 
@Ell So, the reading is fine.
 
Ell
@sehe oh yeah silly me :P
 
3:54 PM
Use XDocument.LOad and be sure to fill a TreeViewModel before assigning it to the tree view
 
user142019
C++ is so ugly. "final" -> if expectFinal then TokFinal else TokIdentifier "final"
 
@Zoidberg'-- contextual keywords FTW. C# has them too.
 
user142019
IT SUCKS.
 
user142019
>> is even worse.
 
@Zoidberg'-- I wouldn't be surprised if your beloved Haskell had them
@Zoidberg'-- Surely you mean <<
 
user142019
3:56 PM
(char '>' >> if expectDoubleGT then return TokGT else ((char '>' >> return TokRShift) <|> return TokGT))
 
user142019
@sehe no, >> in C++11.
 
Oh of course, Braindamage
 
user142019
I can now lex void foo() { if (bar) { return; } std::cout << baz; }, I hope. Let’s try this shit out.
 
PIZZA
 
LOL
is that new?
 
4:10 PM
@CatPlusPlus +1 Just got mine
 
@BartekBanachewicz password according to google translate
 
4:34 PM
Sup gang.
Thoughts on this book? books.google.com.pk/books/about/…
 
Is it on the list?
 
@JosephPotts probably way too old to represent modern C++
 
No it isn't Cat.
 
Then it's bad.
 
Do you mean C++11?
 
4:36 PM
@JosephPotts yeah
 
It doesn't really matter, I can learn about C++11 later, in search for a beginners book.
I have C++ Primer (not plus) 4th edition. but I thought this book was pretty good too.
 
that one is good yeah
 
Primer?
 
yeah
 
Alrighty, thanks.
 
user142019
4:39 PM
@CatPlusPlus if it were it would’ve also been bad, only less bad.
 
Tehehehe
 
user142019
The standard says yet all implementations use '.
 
Where?
 
user142019
Character literals.
 
4:41 PM
> virtual functions and other complex topics
fail
 
Also it should be pretty obvious why.
 
user142019
:P
 
I see what you mean.
 
@DeadMG Maybe he meant "virtual functions and other, complex topics"? ;)
 
@FredOverflow she
 
4:44 PM
"The Primer really brings this large and complex language down to size"
>_>
 
C++ Primer is good
C++ Primer Plus is Bullschildt
 
I don't get why people think its bad, i thought it would be better =o.
 
it's written by Schildt, that's an excellent reason to hate it
the guy has no idea what the fuck he's doing or talking about w.r.t. C++
 
@sehe Where?
 
I've heard people saying that it focuses on C more.
 
4:46 PM
@JosephPotts Why, because of the "Plus" in the title? The books are completely unrelated.
 
Focusing on C in C++ book is definitely terrible.
 
Soooo, do you guys have like programming jobs? ;P
 
Ell
@JosephPotts Hey it's joseph again!
 
Haider.
 
Ell
we share a last name :3
 
4:51 PM
I remember ;P
 
Ell
haha
 
@DeadMG It's actually by Stephen Prata (though he's almost as bad -- just not quite as well known).
 
Ahaha.
 
@JerryCoffin Oh. Strange. So I wonder which C++ "book" was by Bullschildt?
 
4:53 PM
@JosephPotts Well, some of use program. Others have jobs. A few do both. Undoubtedly at least one who write a little code for work.
 
Ell
anyway dinner time :P
 
> I opened a random page and read a totally false statement about something as trivial as the return of main(). I opened another random page and read a misleading statement about overlapping regions for copy(). Opened another random page, and read a false statement about placement new
 
@DeadMG All too many, I'm afraid. A quick glance on Amazon shows: C++ The complete Reference, C++ Programming Cookbook, C++: A Beginner's Guide, C++ From the Ground up, Teach Yourself C++, etc.
 
> Best-selling genius Herb Schildt covers everything from keywords, syntax, and libraries, to advanced features such as overloading, inheritance, virtual functions, namespaces, templates, and RTTI—plus, a complete description of the Standard Template Library (STL).
oh lawl
 
4:56 PM
how are they advance -.-.
 
@JosephPotts The description is about as inaccurate as his books.
 
> Best-selling genius
 
He sold himself to the devil.
 
Hahahaha.
 
@CatPlusPlus Well, that part may be accurate. Anybody who can write that bad of books and still sell them must be good at something.
 
4:59 PM
And it surely takes a genius to sell so many books with crap in it.
 
> genius
 
right
 
Genius XD.
 
I'm writing my next Java assignment in Scala
Fight the system
 

« first day (785 days earlier)      last day (4177 days later) »