« first day (949 days earlier)      last day (4014 days later) » 

6:10 AM
Hello.someone here. :D
 
no
there is nobody here and there never will be anybody here in the future
 
heeee
Oh God
 
6:28 AM
DeadMG's new strategy for dealing with Clang: just guess.
lol
lol
 
6:58 AM
I'm tired of being a good superhero
I wanna be Captain Cornholio
I;m just not sure I can commit to butthole emblazened on my chest
 
7:29 AM
hello
Anyone here?
 
hii
 
No, the room is empty
 
Hi I have an error on my c++ code which is" lvalue required"
 
That's amazing
 
when I do something like this &(this->scaleX) = scaleX
 
7:30 AM
maybe you're trying to pass at temporary to a function that takes a non-const reference
maybe
 
Even better :p
 
where scaleX is the parameter of the function
 
DrawRoute::DrawRoute(double &scalex, double &scaley) {
// TODO Auto-generated constructor stub
&scaleX = scalex;
&scaleY = scaley;
}
this is where the problem occurs
the two assignment shows error
 
Change it to scaleX = scalex
 
7:31 AM
no I need the address
so that from where I am getting the scalex changes
 
No you don't
 
that could reflect in my function
I am trying to have the address of the scalex vriable which I got as a parameter
 
That's not how you do it
 
post it as a question that way you get a full solution describing in detail why it's wrong
 
how to do it?
They are saying a message that they are not taking any question from my account any more whenever I press ask question button
 
7:33 AM
What you really want to do?
Lol you ask shitty questions
No wonder
Anyway taking address of a reference is particularly bad idea
 
I have another class. In which if the scale value changes I need to have value change in this class too. thats why trying to get the variable by reference
 
Can you use dependency injection?
 
morning
 
wb tony
 
@BartekBanachewicz what?
 
7:35 AM
And bind them together during construction?
 
@CaptainObvlious wb?
 
let me read about the dependency injection first . I have never heard of it
 
@TonyTheLion welcome back....sorry I haven't left yet
 
morning chap
 
@CaptainObvlious :)
@thecoshman morning fella
 
7:35 AM
Oh fuck onscreen keyboard let me put some pants on
Also morning guys
 
but what is wrong with that assignment? I can have the reference when I take it as a parameter
 
6 mins ago, by dipanjan
when I do something like this &(this->scaleX) = scaleX
this?
 
@dipanjan it's nothing complex really.
 
DrawRoute::DrawRoute(double &scalex, double &scaley) {
// TODO Auto-generated constructor stub
&scaleX = scalex;
&scaleY = scaley;
}
this actually
 
you can't assign to the address of scaleX
that's just silly
 
7:37 AM
the two assignment shows error
 
well, same thing
you don't need any address here
just do scaleX = scalex
done
 
@dipanjan you're trying to assign a reference to the address of a parameter. You can't do that
 
so doing that will copy the reference? @lion
 
DI is more or less just passing object 'foo' the instance of class 'Bar' that you wish it to use, rather then having it hard coded. This allows you change to value of the 'Bar' instance before the 'Foo' instance gets it. (more or less)
 
oops uppercase
 
7:38 AM
@dipanjan will copy the content of the reference
 
but then if the scale value that I am getting as a parameter changes...will it affect the scale of the current class?
 
then how do I make it so that it does?
 
@dipanjan Isee what you're trying to do....that will not work. You cannot reseat a reference
 
oh
I dont understand what you mean though
:P
@captain
 
7:40 AM
@dipanjan references do not work like pointers. Once a reference has been initialized you cannot change the variable that it references.
 
@dipanjan I think what you are trying to do, is tell an object that it should use 'these' variables to read the value from, so that you can change them else where, and your object will see those changes.
If that is what you are trying to do, it is not a very good idea.
 
Yes @thecoshman
I understand now captain
Thanks
 
but such a system can be done, if you really think that is what you need
 
@dipanjan int x; int y; int& z(x); &z = y; <- FAIL
@dipanjan z had already been initialized you cannot change which variable it references
 
to do something like that, you would have to use actual pointers (possible shared... not sure exactly how you want to do it)
 
7:42 AM
Yes I understand captain..thanks very much
 
now go upvote me cupcake
 
hmm thanks thecoshman...I will read about it
how to do that?
how do I upvote here?
 
lol you don't. I'm kidding
 
o_0 don't just star everything man
 
not everything :P the messages that helped me :P
 
7:43 AM
What the fuck with the stars!!!
 
That is almost as annoying as when people flag everything
 
well, normally you would reserve stars for something for everyone
 
is there e limit of the number of stars I can give? :O
 
if it is just something you found helpful, just say thanks
 
Thanks :P
 
7:45 AM
@dipanjan yes. But there is also a limit to the number of stars you should give. They're essentially for something you want the entire room to see. Not just your private bookmark of what you found useful
 
