« first day (1062 days earlier)      last day (4108 days later) » 

user1804599
17:00
Ugh.
user1804599
\r\n sucks.
don't use windows then
user1804599
The guidelines say I have to use CR+LF because Visual Studio is a terrible editor.
do you also have to include a BOM?
user1804599
I'd kill myself if I had to.
17:04
good for you
@not-rightfold :v
user1804599
It confuses shebangs.
user1804599
Can I have a vimrc for only one directory and subdirectories?
guys. Why is C++ so weird?
17:10
because god made it that way
user1804599
lol dat commit message
user1804599
Nice short summary line.
That horrible formatting.
user1804599
Hey Cat.
17:12
Hey!
I can't into how this bit/byte stuff is working. I do my method with 0x12345678 and just return the value and get 305419896
user1804599
I didn't add detailed descriptions to some commit messages since they're fairly obvious.
user1804599
That a problem? :V
It's fine.
user1804599
17:15
Also I want to generate global.ts but I don't know how to integrate that with the build system.
user1804599
I assume Z shell isn't the appropriate tool because :windows:. :V
user1804599
(Do we have a build system anyway?)
Yes, MSBuild.
> As of February 2013, BitTorrent was responsible for 3.35% of all worldwide bandwidth, more than half of the 6% of total bandwidth dedicated to file sharing
Woah
user1804599
@CatPlusPlus Will that be used for the client too?
17:20
Usually when you make a recursive template instantiation, you make the general case and then you add one with 0 that serves to stop the recursion. Is it possible to recurse the other way around? Meaning I start with 0 and I need top stop on some condition x?
hey y'all
Is haskell awesome or what?
double [] = []
double (x : xs) = (2 * x) : (double xs)
One line, with pattern matching
user1804599
double = map (*2)
@not-rightfold I haven't gone that far yet! :P
17:21
or in python
list = (2,2,2) * 2
But now, I feel like without pattern matching, life would just suck.
so there's this thing
Arrite, back to learning! :P
where you use a bunch of characters to replace "hard to type characters" in c
I think it's in c++ too
I don't remember what characters they use
do you guys know what I'm talking about?
like there's a thing for brackets
Have no idea. Is it a language feature or an IDE feature?
17:23
language
I'm hoping somebody would know off the top of their head so I don't have to dig through c99 documents
What do you mean with "hard to type characters"?
like {, }, /, |, \
I think
Hmm, I was notified about a comment that says my previous comment was offensive. But my comment is no longer there. Is there a way for me to review what I said?
make your life easier: get a qwerty keyboard
Don't use digraphs/trigraphs.
Don't code without an international layout. :cripes:
17:25
cause back in the 70's the PDP 700's didn't have a bunch of keys
trigraphs! that's what they're called
In computer programming, digraphs and trigraphs are sequences of two and three characters respectively, appearing in source code, which a programming language specification requires an implementation of that language to treat as if they were one other character. Various reasons exist for using digraphs and trigraphs: keyboards may not have keys to cover the entire character set of the language, input of special characters may be difficult, text editors may reserve some characters for special use and so on. Trigraphs might also be used for some EBCDIC code pages that lack characters such...
oh yea those things
I remember someone used one of those to add newlines somewhere nasty
@not-rightfold How would you implement a function to get rid of odd numbers in a list
I've implemented one, but I'd like to see how you'd do it
@MooingDuck Hey man! :D Long time no talk. How've you been?
filter even
@CatPlusPlus You can do that?
Thats cheating
user1804599
17:30
wat
user1804599
@CatPlusPlus I'll just use Z shell script for now. This isn't going to be finished before end 2014 anyway.
user1804599
Hmm. Is this robust? echo "/// <reference path='$(echo "$f" | sed 's#^ts/##')' />" >> ts/global.ts
@not-rightfold When did you start using typescript?
user1804599
@GamesBrainiac When I started writing the web client for Lounge<Chat>.
@not-rightfold If you need help, I can help you out. I've been using typescript for a while now
user1804599
Me too.
@EtiennedeMartel Isnt dotcover alreadt included in resharper 8?
user1804599
Hmm.
fuck.
don't you just hate it when you have to implement 20 functions, almost all of which just delegate their work?
17:36
Why do you need 20 to delegate some work?
Why not just create one function, done
Uh, TypeScript is "scalable". Now I know why @not-rightfold uses it.
2
er, well it's an interface, with quite a few functions in it.
user1804599
setopt extendedglob y u no default.
Xeo
Xeo
@DeadMG Didn't you bring that upon yourself?
user1804599
17:37
@EtiennedeMartel wat
Xeo
Xeo
Or is it one of Clang's interfaces?
@Xeo No.
user1804599
I use it because it's a dialect of JavaScript which is less terrible than JavaScript.
it's just a complex interface that does a lot of work.
bleh... what ever the current topic, I am just going to casual say it is shit and you are al wrong
17:38
Complex interfaces are for sure.
so yeah... this technology day at work is well... let's put it this way, I got a lot of actual work done
@not-rightfold I like how you always fall for my traps.
actually, this is the simplified version.
Xeo
Xeo
He feels the need to defend himself.
@Xeo billion vs millard is a stupid argument. say 10^9 if you mean 10^9 and 10^12 if you mean 10^12, simple. fuck stupid words that have been broken
17:41
@EtiennedeMartel I just like the autocompletion, without it, you're kinda fucked. Using mongoose in expressjs is a pain, for example, because you don't have any declaration files.
Xeo
Xeo
... wat
what does auto-completion have to do with TypeScript?
> I think this is unfortunate and requires jumping through hoops if you are making a decision on whether some type is "invokable with a given result type".
@R.MartinhoFernandes actually, wouldn't you rather use std::result_of in that case?
To make that decision?
Xeo
Xeo
Hi.
Bye, groceries.
@GamesBrainiac working
user1804599
@Xeo It's actually possible.
17:46
@MooingDuck Glad to hear it! :D
do you guys have some sort of runtime_cast you use that checks that the number is in range and throws an exception otherwise?
user1804599
Well, you know, the “complete on inserting period.”
user1804599
Like in C# with Visual Studio.
@MooingDuck There's one in C#. Hihi.
@MooingDuck No. Unless you mean something like if (x < 5 || x > 10) throw blah;. which suffices.
user1804599
17:47
@MooingDuck Write one!
@MooingDuck boost::numeric_cast.
@not-rightfold I did, and am using it
@CatPlusPlus aha. no boost here, still working on it
Xeo
Xeo
@MooingDuck in-house libraries allowed?
@Xeo oh, there's already hundreds
Xeo
Xeo
another level of indirection etc.
17:48
mostly replacing each other with other ridiculous versions.
I was going to say 'if it's in Boost, surely I haven't bothered to implement it' but that would be a very blatant lie.
Xeo
Xeo
Just copy boost into your in-house lib :>
Hejlsberg should be better able to explain it than I can
Xeo
Xeo
No, I mean, what does auto-completion have to do specifically with TypeScript?
user1804599
Nothing.
user1804599
17:50
But it's easier with TypeScript than with JavaScript.
In simple terms, you get autocomplete after the . operator. You get function signatures and their types.
user1804599
Because of static typing.
Yea, because of static Typing.
user1804599
Try doing it with JavaScript.
user1804599
You'll kill yourself.
17:52
@not-rightfold JSDocs....shivers...
user1804599
Requires manual shit.
@not-rightfold But I hate the fact that typescript does not have mongoose definitions
user1804599
lol mongoose
It even has defs for a crappy framework like durandal
user1804599
Why are you using MongoDB.
17:53
@not-rightfold Wanted to learn how it works
user1804599
It's so nice to have no referential integrity guarantees.
Nothing else, really.
@not-rightfold Trust me, I've read what the Cornell guy had to say! :P
Okay stupid question. Say you have an integer x. You want to compare x on a bit level to see if there are any bits that equal 1 without using != or ==. How would this be done?
@Crowz Any bits? if any bit is set, then the integer is non-zero...
user1804599
@Griwes What if only the sign bit is set? :3
17:57
aren't ints twos compliment?
@Crowz on x86 yes
I don't know what the C++ standard says about negative zero
what happens if you add 0 and -0? :o
...I have no idea
@MooingDuck There's one well known individual on ##C++ at Freenode who rages that negative zero does not exist, be careful.
Anyway, what common general use architecture uses anything different than two's complement?
@Griwes none
18:00
There, problem solved (just put a "does not work on retarded archs" label on the software).
infinite lists are blowing my mind
I can totally understand why python doesn't feel that grand anymore! :P
@Crowz implementation defined I guess
hmmmm.
how can I have an unresolved external to std::function's constructor?
@Crowz return bool(x);
@GamesBrainiac Only two things are infinite.
18:02
@GamesBrainiac I thought they didn't have side effects.
@MooingDuck That's basically what I said :P
@StackedCrooked I see what you did there ;) So much for pure functions
@Griwes your mom and her size
@not-rightfold Bit manipulation on signed integers? :(
@Griwes yes it is. you explained, I showed code.
woO! My coworkers are going through their projects and removing warnings!
now virtually all the warnings are cross project interactions!
class basic_string needs to have dll-interface to be used by clients of class X
18:04
unresolved external symbol "public: __thiscall std::function<class Wide::Codegen::Expression * __cdecl(void)>::function<class Wide::Codegen::Expression * __cdecl(void)>(class std::function<class Wide::Codegen::Expression * __cdecl(void)> &)"
maybe I'm misreading this, but the copy constructor?
@DeadMG it's not const... why is it taking mutable reference?
@DeadMG Did you accidentally change your std header?
nope.
they're read-only on Windows by default.
@MooingDuck I've done that before to help overload resolution with respect to perfect forwarding constructor templates.
the only one I changed was bitset and that was a trivial change (added some redundant parens to work around Clang bug).
@DeadMG oh so they are
18:08
Sep 8 at 19:19, by not-rightfold
user image
Do Mercurial extensions go in ~/.hgext or ~/hgext by default? Not sure why it can't find it either way, going to hardcode the path in.
Xeo
Xeo
I.. think I have a problem.
I appear to have a hole in my toe.
find nearest hospital
Skin decay?
Do you always wear shoes or something?
Xeo
Xeo
nah
Only to and from work
not even at work
18:11
@Xeo A hole in the toe? Did you shoot yourself in the foot with C++?
8
Xeo
Xeo
lol
lol
Xeo
Xeo
nah, I only shoot others in the foot with C++
@Xeo Post pictures on the Internet, acquire karma. Then seek medical advice.
@Crowz Could you be more specific? What's so weird about C++?
18:14
I'm actually interested how it looks.
You sick fuck.
You can do some of the partial function stuff in haskell through python decorators
but its not as clean
huh?
functools.partial
18:17
@Borgleader std::array<int, 5> myarr = {{1, 2, 3, 4, 5}};
Maybe you can omit one pair of braces, I always forget the rules.
You should be able to.
Reminds me of this Bjarne interview where the interviewer was totally amazed that you could initialize a struct using braces :)
i have a moral problem
@CatPlusPlus (a, b) .+ (c, d) = (a + c, b + d) Now thats a beautiful way to define a new operator
@BartekBanachewicz When did you not? :P
should I send bug reports from illegal software?
7
18:20
@BartekBanachewicz Go ahead, I do it all the time.
@FredOverflow Pretty sure that doesn't work in 2012.
But I'd have to try
Damn man.. they're still discussing push_back_
There is no such thing as an xvalue reference. — FredOverflow 5 secs ago
@Borgleader It even works in C++98. It's just a struct with an array member.
@FredOverflow I hate C++98, I don't want to go back to the time when we ddnt have unique and shared ptrs.
I don't use those too much.
18:23
@FredOverflow TIL this works
132
Q: What are Aggregates and PODs and how/why are they special?

