« first day (883 days earlier)      last day (4071 days later) » 

3:03 PM
huh
I've got C4146 as a warning on one project, and an error on another, without -werror
 
Irrlicht Y U NO smart pointers?
it's just silly to have ref-counted objects, and don't use smart pointers for them. even COM has that =\
I just can't imagine which people made such design %)
 
Xeo
template<template<class...> class T, class... A>
using Lazy = Invoke<T<A...>>;
kekeke
 
How to assign multiple variable values using pBuf = (LPTSTR) MapViewOfFile(hMapFile, // handle to map object
FILE_MAP_ALL_ACCESS, // read/write permission
0,
0,
BUF_SIZE);
 
@Xeo I found it out eventually, it's like you thought, left-to-right (14.8.2/7)
 
Xeo
@AndyProwl Sure you got the right paragraph?
I see nothing about evaluation order there.
 
3:14 PM
I have draft n3845, maybe the paragraph numbers are not identical to the ones in the official Standard. "*The substitution proceeds
in lexical order and stops when a condition that causes deduction to fail is encountered*"
 
Xeo
@AndyProwl Hmm, that text is not part of the official standard. Likely the result of a DR.
 
@Xeo Ouch. Is it at least the paragraph that begins with "If a substitution results in an invalid type or expression, type deduction fails."?
 
user142019
-2
Q: Change language in c++ application

DavidCan anybody send me something useful, if I would like to make a language changer option in my application (in c++) ?

 
user142019
Downvote, close and ban.
 
Xeo
@AndyProwl That would be p8. p7 is "The substitution occurs in all types and expressions that..."
 
3:18 PM
@Zoidberg Right
:)
 
hmm
"Just about to ask question on Stack Overflow"- "Found problem myself".
 
@Xeo Right, right, that one. I don't know why I copy-pasted the beginning of the following paragraph
@DeadMG What's wrong with that?
 
nothing
it just amuses me
 
@Xeo So how does p7 go on in the official standard? Could you copy-paste the text of the whole paragraph till before the example? Just for me to realize what exactly has changed
 
@Xeo: Did you mention that I'd be in Bristol to champion your proposal?
 
Xeo
3:21 PM
@AndyProwl Which example in p7? :)
 
@Zoidberg meh... he just asked about l11n
 
user142019
> Can anybody send me something useful.
 
user142019
Overly broad and vague, so -1 and cv.
 
Xeo
@DeadMG Yes, Clark asked if I was there, and I responded that you would present the paper, or maybe R Smith if I can get him to.
 
you could send link to Boost.Locale.
 
3:22 PM
ok, just checking
 
Damn, so that changed as well :) Here is the whole text for p7 I have in n3485: "The substitution occurs in all types and expressions that are used in the function type and in template parameter declarations. The expressions include not only constant expressions such as those that appear in array bounds or as nontype template arguments but also general expressions (i.e., non-constant expressions) inside sizeof, decltype, and other contexts that allow non-constant expressions. The substitution proceeds in lexical order and stops when a condition that causes deduction to fail is encountered.
 
well, it's not like I care about that noob %)
 
@Xeo Hm, so that means the draft I have is more recent than the official Standard, and the official Standard does not actually say anything about it, right?
 
Xeo
Yes
That's why I have a draft right before the standard, and one right after.
 
3:26 PM
I see, thank you. I will have to edit my answer then.
 
Xeo
Yep
 
Btw what is your proposal about? I've seen you guys talking about it even yesterday but didn't want to disturb the conversation
 
Xeo
Note that if you had a trailing-return type, the parameters would be substituted first.
 
Yep, lexical order
 
Xeo
@AndyProwl Ever wanted to pass an overloaded or templated function to another function template (namely, std::bind)? :)
 
3:31 PM
@Xeo Yes :) Wouldn't that require significant changes to the standard?
 
Xeo
@AndyProwl Nope
 
@Xeo Cool
 
Xeo
My paper is ~150 lines or so
pure-text
 
Good luck with your proposal being accepted then
Hope it will make it
 
Xeo
Welp, EWG has over 30 proposals to look at. :/
They'd definitly consider mine if I was in Bristol, as a courtesy
But since I'm not...
@AndyProwl I'm not changing any existing standard mechanics, I just add a new syntax to create functors from overloaded or templated functions (and some other stuff)
 
3:33 PM
@Xeo Aha, is it the []f thing I read about?
 
Xeo
yea
 
And wasn't that proposed in the past by some Italian guy or what? I've read a thread somewhere mentioning that something similar was proposed already
 
