« first day (762 days earlier)      last day (4178 days later) » 

4:00 PM
nah, all you have to do is return the type.
the user can instantiate it.
 
And that's generalizing what?
 
Yes, that is very similar to what we have.
Totally.
 
well, in theory, you could use the horrific macros to take the regex at compiletime, and use the Turing-Completeness to generate the requisite type, and then provide a typedef for that type.
so it's not actually particularly dissimilar
 
I don't see how the fact that you can do the same thing with a token replacement system is relevant.
 
the preprocessor only converts from individual characters to mpl_vector<char, 'r', 'e', 'g', 'e', 'x'> or whatever it is
it's not particularly relevant
 
4:03 PM
Yes, and? Now you have the same old TMP.
The fact that you can get the same effect doesn't make it any more similar.
 
what is a token?
 
well, it is pretty much the same thing, you take a "string" (insofar as such an mpl_vector<char> is a string), and you return a type which has X interface for matching regexes and Y implementation which is specific to that regex.
 
Because you don't want to provide the effects, you want to provide the tools.
 
all I've suggested
 
Someone cynical might just say that you want the power of TMP without needing to learn TMP and how to write pure functions. Not just from today's conversation, but also from past descriptions of Wide. That's not a bad thing on its own, but I find the claims that "it would be more powerful/simple/general" dishonest.
 
4:05 PM
what is tmp?
 
hmm
 
@DeadMG That's irrelevant. You don't want to provide black boxes, you want to provide the innards. And the innards are nothing alike.
 
Not least because you would instead learn, well, that system. Which is not like programming, and reportedly not like metaprogramming (as we have it right now).
 
I find it difficult to see that "Opens up entirely new paradigms (in this space) which are vastly more similar to the ones that people are already used to using" is not an increase in power or simplicity or, indeed, generalization. "Use your existing code and skills for new purpose" is fairly generalizing.
and, in a sense, you're right, in that I'm not a functional person and I don't see why functional should be the only applicable style for implementing a metafunction (although I can sure see why you might want a pure interface).
 
so, are you all c++ programmers?
 
4:08 PM
@alfalfa More or less, yeah.
 
cool, im a c++ programmer too !
 
@alfalfa No. I'm a programmer, and I sometimes use C++, but I'm definitely not a C++ programmer.
 
but u use c++? then ur a c++ programmer!
 
@alfalfa No, I'm not.
 
see my logic? there u can see that im a c++ programmer!
 
4:09 PM
@DeadMG There is something to be said about bondage and discipline languages. Of course, there is also something to be said about lax languages. The only objective measure we otherwise have is expressive power. If your claim is that "it's more powerful in that there are more ways to express the same" then I'm not interested, as that would not be an objective increase of expressive power. It would be a subjective change.
 
user1804599
@alfalfa I don't use C++.
 
@LucDanton Then I could also argue that all Turing-Complete languages have equal power.
 
@alfalfa No, I don't see your logic, and I'm not sure you really have any. I am pretty sure that C++ demands more care with spelling, capitalization and punctuation than you seem willing to use.
 
ur mean
 
but that's a silly argument, because as we all know, in reality, some things are much easier to express in some ways, and some things are almost cripplingly complex and difficult to express in some other ways.
 
4:11 PM
@DeadMG Not expressive power, no.
@DeadMG See? You just agreed.
 
not really
 
Ya, not really.
 
if you solved P = NP, it might not strictly increase whether or not you can compute subset sum, but in reality, it sure as hell would make a huge difference.
 
@alfalfa No, I'm well above the mean (or the median or the mode, for that matter).
 
how can i make such a @blabla ?
 
4:12 PM
Nov 8 at 13:21, by Tony The Lion
If you're new here, read the newbie hints. Thanks!
 
in the newbie hints they treat me like a baby, they dont tell me how to use the chat
 
: /
lifes hard huh
 
@alfalfa Hover your mouse over the message, and an arrow will show up at the bottom right corner of it. Click on that. The newbie hints do tell about this if you just read through them.
 