Armen TsirunyanThis FAQ is about Aggregates and PODs and covers the following material: What are Aggregates? What are PODs (Plain Old Data)? How are they related? How and why are they special? What changes for C++11?

@Borgleader Initializing a struct that contains an array even works in C.
Xeo
Xeo
@GamesBrainiac bimap (+) (a, b) (c, d)!
@Rapptz No I mean TIL this works on std::array
@Xeo Haven't gone that far yet. But Haskell syntax is amazing, its like they put regular expressions to parse functions and stuff, to do the pattern matching thing
18:25
0
A: What are Aggregates and PODs and how/why are they special?

Ikram AzaizehIt's the meaning that allowed you to apply some actions (Input,Output,..) to c++ such as: we can say that cin >> Or cout << Not aggregate on arrays or objects either that these objects are caused by structs or classes. In another meaning you can't make an Output all the members or elements in an...

wot
@Borgleader When I write a foo_t template with a foo function template, I don't bother to write a constructor for foo_t anymore, I just use braces:
2
A: how do I print an unsigned char as hex in c++ using ostream?

FredOverflowHm, it seems I re-invented the wheel yesterday... But hey, at least it's a generic wheel this time :) chars are printed with two hex digits, shorts with 4 hex digits and so on. template<typename T> struct hex_t { T x; }; template<typename T> hex_t<T> hex(T x) { hex_t<T> h = {x}; ret...

