« first day (1612 days earlier)      last day (3562 days later) » 

16:00
I remember when I was working with the planning lab at UdeS.
So the hard part is getting them to share directional behavior?
Xeo
Xeo
The interesting part is the AI code structure, and behaviour itself
I joked about how any AI problem can be solved by turning your problem into a graph, finding a utility function and running A* on it.
6
Xeo
Xeo
behaviour doesn't consist of just pathfinding
@BartekBanachewicz hmm, boid is a good keyword.
Right, movement physics and time "thinking" or "interacting".
16:02
🐩
@DemCodeLines Stop posting garbage.
Apologies
@Xeo Yeah, but here's the thing. Let's say you have a graph of possible states, with arcs representing actions with a cost associated to each. You can apply a path finding algorithm to create the plan of actions required to get to the desired state.
@BartekBanachewicz - Yeah boids is nice, that is what they used for the penguins in batman :)
@EtiennedeMartel Associating costs in that scenario is non-trivial.
Xeo
Xeo
16:06
@EtiennedeMartel Right. But creating that graph is non-trivial, no?
You're just pushing any complexity into that.
@R.MartinhoFernandes Yes, hence why I said I was joking.
Because that's like saying "leaving Earth is easy, you just need a lot of fuel and a rocket"
Flip a switch, grab a beer, call it a day.
@EtiennedeMartel I wouldn't say it's similar. In your case, the hidden bit of finding the costs basically amounts to solving the original problem.
// net-snmp-5.7.3/include/net-snmp/library/snmp_impl.h:60
#define READ 1
wankers.
well not really, robot
changing the way you think about problems might make it easier to reach an approximate solution
16:10
In the case of leaving Earth, to build the rocket you don't need to solve the problem of leaving Earth. Building the rocket is a subproblem, not a reiteration of the initial problem.
say, a cost of getting from A to B is a cost of getting to the car, driving, and getting out
@R.MartinhoFernandes True that.
@R.MartinhoFernandes complexity? you mean job security :D
(I have no idea what is going on)
@LightnessRacesinOrbit Ow.
@thecoshman see how flamingdangerzone.com/cxx11/2015/03/10/name-sets.html is still needed? :(
@R.MartinhoFernandes yeah, I already conceded that point a while ago :\
@EtiennedeMartel beer is probably not the smartest of choices when getting a rocket, you want something non-fizzy, else you'll get precious precious beer everywhere.
ITT solving the problems that really matter with space travel, like how to drink beer.
can yeast even cope in zero-g?
16:19
@R.MartinhoFernandes To be fair, that file predates ANSI C...
> One study, done in conjunction with the University of Colorado, found some puzzling results about how yeast ferments in microgravity environments. The researchers, who announced their findings in 2001, discovered that yeast fermented with greater efficiency in their sample of space beer, making it more alcoholic.
@thecoshman Yes.
(cookie if someone quotes the above for thecoshwang)
@R.MartinhoFernandes "nuissance"
Thanks.
@LightnessRacesinOrbit You're plonked?
5 mins ago, by Lightness Races in Orbit
> One study, done in conjunction with the University of Colorado, found some puzzling results about how yeast ferments in microgravity environments. The researchers, who announced their findings in 2001, discovered that yeast fermented with greater efficiency in their sample of space beer, making it more alcoholic.
Shocking isn't it
WHERE'S MY COOKIE
So I was curious to get some feedback from you guys since this is the largest chat room. I am usually in c#. How often do question banned users come in here asking vague questions?
16:28
GIB COOKEE
@TravisJ It used to be much worse, but it doesn't seem to happen as often anymore.
No idea why.
@R.MartinhoFernandes - Hm, we seem to get them all the time. 3 in the past hour
That means a space elevator would be a waste of time. We want a space aqueduct, but for beer.
We eat anyone who does that, maybe they finally learned
Micro-g breweries!
lol @Cat :)
Does a higher reputation requirement for chat for question banned users seem reasonable?
16:30
I guess.
Hellban them, charge 10bux to allow posting
So is the chat for questions then?
have some free rep
@R.MartinhoFernandes - Does that seem excessive? Or do you think it is not a problem so it doesn't need a solution?
Does git connect twice to a host when SSHing?
16:34
-11
Q: How to write a linked list program using arrays having insert ,delete and display operations?

Vidya Lakshmi PrasadI need a little help to study a linked list program easily using arrays.

