« first day (301 days earlier)      last day (4649 days later) » 
03:00 - 17:0017:00 - 23:00

3:07 AM
thats hilarous
 
 
3 hours later…
5:40 AM
I did it.
 
6:22 AM
How does one calculate mass recursively?
 
 
2 hours later…
8:43 AM
@StackedCrooked Questioning jokes doesn't make them funnier.
 
@sbi now that i've got some vacation I was thinking of reading some nice books
@sbi Love that you (mostly) have gathered all good books in C++ (stackoverflow.com/questions/388242/…)
@sbi Even though I've used C++ in a few courses, I have never used it professionally, so I was thinking of starting with a beginner book. C++ Primer seems like a good start. Have you read it?
 
9:26 AM
@ManofOneWay C++ Primer is a good book.
 
@FredOverflow okey nice!
@FredOverflow are you reading any books at the moment?
 
9:43 AM
hii
can u tell me how can we can use c++ through any other data storage things like ACess or anything...
is it possible..?
@ManofOneWay
 
9:58 AM
@Gulu perdōnāre?
 
morning
 
Morning sir
 
10:30 AM
@ManofOneWay I'm reading "Imperfect C++" and "Efficient C++" at the moment, but both are a little dated.
 
hi
 
@DeadMG Have you solved all your syntax problems yet? ;)
 
no
I need a new function syntax that doesn't suck cojones
 
@DeadMG What's the old syntax again?
 
C++-style
type_expression identifier '(' arguments&shit ')' '{' statements '}'
 
10:40 AM
Well, how about C++0x style, but function instead of auto?
function foo(int x, int y) -> int { return x + y; }
 
I'm trying to not have to add such a keyword
 
Then you know it's a function by looking at the first token.
You are designing a language from scratch, you can have as many keywords as you want. Isn't this any language designer's dream?
 
yes, except I'd rather have a lot less keywords rather than a lot more
I already cut a lot of keywords, like new, delete, casts, etc
 
One additional keyword can make so many syntax problems go away...
 
yeah, I know
I tend to view them as the lazy man's way to do it
 
10:43 AM
For example, if C++ had a function keyword, there would be no such thing as the most vexing parse.
 
Making a language easy to parse for a machine can make it easy to parse for a human, too. But it's not guaranteed of course.
 
I don't have declarations in my grammar, at all
so that's no big deal for me
maybe I should just live with the tiny ambiguity, at least you get a parser error for it instead of it silently doing the wrong thing
 
So what's the ambiguity?
 
simple
function: foo(x, y) { return x + y;}
variable: foo(x, y) MahVariable;
 
Is foo(x, y) a type in the second example?
Do you have a typename keyword? :)
 
10:46 AM
yep
no, I have no typename
I tried changing the function syntax to always require a type to open
but then you just run into the same problem again
 
But as soon as you hit either the { or the variable name, you know what it is, right? So this is a formal syntax problem rather than a practical one?
 
yeah#
it is possible to get Bison to resolve the ambiguity without a problem
however, actually making that happen is, well, inconvenient to say the very least
 
I'm pretty sure the syntax can be tweaked for that, but I'm no expert.
What syntax system does Bison use?
 
it's a yacc derivative
so LALR(1)
 
1 means 1 token lookahead, right?
 
10:48 AM
yep
 
It's been a while since I fiddled with syntax, sadly.
 
now, you can re-write the rules so that it can reduce as it goes along and defer the decision until later whilst still being LALR(1)
but, basically, doing so is rather messy and unmaintainble
 
In the interest of future tool developers for your language, you should keep the syntax simple.
 
it's nothing LALR can't cope with
just specifying that in a way that's not hideous is difficult, like trying to use multiple inheritance in C
besides, the semantics of the language are more than complex enough
 
hi there
 
10:53 AM
@DeadMG What's so difficult about writing vtables and adjusting this pointers by hand? ;)
 
is there something like the copy and swap idiom to implement move ctor and move assignment?
 
lol
 
oh wait.
that's kind of a stupid question...
 
if you use copy&swap, you get move assignment for free
 
yea ;)
 
10:54 AM
@DeadMG if you pass by value to operator=
 
