« first day (1377 days earlier)      last day (3572 days later) » 

11:00 AM
Not expert but I know some.
 
user1804599
I am writing a SQL query right now.
 
I was wondering about putting my game logic in SQL
 
@rightfold But are you an expert?
 
I prefer to keep my sanity, what little of it is left.
 
stuff like units moving from A to B with pathfinding
 
11:00 AM
I've got better with SQL since my current job
 
my world data (geometry) is in the DB, so are the units
 
have to deal with it all the time
 
it would make sense to make all those computations inside of the db, methinks
 
no, no it would not.
the SQL query analyzer is not designed for that kind of work.
 
Ell
@BartekBanachewicz Who are you and what have you done with the real bartek?
2
 
11:01 AM
and why the fuck did you put your game data in a database.
 
user1804599
 
user1804599
Your application.
 
ahaha lmao
 
Ell
haha rats
 
11:02 AM
@Puppy because I don't want to manage that data myself?
databases are, hint hint, good at managing data
 
you don't really need it to be "managed".
just stored and then loaded.
 
user1804599
How much data in bytes do you have at most?
 
I was estimating <150 moving units
around mars-sized geometry
@rightfold that's very hard to estimate right now
 
user1804599
If it's under 16 GB just use something like acid-state.
 
it's under 16GB
but I wanted to give PostGIS a try for that
 
user1804599
11:04 AM
Then just use something like acid-state.
 
Ell
@Puppy I thought databases were for doing that too :P
 
not really.
game geometry is essentially immutable so you can just store it on the disk directly.
 
Ell
Depends what your game is
 
and the game state, you can just keep in memory because it's transient and you don't need to persist it.
 
user1804599
You have to persist it for some games.
 
11:05 AM
@Puppy Maybe you don't.
 
user1804599
And Bartek's is one.
 
user1804599
But if it's not much data, you can just keep everything in RAM and only persist it for the case your server has to shut down.
 
user1804599
And it will be much easier to implement.
 
Probably. But keeping it as a separate db makes it easier to add multiple clients later
(look WoW armory again)
 
user1804599
If it becomes more data, just buy more RAM.
 
11:07 AM
The thing is PostGIS can handle that much data without even warming up
so I thought that maybe I can ask it for a bit more
 
Ell
who is PostGIS? o.O
 
user1804599
PostGIS is a GIS plugin for PostgreSQL.
 
Ell
Oh that guy, he is a barrel of laughs
 
0
Q: Why can't I call Assembly functions from my C source using CodeBlocks?

elaverickI'm trying to call a simple piece of assembly (as a test for something more complex later), however when I try and run the program it crashes (This program has stopped responding). main.c: #include <stdio.h> #include <stdlib.h> extern int bar(int param); int main() { int i=8; i = bar...

oh jeee
 
hmm it seems I'd need pgRouting
All Pairs Shortest Path, Johnson’s Algorithm [1]
All Pairs Shortest Path, Floyd-Warshall Algorithm [1]
Shortest Path A*
Bi-directional Dijkstra Shortest Path [1]
Bi-directional A* Shortest Path [1]
Shortest Path Dijkstra
Driving Distance
K-Shortest Path, Multiple Alternative Paths [1]
K-Dijkstra, One to Many Shortest Path [1]
Traveling Sales Person
Turn Restriction Shortest Path (TRSP) [1]
Shortest Path Shooting Star [2]
woah
that's impressive
 
11:17 AM
add "pgRouting provides functions for:" before that
cos I had no idea what you were going on about
also y u code blok?
 
routing=# SELECT * FROM shortest_path_astar('SELECT gid AS id,source::int4,
        target::int4, cost::double precision, rcost::double precision AS reverse_cost,
        x1,y1,x2,y2 FROM rtest',1,3,false,false);
 
totally unreadable
 
@LightnessRacesinOrbit because it's significantly terser than multiline quotations
 
@BartekBanachewicz how so?
 
@LightnessRacesinOrbit should be wrapped in something anyway; look what it does!
 
11:18 AM
@BartekBanachewicz meh
 
@LightnessRacesinOrbit do you think I could use that data to move my game units across the map? :D
I am not sure how I'd go about caching the result
I could precompute the path when the unit is sent
 
@LightnessRacesinOrbit Unreadable?
 
and then just "eat" the rows with keypoints
 
Ell
@BartekBanachewicz Why do it in the database?
What advantage does it pose?
 
