« first day (677 days earlier)      last day (4276 days later) » 

5:00 PM
6
Q: Send and receive binary data over web sockets in Javascript?

Chad JohnsonIt is possible to send and receive binary data over web sockets in Javascript? Could I, for example, implement an SSH client using web sockets?

normally it's 50% more, with base64 only 33% mroe
 
@Abhishek Add me as a maybe then
 
Hi, I want to revive this question: stackoverflow.com/questions/11513107/… I added some additional im not the owner of the question and im not allowed to edit. Any best practices ?
 
Binary is 50% more?
So it wouldn't be worth it?
 
@Amaan fork it ;-)
 
I mean you would have to utf8 encode it
it works in utf8
 
5:03 PM
Ah, I see
Thanks @Esailija :)
 
in utf8, a character of 128-255 is 2 bytes long
if you encode all 256 byte values in utf8, it will be 384 bytes
 
Ah right
Ok
 
where as in base64, it would only be 344
var l = 256,
    a = "";
while (l--) {
    a += String.fromCharCode(l);
}
console.log(btoa(a).length);
//344
 
0
Q: What can i do to click a html checkbox and change the content of a html input?

m3tsysLike i've said in the question... Is there a way to click the checkbox and that link will change to http://youtu.be/kffacxfA7G4? Example of code: <div class="embed-code"> <textarea rows="" cols="">http://www.youtube.com/watch?v=kffacxfA7G4</textarea> <labe...

 
Hm, so do you think any attempt to send binary atm is worth it?
Speed wise
 
5:05 PM
hmmm
I think we should add some owners to this room
 
I don't know if there has been any progress since april '11
 
the only owners left that are still regular are raynos (who gets there once in a while), andyE (who's almost never there) and ivo (who's even less there)
 
revolution!
 
the three other owners, I have never seen them since I'm here
 
@Zirak should be made God-King of the Javascript room
all decisions are made with:
!!/choose "ban SomeKittens" "Star SomeKittens"
 
5:08 PM
in the C++ room, most regulars are owners
 
@SomeKittens Star SomeKittens
 
and the list of owners is regularly cleaned up.
 
@FlorianMargaine most owners are regulars **
can i get screenshot's of how it looks ?
please
 
5:10 PM
 
What is your preferred MV* JS framework?
 
thanks bro :-)
 
walking away from interview
 
for me the firefox looks sweet but the chrome is going wierd :-/
pixelates!
 
@Neal In the additional questions, question 7 lacks context
It depends entirely on where the function is placed, and whether it's under strict mode
 
5:14 PM
it's placed in your face
 
Question 8 is stupid
So is 9
The quiz is meh
 
I stopped reading reddit javascript a long time ago
 
Anyone care to test my canvas remote desktop? :P
Need feedback on the latency
 
5:17 PM
@Esailija prob a good idea
 
how does one use comma in english? I think I am doing it wrong all the time
 
When people say JS doesn't have encapsulation are they ignorant of what happens when you assign a local var to a function constructor and give it setters/getters or is there some way to access that local var outside of an object instance I'm not aware of? Or am I ignorant of the proper definition of encapsulation?
 
@JoeyMorani nice desktop
 
encapsulation = bundling data with methods that operate on that data
 
Lol virtual machine
 
5:18 PM
stuck at frame 13
 
@ErikReppen this is also interesting if you haven't read it javaworld.com/javaworld/jw-05-2001/jw-0518-encapsulation.html
 
@JoeyMorani JUST suggesting
 
Hmm, think it's because multiple people are connecting
 
DONT EVER NEVER NNEEEEEEEEEEEEEEEEEEVVVVVVVVVVVVVVVVVVVVVVVVEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE‌​EEEEEEEEEEEEERRRRRRRRRRR NEVERRRRRRRRR
use php
for such stuff
 
no?
 
5:19 PM
never ever never never
 
Why?
 
its damn too slow
for such stuff
 
did php murder your brother?
 
what stuff?
 
5:20 PM
@Esailija hes trying to capture screen and send it live to people
with PHP
 
Remote desktop style thing
 
using php sockets :-/
 
no no
 
^^
 
Using websockets
It's just a PHP page
 
5:21 PM
so what are u using to transfer the video ?
 
websockets connecting to what?
PHP?
 
Javascript
 
so node.js?
 
I'm using C# to capture the stream
and then websockets to transfer it
/display it
 
and sending it using ? C#
 