ace
@R.MartinhoFernandes always
@R.MartinhoFernandes in the post
@TravisJ Exhibit A?
:D
I set VisualHostKey to yes, and now when pushing with git, it shows the host fingerprint twice.
(That would be funny)
@LucDanton Chat is for programming discussion, which may involve walking someone through problems if so desired.
Xeo
Xeo
This chat is only for priviliged programming discussions
Fuck helpdesking
2
1
Q: Difference between overriding and overloading of a function in C++

Abdul RafayI am studying c plus plus course in my college and i am unable to differentiate between overriding and overloading of a function can anyone please help me.

THIS HAS UPVOTES
FUCKING UPVOTES
also Mike Seymour is totes help vampire enabler
16:36
@LightnessRacesinOrbit - You want an Exhibit A, or did you mean your linked question? Former: stackoverflow.com/users/4202647/rashed-dip, latter: I don't know what that question was closed? </sarcasm>
@TravisJ I was joking - it would have been funny if your message was itself from a question-banned user trying to get in on the game :P
@CatPlusPlus +1 :)
Because it was vague
@LightnessRacesinOrbit - lol yes that would have been perfect, but alas, they were already q-banned :P
@LightnessRacesinOrbit seriously... two upvotes WTF
Hmm. I still haven't received my 100k goodies.
@R.MartinhoFernandes - Did you wait 6-8 weeks?
lol, found this email:
I earned a set of stuff from them on meta once, in February, and I got the package in June. Not complaining, just saying, it can take them a while. I was actually stoked to get it :D
> From: Martinho Fernandes <[email protected]>
To: [email protected]

Hello Abby.