I wasn't thinking properly
 
But move ctor has to be implemented manually
 
ok, cool - thx
 
I could change function definitions to something similar
like, I dunno, type_expression identifier '{' args & shit '}' '{' statements '}'
 
what's this
bison can do GLR
but that is limited
 
10:59 AM
yeah
I'm not going to go to GLR to solve one shift/reduce conflict
 
in my grammar i have 7 s/r conflicts
 
ok, you know what? it just pisses me off
 
i let it all solve to shifts xD
 
grammar for what?
 
I could do what I want in LALR, it's just too unmaintainable to do it using Bison
 
11:03 AM
guys
it's saturday again. time for my nerd projects to arise again: checking every 5 minutes new topics on 1) SO, 2) IRC, 3) usenet about C++ and comment in nerd fashion
 
@JohannesSchaublitb Don't you have any projects?
@JohannesSchaublitb sry, real projects =)
 
ok
I think I might be a moron, I can just do an R/R conflict instead
 
@Man only payed projects. not toy ones xD
but I'm actively looking for a new project to spend my time on evenings!
 
@JohannesSchaublitb You are not getting paid for sitting at SO or IRC I guess? =)
@JohannesSchaublitb Me and some friends have new project you might be interested in!
 
i'm planning on doing a ELF linker
want to become more familiar with the various sorts of library issues (PIC etc) and x86 assembler
so for that thing, I'm looking for a slave language. like, wanna implement a language compiler where at the end I can use my own linker
 
11:13 AM
Have you ever tried building your own CPU?
Or at least design your own assembly language?
 
first I wanted to do an ELF loader/runtime linker, replacing /lib/ld.so, but that's too dark magic and too tied to the kernel it seems
@FredOverflow nopes xD
 
@JohannesSchaublitb that sounds nasty!
 
@JohannesSchaublitb Name it after a metal, use mercurial as the repository, and use ld.gold to bootstrap it.
 
@LucDanton You mean like Death Metal? ;)
 
I don't think that fits very well with hg and ld.gold.
 
11:23 AM
why should it be named like a metal?
original GNU ld is also not named like silver or something
@LucDanton I think ill call it "glitter" xD
if I do it anyway -.-
 
@JohannesSchaublitb I mentioned ld.gold in particular! There is no trend until we set it!
 
ohh
I understand now! didn't know mercury is quicksilver
 
And now you also understand why the executable is hg!
 
ಠ_ಠ
It's one of the most well known 'unobvious' ones, like K (ok you know this one I guess), Na, Au.
Wait you know Na as well.
I guess there aren't as many 'unobvious' elements in German.
 
11:38 AM
hmm
im a chemical noob
didn't take chemistry in school :)
 
I was shoveled a ton of science courses just so I could join a software engineering school.
Not that I disliked it.
Well mostly mathematics and physics to be honest.
 
11:58 AM
I'm writing a script in Lua, to generate the input for Bison, to generate the input for the C++ compiler, which will generate a program that can generate code from another input
 
codeception
 
@JohannesSchaublitb How about Germanium? :)
Germanium ( ) is a chemical element with the symbol Ge and atomic number 32. It is a lustrous, hard, grayish-white metalloid in the carbon group, chemically similar to its group neighbors tin and silicon. Germanium has five naturally occurring isotopes ranging in atomic mass number from 70 to 76. It forms a large number of organometallic compounds, including tetraethylgermane and isobutylgermane. Germanium was discovered comparatively late because very few minerals contain it in high concentration. Germanium ranks near fiftieth in relative abundance of the elements in the Earth's crust....
 
hi
 
12:13 PM
i'm getting sick. that apple could stop samsung from selling their devices.
 
patent trolling is ridiculous
 
WTF. "they copied our innovative design". what's "innovative" about a thin 4 corners piece of metal.
 
@FredOverflow I have (sort of, anyway. Not physically of course, but designed one using a simulation thingy). Was a ton of fun!
Especially when we got the branch predictor wrong, and it performed terribly in every test, except the one designed to break branch prediction, which it handled perfectly.
Busiest school year ever. Same year we had to write a compiler an an OS kernel, and learn network programming
 
