« first day (1384 days earlier)      last day (3568 days later) » 

10:00 AM
@monners Been playing around with it more?
 
@MoshMage you can react to link clicks, but what follows is outside your visibility
 
@SomeGuy Yeah, have a really funky project at work at the moment. Learning a lot
 
You're using Illustrator to help, right?
 
@JanDvorak thank thee.
Also, who wrote the javascript room rules? 'cause I just lost.
 
@SomeGuy Yep, althought there's something to be said for generating funky SVGs programmatically
 
10:02 AM
I might try it out at some point
 
It's surprisingly powerful. Like flash, but semantic and awesome
 
The rules say that There is no need to ask to ask a question.
Does that mean I am allowed to ask if it is possible to ask to ask a question?
 
@MoshMage rlemon did, IIRC
He wrote most of it, anyway
@zigi No, that'll get you banned
 
@zigi you haven't read the rules, have you?
 
@SomeGuy @rlemon? That asshole?
 
10:04 AM
I have
 
Ya know I heard he's Canadian
 
that's why I am asking about the rule
 
@monners inb4 flag
 
lol, ya reckon?
I wonder how many of my comments have been flagged
 
but there is a really thin line between what's acceptable and what's spam and it entirely depends on the mood of the owners
 
10:05 AM
@zigi Not really.
 
@zigi That's why we have several room owners
 
so what are the official constraints?
 
The room isn't run on the whim of a single owner
It's run by the community
 
@SomeGuy Well, you would say that
 
yes but some actions are taken by the currently active owner
usually
 
10:07 AM
There are usually 2-3 present at any point
 
aren't they
 
I'm an owner, have my actions offended thee?
 
not really
 
Your actions have offended me
 
you and dvorak
actually you guys are really cool and I can't say I feel that you are the owners (so not showing dominance)
 
10:08 AM
@JanDvorak sorry to nag you again on this but, it just hit me: Even if i hook to the ajax calls and then repeat those calls to go back -- I still need a parser to parse the information back to the previous place, right? :| (I completly forgot about this)
 
which I think that's how it should be
 
@Meredith My typical method of recompense is sexual favours. that work for you? jkjk
 
josh you have to renew your domain man
 
Aaaaaaand I immediately regret saying that. I'm sorry Meredith. I'm just a bad person is all.
 
Someone else is welcome to accept it on my behalf
 
10:09 AM
@zigi Fuck, I know. Next pay check
 
@MoshMage I can't understand "repeat those calls to go back". Also, define "parser", "previous place"
 
@MoshMage well you parse it anyway every time right?
 
@monners You use GoDaddy?
:O
 
it's not like recources you have to buy
I use dynadot.com
 
@SomeGuy I know! I was young....
 
10:11 AM
well you still are
 
The funny thing is I renewed my domain that I never use, but completely neglected my primary one
 
it's not like you are 60-70
 
butt.ninja is taken
 
Although it's definitely due for an update
 
No other domains are worth using
 
10:11 AM
@monners priorities, priorities, priorities...
I registered
indicaponian.com
a few days ago, cause I liked the sound of it
 
@monners I've paid for 2 of my domains that I haven't used for 2 years now. Just a reminder of how lazy I can be
Where do you host?
 
does anybody here worked with jqGrid before?
 
me?
 
@ImanMirzadeh 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.
 
GoDaddy?
 
10:13 AM
are you asking me?
 
Na, @monners
 
ah,
 
@SomeGuy Nah, a place in Texas
webfaction.com
they're not the cheapest, but their customer support is fucking amazing
 
fuck yeah, do they put barbecue sauce on the servers there?
 
Yes, I believe they do
 
10:14 AM
haha :D
cause they be grillin'
@monners Goodmornin' maam, how can we help you today, for lost cow, press 1, for utp cable bitten by a horse press 2, if you got shitdrunk and tripped on your router last night - press 3
 
For some strange reason all traffic from Mexico gets met with a 404...
 
I was considering just using Heroku
 
@SomeGuy I set all this up when I was about 3 months into learning web dev
So, you know, don't take my actions as any kind of guidance
 
