« first day (1439 days earlier)      last day (3492 days later) » 

12:00 AM
the positions should never be the same really
so you'd expect that to be false every time
compare rows rather than positions
 
Maybe I should make evenings an official recreational programming event
 
haha
 
well pos is just the value it would be passed in.
 
for me it's night
@Tokencodingnewbie but you have a method called DetermineRow to help you here :D
given a position, it gives you the row
if you want to compare rows then...
follow?
 
Nope.
haha
 
12:04 AM
Ok let me try again
You can work out the rows with that method yes?
 
it's cool
 
and you want to compare rows yes?
 
12:05 AM
So you can use DetermineRows to get the rows, and compare the results
 
So like
If determinerow(pos1) = determineow(pos2) && determinerow(pos3)
 
yeah :D
only you don't need the if, you can just return :)
 
I can write it like that?
 
not exactly
but your logic is correct
 
I can just return it!?
 
12:08 AM
yes
anything that can go in an if is a boolean
 
Man is writing a bunch of extra code a newbie thing too ;_;
 
haha
if statements work like this
if(bool) { do stuff } else { other stuff }
if it's true, you want to return true, and if it's false you want to return false, so just skip the if :D
 
Then what's the point of it
ABOLISH THE IF
 
Well no
you don't always want to return the result
 
oh gotcha
 
12:10 AM
Now all you need to do is beat up C# into performing the comparison you want
 
DONT ABOLISH IT NVM
 
you want to check if the row for each position is the same essentially
 
What would a good name be
IsRowFull?
 
IsSameRow
This would be useful for working out if there is a winner.
Possibly
I was more interested in showing you the logic behind it, which you can now use elsewhere
 
I also don't know where the 3 inputs are coming from :P
You told me not to worry about it and now I'm worried
 
12:16 AM
This was merely an exercise of logic
you may never ever used this function, but you will certainly use the things you learnt making it
Now you can tackle the "how do I know if I can win" problem easier
 
It's better than this...
 public bool winCondition()
        {
            if(isX[0] == 1 && isX[1] == 1 && isX[2] == 1)
            {
                return true;
            }
            if (isX[0] == 1 && isX[3] == 1 && isX[6] == 1)
            {
                return true;
            }
            if (isX[1] == 1 && isX[4] == 1 && isX[7] == 1)
            {
                return true;
            }
            if (isX[2] == 1 && isX[5] == 1 && isX[8] == 1)
            {
                return true;
            }
 
I also think you need to change this isX thing personally
 
It used to be an array of bool :P
 
And it is no longer that, so fix it :P
C# has wonderful refactoring capabilities to make it painless
If you're in Visual Studio, right click, refactor, rename
 
Ctrl + R + R
 
12:21 AM
Such R
Very key
Much press
 
Arrr
 
Yarrrr
 
!!youtube doge adventure
 
Whoa neat.
 
12:25 AM
@CapricaSix doge doge doge doge doge wow
 
!!youtube amazing horse
Weebl++
 
Sweet lemonade.
@KendallFrey what's this !!youtube thing?
 
!!undo
!!tell OMGtechy help
 
and general !!foo
 
@OMGtechy Information on interacting with me can be found at this page
 
12:27 AM
Ooo
!!youtube flying cat
 
that's such a great... song?
 
I've had enough weebl for today :P
Used to love Insanity Prawn and The Toast King
!!undo
 
@OMGtechy I'm afraid I can't let you do that, OMGtechy
 
Have you seen cyriak?
 
12:29 AM
@KendallFrey YES
 
So like what is my next task here.
How can I use this knowledge to make super smart AI that will eventually enslave humanity?
 
@Tokencodingnewbie try and see where you get stuck
 
What about mine turtle?
 
Why won't you let me die!?
@OMGtechy hello!
 
12:32 AM
boom
 
Well I guess the next thing to do is have the computer have a way to scan the gameboard.
 
Hahahahahaha
I don't think he knows what he's saying...well I hope anyway.
 
12:54 AM
woo, I just wrote protected internal virtual
 
I'd use protected internal a lot more if it were an AND instead of an OR.
 
There is something like that
I'm not sure if it's allowed in C#, it might be IL only
 
Only in CIL, not in C#
 
I made a blinky thing!
 
@KendallFrey I have never used internal at all
 
1:07 AM
:O
I might feel less violent now if that wasn't anime.
may as well beFUCK YOU
 
So reading about this minimax thing, it just uses recursion to play out the game and then come back and pick the spot that it forsees winning?
 
@Tokencodingnewbie yes
 
That's fucking cheating
haha
 
All's fair in love and war
 
You're cheating unless you're writing in 1s and zeroes. Embrace it.
 
1:15 AM
Writing? Pffft, it must be hardwired.
 
There is no way in hell I would of came up with this on my own haha.
 
That applies to many things in programming haha
It took a while for even the best programmers to come up with objects
But now they're second nature to people
As techniques develop over time, so will languages to support such things.
Multithreading is a great example of this in more recent times.
 
Ugh just feels like I'll never get it
 
And yet each day you get a little more
it's a long and difficult path to walk, but worth it IMO
You'll look back on your old code in horror; I certainly do. However it shows you that you're learning something.
 
You're learning, you're improving. It's hard, and you'll do it.
There's a goal, you can see that goal, and each day you're getting closer.
 
1:27 AM
I'm just wondering if I should move on to something else before getting discouraged lul
 
If you move on when things get tough you'll never learn anything worthwhile.
 
Keep going
 
Stick at it.
 
@OMGtechy You just convinced me to go look through my old code.
 
Well I kind of am getting help now and reading others struggles and guides.
 
1:31 AM
@user1112560 prepare the cringe
 
Was even thinking of downloading this source code and looking at it.
 
The IDE's removed Windows Aero, and locked the taskbar.
onClipEvent (keyUp) {
	// on Key Up
	if (Key.getCode() == Key.CONTROL) {
		// if the release is control
		attacking = false;
		// attacking is false
	}
}
 
What IDE are you using?
 
Flash 8
Those comments...
 
> // attacking is false
such wow
 
1:32 AM
I have a feeling I might have downloaded that as a tutorial from somewhere...
 
let me find some of my worst that's still around...
 
I know I made something with probably a 6 or 7D array
Really want to find it
 
@Tokencodingnewbie why are you pinging me about this ? :P
 
@OMGtechy Just googled, that was tutorial code... can't believe I ever made it :P
 
1:34 AM
Thought you'd like to look at it.
 
I may do :)
Oh god I've found that horrible code
First game I ever wrote
 