Xeo
In C++11, you need to write a functor by hand if you want something like that
@AndyProwl Haven't seen a proposal
 
@Xeo All right, great we have on then
 
user142019
Hmm.
 
Xeo
3:35 PM
Just some discussion on it in a thread on c++-proposals, and in the comments of a C++Next blog entry
^ might include a good example btw
std::bind(tie_it{}, ...);, where I had to write a functor explicitly
 
user142019
Is it allowed to trade insect corpses?
 
Xeo
std::bind([]std::tie, ...); would be with my proposal
 
@Xeo EWG?
 
Xeo
@Borgleader Evolution Working Group, the part of the C++ committee that looks at new language proposals
 
Oh (I googled EWG and all I got was Environmental Working Group)
 
Xeo
3:38 PM
LEWG would be the library counterpart (Library Evolution Working Group)
Snd then there's CWG and LWG, who check stuff that passes (L)EWG
And look at current defects
 
Wow... how many people work full time on C++ ? o.o
sounds like a lot of (wo)man power
 
@Xeo I see. Very interesting. Now I'll read the rest of the code, lot of stuff to learn for me
 
Xeo
heh
Hmm.. I wonder if it would actually be possible to allow a lifting-expression in an unevaluated context... A lifting expression never has any state, doesn't contain arbitary statements, and shouldn't cause any other problems... hmmm
@Borgleader Nobody works on it full-time.
It's not a job
It's purely voluntary.
 
Hmm ok, how many people volunteer? Do we know?
 
Xeo
btw @Andy, you can also select a text in a post and hit ctrl-K
Then you'll get a [text][1] in the post, with [1]: http://link at the end, which I find tidier.
@Borgleader Uhm... a lot? :)
 
3:52 PM
@Xeo Oh, interesting, didn't know that. Thanks for the tip
 
How can I plink Bartek correctly without him here?
 
@Xeo You sure it's ctrl-K? That seems to just turn the selected text into code
 
Xeo
Erm, whoops, ctrl-L
For "link" :)
 
@Xeo Oh, all right, thanks
 
Xeo
You can also use the buttons at the top
 
4:02 PM
@Pawnguy7 do you mean "ping" or "plonk"
 
@Doorknob I forget what it is called, probably. Like you just did.
 
Ell
Hi guys
 
hello @Ell!
 
Hi Ell
 
There's a code metrics analysis tool in VS... but it's only for managed code T_T
 
4:11 PM
@Xeo Concerning the code you linked, isn't comp unused inside compare_by_? Perhaps operator () was meant to use it?
 
Xeo
@AndyProwl Ah, yeah, that part was a work-in-progress, it originally just used < and Comp wasn't part of it.
I just made a snapshot, so to speak
 
@Xeo I see
Sure
 
4:29 PM
@Doorknob?
 
hello @Pawn
 
Does part of the name work if it is not ambiguous?
 
@Paw yes
You can @DOO me :P
 
@AndyProwl may I ask what you are doing to to earn your daily bread?
 
Ah.
 
4:31 PM
@bamboon I work as a programmer
 
@Bartek I have no idea. See stackoverflow.com/questions/15455894/…
 
@bamboon May I ask why are you asking? :)
 
@AndyProwl well, I am interested in people, especially in talented guys like you. Always wondering where those guys work(start-ups etc.). Also, wondering if there is someone who can answer questions faster than you. ^^
 
user142019
If I have a function call defined as <function-call> ::= <expression> `(' `)' and an expression as <expression> ::= <function-call> | <variable-reference>, how could I possibly parse function calls like foo()? Isn't this an infinite loop?
 
@bamboon Here in this chat in this very moment there are several people who could answer most questions in a fraction of the time it would take me
I'm quite a newbie actually
@bamboon I just happened to have a lot of time to devote to SO lately, I'm not a guru ;)
 
4:35 PM
@Zoidberg You need precedence in the grammar.
or alternatively, some parsing tools come with the ability to set precedence (and sometimes associativity) outside the grammar, resolving ambiguities.
basically, function-call is not expression(), it's some subset of expressions which have lower precedence than function-call ().
 
Xeo
@Zoidberg I think C++ has this sorted as function-call: postfix-expression (arguments-opt), where postfix-expression can again be function-call. Or something like that.
 
@AndyProwl I doubt that
 
check the C grammar
the expression part of it is chained which produces precedence within the grammar itself.
 
