« first day (1535 days earlier)      last day (3412 days later) » 

Xeo
2:00 PM
UINT32_MAX is a macro
 
@JaakkoLipsanen For a structure of four floats I would pass by value because it "feels" right, and let the compiler optimise if it can. Though it probably can't.
 
user925777
:D
 
@JaakkoLipsanen Do what's simpler, optimize if necessary.
 
Xeo
^
 
@Xeo I do suck indeed. Thanks.
 
2:00 PM
clang's error instantly revealed the problem, btw.
 
user925777
yeah, it "feels" right to me as well but at the same time it also feels like it's wrong :P
 
That being said, you lose next to nothing by passing by const reference in the general case. I would recommend that if you really need a rule.
 
@JaakkoLipsanen Does it get its own copy or not?
 
main.cpp:11:43: error: expected unqualified-id

    N, typename std::enable_if<((N > std::UINT32_MAX)), int>::type

                                          ^

/usr/include/stdint.h:173:23: note: expanded from macro 'UINT32_MAX'

# define UINT32_MAX             (4294967295U)

                                 ^
 
The problem with "write first, optimise later" in this case is that it prevents you from writing a stable API at day one.
 
user925777
2:01 PM
@AndyProwl yeah sure, but it's good to learn the best practices and use them forom the beginning :)
 
always compile with both g++ and clang++ for best results.
 
Not everybody is writing a small, self-contained program.
 
Xeo
@Puppy especially since you generally only need to append / remove 4 characters
 
@JaakkoLipsanen Sure :) And one of the most relevant best practices IMO is to think of correctness first, perfomance after.
 
Xeo
which is nice
 
user925777
2:01 PM
@Griwes umm.. I dont understand :P
 
grr fucking solid fuel engines can't handle a 7.7m/s impact?
 
Xeo
you do know how fast that is, yeah? :P
 
yeah- 7.7m/s :P
ah their part description says 7m/s crash tolerance
ah Beta Than Ever nerfed crash tolerances for liquid engines too
 
2:04 PM
@JaakkoLipsanen If you need a value, first consider passing by value. Often, adding const& won't make your function any more complicated to reason about, but at least in theory the client of that function has good reasons of wondering whether the function is going to store a pointer to the object you pass by reference, and when that pointer is going to be used. This means potentially reasoning lifetime issues.
 
asked dad to get me a chorizo since I was curious about how it tastes, and I don't want it to go dead in the fridge
 
Of course if your function is trivial and has a very well given name, then you can use const& and argue that it would be premature pessimization to pass by value.
 
no such thing.
 
But without knowing anything about your function, the suggestion I would give you by default is to pass by value
 
Xeo
@AndyProwl bad API if it does that
a good API should indicate in the type that it'll reference that thing after the function exits
 
2:06 PM
Sure
Language-wise, though, seeing (const) & on a function signature leaves the ambiguity as to whether the argument is going to be used with value semantics or with reference semantics
 
solid fuel engines are super fucking cheap though
just left Kerbin atmo withjust two of the cheapest ones
 
At the average rate of two problems per day (I am currently at 3/day), I should finish project euler's 500th problem by the time I graduate in August.

http://www.internetbillboards.net/wp-content/uploads/obama-150x150.jpg
 
if I'd known they were that powerful I would have taken the "Escape Atmosphere" contract.
 
wish you had
why does my phone suddenly have a "Google Hindi Input" app?
ugh quora
> How did Mark Zuckerberg train himself to be a programming prodigy?
fuck off
 
I don't think Zuckerberg is a programming prodigy
lol
 
2:17 PM
exactly
he's not
and my comment: qr.ae/zezrD
the scalability work FB did in the last 6 years or so is truly frightening. the rest is pretty basic shit
 
who would you call a programming prodigy
 
Xeo
@LightnessRacesinOrbit And it's prolly not Mark that did all that shit
 
me.
 
I can think of a few CS guys but I'm not sure if I should put CS in the same pan as programming
 
2:22 PM
also prodigy implies doing it at a very young age
much younger than the usual age for the thing
 
there was this games programmer who made one of the first fairly complex 3D games when he was 10 or something
I can't remember who it was and google doesn't help
didn't google that much
 
yes, but was it fun?
 
IIRC it was a first person maze game which reflected the lack of sense and banality of a very young child's imagination
 
I email myself the search term & it became ...
 
2:25 PM
so not sure about fun
but it was programmed from scratch
 
in the wolfenstein and doom age
 
ah right.
so basically when programming from scratch was completely reasonable.
 
yeah they didn't invent their own language for it tho
 
