« first day (1098 days earlier)      last day (3866 days later) » 

7:00 PM
@caps Sure. He's just hiding in shame, I presume. Hello
 
Ell
I might give up and make a web app instead. Not that that will be much easier :/
 
@sehe Hello.
 
@MohammadAliBaydoun How come?
 
@caps Oh. I thought that was a rhetorical question.
It is just, most people new here have a question.
 
@Pawnguy7 I don't have a particular question.
I wonder sometimes when it's better to use switch-case statements and when it's better to use if-else if...-else statements
do you feel better if I have a question? :0
* :)
 
7:06 PM
I am indifferent.
 
huh
here's me about to break out the bin buton
 
Some people here have a distaste for questions.
 
I'm just an amateur C++ programmer who's hoping to learn stuff by osmosis, I guess.
 
So far, I have learned I am terrible. That is about it :D
4
 
@Pawnguy7 You're on an exceptionally effective college if you learned it there
 
7:09 PM
@caps If/then/else is mostly useful if you want to rank things, and only use one alternative, even if (for example) a value might also fit other alternatives. For example, if (x==14) do_this(); else if (x < 20) do_that();.
 
@caps The only true way :/
 
@sehe the try way? huh?
 
Ell
Okay android. You win. I give up. I'll go back to my lowly deskop with my lowly c++ :/
2
Now to solve that whole compression jobby
 
@sehe I thought the true way was to do stuff and learn from experience.
 
@caps What's the difference :] I assumed that was included
 
7:11 PM
@caps The true way is: "If at first you don't succeed...destroy all evidence that you tried."
 
lol
 
@sehe I am not sure what you mean
 
@Pawnguy7 colleges aren't usually very effective at teaching essential experience/insights. Getting self-insight like that is certainly a positive exception!
 
@JerryCoffin If at first you don't succeed, then you're a failure. The lesson is, never try.
 
@R.. As plenty of others have said, the compiler is still entitled to optimize this, and all three compilers tested (MSVC, gcc and clang) do so. So-what if it's TCO. It's reality. — sehe 4 secs ago
 
7:20 PM
@sehe I mean what I have learned here, addressing caps' reason for coming here. I don't think that is new here, though. I have been doing that for a while, in various things.
Unfortunately, I am a bit too far on the spectrum.
I am not confident enough to make anything.
 
Are we supposed to follow links now? What do these projects do? Why do you want to know what differs? Do you have reason to believe their the same? Why would that matter to you? — sehe 5 secs ago
 
huh
the first ever Wide program was compiled on the 2nd of January this year.
that's going to make for some easy milestones
@sehe *they're
 
@DeadMG Thx, fixed
 
I should learn what LLVM is someday.
 
@Pawnguy7 Compiler backend.
 
7:22 PM
@Pawnguy7 Oh. I've learned heaps and heaps. Mainly about sanity of thought. Reason tidy. See it through. Profit
 
@DeadMG I get that, but I really have no clue how it works.
 
@Pawnguy7 IIRC: Clang can compile C++ code to LLVM bytecode. Bytecode can be executed using a virtual machine. Bytecode can also be compiled to a native executable.
 
well, how it works is that you give it a codegen tree, and it spits out some assembler.
or some bytecode or ir or whatever you really want
as for how LLVM itself works internally
I frankly don't want to know.
lots of unpleasant details like register allocation algorithms
 
user1804599
@Ell C++ <3
 
@sehe I suppose saying it was the only thing was not entirely accurate. I have learned several things. For example, I am not making those manager/collection things, in theory will make better exceptions, not using strings internally, etc.
It is just, almost all of these started with a "your code is terrible. You should at least do X", etc.
 
7:28 PM
that's how it started for me too.
I was an IReferenceCountable etc etc
 
Interestingly, I always seem to get complaints when I am not working on it at the moment.
 
user1804599
I wanted to do getter/setter generation in C++ when I came from Objective-C. :P
 
ah
 
user1804599
It was my first C++ question on Stack Overflow, actually.
 
I came from Lua and I hated all this "State the type" shit.
I was like, "WTF you guys doing"
 
7:29 PM
I feel the opposite :D
 
lol
eh
it was worth it- I met templates right away
 
user1804599
I joined this room shortly after starting learning C++, so I didn’t do too much bad stuff.
 
user1804599
Never really used new and delete manually, for example.
 