@bamboon No, really. I wrote my first C++11 program less than 3 months ago, so I'm not really one of the experienced guys. The thing is that most people in this chat, who could easily beat me in knowledge and speed, are too busy with more serious stuff than answering questions on SO. I'm basically one of the new repwhores, but if you are looking for a mentor, I'd suggest considering the other avatars in this chat ;)
 
well, of course there are quite a lot gurus here but that doesn't make your work less astonishing especially with you doing C++11 for 3 months only.
Talking about avatars, where do you have your avatar hosted? I can't see yours and a lot of avatars from other guys, so I assume one of my plugins blocks it.
 
4:46 PM
@bamboon Thank you :) Hm, I just drag-and-dropped a picture of a starfish on my SO profile, so I'm not sure it counts as an "avatar". But I can see it as my profile picture so yes, possibly some issue with a plugin
 
user142019
@DeadMG oh right.
 
also
surprised you didn't just ping me, since I'm pretty much the only person here who seems to have constructed even a relatively trivial compiler
 
user142019
Oh cool.
 
user142019
Parsec has functions for dealing with associativity and precedence tables.
 
user142019
That makes custom operators also more easy to deal with.
 
4:56 PM
I prefer precedence-in-the-grammar approach.
it's less tool-dependent
 
@DeadMG Right
throw throw throw
 
heh
 
user142019
5:17 PM
Awesome it works. :D
 
user142019
putchar()()() turns into FunctionCall (FunctionCall (FunctionCall (VariableRef "putchar") []) []).
 
missing a [].
 
user142019
Yes, I just noticed but stupid edit timeout.
 
sbi
I am almost sure we already had this here, but, WTF, I just ran into it and liked it:
 
:)
 
Xeo
5:30 PM
Hey, @Zoidberg, any idea how to get let make x = map ($ x) into point-free style?
 
user142019
@Xeo let make = map . flip ($)
 
user142019
I think.
 
Xeo
Yeah, that works. And let make acc x = map ($ x) acc? :)
More flips?
 
user142019
let make = flip (map . flip ($))
 
user142019
But you know, just use the non-cryptic point-malloc version.
 
Xeo
5:34 PM
heh
 
@sbi: hai :)
 
Xeo
Update on compare_by. /cc @Andy @R.MartinhoFernandes
Way too many std::binds in make_access :<
 
@Xeo A minor typo in the article: "e.g., they where all not viable" in section "For Great Justice" (great article, btw)
 
Xeo
@AndyProwl Thanks. I have to rewrite some stuff actually, when I get the time...
Completely changing out the example
 
user142019
5:46 PM
lol
 
user142019
@DeadMG when you have an AST, do you transform it into some type-annotated tree before doing codegen?
 
user142019
Or do you generate code directly?
 
50% off on AC3. Should I?
 
@EtiennedeMartel Yes
I hear its worth it
 
Ell
What is the use case for multiple opengl contexts?
 
5:56 PM
I'll buy it as soon as the semester is over
@Ell Rendering multiple scenes at one?
 
user142019
@Ell 3D modeling application where you can have multiple documents open at once, for example.
 
Ell
Do you need at least one context per window?
 
user142019
No?
 
user142019
You can have windows with zero contexts.
 
Ell
Sorry, I mean
can you share a context between windows?
 
user142019
6:01 PM
I don't see why not.
 
Ell
Is it max 1 per thread?
 
user142019
OpenGL isn't thread-safe.
 
@Zoidberg Yeah, it has to be transformed.
 
can anyone help me with this question :
http://stackoverflow.com/questions/15464262/is-there-any-character-that-is-never-used-in-ascii-or-unicode
 
I do it lazily, though.
and also, I only transform some elements into semantic representations
stuff like expressions goes right away
 
6:06 PM
@DeadMG Hey ! I notice ya changed the pupppy on ur profile :)
 
which I'll need to change later
 
user142019
@angryInsomniac Sure! I just helped the Internet by downvoting a bad question.
 
@Zoidberg yawn
 
@angryInsomniac That was years ago.
 
user142019
@angryInsomniac pitchn
 
user142019
6:07 PM
@angryInsomniac rolln
 
I don't know why I keep coming here...
7
 
@DeadMG was it ? I feel like it wasnt that long ago that ya helped me out with some problems :) distinctly remember a different puppy
 
it was definitely a long time ago
@Pawnguy7 The brilliance and expertise of the other members.
 
Hm... anyhow. @Ell, any new Minicraft features?
 
user142019
I wonder how difficult it will be to implement type-inference, especially with generics or overloading.
 
Ell
6:17 PM
@Pawnguy7 Ask bartek, It's not my project xD But no, I don't think
 