Xeo
Xeo
@FredOverflow Doesn't work all the time :(
@Rapptz wtf
Xeo
Xeo
Specifically, the member must be public and you can't have bases that need initialization.
private? pfff. inheritance? meh.
;)
18:30
Pulled that right out of your ass, hmm? — Etienne de Martel 3 secs ago
I'm probably gonna get flagged for this.
// cast away return value to shut up pedandic compiler warnings
lol
I think I might create a CultureInfo where the default date format contains a SQL injection attack. Just to prove a point.
rofl
That you?
yes
@Rapptz How do you cast away a return value?
18:40
@FredOverflow (void)printf("foo\n");
was his next line, so I figure he meant voiding functions that return but you don't use the return value?
Scott Meyers has a video section on his website now.
@FredOverflow Tss tss.
I think the arrogance was actually refreshing.
These talks can get so clean and clinical.
18:58
@MooingDuck that is giving me a weird error
public inteface
Uh.
@Borgleader Context?
I haven't even watched half of the GN13 talks. Anything to recommend in particular, apart from the celebrity talks?
@CatPlusPlus idk, I saw this on my twitter feed and I found it funny
@Rapptz I think that just look silly. Too bad the compiler doesn't understand the difference between ordinary functions and pure functions. For pure functions, that warning would make a lot of sense.
19:08
how would someone go about retrieving the least significant bit of an int?
"Plagiarism will, with NO exception, be accepted"
Doesn't that mean that it is accepted?
@Crowz x & 1
@DavidKron yes
Eew, there's a Singleton in Herb's slides.
@FredOverflow Lol my school failed so hard
@FredOverflow least significant byte would be x&0xFF then?
@FredOverflow That must have been some good herb.
HUEHUEHUE
19:11
@EtiennedeMartel lol'd
@Crowz If a byte has 8 bits, then yes.
posted on September 12, 2013