oh ok I understand. Thanks
 
hint: we might appreciate it if you unstar some of those 'they helped me, but no one else would care' posts
 
I already did :P
 
(I like this chap, he clearly listens to our advice)
 
Thanks :P
 
7:48 AM
we get a lot of people who come in with your level of... unknowing... ask for something odd, we tell them it's odd and suggest doing it another way, and they keep on about wanting to do there really stupid thing... it get's tiring
 
If people experimented with programming languages like they do with sex software would be a lot more solid
 
...a lot more what?
Oh.
Odd.
 
user142019
What's up G
 
@CaptainObvlious o_0 you must have a very boring sex life :P
 
I mean the chat. It did not show the "solid" word and then it appeared out of nowhere.
 
7:51 AM
@wilx just kinda popped up on ya did it
 
:)
 
user142019
 
@rightfold Interesting. will have to try building that tomorrow
 
user142019
Good luck finding a compiler that can build it.
 
I have one
 
user142019
7:56 AM
Or well. Maybe it's not that bad.
 
user142019
You need one that does implicit int. :P
 
I still have a copy of the first C compiler I ever used
 
@rightfold is it written in B?
 
user142019
C and assembly.
 
> These are not capable of being compiled today with modern c compilers like gcc
 
user142019
7:57 AM
At least, the file extensions are .c.
 
well, y'know, that can't be first C compiler then
 
@rightfold What? The first C compiler is written in C?
 
@BartekBanachewicz Oldest working compiler I have dates to 1983 and I have versions of compilers from almost every year since
 
user142019
@BartekBanachewicz it can be written in a subset of C, compiled by an almost C compiler! :P
 
@rightfold ...
show me the sources of first almost C compiler then
 
user142019
7:58 AM
Or maybe it's a C and B polyglot!
 
@BartekBanachewicz it doesn't claim to be does it? it's just the oldest one we have code still floating around for I thought
 
I'm sure I have something that will handle it and even if I don't I have a K&R grammar for ANTLR I can pimp up and convert the it like a mormon
think I'll take a closer look at that src
 
hm Terra community seems to be expanding
more and more issues reported and closed
 
Terra?
 
it's the new awsum language
 
8:05 AM
Does the Earth have a bug tracker? :)
 
user142019
 
> Our Terra-based auto-tuner for BLAS routines performs within 20% of ATLAS, and our DSL for stencil computations runs 2.3x faster than hand-written C.
 
@wilx That would cause an overflow to the universal bug counters. ;)
 
wowowow.
that's like, fucking nice. Especially these are auto-tuning systems
IOW programs that can recompile and change themselves according to the needs.
 
8:07 AM
:)
 
yiz
God will fix everything when she's back from holidays in the next e^2393546 years
current bugs are called enhancements, also known as miracles
 
god WTF they have mathematical equations for Lua syntax
 
@BartekBanachewicz That's not new. Even HotSpot can do that.
 
@DeadMG I know it's not new. Neither the authors say it is.
 
@BartekBanachewicz like Java...
 
8:09 AM
right
but what I mean is, why are you treating it like a big deal, it's common
 
not exactly.
 
hell, even Wide can do that if I wanted it to
 
> High-performance computing applications, such as auto-tuners and domain-specific languages, rely on generative programming techniques to achieve high performance and portability. However, these systems are often implemented in multiple disparate languages and perform code generation in a separate process from program execution, making certain optimizations difficult to engineer
Terra&Lua have the advantage of being pretty seamlessly linked.
hm Terra adds cast operator. Not sure if good thing.
 
Realistically, why should anybody care about any other new language?
There seem to have been so many in the last decade.
 
@wilx Let's face it, Wide is the only new language worth talking about.
 
8:13 AM
:)
 
but on a more serious note
 
Xeo
Yeah, it's the only language we can bash right in the author's face.
 
the big difference between now and before is LLVM.
 
Xeo
And on that note, g'morning
 
@wilx Puppy nailed it: LLVM
 
8:13 AM
if you were in 2006 and you invented a new language
you would have to write all the code generation, everything, from scratch
and it would be slow and buggy and a massive undertaking.
now you can just hook in LLVM and get production-grade code-generation and JIT for free.
 
well, there's also PyPy
 
the barrier between "A new language" and "Production-ready" is vastly lowered
 
@DeadMG, @BartekBanachewicz: Scala has JVM JIT behind it. F# has .NET behind it.
 
its authors said it should be similar to LLVM: a VM for making languages
@wilx and? LLVM is not JIT. It's static offline compilation
 
@wilx Neither of those is native- operating in CLR or JVM has serious restrictions.
 
8:15 AM
not mentioning drastic memory usage
and huge redistributable size
 