will try (possible WOT) so user clicks on a button, that button triggers a AJAX call; I save all the settings from that ajax call (a) and then the ajax call gets done. On completing that ajax call, the data is parsed and "thrown inside a div". The user then goes on to click another shenanigan and makes yet another ajax call (b) which in turn gets saved and completed and consequently its data glued to a div again.
Now the user pressed on the cancel button, I go to the saved ajax calls and call out the (a) ajax call. Now, I don't have any clue what the "on complete" function does from that ca
 
@monners Oh, yeah, I was just curious
 
10:17 AM
@MoshMage you do realize you are asking too many questions and we can't let you leave alive
 
/me sepukkus'; would you answer me in my dying event? xD
 
@MoshMage Sounds like you should look into pushState
!!tell MoshMage mdn pushState
 
OH! Caprica is back. Hello, @CapricaSix :)
(idk why, i love that bot)
 
so does that mean that Facebook for example could use this information to uhm know that you like watching porn for example?
wow, they can even modify it
 
10:20 AM
Facebook knows when you watch porn
 
:/
so saad
 
Of course
 
it's good that I don't...
 
@Meredith If they're watching me then they'll need more servers
 
... do it in the browser
 
10:21 AM
@Meredith unless you use another browser to do so and don't login to fb with that browser ;D
 
@zigi If you read the actual article, you'll realize that the API doesn't give people access to your history
 
I know, I've tested it already
 
It allows them to manipulate the history they create
 
@MoshMage They STILL know
 
@MoshMage cookies brah, cookies
 
10:23 AM
Hello guys one question. How to manage multiline strings in JS? I get my strings from php and i need to get rid of line breaks to prevent errors.
 
 
\n = new line
 
@BikerJohn json_encode
 
@BikerJohn something like result.replace
 
@zigi Took a while to get there. lol.
 
10:24 AM
haha :D
yeah, my jokes are a tad off
 
38
Q: How to pass variables and data from PHP to JavaScript?

Second RikudoI have a variable in PHP, and I need its value in my JavaScript code. How can I get my variable from PHP to JavaScript? I have code that looks like this: <$php ... $val = $myService->getValue(); // makes an api and db call $> I have JavaScript code that needs val and looks along the...

 
thanks guys :)
 
who passes variables from PHP to javascript like this?
lol, it's amazing what people do
 
You found me!
 
hahaa :D
 
10:27 AM
var orangeCost = function(number){
var number = 5*number;
console.log(number);
}

orangeCost(6);
 
@AbhishekHingnikar In any other context, yes. It'd look good
 
@blackbee You mean the variable = function() thing?
 
awwff.. here I was thinking I had an easy solution to a damned problem.
 
@monners no the background effect
 
10:29 AM
@AbhishekHingnikar lol, yeah. I got that
And yeah, it's nice. Two layer scale I guess
 
it'd look better with the soldier zooming IN
 
no, var number = 5 * number. so number was in the parameter list, so it got initialized first and since it has higher preference var number doesnot override it during "enter the execution context phase"
@AbhishekHingnikar the call of duty looks like that Matt Daemon new movie ... with bald head
 
@blackbee number is a variable like any other
 
but its in the parameter list too. I wonder ,if this would have worked in C
let me check
 
It would
 
10:32 AM
@SecondRikudo would push and popstates help me through the form-posts and whatnot? (I just noticed how hard it will be implementing this so I'm making a sanity check before starting 'cos no one asked me to do this, I just have nothing to do and that would help everyone)
 
@MoshMage the *State functions require you to remember what your page looked like before the latest state was pushed.
You provide the new state with a reversal function, which is supposed to reverse the new state.
Don't redeclare int
 
then it would work. but in the js the number was redeclared with var .. i guess
 
hmpf. This is just insane. I should've coded this while I was high and the idea stroke me. Now I think it's all too much hassle :|
 
wait c in this room ?
 
10:37 AM
@AbhishekHingnikar close enough to javascript
 
@JanDvorak elAborate
 
Not sure if the flagged message is funny, or that it was flagged
 
0
Q: Promises - catching all rejections in a Promise.all