@sehe How come what? :o
 
@not-rightfold Me neither.
 
7:31 PM
@DeadMG There is no try. There is only do or not do!
2
 
@JerryCoffin try { do(); } catch(...) { not_do(); }.
 
user1804599
$ do || !do; try
try: command not found
 
@DeadMG I came from...wait, we don't have enough time to even think about getting into that! :-)
 
Ell
@not-rightfold Nor me. I really only learned c++11
 
why not just leave it at "Before the dinosaurs"?
 
Ell
7:33 PM
(to my recollection)
 
user1804599
@Ell Me too. :P
 
@Ell Just as well that way.
 
user1804599
Though I can remember being annoyed by clang not implementing lambdas.
 
user1804599
So I used Objective-C lambdas. :D
 
user1804599
… which didn’t work with std::function. :<
 
7:35 PM
I had some... not so good habits :D
I was terrible at bounds checking before.
 
user1804599
.at :V
 
@Ell I used VS2008 but only for a couple months when I was still like, "err....what's a template"
after that it was straight to rvalue refs and lambdas for me.
 
user1804599
Wait.
 
user1804599
I recall using cplusplus.com tutorial about seven years ago.
 
vectors are for people who know better.
 
user1804599
7:36 PM
But I got scared by the word “polymorphism.”
 
@not-rightfold Would have been about four and a half years ago for me.
 
user1804599
I didn’t really do much beyond reading from cin into a string.
 
user1804599
I got bored and started learning PHP. :F
 
user1804599
Followed by Ruby and Objective-C, which were fun.
 
user1804599
7:37 PM
And now I’m here, with my C++-crippled mind.
 
You say Go has declarations right, correct?
 
user1804599
Not sure if they call it declarations.
 
"declarations" and "right" are not two things that go together.
 
user1804599
But yeah you can declare a variable.
 
@ScottW you are
 
user1804599
7:38 PM
var x int // x is implicitly zero
x := 0 // same thing
 
fail.
 
func add(x int, y int) int
 
user1804599
@Pawnguy7 You cannot do that without defining it immediately.
 
user1804599
Also, func add(x, y int) int is more idiomatic.
 
Ell
I already knew ruby and vb.net before I came to c++
 
user1804599
7:39 PM
@DeadMG Why?
 
@MohammadAliBaydoun look at the reply-to subject message
 
I don't know, just took it from the go tutorial thing.
In any case, they are backwards compared to C++.
 
@not-rightfold Because it's a blind assumption that 0 is a useful or valid value.
 
user1804599
I think int x; // reading is UB in C++ is more of a fail.
 
@Pawnguy7 How does that matter? If you're learning, naturally your code is going to be... suboptimal. You should probably not mind hearing what is normal
 
7:40 PM
But I was thinking...
I don't read it as "here is a function, it returns int"
 
@not-rightfold True.
I never said that C++ did it right.
 
I want to do a quick skim and get the return type
 
user1804599
ITT: all languages suck.
 
but I am saying that simply going for 0 is wrong.
 
Ell
What about java? Integer x; "Compile error! x might not be initialized!"
 
7:41 PM
in Wide, I don't permit default-construction like that.
 
Ell
wide has no default ctoring?
 
I do
 
Default initialization?
 
user1804599
But not for integers.
 
user1804599
Hey DeadMG.
 
7:41 PM
I just don't have it for primitive types... library types that I have designed so far... etc.
 
Ell
Ohhh of course
 
user1804599
Are integers in Wide treated the same as class types, or are they something different?
 
you can default-construct std::string or something if you really want to.
 
user1804599
I like how Int in Haskell is just a library type.
 
user1804599
It’s a wrapper around some intrinsic type that you don’t use yourself.
 
7:43 PM
I have no plans to treat primitives differently.
 
user1804599
I love Wide now.
 
It is interesting though.
 
user1804599
Soon:
 
My first experience with variable declarations was VB.NET.
Dim something as Type, I think.
 
user1804599
Mine was Objective-C.
 
7:44 PM
But going to c++ didn't bother me.
 
user1804599
The horror.
 
But I feel a switch now is going to be painful.
 
Ell
@Pawnguy7 yup indeedy
My first was with as2. var name:string = "hi"
 
user1804599
NSMutableAttributedString *string = [[NSMutableAttributedString alloc] init]; :D
 
