« first day (964 days earlier)      last day (3987 days later) » 

6:00 PM
posted on June 06, 2013 by saqoosha

The story behind building World Wide Maze.

 
0
Q: What is the proper way for one child object to access another child object?

Benjamin PowersTo be proper and testable, I'm trying to stay away from global variables and coupling objects together. That being said, what is the best way for Object1 to interact with Object2 below? I have it setup currently so that App is global, and Object1 interacts with Object2 by way of App, but this...

 
Monring
 
6:16 PM
@rlemon Voted on some Aquarium questions. You're welcome.
In other news, I just discovered Joy Kills Sorrow
Good stuff
 
@RyanKinal 2.9!!
so who wants to get their regex on?
 
That depends
 
.foo,a #bar
#bar,.foo a
.foo .foobar
.foobar,.foo

I need to be able to match .foo in here and not pick up anything else.
I was using .indexOf(selector) but stupid .foobar is a pita :P
does split take a regex?
it does :)
 
wow hit canvas max height
30k on chrome
 
30k ?
 
6:22 PM
30000px
thats as tall as I can make it
after that theres just no data displayed
 
Is that true of all elements, or just canvas?
 
Im making a sprite ripper for atari 7800 games, and im reading out the rom data manually
so I needed a really tall canvas
@RyanKinal oh not sure actually
 
@rlemon Am I to assume that discovery solved your issue?
 
yes sir indeedy
 
ok you guys should be able to help me with this :)
 