I'm writing to let you know I had pizza for lunch today.
10
16:44
I want pizza too but I ate one yesterday
so I'll pass
how many pizzas do you eat per week on average?
I had a slice Saturday night at like 2am.. Can't say it was a whole pizza though.
@AndyProwl 0.3 or something of that order.
@AndyProwl ~1.5
maybe more
depends
16:45
Meh I need to buy food
I used to eat it like twice per week and realize it made me gain a lot of weight
Yeah, pizza is awesome, but I try to avoid it.
@AndyProwl I used to eat it like thrice per week but then the office moved away from the good pizza places.
What is this you talk about weight gain?
16:46
look at that M3.
look at it.
Meh :)
@AndyProwl Do some exercise.
It's only a 90's one
@R.MartinhoFernandes eh, not everyone has your slim privilege :P
I am driving a lambo in 2 weeks :D
16:47
@TravisJ only?
@R.MartinhoFernandes I wish I could
@TravisJ s/lambo/limbo
@milleniumbug - vegas speedway ;)
@TravisJ 1:18?
I had to stop almost any physical activity due to several health issues
16:48
It is actually rather reasonable, 5 laps for $399
especially during winter
@AndyProwl uh come one you're not fat or anything
not as slender as me or robot but still
@TravisJ lolwot
in 5 laps you won't heat up the tyres lel
@BartekBanachewicz I'm not fat but I have fat in excess and I have to make sacrifices in terms of what I eat in order to stay reasonably non-fat
@AndyProwl In all honesty, while I often paint it as a no-effort-always-slim kind of thing, I don't think that's true. I walk a daily average of ~8km, and when it's not too cold, I cycle more than that. It's not like I sit around eating bad food and just being magically slim.
@AndyProwl But yeah, that's a pity.
@AndyProwl I have some sugar-free whole-grain apple pie for the same reasons in our fridge :P
16:50
@R.MartinhoFernandes Ah, that definitely counts
it must suck not being able to eat what you want indeed
when I was able to work out or go swimming, I could eat more or less whatever I wanted
I ate an amazing steak on saturday
@BartekBanachewicz - Perhaps. I would be mid lap 2 they are warm though.
@AndyProwl what about his slime privilege? :o
16:51
@R.MartinhoFernandes funny, in my case it's just that
apparently.
@TravisJ anyway, still, that's how much, 15 minutes? $400 for 15 minutes is still pretty damn expensive
@BartekBanachewicz Steak = love
@AndyProwl It just happens that I like walking and cycling, so I don't really consider it as an effort to be slim.
@BartekBanachewicz Was it reindeer steak?
@BartekBanachewicz - Yup, it definitely is. Doing it anyway lol
@AndyProwl - Agree
Yum, reindeer steak.
@R.MartinhoFernandes no, a plain argentinian beef steak
the most "basic" one they had, so to speak
16:53
I tried a medium beef steak and didn't like it :(
a medium what
I enjoy the consistency of chicken meat more
or well done anything
alex stop right there
16:54
@jalf That's definitely something not everyone has :P
while we're still friends
k :(
a steak is OK if when you press it, it leaves a bit of blood on your plate
if it doesn't, it's overcooked
the same doesn't go for the blowjob
if steak is overcooked then the blowjob is... what
overcocked?
YEEEEEEEEEEEEEAAAAAAAAAAH
@BartekBanachewicz I know someone who would say differently.
@AlexM. well done
dat pun
ba-dum-tss
16:57
> A steak is OK if it was cooked for at most 20 seconds. Otherwise, it's overcooked.
We don't let him cook anymore.
Chicken is better anyway
By the way @R.MartinhoFernandes, I tried Eclipse this weekend. Have you played that?
Steak wins
16:58
@jalf Board game? Not yet.
If I wanted to eat raw meat I wouldn't bother cooking it at all
I don't know anyone with it.
Pork's tastier though
but also superfat
@jalf What's it like?
@jalf Eclipse: The IDE: The Game
16:59
I really liked it. Surprisingly sleek and streamlined for a space opera 4x kind of thing
if Eclipse were a game, it'd run at 10 FPS and be buggy as hell
most likely published by EA
But still has all the trappings you'd expect, designing and building spaceships, researching technologies, diplomacy and so on
I heard good things about it, but no one in the group has it, and I don't want to buy it without trying first.
Also not sure how much I'd get out of it, since it plays rather long, doesn't it?
BGG says "60 − 200 minutes".
Yeah. Our game took almost 8 hours (including dinner break), but that was including learning the rules and so on
and lots of table talk of course
Though BSG is 120 − 240 minutes and it doesn't feel exceptionally long.
@jalf Eight hours? Ow.
Yeah, if I have eight whole hours to play a game I'll go for Diplomacy.
17:01
well, I think I've played BSG games that hit 6+ hours. I'm sure we could do it a lot faster the next time
@jalf There's a bit of schism in our group about BSG now. One half prefers to play with variant rules that cut required distance in half. The other plays with normal rules.
The really weird thing, though, is that both modes of play take ~3h.
Anyway, I got into the stupidest stand-offs in it. In each turn, players can take as many actions as they like (but cost increases with each), and battles are only resolved at the end of the turn when no one wants to take further actions. So every time me and a neighboring player got into a fight, we'd start a ridiculous arms race, taking turns to upgrade our ships tailoring their layout to beat precisely whatever the opponent had.
@jalf That might explain why it takes so long :P
Then they'd change the layout of theirs, I'd respond by refitting my ship to counter that threat, etc. Every time we ended up with ships with 0 movement because we'd swapped out the engines for additional missiles or something :D
@R.MartinhoFernandes this sounds dumb. You'd need to be sure that your cooker is able to output just enough amount of power basing on the mass of the steak
17:05
Then next turn, the winner would have to spend an action upgrading his ship with an engine to be able to move again :D
anyway I've just read terrible article about new cars
@BartekBanachewicz No, he just likes it raw with a slight brown tint.
fuck if I'm going to buy anything produced after 2005 for my personal machine
That got a tiny bit ridiculous, but it was a ton of fun, and yeah, definitely explains the length of the game
the whole design process goes into making cars that are insanely expensive to repair
fuckers.
17:06
It does sound fun. I wonder if I can sucker someone into buying it.
a good thing is that I know what VVT-i means now
@BartekBanachewicz - I have a 91 trans am, and it is just like that. If I make it out from a simple repair with paying $500 then it was cheap
@TravisJ is it a V8
5.7 350 5-spd
ironically a part of me wants a car with TFSI and VVT and intercooler and whatnot
and another would buy a V8\
17:08
I thought you wanted a car so you could go places.
@R.MartinhoFernandes that's the first one, yes
Yeah I am at the same place. I like the instant power of the V8, but I like the winding out of a turbo
the 2nd one is meant to be actually fun to drive
or rather, picked basing on how fun it is to drive
I like driving just for the fun of it. It's very enjoyable.
Found a qban chat question on MSE and bountied it if anyone is interested: meta.stackexchange.com/questions/137262/…
user1804599
17:24
Oh, nice, there's an AbstractCompiler class that you can inherit from to make Maven work with a custom compiler.
user1804599
Woo my pull request got merged.
Whython
> Lounge<‌C++> frequently answers questions that are appropriate for the main site
that hasn't been true for years :P
TIL PHP lets you use semicolons instead of colons for case labels.
@BartekBanachewicz in your mincraft repo, where did you get that simplex algo?
user1804599
17:31
> Note that unlike some other languages, the continue statement applies to switch and acts similar to break. If you have a switch inside a loop and wish to continue to the next iteration of the outer loop, use continue 2.
user1804599
lol
lolwat
> Note: Note that unlike some other languages, the continue statement applies to switch and acts similar to break. If you have a switch inside a loop and wish to continue to the next iteration of the outer loop, use continue 2.
giggle
user1804599
@milleniumbug I made that joke so many times and it never got starred.
Xeo
Xeo
@LightnessRacesinOrbit Do you have rightfold plonked or something?
17:32
@LightnessRacesinOrbit repost
Yeah, I noticed that while I was reading the page.
user1804599
@Xeo Well, I have him plonked.
@Xeo If I lied and said "yes", would that get me out of the shit for accidental repost?
Xeo
Xeo
Nope!
Xeo
Xeo
17:33
Reposts are a harsh mistress
time for Feierabend
user1804599
Also LRipOst.
@райтфолд I know.
user1804599
@Xeo Femdom? Exciting!
@райтфолд Litterally stole it from you.
Xeo
Xeo
17:34
@milleniumbug Hitlerally?
user1804599
Help me write my compiler.
Powerline update broke everything.
@R.MartinhoFernandes Is it complaining about not finding the dist stuff?
Fuck open-source projects with non-sane versioning.
Messages with ../../blahblah/bash in it?
17:35
No.
Some python errors.
TypeErrors.
Oh… so likely another breakage then?
So I bit the bullet and bought Ori and the Blind Forest
Why can't I be working on iron man space suits :[
hire me elon pls
@CatPlusPlus Have you been fired?
@CatPlusPlus noob
17:41
Yeah, so....the answer is...? — Southee Mar 9 at 19:11
Ok...so still the answer is...? — Southee Mar 9 at 19:15
@LightnessRacesinOrbit What a hoser
@texasbruce Thanks, I was so confused really. That's why I took the time to point out that C++ does not have generics. And more to the point that they don't behave anything like C# generics like the OP might have been expecting. — Mgetz 8 secs ago
@BartekBanachewicz if there is blood in your steak, it's not been slaughtered properly. It's not hemoglobin that you are seeing, it's myoglobin.
Good morning.
17:56
Morning
Moaning
Mornin'
SJD
SJD
Hello. I get the following error:
HEAD CORRUPTION DETECTED: after Normal block (#186) at 0x00BD2E48.
CR detected that the application wrote to memory after end of heap buffer.. What that means explicitly?
user1804599
My code is beautiful.
18:06
Can't fucking sleep
user1804599
Maybe because it's seven o'clock.
@SJD Buffer overflow
I am guessing simply:
int array[5];
array[100] = 1001; //Ops, out of bounds
Let's answer shitty SO questions
pleonasm
SJD
SJD
Well... actually I do something like this:
void buildSortingAlgs(sortingAlg sortingAlgs[2], int *givenArray, int length)
{
int *input1 = new int[length];
memcpy(input1, givenArray, sizeof(int) * length);
heapsort(input1, length, sortingAlgs[0]);

memcpy(input1, givenArray, sizeof(int) * length);
quicksort(input1, 1, length, sortingAlgs[1]);

delete[] input1;
}
18:08
@SJD You're playing too loose with your pointers, or you're writing to an std::vector out of bounds
@SJD Here you go.
I hate asynchronous events
SJD
SJD
And surely, sortingAlgs really has 2 elements.. so I don't see where's the issue
I hate them so much
@SJD Not necessarily.
What are synchronous events anyway
18:09
@AndyProwl Node.JS style async evnets, or go-like async events, or C#-like async events?
Oh, erlang is interesting on its own way too.
@ParkYoung-Bae boost.signals2, observer pattern, and so on
SJD
SJD
@milleniumbug then having trouble just with copying some memory from a source to a destination?
@AndyProwl Right. Just checking you're following.
@SJD Have you tried debugging?
@ParkYoung-Bae lol
SJD
SJD
18:11
@milleniumbug not working:) I get that from the beginning
@SJD What IDE are you using?
@SJD You lie
@Nican It's C++. I have to notify listeners about stuff that happens, but not in the thread where the stuff happens.
@AndyProwl That doesn't imply async though!
SJD
SJD
@milleniumbug VS 2013 ulti
18:12
@ParkYoung-Bae Maybe I didn't use the correct term, not sure
SJD
SJD
@milleniumbug actually I get that from 'delete[] input1; '
Basically (simplified scenario) I have a collection of objects, and the collection owns the objects through unique pointers. When an object is added/removed, it fires an "object added"/"object removed" event that carries a reference to that object
user1804599
I have a problem with flags.
But these events are fired in a separate thread (there is a thread-safe queue and a consumer)
user1804599
Basically, there are many flags, but only various combinations of flags are allowed.
18:14
If you have an event queue then it's prolly async indeed
So when the client receives the event, the object may have already been destroyed by a different thread
Then don't use async
and the most obvious way to solve this is to use shared pointers instead of unique pointers
but I hate how it breaks my ownership design
@SJD That's where the problem shows itself, but that's not where it happened first.
I see no other solution besides async+shared or sync+unique
18:16
@AndyProwl I had the same problem with my signals and slots setup
SJD
SJD
@milleniumbug trying to delete something that does not exists?
If you want to risk it you can always send through a raw pointer and have the receiver delete it
@ParkYoung-Bae I have to. I can't afford a critical module where stuff happens to crash or deadlock because another non-critical module that listens to the events crashes.
Then go for the shared ptr (it's not like you have a choice)
user1804599
gist.github.com/rightfold/1534244ec80ec9eedf69 but I can't find a nice way to enforce these restrictions.
18:17
@ParkYoung-Bae There is another solution, but it's uglyish
@AndyProwl I doubt it
@райтфолд Do you have a class you use to encompass flags? You can add illegal values and check for them when you set or unset
user1804599
Currently I use Set[NonAccessModifier].
How many shrimps do you have to eat to make your skin turn pink?
@ParkYoung-Bae Unique pointers + custom deleters. The custom deleter would make the deletion happen in the thread that dispatches the events, so the object is destroyed only after all events regarding it have been dispatched and processed by clients.
user1804599
18:18
Yeah I could do that.
user1804599
I could also make the check a compilation phase.
@AndyProwl Or you could move the unique_ptr in the queue? Idk
user1804599
Nah, should be part of finding methods.
@SJD That's only one thing that can go wrong with dynamically allocated memory. Now, go run your code, line-by-line, and find something that goes wrong. (I think it's writing out of bounds to the array, but that's only guessing - I don't own a crystal ball)
@ParkYoung-Bae That's pretty much the same idea (the unique pointer would get destroyed in the queue), except that clients would have to explicitly add a deleting command to the queue, which is easy to forget and complicates dependencies. This way, the work is done implicitly by the deleter.
But it's not very elegant either, because now I have to define my own std::make_unique<>, my own alias for unique_ptr with the custom deleter (I don't want to type it everywhere), and it's complex
18:21
I don't know it's 2 am here it sounds like a wonderful idea
ahahah
I'll schedule the code review at 2 am
may increase the chances of my boss saying the same
user1804599
Also ScalaDoc is confusing type projections and path dependent types. :v
@Pris I don't want to risk it - also because there may be more receivers, so it's not clear which one should do the deletion
@AndyProwl Yeah, I used a shared_ptr for that scenario since a signal can broadcast to multiple slots. I made a little "emit_ptr" class that took a unique_ptr as a constructor param and made it into a shared_ptr so it didn't feel as ugly from the outside
Are you using a lib under the hood for event queues? I used asio
@Pris No, I wrote the queue myself, but I also planned to use asio after pantoona showed me how it's done
18:28
pantoona
and I'd really like to avoid shared pointers
@thecoshman I'll be up in 20 minutes
@AndyProwl Why? They seem well suited to your problem. Plus you get thread safe reference counting
@Pris It would complicate other aspects of the program. It would also be quite a contagious change, and shared pointers are easier to use wrong (creating cycles etc.). Also it would be only for those few cases where an object is destroyed while an event regarding it hasn't been processed yet, which is very unlikely in this application (yet possible): losing a clean ownership model because of this would upset me
Just use Qt and let the event loop per thread ownership model take care of the ownership for you.
18:41
@Nican I'd ask you to elaborate on that (I'm not familiar with Qt) but I have to leave. If you don't mind not getting an answer though, please feel free to elaborate :P
cheers guys
@AndyProwl See you later!
@AndyProwl You can selectively (e.g. depending on what subscribers there are) decide to share the object and then send it, without destroying. So most of the time you would have the usual semantics, but when the lifetime must be extended (right? how else would an on-deletion event make sense?) that is the time to share.
0
Q: Difference between static variable of c and of c++ .?

RAJAN_PARMAR//in C it is an error int x; static int y=x; //error //in c++ it is valid why? int x; static int y=x; //valid

boaurrrr it's coaullld in here
18:56
@Mgetz A question that's legitimately tagged both C and C++.

« first day (1612 days earlier)      last day (3562 days later) »