11:20 AM
@TonyTheLion we're left to guess what "malicious" means there
 
@TonyTheLion I can't find the tweet.
 
@Ell I don't have to write that myself.
 
@sehe Yea, being specific was something they conveniently forgot
 
@Jefffrey note, not illegible
 
11:20 AM
@TonyTheLion something footy related
 
Ell
@BartekBanachewicz You don't anyway right?
 
@LightnessRacesinOrbit (it was a rhetorical question)
 
Ell
boost::graph and probably other graph libraries
 
@Ell boost?
what's that.
 
Ell
Boost has shortest path algorithm
Wait
What language are you writing in? :P
 
11:21 AM
not in C++, that's for sure :P
 
Ell
haha yeah :L
what is it in? haskell?
Lua?
are you still a lua aficionado?
 
@Ell As of now it's most probably Haskell, with Erlang as plan B.
 
lol pick a language, pick a language plan B.
 
what's wrong with that?
 
Don't you usually pick a language and stick with it?
As in, translating everything is pretty much rewriting everything?
 
11:25 AM
I try to use the best tool for the job.
 
unless you use the linux utility erlang2haskell
 
@rubenvb that's what prototypes are for
 
Eh, haskelltoerlang
Right.
 
hm
I could store a Z layer
that would allow me to make a pretty much dynamic map
well that's for later
also, I'm not sure
but apparently pgRouting only works on graphs
and I think I might need offroad support too
I describe an extremely efficient solution in a recently awarded patent viewable at google.com/patents/…. — whuber ♦ Jun 24 '13 at 16:43
 
Ell
I wonder if anyone can solve this i.imgur.com/Rj4VgRA.png . Give x in terms of theta and r
 
user3010322
11:36 AM
@Ell That diagram doesn't make any sense.
 
user3010322
Why the hell are you measuring beyond the inner circle? Is the outer circle 2x the radius?
 
@Ell the triangle on the right might be helpful
 
@Ell Not enough info to solve I don't think.
Unless this is abstract.. but even then.
 
@Jefffrey (it was a rhetorical answer)
 
Xeo
Hm. I think I'll finally get my stupid PSU tomorrow
 
11:45 AM
@Ell x = 2r
 
jet theta can be anything
 
@LucDanton how?
 
I’m interpreting the grey circles to mean that the outer, solid black circle is twice the radius of the inner one but that’s that.
 
Ell
@LucDanton Ahh that's my bad
That isn't quite the case
 
Xeo
11:49 AM
@Ell Theta is completely irrelevant, AFAICS
 
Ell
My diagram isn't very good. Let me try again
Basically, I'm trying to draw an n pointed star
 
user1804599
Seriously $10.3M ;_;
 
Ell
so I did this by having an outer radius and an inner radius then drew triangles for each point going from the outer to the inner, back to the outer
 
That sounds complex.
 
Ell
11:53 AM
I did this successfully
 
user1804599
@Ell x = 2r - 0theta
 
Ell
but then I wanted to be able to draw the perfect star of david, so I set n = 6 (where you get theta from) and set an outer radius
 
uh divide the circles both in n segments
offset one of them by half a segment
connect all the points
 
Ell
but then had to manually adjust the inner radius by eye until it gives a horizontal line
 
there, a star.
@Ell the fact that there's 6 of those changes things a bit
 
user1804599
11:55 AM
 
because they have two equilateral triangles
 
Ell
@BartekBanachewicz It doesn't really
 
@Ell the inner shape forms a hexagon
in a hexagon all walls are equal to the radius of enclosing circle
aaaand iirc in that shape the "pointy ends" are also equilateral
so you really know everything.
basically every line fragment in that star is equal in length
 
Ell
hmm
 
ha
 
Ell
12:00 PM
well I'm catching a train in half an hour
 
user1804599
> dat
 
Ell
But when I get to my destination I'll try to remember the code I wrote :3
 
@chmod711telkitty old news now
 
12:02 PM
a bit dangerous flying planes these a few months ...
 
no shit
everyone is telling me flying is safe
fuck that
 
statistically speaking it is!
 
I'll only get on a plane once they start equipping them with laser anti-missile stuff
from what I've read on aviation.se something like that is underway
 
> this is so we can experiment with dependent typing
it might be removed
woooooah
 
12:17 PM
well, stats is only relevant if no factor changes ...
 
please don't remove
 
Hmm
I'm already sorry I got involved in this guy's question
1
Q: Inherit from cv::Mat, a good idea?

