« first day (1113 days earlier)      last day (4061 days later) » 

14:00
the builder's Error function is called from shitloads of places, like the parser.
Xeo
Xeo
I don't see the problem even if they have the same name
as long as they're not in the same scope, it should be fine
I don't either.
but he just said that GCC rejected it.
Ell
Ell
it was just at the top of the list of many errors
@Xeo You have Wide::AST::Error, as in, an error AST node, and Wide::AST::Builder::Error, as in, the function the Builder uses when things fail.
14:02
hmm.
Xeo
Xeo
@DeadMG Yeah, that should compile without a problem.
@Xeo arch
that's a two-phase lookup difference- namely, that the code doesn't compile with two-phase lookup :P
Ell
Ell
I'm just gonna try to turn off permissive now though
@Xeo I think so too.
Xeo
Xeo
14:03
@Ell -fpermissive is unrelated to the error
it actally degrades certain errors to warnings
It puts you on Santa's naughty list. — R. Martinho Fernandes Jan 12 '12 at 23:22
hehe
Ell
Ell
maybe there is a using somewhere there shouldn't be?
@Xeo haha that's good
Xeo
Xeo
@Ell Then the error should point there, at least :/
you need to alter Wide/Semantic/Type.h to include Wide/Semantic/Analyzer.h
@Ell There isn't. I don't use using.
and you'll also need to alter Wide/Semantic/Analyzer.h to not include Type.h when _MSC_VER is not defined.
Xeo
Xeo
ew, cyclic dependencies
@Xeo No, Analyzer has no reason to include Type.
that's really a legacy include.
Xeo
Xeo
14:05
Then why include it in VC?
@Xeo Well, I'm going to guess that a previous version of the Analyzer header would not be accepted by GCC without including Type.
Ell
Ell
@DeadMG that one is already here
@Ell Hence, you'll need to remove it to avoid a circular inclusion.
Ell
Ell
I mean, it is already there surrounded by _MSC_VER guards
I know
but now it needs to never be there.
Ell
Ell
14:07
Oh right sorry
dayum.
change the Type header and it's full rebuild of all virtually all analyzer TUs
Ell
Ell
I haven't built any object files yet so that's not such bad news :P
Now I get "error: use of enum ‘ConversionRank’ without previous declaration" on enum ConversionRank;
where is that?
Ell
Ell
in Analyser.h, line 70
Xeo
Xeo
@Ell Wait, wha
Oh wait, forward-declared enums are C++11
Don't you have -std=c++11?
Ell
Ell
14:10
uh oh :P
I have forward-declared enums.
but more importantly
Ell
Ell
I thought g++ 4.8.1 did it for me. My bad
ConversionRank was removed four days ago.
Ell
Ell
Sorry for wasting time!
@DeadMG Hmm. When did you push?
Xeo
Xeo
user image
13
14:11
that commit was pushed four days ago.
Ell
Ell
Or maybe it's my fault, I'm more used to git to hg
Xeo
Xeo
ahahahaha
Congratz, we don't care.
> Removed all methods to do with conversion ranks, which no longer exist.
Ell
Ell
I thought I just had to do hg pull & hg update
I honestly have no idea how to use the command line HG.
Ell
Ell
14:12
Seems not. Sorry :/ I'll google the instructions...
Hmm this is strange
changeset:   59:5159fee22c4f
tag:         tip
user:        DeadMG
date:        Fri Nov 01 02:12:06 2013 +0000
summary:     Changed Util project to depend on both Boost and LLVM.
that is at the top of my hg log
yep.
that's the most recent commit.
ohhhh
Ell
Ell
So I do have an up to date repo
Xeo
Xeo
Puppy-fail?
there's a spare forward-declaration of ConversionRank in the header for some reason.
I must have just missed it, since it's no longer used in any methods, the compiler wouldn't have a reason to complain that it's never defined.
Ell
Ell
Right
14:15
and on MSVC, it's listed as line 69, not 70, so when I checked that line, there was no ConversionRank reference there.
lol.
Ok. I changed to ten scores. Not sure what default score theme to follow now :\
Ooh, I know.
different kinds of snakes?
Ell
Ell
yeah
Ell
any other fixes you have had to make?
I am looking to commit them
Ell
Ell
Yes there are some others
Xeo
Xeo
@Pawnguy7 Go from small to large and use their length in cm as the score?
Ell
Ell
14:17
Shouldn't I fix all of them until it compiles first?
@Xeo then tell them if they are above average or not :p
eh, sure.
Ell
Ell
Also hmm it does seem to be compiling with -std=c++11
but many of the fixes are guarded out for _MSC_VER, or plain irrelevant to me.
so honestly, if you break it for GCC I'm not too worried :P
Ell
Ell
But it will help when someone else wants to compile for linux right? :P
yep.
I don't like the idea of Wide not compiling for Linux because there's no logical reason why it should be Windows-dependent.
Ell
Ell
14:19
Yeah
so now I just have those two erros about Error
right
just go into the AST header and rename Error to ErrorExpr or something.
@Xeo score will be not connected, as I doubt lengths will match up correctly.
there's only a couple of other references to that structure.
14:20
Might just go for common names.
I of course do not properly handle it in the analyzer so
No idea how to order them though.
the only other references are declaration and implementation of Wide::AST::Builder::CreateError.
Ell
Ell
Right okay
@Xeo Oh by the way, I've been considering taking an alternative strategy to implementing some things.
Xeo
Xeo
14:21
Do tell
Ell
Ell
It compiled Util, and is now failing on `Module.cpp:30:83: error: could not convert (&(& a)->Wide::Semantic::Analyzer::GetWideModule(moddecl, this)->Wide::Semantic::Module::<anonymous>.Wide::Semantic::MetaType::<anonymous>)->Wide::Semantic::Type::BuildValueConstruction((* & a), Wide::Lexer::Range((*(const Wide::Lexer::Range*)(& where))))’ from ‘Wide::Semantic::ConcreteExpression’ to ‘Wide::Util::optional<Wide::Semantic::Expression>’
return a.GetWideModule(moddecl, this)->BuildValueConstruction(a, where);
what do you think about, instead of using a run-time interface, exposing it as a template (declaration only) and then exporting some definitions and using extern template?
Xeo
Xeo
Oh, you meant in the actual implementation of the Wide compiler.
@Ell Just explicitly convert the expression to Wide::Semantic::Expression.
@Xeo Yep.
basically, I'm sick of having parallel hierarchies and having to have a bunch of asserts and dynamic casts and generally weak typing.
Xeo
Xeo
Isn't just providing a declaration rather useless?
14:24
and it's also kind of a joke to have the code generator as an interface when it's specific to LLVM, so the only two possible implementations are mock and real LLVM codegenerator.
@Xeo Not if you use extern template to import the definition from another TU.
Xeo
Xeo
Sure, but you still need at least the member declarations, no?
yep.
but that won't be any more than what I currently export in headers.
Xeo
Xeo
I thought you meant just template<class T> struct blah;
oh no.
Xeo
Xeo
Not seeing any problem then, if it's really limited to a small set
I'd have blah.h (declaration), blah_impl.h (definition) and blah.cpp (default specializations)
So users can use blah.h for the normal business
14:26
it wouldn't be a really small set.
Xeo
Xeo
and blah_impl.h if they wanna add their own specializations
it would be, practically every class in easily my biggest component.
Xeo
Xeo
heh
well, make a branch and try :P
lol
@Xeo I don't see how that's going to work, though.
let's say that blah depends on foo.
if I have blah<T> that depends on foo<T>, the whole "export" business is only going to work if I have an extern template foo<ConcreteType>;
/r/chemicalreactiongifs is fun
14:29
so I don't see how a user could possibly get around modifying my headers if they wanted to add their own specializations.
Xeo
Xeo
hm
not that, frankly, I see what you would really want to do with your own specialization.
I might just leave it as a run-time interface.
-3
Q: C tutoral not for beginners

user2947918I NEED HARDER STUFF TO DO!!! Hi I've been having some trouble, I've done some good research and watched a lot of tutorials about c++ and I feel that now I just about know the basics of c++ and like to move on from the basics and head on to harder stuff. But, I can't find ANYWHERE a tutorial that...

lol
maybe in the future, if MSVC or GCC ever offer compiler-as-a-service, I will refactor to permit their implementations-as-a-service
14:34
@Jefffrey know any common snake names?
dude
ebaums world?
you suck.
Ell
Ell
@StackedCrooked We did this in class
user1804599
Awesome.
@Pawnguy7 No, stacked linked to a gif watermarked with it.
14:35
Anyway, so far I got Python, Cobra, Viper, Boa, Rattlesnake.
Order undecided.
> Boa
is my favorite
I don't like to think of it :D
Anyway, I am filling in ten default highscores.
There must be more ones like this I am missing.
Ell
Ell
@DeadMG Now I get this: gist.github.com/elliotpotts/7279503 I thought I could just add noexcept to the end of the Wide::Parser::Error declarations, but that doesn't solve it
Do I need to writea copy constructor for them?
And a default ctor? idk
@Ell Different enumeration- that's Wide::Semantic::Error, not Wide::Parser::Error.
Ell
Ell
Oh dayum, thanks
14:38
lol, Wide/Semantic/SemanticError.h has a specialization for Semantic::Error.
the argument type is given as Parser::Error.
clearly a copy/paste fail there.
Ell
Ell
ah of course
also TIL c++ has override o.O
also __debugbreak(); is an msvc thing isn't it?
Wide's codebase is littered with it.
Ell
Ell
why don't you write a DEBUGBREAK?
practically every function that is overridden has override marked on it.
@Ell Because I found no satisfying implementations on GCC.
Clang supports __debugbreak()
Ell
Ell
I used extern "asm" { int 4;} or some shiz like that IIRC
and it worked fine for me
14:43
well, I'll look into it in the future
Ell
Ell
I'll just comment them out for now?
I'd stick in a false assertion, personally.
you don't want the compiler getting uppity about things like not returning from functions and stuff like that.
Ell
Ell
false assertion?
assert(false)? o.O
assert(false).
the only debugbreaks that should be in there are essentially "Holy fucking shit, everything's broken, come have a look at the call stack before the program dies".
and the only reason I use them is because when you run as a VS addin, bad things happen if you don't force the program to break.
else, a false assertion would function just fine.
hmmm, fuck.
if I have unordered_map<K, T*> then I only have to forward-declare T, but if I want unordered_map<K, unique_ptr<T>> then I need to define T.
Xeo
Xeo
You only need the full definition at the point you call destructive functions
14:48
yar, but implementing the destructor of this specific type would be violating Ro0.
Xeo
Xeo
T::~T() = default :P
oh well.
@Xeo Does that actually work?
Xeo
Xeo
Sure, I think VC12 has defaulted functions, right?
yep.
I'm still using VC11 CTP though.
Xeo
Xeo
sucks to be you, then
T::~T(){}
14:49
lol.
Ell
Ell
@DeadMG there area lot of errors concerning casting things to Wide::Util::optional<Wide::Semantic::Expression>
Is a static case okay for that?
I just don't have enough download speed to download VC12, I'd have to either pay for it, pirate it, or get the shitty express edition, and when I installed Preview it busted my VC11 implementation as well as being broken itself.
@Ell It's always safe to convert a ConcreteExpression or DeferredExpression to Expression.
if GCC won't do it implicitly, you can just add an explicit cast.
Ell
Ell
yeah
but I find it very curious that GCC won't implicitly convert a ConcreteExpression to an Optional<Expression>, since Optional<Expression> can be constructed from const Expression&, and Expression can be implicitly constructed from ConcreteExpression.
Ell
Ell
It just seemed to come up a lot and it made me uneasy
14:52
ah, well, when you're dealing with a semantic analyzer, Expressions are used a lot.
Fuck expression parsing. I've been stuck on this for a week.
unless you have some seriously complex expressions, parsing them is pretty simple.
Xeo
Xeo
@DeadMG Uh, a single user-defined conversion sequence only has one user-defined conversion
Ell
Ell
@namezero expression parsing as in mathematical expressions?
@Xeo Probably.
I was just thinking that when I wrote it.
@Ell It would be simpler to add a new constructor to Optional.
Xeo
Xeo
14:54
I wonder why VC doesn't cough on that
Because it's VC
@Ell An (almost) full C++ set with varying associativity. I had it in Spirit, but it was way too slow. So Now I extracted the expression into tokens and pass them to an external parser
Don't try to parse C++
It's a long road that ends in hell
Not, not parsing C++. Just have asimilar set of operators
*C++ operator set
14:56
Other than that, expressions are basically parsing 101, just take one of the grammars floating around, add whatever you need, and generate the parser
about 97 to 523 are expression parsing.
Or you can be a crazy person and write it manually
I guess
Thanks :] First time writing an expresison parser, maybe that's why I'm so stupid about it.
Ell
Ell
@DeadMG gcc also doesn't want to implicitly cast the lambdas in Type.cpp
to DeferredExpression
@Ell Give an example line?
Ell
Ell
14:58
DeferredExpression DeferredExpression::BuildDereference(Analyzer& a, Lexer::Range where) {
    auto copy = delay;
    return [=, &a](Type* t) {
        return (*copy)(nullptr).BuildDereference(a, where);
    };
}
I have to explicitly cast the lambdas
hmm
Xeo
Xeo
Is DeferredExpression's ctor explicit?
same root cause- it would be a conversion from lambda to std::function, then std::function to DeferredExpression.
Make the ctor a template maybe
@DeadMg Isn't the recursive descent too slow for this
?
15:00
a constrained constructor for DeferredExpression should do the trick.
@namezero No.
Parsing will never be a bottleneck in a compiler come on
Well I had something in Spirit and it was way too slow (E.g. something like !!!!!!!!47 would take 30 seconds)
well, that's ridiculous.
That was probably your fault, not Spirit's
Ell
Ell
^
15:02
Yeah I'm pretty sure it was mine
I don't know why the fuck it took so long, there's no way Spirit generates parsers that slow normally.
Ell
Ell
Maybe you were including compile time in your err benchmarks
and the hand-written recursive descent parsers, you will not get faster.
15:04
@Ell There also might be a case or two where I used the VS enhanced lambdas.
You mean broken
no, I mean, enhanced.
in which they are actually somewhat more than the Standard requires.
Ell
Ell
which is equally broken if it makes them more permissive, right? :/
eh, somewhat.
it was a C++1y feature anyway
Microsoft just got there early.
Ell
Ell
I guess yeah
15:07
        template<typename X> DeferredExpression(X&& ref, typename std::enable_if<std::is_constructible<std::function<ConcreteExpression(Type*)>, X&&>::value>::type* = 0)
            : delay(std::forward<X>(ref)) {}
that right?
Xeo
Xeo
Looks fine
but man, you need some using-aliases :/
when I get around to upgrading to 2013, I'll have them available.
Xeo
Xeo
template<typename X, EnableIf<IsConstructible<function_type, X&&>> = 0> would look so much nicer
as well as default function template arguments.
Xeo
Xeo
I think VC11 CTP has those?
15:10
nope
only RC
Xeo
Xeo
hm
The fuck. What did I do to make VMware boot the Mint ISO as a livedisc...
lol
Ell
Ell
@Xeo As opposed to what? o.O
I think you just have to click install on the desktop
@DeadMG gist.github.com/elliotpotts/7279923 after adding the constructor your just posted
although it fixed two other errors
Xeo
Xeo
std::make_shared, eh
@Ell Yeah, it has to be std::make_shared<std::function<...>>(std::forward<X>(ref));.
Xeo
Xeo
15:18
Gosh, make a typedef for that std::function thing
and if you implemented the optional converting constructor instead of using all explicit conversions, there's another corner case where you'll need to implement optional(optional&) (identical to optional(const optional&)).
Xeo
Xeo
@DeadMG eeeeew
Restrain the converting ctor
I did.
Xeo
Xeo
No need to introduce the optional& overload then, no?
well.
the constraint on the converting ctor of DeferredExpression is based on the premise that the converting ctor of std::function is correctly constrained.
and I don't know if that's true for MSVC right now.
Xeo
Xeo
15:20
haha, no
and the constraint on the converting ctor of Optional is based on the premise that the constraint on the ctors of T is correct.
Xeo
Xeo
(Hint: You constrained the forwarding ctor in the wrong direction.)
oh.
I did?
Xeo
Xeo
Constrain it on whether X is an optional, and disable if so
Ell
Ell
@DeadMG you should consider getting a linux virtualbox and downloading and compiling llvm and clang :/
15:22
I have an install of Ubuntu 12.04 right here.
Ell
Ell
Have you got llvm and clang?
but I find Linux so fucking unusable, plus the excessive compile times of LLVM and Clang, it's difficult for me.
@Ell Ubuntu would only give me 3.1 and Wide needs 3.3
Ell
Ell
Get source from svn and compile from there?
ah, maybe.
I'll think about it later.
Ell
Ell
Yeah
15:23
right now I need to sleep.
it's way past my bedtime.
Xeo
Xeo
s/past/before/, s/my/common/
both statements are true.
Ell
Ell
I'm going to leave this for a while too, I just got a 4 page long error message about boost mpl :/
Although it looks like it's just a noexcept dealie
But I'll have a look at it later or tomorrow
ciao for now :)
@Xeo That's definitely not correct, because I don't want to act like I'm constructible from some non-optional T when I'm not.
Xeo
Xeo
@DeadMG Well, have both vOv
EnableIf<And<!IsRelated<X, Optional>, IsConstructible<T, X&&>>>
15:39
is there some terminal utility for c++ like there is for python in ubuntu
Ell
Ell
A repl?
Not really. I think they exist but arent commonly used
@MislavBlažević You meant autofools.
i just want to launch terminal, type "c++" and a console open up where I can write code in it that gets evaluated instantly
Type the word python in your terminal if you are on linux and you'll see what I am talking about
15:43
Start python REPL anywhere, rather.
You need deeper understanding of things you are asking about before you ask, man.
IMX
IMX
Has anyone xp with nemiver?
16:12
-1
A: C++ application crash after computing area

NitroNbgmain() is an integer method, at least in your example. Either change it to void main() or put return 0 at the end of your code, and it shouldn't crash.

Oh god
user1804599
lol
@IMX yup
That's... sad
user1804599
I want to fabricate software.
user1804599
lol
user1804599
> Community♦ reviewed this 38 secs ago: Reject
user1804599
lolwut
user1804599
How can Community do this.
@TamilSelvan please don't approve random edits like that. "Undefined Behaviour" is a very specific notion in C and C++ and should be capitalized to make this clear — sehe 5 secs ago
@rightfold It has heuristics to detect minor edits
@user2900611 Would you rather have a program that crashes, or a program that you can debug to fix the calculation? — sehe 37 secs ago
user1804599
16:29
@sehe Then why the fuck doesn’t the AI tell me right away before inserting the edit into the database?
@rightfold DOS? Nah. It's just the way they implemented this. An agent monitoring the suggested edits queue
user1804599
Stack Exchange is terrible software.
17
Q: Why does the Community ♦ user approve and reject edits?

EmrakulWhy does the Community ♦ user sometimes approve or reject edits? How does a machine know if my edit is valid? What does it mean if my edit was rejected by Community ♦? See also: Who is the Community user? How do suggested edits work? Return to FAQ Index

@sehe (who has full edit privileges) submitted an edit while yours was pending, so the system rejected it immediately.
user1804599
16:45
@Shog9 OIC
1
A: Is it reasonable to null guard every single dereferenced pointer?

atkThe reason that you're asked to avoid null dereferences is to ensure that your code is robust. Examples of junior programmers long long ago are just examples. Anyone can break the code by accident and cause a null dereference - especially for globals and class globals. In C and C++ it's even m...

what do you guys think about that?
What do you think. Will I soon be able to compile my normal C++11 code with VS2013?
I'm taking bets. 10% for the house.
Not for another 2 years.
I don't think I have constexpr anywhere, so it may just work yet.
user1804599
Oh yeah, that's nice. Everything can be solved with one more indirection :P — phresnel 39 secs ago
user1804599
16:59
> Everything
user1804599
lol
Fresnel. Go figure. Can't even spell the name right.
@BartekBanachewicz And you just suck. Period. :P

« first day (1113 days earlier)      last day (4061 days later) »