« first day (1977 days earlier)      last day (2986 days later) » 

6:03 PM
Hi guys
 
@WTFZane Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
1 message moved to Trash can
@WTFZane Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
opsie sorry
 
I cant format the code
 
crl
k I'm an idiot, thanks Ben
 
6:10 PM
I'm writing a polyfill for the updated custom element spec/API... this shit has changed a hell of a lot in the past few months.
 
@BenjaminGruenbaum this again -_-
 
Pls help
 
@WTFZane before submitting, Ctrl + A to select the whole text. Then use Ctrl + K
then submit
 
crl
jsbin.com/jelaku/edit?html,js,console < the idea is to make this work ('populating' the to first object)
 
that is one fancy fountain
 
6:16 PM
@SterlingArcher all js collections implement that, just fyi. So string has it
"fountain" ?
 
it's a soda fountain
 
didn't knew it's called by that in english
i usually associate "fountain" with this
 
yep, on account of how it has spouts, from which soda is sent out in a jet
 
keh
 
Wow, I'm incredibly late to the party but I just read up on how the Silk Road creator was arrested because he posted his name on StackOverflow question he asked
That's hilarious
I, personally, hand-cuffed him. For using PHP, no less. — Oded ♦ Oct 3 '13 at 12:12
lmao
 
6:18 PM
function potpot($.pnotify){
	title: 'Big Notice',
	text: 'Check me out! I\'m tall and wide, even though my text isn\'t.',
	width: '500px',
	type: 'error',
	min_height: '400px'
							}
Oh wow. is that correct format?
 
crl
almost
 
What seems to be the trouble?
 
my wife left me
 
Sorry to hear that mate
 
lol
 
6:20 PM
May I know what's the error in that js?
 
it isn't valid syntax
 
@rlemon calm down, breathe, she's probably just in another room
 
not sure what you expect it to do
you've mixed a function declaration with an object literal
 
<button class='btn btn-default-alt btn-block' onclick='potpot(value);'>test </button>
 
your syntax isn't valid
 
6:21 PM
Because i want that too fire when i click the button
*to
 
Why did you name your parameter like a standalone jQuery function?
 
function potpot() {
  $.pnotify({ .. your object ... });
}
probably what you wanted
 
you have function <name>( <non valid arg> ) { <object properties> } while the right syntax is function <name>(<args>) { <list of statements> }
 
I think I'm going to start naming functions potpot.
It rolls off the tongue nicely.
 
how do you pronounce it
 
6:24 PM
potpot
 
like hot hot, but with a p
 
