« first day (1135 days earlier)      last day (3808 days later) » 

2:00 AM
@zch what does this.... return?
 
zch
@Pawnguy7 distance for each field on the map
 
Wait.
What.
I thought you were referring to Brain Fuck Schedulers
 
@Pawnguy7 I'm planning on killing every guy on the lounge, I need your address.
 
Alf should come back.
 
zch
@MohammadAliBaydoun They are have increasingly weird names of these schedulers, I didn't know this one
 
2:05 AM
@zch sorry, I am a bit lost.
 
zch
@Pawnguy7, it sets distance[e] to be equal to minimal number of steps necessary to go from e to target
 
@Pawnguy7 But seriously, out of curiosity in which state do you live?
 
Wow.
People make mario AI O.o
 
Too far.
;P
 
@ScottW you good at recursion?
 
2:14 AM
Wrote a little atomic counter.
 
welp
Boss Toss does it again.
 
boss toss?
 
never mind
 
Starcraft tournament?
 
ye
 
2:15 AM
@DeadMG Recall that AI I was telling you about?
 
yeah
 
I made it.
but it sucks :\
 
@Pawnguy7 gz
 
Are Terran, Zerg and Protoss used evenly? Or is one race more often used than others?
 
@ScottW I need to do something with recursion, and I am kind of lost
 
2:16 AM
@StackedCrooked They have a pretty even spread.
 
@ScottW well
 
Back when I played (early 2000) nobody used Terran.
 
Terran is not doing as well as Protoss or Zerg right now though.
 
I like Zerg.
 
I thought I did after my water filling thing. And lighting.
 
2:17 AM
@StackedCrooked That was a game and an expansion ago.
 
@DeadMG oh good, in the SC2 beta is was 70% terran
 
I rarely play Protoss, for some reason.
 
But I don't know how to do it with a tree, and find the move of the best score.
 
also, everybody changed their minds about Terran after Boxer.
 
@DeadMG reference
So... I need to look ahead.
@ScottW I think I am going to pass.
 
2:18 AM
I often played Terran with bunkers and tanks on the hunters map.
And once medics were introduced I used stim packs a lot.
 
@Pawnguy7 The AI can't find an efficient path, it can't detect obstacles, and it can't look ahead.
 
@ScottW I think. Bartek said something once about having a score function.
 
@DeadMG He made Terran popular?
 
@DeadMG It only checks it's immediate surroundings, yes.
@ScottW Aren't they about the same?
 
@StackedCrooked Well, it's basically that before that nobody knew how to play T as well as they knew how to play P or Z. But Boxer showed them how.
it's very similar to what happened with Stephano and WoL Zerg.
 
2:19 AM
@ScottW scv rush?
 
I did an scv rush once because I had to leave the game ASAP
 
I wish Starcraft had an in-game scripting API which allows the player to delegate micromanagement to the computer. Or even exploring and hit-and run tactics.
 
Wait, why does my node have four children.
 
user3010322
Because it's having too much sex.
 
user3010322
Give it contraceptives.
 
2:21 AM
@ScottW It wouldn't be cheating if it was an official feature.
However, it wouldn't be exciting to watch probably.
 
oh, I thought you meant mapmaking triggers
 
A Haskell API would be nice :P
 
what I want is for that voice to remind me when I have 300+ minerals/gas
 
First function: Victory = ...
 
or buildings that are idle for too long
exactly
 
2:22 AM
@DeadMG anyway, what do you recommend I do? I need to search with depth
 
OP2 did that many years ago and I still play it
 
well, I hate to be blunt about this, but consider just finding some online algorithms like A*.
 
@ScottW Spawn more Overlords!
I want to play Starcraft now.
 
yeah, you're right, fuck that shit.
 
user3010322
Whoa
 
2:24 AM
@DeadMG could work. Apparently I don't know as much about trees as I thought.
 
user3010322
 