user1357851
4:14 PM
@R.MartinhoFernandes that is as freaking useful as a frog's nostril
 
@JerryCoffin ah i see
 
anyway, I think that being able to use existing OO or imperative code at compile-time would certainly count as generalizing that code, and the skills that produced it.
 
@alfalfa Nicely done.
 
@JerryCoffin ;) im a c++ programmer after all
 
@alfalfa Not sure what that has to do with C++, but okay.
 
4:16 PM
@Telkitty I don't care what you think. You have a history of not reading and of eschewing learning.
2
 
@JerryCoffin u wanna help me make a computer game? the best, most fun, most awesome in the world?
 
@DeadMG Returning a type is novel. I remember you hit corner cases regularly in describing Wide?
 
@LucDanton Yes. It was certainly a beneficial experience.
 
@alfalfa There are some people here working on something called kyrostat. It's been about 30 years since I spent any time writing games so I'm probably not the best one to help with that in particular.
 
and one of the questions I certainly can't answer would be what the grammar would look like for performing such an action as an extension to C++.
I had to perform some serious re-engineering on the Wide grammar to make that stuff work
 
4:18 PM
Screw grammar. Semantics are important!
 
indeed
 
@JerryCoffin It will probably be about 30 years before kyrostat is done. If ever.
 
what is kyrostat?
 
user1357851
@LucDanton depends whether you are talking to the pc or a user
 
btw, how old are u guys here?
 
4:20 PM
@alfalfa The intent is a game, but the robot is right -- it doesn't seem that a lot is getting done in any hurry.
 
user1357851
R. Martinho Fernandes is 13, the rest 20-40 mostly
 
robot is actually fairly ancient and leathery
 
@alfalfa All kinds. We have people from 16 to, I believe, over 50.
 
Most of us here are between the age of 1 and 100.
 
In any case I don't think it's super healthy to consider any addition or extension to a language as a straight improvement. In all likeliness, tradeoffs are involved.
 
4:21 PM
@Telkitty Really? 20-40? What exactly does "-20" mean as an age? :-)
 
oh, so i must be pretty special beeing 101
 
yeah, I think Alf, the ape, and Jerry are far from young hipsters, whereas Ell hasn't even entered university yet.
@LucDanton Quite true.
 
@DeadMG Alf's profile says 50.
 
Plus when you figure out what is really a superior alternative to something you had before in all likeliness it means you wrote a stupid first version.
 
I'm down with that
a lot of the stuff in C++98 was pretty stupid, or, designed that way for reasons that no longer exist.
 
4:22 PM
@DeadMG I'm not sure what that means.
 
@R.MartinhoFernandes I don't know for sure, but I think Alf, sbi and I are all within about a year or two of the same age.
 
@R.MartinhoFernandes Aren't you in your eighth year at university or something like that?
 
I am at the ripe age to become a protector.
 
@R.MartinhoFernandes Protector? Parent?
 
user1357851
@JerryCoffin I find you very newb friendly, that reflects how mature you are in comparison to the rest, mentally that is.
 
4:23 PM
On a higher-level I'm surprised that we can't move on from "let's not break legacy code" and "look what language versioning has done to Python!".
 
@LucDanton I agree.
 
@Mysticial Nah. Just some silly reference en.wikipedia.org/wiki/Pak_Protector
 
one of the main things that guy said in the "always value-initialize primitives" thread, which I completely agree with
eventually, you will have to start cutting features and versioning the language
it's just not sustainable to continually add, and add, and add
 
I'm in chat twice :D
 
@R.MartinhoFernandes ah
 
4:24 PM
@Telkitty Why thank you -- I think. I guess I shouldn't feel insulted though -- I've never felt particularly mature...
 
@DeadMG But nobody has done that! So I'm left wondering that is the conceptual difficulty that hinders it.
 
@DeadMG I'm only five years older than you or something like that.
 
why don't you guys accept me as your god?
 
Best you get is languages and/or dialects sharing an ABI.
 
@Crowz who are you again? :p
 
4:26 PM
I'm crowz ._.
 