Can somebody help me briefly with a C problem I'm having? My code and the error the compiler throws are here: gist.github.com/9694dabfabcc15e9da29
 
12:29 PM
move the validate function prototype out of the main function?
 
cough yup, that got rid of the first error, thank you :-)
 
I'm not overly familiar with getopt & Co but shouldn't the switch cases use break? I know it may not make a difference here but I'd rather not try to wrap my mind around fallthrough.
 
sorry for appearing so stupid, i'm just taking my first steps in C for this little tool
 
I mean, there is an exit(1) at the end of the switch.
 
there wasn't any break in the docs i saw, iirc
seems i was wrong, there is actually one in the docs
and the last error was because I was missing a curly brace in the main-function
today is clearly not my day, sorry :-)
 
12:37 PM
by the way, we're generally C++ people, so for C questions you might get better answers on SO than here :)
 
loop_point = (int32_t) loop_point; That's funny I never though about this trick to wrap-around a signed type.
 
12:57 PM
I wonder what the MSVC team were thinking when they made red intellisense squiggles register as "errors"
 
lol
 
given that they're usually false positives (and occasionally things that should be errors, but which their actual compiler handles just fine)
I mean, I get an "error" because Intellisense doesn't like that I'm not using precompiled headers
doubleyou-tee-eff
 
their fundamental problem is that Intellisense is a separate system to their compiler
if they were integrated, they'd have much higher quality Intellisense
 
yep
 
This reminds me that I probably need to ditch clang-complete.
 
1:00 PM
but I also think it's wrong to flag anything as "error" until you know it is one. I expect a direct correlation between the list of errors and successful compiles. If the error count is > 0, I expect compilation to have failed, and if it is 0, I expect it to have compiled successfully.
and the way they've apparently coupled intellisense with PCH's is pretty much unforgivable
 
agreed
 
Since it means I get warnings/errors all the time simply because I don't have a PCH
 
o rly? I think you must have messed up a project setting or two then
I never get any PCH errors and I never use PCH
 
dunno, it's pretty consistent here
ah, hilarious. I can crash VS by trying to right click on the error
anyway, "IntelliSense: PCH warning: header stop cannot be in a macro or #if block. An intellisense PCH file was not generated."
 
sounds to me like it thinks you want to make a PCH but it can't
 
1:05 PM
Well, I don't. I haven't got PCH's enabled anywhere.
 
oh well
when I create a "DeadMG++" IDE, I shall tightly integrate Intellisense into the compiler
it would be the only way, ever, to get any reasonable Intellisense anyway
 
@DeadMG I even get the error when I create a new empty console project from scratch, containing just a main.cpp with int main() {} in it
ah, wonderful, found three Connect issues about it
One closed as "duplicate", another as "won't fix", and the third as "by design"
 
lol
gotta love the VS tech support
 
mind checking if you can reproduce it btw?
 
not at all
upload your solution somewhere and I'll load it up
that's VS2010, btw, right
 
1:22 PM
yeah, with sp1
 
yeah
upload it somewhere and I'll load it
 
yep same error
but if I go into the project properties, it clearly has a listing for PCH
when I change it to "Not using PCH", then the error goes away
 
it does? Doh...
 
yeah
you have to explicitly set it
 
1:32 PM
so leaving it blank means PCH is enabled?
 
yep
 
that is beyond stupid...
 
it seemed kinda obvious to me when it had a PCH filename, and I was like, well, that shouldn't be there if PCH is off
 
you have to clear the filename as well? Or just set it to "Not Using Precompiled Headers"?
 
I didn't clear the filename
just the filename being there was what tipped me off
 
1:35 PM
well, I still got the error when I set it to "Not using..."
gone now that I cleared the filename
 
told you I was a Genius™
 
1:49 PM
folks
im removing ice from my refregurator
 
umm. That's awesome?
 
i guess I should put hot water into it to make it smelt
 
I'm preparing a blog rant about VC++
yeah, that's probably a good idea :)
 
perhaps also using a hair blower
 
Isn't standard procedure to just remove everything, put something to collect the water, and cut the power?
 
1:53 PM
it takes too long
i want to put pizza into it in the evening
 