5:21 PM
Yeah
 
ah so the websocket server is C#
 
hmm thats better , you nearly made me scared when i saw .php (XD)
 
Yeah :)
Na, it's just a .php page
Whoever is connected atm
 
btw ... if u are using C#
 
can you try moving the window
 
5:22 PM
I've got the game idea! We make an Ultima Online clone in Canvas (⌐■_■)
 
i am but :-/ cant see screen
 
Refresh
 
@FlorianMargaine I won't participate. But thanks.
 
@rlemon ...
if this is for the competition
we all decided thats a shooter!
@JoeyMorani just saying though
since you are already using C#
 
5:24 PM
@Abhishek Any kind of shooter?
 
Top Down [ ease of coding ]
 
@rlemon lbl.innerHTML = "A<strong>CSI</strong>I";
 
aaww
 
@Abhishek well fuck your competition with no prizes... this is what i'm making and it will be a hella lot more interesting than some shooter. Who is with me
 
rlemon should SMASH for that.
 
5:24 PM
@JoeyMorani use a video format
@rlemon :3
 
@dievardump troll / joke scripts get troll / joke code
 
Oh, would that improve the latency ?
 
@JoeyMorani and have that video streamed at some decent format :P cause frame / frame at this resolution is too huge for slower internets like mine
 
@rlemon I can't see any $ in your code. It can not be a REAL JavaScript code troll.
 
> In one line of code, how you would make a copy of an array?
 
5:25 PM
@Abhishek lol i'm down with the competition :P but just you shh because my game is a huge undertaking and is based on an open source project so it will be somewhat easier
 
@JoeyMorani it should!
@rlemon i was just pulling ur leg :D
 
var arr = [ 1, 2, 3 ], copy = []; for ( var i = 0; i < arr.length; i++ ) { copy.push( arr[ i ] ); }
 
i am enjoying windows media player .. aww my loved i have missed u soo much rhythmbox and banshee both mess up my music :-*
 
oh wait, is it not what the asker expects?
 
Hey is it just me or on linuxes playing too much bass just makes a loud NOISE ?
 
5:29 PM
@Abhishek What video format do you recommend? :)
And would I still be able to do it in a canvas ?
 
@JoeyMorani u should be
 
@Esailija Good link, but even when people use other definitions or criteria, I'm not sure what they're on about. Sometimes I get the sense people are confusing black-box modularization for encapsulation.
 
@Esailija has a better knowledge on formats then i do btw
 
@Loktar @SimonSarris runuo.com/home I want to (using node.js and websockets) make a canvas clone of this game (engine/platform/whatever you wanna call it)
But Will be a massive undertaking
 
5:33 PM
you should definitely use a custom game engine for this, like impact.js
 
@FlorianMargaine +1
@rlemon use a lil bit of DOM there
 
Hey guys
 
cause otherwise the mathematics will kill JS
** overkill js**
 
Say i have an image and i want to overlay something in the corner of it
How could i do that?
 
@HarryBeasant use image maps
 
5:34 PM
Like the "adchoices" thing
 
well most of the stuff is done on the server. I actually have done quite a bit of C# development for runUO shards
 
oh overlay (XD)
 
and I've hacked many of the server 'scripts'
 
whoops got it wrong
just ovelay it
with another element
 
5:35 PM
So like, i could have it in the bottom corner
Or top corner
 
so assuming nodejs can handle the processing on the server the rest is just a LOT of sprites and a heavy server to support the concurrent connections
 
@rlemon u still dont get it ;-)
 
if you've ever played Ultima Online you'll understand me
 
and its strange how u not get it (XD)
 
@Abhishek no I do, you don't get what i'm saying
 
5:36 PM
 
the technical difficulty will not be displaying the client... it will be building the server end.
 
can u imagine how much exhaustive rendering that is going to be with canvas ?
 
will be replicating runUO... not the UO client.
@Abhishek that is a stupid screenshot by them
there is like 300 people crammed into a single space.
 
Just saying dude
 
I like how noone is reading the rest of the image... they are just reading the top line: reddit.com/r/gaming/comments/ypai6/fastest_fingers_in_the_east LOL
 
5:39 PM
because of how customizable the system is, I don't think the canvas rendering is my #1 concern. I can cross that bridge once I get to it.
just a lot of sprites + generated maps
 
look cool and fun
 
