« first day (1575 days earlier)      last day (3377 days later) » 

12:01 PM
@AndyProwl The stack-based algorithm used in Cilk does something very similar to that.
 
@Mysticial I think that's the correct strategy. You establish all the workflow of asynchronous computations in advance and only when the whole graph has been set up, you return it to the client and the client calls get() on it. If you only were to support VC++, I'd suggest using the PPL, which seems quite good to me. I don't know if it's compatible with ICC and GCC though. I have no experience with TBB either.
Or for a more low-level solution, perhaps Boost supports the future.then(), when_all(), and when_any() stuff
 
I have Intel's Cilk as one of the frameworks. And I mentioned that it's slower due to overhead. Though I do believe that it is asymptotically the optimal algorithm once the number of cores gets large enough to where perfect load balance is impossible.
 
Too bad await isn't a thing yet. It's probably the one thing I look forward the most about C++17.
That, and ranges.
I don't believe in modules (although it's arguably the feature C++ needs the most)
 
@AndyProwl lol, you prefer header-hell?
 
I've always wondered why OpenMP never properly supported recursive parallelism. Now I understand.
Once you have join dependencies, things get ugly - fast.
I guess if you want to go to that extreme, you could label each work unit with its dependencies and execute them like a superscalar OOE processor.
 
12:16 PM
@AndyProwl It actually doesn't.
trust me, I tried to write some code with await and async, and they're really not all they're hopped up to be.
 
It has a learning curve but definitely simplifies things
 
@MartinJames No. I wish we had modules. I don't believe they'll make it
@Puppy Ok, will have to take your word for it.
Based on what I've seen it seemed promising
 
@Puppy I can see the potential of async and await I'm just not sure how to use them is the issue. At some point stuff has to actually happen
 
what I firstly learned is that await and async infest everything
they're as bad as const.
 
12:20 PM
I don't think const is bad
I think it should be the default actually
 
Asynchronous programming in general is like that. I've done enough UI stuff at work to know that it's hell.
 
@Mgetz awaits are yield points, things happen between them
 
I wanted to use await in one place, but to support that, I had to await and async my entire program.
even though most of it would have been just fine synchronous
 
It's not magic
 
I see what you mean
 
12:21 PM
@CatPlusPlus I'm aware, but at some point you actually have to tell the task that wraps all this crap to run
 
and secondly
 
But in case of Mysticial's algorithms await/asyncing the whole thing seems just what he needs to do
 
it plain didn't work, particularly when you start lobbing around exceptions.
 
@AndyProwl agreed, that's one thing I think Rust gets right
 
Which reminds me I should learn Rust
 
12:22 PM
I'm surprised that the "quick and dirty" solution I came up with for recursive divide and conquer some 6 years ago is still holding up today - even though building a proper async framework is so difficult.
 
because
 
Exceptions got better in .NET 4.5.1 or something like that
 
concurrency is a use-case-specific problem- you need a solution that fits your needs.
a generic framework is very hard to write, a problem-specific solution, not so hard given some basic tools like concurrent algorithms/collections
 
@Puppy lol, my approach to that was 'any exception means that the whole task tree is fucked up and must be abandoned' :)
 
@AndyProwl The entire Cilk framework was literally tailor-made for my use case. So you bet I was disappointed to see that it ended up being slower than lame-ass thread spawning. lol
 
12:24 PM
@MartinJames I employed a retry function that tried to retry a task (I used a Func<Task> to create a new identical task) if the previous one threw.
 
@Mysticial Yeah, that's upsetting
 
what I observed is that if the task threw an exception, the EH mechanism simply did not trigger at all.
 
@Puppy I'm too cowardly to attempt clever stuff:(
 
@Mysticial I don't really think so. It's a question of how easy and simple it is to write correct code for it. That's a far bigger demon than only being 95% as fast as hand-written, say.
 
12:27 PM
Part of the reason is that the program is heavily optimized in ways that mitigate the drawbacks of thread spawning:
1) The algorithms are mathematically designed to be almost perfectly load balanced.
2) The program gives near full control over the size of the task decomposition so that you only spawn what you need and not more than that.
 
@Puppy I caught the exception in the Task class and the thread that ran it would then traverse the tree, setting a 'fucked' flag in each task:)
 
Cilk lets you get parallelism without either of those.
 