I think you just want an excuse to use the hair blower on the ice.
 
I usually boil some water, pour it in a bowl, and then put that in the fridge
speeds things up a lot
 
@Luc why would I need an "excuse" ?
the way you saying it sounds like using the hair blower on the ice is something fun I want to do
 
@JohannesSchaublitb Because waiting works just fine.
 
waiting may activate the watchdog in me
wow it works well with the dryer!
it heats up the entire metal pipeline inside the refrig.
 
2:07 PM
See? Fun!
 
lol
i remember when I was a kid in winters i always took ice from outside into the school building and watched how it smelt away xD
 
2:21 PM
refrigs should have a switch to heat instead of cooling
one would just need to switch to remove the ice
 
Als
@jalf: A little help needed here
0
Q: Animation in Qt - tutorials links

smallBCould anyone provide me with links to good tutorials on doing animation in qt?

@jalf: Please read the comments here, this OP thinks you justified asking for tutorials in SO lol
 
Yeah, and you think people should search Google before asking questions. Do I have to agree with either of you? ;)
 
Als
@jalf: Not that you have to, but I believe you didn't really meant justifying a q like that which can be easily solved by a search & the OP is using your comment as a justification/encouragement to do so.
 
HI GUYS
 
@Als ok ok, I'll comment ;)
... he said after commenting
 
Als
2:34 PM
@jalf: I saw your comment, that is a fair one
:)
@ManofOneWay: Hi btw, Didn't see you here before
 
@Als What's happening?
@JohannesSchaublitb Haben Sie viele questions heute geanswered?
 
2:51 PM
@JohannesSchaublitb I wish GCC had a switch to remove the ice.
2
 
guys, what kind of ide are you using for your projects?
and do you make your own makefiles?
 
 
1 hour later…
4:18 PM
hi, anybody else think that the Standard Committee should have included binary literals in C++0x?
 
@Ricky65 shrug, dunno. It's not exactly something I'd call a high priority feature. It's rarely useful, and when you need it, it's pretty trivial to convert binary to hex, so you can use a hex literal.
but I suppose, if they sat around at one meeting being bored and having nothing else to do, it'd be nice enough to have.
 
true but it would have been nice, GCC and Digital Mars already support them as a compiler extension
 
I think Boost has binary literals implemented as macros.
Yeah, BOOST_BINARY in utility.
 
@Ricky65 yes, but the committee already has a list of several hundred features that "would be nice".
Do you often need this feature?
 
4:34 PM
When programming on embedded systems it would be very convenient. Yes, I can use BOOST_BINARY but sometimes you don't want to include all of boost into a project.
 
1. You don't need to include all of Boost. 2. Not using Boost is silly.
 
@Ricky65 you don't need to. You can just include that one macro (or even copy it)
 
isn't it coupled to the rest of boost?
 
BOOST_BINARY requires only Boost.Preprocessor.
 
@Ricky65 boost isn't a library, it's a collection of libraries. As such, no, there's no great overarching coupling
I'm sure the macro pulls in a couple other boost headers, but it should be pretty harmless
 
4:37 PM
It's a set of macros, actually.
 
anyway, the boost license permits you to just copy/paste the macro if you need it :)
 
From my experience there is a lot of coupling, Boost isn't allowed where I work anyway.
 
Boost.PP has no dependencies as far as I can tell.
 
right
 
By the way, the committee generally doesn't like to add new core language features to do things that could be done through libraries and/or macros. The existence of BOOST_BINARY makes it pretty unlikely that binary literals will ever be added. :)
 
4:38 PM
Well, I wouldn't want to work where you work.
 
:)
Python, Ruby and the new Java have binary literals though, would seem logical for C++ to have them too imo
 
@Ricky65 Why? It seems logical to me that if every language had all the same features, there'd be no point in having more than one language ;)
 
tbh I think binary literals would be even more useful in C++ than Python, Java and Ruby as it is lower level.
 
Anyway, keep in mind that 1) C++ is already a huge and complex language, and no one wants to bloat it more than necessary, so every new feature really has to prove its worth, and 2) as an international standard, C++ has to satisfy a lot of stakeholders (including compiler vendors) for any improvement to be approved.
@Ricky65 it's not a matter of whether it'd be more useful than in Python, but whether it is useful enough to justify 1) taking up the committee's time, 2) burdening compiler vendors, and 3) making the language bigger than it already is
 