6:23 PM
function getStyleRuleValue(style, selector, sheet) {
    var sheets = typeof sheet !== 'undefined' ? [sheet] : document.styleSheets;
    for (var i = 0, l = sheets.length; i < l; i++) {
        var sheet = sheets[i];
        if( !sheet.cssRules ) { continue; }
        for (var j = 0, k = sheet.cssRules.length; j < k; j++) {
            var rule = sheet.cssRules[j];
            if (rule.selectorText.split(/,| /g).indexOf(selector) !== -1) {
                return rule.style[style];
            }
 
so I am reading the bits, blah.toString(2)
 
but I need all 8
 
hrm, I should split all operators no
 
give the site and delete your message: where are you downloading your mp3s?
 
6:24 PM
>, ~
 
sometimes ill get 10, 1111 etc.
you guys know how to fill in the 0's?
 
@FlorianMargaine Usually, www.beemp3.com
 
@FlorianMargaine ... Amazon
 
so I always get 8 bits no matter what?
 
or should I only split ,
GUIS
what makes sense.
 
6:24 PM
@RyanKinal hm, yeah, no.
 
#foo, .bar <- is two selectors
#foo .bar <- is one. so I should only split on , then no?
 
@FlorianMargaine google music
 
@Loktar so you want to pad?
 
$7.95 per month
unlimited plays, unlimited songs, its really an amazing service
@FlorianMargaine yes! how can I do that?
 
no built-in way
 
6:25 PM
w/e - i'll assume i'm right
 
hmm ill have to look into how to do it. I didnt really know the correct term even, ty
 
fillToEight = function(string)
{
    if (string.length === 8)
    {
        return string;
    }
    else
    {
        return '0' + string;
    }
}
Recursion!
 
so if theres not 8, then the 0's would be at the end?
God Im such a binary noob im sorry
 
function b(s) {
    s = s.toString(2);
    while ((s.length % 8) !== 0) {
        s = '0' + s;
    }
    return s;
}
undefined
b(54)
"00110110"
 
6:27 PM
It's just like adding 0's to a decimal number
 
oh so the 0's go in front?
 
Yep!
 
ok that totally makes sense as to why my graphics are garbled
ty @RyanKinal and @FlorianMargaine :)
@FlorianMargaine your function is bs dude
 
bullshit?
 
hehe... clever
b(s)
 
6:29 PM
ah :D
 
user1596138
The PHP room isn't as friendly as this room...
4
 
Well, PHP, what did you expect?
 
YES!
thanks man! So happy
 
user1596138
My thoughts exactly.
 
@Jhawinsss When you write a shitty language all day, you're going to be grumpy
 
user1596138
6:30 PM
They're as un-friendly as PHPs error messages.
 
getting all the sprite data now woot.
 
@Loktar atari emulator in canvas?
 
@rlemon nah not an emulator thats too hard
 
user1596138
@Gacnt You're tellin' me.....
 
Im just working on a prog to rip the sprites
 
6:30 PM
I'd be surprised if they'd be happy when they have to use that language all day. That's why @FlorianMargaine is so angry all the time.
 
I should be a porn director
3
 
so I can make, remakes in canvas :P
 
@OctavianDamiean Maybe.
 
@Loktar nice
 
@Gacnt Cool, I'll be an actor.
 
6:31 PM
Fleetwood Mac <3
 
@Loktar btw, the b function takes care of cases when you have more than 8 bits to do a correct padding
 
Good :P
 
@OctavianDamiean I wouldn't.
a friend of mine had his father being a porn productor
 
I don't mind, I get my fun. :P
 
he told me stuff... meh ~~
 
6:32 PM
@FlorianMargaine +1
 
I went to highschool with a dude with two moms... and they were both smoking hot.
 
Off to beer, see you guys later
 
@rlemon Damn!
 
Ooh, beer...
I could use a beer.
 
@OctavianDamiean on the first note: been there, done that.
 
6:33 PM
I could use two smoking hot moms ...
 
@rlemon Then you later found a porno of his two mothers, using it as leverage to convince him to stop bullying you?
 
@rlemon Aw yea, good boy!
 
o.O
 
@OctavianDamiean One was my mother :/
 
@Gacnt nahh, he got teased pretty bad about it - but his two moms and his dad and step mom were at wars for his affection. so he got anything he wanted.
 
6:34 PM
The other was his own :/
 
@Gacnt Unfortunate for you.
 
@OctavianDamiean not as impressive as one would think.
the shit they do on film is not hot irl.
 
@rlemon Wait, both at the same time?
 
no, first convo.
pr0n*
 
@rlemon Let's assume I know how it is what they do in films. :P
 
6:36 PM
@BenjaminGruenbaum native source code leaking again in chrome 5..toLocaleString
 
@OctavianDamiean I'm not complaining... but it's not like it was the best ive ever had
just knocked one off the bucket list
 
Oh, I see.
 
@rlemon Knocking you, is on my bucket list
Did that work?
 
not really
 
Damn
I was gonna say Knocking you up
 
6:38 PM
but i'm not arnold, and you are not devitto - can't work.
 
deVito
 
what makes you think i was talking about danny?
:O
 
I taught devito his technique.
 
short and bald?
 
It's all in the thrust
 
6:40 PM
"it's not the size of the boat" <- is only true if you're not working with a jetski
 
If I star every one of your messages, from now on, what happens to my account
I was contemplating it
 
you get removed as owner so you get a star limit
 
I feel like this would be a poor decision on my part.
 
then you cannot star everything
 
But how would you know it was I!
 
6:41 PM
because you just incriminated yourself.
 
>.>
<.<
Better keep your sockets tab open :P
 
sucks, because now if anyone stars them we all think it is you
 
I'm keeping my WebSockets tab open, so I have proof :P
 
proof shmoof.
 
I'll shmoof your proof
Did that work?
 
6:45 PM
 
Hello Guys.. can any one help me to solve this issue HTML5 Remove previous drawn object in canvas
0
Q: HTML5 Remove previous drawn object in canvas

AnishI have a polygon object (say a car) drawn inside HTML5 canvas with help of methods moveTo & lineTo. I want to repeatedly draw that object at diff position in canvas.(simply simulating an object move). Here my problem is the previous drawn object is not getting cleared, instead multiple images are...

 
@Anish what have you tried?
 
@Esailija nice find!
@rlemon I'm ok with that.
 
The object is being drawn on canvas.. but the previous drawn object is not getting erased or removed
 
tl;dr - @Anish you need to either store the drawn objects seperately (on temp canvases) or just hold references too them
 
6:48 PM
@rlemon You fix that right meow
Or we're no longer friends cry
 
How can it be done?
 
I'm off to the beer, really this time
 
depends on how you are drawing to the canvas.
personally, I store my stuff as just data points then re-draw the entire thing each pass.
 
@rlemon is your job to be in chat all the time?
 
more recently i've been opened up to the concept of storing things on separate hidden canvases and just draw them to the main canvas.
@powerc9000 my job allows me to be in the chat during the day, I also have it as my mobile homepage for my phone
so .. yea... im an addict.
2
 
6:50 PM
@rlemon what is your job?
 
programmer software designer. <- what my business cards say
 
@rlemon The truth is revealed.
 
Herassing my owner status
IS his full time occupation
 
@rlemon using mostly what technologies and languages?
 
@ShotgunNinja s/is revealed/was obvious/
 
6:51 PM
old ones
it's not hard to be in the chat and code when you have split screens and separate computers to compile on.
 
I do it
 
@TomW Hello Tom if i clear the cavas like "context.clearRect(0, 0, canvas.width, canvas.height);" this.. it will clear the other drwn object as well (say any background which i have drawn ).. i only need to remove or erase the car object
 
Of course, I don't have to compile
 
I also tend to hear phantom pings and look over at the screen when I didn't get any pings
@Anish like I said, you cannot do this
canvas is like mspaint
once it is drawn, it is an image. you need to post-process the image to pull out the pixels
which is stupid
 
@rlemon I know it isnt hard I am at work too. I just see you a lot
 
6:54 PM
what would be better is to store each layer of the canvas on separate canvas elements and during your draw() loop stitch them back together.
@powerc9000 I type fast, and like js a lot
 
ugh, that's lame. Didn't realise that
 
0
Q: JSON/JQuery to create alert notification

user2094139I'm working in ASP MVC & C#, and what i'm trying to do is something similar to the following. public JsonResult SendMessage(SMSTestViewModel model) { if (//logic here) { string phonenumber = model.phone.ToString(); string derp = string.Empty; ...

 
@rlemon I smoke you in WPM
 
WPM?
 
@rlemon I dont type fast but I like javascript a lot
 
6:55 PM
@Anish I don't really know anything about it, I was just prompting you to give the room some more information
 
Words Per Minute
 
words per minute
 
@Anish Yeah either use a sep canvas for the bg and other objects, or just redraw them in a rendering loop over, and over, and over.
 
gotcha
yup - for what it sounds like you are doing (they are just images) I would just re-draw each layer in every iteration of your animation loop
it's not flash, you can't carry over part of the frame easily.
@RyanKinal [windows key]+[left/right arrows] for quick window positioning.
makes setting up your work day so much quicker.
 
@rlemon ?
 
6:57 PM
also up and down
if you code + chat on a split screen
I just found this out a few months back, been using win7 for ages.
 
@rlemon WHOA
 
idk if XP had anything like this
 
That's actually a really cool accelerator.
 
@rlemon not with the shortcuts, but you could right click on the windows in the taskbar and do this
 
@ShotgunNinja I know right?!
@FlorianMargaine yea, I knew about that. but it wasn't as quick.
 
6:59 PM
sure
 
I only found this out by accident when moving back to windows from linux for work.
 

« first day (964 days earlier)      last day (3987 days later) »