@Mysticial FTR I have a very similar use case to yours, although I don't need to spawn that many threads. I have written a tailored solution using the approach I described above without using any framework, including my own thread pool. It does the job, but required lots of hand-coded stuff for things that could have been part of a framework.
And it would have been much simpler if I could use await, at least that's my impression
 
Things would definitely have been easier if I had async back in 2008.
Cilk for desktop apps didn't even exist back then. It was still a research topic when I was in school.
 
What complicates things in my scenario is that most tasks are CPU-bound in debug configurations, but I/O-bound in release configurations (so the concurrent approach actually makes things worse). I'm curious whether they'll still be I/O-bound when I'll replace HDD with SSD.
 
12:35 PM
lol
I have the same situation when testing on physical drives vs. ram drives.
 
Ell
I don't think I could be any worse at soldering
 
Did you solder ground to vdd or something?
 
Ell
my joins are just awful :P
 
@Ell I could definitely be worse, whatever your current skill level is
 
Ell
I don't have the correct components for joining things together I don't think
I'm having to cut up the jumper wires which came with my arduino
 
12:43 PM
@Ell Stay away from SQL
 
stay away from any tool used by web people
 
Ell
so so terrible
 
does anyone understand what this person is asking? stackoverflow.com/q/28382095/3547110
 
@Blob Seems to me he wants to replace a portion of a file, namely the representation of one number - but I'm not sure.
It's very badly written
 
@Ell Yup - pretty ugly.
 
12:51 PM
@MartinJames hey martin
 
Err.. hello..
 
@MartinJames howz going on?
 
@AndyProwl He replied to an answer: "How can I add a value that i can change every time I open the program? So it would not just save the same text/value to the .txt file?" I think he just wants to get something from stdin and write to file.
even though the answer shows how with cin :|
 
@RonakPatel I'm good. No hangover, lunch is defrosting, Spurs<>Arsenal, Everton<>Liverpool later.
 
Ell
fork this, I'll use a breadboard instead
 
12:54 PM
Well, OK, a not-very-big hangover.
 
@Blob Yeah. In particular, he does not want to append to the file, but replace the representation of a number previously written. That's what I gathered at least.
 
@Ell lol, one 8-pin socket and one wire, then give up:)
 
@MartinJames cool...today is off in my office...so getting bored now
 
@RonakPatel I'm in my home office, but I'm not working. No emails or calls today:)
 
@Blob the question is quite confusive...does he want something like configuration file?
@MartinJames thats good. Dont u go on party on weekends?
 
12:58 PM
@RonakPatel He seems to want to write something new to a file every time. There's an answer that reads input and writes that to file but the questioner commented asking how to make it different every time. The dude's just confused.
 
@RonakPatel Club tonite - watch Match of the Day. Club tomorrow lunchtime for card game and much beer.
 
@Blob diff everytime mean open file in overwrite mode and write data ...this is what he want i think
 
@RonakPatel someone should edit that answer and remove ios::append (and possibly add ios::trunc?)
 
@RonakPatel I don't understand it either:(
 
@MartinJames pretty enjoying life...
 
1:01 PM
maybe even add a cout so he knows he's supposed to write something
 
user1804599
Wonderful.
 
user1804599
My lexer is like 8 lines of code.
 
@рытфолд 8 hideously long lines or normal lines?
 
user1804599
Normal ones.
 