user142019
fn foo() ->
    meh := random(),        // random<T : type>()
    print(succ(meh + 1.0)). // 1.0 is a Double and + is (a, a) : a, so infer random<Double>().
 
I'm sure this will have use someday :P
 
Ell
@Pawnguy7 I'm essentially a tester
 
@Ell I see. I would be but alas, no GL4. Anyway. Is this project some sort of final project for his uni?
 
Ell
@Pawnguy7 I don't think so, I think it's just a personal project
 
user142019
6:18 PM
@TonyTheLion lol
 
user142019
fn answer() ->
    print(12 * 42 + 64 / 2 - 1),
    print(42),
    print(1 + 2, 3 + 4).
 
user142019
This parses correctly. :3
 
pfft.
I'll be more impressed when you can analyse and codegen it
 
user142019
:c
 
I wish finished a personal project...
That wasn't text based.
 
6:27 PM
lol
I can go a bit further with Wide when Clang fixes some bugs
 
user142019
FUCK FUKF UCk
 
user142019
print(1 + 2, 3 + 4) should parse as function call with two arguments. LOL
 
yeah, it really should.
 
user142019
FunctionCall (VariableRef "print") [Sequence (Add (Literal 1) (Literal 2)) (Add (Literal 3) (Literal 4))] :P
 
uh, isn't that a call with two arguments?
 
user142019
6:30 PM
That's a call with one argument.
 
user142019
, is sequencing operator.
 
oh
then what's Sequence?
 
user142019
The AST node for the sequencing operator.
 
user142019
It's a sequence expression, i.e. A, B is first execute A then execute B and yield B.
 
Xeo
aka... comma operator
 
6:32 PM
what the fuck, you have a comma operator?
you suck.
 
Xeo
I love me some overloadable comma operator. :)
 
and secondly
 
user142019
Because uh
 
it's absolutely no surprise whatsoever that print parses that way, since it's totally ambiguous.
 
user142019
a function body is an expression.
 
user142019
6:34 PM
And there needs to be some way of telling in which order expressions must be executed due to side-effects.
 
user142019
I switched to ;.
 
@Zoidberg Why on earth would you do such a thing.
 
user142019
Why not.
 
because it's insane.
 
user142019
I have no statements.
 
6:37 PM
statements exist for a reason.
namely, that the "value" of many language constructs absolutely does not make sense whatsoever.
 
Is anyone familiar with OpenSSL?
 
user142019
@DeadMG Of which? Return?
 
how about for?
 
user142019
There is no for.
 
or try { } catch(...) {}?
 
user142019
6:37 PM
There is fmap.
 
Ell
heh zoidberg is winning ;)
 
or throw.
or if.
 
user142019
@DeadMG if is easy:
 
or using.
or switch.
you know, I could keep doing this all day.
 
user142019
if cond then a else b yields a if cond == True or b if cond == False.
 
Ell
6:38 PM
^this
 
user142019
switch yields the result of the expression of the selected case.
 
yeah, because you're not going to get utterly fucked if those expressions have different types, right?
 
user142019
They cannot have different types, problem solved.
 
Ell
@DeadMG I don't see the issue of it, many languages do it already
 
no, not solved at all!
an if where both branches have to have the same type is fucking useless.
 
6:39 PM
No, it's not
 
not to mention what if I don't want/need an else.
 
user142019
No it isn't.
 
then what?
if cond return a, else "fuck!"?
 
user142019
That's impossible.
 
user142019
Then you're doing it wrong.
 
6:40 PM
That's not an issue
 
@Zoidberg When you permit side effects in expressions, then that's not doing it wrong at all.
 
Ell
@DeadMG just have a as the value of that expression
 
@Ell So if I have if(p) p->value; then even if p is NULL, I'll still try to deference it? Interesting strategy. You basically just ignored the condition completely.
 
Ell
Oh I see. Then make it NULL if the condition isn't satisfied
 
You're just bad at non-imperative programming
 
6:41 PM
@Ell Type error.
 
user142019
However
 
Ell
@DeadMG why? give an example
 
@Ell Uh, what if p->value is a float, or a complex type?
 
user142019
Different branches can have different types if the result of the if expression is unused.
 
user142019
But I have to figure that out.
 
user142019
6:42 PM
Otherwise just add , unit.
 
Xeo
Just make decltype(if cond then a else b) == Either<decltype(a), decltype(b)>, problem solved. :D
 
Ell
@DeadMG When would you do a = if ... when they have different types for the if/else block? if that is such you would never assign to it
 