> I have a bag of potpot at home waiting for me
(disclaimer, I don't)
 
that's a name
 
@SterlingArcher is that like, the pot that gets the pot high?
potpot
 
My pot got into the potpot
 
6:25 PM
yo dawg, we heard you liked getting high, so we put potpot in your pot so your pot could get high while you get high
 
Man I don't think even at college I ever heard anybody call it pot
 
<button class='btn btn-default-alt btn-block' onclick='potpot(value);'>Test</button>
is that now correct?
 
@SterlingArcher chronic or weed was pretty much what we called it in hs
 
@WTFZane that wasn't the problem code
 
6:26 PM
chronic was specifically weed cut with hard drugs for us
 
Who cuts weed with hard drugs good lord
 
function potpot()
	({
	title: 'Big Notice',
	text: 'Check me out! I\'m tall and wide, even though my text isn\'t.',
	width: '500px',
	type: 'error',
	min_height: '400px'
		});
 
tons of people, where I grew up
 
@SterlingArcher cocopuffs
 
> Hey lets waste money by adding more expensive drugs to this
 
6:26 PM
3 mins ago, by rlemon
function potpot() {
  $.pnotify({ .. your object ... });
}
 
@SterlingArcher you need a tiny amount, especially of anything opiate-ish, to make the weed much "stronger"
 
function potpot()
	$.pnotify({
	title: 'Big Notice',
	text: 'Check me out! I\'m tall and wide, even though my text isn\'t.',
	width: '500px',
	type: 'error',
	min_height: '400px'
		});
there
 
@SterlingArcher It's nice yeah who would do something like that
 
@WTFZane you may want to take a step back and read up on how objects and functions differ
 
@WTFZane missing {}
look at my example vs your code
 
6:27 PM
Ops, i think it's there
 
@ssube Your suggestions helped me eliminate so many lines of code, awesome.
 
sorry i cant take a step back now.
 
> Here's some weed, lol jk, there's $120 worth of heroin in it LOL GOT YOU GOOD SUCKER
 
@SterlingArcher more like $5 of weed, $0.10 of oregano, and $2 of heroin to make it knock you out
 
> potpot
 
6:28 PM
@WTFZane sure you can, otherwise you're not going to learn anything and you'll continue to write bad code
 
@SterlingArcher dealers would often add a touch of coke for new custy's to make it 'better' so you'd always go to them
then stop adding it
 
How can I print out an object to the screen in the same format as when I use console.log?
 
@SterlingArcher s/heroin/coke
 
This is like just a one-time code day
function potpot() {
	$.pnotify({
	title: 'Big Notice',
	text: 'Check me out! I\'m tall and wide, even though my text isn\'t.',
	width: '500px',
	type: 'error',
	min_height: '400px'
		});
}
 
@PeeHaa I've seen both
 
6:28 PM
Where have all the trustworthy drug dealers gone
The ones that actually care about you
 
@SterlingArcher they got shot
 
@ssube WAT!?
 
@WTFZane looks better now
 
In my country, you can get high for $1
 
@PeeHaa not in the same batch, but
 
6:29 PM
That's just WTF
 
!!tell SterlingArcher urban cocoa puffs
 
@SterlingArcher cocoa puffs [marijuana] that has been laced with [coke]
 
onclick='potpot(value);'
 
How can I print out an object to the screen in the same format as when I use console.log?
 
6:29 PM
@JamesSnowy JSON.stringify(theObject)
 
@WTFZane there is no longer a syntax error. so unless you tell us what the error is, we cannot help
 
@JamesSnowy <pre>JSON.stringify(obj)</pre>
 
@Waxi excellent. Whenever you see code that looks like a copy-paste, you can probably clean it up.
 
value is probably not defined tho
 
Omg, it worked
 
6:31 PM
> Will code for drugs
 
@ssube The screen is still blank.
 
by the way, is that ajax/js? i know that ajax is javascript
but to be more specific
 
@WTFZane ajax is a soccer team
 
ajax is a cleaning product
 
6:32 PM
I think ajax is Deadpool's enemy
 
Was over here
 
Ajax or Aias (/ˈeɪdÊ’æks/ or /ˈaɪ.É™s/; Ancient Greek: Αἴας, gen. Αἴαντος) was a mythological Greek hero, the son of King Telamon and Periboea, and the half-brother of Teucer. He plays an important role in Homer's Iliad and in the Epic Cycle, a series of epic poems about the Trojan War. To distinguish him from Ajax, son of Oileus (Ajax the Lesser), he is called "Telamonian Ajax," "Greater Ajax," or "Ajax the Great". In Etruscan mythology, he is known as Aivas Tlamunus. == Family == Ajax is the son of Telamon, who was the son of Aeacus and grandson of Zeus, and his first wife Periboea. He is...
 
They renamed a while back
 
function potpot() {
	$.pnotify({
	title: 'Big Notice',
	text: 'Check me out! I\'m tall and wide, even though my text isn\'t.',
	width: '500px',
	type: 'error',
	min_height: '400px'
		});
}
 
6:32 PM
@JamesSnowy you'll need an element to put the text in. That just gives you the text representation of the object. What Sterling said about <pre> is the right direction.
 
in that code, can i put a jsp code in there?
 
for what purpose?
 
query fetching
 
do you expect it to run when the user clicks something?
because then you'll need to use websockets or xhr or something else to communicate (i.e. no)
 
i expect that the query is in stay-put and just pops when user clicks it
 
6:34 PM
if you just want to echo it to the page pre-render I don't see why not
 
@ssube Didn't really understand. Should I put <pre>JSON.stringify(myObjName)</pre>` in my HTML?
 
@JamesSnowy something like that, yeah
 
But when I do that it just displays JSON.stringify(myObjName).
 
6:37 PM
@JamesSnowy in your html put a pre element with the id poop, then in your js put poop.textContent = JSON.stringify(obj)
 
imgur.com/a/kpIzd man @KendallFrey, some people put a lot of time into these missions
 
Real life space programs laugh
 
@rlemon I put an ID on the pre and wrote as you did but with my ID instead, but it didn't work?
 
Is there any *exact* equivalent in Nodejs of C++'s `using namespace ...`?

Something that's along the lines of using "global.globalVariable", but only takes effect in certain files?
 
6:44 PM
with?
idk
sue me
 
You're getting sued
 
At least I'm getting something
 
Nah, with wouldn't be a practical workaround, IMHO.
Lol you're getting something
 
6:46 PM
@JamesSnowy if yours doesn't work, look in the console and see if it bitches about circular references
 
I've never gotten something before
This is exciting
 
Ok, cleaned up my code, but I need some suggestions on how-to do something, hastebin.com/gusevuxire.coffee (line 130 area is problem for me)
 
@rlemon No errors, lol.
 
If this is how you react to being sued all the time you have a wonderful future ahead of you, Kendall
Have no fear
 
@JamesSnowy then it must be an UncaughtException: browser hates you m8
 
6:48 PM
if (index === 0) return;
 
if( return ) index === 0;
 
if( === ) return index 0;
 
Lol I can't even imagine
 
lets you lose one level of indentation (can be done in both functions)
 
6:50 PM
@Waxi why are you spacing out every line twice?
that's so hard to read
 
@rlemon A much better story than Twilight though.
 
ohh, I found my new crab tank
cc @SterlingArcher
 
@ssube Cause I'm a noob and I want to make sure I don't miss anything lol. I don't know how to run the function again for just 1 item without making a whole new function...kinda stumped on this.
 
@Waxi split the function into two: a has the loop and calls b for each item. You can then just call b directly for a single item.
 
I made my first user login database system this week. Being that I hate databases, I'm proud!
 
6:51 PM
when in doubt, make another function
until you're making functions that just call another function
 
especially in JS, where they usually cost nothing
 
function doFoo() {
  foo();
}
^ legit
 
if we were in real life with limited inlining, that might not apply
 
return foo()
 
but this isn't real life, it's just a fanta script
 
6:52 PM
function foo(){ return doFoo() ;}
 
I think I tried this route of functions calling functions and I kept getting the stack exceeded error. Hmmm...
 
@Waxi that's not why you got that error
 
const doFoo =_=> foo();
 
stack exceeded suggests a recursion with a limiter that is logically broken
 
!!^
 
like next(count++)
 
You displeased the tiny monkey. That's why you got the error.
 
lol
 
this pleases little monkey
 
What y'all think of first encrypting a password on the client side and sending it to the server which is encrypted a further time using bcrypt?
 
6:54 PM
nah
 
@ssube Could you paste a small sample?
 
what's the point of the client-side encrypting?
 
just use HTTPS
 
^
@KendallFrey if you don't have http?
 
@Lemony-Andrew are the keys split?
 
6:54 PM
I'm not using HTTP for the client
 
crl
!!forget lazy
 
@crl Command lazy learned
 
I'm using tcp
 
use tcps
 
@rlemon Just SSL whatever
 
6:55 PM
@crl Command lazy forgotten.
 
@Waxi function a(data) { data.forEach(b); }; function b(item, idx) { /* do stuff */ }
 
Nope no idea, I'm not a networking expert so I'm just doing what I can. I'm making an Android application that connects to a node.js server
 
@Lemony-Andrew That's trying to solve an already solved problem with a broken non solution
 
but if you name your functions a and b in real life I'll send someone big to hurt you
 
@Lemony-Andrew connects... how?
 
6:56 PM
TCP
 
@ssube Ok I'll look into that, thank you much.
 
@KevinB Depends on what context you're doing it.
 
@Lemony-Andrew tcp what?
 
@rlemon What if I do alpha and bravo instead?
 
you are the worst
 
6:57 PM
Sockets? did you invent your own protocol?
@Waxi I'll probably kick you
 
@ssube no idea
 
...
 
lol
 
You are probably just using http
 
@Lemony-Andrew you don't know how you're connecting?
 
6:57 PM
@KevinB If it's to forms and you just communicate with your sever then you're better off using https. If you have peer-to-peer communication which need to be secured or you have some form of secret the client needs to hold...
 
@Waxi How many times have I told you that your variables need to be less shitty and have meaningful names.
 
I probably created my own protocol I do reinvent the wheel a lot
 
You probably?
 
@Trasiva Hey I know! I was only kidding this time around, I'll own up to that minor trolling.
 
You either have or you haven't
 
6:58 PM
@PeeHaa yeah, probably?
 
@Lemony-Andrew You accidentally a whole protocol?
 
@Lemony-Andrew How high were you when you wrote this?
 
@Zirak how's it going baby cakes?
 
I was about a tree's height
 
You're either full of shit or drugs.
 
6:58 PM
I call bullshit or insanity or both
 
I invented my own language before I even knew what inventing a language was
 
@rlemon What's hanging fruit loops?
 
@ssube Ninjad
 
@KendallFrey that's because you're a nerd
 
well of course
 
6:58 PM
@Zirak nothing. it's cold in here
:/
 
Man, I'll just keep doing what I'm doing since it's working instead of getting no where here lol.
 
@Zirak you gonna be awake later and stuff?
 
@Lemony-Andrew Nobody can provide suggestions if you don't even know what you wrote.
 
@rlemon Maaaaybe. Ping me, maybe I'll be conscious
 
probably in around 3 hours
 
6:59 PM
 
I made a thing, that needs some assembly still
 

« first day (1977 days earlier)      last day (2986 days later) »