@рытфолд ..and each line is 10k chars long?
I got beat:(
 
user1804599
1:02 PM
Most of it is this:
 
user1804599
auto match = regexen.map!(r => tuple(matchFirst(input, r[0]), r[1]))
                    .find!(c => !c[0].empty)
                    .front;
return Lexeme(match[1], match[0].front);
 
lol, that's like saying 'My TCP server is a one liner: 'MyServer:=TtcpServer.Create(80)'.
 
error C2143: syntax error : missing ',' before ';'
3
yeah that must be it
thank you VS
 
lol C++ grammar
 
I want to fry some cheese
but I've got clothes getting dry
 
1:06 PM
Fry it without wearing those clothes
 
@AlexM. I'll go check to see if steak is defrosted yet.
 
no, the clothes are in the kitchen
some of them
I sure as hell won't go outside to get them dry
too cold
 
move them to the living room
 
too lazy
the living room is full of clothes already
 
how about the bathroom
 
1:07 PM
even my cabinet doors are open and have clothes on them
 
do you sell clothes or something?
 
@AndyProwl maybe I can move some tshirts there and keep pantsu and socks in the kitchen
 
it seems you have a clothes overflow
 
no, I only do the laundry once a week
every weekend I wash the clothes I need for the next week; repeat;
but yeah I live alone
so nobody minds that I dry my clothes on everything I can
 
makes sense
 
1:09 PM
if mum were here she'd take them outside but meh
effort
 
isn't it raining or snowing over there?
if I took the clothes outside now I wouldn't get any real benefit
 
@Blob he added comment and made it clear what he wants
 
@AndyProwl not outside outside, just on the drying rack on my floor
it's covered
 
ah, I see
 
and really
last time I took some pantsu there to dry
someone stole them
 
user1804599
1:11 PM
> src/agluj/objectFile.d(9): Error: pure function 'agluj.objectFile.parse' cannot call impure function 'std.json.parseJSON!string.parseJSON'
 
user1804599
parseJSON y u no pure.
 
how desperate must you be to steal underwear
and not, dunno, tshirts
or everything else that was there
 
user1804599
I say it was Bartek.
 
I can see him using his witcher sense to find my pantsu /cc @BartekBanachewicz
nobody ever stole anything seriously from me :\
back in high school I forgot my boots in a plastic bag in the gym
came back 4 hours later trying to find them
found the boots, someone stole the bag
WTF
 
what
 
1:15 PM
what's next, someone stealing my wallet but giving back my money and docs
 
@AlexM. Where r u from ?
 
that's private info
 
Maybe you are blessed by luck
 
@AlexM. I am asking bcz where do ppl do steal these things? Lol
 
@RonakPatel planet earth!
 
1:16 PM
The thieves wanted to take the money and the documents and the boots, but the magic spell around you forced them to give them back
 
@AndyProwl oh god..u edited ur post fast
 
yeah my charisma level is so high it convinces thieves not to steal from me
 
@RonakPatel that's what I get for typing faster than I think
 
@AndyProwl lol...that was really funny in this longue
 
> longue
 
user1804599
1:18 PM
inout in D is nice.
 
@RonakPatel Btw, you can use the arrow on the right side of messages to reply to specific messages. That makes conversations easier to follow
 
user1804599
inout(T) foo() inout {
    return x;
}
 
Lounge...sorry
 
@рытфолд What does that mean?
 
user1804599
foo const T if this is const, immutable T if this is immutable and normal T otherwise.
 
1:19 PM
I see. Why the name inout though?
 
user1804599
They keyword is extremely silly but useful.
 
It literally takes effort to come up with such an inappropriate name
Unless there's something I'm missing
 
@AndyProwl what goes in comes out
 
I need to go to reddit or sth and find some people to play CS GO with
last 3 matches I was matched with trolls :\
 
@Blob but nothing goes in
 
1:20 PM
if it keeps on going on like this there's barely any chance for me to advance in ranks
 
user1804599
@AndyProwl well, the const-/immutableness of the output is the same as that of the input.
 
user1804599
Maybe that's why.
 
@рытфолд The only input I (don't) see is the implicit this over there. But even this way, I think the name is very confusing
 
user1804599
It also works with ordinary parameters:
 
user1804599
inout T foo(inout T x) { … }
 
1:22 PM
const(auto) or something
 
push(slowly, inout)
hehehe
ehehehehe
get it? because of the language's name?
nobody?
k
 
@AndyProwl thank you for useful tips
 
user1804599
Oh right, I can rewrite my thunk generator.
 
@RonakPatel you're welcome
 
it was time I made my troll attack and be attacked
to the unity-mobile!
 
user1804599
1:25 PM
Improving cryptic code is fun! github.com/rightfold/agluj/commit/…
 
Thanks for the detailed explanation - and - I'm going to avoid this tangled mess of semantics, implicit method calls, etc. with all my might! What a complex mess C++ can be. Having to juggle all this in mind to understand a program's constructors or assignments makes me think it's better to avoid the whole mess and just implement Move() / Copy() methods for cases when you need deep copies or moves, and avoid all this sneaky operator/constructor overloading, ADL overriding, etc. In my mind it just blurs the flow of control and makes it harder to reason about what your program is doing. — QuadrupleA 20 hours ago
 
@рытфолд 'auto thunk' is back:(
 
Avoid semantics at all costs!
 
I like damage packages to cause damage to things
a damage package is a class that can contain multiple types of damage together with effects
player creates a damage package when attacking, modifiers get applied
it gets sent to the enemy
the enemy applies any modifiers (like protection)
then applies damage
it also lets you mix up shit like sending both fire and normal damage in one hit
 
Do you really need a fancy name for a tuple of values
 
1:36 PM
tuple of pairs of values
also yes :A
because it's like sending a package
full of death
like sending glitter in an envelope
 
Oh, you're writing a game?
 
for now though I'll only send int damage around
I want to at least get some combat done by the end of this weekend
@FredOverflow yup
a single level where you fight trolls in a village
 
You should have vampires as well.
 
couldn't find assets to fit the graphics style of the assets I originally got :(
even the trolls are a bit ugh but I guess they fit well enough
I started with the buildings and stuff, and then got other assets
you can see how much more detailed the troll is compared with everything else
 
What does copyright crap about pictures have to say about me googling images and using them for some 2d game as a school project?
 
1:44 PM
nobody gives a crap about school projects
 
You can't, unless you can
 
except maybe your teachers
 
@AlexM. Can you walk around or is it just a picture with a button?
 
but I doubt they'll hunt you down for using copyrighted images in an one-hour presentation for a grade :A
 
Yes
Also the button does nothing
 
1:45 PM
and Cat is right the button does nothing atm :(
but it will do stuff soon
 
lol
I want to make a space game
About space
 
Controlled via the space bar?
 
@CatPlusPlus Make an asteroid dodging game but don't bother making asteroids because it's rare you'll hit one in real life.
 
@CatPlusPlus try this, you might like it newgrounds.com/portal/view/652916
it's kinda short (finished it in 15 mins?) but it's some sort of demo for a kickstarted game
 
@AlexM. you did that? Nice
 
1:49 PM
@AndyProwl I didn't do the assets, just the code :(
the assets are... from various places
 
Still
 
I need to remember where the assets are from so I know who to credit
 
I have zero idea how those games are made
 
@AndyProwl I use unity
it's pretty easy with it
 
Anyone have experience with Unreal Engine? It's in the github student pack. Is it any good?
 
1:53 PM
no.
 
@Puppy is that a "no, i don't have experience with it" or a "no, it's utter shit"?
 
no
 
@Blob I'll try it next month maybe
I'll pay for a single month then stop and use it
 
@AndyProwl like any other game:
while (true)
{
    render_world();
    process_input();
    update_world();
}
 
cool
I know how to write games now
 
1:55 PM
let's party!
 
The tricky part is writing those 3 functions ;)
 
I never wrote a game loop
lol
 
@FredOverflow pff, details
 
I like unity because I only need to do gameplay programming (mostly)
basically, create things and decide how they interact with each other
 
Game loops are for people who never want to finish anything
 
1:58 PM
judging by how a lot of the projects I've seen that ended up nowhere were written from scratch, I'm inclined to agree
cheddar is still great even after drying up a bit in the fridge
other cheeses just taste like shit after that
I think I just found my new favorite cheese
 
-1
Q: Is it possible to declare/implement a template within a function scope?

Dannyu NDosTitle == Question. To be very specific, is it possible to implement std::sinh like this? namestace std { long double sinh(const long double arg) { template <long double _arg> long double _sinh() { // sinh implementaion here } template <> long double<0> _s...

 
@AlexM. Is that a metaphor for game programming I don't understand?
 
nope
I tried cheddar for the first time a week ago
I still have some and it dried up
but the taste is still great
 
I find cheese without anything not delicious.
 
I find cheese without anything most delicious
I spend a few moments to try and tell as much as possible about the taste <3
cheese is so good
 
2:09 PM
@CatPlusPlus Not true: now that I think of it, Shit 2 has a game loop
 
dare I say, it's what makes a pizza be good
 
(had)
 
@AndyProwl So you lied!!!!
 
Yeah :(
 
user1804599
Hola.
 
user1804599
2:12 PM
Sluts.
 
user1804599
@MartinJames ???
 
I fucking hate this _player.CurrentCell.MakeCell(); >.>
MakeCell is an extension function that turns a Vector2 into a Cell
because I started building things upon Vector2 (x, y floats)
and half of my logic now uses Vector2s and the other uses Cell (x, y ints)
so lazy to change everything nowwww
I'd have to re-do the hardness map
for something so small it's probably pointless anyway
all I have left to do is make the combat work and add a quest log and inventory
 
Pizza
 
<3
 
Oh, hey, check it out, I wrote some sql, even though I don't fully understand the grammar: codereview.stackexchange.com/q/79817/23451
 
2:23 PM
lol
 
People seem to think that c++ will sing their favourite song if you just type it with enough template braces — sehe 16 secs ago
 
user1804599
eh so
 
> Lars Bak, the lead developer, has been literally working on VMs for 25 years (and all of those VMs have lead up to V8), which is basically his entire (professional) life. Some of the people writing Ruby VMs aren't even 25 years old.
 
@рытфолд It's your 'code', you should know!
 
@рытфолд Did you implement a VM today? (^applicable)
 
user1804599
2:30 PM
@sehe I worked on it.
 
-1
Q: A function for multidimensional arrays

Cpp ProgrammerI want a function so that I can print the elements of a multidimensional array. The function maybe void or not. I tried creating such a function but I am unable to get the results. Code: void multi_deimensional_array_printing(int *(ref)[5], int size){ for (int *(ia)[5]{ref}; ia != ref + 5; +...

 
Why do you post that here?
@рытфолд At least you too can claim "I have literally been working on VMs for 25 years" in roughly 23 year's time :)
 
B/c I've seen you guys post stupid questions here.
 
Way to go. You just made yourself very popular
 
user1804599
@sehe !
 
2:32 PM
@TriHard8 don't tri too hard
 
@TriHard8 I hardly think that questions about pizza cooking temperatures are stupid.
 
@TriHard8 I like the deleted answer
 
@MartinJames Especially if it requires partial differential equeations.
 
@TriHard8 'asked 28 mins ago' - Y U dump here?
 
@MartinJames the OP was not the one linking — sehe 12 secs ago
 
2:38 PM
@sehe Oh.. OK, I retracedededed it.
 
Haha, you guys are dicks.
 
@sehe The leading space is especially elegant
 
0
A: A function for multidimensional arrays

seheYou can receive an array by reference and deduce the extents using template argument deduction: Live On Coliru #include <iostream> template <typename T, size_t N, size_t M> void print(T (&arr)[N][M]) { for (size_t i = 0ul; i<N; ++i) { for (size_t j = 0ul; j<M; ++j) std:...

@TriHard8 You will get out now. You're just too nice for my taste.
 
@TriHard8 Yep. We've all earned the "dick" badge on SO.
 
Oh. I forgot about that one. It's not a gold badge of course. Too easy to get
@MartinJames perhaps delete the comments too :) It's not very useful now
 
2:41 PM
I disagree. I think it requires some discipline and persistence. Constantly being a dick is not that easy.
 
It's easy. Just stay in the lounge for more than 6 hours total and you've been assimilated
 
@MartinJames that word reads like uninitialized memory
 
I never practiced being a dick enough
 
It shows (also, that's attention deficit :))
 
every now and then I just accidentally start being a vagina
 
2:42 PM
Being good at any science/math field is an automatic entry.
 
@AlexM. that's a hole different thing
ba-dum-tss
 
lol
 
Oh. I guess that makes sense in some way. I bet being good at stuff requires "non-comprisingness" to an extent
@AndyProwl Do-nut make the pun!
 
43 secs ago, by Andy Prowl
ba-dum-tss
 
sehe can't bear puns, remember?
 
2:44 PM
1 min ago, by Andy Prowl
ba-dum-tss
I love that gif
noo
 
I just appreciated the blink of the bass player for a moment there
 
user1804599
bool ThisExp::isBool(bool result)
{
    return result ? true : false;
}
 
wat
 
result ? !false : !true
 
@рытфолд Ordnung muß sein
 
2:45 PM
/**
 * @return  true if computer is on; otherwise the result is undefined
 */
bool ComputerIsOn()
{
    return true;
}
 
lol
 
@LightnessRacesinOrbit I wonder what the variable shows when debugging. Does it show as "false" in the inspection window...?
 
user1804599
In Scala you can say this: def computerIsOn: true.type = true.
 
user1804599
Returning anything but true will be a compile-time error.
 
@LightnessRacesinOrbit ambiguous, it does not say which computer should be on
 
2:49 PM
@AlexM. :)
you passed
btw
#loungecpp #visualstudio #cplusplus http://t.co/MsuYn3W7GN
this gonna be famous
cos me
 
FTR I forgot a closing '>' in something like std::make_unique<X(a, b, c);
clang's and GCC's diagnostics are better, but aren't much more helpful (error: no member named 'make_unique' in namespace 'std')
OTOH that's a C++ problem
 
I le yawned
 
@AndyProwl oh dear
 

« first day (1575 days earlier)      last day (3377 days later) »