Especially that the feature has a terribly limited use.
 
4:45 PM
2) burdening compiler vendors - Two of the main compilers already support it as an extension so I don't buy that, sorry. I also don't see how adding 0b/0B literals would make the language considerably bigger.
 
@Ricky65 You're missing the point. It's about the compilers that don't support it today.
And it's about requiring compilers to support and maintain the feature forever
 
Also keep in mind that they've already added user-defined literals to C++0x, so if you want something like "010001"b to be a binary literal, you can do that under the new language definition.
 
I don't think it would be very hard to implement tbh.
user-defined literals are cumbersome as the user has to define their own binary conversion function. Also, everybody will roll their own incompatible binary literals.
 
and it wouldn't make the language "considerably bigger". But when you have hundreds of such trivial features queued up, you need to apply some kind of consistency. Do you allow all those, just because taken individually, they're easy to implement and won't make the language much bigger? Or do you say "no, we'll stick with the features that are important to a lot of users"
 
They're more likely to use BOOST_BINARY anyway.
 
4:47 PM
@Ricky65 Is that a problem? How often do you need to exchange binary literals between different libraries?
 
binary literals from my library would be incompatible with binary literals from your library
 
Also keep in mind that C++0x was 4+ years late already, and the committee had to cut a large number of very useful features to avoid further delays. How would you justify dropping concepts, garbage collection, modules and other hugely important features, but at the same time finding time for something that would be a minor convenience to a fraction of users a fraction of the time?
 
As Bjarne points out, nearly everybody who talks to him says virtually the same thing: "C++ is too big and complex - you should really make it smaller and simpler. Oh, and I have this great idea for one really great feature you should add too..."
6
 
@Ricky65 so? Why would my library care about the binary literals used in your library?
I can't imagine a situation where that would matter
 
They added raw string literals, binary literals would have been no harder
 
4:50 PM
@Ricky65 No harder, but much less useful
Anyway, did you write a proposal for the committee to add it?
 
I assume you don't do much programming at the bit-level. Then you would understand.
 
Why'd you need literals to be compatible? They only need to yield integral type.
 
@Ricky65 I do a fair bit. But I don't understand why literals need to be "compatible", and I don't understand why it is so hard to write your literals as hex
 
The only use I can think of is bitmaps, and you can do them easily with shifts, with constant folding it's as free as literals.
 
Each group of 4 bits -> 1 hex digit. It's a super simple transformation
@Ricky65 Again, I'm not saying it wouldn't be useful. I'm just saying it's less useful than a million other features that didn't make the cut
 
4:52 PM
have fun doing long bitmasks in hex
 
And doing long bitmasks in binary is better?
 
Have fun doing them in binary.
 
clearer, at least
 
01010101011111111111111101010101010101010101010101010110111110001 // Oh sorry, you wanted to change something?
 
a literal of 64 digits doesn't sound readable to me
Writing it in hex imposes some kind of structure, so I can easily find the 4th, 12th or 28th bit
counting 1's and 0's to do the same with a binary literal would be painful
 
4:54 PM
Hex literals aren't any better for modifications, either. Bitshifts FTW.
 
yup, that too
with constexpr, you even get a guarantee that it'll be as efficient as hard-coding the literal
 
I think even the dumbest compilers nowadays can fold bitshifts into a constant, even without constexpr guarantees.
It's like, the easiest optimisation to implement.
 
I predicit it will make it into the next standard don't see how converting from hex to binary
 
@Ricky65 hmm? Is that supposed to be two separate sentences?
 
is ideal lol
sorry, i'm new here
 
4:59 PM
yesterday, by sbi
If you are new here, please read the newbie hints. Thank you.
 
@Ricky65 well, few things are "ideal", and I don't think binary literals are ideal either. Most of the time, I agree with @CatPlusPlus that the cleanest solution is bit shifting.
 
03:00 - 17:0017:00 - 23:00

« first day (301 days earlier)      last day (4649 days later) »