can't find it
I'll ask on reddit or sth
 
2:39 PM
#30 in Winter Bash
 
all to lose it on the 6th Jan
 
Ken's Labyrinth is a first-person shooter DOS game, released in 1993 by Epic MegaGames (now called Epic Games). It was mostly coded by Ken Silverman, who went on to design the Build engine that was used for rendering a first-person viewpoint in Apogee Software's Duke Nukem 3D. It consists of three episodes, the first of which was released as shareware. == Game Mechanics == Ken's Labyrinth is graphically similar to id Software's Wolfenstein 3D in that the levels were designed using a grid-based plane, resulting in perpendicular walls and textureless floors and ceilings. Arguably its most astounding...
 
1 less day then
@Shog9 I can't tell whether your avatar is black & white or consists 50(+/-) shades of grey
 
that seems familiar but I'm not sure if it's the same game, Ken was too old then
I must have gotten something wrong
 
2:42 PM
posts silly question to try for "30 Minutes or Less" hat
I may need to migrate to the tag though - they're good at answering crap over there
@chmod711telkitty good one
@AlexM. 15...
oh no 18
nm
 
if I post a dumb question, answering it, then deleting both, before downvoting 5 random questions, do I get to keep all the hats?
 
@chmod711telkitty I think so yes
though there is a quality filter on hats
so you have to be careful
dammit, -6
 
what do you mean by quality filter?
 
> When you take into account this game was homemade on Ken's 386 when he was 12
I can't find any other source stating that he was 12 when he worked on this, this is a review on mobygames
it's true that it got released when he was 18
but I doubt he finished in a single year
 
look at her reputation. — Ganesh Kamath 1 min ago
@chmod711telkitty it means if the question is shit and gets downvoted to hell then you won't get a hat from it
prevents doing what i just did
-8
Q: Why do I get a compilation error with this declaration?

Lightness Races in OrbitI can't understand why I get this error with the GCC compiler: #include <string> using namespace std; void main() { string s(); s = "wtf"; return 0; } // output: error: non-object type 'std::string ()' is not assignable

 
Xeo
2:48 PM
@LightnessRacesinOrbit haha
sucker
 
damnit
I guess I'll just have to upgrade my launchpad
can't get into LKO with a <20T vessel.
 
oh shit i can't delete it now
lol
 
Xeo
vote to delete vOv
 
104,000 FUNDS?!
 
a 137k user getting -11 for a hat lulz

Was it worth it
 
2:50 PM
how am I supposed to accrue such an amount without going to LKO.
owch.
 
hasn't typed lulz since 2008
 
