« first day (739 days earlier)      last day (4285 days later) » 
00:00 - 22:0022:00 - 23:00

12:10 AM
@melak47 doubles gives you about 18.
but you can't see all the possible digits after the 15th
 
for what it's worth after the 16th digit both are wrong :p
 
something like the last digits should be 125 or 250 or 375 and so on...
 
 
1 hour later…
1:25 AM
quick question: which one do you prefer?

if (s == String.Empty)
if (s == "")
 
 
3 hours later…
user4704
4:16 AM
@Gajet It depends. They are not always interchangeable.
 
5:04 AM
@JoshPetrie I'm talking just about which one do you prefer. besides in most of the languages I know they have same meaning.
 
5:18 AM
Good Morning Everyone
 
good morning!
or I guess I should say good noon based on your timezone!
 
@Gajet ohh from where you are ?
 
iran.
 
@Gajet ok i am from India
in which tech you are working @Gajet
 
@NareshSharma both your name and your profile info suggest that!
@NareshSharma whatever people need me to work in.
:D
currently Windows phone.
 
5:23 AM
@Gajet that's really great you are an all rounder
 
I used to work in PC, iPhone, android, linux too.
yeah, anything goes coding!
 
@Gajet i am working on android app from last 8monts now i want to work on games for android can you please guide me how can i start and some other info for the beginner
 
I guess you are familiar with Java.
and how to develop apps for android in java.
 
@Gajet yes i am
 
I'm not much of an android developer myself. but based on the questions I've seen in the site, I say you should start learning either AndEngine or cocos2d-android
AndEngine has a larger audience compared to cocos2d-android.
I've got no experience with either of them. But there is an engine named cocos2d-x which is a C++ port of their family and you can use to develop games for both android and iOS.
and I used to prototype some games in cocos2d-x.
 
5:29 AM
@Gajet so AndEngine is better than cocos2d according to you
 
I'm not saying better.
I've just seen more people using it.
 
that doesn't prove anything. it just means you might get answers (and hints) faster if you use andengine
 
about Physics Engine i also heard somewhere
 
I'm not familiar with physics engines available in java at all.
I've only used box2d (which is written in C++)
 
5:32 AM
@Gajet ok thanks for providing me that knowledge
@Gajet yesterday i have seen Iran wrestler's in Olympic they were very strong and doing well.
 
@NareshSharma I'm not sure if I've seen them myself :|.
I almost didn't see any of Olympic matchs
 
@Gajet hmm
 
 
3 hours later…
8:52 AM
hi
 
9:17 AM
Hi.
 
 
5 hours later…
2:43 PM
0
Q: Why can't we see who voted posts?