I may do? lulwut
 
in a game jam
48 hour time limit
well, I'd written other games but the tools I used beforehand abstracted so much away it was all game logic
 
I want to write a game :(
 
Sweet jesus, look at this line
 
1:37 AM
I'm just looking through my old games now
 
_GoodObject3 = new ObstacleObject(L"GoodObject3",this,true,true,Vector2((BACKGROUND_WIDTH/SCALE_FAC‌​TOR)+(rand()%2),-4.5f),L"GoodObject3.png",false,1,1);
There are some many thing wrong with it I don't know where to start.
 
The hell is that
 
It gets worse
if(((_Medal1->position.x - (90/2)/SCALE_FACTOR) < _TouchPoint.x && _TouchPoint.x < (_Medal1->position.x + (90/2)/SCALE_FACTOR))
			&& ((_Medal1->position.y - (109/2)/SCALE_FACTOR) < _TouchPoint.y && _TouchPoint.y < (_Medal1->position.y + (109/2)/SCALE_FACTOR)))
For checking if a button was pressed
 
is that a hitTest?
 
It's from the depths of hell.
The logic is there, but the rest is just demonic.
> 109/2
Dafuck is this shit
Yaknow what though? It worked, and it worked well.
            if(frameNumber % _FramesUntilRandomGen == 0)
		{
			switch(rand()%10)
			{
			case 0: CreateNewBadObject1();	// BANANA
					break;
			case 1: CreateNewBadObject1();	// 2
					break;
			case 2: CreateNewBadObject1();	// BANANA
					break;
			case 3: CreateNewBadObject1();	// 3
					break;
			case 4: CreateNewGoodObject3(); // TOURIST
					break;
			case 5: CreateNewGoodObject1();	// FLAG
					break;
			case 6: CreateNewGoodObject3(); // G4
					break;
			case 7: CreateNewBadObject1();	// BANANA
 
1:41 AM
char.onEnterFrame = function() {
	if(this._x <= _root._xmouse -(_width/2) ) {
	this._x += ((_root._xmouse -this._x -(_width/2))/5)
	} else if (this._x >= _root._xmouse-(_width/2)) {
		this._x -= ((this._x - _root._xmouse+(_width/2))/5)
	}
	if(this._y <= _root._ymouse -(_height/2) ) {
		this._y += ((_root._ymouse -this._y -(_height/2))/5)
	} else if (this._y >= _root._ymouse-(_height/2)) {
		this._y -= ((this._y - _root._ymouse+(_height/2))/5)
	}
}
 
I think the point here is, we've both written shocking things in the past.
 
I still want to find my 6D array
 
Multi dimensional arrays are quite the luxury of modern languages
 
AFAIK, I was using it as a tree.
 
Crazy as it sounds, I've written an infinite dimension matrix type in C++.
Because why the fuck not.
 
1:45 AM
Oh wow, forgot I did some prolog in high school...
 
ooo
 
Nothing anywhere near complex, but think I'll be visiting it again this year at Uni...
 
Ugh, I cannot wait to go to Disney World next week ^_________^
 
:D, enjoy
 
@user1112560 what you studying?
 
1:46 AM
CS
 
I've never been to Disney anything
@user1112560 well, that should be pretty easy then
 
I've been to the one in Paris twice, was very fun :D
 
I'm going during the food and wine festival.
Gon' git drunkkkkkkkkkkkkk
 
Yeah, I want to Uni hoping to be struggling, it's all pretty easy so far. Really enjoying it though.
 
@user1112560 you should push yourself with some mental project
@Tokencodingnewbie nice
 
1:50 AM
I've got a nice project that I'm either hoping to either open-source or sell. Would rather keep the details quiet for privacy, but using it to try it out to mess around with architectural patterns.
 
Why not open-source and sell?
 
@user1112560 have you ever worked in software development?
as a job
 
Honestly, I'd rather try and keep a nice social life/work balance rather than entrap myself with a really fun project.
Yep
 
mmm k
 
I wish I could entrap myself with a really fun project
I can never finish anything
 
1:51 AM
Personally I'd say open source it if you're looking to learn a lot from it
@KendallFrey know much C++?
 
enough to be dangerous
 
haha
 
I want to do something open source.
 
Hehe
 
Fancy working on a game engine I'm making?
I've never made a full OpenGL implementation, so I decided to try
 
1:52 AM
I never got the hang of OpenGL
 
And it kind of grew into a game engine project
 
I'm ishy working on a game engine too
 
@KendallFrey well, have a go, you'll learn :D
 
I wish I had time
 
I do make pretty huge changes frequently, so be aware of that
it's a lot about learning
And it's cool, I've recently made it open source so you're welcome to contribute if you do get some
It's early stages so if people are looking to make an impact they can
 
1:54 AM
Between work, gaming and hobby code, I barely have time to sleep
 
Same
Only with less gaming
 
I wanna help with stuff.
D:
 
Best to nail C# before you move onto C++ + OpenGL. Give it time.
 
@Tokencodingnewbie you're totally welcome to have a go, but don't be upset if I reject your commits
I'll let you know why of course
 
@Tokencodingnewbie I have a few mostly forgotten codeplex/github projects. Feel free to make a pull request
 
1:57 AM
What could I even possibly contribute?
 
Anyway, these unit tests won't write themselves any more, ciao.
 
cya
 
@Tokencodingnewbie idk, I don't have much in the way of low hanging fruit
 
@Tokencodingnewbie I don't know, but you're still welcome to :)
You are actually the target market for this (inexperienced developer), so yeah.
The API needs a tidy up at the moment
It moves very slowly, but very surely
 
low hanging fruit :(
/me sobs
IM USELESS
 
1:59 AM
If you want you can design a font for my current project
 
a font?
lolwut
 
Or you could write a game using my REBEL text adventure engine
 
Google has been stalking me as usual
 
how will that help with c# lul
 
idk
If you want to be good at C#, write more
 
2:07 AM
Also
and the site in general
free beginner programming courses pop up frequently enough
 
I am, I just don't feel motivated today :(
 
Carry on regardless
like a boss
 
three commits today, that must be some sort of record
 
Eh I didn't carry on much
Was reading about my trip alot
 
@KendallFrey depends on how you commit
 
2:17 AM
infrequently, and usually badly
 
haha
at least you're honest about it
 
Actually, my last 2 are 15 and 18 lines
not bad for new features
wait, nvm, not 15, that was just one file
I should think about pushing this to GH some time
 
I like git just because it's easier to work with lots of smaller commits than SVN
 
SVN is not relevant GTFO
 
haha
 
2:27 AM
:D things are working first time and I'm not worried about that any more.
 
Things working first time always worries me haha
 
Code is the most fun when you don't expect it to work.
For one thing, it usually means you're learning
 
I haven't had that much experience with compression, it's nice to know that it's finally clicked.
 
3:05 AM
Quick query: JSON.NET provides a method: DeserialiseAnonymousType<T>(string value, T anonymousTypeObject).
The T is generally inferred, is it possible to explicitly provide that T as an anonymous type, if so, how?
Not that I'd go about using it, just doesn't look like it's possible (although my anonymous type knowledge is nowhere near good).
 
@user1112560 There's no way to pass an anonymous type explicitly as a generic parameter without reflection.
 
Thanks
 
Damn .NET and BE/LE :-(
IPAddress.HostToNetworkOrder(..) what the hell is that.
Or, i know .. but why the hell is that on the IP Address object .. and not in network/binary streams and writers.
 
3:39 AM
Endianness related I believe
I know little it though
Little of it*
 
3:55 AM
Yeah, stay on that level then. I wouldn't recommend anyone the pleasure of knowing lots about it.
It's like .. before I knew about encoding, programming was easy.
 
I've had to do one bit of networking code where endianness was involved ever
 
Nah .. I managed to parse 1(!) package today because of this. Mixed endian depending on datatype. Scary.
 
Screw that
 
Yah
and what the fuck is a "3 byte long number"
 
In quite familiar with bitwise things, but not endianness
 
3:58 AM
So, for short they use BE. For long it seems (not clear yet) to be LE.
for 3 byte long numbers (dwarfs?) it is LE
 
I'm sure they have their reasons, but that doesn't mean we need to like it.
 
and regular int are LE so far. But i suspect one or two to be BE on some places.
they also have bit-patterns which are amazing.
instead of using all 8 bits of a byte for various flags.
they change meaning depending on what they are.
so if the bitpattern starts with a true, then all the other bits change meaning..
but they only have 7 bits they use .. so I can really don't get the point of doing that.
"we might need them for later" hehe
actually, they only use 5 bits
but . well .. tomorrow i will have the login-package ready. And after that, I can start sending maps into MC
 
I'll have fun with that soon most likely
Been offered a job working with linux kernel moudles
 
Heheh .. reading about kick-mute
 
mainly anyway
focus is on graphics drivers
@gurun I've not seen it used yet
 
4:07 AM
Kick-mute have to be the sexist feature implemented. Just listen to the explanation; "*If the kickee has loaded ...."
I will dream of Kickee tonight! Sleep well, i may!
@OMGtechy May the source be with you. I'm off to bed. Go play some hockey instead of coding!
 
Pffft, hockey.
May your exceptions be few master.
 
:-)
 
 
4 hours later…
7:53 AM
hello. I have 2 pc. in first i create local db. How can i connect to first pc db from second PC?
 
8:08 AM
@GLeBaTi it might be worth google than first
 
Good morning campers
 
8:26 AM
happy campers indeed
 
@OMGtechy isn't that the area they've had a massive ballache with? Thinking of the time Linus gave NVidia the finger on camera
 
user1881400
So I've managed to make it so that I can create and load .wav files by writing the header and stuff myself (with limited support, of course). I've run into a bit of a bump, however. The specification (ccrma.stanford.edu/courses/422/projects/WaveFormat) lists the subChunk2Size as being only 4 bytes (a uint), which makes it so that my audio can only hold a few seconds at 44.1kHz Stereo with a bit depth of 16 (these are standard settings). How can I get longer audio than 10 secs?
 
user1881400
I would ask this as on SO, but the scope is too narrow.
 
@FizzledOut wtf; they mixed endianness in the same file?
 
user1881400
@TomW I attempted it and then ignored it, writing everything in little endian b/c that's what Microsoft computers use (Intel processors)
 
user1881400
 
WO! Did anyone say mixed indians! My favourite.
 
Subchunk2Size == NumSamples * NumChannels * BitsPerSample/8 - you're certain you've interpreted those values correctly?
 
user1881400
With all of these variables already defined:
//Sets the Chunk IDs.
            _chunkID = "RIFF";
            _format = "WAVE";
            _subChunk1ID = "fmt ";
            _subChunk2ID = "data";

            //Sets the audio information.
            _audioFormat = 1;
            _numChannels = 1;
            _sampleRate = 44100;
            _bitsPerSample = 8;
            _byteRate = _sampleRate * _numChannels * _bitsPerSample / 8;
            _blockAlign = (ushort)((int)_numChannels * (int)_bitsPerSample);
 
@FizzledOut it also helpfully notes that this should be the number of bytes of data. uint goes up to 4,294,967,295 - that's a lot of bytes
I'd guess confusion between a rate and an absolute number somewhere
 
user1881400
@TomW Huh.. that's what I was afraid of. It's a bit of a wonder that it still works then, just up to a few seconds though.
 
8:42 AM
I've never actually seen anyone ask about homework before...
 
user1881400
@gurun if you mean me, I don't have homework and am not in school. I do these things for fun ;). If you mean somebody else, nevermind because I don't know who you're talking to
 
@FizzledOut definition of sampling rate might also be something to do with it. en.wikipedia.org/wiki/WAV the table near the bottom doesn't list anything anywhere near 44kHz
 
@FizzledOut yeah, it was just a fun link :-)
So how about you store the data in a struct
(to start with)
and then use a fifo queue to store it in
 
user1881400
It's stored in a WavFormat object
 
each frame in a struct.
 
8:45 AM
FizzledOut, if you enjoy that sort of thing you might want to check out codegolf on stackexchange if you haven't already =)
 
i'm saying that because there are some really cool things you can do with allocating structs from raw data. very fast.
 
user1881400
@CapTec I look at it a lot but haven't participated yet. I need to get my code down pat before I mess with that :). @gurun I'll take a look into it, then. Thanks for the tip.
 
make sure you can save the time somehow .. and keep track of that. And then you have the main "pump" running in in one thread, and the reader running in another. And based on the time, you can skip frames as you pull them off the queue.
 
Hi need help on instrumentation profiling in VS2010
 
@FizzledOut hang on. You initialise _data[0] then immediately take its length
wat.
 
8:49 AM
@sameer please clarify instrumentation?
 
I need to find the number of times a function is called and time span of the function
 
do you have a profiler?
 
for that I tried instrumentaion profiling in VS2010
build in profiler of vs2010
 
ok
 
user1881400
@TomW I use properties so that when I change the data or any formatting, everything else is updated appropriately. It's just formatted sloppily. @gurun I don't know if it's correct or not, but I like to get a prototype then follow this cycle: test, fix, refactor, add new content (bringing me back to testing). I start with synchronous data because I'm kind of new to C# and I haven't used anything async myself yet. I will beautify the code and then try it when I can
 
8:51 AM
I am trying for a signed dll but it is profiling the exe and not the dll
 
@FizzledOut....what?
_data is a local variable. Its length is 0
You've introduced a zero into the chunk size calculation
unless that's not the actual code
 
@sameer i think the emphasis is on instrumentation here.. counters through instrumentation.
@sameer so it is focused on resources.
i never used that thing, so I can't help you, but i just read the "manual" and i couldn't find any references to that profiler being anything else.
 
i tried the steps mentioned here msdn.microsoft.com/en-us/library/bb385752.aspx
 
Fells like something that you would use during performance and stress testing for instance, or to see how your complete system reacts.
 
user1881400
@TomW it's real code. The formatting is unnecessary because I can just hard-code a lot of those values, but it's sort of a template (which is being executed). The code correctly runs and creates a valid .wav file with no data in it if I choose to keep it that way. Usually after I create the WavFormat object I add data to it, which updates the data variable and runs through the set property, which auto-recalculates chunk sizes and such. The code I posted is a small fraction of the full file.
 
8:56 AM
@sameer how can you profile any code without running it? A dll is not executable, that's what an .exe is for. The code has to be called into by something
 
yes I added both the dll and exe for profiling but only exe is profiled and not dll
 
@FizzledOut then I expect the issue is to do with your property-setting stuff and not that code sample; it looks ok to me
 

« first day (1439 days earlier)      last day (3492 days later) »