user1357851
newb in training :D
 
@DeadMG Isn't that called "making a new language"?
 
@R.MartinhoFernandes What I've been thinking.
@LucDanton I think it's more of a practicality.
 
Because I think that's the fundamental impediment to doing it.
 
learning the C++ because I am only java and C proficient (and that's kind of a long shot to say "proficient");
 
4:27 PM
I mean, consider
"Let's make a new language, based on Java."
but you know what? There's already C#. So probably, if you want a Java-like language, but better, there's already C#.
 
@LucDanton Backward compatibility. If you're going to lose it, it's often easier to just start over. In fairness, however, I have to add that it has actually been done: Fortran has actually completely removed some old features (and C++11 officially removed export, but given actual support, it would be pretty easy to claim that was never really part of the language even if it was in the standard).
 
@Crowz That's somewhat similar to me. Except that my C++ has caught up to my Java.
 
whereas for C++
it's easy to say "Let's invent a new language", but who has invented (and actually implemented) a new language that's like C++ but better? Nobody.
 
Xeo
D! /trollface
 
I feel like I should just learn actionscript
 
4:28 PM
Db!
 
@DeadMG lol @ the edit.
 
twas necessary to add
 
@DeadMG Indeed -- talk is cheap.
 
Xeo
Btw Robot, do you actually have something like a variadic function in Haskell or do you abuse tuples for that?
 
But I like how it implies that it was already invented, just not implemented.
 
4:30 PM
@JerryCoffin "Why can't I have my backward compatibility cake and eat it too (without legacy)?" is one of the questions that I feel are begged here. Why can't I continue writing a preexisting program with e.g. new parts of it in the new, better and reduced language?
 
@Xeo You have curried functions all over, remember? You can fake it with type classes thanks to that. I have never found it particularly useful.
 
@Xeo func :: [a] -> b I guess you have to abuse lists, not tuples, to make a variadic function.
 
@R.MartinhoFernandes Lots of people have (at least partially) defined languages they think would be better -- but most never amount to much more than doctoral dissertations, with just enough code to let them get their degree.
 
@R.MartinhoFernandes Well, I do think that it's right in the stage of development to start messing with implementations, but then I'd have to deal with LLVM in Windows.
@LucDanton What I think modules could do.
 
@Code-Guru But that requires homogenous arguments.
 
4:31 PM
all you'd need is to say "X filetype (implementation defined) is Ye Olde C++, and Y filetype (implementation defined) is New C++."
 
@R.MartinhoFernandes yah...good point.
 
then "They interact in Z way."
 
@R.MartinhoFernandes I'm a Haskell noob.
 
Xeo
@R.MartinhoFernandes How does currying help here? It's just decomposind an n-ary function into n unary ones, isn't it?
 
@Xeo Currying helps for calling. Lemme grab an example.
 
4:32 PM
@R.MartinhoFernandes Makes for cute code when it compiles and is useless when it doesn't, right?
 
Xeo
@DeadMG What's a filetype that works for source except a plain text file? Binary? :P
 
@LucDanton Right.
 
@LucDanton You probably could, but to do it you'd have to also define some sort of compiler-control meta language. Of course, that's possible too, but it starts to add a fair amount of complexity for what I'd guess many see as minimal return. Of course, to a limited degree it exists already -- some people certainly have projects that require parts to be compiled with std=c++0x or std=c++11, and other parts without -- just the compiler control is in a makefile.
 
@Xeo The best option would probably be to just drop into Template Haskell and do it with that.
 
Xeo
Wait, drop into what?
 
4:34 PM
@JerryCoffin I'm just surprised I can't read about the challenges that someone must have already faced when they tried just that. Well, surprised that I can't find it laying right before me on the Internet without me exerting any actual effort I suppose.
 
9
A: How to define an arbitrary arity function in Haskell, which includes an arity of 0?

RotsorWhat about class X r where foo :: A -> r instance X r => X (E -> r) where foo :: A -> E -> r foo a e = foo (combine a e) ? You may want to have a look at the PrintfType instances. It's only because of them that I was able to provide an answer.

 
@Xeo Marry the two true loves of your life together: templates, and Haskell!
 
@Xeo Template Haskell. It's basically running Haskell at compile-time, with the ability to manipulate ASTs and shit.
 
Xeo
Oh, cool.
 
Anyone know of a good dupe for this?
0
Q: why does compiler doesn't allocate memory to the variable declared inside class?

l4zyw0rmwhen we declare some variable inside class or struct in c and c++ , we have to make an object of class or struct to allocate memory for the variable . why we can't just access these variables without any object ?

The title is misleading btw.
 
4:37 PM
@JerryCoffin FTR that should barely work and will likely not work as C++11 improves (and requires significant binary changes). Unless you drop down to extern "C", but you know: different dialects that share an ABI.
 
@LucDanton Because AFAIK, nobody has really tried it.
 
Xeo
@R.MartinhoFernandes Okay, I have no idea how that works. :)
 
