« first day (423 days earlier)      last day (4539 days later) » 

1:07 PM
Well, it most likely means the conversion fails.
Try using CP_UTF8.
 
the conversion should basically never fail for characters which are in the ASCII plane
 
Or even use mbstowcs.
 
here's a question
for an LR parser, is the stack tokens, states, or both?
ah, never mind, I'll just lookahead two tokens instead
 
hmmm... apparently I had a message started at least ten times... any idea how I cna find it? Curious as to what I said so many people liked
 
Wiki says states.
 
1:12 PM
care to leave a comment stackoverflow.com/a/8488761/1086635 guys? thanks!
 
Done
 
Yes, &x yields a (p)rvalue.
 
the first started message of over 5000... still relevant :D
Oct 21 '10 at 5:27, by Adam Davis
I prefer that the good information exist in SO itself, rather than through ephemeral links. It's only been two years since SO started, and already some of the links are broken, making the answers useless.
 
@Cat Plus but its an address of x, x is not converted to rvalue, am i correct?
 
@user1086635 &x has absolutely no effect on x
you know my grammar supports silly things
type : type : type : string {} {} {}
 
1:21 PM
I see
 
Value categories are associated with expressions, not objects.
 
@DeadMG what's that, a type that extends an anonymous type that extends another anonymous type that extends string?
 
Expression x is lvalue. Expression &x is prvalue.
 
but in, int a = b b is converted to rvalue
what is prvalue in c++11?
is it an address value?
 
Pure rvalue.
 
1:23 PM
@cHao yeah
I guess that semantically, it's not even illegal
just stupid
 
means which is not the result of lvalue conversions, right?
as in in my example
 
@DeadMG Hey, after your parser. will you create assembly code directly for the whole tree?
 
no, it needs to go through semantic analysis next
then I'm phoning LLVM and getting them to do the rest
 
@Cat Plus so if i have &x it means no standard conversion happens?
 
What do you send in to the LLVM stage?
 
1:27 PM
115
Q: What are rvalues, lvalues, xvalues, glvalues, and prvalues?

James McNellisIn C++03, an expression is either an rvalue or an lvalue. In C++0x, an expression can be an: rvalue lvalue xvalue glvalue prvalue Two categories have become five categories. What are these new categories of expressions? How do these new categories relate to the existing rvalue and lva...

 
Do you convert everything to LLVM IR first?
 
@ManofOneWay Uh, I call it's functions. How else is it done?
 
what do you send in to the functions?
 
uh
 
that's what I was asking =)
 
1:29 PM
wtf answer are you looking for?
if you want to know the LLVM interface, go to their documentation
I send them arguments
 
cpx
@DeadMg thank you for your comment
 
basically ....
 
lol
 
cpx
lol
 
@DeadMG So you are basically just doing the front end of the compiler?
 
1:32 PM
yes
that's what LLVM is, the back end
 
And using Bison for that?
 
ew, no
 
I thought you implemented both front and back end
 
no
do you have any idea how complex native backends are?
hardly the thing you can whip up in your spare time
 
Sure it is, as long as it compiles to only one architecture
 
1:33 PM
I thought you were creating a back end with no/few optimizations for only one specific architecture
 
what, and have nobody use my language because the output is too slow?
 
You really think someone will use it anyway? Isn't the whole purpose for this learning?
 
I'm going to use it
 
@DeadMG You want people to actually use your language? Dont people write new programming languages mainly "for the lulz"
 
as if I ever did anything for the same reason other people did it
I don't know about anyone else, but I'm sure as hell sick of C++, especially on Windows, and when this is done I'm never going back
 
1:35 PM
Is it a domain specific language or are you writing a general purpose language?
 
general-purpose
 
cpx
I was wondering if theres a IDE that works Clang/LLVM?
 
how am I going to replace a general-purpose language, C++, with a DSL?
 
cpx
on windows
 
I think Code::Blocks might be able to do it
 
1:36 PM
code::blocks can use pretty much any compiler
 
Just out of curiosity, what will your language contain that C++ doesn't?
 
cpx
It doesn't have that settings for clang.
 
you may have to add them
 
@ManofOneWay Half or more of the good part is not containing things that C++ does
 
cpx
may i choose gcc as its default settings?
@cHao as in copy them?
 
1:37 PM
but on top of that, I have way more powerful templates, concepts, and modules, polymorphic lambdas
 
i'm not sure how clang's options and such differ from gcc's
 