user3010322
^ std:: mandated to have this there? (it's in type_traits)
 
std:: doesn't have identity
 
user3010322
I made my own identity type because I didn't see it in the std::
 
user3010322
Oh, okay
 
user3010322
2:24 AM
So it's just STL being STL, AKA awesome.
 
@Pawnguy7 what is the winning condition?
 
identitty
 
a bit strange that it's written like that
 
user3010322
That's the way STL code is written for MSVC
 
i.e. identity without using reserved identifiers.
 
2:25 AM
@StackedCrooked the goal is to reach the food
 
why not _Identity?
 
AI that tries to kill you would be neat, but I have no clue how you would attempt that.
 
ah
 
user3010322
@Rapptz Laziness, or maybe anticipation that it will become std::
 
it was mandated to be Standard, but isn't anymore.
they probably just never had a reason to remove it after implementing a draft version of C++11
 
user3010322
2:26 AM
FWIW, it appears to be in the declaration before std::forward, so
 
it's supposed to use std::remove_reference
I'm pretty sure STL knows that too..
 
Are expression templates used in std library anywhere?
 
@Rapptz It was std::identity.
 
@StackedCrooked yes, std::valarray
 
@StackedCrooked No.
 
2:28 AM
@StackedCrooked std::valarray uses them in Clang and GCC.
 
user3010322
What are... expression templates?
 
it was a time before move semantics
 
MSDN says they are required to return valarray<T>
 
user3010322
@ScottW <3
 
@ThePhD I predict they will become your next obsession.
 
2:29 AM
@DeadMG They're not.
We discussed this before too.
I'm working on a Lua thing..
 
user3010322
Not gonna use that wrapper that bananu and kbok wrote?
 
@ThePhD nope
too many dependencies
 
user3010322
What were its dependencies?
 
Boost.Exception and Boost.Fusion
Both are huge ._.
 
why are you afraid of boost :D
embrace it! :p
 
2:33 AM
I'm not.
 
I was a big fan of Arch Koven (AoK).
 
I use Boost.Filesystem and it isn't huge like Boost.Exception or Boost.Fusion
 
user3010322
I think the most expensive thing about Boost.Exception is its stack walker
 
user3010322
It has to have an implementation for that for each OS / compiler mixup.
 
user3010322
I can see that getting very expensive, very quick.
 
2:34 AM
also bcp as a tool fucking blows
 
user3010322
bcp?
 
@DeadMG so does the spec, with a hidden footnote saying it doesn't actually have to be a valarray, just something with the same interface
 
@Rapptz I've never discussed this before.
 
I meant Mooing, Xeo and I.
 
2:35 AM
@Rapptz well, expression templates still have uses
 
@Rapptz Move semantics don't replace expression templates. Expression templates are more generic and more powerful than move semantics.
 
Jul 26 at 21:36, by Xeo
> 3 Any function returning a valarray<T> is permitted to return an object of another type, provided all the const member functions of valarray<T> are also applicable to this type. This return type shall not add more than two levels of template nesting over the most deeply nested argument type.280
 
@ThePhD It looks useful until you scroll in the end and it basically says "we have to include these 190+ headers, sorry"
 
user3010322
Lol.
 
user3010322
Nice one, boost.
 
2:40 AM
Nobody here can help you with your grep question.
 
user3010322
Stack Overflow can help you with your grep question.
 
user3010322
Google can also help you, I think.
 
@DeadMG have you used A* before?
 
yes.
 
2:47 AM
I was looking at this
 
I'm having some trouble compiling my program, and was wondering if anyone would like to help...
 
nope
 
It seems to.... not follow? Paths that... like, if you have a square to your left (and you can go diagonal), if the one to the top-right is closer by going right then up, instead of at once.
I just.. don't know how to implement that.
 
@Pawnguy7 Just steal the algorithm code from Wikipedia.
 
So I read Chapter 5 of C++ Concurrency in Action today. Took me more than half a day to get through it.
But I finally got a basic grasp on atomics now.
 
2:51 AM
I wonder who comes up with these things.
 
The only reason I do this is so I can convince my colleague to stop using volatile.
 
What is that book about?
 
The title is a hint :)
 
@Pawnguy7 Which things?
 
@Pawnguy7 Algorithms?
 
2:51 AM
Multithreaded applications
 
Various algorithms, yes.
I just... wouldn't think of these.
 