@BartekBanachewicz That's just one of the serious restrictions I mentioned.
 
Xeo
@BartekBanachewicz LLVM provides a JIT
 
@DeadMG Oh I thought you were talking about stuff like SIMD
 
no
 
@Xeo yeah, I wrote that badly. It can be a JIT and AOT
 
8:16 AM
I mean like, not being able to execute on platforms without VM implementations
 
well yeah, that's probably more serious
 
I mean like, slow and difficult native code interoperation
 
like C# <-> C++?
 
I mean like, only having semantics supported by the underlying VM instead of arbitrary semantics
 
oh, VMs are quite low level. I mean, look at JRuby or Jython
 
8:17 AM
it's really not the same as that offered by LLVM
 
but yeah, I agree that this VM concept has serious flaws.
 
and finally, I also mean not having massive security issues
 
oh derp.
 
if you're Scala, then running on the JVM is really not an advertising point right now.
 
I wish google finally abandoned java on android
maybe if Ubuntu phone takes off...
 
8:20 AM
I doubt that will happen. There is a huge pool of apps based on Java, is there not?
 
you can be screwed with C instead?
anyway, I'm not saying that the new generation of languages are greater than anything that came before them, or that any of them (except Wide, obviously) are even any good or will ever be useful
all I am saying is that LLVM means that there is a massively lower barrier to entry
 
ohai Puppy
 
well Terra can add two numbers, so I guess it's still a better choice than Wide now
:)
 
ohai ugly tony
@BartekBanachewicz Wide can multiply numbers now as well as add them! mwahahaha
 
@DeadMG are you making use of it?
 
@thecoshman Of course.
 
@BartekBanachewicz lol
 
I'd never have gotten Wide off the ground without LLVM.
 
user142019
Fap fap fap.
 