I'm just saying this would be an EPIC canvas clone
@Abhishek if you have never played it, it is like WoW meets Diablo II/III
best part is; making a public server costs you nothing so there are hundreds of thousands of them all based on the same runUO - and connect with the same client (minus you having to download some GUMPS) but for a totally different feel and gameplay
 
@rlemon or Project Wonderland
 
customize everything when you run the server
make your own skills, items, types, resources, spells, etc.. anything your heart desires
 
5:45 PM
Is a HTML5 canvas already hardware accelerated?
 
I want to revive this question: stackoverflow.com/questions/… I added some additional info as comment, but im not the owner of the question and im not allowed to edit. Any best practices ?
 
I'm not sure Node would be the ideal choice for an MMO. Wouldn't that be a lot more requests than a typical web page?
 
@XzenTorXz add a bounty...
 
@ErikReppen what did that Mozilla MMO game use?
didn't it use Node.js?
Sonic games ^
 
5:47 PM
Hi there, I have a question for you guys about documenting javascript
Is there anyone I can talk to about this online?
 
You are online @Tony ....
 
@rlemon yo listen bro
 
!!/tell Tony "Please good sir, ask me!"
 
here is a lil bit suggestion
 
@rlemon Yeah, I googled some MMO Node stuff. Looks like it's workable.
 
5:48 PM
@rlemon Command Please good sir, ask me! does not exist.
 
use DOM and Canvas together
 
@rlemon the most important is the youtube video.
 
@Abhishek obvy :P
 
for instance generate hard effects using canvas
 
@Abhishek Why?
 
5:49 PM
and then use that graphics as images on <div> ;-)
@Amaan consider about 40,000 instances of same tile
 
My co-worker currently is working on : gw2siege.com/#plan
 
@Abhishek this is why I said rendering of the client is a later concern.
 
of flowing grass ? :P
 
Using googlemap api
For the map rendering
 
getting the server engine working in JS is the #1 concern
 
5:49 PM
I am wondering what is a good way to document my javascript code as in is it good practice to use comments in the code or document functions with /*Code documentation*/ like you would in a programming language? @riemon
 
there are two different components
 
:D
 
@Neal i love my reputation too much :( only because someone else allready asked a question and didnt put an example i have to give my reputation away ?
not fair
 
Anyone know how I can optimise "drawImage" as I'm using it multiple times per second?
 
@XzenTorXz Neal LOVES his reputation also.
 
5:52 PM
@JoeyMorani depends on the situation
 
@Tony There's a lot of server-side stuff out there that will run through your JS documents looking for certain comment patterns and then auto-build web-pages for documentation viewing.
 
@rlemon In the case of a remote desktop type thing (82.47.1.182/socket.php)
Trying to get it working on slower machines
It just crashes the page
 
Ahh okay. Well then lets say for other coders then? Is it good to have comments and seperators for instance I seperate areas of my js file with somehting like /*******************GLobal Variables*************/ ?
 
The most critical thing to me, IMO is to write self-documenting code as much as possible and clarify stuff that's less legible where performance or some other desired characteristic make it a little less easy to understand what's going on. But every developer has an opinion on proper documentation. Mine is fairly loose.
 
@XzenTorXz you can edit. it will go into the queue
 
5:53 PM
@Neal i dont have enough reputation to edit :(
 
@XzenTorXz you always do.... it will just go into the queue
 
@Tony I tend to stick with // since block comments can get thrown by regEx.
 
@XzenTorXz "Improve this question"
it will let you edit the question
 
Ahhh so if I seperated areas of my js file by //////////////////Global Variables////////// This would me more acceptible @Erik Reppen ?
 
and the edit will go into a queue that privileged users will be able to approve
 
5:55 PM
Also in a non-color-coded environment block comments are less obvious.
 
@Tony no, it doesn't matter
C# has "regions" for this kind of stuff
 
Well then a better question what is a good way to make regions in Javascript?
 
@Neal lol never notice Thank you :)
 
@Tony if you need to separate this much your code, it means it has to be in another file :)
 
@XzenTorXz np
 
5:56 PM
and global variables are evil.
 
@Florian
woops sorry
Okay and then when I move to production minimize all the javascript in one file?
 
ofc <- ?
 
of course
 
if couchdb is exposed like a rest api can I make an app using simple javascript (without node.js) ?
 
5:59 PM
Ahh interesting. Okay. Well then what tools are good for documenting javascript?
 
