« first day (908 days earlier)      last day (4046 days later) » 

4:00 PM
Anyone willing to help me find out why my character teleports upon hitting a wall would be very welcome.
Really. I'm desperate. My teacher refuses to help, and being probably the best in the class in programming, if I don't understand, others won't.
 
@Ariane wat
 
@Ariane You say if you remove the "maScene.player.x=" assignments, it doesn't jump around?
 
@KendallFrey maybe
 
@Neil Of course, because I'm not changing the position. THe player will just walk over thewall.
 
@SomeKittens sucks eh
 
4:03 PM
@Shmi Mmmh?
 
@Ariane Right, but just to be sure that's what's causing it
Logically then, one of those variables is some weird unexpected value
Try printout out the position prior to being assigned
Then printout all the variables used in the formula
 
@Neil the player's x and y ?
 
@rlemon Grooveshark has great stalker tools.
 
Something unexpected will turn out
@Ariane Yes, before you set it
 
lol
 
4:05 PM
Oh snap.. it's not that you're dividing everything by 2 rather than just the width?
Have you tried surrounding maScene.player.width/2 (and consequently maScene.player.height/2) with parentheses?
I wouldn't expect that behavior, but then I'm not familiar with actionscript
It would explain the weird behavior
 
@Neil
		function colCheckWalls() {
			var wallNb:uint;

			var thisWall;

			var wallTop:Number;
			var wallRight:Number;
			var wallBottom:Number;
			var wallLeft:Number;

			for(wallNb=0; wallNb<maScene.murs.numChildren; wallNb+=1) {
				thisWall=maScene.murs.getChildAt(wallNb);

				if(thisWall.hitTestObject(maScene.player)==true) {
						trace("Player X before collision changes = "+maScene.player.x);
						trace("Player Y before collision changes = "+maScene.player.y);
					wallTop=thisWall.y-thisWall.height/2;
 
thankyou
 
@Neil Is this what you want?
 
maScene.player.x+maScene.player.width/2
===
x + (width / 2)
 
@rlemon You think I'd need parentheses?
 
4:08 PM
@Ariane Yes, that and you should wrap the width/2 with parentheses
 
no, I was just clerifying for @Neil what it does
it is more readable with the parens
 
@rlemon Thanks for your clerification
 
@rlemon @Neil please agree on whether I need the parentheses or not. o.o
 
you don't need, but you should have
i.e it's not going to fix anything but readability
 
it's a visual grouping
for clarity
 
4:09 PM
Okay
 
@Ariane You print out all the other values in your formula
 
I'll fix it anyway. I like visually clear code.
 
it's helpful for debugging ;)
 
If the formula is the cause, as it seems to be, then that sounds logical
 
personally, I think adding spaces around your operators would help as well
 
4:10 PM
@Neil Are the things I print out now sufficient?
 
wallTop = thisWall.y - thisWall.height / 2;
much more readable
 
@Ariane Yes.. and while you're at it, "maScene.player.y-maScene.player.height/2<=wallBottom"
surround maScene.player.height/2 with parentheses as well
And all lines similar
 
@Neil Yeah I think I did all that just now.
 
And? Have you tried it?
 
Would it make sense, when designing a language, to make whitespace significant for operator precedence? 1+2 * 3 == 9 1 + 2*3 == 7
 
4:14 PM
YES
 
@JanDvorak Yes, if you're masochistic
 
@Neil How the code works doesn't change but I can show you an updated file that'll be easier to read.
 
Bernerwürstel with white bread. YUMMY! :D
 
http://pastebin.com/sZk5t99a

Here!
 
@Ariane If it still happens, I want to know the change in player position on first collision
 
4:16 PM
@Neil I'll give you the first few lines of output. Okay?
 
@Ariane ok, does it still occur?
 
@Neil Player teleportation? Yes, the very same as before. Wait, I'll give you the output.
 
@rlemon Yep. Shoe has a hole so my sock is soaked
 
user2157210
@OctavianDamiean are those the ones with cheese in it and bacon arround?
 
@Nexxpresso Yea.
 
user2157210
4:20 PM
@OctavianDamiean the only good things austrians (bern is in austria??) invented
 
you made me want to fix my collision detection. I think it's better now (ignore the rest of the code) jsfiddle.net/rlemon/Bjbpd
I think the 'shrink' should just be a colour change
the shrink makes it look like the bullet is exploding away from it
 
@Nexxpresso No, it is named after the cook that invented it.
 
but if you slow down the FPS you can see it explodes then shrinks :/ explosion takes too long to move outwards so it is missed
 
0
Q: Resizing group of images to fit within container, all with same height

AntI have a requirement where there will be one to four images within a container set to the width of the window. The images can be all different sizes. In javascript I must resize all images while maintaining aspect ratio so all images are the same height and they all fit in one row next to each ...

 
user2157210
@rlemon why can I shoot through some of the blue balls?
 
4:22 PM
@rlemon Very "fourth of july"
Nice
 
user2157210
when they are on the right side near to the wall the first shot just goes through them but they still get smaller?!?
 
@Ariane I apologize, but I have to run.
 
jsfiddle.net/rlemon/Bjbpd/1 I think that is better
 
@Neil Okay, this is going to be long, because it teleports on a wall, and then on another, etc. After this , it just spams wall # mur19.
 
@Nexxpresso you cannot, you are just getting close to them
 
4:23 PM
__
Collision to the left of wall : mur8
wallLeft = 150.05
maScene.player.width/2 = 25.05
wallLeft-0.1-(maScene.player.width/2) = 124.90000000000002
__
Collision to the right of wall : mur8
wallRight = 200.05
maScene.player.width/2 = 25.05
wallRight+0.1+(maScene.player.width/2) = 225.20000000000002
__
Collision to the top of wall : mur8
wallTop = 350
maScene.player.height/2 = 25.125
wallTop-0.1-(maScene.player.height/2) = 324.775
__
Collision to the bottom of wall : mur8
wallBottom = 400
maScene.player.height/2 = 25.125
@Neil Awh. :c
 
user2157210
@rlemon but they get smaller
 
check: function (particle, type) {
    particle.color = "#f00";
    console.log(particle);
    var x2 = particle.x,
        y2 = particle.y,
        rad2 = particle.size;
    type = typeof type === 'undefined' ? 'All' : type;
    this.particles.forEach(function (_particle) {
        if (_particle.type === type || type === 'All') {
            var x1 = _particle.x,
                y1 = _particle.y,
                rad1 = _particle.size;
            var d = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
 
user2157210
anno explosion
 
@Nexxpresso I just explained that.
two hits to kill
 
user2157210
yeah but my red balls
 
4:24 PM
I just changed it to not get smaller.
 
user2157210
explode when they hit right?
 
user2157210
im on the old version
 
yes bullets always explode
 
user2157210
i hit the target the target gets smaller but the bullet goes through
 
@Ariane It's definitely doing something it shouldn't :P
 
4:25 PM
@Nexxpresso You should go see a doctor, your balls shouldn't be red ...
 
balls on old version got smaller on hit, but the bullet explodes THEN they get smaller in 14ms so you don't see it
 
I noticed it didn't give the player position at the first collision
 
Cool effect
 
I assume it was because you just didn't show it
 
@Nexxpresso then you have some strange stuff going on
 
4:25 PM
Someone give @Ariane a hand with his code.
 
I have never seen that and i have tested this code for months (really just trying to figure out how I can make a game from it)
 
Again, I apologize but I've got to run, @Ariane
 
user2157210
only happens every what ever shot
 
user2157210
and after refreshing i cant reproduce
 
Her. ._.
@Neil But thanks for trying.
@Neil and yeah, I just forgot to paste that part. It's :
Player X before collision changes = 139.3
Player Y before collision changes = 461.05
 
4:28 PM
when you have tokens from some language (context free version of javascript) how do you parse binary expression - like plus operator?
 
today we splat bugs
 
Sooo... Is there anyone willing to help me with my code? ._.
Neil, my designated helper, had to leave, so.
 
user2157210
i can not flash
 
@Nexxpresso Also, Berner-Würstel is not the only great Austrian invention. Forgot about the Sachertorte?
 
user2157210
@OctavianDamiean does it have bacon
 
user2157210
4:29 PM
NO
 
m59
@Shmiddty (and I'd love other input!!) I'm loving angularjs like crazy, but I'm not sure how to structure this to keep it neat and understandable. It is kind of hard to get used to logical html. You can see my binding called "edit" that determines whether or not buttons are disabled. I'm thinking it is a mistake that I have the html itself changing it sometimes whereas other times my js is changing it.
 
@Nex In theory, the part I'm having trouble with shouldn't have anything to do with Flash in aprticular.
 
(how to splat bugs)[facebook.com/…
 
@Nexxpresso A cake doesn't require bacon ...
 
user2157210
@OctavianDamiean oh fuck it does
 
m59
4:30 PM
Should I put anything like that into a function and call it, that way I can see it on the js side?
Or is this just something to get used to?
lol forgot the link
jsbin.com/uyiric/5/edit @Shmiddty @rlemon
 
user2157210
 
user2157210
 
:heart attack:
 
By the way to avoid scrolling up the part I'm having trouble with starts on line 211.

The code is:

http://pastebin.com/sZk5t99a
 
That's gross.
 
user2157210
4:31 PM
 
user2157210
@OctavianDamiean how is that gross
 
Bacon doesn't belong on a cake ...
 
I don't want to harrass, but you people are my last hope. My teacher refuses to help and the rest of the class is probably inferior to me in terms of coding.
 
user2157210
@Ariane have you tried reversing x?
 
4:34 PM
@Nex In despair, yes, I did, to shut you up.
 
user2157210
if that doesnt work reverse even more
 
@Nexxpresso Stop trolling around now.
'nuff trollin'
 
user2157210
@OctavianDamiean works end now
 
user2157210
when im back home i have a question
 
user2157210
so dont you leave
 
user2157210
4:35 PM
for 2 hours
 
@Nexxpresso I'll be here but maybe I'll troll you.
 
@Octa Does it mean you're going to help? :D
 
user2157210
yeah he is flash lover
 
user2157210
he will help you
 
Try reversing @Nex
 
4:37 PM
@Ariane Sorry, can't. I'm desperately trying to stuff some Latin into my brain.
 
@m59 I'm not sure what you're asking
 
I was beaten by Latin. x_x
 
there was a way in JS to separate objects public interface from the rest of the objects methods
what was that way ?
 
Closures?
 
@RyanKinal Closure WGATS Fera gbvn sjythtxnygvb ?
 
4:40 PM
You've finally lost it, haven't you?
4
 
m59
@Shmiddty I've spent the last few month finding the perfect style for writing js and this is nowhere close lol
 
@Octa Lots of imaginary dollars if you drop Latin to help me. x_x
 
@m59 The same concepts apply.
 
m59
But now we're dealing with smart html. It's all crazy.
My html can set properties...
 
4:43 PM
Just think of the HTML as a template
 
m59
so now reading through the js file doesn't give you an ideal picture of what happens on the page.
 
@tereško module pattern, closures... plenty, tbh
 
doesn anyone know how to stop a <td> from affecting the whole columns width?
 
@m59 Sure it does. All of your functionality is defined in the JS. (addList, removeList, etc)
 
@Ariane A negative mark tomorrow on the test if I drop Latin now.
 
4:45 PM
How the interface behaves isn't relevant to what the functionality of the app is.
 
m59
@tereško
myObjProp : (function() {
  var myObjProp = function() {
     //do stuff
     myObjProp.nest();
  };
  myObjProp.nest = function() {

  };
  return myObjProp;
}());
 
@Billy style overflow:hidden ?
 
I need overflow visible though.. ;)
 
All of the HTML binding stuff is either generating html or defining interaction.
 
@Octa :c
 
4:46 PM
I got it, I wrapped it's contents in a div and made it position:absolute
@mckoss ^
Thanks, though
 
@BillyMathews [sloppy], [hacky], [horrible]
 
m59
@Shmiddty well, at the moment, some of the elements are setting edit to false, whereas some call functions that set edit to false. I think I'd feel better putting all of it in functions...but that might be cluttery.
 
@Shmiddty better way to do it?
 
@Billy pos absolute is taking it out of the document flow - it's not even really in the <td>.
 
@mckoss I know - problem?
 
4:49 PM
It will overlap adjacent table cells - if that's "OK" - then no problem.
 
That's what I want it to do
Can you see that?^
 
@Billy - nope
imgur?
 
Thought so, one sec.
 
@m59 I don't see any bindings to edit and nothing is directly interacting with edit that I can see.
 
This is my first time in a SO chat. Is this a new feature - or have I just not been paying attention?
 
4:51 PM
the three buttons below the cart
are in a td in the same column as the product images
 
m59
@Shmiddty (sorry to abuse you here) Also, I am disabling buttons based on edit or !edit, which I am changing from true to false. I was thinking it makes more sense for it to either be false or the index of the array that is being edited. However, if I set edit to that index and the index was 0, edit would evaluate as false (so the buttons are all wrong). How can I write ng-disabled="???" to deal with something like that?
 
and they were stretching it making an unwanted hap
gap*
 
I see. You can also may td cells span multiple columns.
Then you could not have to do anything wonky with positioning.
 
m59
@Shmiddty lol you're right, I guess I did put them all in functions after all.
 
@m59 So you want to disable the edit button for only the item currently being edited?
 
m59
4:53 PM
@Shmiddty Nah, I like the way it works right now.
 
Also, I would change edit to editMode or something more descriptive like that.
 
@BillyMathews <td colspan="2">...</td>
 
even something like isEditing or isEditMode
 
m59
@Shmiddty
Consider these lines:
 $scope.editList = function(list) {
      $scope.edit = true;
      $scope.editListNum = $scope.lists.indexOf(list);
That seems a little silly.
 
@mckoss yeah, I thought of that but the buttons are all in a form, and the second column has the 'Subtotal:' text in it, aligned right.
 
m59
4:54 PM
ought to work with $scope.edit = blahIndexOf
 
And, yeah the chats have been here a while :p
 
m59
since edit would have a value, why make another prop to store the index. But if the index is 0, edit evaluates as false. See what I mean?
 
@m59 Well you're not actually using $scope.editListNum for anything, so...
 
m59
What I need to ask is more like ng-disabled=if (edit !== false)
I am using it.
 $scope.saveEdit = function() {
      $scope.lists[$scope.editListNum] = {
 
There isn't any way to 'clear' an absolutely positioned element is there?
 
4:56 PM
@BillyMathews yeah I see that. HTML provides tons of ways of skinning the same cat. Many frown on table-based layout - other alternatives are using float-left divs or adjusting left margins to align your divs.
 
Tables are good - for tabular data
 
display:table
 
@BillyMathews I think there are some new CSS layout styles for making table-like layouts too - not used them myself...
 
How about $scope.editing = list. The object will eval to true, when you save, set $scope.editing = false
 
jsfiddle.net/rlemon/Qx785 I don't know why I made this but I just did :/
 
m59
@Shmiddty lol smart!
 
 
@BillyMathews caniuse.com/flexbox
 
"Until last year, most of us were using tables to lay out our pages"
Absolutely lost my shit
 
5:01 PM
Good cross browser support
I don't think I've ever seen a version of Opera mini where it's box isn't red on that site x_x
 
@BillyMathews BTW - shouldn't this be in an HTML or CSS chat topic - seems a bit off topic here.
 
I have worked with table layouts, but I've never made one myself. Not once.
Tables: Not even once
 
NOt
Even
 
I did... 15 years ago...
 
once
@mckoss Meh. ;P
Third bullet on the right
People stopped using tables before I even started programming so..
 
5:06 PM
@BillyMathews I'm not invested either way in the tables vs no-tables religious wars.
 
Tables for layout = Baaaaaad Tables for tabular data = goooood :)
there is no debate, that is the answe ^.^
answer*
 
Anyone a meteor user?
 
@BillyMathews lol
 
5:12 PM
 
@BillyMathews Wrapped in a <center> tag.
With <font>s everywhere
 
@Shmiddty and using only 'web friendly' colors
Ugh, I know it doesn't matter any more, but when they designed that pallette why did they pick such ugly colors
(I do know it was to do with working on everyone's screens but still)
 
@BillyMathews It's not really a palette that was designed. It was just whole steps in the spectrum. #ff0000 is websafe, #f80000 is not.
so basically take a color, and "round" it so that it can be represented by a 3-digit color: #f00, etc.
 
Oh I see
 
I...
 
5:18 PM
Still, the internet was ugly for a while
and I mean a while
 
Today I found a modern website made entirely in flash
 
@BillyMathews That's because web developers were programmers
 
for the first time in a very long time
 
m59
@Shmiddy I just looked at the ng-repeat docs and it doesn't seem that it can serve a purpose I had in mind. What if you have 20 items but you want to display a certain amount based in a binding?
 
@SimonSarris I'm intruiged...
 
5:19 PM
@m59 you can use filters
 
@Shmiddty as apposed
 
to designers?
 
m59
ah yeah, I remember that :) thanks dude. This is a lot to take in haha
I watched like 3 hours of tutorials last night
 
All-flash, all the text, the whole interface, down to the obnoxious scrollbar
 
5:20 PM
@Raynos without your beard you look a completely different person
 
@BillyMathews yes
@m59 Yeah it's a bit overwhelming at first, and feels like learning a new language. But once you start understanding how it works, it's just another javascript framework. :)
 
m59
I've never used any frameworks, so it's two-fold.
 
@Shmiddty Yeah, I know. I'm so glad there's been such a huge advance is ui and design
in*
and @SimonSarris Actually quite a nice site
 
its not ugly, though it kills usability. I can't copy portions of text or open parts in a new window. I can't right click to copy links.
I can't middle-click scroll, and the scrolling amount is non-standard
 
I totally agree
anyways guys im off home
 
5:27 PM
1 message moved to bin
Yo Simon.
 
Simon says don't make your entire website just an embedded SWF
 
whats up @OctavianDamiean
 
Trying to study Latin but my brain screams NOOO OMG NOOO STOP IT. I will do whatever you want but stop it.
 
I give you guys a wink
 
OrElse. WTF kind of language has an OrElse operator? :rage:
 
5:33 PM
@jAndy Lush Picture!
 
same thing I was asking myself about unless keyword
 
Hello Everyone, How Are You?
What is package.JSON in "BootStrap?"
 
beginnings of a nice slick css only menu :P jsfiddle.net/rlemon/Qx785/2
 
What is what in what!?
 
do they speak english in what ?
 
5:34 PM
@rlemon "Slick" is now trademark Slick Innovations, LLC
GIV ME T3H MUNIES!
 
lol
 
Seriously, though, that's pretty cool
 
back buttons make it much more functional
 
Yep
 
ofc this will be done using js in the end. but I thought it was cool just with css
 
5:38 PM
Agreed
 
;D
 
O_o
 
I just heard someone mention the number 5981, and it sounded significant to me... but I have no idea why.
 
@rlemon I think more indentation for the green level would make it more clear
 
5:41 PM
room topic changed to JavaScript: All about ECMAscript and its various libraries. Please read the rules: rules.javascriptroom.com [overwrite] [tags] [u] [y]
 
yea it's not very pretty right now
 
I hate sorting
 
0
Q: Shaky on QUnit folder structure

ViktorI want to write something serious in JavaScript for the first time in my life. Knowing this, I want to do TDD and write unit tests. I have experience in JUnit, but yet, how to structure my project with QUnit (my choice of framework) remains a mystery to me. I'm thinking something like this: my-...

 
@RyanKinal Because it is close to CouchDB's default port 5984.
 
room topic changed to JavaScript: All about ECMAscript and its various libraries. Please read the rules: rules.javascriptroom.com [alphabetical-ordering] [f] [t] [w]
 
5:42 PM
room topic changed to JavaScript: All about ECMAscript and its various libraries. Please read the rules: rules.javascriptroom.com [0y] [1u] [2overwrite] [3tags]
 
@OctavianDamiean Nope, never used Couch...
 
@jAndy o_O
 
AGH
 
Y U OVERWRITE MY FUNNY TAGS?!
 
5:42 PM
@RyanKinal SHADDAP! That wasn't a question. I was telling you! :D
 
brrrr
room topic changed to JavaScript: All about ECMAscript and its various libraries. Please read the rules: rules.javascriptroom.com [?] [kidding]
room topic changed to JavaScript: All about ECMAscript and its various libraries. Please read the rules: rules.javascriptroom.com [0y] [1u] [2overwrite] [3tags]
lol
 
@OctavianDamiean :-D
 
room topic changed to JavaScript: All about ECMAscript and its various libraries. Please read the rules: rules.javascriptroom.com [jquery]
 
user2157210
vbulletin api
 
user2157210
anyone ever worked with?
 
user2157210
5:50 PM
is there even an external api
 
vBulletin is the uttermost shit.
 
user2157210
i see
 
user2157210
thats what im doing right now
 
Man I need a break ...
 
user2157210
5:53 PM
well not scraping like he suggests
 
ok well someone figure out how (CSS only) to get the first menu selected #top without js? jsfiddle.net/rlemon/Qx785
 
user2157210
eh?
 
@rlemon ul:first-child?
 
but how to make it go away when another ul is :target
there is no previous sibling selector
 
Ah. Right. That.
 
5:57 PM
ul:target << ul {}
 
ul:target + ul <--- sibling selector?
Wait... no
 
this is my best attempt so far, as you can see the first list is not hiding ;)
 
Yeah... my sibling selector did the same thing
 

« first day (908 days earlier)      last day (4046 days later) »