user2468170I have this dummy code var Promise = require('bluebird') function rej1(){ return new Promise.reject(new Error('rej1')); } function rej2() { return new Promise.reject(new Error('rej2')); } function rej3() { return new Promise.reject(new Error('rej3')); } Promise.all([rej1(),rej2(),r...

 
meh. screw this. The app was not thought to have a proper cancel-activity and I'm not going to change this beast of a program on a whim.
 
@AbhishekHingnikar C is also dynamically typed :f
 
10:43 AM
@BartekBanachewicz hahahaha
 
If the app was only ajax, and followed some kind of rulle, I could do the *States trick; Like it is right now is damn near impossible as some of the links are normal http-gets, others are form-posts and other still are ajax get/posts
 
except for c is like um odin and javascript is pretty human
 
so, yeah. Thank you for all your knowledge but I'm not commiting suicide after all
 
@SecondRikudo ..
 
@AbhishekHingnikar both are bad really
C is just badder :D
 
10:46 AM
and also bad-ass ?
i kinda have respect for c.
 
I don't.
It's a shitty language.
 
I also use it to troll applicants if i am interviewing
the moment they say their favorite language is "C"
 
c is cool , but then there is c++ ...
 
i have an evil laugh inside me :D /though am not a c guru or anything but still
 
@Feeds coolstuff.
 
10:48 AM
@BenjaminGruenbaum hi
 
@BartekBanachewicz C has its merits, so does JS.
 
1 min ago, by Bartek Banachewicz
It's a shitty language.
the fact that it has its merits is irrelevant.
 
@BartekBanachewicz sure it is buddy.
 
Never write in C if you don't have to.
 
is there any doubt that C is THE most important programming language ever ?
 
10:49 AM
of course it's not the most important PL ever.
 
hail to Kernighan & Ritchie
 
C was created more or less like JS
a pragmatic response to business needs
 
I doubt that
its was a more human related response/need to machine code and assembly
 
what it was is irrelevant
 
C was B actually
 
10:51 AM
the goal and environment has a massive impact on the language
 
C's big thing was recursion
 
then there is D also
 
no other language could do that until then
 
@Neil Um what?
recursion is trivial in assembly, for one.
 
10:52 AM
@BartekBanachewicz It's not really recursion if it is just a loop
 
all true, but C (shortly after B) was pretty much the first mainstream language with human readable semantics and syntax
which was the great success
 
It was kind of a big thing then, most programmers at that time either thought recursion was glorious or they thought they'd never use it
As it turns out, recursion is used, and it is not that important
 
recursion overrated - recursion overrated - recursion overrated - recursion overrated - recursion overrated - recursion overrated - recursion overrated too much recursion
 
I don't get the discussion. Recursion is just a design pattern based on function call
 
the discussion was about the success of C I guess.. but I'd agree that recursion wasn't responsible for that success
 
10:56 AM
@Neil wait what?
@dystroy wait what?
 
Do you have languages with function call, function scope and no recursion possible ?
 
@BenjaminGruenbaum What wait what?
 
I don't see how anyone wouldn't use recursion at least a few times in their code... There are scenarios that call for it.
 
What I mean is that it was given a lot of hype.. a lot more than it deserves
 
The only way to avoid recursion at times is to keep a stack and manage stack frames yourself.
 
10:58 AM
Recursion in most languages is at best as fast as using a loop, but usually slower
 
@Neil it's fundamental. It's not "hypyed" any more than integers are hyped or graphs or quicksort.
 
Most don't make it simpler to understand, though it does have its moments
 
lol @ quicksort
that never was hyped really :P
 
@jAndy just like recursion.
 
@BenjaminGruenbaum What is important is what allowed recursion to happen, function stacks
 
10:58 AM
agreed
 
People think recursion is hard so they make excuses to not use it
 
@Neil "just a loop"? what the hell are you talking about? Have you ever coded a recursive assembly function?
 
It's a thing. It's useful to observe a problem as decomposable to smaller instances of itself.
 
deep *-ing without recursion is painful
 
you can re-create any recursive call with a loop anyways
 
10:59 AM
Lots of things are painful without recursion.
 
you can't re-create any loop with recursion tho
 
@BartekBanachewicz So you don't use goto?
 
@jAndy wat? Of course you can...
 
of course but you don't get a lot
 
hoi, am i right or wrong ??
 

« first day (1384 days earlier)      last day (3568 days later) »