all those people who think A a() is the most vexing parse. Bless.
@Xeo phew thanks. can do it if someone else has voted first
@DonLarynx no :(
I'll try
in C++ i need a question that's interesting and easy to answer AND not shit
and that's not easy
 
damn, I was too slow to downvote LRiO :(
 
although A a(); isn't the Most Vexing Parse, the problem is the same: you inadvertedly end up with a function declaration.
 
Yes
but to call it the MVP is incorrect
 
2:55 PM
@LightnessRacesinOrbit: I agree that getting 5 answers in 30 minutes on C++ isn't easy. I got only 4 with my attempt (but I got upvotes ;)
 
hehe
maybe we need to have a little mob and game the system
 
I shall stage another try but still need to come up with something decent...
 
@DietmarKühl "Answer this if you think I'm a dick"
 
Xeo
> Post Undeleted by Park Young-Bae, juanchopanza, Patrick Hofman
WTF GUYS
let that post disappear into obliviousness.
 
popcorn
 
2:58 PM
:DDD
 
Xeo
83
Q: Default constructor with empty brackets

Martin BeckettIs there any good reason that an empty set of round brackets (parentheses) isn't valid for calling the default constructor in C++? MyObject object; // ok - default ctor MyObject object(blah); // ok MyObject object(); // error I seem to type "()" automatically everytime. Is there a good r...

^ would've been the right dupe btw
 
Just realized that popcorn is an anagrams of "cop porn"
 
I give up. Why is it that baked-bean cans take 9 turns of the can-opener to 'nearly open', so that you can pull up the lid without detaching it, whereas mushy peas take only 8 turns. I baked-beaned a peas can and the lid fell in and sank.

Why won't life give me a break? What's the point of going on?
 
Nevermind
 
Xeo
@MartinJames sucky can opener
I got an awesome one
you need one that cuts on the outside, not the inside
so you get a nice lid
 
3:01 PM
@Xeo Oh goody for you. I've got some bits of bent steel with a plastic handle.
 
Xeo
"Safety Can Opener", I think?
 
I need to upgrade our kitchen tools.
 
@MartinJames Did you forget to feed your dog?
 
Xeo
@MartinJames Here
 
@Puppy No - he's looking fatter than a very fat thing.
 
3:03 PM
lol
 
Xeo
mine works exactly like that
it's nice
 
user1804599
Yummy, forks.
 
@Xeo Meh - who wants to spend 60 secs opening a tuna can.
 
omg it got undeleted and there are reopen votes
 
@sehe: This is not the MVP. — Lightness Races in Orbit 41 secs ago
Nope. It's a most fancy farce
 
3:08 PM
Beta Than Ever - much hardness, very difficult.
 
user1804599
It's NMBSEVP: not most but still extremely vexing parse.
 
andddd gone again
i wonder whether there's a secret hat for this
 
Xeo
@MartinJames she turned it slow :P
 
note to self: remember to put parachutes as the last stage
 
Xeo
lol
hm. for some reason I thought I already had KSP on steam
I guess not
damn, and it was off what, 50% the other day?
 
3:12 PM
@MartinJames: I recommend getting a Silit can opener: http://www.silitcookware.com/html/can_opener.html
the lids have zero chance to fall into the can at all! (the lid is bend open rather than being cut open, i.e., it becomes slightly bigger)
 
@Xeo 40%.
 
Xeo
still good
 
I stripped out the campaign info from the URL so nobody gets ad revenue from it
 
@DietmarKühl $39.95 .....
 
Xeo
3:14 PM
@LightnessRacesinOrbit onion?
 
@MartinJames plus the embarassment of having to purchase US dollars
@Xeo similar i guess
 
@LightnessRacesinOrbit lol
 
Xeo
@LightnessRacesinOrbit check the top-right
 
if you are a C++ programmer how do you care about price like that...? Obviously, you can buy the device in Euros!
 
Xeo
@MartinJames Mine costs 18eur or so
 
3:15 PM
@Puppy: although I guess I would get some answers on the proposed question I'm not sure I'll get 5 :-)
 
user1804599
Is Trondheim nice?
 
I'll see if I can bid on a pre-owned can-opener on eBay.
 
@DietmarKühl Lightness would get plenty though
fuck accidentally deployed parachute again.
 
seems like it won't matter fortunately since I'm in upper atmo
 
Xeo
3:18 PM
going up or down? :P
 
up
 
Xeo
well, it will matter for going down again
unless you don't plan to
 
I got all my contracts and stuff on the way up
 
Xeo
could've gotten funds back from landing, though
also, science?
 
and science.
also solid boosters can't land with just 1 chute anyway
so there's nothing to lose by staging them off right away
even the smallest rockets don't get lower than ~7.5m/s from one mk16 chute.
 
3:21 PM
why would you keep the contracts on board the spaceship lool
 
but I have no idea how I'm going to pay for the launchpad upgrade to get the rocket size I need to make stable orbit
104,000 funds on hard is no joke.
guess I'll have to do a bunch of those survey missions.
 
4:02 PM
god I'm offline for 3 hours and already swamped with tasks and tickets
@Jefffrey Everything that doesn't exist renders index.html, leftover from transition and lack of proper redirects on old links
 
woops failed in both my objectives :(
 
omg working on my desktop is so much smoother, fuck that shitty laptop
 
Is ninja really worth it?
 
As opposed to
 
Makefile
 
4:10 PM
Yes
 
It looks just as verbose to me.
 
That's not even remotely a problem with either of those
Just got hit by this 4 year old issue good job Django
 
#webdevs
 
I always end up writing the same good old shitty makefile to compile all source code in a directory and then just link it all together in some executable.
 
4:25 PM
consider just keeping the makefile?
instead of re-writing it
 
I never finish it. I just get bored of looking for the correct syntax.
Yeah, I have no patience, I know.
 
that's one concrete advantage of Ninja then- Python instead of whatever the fuck makefiles are written in
 
I remember finding some "all-in-one" makefile that was somehow customizable. I can't find it anymore. How would you call a makefile that is the base-skeleton for any project?
 
nonexistent.
YAY MECHJEB BOY DID I MISS YOU
 
Argh I need to get rid of old init scripts, they're so fucking unreliable
Even under systemd
 
4:35 PM
time to make pizza
 
My current makefile is so bad, it's generating "c++ -c -o output.o input.cpp" instead of "clang++ -std=c++11 -O2 -c -o output.o input.cpp".
I don't even.
 
anyone familiar with how to extract frames from a recording in windows phone via c++? I have some questions regarding how the MFT (Media Foundation Transform) works exactly
 
jesus christ there's like 10 Murmur instances running
 
fucking hell it's so hard to get these stupid "Test part in mid-air" contracts.
the speed and alt requirements just don't line up properly at all
 
I just ignored the fiddly ones
 
4:43 PM
"Test part in mid-air" contracts?
 
can't afford to ignore them
 
Question now at -24
 
think I'll just have to use a tremendously-expensive liquid engine to get the control I need to get the contract.
 
What are you talking about?
 
KSP of course
 
4:50 PM
@LightnessRacesinOrbit -24!?
 
I thought KSP was ded in favour of Factorio
wait
did you call me american few hours ago?
 
yep
 
I'm offended.
 
whoopsiedaisy
and by that I mean "Die you facist American pig"
 
> facist
 
4:59 PM
I support faces too.
 
But do you discriminate people by face?
I do.
Annnd bored again.
 
@Borgleader now -25
 
How the fuck can a rule like:
suite: $(SUITE_OBJ_FILES)
    g++ $(LD_FLAGS) -o $@ $^
 
The answer is make
 
generate: c++ -c -o ...
 
5:08 PM
You're running a wrong thing
 
If I comment out 1 line of those two, and run make I get an error that it's missing suite, so it seems like I'm running those rules.
 
@Jefffrey It can't.
 
@Jefffrey No, that doesn't mean that
 
More likely $(SUITE_OBJ_FILES) causes c++ -c -o to be run
 
It looks like a default rule for %.cpp.o or something
 
5:11 PM
this is the entire 20-line make file: pastebin.com/EZceZydU
you tell me where you see c++
 
I don't think you understand wildcard rules
 
I didn't even know there was such a command before now. Apparently that's an alias of clang++.
 
@Jefffrey It's a baked in default rule
 
@Jefffrey AFAIK it's an alias to the system's default C++ compiler.
 
But really don't use make
 
5:14 PM
> This string ($(wildcard pattern...)), used anywhere in a makefile, is replaced by a space-separated list of names of existing files that match one of the given file name patterns.
That's what I expect wildcard to do.
 
Run it in verbose mode
 
right.
 
I think I have seen the light
 
It's hitting a default rule, i.e. your obj/%.o: test/%.cpp doesn't match
 
Yup
 
5:17 PM
next month: Maximum Savings.
 
Object files are not put in obj/. They are put in the same folder as the .cpp files.
Working now.
YAY
Thanks
 
3 mins ago, by Cat Plus Plus
But really don't use make
 
Shh, it works for now.
 
can you show us a diff so we know how you fixed it?
 
5:31 PM
Used up all my votes so I could get a hat. Now I can't vote on anything for the rest of the day. Not sure what I expected.
ffs I was just about to post an answer to that
 
This is the final makefile.
With screwed up tabs and spaces, great.
 
lol tabs
 
Makefile require tabs AFAIK v0v
 
Only to indent commands
Also another reason to not use it
 
> rm -rf
lolwat
 
5:39 PM
Good job
 
lol, github defaults to 8 spaces per tab
here's the pretty fixed version
"fixed"
 
@Jefffrey nice in makefiles, trhe one place on earth where tabs still matter in certain places
 
auto x = inom::make_int<1>();
auto y = inom::make_int<2>();
std::cout << (x + y); // 2
everything is broken beyond repair
I can't even math
 
@Jefffrey nomnom::make_cookie<1000>()
 
@Jefffrey DIFF
DIFF MOTHERFRAKKER
 
5:46 PM
It's 20 lines, make a mental diff, while I order pizza.
 
WTF guys this is obviously not an appropriate closevote reason. You're all insane. — Lightness Races in Orbit 12 mins ago
How'd that get two upvotes. As if the question was ontopic?
 
@Jefffrey I made it. Looks much saner. Didn't do full review though
 
I just saw an ad on pastebin telling me that it's specially tailored to me because I use an ad blocker. What.
 
Too fast, I haven't called the pizzeria yet.
@LightnessRacesinOrbit It's their way to say "fuck you adblocker"
 
5:48 PM
@Jefffrey yes but why isn't adblocker blocking it
 
3 mins ago, by Jefffrey
everything is broken beyond repair
 
Because it's not an actual ad that's on the list of ads to block?
 
That's, um, not how it works
 
No, you're right, it uses a sophisticated learning AI system to detect and remove ads
It's a list of patterns. Whatever you're seeing is not on the list of patterns
 
I thought it was a list of ad networks?
 
5:58 PM
Not just that. It may also be triggered by particular image sizes often used in ads, among other factors.
 

« first day (1535 days earlier)      last day (3412 days later) »