Replace a loop by a function that uses only tail recursion.

OMG C++ shopping spree ahead? 30% on 1 book, 40% on two books.
Objective-C Programming Fundamentals and Advanced LiveLessons (Video Training)

By Jiva DeVoe
Published Mar 28, 2013
by Addison-Wesley Professional
Downloadable QuickTime$199.99
Only 200$ for ULTIMATE BOREDOM
One-time offer folks
Downloadable Quicktime? So like, you pay for a video that you can barely play anywhere?
If you're so keen on spending money on boring things, give 'em to me~
19:19
You can learn something from books
That's not boring.
@TonyTheLion Depends on the book.
I learn new things on paid time.
@FredOverflow Oh dear.
The guy says "you should never do this", then goes on to say it's well defined.
Xeo
Xeo
19:23
@Xeo could you explain your criticism if you still think it's valid, I would like to fix it — aaronman 1 min ago
Not only is he pulling shit out of his ass, but he's even contradicting himself.
fwiw there are well-defined things that are a bad idea.
in a bitwise sense, how would you know if an int overflowed?
You don't.
19:24
you ask it nicely
You need an appropriate permit.
@Crowz You check the overflow flag in assembly ;)
Heh, tomorrow meeting with coworkers, Saturday meeting with old classmates.
I'm going to be so dead on Sunday.
add eax, ebx
jo overflow_happened
jno no_overflow_happened
C++ is a brillant modern language therefore integer overflows are undefined and undetectable. HAVE FUN
19:30
abstract all numbers into a mechanism that detects overflows
should make your code very pretty
As in use a language that doesn't silently invalidate your invariants. :v
I know, I'm repeating myself.
I'm not even sure he is listening anymore
@Crowz can't think of why it would...
@MooingDuck school.
@Crowz ... To the left of my previous post is a tiny grey arrow. Click on it.
@Crowz generally you check before the addition
@EtiennedeMartel technically that's not a contradiction
19:44
Can learning spoken languages really be compared to programming languages?
Natural languages are a chaotic mess.
not to mention dealing with stuff like accents
"Oh, you are learning these programming languages, you should pick up Spanish easily." I forgot who said that to me, but it most certainly didn't come easy. Or at all, really.
@Pawnguy7 maybe programming for that person was hard and so was Spanish
19:51
fuck, I ate a banana.
this was a bad move.
Stomach?
Potassium go.
@A.H. I don't think they learned either.
Eating radioactive stuff is usually a bad idea.
For those who use eclipse for C++ development, is there a way to have eclipse automatically terminate the application when clicking run?
19:52
Nobody is using Eclipse willingly.
Esp for C++.
@ctor doesn't the program terminate itself, or does it pause it automatically?
I'm in that boat too, I'm just looking to make it easier :(
yes there is a stop button
If I run it, make a change, then click run again it stays terminating (assuming the application doesn't simply end).
@A.H. Stop button != automatically
19:54
how the hell would it know when to automatically stop a program?
Do you have a reason to expect it would automatically terminate it?
@A.H. Uh.
Did you even read my question? I asked if there was a setting to tell Eclipse to AUTOMATICALLY terminate the application WHEN I clicked the run button.
making a change to the source, rebuilding and running seems like a reasonable time to stop it if it's still running :)
@ctor then how would you run !?
19:55
..
@A.H. even visual studio can do it
You terminate existing instance, and start a new one. It's not an unusual thing to do.
Are you serious? I want it to terminate the previous instance, rebuild (it can't while it's running because it can't open the .exe for writing), then run the newly, successfully built exe.
oh totally misunderstood
@ctor modify makefile to kill process before building might work, dunno how to get eclipse to do it
VS does this?
Yeah, CBC, I know I'm technically behind a US proxy, but damn.
Yes it does
@Pawnguy7 it does if you launched your thing from VS
does anybody want a Brütal Legend steam key?

« first day (1062 days earlier)      last day (4108 days later) »