Jan RüeggI would like to extend the cv::Mat class with a few features (like serialization, taking ownership of data pointers, color ordering (rgb/bgr/...)). One possibility is to create a new class (say CustomMat) that has a cv::Mat as a member: class CustomMat { int width() { return m_mat.size().widt...

 
@BartekBanachewicz What are you talking about?
 
but if terrorists are now targeting planes then old statistic is no longer relevant
 
@LightnessRacesinOrbit Confirms my statement
 
12:22 PM
my mum is flying back next Monday ... but currently things are not too bad
 
@Jefffrey Terra
 
@ParkYoung-Bae the comments debunk its lies
 
Comments are The Word Of God
 
12:38 PM
¬_¬ it wasn't that long ago I worked on this code
 
user1804599
My blood alcohol level is higher than my IQ.
 
no shit
 
@rightfold Does it also decrease when you pee
 
1:04 PM
@ParkYoung-Bae IQ?
 
Ell
What is your game Bartek?
 
Roy 0.1.3
Copyright (C) 2011 Brian McKenna
   let f x = x + 1
   f 5
=> 6
   f "test"
=> 'test1'
   fuck you.
Bartek experiences weird languages, part 63
@Ell super secret special stuff (it's between ogame and starcraft)
 
Ell
Cool
Open source?
 
 f f 1
=> 'function (x) {\n    return x + 1;\n}1'
seriously.
seriously?
 
Ell
Lol
 
1:14 PM
@Ell Do you know haskell already?
 
Ell
That is ridiculous
And meh not really
 
@Ell well then :P
 
Ell
I'm confused
Roy is haskel? O.o
 
user1804599
No.
 
user1804599
> console.log 40 + 2
 
user1804599
1:17 PM
ugh that operator precedence
 
It's Open Source if you are a math genius :-p
 
user1804599
horrible
 
Or I totally misunderstood that.
 
1:27 PM
I know little bit haskell and is just mind twisting
and way more cool than c++
 
Xeo
@BartekBanachewicz hahaha
 
@rightfold agreed. fuck that thing
 
Xeo
COERCE ALL THE STRINGS
 
we should bash its author with said f
until ideas like that stop appearing in his head
what the fuck was he thinking
how could he possibly think it's a good idea
maybe it's that fucking repl ;_;
@Ell that being said, I'll most probably opensource it.
I'll be asking haskell people here for reviews periodically anyway I suppose.
 
@Puppy I've just received a personal CodeMentor request
 
o rly
@StackedCrooked Having a scope guard pretty much means that you're doing it wrong.
 
Hey, guys. I've a question: Someone marked one of my posts as a duplicate a few days ago, and I don't think it is. Said mark has not been resolved (that is, the post hasn't actually been declared a duplicate outside of that one dude marking it). Is there something I can do?
 
@Puppy yep. Too bad the guy wants QT help.
 
@AmagicalFishy Uh, you don't want it closed as duplicate, and it hasn't been closed as duplicate. Why would you need to do anything?
 
Xeo
1:51 PM
Oh come on IntelliSense... stop your crap.
 
@BartekBanachewicz QuickTime?
 
@jalf I was under the impression that simply it being marked as a duplicate reduces traffic to it
 
@rubenvb no, C++ QT. And OpenGL in it
 
I guess I meant "is there anything I can do" in the sense of "is there anything I can do to get it unmarked"
 
MainWidget::~MainWidget()
 {
     delete timer; timer = 0;
     delete program; program = 0;
     delete geometries; geometries = 0;

     deleteTexture(texture);
 }
Ah I heard this QT library is nice.
The examples look amazing.
 
1:54 PM
Oo MainWidget not MeanMidget ...
 
@Puppy that seems like a dogmatic statement
Puppy so dog matic :P
 
@BartekBanachewicz Here it's even worse than that
 
@StackedCrooked dat pun
 
@StackedCrooked dat pun
@TonyTheLion dat dat pun
 
@StackedCrooked It basically just means that you're not using RAII correctly. It's a mistake on the same level as manual free.
 
1:57 PM
@BartekBanachewicz Soooo... Qt.
I should thank you guys for making me a fucking pedant.
Qt shouldn't need much deleteing.
 
@rubenvb I don't use it so... well
 
Isn't RAII basically a scope-guard wrapper?
 
@Puppy I've replied I can try to help him. I'll tell you later how it went
 

« first day (1377 days earlier)      last day (3572 days later) »