Ell
or something like that
@not-rightfold How the hell did you learn programming by starting with Objective-C? :P
that is horrible xD
 
user1804599
7:45 PM
@Ell I didn’t.
 
user1804599
I learned Game Maker first, followed by PHP and Ruby.
 
Ell
Oh right I see
 
@sehe You're referring to my inability to write a proper personal statement? :x
 
@not-rightfold Feel free to contribute.
 
@not-rightfold ever finish a GM project?
 
user1804599
7:47 PM
@Pawnguy7 Several.
 
@not-rightfold published?
 
user1804599
But I don’t have them anymore.
 
user1804599
It was like, eight years ago.
 
I can probably mention this one internship I had a year ago.
They made me do C# c:
 
What IS that thing?
 
user1804599
7:49 PM
It’s a gopher, noob.
 
A blue gopher?
 
I fell in love with the language after a while of using it because it seemed so ~~FEATURESQUE~~
 
user1804599
Go is awesome unless you need generics.
 
I guess a blue gopher is better than yellow or red or green.
 
7:50 PM
C is awesome unless you need sanity and health.
 
Ell
./premake4 --llvm-path=/home/elliot/Programming/deadmg/llvm/build/bin --boost-path=/usr/local/include/boost
Hmm. "Type 'premake4 --help' for help"
without the boost-path option, it works fine
 
@MohammadAliBaydoun your favorite language is C#?
 
@Ell Add vs2010 on the end - er, or gmake, if you're targetting Linux.. Also, your paths need a / on the end.
 
Ell
I think it's gnu
 
also
the current commit, practically every feature is broken
 
Ell
7:53 PM
Will it build? o.O
 
@Pawnguy7 No, C++
 
should do.
 
@Pawnguy7 I love it because I haven't coded enough in other languages to appreciate them.
 
Ell
Right. I've never managed it on mine, not sure why. I'm gonna update and install clang again I think
 
@MohammadAliBaydoun Ah. I never got the hang of properties.
 
7:53 PM
you need 3.3
IDK if Wide will build against later, Clang makes a habit of breaking their interfaces.
and in addition, we could never figure out why Wide wouldn't build on Linux.. some linker error that defied explanation.
 
Ell
Yeah :/
Hmm. I have 3.4. Maybe that was the problem all along? >.<
 
user1804599
Why is LLVM so big?
 
Xeo
Because it does a ton of stuff
 
@Ell I'll bet you had 3.3. Besides, if you have the wrong version, it'll fail to compile or fail to execute, not fail to link.
 
user1804599
It will fail to execute regardless. :P
 
Ell
8:03 PM
I'll download it again anyway
 
@MohammadAliBaydoun Hrmm. No your lack of chat nav skills:
2 hours ago, by Mohammad Ali Baydoun
Some asshole ruined Johannes' rep :<
 
Anyone care to comment on my generic find function?
 
@sehe That link leads nowhere ;_;
 
@MohammadAliBaydoun fixed - even followed to the root message now :/
 
user1804599
8:12 PM
@StackedCrooked not generic enough; works only with containers.
 
Oh. It was 222,222 and rightfag upvoted one of his questions.
 
@MohammadAliBaydoun "ruined" aha
 
@not-rightfold Right, .begin can be replaced with begin(..).
 
Xeo
@StackedCrooked Now that gets tricky
 
user1804599
Why?
 
Xeo
8:13 PM
Remember to use ADL on begin, with a fallback on std::begin :)
 
At first sight.
Hm, begin is found without std:: prefiix on array.
 
user1804599
using std::begin;.
 
Xeo
@StackedCrooked That's not an array
 
Oh, right.
 
Xeo
@StackedCrooked Only because all your containers live in namespace std
 
user1804599
8:15 PM
haha.
 
:/ why does GCC give warnings when I do stuff = {0}
I thought it'd know that it's a common idiom
(it's a regular ol' struct)
 
user1804599
@StackedCrooked Try it with int[3].
 
@Rapptz narrowing conversion? non trivial ctor? missing ;?
 
Xeo
@StackedCrooked std::string lives in namespace std :P
 
8:17 PM
@not-rightfold I did. And it fails.
 
user1804599
:)
 
user1804599
I want C++ with Go’s declarator and type name syntax.
 
I never knew about __PRETTY_FUNCTION__ before ;o.
 
It's not pretty
 
user1804599
__UGLY_FUNCTION__
 