Mathematicians
 
@Pawnguy7 Nor would I, most of the time.
but what's really insane is the people who prove properties about them.
 
Example?
 
well, that guy who proved that A* is the most optimal algorithm, ever, for the most general pathfinding case.
 
2:56 AM
Yup, I cannot imagine how you would do that.
 
but A* itself isn't that complex, conceptually.
 
I want to say I understand the concept, but am falling a bit short on implementation.
 
I've invented a few. Not useful for general cases though
 
@Pawnguy7 Seriously, just steal the implementation from Wikipedia. It's not that complex.
 
@DeadMG Is there something other than the pseudocode?
 
2:58 AM
no.
 
Also.
Why do they use :=?
 
it's pseudocode, there's no syntactic laws.
 
I thought the goal was to be intuitive :D
 
it's really not that difficult to interpret
 
@Pawnguy7 It's a group dynamic. One person comes up with an interesting idea, other people are inspired and contribute improvements. Many iterations of that can lead to great things.
 
3:00 AM
hum.
unrecognized option `--strip-unneeded SYSCFLAGS=-DLUA_BUILD_AS_DLL SYSLIBS= SYSLDFLAGS=-s lua.exe'
 
@DeadMG what is the [] parts?
 
well that's useful.
 
@Pawnguy7 Indexing.
 
@Pawnguy7 This is the Internet, there's an abundance of implementation to be found.
 
@DeadMG is it a map?
 
3:01 AM
@Pawnguy7 Who gives a shit?
it's not a real implementation.
 
I cannot parse what they are doing :\
 
all that matters is that it's associative.
 
What is a node composed of in this case?
 
4
Q: Is there a way to utilize all XMM registers?

MathaiHere is a code snippet to compute square root of values in a float array taken from http://felix.abecassis.me/2011/09/cpp-getting-started-with-sse/ void sse(float* a, int N) { // We assume N % 4 == 0. int nb_iters = N / 4; __m128* ptr = (__m128*)a; for (int i = 0; i < nb_iters; ...

^^ Another: "I didn't turn on optimizations" question...
AHHHHHHHHHHHHHHHHHHH
 
He doesn't know of optimisation flags and just went to SSE?
 
3:07 AM
@Rapptz Yeah.
 
lol
 
@Mysticial And he got 4 upvotes out of it?
 
@Borgleader Most of the upvotes were before we found the OP had optimizations disabled.
 
Oh, that explains it
 
3:24 AM
@DeadMG I am getting nowhere
 
The younger of the 2 baby magpies has been trained like a pet chicken - has been eating cooked rice from my hand
 
well, keep working on it
cracking A* was a big breakthrough for me
 
Big breakthrough into what?
 
Hum..
I can't do std::unique_ptr<lua_State, decltype(lua_close)> apparently
 
@Pawnguy7 pet magpie chick
 
3:31 AM
@Rapptz lua_close might be an lvalue or a macro. Consider decltype(+lua_close) to get that FP type.
@Pawnguy7 Well, a large number of the skills that I use now originally came because I was trying to implement various algorithms from pseudocode around the web to implement my game thingie, and A* was one of the harder ones.
 
Yeah I fixed it by doing std::unique_ptr<lua_State, void(*)(lua_State*)>
 
@DeadMG what skills?
 
3:48 AM
How do you add nodes :\
 
well, it's really about deciding what you need.
what is a node? what are you trying to add it to?
 
Well.
I think I have a decent idea of how a node works - holds a value and list of children.
 
@Pawnguy7 I think a good exercise for you might be to code the basic A* "find the shortest path between two cities" problem
 
I just... don't know the implementation, or what the value is, in this case.
 
@Pawnguy7 More like list of neighbors in this case, A* usually works on graphs not trees
 
3:50 AM
Maybe the value is pair<g, h> value?
 
@Pawnguy7 Nope.
the Wikipedia pseudocode explicitly has a g_score map for mapping from node to g value.
and the h value is computed on need.
 
So far my fill-in for node consists of the x,y location.
 
well, great.
go with that.
 
What does adding nodes do though?
In reconstruct_path
 
oh, they're just building a list of nodes which is the intended path.
 
3:53 AM
Ah.
So past it a list by reference, basically?
 
why not just return the list?
 
You need to understand the idea behind the algorithm before you can start thinking about implementation.
 
@DeadMG Wouldn't the copies be slower?
 
er, move semantics?
also, wait for profile data before optimizing?
 
@Pawnguy7 Don't think about purrformance
 
3:56 AM
@StackedCrooked I often find implementing to be a great help in understanding.
 
First make it work, god dammit.
 
@StackedCrooked But it's also useful to have an editor + compiler at hand. Seeing how it works and how pseudocode reflects in code is a very good learning experience.
 
@DeadMG Yeah, that's true.
However, I got a little irritated.
Ah well..
 
urgh, why is it that every other "C++" library I try to use has a horrible C interface >:(
 
@melak47 They're merely C++ wrappers. Ugly C++ wrappers.
 
4:00 AM
I don't have the time to wrap all these things ._.
 
Just wrap C functions with equivalent C++ functions.
I would avoid trying to make an OO wrapper.
 
you'd need an OO wrapper if it does things like pseudonamespace_new_object(...);
 
the thing is...it IS a C++ library, it does use classes and member functions, but it's full of pointer returning factory functions, macros, and not a namespace in sight :E
 
so you can RAII it up and stuff
 
Yeah, I would make small RAII wrappers.
 
4:04 AM
that still leaves me with a bunch of ugly macros and enums, unless I wrap those, too :p
 
lol
at that point you rewrite it
 
@melak47 At least use smart pointers if it uses lots of them.
 
I made this GStreamer wrapper functions a few years ago. (Of course, now I think it sucks.)
But the basic idea to "enhance" rather than encapsulate is not so bad I think.
 
the hell
these stupid macros aren't even doing anything except calling functions
WHO DOES THAT
 
@melak47 WinAPI. :P
 
4:09 AM
yep :D
 
WinAPI and Lua and a few other C libs.
 
#define asFUNCTION(f) asFunctionPtr(f)
no #ifdefs, nothing
 
@melak47 As I just recently found out, Lua does this for a lot of shit.
 
But you can redefine macros (via undef). This allows you to implement hooks!
 
undefine all the macros!
 
4:11 AM
@StackedCrooked That's interesting. Never thought of that.
 
I've never really done this, except for experimentation perhaps.
 
why does lua have lua_tointeger but not lua_isinteger like everything else
 
probably just an oversight
there's a lua_type IIRC
 
if it was an oversight then shouldn't it have been fixed long time ago..?
 
@DeadMG yeah there is.
still, pretty weird
lua_type doesn't have a macro for integers
I guess it just bundles all numbers into lua_number
then why have lua_integer..
Can someone tell me why I can't specialise template functions inside a class?
It really makes no sense why I can't do that :s
 
4:26 AM
the Committee already accepts that the restriction is arbitrary.
 
Isnt templating member functions illegal? or are you asking why it isnt legal?
 
You can dispatch to an overload which takes identity<T>.
 
there were proposals to change it and I believe one of them made it into C++14
 
@StackedCrooked I shouldn't have to do that. :|
 
Sorry to disappoint you :)
 
4:27 AM
@Rapptz And soon you wont have to!
 
I will try harder next time.
:P
 
:D
 
MSVC accepted specialised template functions so it bugged me that I couldn't do it with GCC.
 
@DeadMG I remember that "proposal" with all the curses. That was actually fun to read.
 
@Rapptz Wont it stop allowing it when they fix two-phase lookup or something like that?
 
4:29 AM
@MarkGarcia It was lollerskates.
 
Oh I remember that one now.
 
Corgis <3
 
Hello
 
imgur.com/a/LprrK?gallery (The Crush is really scary.)
 
4:30 AM
also screw lua for now, time to play video games.
 
Binned
 
lol. Sorry for me using the word "Java".
 
eh, it was more a general cleanup.
 
@Rapptz lol
 
Yeah. That's entertaining as well as being quite educational.
 

« first day (1135 days earlier)      last day (3808 days later) »