@DeadMG I find that hard to believe.
 
Rust has something like that.
 
Really?
 
4:39 PM
It's been a while since I read about so I can't give many details.
 
I need to read bad things about Rust, I'm surprised at the amount of things it gets right.
 
@Xeo The basic idea is that you have a type class with the function you want. That function's return type is of that class. Now you make functions from something to types of that class also be instances of that class. Then curry around.
I have a feeling what I wrote is harder to understand than the code. I tried.
 
@LucDanton I don't find it particularly surprising. Most language designers strike me as fairly tactical and (to be honest) rather narrow-minded thinkers. Many (most?) seem to think in terms of "this has worked well for me at the moment, so it's what everybody should do forever." That mindset doesn't fit well with your concept.
@LucDanton Yes, it probably won't work for very long, but I've seen some that's like that right now.
 
@Mysticial uhhhh
 
The CEO just gave us a speech. We got the afternoon off, and they're paying us tickets to get see the new James Bond. I like my job.
2
 
4:43 PM
@EtiennedeMartel That is pretty cool. Enjoy.
 
@kbok The real question is: "Why do you need an instance to access the fields?"
 
@EtiennedeMartel You're an asshole. You could have shut up about it. @kbok you are down to fourth.
 
@R.MartinhoFernandes Hahahahaha
 
i think a main problem is that visual c++ doesn't yet support or fully support very many of the new features
 
@Mysticial Yeah, this is a very basic question, but very badly worded. Hence hhuuuuhhh
@R.MartinhoFernandes Dang.
 
4:44 PM
like std::initialiser_list, and constexpr
 
@R.MartinhoFernandes lol
 