8:18 PM
@sehe struct x { int a; int b; }; int main() { x test = {0}; } gives me a warning
 
user1804599
It gives you an error.
 
user1804599
Warnings don’t exist.
 
Shush
 
Is this bad? (I'm using std::begin in the return type and using std::begin in the implementation.)
 
I have -Wall and -Wextra, I think -Wextra is the one making it
No it's -Wall too never mind, had -Wextra twice for some reason
 
8:22 PM
@Rapptz Not required, but useful, no?
I like that it does. I mean, aggregate initialization and/or uniform initialization is all fine and succint, but I like to be told when my class changes and I forget to update an initializer expression.
(in fact, this is why in production code I rarely ever depend on aggregate initialization except for the simplest cases with local structs)
 
meh, = {0} is frequently used to mean "just make all of them zero" though :/
I just don't want to put 12 more zeroes
 
@Rapptz For arrays, or in C, yes. Your "meh" is invalid since this is C++
@Rapptz That's what default construction is for
 
It's an aggregate
 
As long as it's a trivial ctor (only POD members and everything in the initialization list) it should still be, right?
Otherwise, have a constexpr instance to copy from (= EmptyX; or = X::empty)
 
I turned the warning off.
 
8:27 PM
Oh well. I use it too. All the time. But I definitely hesitate (to the point of not risking it) in production code
 
Yeah I can see it being useful, but atm it's annoying because I have -Werror by default and I don't want to keep getting errors because I added one more member. :|
@sehe I don't know. If it is then I'll probably do that.
 
I'm not sure myself
> Why deprecating std::async is the worst possible option n3780.pdf
 
user1804599
Deprecate everything and start over.
 
user1804599
Drop C compatibility crap.
 
> Also, please respect that English is not my native language that that we
Germans tend to have no problems to make statements without only using nice words
 
user1804599
8:31 PM
% cd styx
cd:cd:13: no such file or directory: styx
 
@not-rightfold hold on, is that a bad thing?
 
user1804599
> cd:cd:
 
user1804599
This looks silly.
 
Because it is
 
user1804599
@caps cplusplus.com is absolutely terrible.
 
8:31 PM
Fuck this. I'm out. I'm gonna be a farmer or something.
 
@not-rightfold the first part is the parent process name, my guess. Why is cd execing itself?
 
user1804599
@sehe :v
 
@not-rightfold aha. It's accurately silly, because you have silly overloading of builtins
 
user1804599
I like it.
 
user1804599
cd ... is nice.
 
user1804599
8:33 PM
It’s from oh-my-zsh.
 
@not-rightfold 4dos!
4DOS is a command line interpreter by JP Software, designed to replace the default command interpreter COMMAND.COM in DOS and Windows 95/98/Me. The 4DOS family of programs are meant to replace the default command processor. 4OS2 and 4NT replace CMD.EXE in OS/2 and Windows NT respectively. 4DOS was written by Rex Conn and Tom Rawson; it was first released in 1989. A graphical version of 4DOS, 4OS2, and 4NT, called Take Command was released with a feature set corresponding to version 4DOS 5.5, 4OS2, and 4NT 2.5 and updated after this. Development on this line stopped with the correspon...
 
user1804599
I really need mkdircd.
 
Hm. I feel like using a goto.
 
> 2.00 February 15, 1989 Original release. Improved command-line editing, filename completion, command history, aliases, improved wildcards, online help, internal variables, swapping to disk or EMS, file descriptions, command separator, key stacker
@not-rightfold It's very old hat ^
 
user1804599
Z shell has best wildcards.
 
8:34 PM
I remember I used that a lot. On MSDOS 3+
 
Ell
mxkcd
 
user1804599
Who needs find when you can use zsh?
 
goto hell; ;_;
 
@not-rightfold Who needs zsh if you can have bash + vim (look at vims wildcards once)
 
Is there a way to break from while(true) { switch(stuff) { case 1: break_out_of_while_loop; } }?
 
8:35 PM
Also shopt -s globstar
 
I guess I could use a bool
 
@Rapptz Not in C++.
 
@Rapptz flag or goto
 
user1804599
I can’t use Bash just because its (default?) globbing facility is so hilariously bad.
 
well, using globbing is a bit primitive anyways. I mean, I use it a lot, but as soon as the power of them is causing you problems, I bet simplifying is in order
 
user1804599
8:37 PM
I want globbing in C++ at compile time.
 
@not-rightfold extend the preprocessor
 
user1804599
@sehe Preprocessor doesn’t understand semantics.
 
user1804599
class foo : public std::* { }; // foo inherits from all classes directly in std namespace
 
user1804599
:P
 
@not-rightfold How so? As a reference? or only as a tutorial?
 
8:38 PM
@not-rightfold great design
 
user1804599
@caps Both, but especially the latter.
 
@not-rightfold lol
 
user1804599
Actually, I wanted something like this in Kreeft.
 
@not-rightfold that's not globbing, dimwhit. Preprocessor understands filenames better than the compiler (it's the compiler that's oblivious) - and you didn't specify otherwise
 
@not-rightfold ITT: MMOIG (massively multi-base offline inheritance graph).
 
8:40 PM
@not-rightfold Compiling that is probably equivalent to a fork-bomb
 
user1804599
I’m going to try it.
 
user1804599
inb4 massive intialization list.
 
You're not.
 
user1804599
Indeed. :(
 
@je4d woot saw your proposal floating by. Nice, I didn't know you were involved with that
 
user1804599
8:43 PM
Which one?
 
Love this: the Ruby White Ribbon is a pledge against misconduct at Ruby events http://j.mp/19ewbzU I may just do this for any tech event.
^ Am I the only one that gets irked by this? Isn't that the world upside down? I guess I'm in denial because I'm 'Mr. Nice Guy'
 
@sehe I'm just the schmuck who muttered something about being willing to write up the CFP :)
@sehe ta for the retweet on it
 
@je4d Ah. Well, that's hardly surprising: all proposals have to have people motivated to do the front-running
@je4d You notussed :/ /cc @not-rightfold
 
Ell
@sehe irked because there shouldn't be a need for it?
 
@Ell Yeah. And irked because it kinda suggests it's normal.
 
8:46 PM
@sehe I love you
 
Why does everybody have to vocally disapprove of obvious bad behaviour.
Does my head in
 
user1804599
@sehe coolio
 
@MohammadAliBaydoun Please... reply to specific messages <grin/>
 
@sehe i might put something together for the assert-replacment use case though
 
8:47 PM
but gtg now.. being dragged away from the tinternets
 
@MohammadAliBaydoun Ah. Thanks (why?)
@je4d Have fun
 
@sehe I love loving people
 
> explicit type declarations in languages with type inference is not good practice, it's a symptom of an anemic programming environment by KentBeck on October 18, 2013 at 3:28 PM
^ that's a lovely quote with our discussion yesterday /cc @R.MartinhoFernandes
 
user1804599
Being able to have const versions of functions with almost identical signatures generated would be nice.
 
user1804599
E.g. operator* on smart pointers.
 
8:49 PM
Ah thx for edit. Yeah, agree. Although template get you there almost (not convenience for const/mutable member functions)
@not-rightfold Or just any accessor: coliru.stacked-crooked.com/a/edd064c4b6e4857b L35-42
 
user1804599
Preprocessor.
 
Nah.
 
@not-rightfold Alex: for 200. What runs after make.
 
Current status: http://t.co/NcmHuUadx7
@CaptainGiraffe Wut?
 
@sehe I manage to confuse you way too much.
 
Xeo
8:57 PM
@Rapptz Err, no
That'd be just = {}
 
It's = {0} too.
 
I missed you guys
 
Xeo
= {0} initialises only the first member, and default-inits everything else
 
I know.
 
@not-rightfold Wide can perfect forward on this.
(in principle, anyway)
 
8:59 PM
@CaptainGiraffe It's not hard. I mean, pineapples can be crunchy too, but that doesn't imply that we must have a disagreement on paper tools
 
In C (as opposed to C++), the = { 0 } notation is ancient tradition for initializing all fields to zero. Some versions of GCC warn about 'incompletely initialized structure' when given the appropriate options (e.g. 4.1.x through 4.6.x); more recent versions (e.g. GCC 4.7.1) recognize = { 0 } as a special case and don't generate the warning when that notation is used. One reason for using the abbreviated notation is to avoid having to change the initializer as the structure changes. (I'm not about to pontificate on how this applies to C++.) — Jonathan Leffler Feb 10 at 14:13
 

« first day (1098 days earlier)      last day (3866 days later) »