BanePretty much self-explaining. What are the reasons behind not being able to see who upvoted or downvoted posts?

 
3:26 PM
Mondays are so much worse knowing that there will be no Funday Monday tonight... :(
 
user4704
@Gajet I prefer the most direct and readable one where applicable.
 
user4704
@Gajet String.Empty is not a constant in many languages (including C#), it's a property or function or global variable or similar, and so cannot be used where a constant is required.
 
@JoshPetrie - good answer on meta. You are better with words than I as your second bullet and follow up statement really stated what I tried to say but in a much better and more concise manner :)
 
user4704
Heh
 
I have a tendency to get wordy and talk in circles
 
user4704
3:37 PM
We had a big problem with retaliation voting on GDNet
 
user4704
Even with anonymous voting.
 
That's really too bad. I know I took my first few down votes personally but now that I've been here longer and have a better understanding of the site I know its for the best. Even if it stings a little.
 
Even on SO, there's plenty of cases of retaliation voting
especially among lower-rep users who retaliate against the first person to post a negative comment.
 
:/ yeah. It happens
"What do you mean this isn't a forum!?"
 
user4704
!!SHOCK!!
 
3:54 PM
I dunno, sometimes I do wish we had a stackoverflowoverflow. Some really useful/entertaining-but-offtopic questions get closed.
Including the one where it is revealed that I am a terrible programmer (The Jargon question)
 
4:30 PM
why this question is still open?
-5
Q: andegine or unity or monogame

androidNoobI'm new to android but I've been planning to create some basic game.I would like to jump in game development. I've seen many tutorials on how to create a game using andengine. But while searching for other tutorials, I've come across UNITY. And it supports android and IOS too. The other was monog...

 
user4704
It only has 3 close votes.
 
no I mean why it didn't receive all 5 close votes?
 
user4704
4 now.
 
user4704
I don't know.
 
user4704
That's not a question I can answer.
 
4:34 PM
5
 
user4704
The obvious theory would be that it wasn't seen by five people with the ability to cast a close vote.
 
@tylerrrr07 it seems josh is always better with words.
he gave a same answer thing I tried to give in response to nicol's question.
though it seems no body understood mine :(
 
One thing I need to work on as well.
As it turns out, "communication skills" are one of the most important for programmers.
Partly because it's important to convey your ideas to others, and partly because there's a large overlap between "good understanding" and "good communication"
 
5:04 PM
@Jimmy my talking in circles unfortunately comes from my attempt at making sure a non technical person understands what I'm explaining. I've been told my explanations are good but I personally feel they could be significantly more to the point.
 
5:30 PM
Is it wrong that I love correcting people?
Especially when it's a person that seems to know his stuff?
And has been saying something wrong for a long while? :P
 
@William'MindWorX'Mariager No, all of us have our anal retentive side, some just hide it very well. Also, you shouldn't start a sentence with an "and" unless you go for a very specific tone of voice or write poetry. ;)
 
It's not wrong, but the way you correct people could be varying levels of wrong.
 
user4704
YOU ARE WRONG AND THEREFORE DUMB!
 
user4704
5:46 PM
/crickets
 
/cries
NO U
(ノಠ益ಠ)ノ彡┻━┻
 
I'm going to correct one Andrew Russell for his mistaken quest to tell everyone that setting the size of a GraphicsDevice in .Initiailze in the standard XNA Game class is a bad thing.
The only bad thing is creating a new GraphicsDevice.
 
:O
You wouldn't!
 
4
A: How to resize window using XNA

Andrew RussellIt is frustrating that (as you say) "A lot of people say that the ApplyChanges() call is not necessary, and equally as many say that it is" -- the fact of the matter is that it depends on what you are doing and where you are doing it! (How do I know all this? I've implemented it.) When you ar...

 
6:02 PM
So... you can do it in initialize if you call apply changes? Just don't create a new one? (obvs)
 
Yeah.
The way I have it is, create it in the constructor, then in Initialize I load settings and then resize the window according.
 
Well I guess to be fair then... his approach is still better but within initialize really isn't that big of a deal
 
@tylerrrr07 I'm starting to believe you have a text document full of those kinda smileys!
 
@Gajet its usually the same one - I just google "table flip" and copy whichever one feels right for the time.
 
6:07 PM
That one works
A lot of times I can just grab it from google search results
from the page description
 
┗[© ♒ ©]┛ ︵ ┻━┻
I'm a robot! :D
 
what is wrong with C# and immutable structs?
why is everyone so assured than structs being immutable is good?
there is no such a nonsense in C++ culture! at least as far as I know.
 
because C++ programmers are used to call-by-value
 
Well, structs are a By-Value type.
So making them act like other By-Value types make sense doesn't it?
 
C# programmers expect that when you assign a field of a struct, the "original one" gets modified, which isn't the case
or at least, it isn't always the case
 
6:14 PM
well, when I'm defining something as struct, I'm pretty sure I want it to be passed by value.
 
or maybe you want it to be laid out in memory a certain way
 
that's the whole reason they have structs! to be able to pass things by values!
 
Structs are just fancy arrays
 
@Gajet the problem is that in C# you usually don't have pointers and the -> operator
 
today I had to change something about 800 lines of my code just because list<struct> is immutable :(
@Jimmy and C++ does have a reference which will result in pass by reference without ->operator
 
6:15 PM
Why didn't you just change it to be a class?
It's a matter of behavior, and picking the right one for the job.
 
cause vertex data should be a non-nullable field.
 
@Gajet and C# has a pass by reference too, which is sometimes more efficient than copying a large struct onto the stack
 
VertexBuffer.SetData forced me .
 
yeah, and vertex data should be in contiguous memory
you can't allocate an array of continuous classes.
 
@Jimmy that's completely logic.
 
6:18 PM
structs being immutable makes sense. If you pass a class to an method, you don't know if it's the same after the call. With structs you do, unless you pass it by ref.
 
user4704
Pass by value and immutability are two different things.
 
the only thing illogical here is the fact that I can't change members of a list!
 
user4704
Structs in C# are not immutable. Some structs are designed that way (as are some classes)
 
@JoshPetrie I'm talking only about Generic.list<VertexData> not letting me change anything inside it :(
 
user4704
That is not because List or structs are immutable.
 
6:20 PM
@Gajet, Use another collection?
 
user4704
That's because structures are value types, and this[int index] returns a copy of the structure, consequently.
 
Or do you mean, you want to edit a member of a struct inside it?
 
@William'MindWorX'Mariager he wants to edit a member
 
@JoshPetrie I guess that's what I'm mostly angry about.
 
as in, list[0].Foo = 5
 
why doesn't it return a reference? like all those fancy stl containers in C++?
 
user4704
Because struct is a value type.
 
user4704
The same problem exists in C++ if you return by value.
 
user4704
The only difference here is the mechanism by which things can be configured to be pass-by-reference versus by-value.
 
How does the C# compiler generate the opcodes for arrays?
since array[0].Foo = 5 is legal
 
6:24 PM
gotta go BBL
 
user4704
C++ allows configuration of passing semantics at a usage-site level (as opposed to C#'s type level), providing extra flexibility at the code of increased danger and bug potential.
 
@Jimmy You'll just be modifying the top of the stack I think. Assuming array[0] pushes a copy of the struct to the stack, then .Foo = 5 modifies part of that stack.
But since it's never assigned to anything, it is immediately cleared when you leave the method.
 
I don't see how the stack plays into this
since the array isn't stackallocated.
 
structs are on the stack.
Oh.
I dunno, maybe I misunderstood the question. :)
 
local structs are on the stack. arrays of structs are on the heap. array of structs declared with 'stackalloc' are back on the stack.
arrays of structs on the heap are physically there in the array, as opposed to arrays of classes, which are just arrays of pointers.
 
6:29 PM
Yeah, that's why I went with structs for my tile engine, saved me a ton of memory as it's just continuous in memory.
 
user4704
Arrays are intrinsic, that's why (new ones are allocated with newarr, access is done with ldelema, etc)
 
user4704
List, however, is a class in the BCL.
 
6:50 PM
Sup people
 
Working on a game I started on the weekend
 
I'm just doing nothing. Very tired. First day at school after a looong break.
And then work afterwards.
 
I actually have intentions of programming tonight. :D
 
Oh, your Legeria clone? Legeria 2.0 eh? Thief!
 
7:09 PM
lol
I've actually come up with a pretty clever name for it I think. Legeria 3.0
or maybe... Legeria Evolved
 
Super Legeria Brothers
 
Super Legeria Brothers: Online
 
Super Legeria Brothers: Ultimate Online MMORPRTFPSG Edition
 
Super Legeria Brothers: Ultimate Online MMORPRTFPSG Edition-mon
 
7:17 PM
L3geria
 
Super Legeria Brothers Craft: Ultimate Online MMORPRTFPSG Edition-mon
I could have a .com - thats more than @William'MindWorX'Mariager can say :P
 
I could have a .com too. If I wanted to pay $5,000 for it. :P
 
Got me there
 
Hello @TomWijsman
 
Hello?
 
7:22 PM
Stranger! Danger!
 
Is it me you're looking for?
 
@TomWijsman Are you a a droid?
 
What for a question is that?
 
@TomWijsman, Just wanted to greet you. :P You sure are in a lot of rooms.
 
Well if you aren't a droid... then you are not one of the droids we are looking for.
 
7:23 PM
What kind of droids are you looking for?
 
whacks @tylerrrr07 over the head BAD JOKE!
 
Since I'm in a lot of rooms, I'll try finding them.
Joined some more rooms on chat.stackoverflow.com
 
I may have purchased this shirt - teefury.com/archive/1656/_Imperial_Damacy
 
Oh, I think I have found the droid...
1 hour ago, by William 'MindWorX' Mariager
┗[© ♒ ©]┛ ︵ ┻━┻
 
@tylerrrr07 Nerd.
@TomWijsman Well played.
 
7:26 PM
Thanks, did I just play test one of the games you guys made? Or are there still no chat.SE / chat.SO based games to play? :(
 
You think this is a game?
You think we hang out here to have fun?
This is a serious chat!
 
Then what are those other things?
 
We have old-fart @JoshPetrie and new-guy @JohnMcDonald, the best in their respective fields giving pro advice around the clock!
It was a test. To see if you'd fit.
 
Wait, what...
49
Q: How to write a network game?

Tom WijsmanBased on Why is so hard to develop a MMO?: Networked game development is not trivial; there are large obstacles to overcome in not only latency, but cheat prevention, state management and load balancing. If you're not experienced with writing a networked game, this is going to be a difficult ...

 
@TomWijsman well alright. You can be an old fart too.
 
7:29 PM
It's closed... :(
 
yeah, we've straightened up
 
Read this: "Are there any good books, tutorials, sites, interesting articles or other questions regarding this?

I'm looking for broad answers, but specific ones are fine too to learn the difference." then read the FAQ
 
5
Q: "How to make an entire Game X" - off-topic?

CyclopsFor instance, How to make a Battleship game?

I see.
Well, more like how to make (or start making) a particular type of game as stated in the FAQ, that meta question isn't really an exact representation of that line in the FAQ.
 
"where to begin doing X" is out of the scope of a lot of the network
 
user4704
8:01 PM
I resent the assertion that I am an "old fart."
 
user4704
How old do you people think I am? How old does my profile picture look?!
 
well, it obviously predates the invention of color photography. So, somewhere in the 1800's probably.
 
user4704
I'm wearing a purple shirt!
 
user4704
:P
 
8:21 PM
So this may seem like a really simple question but I haven't worked much with interfaces before
Does it make sense in my code that anywhere getting specific to use the interface instead of a physical class?
 
@JoshPetrie based on solely that picture and your job position, I'd say something around 34-35
 
Seems like it leaves the classes much more flexible
 
and back to my wondering why return value of "this[int]" is immutable, why can't they return simple reference in such cases?
like "T& operator[](int)" which we had in C++?
something like "ref T[int]" or whatever the syntax should be
 
user4704
I'm 29
 
I guess all (game) developers look a little bit older than they are :|
 
user4704
8:26 PM
Because that's not how C# works.
 
@tylerrrr07 testing, perhaps. You can test using mock classes implementing the interface
 
and I thought I've found another free language like C++ :(
 
@Gajet maybe you should look at Go or D, if you want something more like C++++.
C# is really mostly Java++.
 
well, I don't really dislike C#. I'm just a little bit disappointed.
 
user4704
8:30 PM
D is terrible, as is Go.
 
@Gajet - Embrace change.
 
user4704
You're getting super hung up on a minor quirk of the language that you are experiencing because you don't want to use the language like the language it is.
 
user4704
Instead you want to use it like C++.
 
user4704
Pro tip: it's not C++.
 
unlike C++, C# doesn't assume coder is intelligent. or something like developer is always right.
 
8:30 PM
++
 
@JoshPetrie there was a little bit optimization reason behind what I wanted to do.
I didn't want to allocate an object twice, while I wanted to give it some initial values and later changed them as I needed.
 
I do agree with Gajet though, it's one of the features I miss a lot, being able to work with struct references easily
the resulting code always winds up using ref parameters everywhere
 
I ended up using arrays instead of list.
 
user4704
@Gajet You don't have to allocate twice. In fact you have fewer allocations with ref types. And besides, allocations are trivial in the CLR
 
I never got into the low level memory management side of things, etc. (the burden of being a web developer first) - I'm confused why we aren't using a class or at least a class wrapper or something of the sorts? (Pardon my ignorance)
 
user4704
8:34 PM
Structs aren't that much of an optimization over classes, and if you're just ref'ing them around you may as well just use classes. You'll get a better experience from it.
 
which is not bad by it's nature, just adds more thing into my code. but forces me to do some precalculations which will speed up everything.
@JoshPetrie I needed to create structs as I said. I was going to pass those values to vertexbuffer
the optimization part was just not allocation an struct twice and filling it with same data in most of it's fields.
(don't know if you got what I meant in the last sentence)
 
"allocations are trivial on the CLR" is kind of misleading.
 
"allocations ares trivial on the CLR" seems a bit like "push_back into vector is trivial"
which kinda is but still takes time (I'm not talking about special cases when whole vector is being copied)
 
Alright guys... what if... you have a class, that contains a struct and properties that expose struct fields? Is that messy?
 
what does that accomplish?
 
8:43 PM
@tylerrrr07 looks kinda like my codes...
 
@Jimmy maybe I don't understand the problem
 
@JoshPetrie Centuries right?
 
I just figured since the classes would be ref types you can swap around your structs all you want simply by wrapping them up
 
@William'MindWorX'Mariager I assume you mean that in the most positive way possible: Josh has lots of experience and shows it
 
I don't know what optimizations are gained when using structs but I thought by wrapping a struct in a class you would be able to keep that optimization because you aren't replacing the struct, just wrapping it
Maybe its some extra memory though
I dunno
 
8:46 PM
@tylerrrr07 In arrays, you'll waste a ton of memory if you use classes over structs.
 
well, the issue is: 1) You can use either a class or a struct to hold a data blob. 2) typically you'd want to default to class in C#. 3) in some cases, where you need to specify the memory layout, or you want contiguous arrays of data, or where you have a logically "value-typed" data block, you would want to use a struct.
 
user4704
@Gajet push_back does somethign very different from most CLR allocations; allocations have a performance impact but their actual operation is exceedingly trivial (x += y)
 
I said it's kinda similar. you can believe me , I know how STL works to it's depth!
 
@tylerrrr07, A struct takes sizeof(struct) per index. A class takes sizeof(struct)+sizeof(reference), where reference is either 4 or 8 bytes depending on architecture.
 
@JoshPetrie the heap allocation itself is basically a pointer update, but you have to keep GC performance in mind when deciding your allocation patterns
 
8:48 PM
Imagine the difference if I used classes instead of structs in my tile engine? A million tiles would take up 8MB of memory, not to mention the access speed is significantly faster when using an array of structs vs an array of classes.
 
@Jimmy, @William'MindWorX'Mariager - Thanks. Very helpful
I thought maybe since the class didn't actually have any of its own data, but instead was owned by a struct it might work out but it seems not.
 
@tylerrrr07 there is some micro-optimizations, like using structs will result in one fewer data look up to retrieve data from arrays.
 
@tylerrrr07 If you want to use structs in parameters and change it in the method, all you need to do is pass it using the ref keyword.
However, in Gajets case, he can't get direct access to the internal struct of the collection.
 
user4704
@Jimmy Yeah, that's what I mean.
 
@William'MindWorX'Mariager I know. My thought was to eliminate ref-ing all over the place. And in Gajets case he'd have a class that could access the struct.
 
8:50 PM
@Gajet How about making your own simple collection, with a .ToArray()/.ToList() method to pass to whatever wants that.
 
user4704
@Gajet It's not "kinda" similar at all; push_back may invoke a call into the templated allocator which probably involves an expensive heap walk to determine an appropriate free block.
 
But if the class reference adds that much overhead... then meh
 
@William'MindWorX'Mariager nah, I don't feel like adding too much code without any performance gain.
10 mins ago, by Gajet
which kinda is but still takes time (I'm not talking about special cases when whole vector is being copied)
 
You just said you changed 800 lines. :P
 
look at the part I'm not talking about
@William'MindWorX'Mariager changed 800 line! didn't add any though. besides it increased my performance.
and now I'm forced to add more codes to increase my performance even more
 
8:53 PM
@Gajet - are you experience bad performance?
 
user4704
You can't ignore the critical difference and say "they're the same because I'm going to ignore the difference."
 
A HashSet and a Dictionary is the same except you can't set the key in HashSet but I choose to ignore that. :D
 
@tylerrrr07 my load time takes around 0.2s in PC. and my target device is WP.
so I'm having performance issue.
(side note: I'll have lot's of load calls in my app, it's a map viewer and imagine how many tiles will I have to load every minute)
 
Gotcha
So I'm trying to figure out the best way to implement what I'm calling "commands"
For example, A building may have "Create Unit X", "Upgrade", and "Sell" commands
So I figured I would start with a command interface so that all commands have the same... umm... interface
And then my buildings could have a set of commands
 
XAML/WPF has commands. :D I'm sure that's what you're looking for.
Words are nice.
 
9:00 PM
Now for getting more specific it could be "Create Unit Robot of Doom, "Upgrade to Level 2", "Sell for 500"
Should I just leave the commands plain with parameters or should I create real specific commands?
Parameters seems obvious
now that I'm talking through it
I can't remember what I thought the problem was
 
how can I reverse an string in C#?
"word".reverse() is not an string.
and this piece of code
for(int i=0;i<s.Length-i;i++)
{
char c = s[i];
s[i] = s[s.Length - 1 - i];
s[s.Length - 1 - i] = c;
}
produces error :(
 
OH YA - so if its parameters, I have to make sure that my buildings that can execute commands have the supporting data
 
char[] arr = s.ToCharArray();
Array.Reverse(arr);
return new string(arr);
 
++ mindworx
 
Which now makes me feel like I've got too much inheritance going on or something along those lines just to guarantee such a thing
 
9:03 PM
var reversed = new string("Hola".ToCharArray().Reverse().ToArray());
 
that's less efficient, since it makes an extra copy
AFAIK, Array.Reverse is in-place
 
Correct, but it's a bit cleaner to look at.
 
public static string Reverse(this String str)
{
    char[] arr = str.ToCharArray();
    Array.Reverse(arr);
    return new string(arr);
}
 
after a day of hard work I was able to render that!
 
var reversed = new string("hola".Reverse().ToArray())
 
9:06 PM
and it should look like "ﻟﺘﻤﺎﻥ ﻛﻦ"
 
@tylerrrr07 Getting fancy with extension methods are we?
 
<3 Extension Methods
 
let's have a little bit nap. BB in 4 hours.
 
Good idea.
Nightie kids.
@JoshPetrie, You're not a kid.
Waves
 
@William'MindWorX'Mariager I'm pretty sure in all country all the people in this room (right now) are considered adult.
 
9:14 PM
Maybe... if a building implements IUnitProducing then the building automatically gets the ProduceUnit command as well as the supporting parameters?
Is that a good solution?
 
user4704
What are you trying to do?
 
Implement some sort of command system so that its flexible - IE a unit could issue command X with Y result and a building could issue command X with Z result.
 
user4704
What does it mean to "issue a command?" What is a command itself?
 
A specific example would be for a building A to Create Skeleton units and building B can create Robot units, and the main player can spawn Worker units or something like that
I'm trying to figure out a good way to make it flexible enough - my mind went to leaving the commands flexible and able to just take parameters, but then I couldn't figured out hte best way to make sure that the objects that issue the commands would be have the supporting data (command parameters)
 
user4704
So... it's just some action? Does it contain all the logic to actually effect the action?
 
user4704
9:19 PM
I don't think ensuring the consumer of the command system has the relevant data to issue a particular command is the job of the command system.
 
I figured a produce unit command would be something like ProduceUnit(UnitType, Source)
 
user4704
Yeah, that sounds reasonable.
 
And then maybe IUnitProducing would cause a class to automatically have a UnitType data that could be set by the class as well as providing the class the ability to execute the command
 
user4704
I don't see why you need IUnitProducing.
 
The problem I see is if I want a single class to be able to produce multiple unit types
Ah so maybe I'm overengineering this
 
user4704
9:21 PM
You're just going to get interface bloat with that approach.
 
user4704
Yes.
 
user4704
If an object (say a unit) doesn't have the data required to instantiate a command object and invoke it, that means:
 
user4704
(1) that object is not allowed to issue that command
 
user4704
(2) that object is broken, missing some critical data for its operation
 
Sure. I guess I was probably looking for a really easy way to add commands to a unit without having to add a whole lot of code
 
user4704
9:25 PM
Well, lets pretend a unit has OnExplode() which is called when the unit is about to blow up. And now you wanted to make him spawn more dudes when that happened. WOuldn't that just be:
 
user4704
public void OnExplode() { var c = new SpawnDudesCommand(this.UnitType, 2, this.Location); c.Execute(); }
 
user4704
(to mean, spawn 2 units at my location with my unit type)
 
Ahhhhhhh
Of course. The command itself owns the data, the unit issuing the command just tells it what data to use.
My mind had the units owning that data
Thanks much.
 
user4704
np
 
9:47 PM
Hi everyone
 
hello
 
user4704
Welcome, tasty primate.
 
00:00 - 22:0022:00 - 23:00

« first day (739 days earlier)      last day (4285 days later) »