not to mention variadic templates (event though they're in the november CTP)
 
So what's this "rank" that I seem to be missing?
 
@Mysticial I never thought robot tears would be so delicious.
 
some things like [noreturn] can be wrapped in macros
but those i mentioned can't
 
4:45 PM
@EtiennedeMartel I truly envy you. I spent the last 3 hours chasing a bug in some shitty legacy code that was due to the build system not working correctly and object files not being recompiled on a change. tl;dr I wasted my time.
 
Nah, 3 hours is nothing...
 
@EtiennedeMartel Somehow I think that would taste like coca-cola.
 
Ever since the 4-week episode that I went through, I've had to significantly step-up the way I code large projects.
 
@Mysticial Okay, what about "I wrote/edited max. 10 lines of code last month" ?
 
Oh wait, Rust has nominal typing only? Suddenly it sucks and I hate it. There, that didn't last long.
 
4:47 PM
@LucDanton lol
 
@kbok If it takes 3 hours to debug 10 lines of code, then there's definitely a problem...
 
@Mysticial No, I mean, in the last month I edited a max of 10 lines of code and the rest was spent debugging the 100kloc of shit we have
 
@kbok ah
 
So you didn't add new bugs! That's good.
 
:p
Next month my bug production rate will fall drastically.
 
4:51 PM
One way to stop producing bugs is to not touch any code. :P
 
I think this needs bashing ^ :P
lol
it has a chapter called Your pal, the pointer
erm, pointers are never your friends
 
That's on Hacker News right now.
 
that's where it came from
 
I dunno, do you have the book? I find it hard to bash something without taking a look at what's in it.
@TonyTheLion Don't forget this is C, you're kinda "stuck" with pointers.
 
Apparently it's ok (as per the comments)
ofc you still have to deal with the fact that C sucks
 
5:04 PM
:D
 
 
...I'm your friend, and I'm not just gonna stand around and let you do this!
*sits down*
 
Is there any modern proposal for allowing to write thin, transparent proxy in C++? E.g. given a struct foo { bar& b; }; there is a way to express that f.whatever_member_not_in_foo will result in f.b.whatever_member_not_in_foo?
Ah yes, the 'use cases for compile-time reflection' proposal mentions that.
Seems overly ambitious really (compile-time reflection that is).
 
user1804599
> Learning C++ from Internet tutorials is rather akin to learning how to cook by analysing some chewing gum you found in the street. — Lightness Races in Orbit
 
Tomalak strikes again
> I do not often use this account.
He does.
 
user1804599
5:15 PM
Depends on how you define "often".
 
Everyday sure looks like "often" to me.
 
user1804599
Maybe his definition of "often" is every hour.
 
He just didn't update his profile since he ragequit. No big deal.
 
user1804599
lol
 
It's actually pretty hard to completely leave this site.
Most of the rage-quitters that I've aware of have come back at least once.
And even when you're not rage-quitting, pretty much every time I google for something about coding, it leads me straight back to SO.
 
5:25 PM
I like you guys
A lot.
Like... more than friends
<3
 
@Crowz That can't be good...
:)
 
@Mysticial It's like a serious case of cancer -- no matter how many operations or rounds of chemo-therapy you endure, you can never be entirely free of it...
 
The only difference is that it doesn't kill you.
 
Hey guys, anyone familiar with edge detection algorithms?
 
Xeo
@Mysticial You never know just how bad the rep addiction could get...
 
5:31 PM
@Xeo It was pretty bad when I first started.
But now I don't care much about the total number.
 
Xeo
It's always.
I recently had a bad time when I absolutely wanted that gold badge.
Now it's a phase of "fuck it" again.
 
I care more about delta-rep now... and being to hit 200 each day.
 
Quick general programming question: can you do something like this?
 
@Xeo Well you have it now, and I think you beat Kerrek to it?
 
@Mysticial ...but it's still much better when the number is a multiple of 5!
 
5:33 PM
@JerryCoffin That's pretty much the only thing that matters in the total number now. :)
 
Anyone mind helping a noob out? I'm trying to track down why this terminal emulator is eating up 50% CPU on our servers and crashing them. O_o xperf is showing me lots of weight on KeAcquireSpinLockRaiseToDPC, KiPageFault, and a whole load of functions involving pages. Does it stand to reason that the program simply isn't handling paging correctly? Or does it just not like running out of memory? Pardon me if this is a terrible place to ask. =D
 
String name="duh.jpg";
    write("C:\\Test\\"+name);
 
I have "somewhat" of a goal or reaching 100k with under 1000 answers. Not sure if that's been done before, but there are 100k users with more than 100 rep/answer ratio.
 
@Mysticial I go for the opposite: answering questions so obscure almost nobody even notices their existence...
 
@JerryCoffin The SSE questions that I answer all fall into that category. But I answer them anyway because I feel like it.
 
5:38 PM
@Crowz How is String defined? If it's similar to std::string, then yes.
 
@JerryCoffin I am actually doing java right now hah
 
@Crowz So why would you ask about it here?
 
Don't you have to open/make the file first?
 
@JerryCoffin Rewriting it in C++, because it's totally sucking in java
 
@Crowz Well, in that case use std::string so the answer is yes.
 
5:40 PM
I can't quite get the math down on this one, it's not detecting the edges very well
 
what?
 
A program I am working on, Dead.
 
hey guys...can anyone tell me what algorithm will give (a) child of a spanning tree? [Traverse through the graph until it finds a child]
 