user142019
@Xeo heh
 
Ell
meh, I know what I mean I just can't say it
 
Yeah don't make it autoeither
 
6:42 PM
@Ell That being my point, that it's worthless.
 
No, it's not
It's a sum type
 
Ell
@DeadMG it's not worthless in a dynamic type system at least
 
Zoidlang doesn't have a dynamic type system (unless he changed it again).
 
Xeo
Dynamic typing sucks, IMO.
 
Dynamic typing is a subset of static typing :v:
 
Ell
6:44 PM
Okay fair enough, then I don't know anything from here :p
 
I mean, in C++, we already have an "if" expression, and it's basically useless except for constexpr whoring and common_type metatraits.
 
Ell
we do? o.O
 
user142019
Ternary operator.
 
@Ell Ternary operator?
 
Ell
Oh right
 
6:44 PM
Conditional operator
 
Ell
that isn't useless, that's handy imho
 
"Ternary" is what you call operators that take three arguments
 
Ell
But then again what other ternary operator is there?
 
user142019
?: is commonly referred to as the ternary operator.
 
user142019
@Ell function call with two arguments. :v
 
6:45 PM
yes, but since there's only one, then "The ternary operator" is neither ambiguous nor incorrect.
 
Yeah and C++ is commonly referred to as C/C++
 
@Zoidberg That's not a ternary operator.
anyway
it's a supremely dumb idea to have statements as expressions, and there's absolutely no need for it
 
user142019
@DeadMG throw is bottom.
 
@DeadMG No, it's not
 
user142019
I.e. its type can be anything; it will be inferred as the expected type.
 
6:48 PM
throw is IO a :v:
 
user142019
It never yields a result anyway.
 
the entire purpose of statements is that their return value is not taken.
else, that's just a nested expression.
 
Xeo
Unit
 
Oooh are we discussing language features? <3
 
Yeah DeadMG can't see advantages of encoding side-effects in types or something
 
6:51 PM
In Wide, do you have an exception system?
 
... I do not understand that statement. :c
 
@Pawnguy7 Yep
 
You mean, uh. Like
Wait, no that's a terrible example.
 
@DeadMG How will it work? I have heard it said that the C++ Exception system is broke... Java certainly takes a new idea to it... what will yours be like?
 
user142019
hahahahahaha Java's exception system.
 
6:52 PM
C#'s exception system is the best exception system I've read / used so far.
 
user142019
It's terrible and retarded.
 
@Pawnguy7 C++ broke theirs too, they just managed to stop using it.
 
user142019
Pattern matching and Either/Maybe/whatever > exceptions.
 
@Zoidberg Wha?
 
pattern matching sucks
 
user142019
6:53 PM
Pattern matching is great. You suck.
 
@DeadMG Didn't I state that? (you said "too"). Also... stop using it by choice, or? Also, not an option with the standard library, that I knew of.
 
@Pawnguy7 Oh, I mean, both Java and C++ broke theirs.
the only difference is that C++'s bad part wasn't compiler-enforced, so you could just ignore it if you wanted to, which is what people did when it became obvious that that specific aspect sucked.
whereas Java's crap is compiler-enforced crap, and it's just permanently crap for everybody.
 
Not so in Java, huh? Checked exceptions, I think they are called.
 
yep
 
So, how do you make a USEFUL exception system? What counts as an exception? (I ask because I would say C++ exceptions and java exceptions are very different things)
 
Ell
6:56 PM
@Zoidberg what is pattern matching in this context?
 
they're not, once you throw out their mutual failings at checked exceptions.
they're basically identical.
all exception models are.
 
user142019
@Ell something like this:
 
user142019
case parse definition code of
    Right ast  -> processAST ast
    Left error -> print error
 
So it's an error branch?
 
Ell
if error goto
xD
 
6:58 PM
@Ell Basically, yes, it's error codes.
in terms of being used instead of exceptions, anyway.
 
user142019
@DeadMG except it actually works.
 
user142019
Since if you don't check them, you get a type error (or runtime error if you do it wrong) and boom.
 
@DeadMG Like, the... style of it. Java exceptions are used where if checks could be, for example. For everything... hm. On the bright side, it is hard to get a java exception and not know why.
 
It's error codes that can propagate automatically
So like uh exceptions or something
 
user142019
You don't.
 
6:59 PM
@Pawnguy7 The style of common use is irrelevant to the feature.
 
user142019
parse :: Parser -> Text -> Either ErrorDescription AST
 

« first day (883 days earlier)      last day (4071 days later) »