@FlorianMargaine jsfiddle.net/DFhMx/2
hover .. :$
 
@BlaShadow yes, but anyone could delete your whole database (never trust the client)
@Abhishek cool :)
 
@rlemon the finest mmo of all time
 
@FlorianMargaine :D
am starting to work on my game engine now :D
thisIsCss.js
 
I just played druids and got squirrels to follow me around until people kept killing me and I stopped.
 
6:03 PM
user image
3
looool
 
@FlorianMargaine cool
 
City of Heroes is underlooked, IMO. It's a pretty phenomenal sandbox MMO.
 
@SimonSarris So.... you're in?!
I've been a developer for 2 runUO shards and many many Sphere 55i shards
I have a very good understanding of the game mechanics
 
O_o
Why don't they provide screenshots or something else ?
 
So, I just looked at some JS I wrote 8 months ago, and thought "Damn, that's clever. And clear."
 
6:08 PM
Seriously they don't give people the envy to play
 
This makes me smile
 
@RyanKinal Seriously ?
 
@dievardump Yep
 
If I look at any code I did 2 weeks ago I could slap myself
2 weeks... it's not I'm better now.
It's just I'm too unorganized (in my head, like instable), so i won't do the same thing the same way two weeks after
 
I feel like I've accomplished a significant milestone in my professional development. Go me! Time for beer!
 
6:10 PM
@rlemon no time at the mome :(
 
Okay, beer will come a few hours from now
 
@rlemon we can def collab on something after this book is done, but I'd prefer smaller projects, ie github.com/simonsarris/LoveBasket
(doesn't have to be that, just something I started that gives a good idea of the scope I'd prefer)
 
@Abhishek I may stretch the definition of "top-down shooter" a bit
 
@SimonSarris well it doesn't have to be a full blown UO.. just similar enough. the same types of skills and training the same basic stats and gameplay. maybe reduce the map and city sizes :P no need to go overboard on the crafting systems
 
@RyanKinal okay thats fine
 
6:13 PM
really... once the game engine is done (server components and the base for the client rendering) like UO today, it should be easily expandable.
kinda like a MMO boilerplate
 
@SimonSarris weird but really nice.
 
@dievardump ?
 
its not weird!
 
6:19 PM
A Little. And a little Hard for a first level.
 
yes sorry thats a level in the middle, the level progression thingy wasn't finished and I had to do some testing so I kept it on a more complex level
 
I want to collab too!
just not on an mmo
 
if I ever exit this book alive we shall convene
 
@Loktar MMO is teh future bro!
 
yeah but every dev wants to make an mmo
and like 1% are completed
 
6:29 PM
and they are non trivial
 
and then another like 1% are succesful
 
I too vouch for a smaller scope
 
@dievardump thanks a lot eh. you totally fucking ruined the rest of my workday
I can't stop - they are so funny.
 
@dievardump cant
get through the first level
got all hearts :-/
 
well then single player but still based on UO
I like the top-down big ass map LOTS to do approach
 
6:33 PM
@Abhishek use the bomb :D
 
@dievardump how do i get out...?
 
Hi Everyone does anybody know about sencha touch 2 i need some help
 
@Neal It's @SimonSarris game. Ask Him. But or me you have to block the bottom then push the bomb, make it "bounce" on a heart and break a big rock on the right.
It all I can imagine.
 
you must move the bomb across the gap and drop a rock onto it to make it explode, creating a hole
bombs can fall onto grass without exploding
sorry I really should put a starting level up and not this one ~_~
 
@SimonSarris how
 
6:40 PM
@Abhishek the one at top left, carefully let it fall onto the grass (clear the way), then fill in the gap in the middle with rocks, then push the bomb across, then carefully carve a path so that a rock can fall on top of the bomb to break rocks to get to the door
is puzzle game :D
 
@SimonSarris boy thats what i tried (XD)
but i didnt knew it can fall on grass and not explode
 
6:54 PM
@RLEMON STOP TWEETING THIS THINGS YOU'LL RUINE MY DAY
 
LOL
you have already ruined mine
I can't stop
he is so fucking funny!
 
you said fucking. FLAG.
 
so did you!?
 
I don't know ^^'
I can't see Flags
And I don't really give a sh*t.
 
6:59 PM
If someone wants to flag but don't say " I think you're gross, I can't let it go like that " well, go to hell.
 
just keeping you unproductive is all.
 

« first day (677 days earlier)      last day (4276 days later) »