they don't
clang was designed to replace GCC- including being compatible with regards to options, attributes, and such
 
then yes, you could probably use gcc's settings and point at clang instead
 
@DeadMG doesn't D already try to solve the problem of a general purpose language that can replace C++ ?
 
bwahahaha
D sucks quite tremendously
 
1:39 PM
Are the reasons D suck fixable? I mean can't one contribute to D rather then design yet another new language?
 
they identified a few things that were broken, half-arsed the solution, and then broke a few more things that were just fine
 
there's not really anything that toally replaces c++. particularly not gc'ed languages
 
no, not really
 
the problem with replacing C++ is that the language that try to do it never ever consider the reasons why C++ is actually a popular language
 
exactly
like D going for the orgasm-GC approach, that's never going to attract C++ programmers
 
1:40 PM
and then they end up fixing all the annoyances in C++, at the cost of also throwing away the strong points that might actually convince anyone to use it
and here I'm not talking about GC, I'm talking about tool support, source compatibility, things like that
 
@jalf Some of them. Consider the string, wstring and dstring.
 
@jalf isn't C++ popular because of existing code bases and people know it? i.e. it has momentum
 
C++ is popular because it gives the programmer control
if you want to cast to void*, you can
 
that, and you don't pay for what you don't use
 
if you want virtual inheritance, you can have it
 
1:42 PM
and it can be as high-level or as low-level as you need it to be
 
if you want deterministic destruction, you can have it
 
@Raynos exactly. C++ is used because (1) there is a lot of C++ code around, and we have to deal with it, and (2) because there are a lot of high quality IDEs and compilers and debuggers
 
and you can choose error codes or exceptions, etc
 
@DeadMG the hell it is. There are plenty of languages that give the programmer control.
 
I hardly know any other languages that offer virtual inheritance
and even fewer that have a competitive stab at RAII
 
1:43 PM
none of those are reasons why C++ is the third-most used language
 
@jalf of which C++ is one of them...
 
C++ is popular because of libraries and IDE
 
Also because the "You want performance, you damn well use C/C++"
There is a complete lack of competence @ writing efficient code in other languages
 
@thecoshman indeed. But 99.9% of the C++ code in existence does not depend on this level of control. It simply depends on being source-compatible with C++ and (to some degree) with C, and on having good tools and lots of programmers who know it
 
Why not D for performance?
 
1:45 PM
@Abyx Garbage collection is a problem.
for example, in D, you cannot write a value-typed small-string-optimized string class
or an embedded-end linked-list class
 
@DeadMG really?
 
oh yes
 
isn't GC optional in D?
 
not really
technically, you can choose not to use it
 
cpx
Hm, I've set C++ Compiler path to clang++.exe and it compiles.
 
1:46 PM
however, the Standard library has no restrictions about using it under the cover
so in reality, even if you never GC alloc yourself, you can't stop it running
and secondly, as I previously mentioned, value types are gimped in some important ways for performance
and correctness, in some cases
 
cpx
How can i check if compiler in use is actually clang?
 
Running what? There is reference-counted GC
 
so even if you guaranteed that the Standard library never used the GC and you never allocated off it yourself, you'd still get worse performance than C++
 
@Abyx I assume that the GC still works away keeping track of what it doesn't need to do
 
it's hard to believe that I can't create SmallString<N> in D
 
1:50 PM
Does SO have alternate sites for other languages...?
 
don't know, but I don't think so
and D put a whole bunch of stuff into their language that had absolutely no need to be there
like associative arrays
 
@cpx code::blocks isn't magic...if you tell it the compiler is \path\to\clang++.exe, it isn't going to even know where gcc is, much less try to use it
 
@DeadMG it's subjective. I like when I don't need to use a library with scary syntax, like shared_ptr, array, etc
 
no, that's just silly
language features are less maintainable and less flexible than library solutions
what if the D language's implementation is sparse but you really need a dense one?
well, I hope you didn't mind getting fucked
 
no. it's C\C++ specific - they are really unmaintainable languages, however other languages get new versions every two or three years.
 
1:58 PM
no, that's not at all true
Java has had way less maintenance than C++
and it doesn't matter how much you maintain your implementation, it can still only ever be sparse or dense
 
what about C# or python?
 
@Abyx Java is a pain because of this
 
there's no magic wand to solve the problem that different use cases have different optimal implementations
and enforcing one single implementation through the language enforces suboptimal performance
 
you can create another implementation in a library, if you need it.
 

« first day (423 days earlier)      last day (4539 days later) »