bloody hell, what is this, helpdesk night?
 
Haha... all downvoted:
-14
Q: How can i solve this in c++ program

Haifa AbdulazizWrite a program that prompts the user to enter a character. then the program will identify the type of the character (digit, uppercase, lowercase, special character). using a function named typeOfChar that will receive the character and return a string. help me please ;(

 
5:42 PM
@DeadMG Not where I am, it's not. Still morning here!
 
@R.MartinhoFernandes Wow, that Pak Protector stuff sounds pretty cool. I kind've want to go into that Universe.
 
And still morning here as well.
 
room topic changed to Lounge<C++>: It's headdesk night, not helpdesk night. [beep] [c++] [c++11] [c++-faq]
 

Help Desk

For Turbo C/C++ and Dev-C++ questions
 
@Mysticial ...for a few more minutes.
 
5:43 PM
@kbok I like how dead the help desk is xD
 
Why is the java chat room always empty?
 
Why is the _*_*_java_*_*_ chat room always empty?
 
@Crowz Java sucks so much that anybody who stays there long gets the life sucked out of them.
 
But java is the only language I am mediocre at :(
 
Well, there's plenty of industry that uses Java. So go ahead and jump in it.
 
5:46 PM
I just want to make my program right, it's written in java right now and I want it to be an actual program and not just an algorithm
 
I'm willing to answer Java questions here. If I feel like it. :P
 
What does it mean to be an actual program?
 
@ThePhD ask @Tron
 
@melak47 Or maybe @Robot ?
 
@Crowz "make my program right" or "in Java". Choose one.
 
user1804599
5:47 PM
@Mysticial What is the population of Java?
 
@Mysticial Are you familiar with edge detection? Haha
 
@Aardvark Looks like it's about 138 million.
@Crowz Nope... :)
 
Damn.
 
@Mysticial that's one big island.
 
@Crowz There are many java image manipulation programs out there.
 
5:49 PM
@ThePhD any fast ones?? :>
 
@melak47 Or rather crowded island.
 
@melak47 Shrug.
I don't think OpenCV itself even has java bindings.
 
Here's mine. I can't figure out how to into matrices in C++
 
@Crowz you can do the matrix however you like.
 
@melak47 I mean, is there an API for convolve and matrix in C++?
 
5:53 PM
@Crowz Not directly no. Unless you're really patient, you might want to do it in OpenGL instead.
 
int matrix[DimX][Dimy]or std::array<std::array<int, DimY>, DimY> matrix or struct matrix { int _11, _12, _13, _21, _22, _23, _31, _32, _33; }; or ...
 
@JerryCoffin Oh God opengl... horrible... nightmare visions!
 
@Crowz You have to write your own Convolution operators. I've done it before. It's not terrible.
And I did this a long time ago, before I even did my raytracer.
 
@Crowz I herd u liek C, so how about Cuda? :3
 
@ThePhD Yeah but I am a total noob
This is the result of the algorithm, if you're wondering
 
5:54 PM
@Crowz And I was.... a total pr0?
 
 
Wow, that's one creepy fucking face.
 
Exactly. I want it to be better
 
I don't see how you can make a creepy edge-detected face less creepier?
 
@Crowz that's not Lena!
 
5:55 PM
@melak47 It's apparently boxxy.
Or, boxxy2.
 
@ThePhD Someone is reading the code!
 
run this one through your edge detector :)
 
@ThePhD Did you mean fucking creepy face?
 
@StackedCrooked You know, I'm not sure. I think it could go either way, because fucking can be part of the adjective along with the creepy or it can be an adverb.
The problem is that fuck and its derivatives is a noun, verb, adjective, adverb, etc. It can go everywhere!
 
5:58 PM
Ah, so it's like const volatile T vs volatile const T.
 
Mmmhmm.
 
@melak47 One sec doing it now
 
@Crowz ................I see why you want to do it C++ now. :p
 
 
@ThePhD That's not a bug, it's a feature. "fuck" is the universal word!
 

« first day (762 days earlier)      last day (4178 days later) »