@DeadMG taking the lazy rout I see (yes yes, I know it's silly not to)
 
8:24 AM
heh
 
the lazy root.
I am having hard time picturing this.
 
yeah, it's simply not feasible to produce a new language like Wide without a vast amount of time or LLVM
 
Xeo
std::future<float> lazy_sqrt(float);
3
 
user142019
Neat.
 
aha, yeah.
 
8:25 AM
shut it y'all ಠ_ಠ
 
Main() {
    range := function()[min := 0, max := 10] {
        if (min == max) return Optional!(int8)(None);
        return Optional!(int8)(min++);
    };
    range
        | Map(function(int8 val) { return val * 2; })
        | Filter(function(int8 val) { return val < 10; })
        | ForEach(function(int8 val) { std.cout << test.to_string(val); });
 }
 
user142019
Shut up @thecoshman we're in an important discussion.
 
is what I have just been compiling
 
Xeo
@DeadMG s/LLVM/LLVM and still a vast amount of time/
 
@rightfold ¬_¬
 
8:26 AM
@Xeo At the end of March, I could only compile "Hello, World". It's only been a couple of months since then.
 
Hmm.
 
@DeadMG how does function() do capturing? in those []?
 
@DeadMG lol
 
@BartekBanachewicz Implicitly by value by default. The [] are for uniform captures- when you need a custom initializer.
since min and max don't exist in Main to capture, then you need a custom initializer for them.
 
value by default sounds scary.
 
8:28 AM
safer than reference by default
 
Xeo
How about "no capturing by default"?
 
I dunno. Look at this:
 
Who's gonna write the first book on Wide?
 
@TonyTheLion Er, it would basically have to be me.
 
user142019
Use only globals. Capturing problem solved.
 
8:29 AM
{ var x = 4; { x = 3; } }
 
@Xeo Too much lazy.
 
Xeo
what.
 
@BartekBanachewicz wat.
 
Xeo
Just provide a shortcut for by-val or by-ref capture
 
@Xeo I have [&] like C++ for implicit by-ref capture.
 
8:30 AM
@DeadMG that's valid C++. Would you think x is captured by value?
 
@DeadMG oh I can so imagine that. It would probably go something like:
Wide by The Puppy
You suck! You don't deserve to learn this language

The Puppy
 
@BartekBanachewicz Er, no it's not. Presumably, you meant auto instead of var. And actually meant to introduce, y'know, something that actually captures something, instead of just a new scope.
 
user142019
@BartekBanachewicz Blocks aren't lambdas.
 
Can Wide add two numbers yet?
 
@DeadMG class var { /* fuck you, not relevant */ }
 
user142019
8:31 AM
@TonyTheLion ja
 
Oh, that sample doesn't actually have it anymore. Yes, I can.
 
@DeadMG I am merely pointing out the inconsistency
 
@BartekBanachewicz It's not inconsistent at all. Another scope in the same function is a totally different thign.
 
@BartekBanachewicz Wait till I point out your inconsistencies :P
 
8:31 AM
scope captures implicitely by ref, and you want lambdas to capture implicitely by value
 
Xeo
@DeadMG And why not the same for by-val capture?
 
@BartekBanachewicz Scopes don't capture anything, at all, ever. What the fuck.
 
hmmmm
 
@Xeo I could do if I wanted to.
 
Xeo
I think implicit-by-val capture is... strange
 
8:32 AM
How's it in C++?
 
Xeo
No implicit default
[] captures nothing
 
Xeo
[=] by-val, and [&] by-ref as the default
2
 
nothing: an absence of all things. An interesting thing to capture
lol
 
8:35 AM
@BartekBanachewicz Again, scopes are COMPLETELY INCOMPARABLE TO LAMBDAS.
 
I don't see why they should be incomparable.
but w/e
 
because scopes are guaranteed to exist in the lifetime of the function
lambdas are not.
 
that's just one immediate and extremely important difference when talking about the lifetime semantics of captures....
 
anyway, do like Xeo says and let [] mean no capture
 
8:36 AM
... actually you just leave off the [] for the default (if I choose to make that mean capture nothing)
    | Map(function(val) { return val * 2; })
 
Yay more languages with manual closures
 
as opposed to the compiler magically guessing your code?
 
@DeadMG don't listen to Cat dammit. He's an expert in language design.
 
Is he?
Are you?
 
lol I am not of course
 
8:41 AM
@BartekBanachewicz He's an expert in grumpiness
 
Yeah why do I ever bother
 
In fact, he could probably get a PhD in "The art of Grumpiness"
 
Like Dr Horrible
PhD in Horribleness
(Refer to Dr Horrible's sing-along blog)(a musical)
 
@CatPlusPlus Maybe because you like helping others?
 
My gift to you today:
def useless_lambda_generator(lvl=1): return '[](){%s}();' % useless_lambda_generator(lvl - 1) if lvl > 0 else ''
 
8:43 AM
ohhh gift
 
@ereOn is it some weird language?
 
@BartekBanachewicz Python.
 
@ereOn ahh weird language
 
can be run with python -c <code> for those who really have time to waste :)
 
I've heard it beats you with a clue stick if you don't indent your code
is that true?
 
8:45 AM
@BartekBanachewicz: Yes. But it almost never happens, provided that you have a decent text editor.
And that you follow the PEP8 guidelines.
 
@ereOn I use MS Word
is that ok for python?
I like to use different styles for my function names so that they stand out
 
Xeo
0
Q: Curly brackets after for statement

judasHey! I'm a newbie. Wrote a code to print sum of number from 1 to 10 Here's what happened; `for(a = 1; a<=10; a++) sum += a; cout<<sum;` executing that gave me the correct answer i.e 55 When I execute the following: `for(a = 1; a<=10; a++) { sum += a; cout<<sum; }` It gives me a complete di...

...
 
Nice question.
 
hey it's a funny question
 
Xeo
Has anyone seen Jimbo and StoryTeller in the same room at the same time? — user93353 52 secs ago
lol
 
8:54 AM
anyway time to head off to uni
 
Xeo
@BartekBanachewicz It's a no-research question.
 
Hi guys, what's up with liveworkspace.com?
 
I like how it's tagged C++11
 
It's been down "for maintenance" for weeks now?
 
Xeo
@Potatoswatter Months, no?
 
8:56 AM
Hmm, back to Comeau Test Drive as a proxy for ICC :(
 
@Xeo which is orthogonal to funny
@Potatoswatter proxy?
 
@BartekBanachewicz It's ooold
 
but what are you doing really?
 
NOOOOOOOO Comeau's DNS registration has expired!
@BartekBanachewicz Who, me?
 
8:58 AM
I'm abusing the preprocessor:
#define NOT_A_FUNCTION IS_A_FUNCTION(
#define IS_A_FUNCTION( X ) foo

#define SIMPLE(X) NOT_A_FUNCTION
SIMPLE( NOT_A_FUNCTION ) 3 )

#define INNOCENT(X) X ## TION
INNOCENT( NOT_A_FUNC ) 3 )

#define EVAL(X) X
EVAL( NOT_A_FUNCTION ) 3 )

#define ENCLOSED_ARG(X) X 3 )
ENCLOSED_ARG( NOT_A_FUNCTION )

#define ENCLOSED_LITERAL(X) NOT_A_FUNCTION 3 )
ENCLOSED_LITERAL( NOT_A_FUNCTION )
 
aaaargh
too many macros
take it away :/
Y U NO Wave?
 
Well they're not calling each other, aside from the first two. They should all do the same thing in almost the same way.
But GCC and Clang fail in a very specific way and I want to see if the other PPs follow the same pattern.
I have my own complete preprocessor: code.google.com/p/c-plus
 

« first day (949 days earlier)      last day (4014 days later) »