« first day (907 days earlier)      last day (4035 days later) » 

user2157210
1:00 PM
i dont want to code the app in js
 
@Nexxpresso Yea, that's back from 2009 better follow the official docs.
 
user2157210
but inject the js into the webview like a userscript would
 
So Mozilla Rust, is their attempt at taking a stab at Google Chrome? (I realize Go is a better comparison but the names are less ironic)
 
Wait, so you don't want to bind a JavaScript function to an Android method?
 
user2157210
no i want to make use of a bookmarklet kinda like this
 
1:02 PM
@rlemon No, Mozilla's Servo at Chrome's Blink.
 
but those names are not ironic at all
Chrome : Rust
^ ironic
if Mozilla named it 'Stop' that would have been funnier
 
Google: Go, Mozilla: Stop
 
In the past, there was a lot of chrome in Firefox : developer.mozilla.org/en-US/docs/Chrome
 
HAMMERTIME!
 
user2157210
1:03 PM
i have a site open in the webview and i got a button below which injects js which should click a button on the site and then get some attribute out of an iframe in the site
 
@rlemon I don't think so. It seems they do want to drop the C cousins in favour of something better (very understandable; Google does it as well with Java and later with Go).
 
user2157210
this works perfectly fine when tested with a bookmarklet on my pc
 
@rlemon Dart :P
 
And for the record, Servo is not exactly new.
 
Wait, does Rust run in a vm?
 
1:04 PM
So Mozilla isn't just trying to swing at Google
 
@Zirak I was mostly saying this in jest. The names are funny when compared to eachother.
 
@BenjaminGruenbaum No, it's compiled.
Well, actually, that's a nice question.
 
There's the difference from Java
Like Go
 
They want comparable speed to the C family
 
their docs pretty well explain why they feel the need for Rust. And I agree. c++11 is much improved, but there needs to be a massive language overhaul because of modern hardware and design patterns.
 
user2157210
1:05 PM
@OctavianDamiean but i cant even get an alert get up sgowing on the site
 
user2157210
thats probably because i am too dumb to JS
 
'mornin
s
 
I think once JavaScript gets co-routines or routines in general, it's complete as a language
That's the only thing that's truly 'missing'
The rest is just improving APIs
 
And they get rid of while
 
@Nexxpresso I still think that webView.addJavascriptInterface() is the way to go.
 
1:07 PM
(Assuming proxies and stuff)
 
Whadya mean? Why is there a need for co-routines?
oh, sorry, I confused them with something else
 
@Zirak Because stuff like yield is awesome, and it lets you do a lot of crazy stuff.
Also, I want to be able to hook on a function ending
 
user2157210
@OctavianDamiean i got this already
 
Generators/enumerables will be nice.
 
user2157210
maybe i just do not seem to understand how to use it
 
1:08 PM
I'd really like to be able to do something like
 
maybe they should beef up eval()
and make == = === (this one isn't sarcasm)
 
@rlemon they wanted to make == === but microsoft didn't want to
 
@rlemon You mean == !== ===
No wait, I'm confused now
 
@Neil no, you are out of your element.
 
async function someDbQuery(){
   //stuff
   await db_access_stuff()
  //some more processing stuff
  return result;
}

someDbQuery.continueWith(processQuery).continueWish(sendResultToUser).start()
^ Amazing C#'ish syntax
 
1:10 PM
You know what I'd really like? typeof null !== 'object'
 
@rlemon Ouch, that was unnecessary
 
That just annoys the hell out of me.
 
unnecessarily necessary
 
typeof is broken, also, the typeof key word is stupid
 
My favourite is typeof NaN
 
1:12 PM
yea
thats annoying
well not really annoying as it is stupid
 
Stuff should not throw error on missing reference , just evaluate to undefined
 
Would be nice there were an object function getType that you could override
 
@BenjaminGruenbaum That's just syntactic sugar for callbacks.
 
@BenjaminGruenbaum Silent fail? Yugh.
 
@KendallFrey Either you do weak typing, or you do strong typing, but pick one
@SomeKittens It's just an example for something that is easy and nice to do with generators, the main thing was async/await not continueWith, that part is easy to implement
 
1:13 PM
I like average typing. not weak like those cheerleaders from highschool but not strong like the sr. football team that locked you in a locker.
 
@KendallFrey That makes sense once you understand NaN
 
Oh, I do understand NaN.
 
@rlemon Metaphor police want to have a word with you.
 
I'm a pro on IEEE floating-point.
 
Also, unlimited precision integers are needed
 
1:14 PM
@Neil Metaphors are like similes?
 
typeof object === 'stereo'; //Stereotyping
2
 
More generally value types
 
@BenjaminGruenbaum STRINGS FTW
 
@BenjaminGruenbaum I disagree because of the global scope.
If you remove the implicit globals, then I'm with you.
 
typeof heart === 'stereo'; // damn you SomeKittens, this is all I could think of now that damn song is stuck in my head.
 
1:15 PM
20% to go on the hard disk check. \o/
 
@Zirak There shouldn't be a global scope to begin with
@Zirak the entire concept of a 'global' scope is wrong, everything belongs somewhere.
 
Then call it "globalest" scope.
 
not me :(
 
@Zirak I'm fine with global context, but you shouldn't be able to assign anything to it, only function scope
 
1:17 PM
@BenjaminGruenbaum How would you go about that? namespaces?
 
Someone once told me I belong hanging from a tree... I think he meant he wanted to kill me. I just took it as I needed more colour.
 
var x = 5; // shouldn't work
 
Wouldn't be a terrible idea, actually
 
(function(){
   var x = 5; // cool with that
}();
 
Point is, because implicit variables are not scoped to the innermost scope but the outermost, I want to be yelled at when I try poking something which'd leak.
 
1:17 PM
@BenjaminGruenbaum And yet, the anonymous function is global :P
I suppose it can't be helped
 
@Neil How would you access it?
@Zirak That can be done ahead of execution with a tool like JSHint
 
@BenjaminGruenbaum Or, everything is implicitly wrapped.
 
That's also ok
 
@BenjaminGruenbaum JSHint should be more about style, not an error checker.
 
@BenjaminGruenbaum Meh, don't know, but it would exist in some form.. is v8 intelligent enough to remove anonymous methods that can't be run more than once?
 
1:18 PM
Crockford has a fair lecture about this, called "security in the web" or something
@Neil Probably, I'm not proposing an alternative, that was to illustrate scoping
 
Would be better if it were a little more formal.. like namespace { var x = 5; }
 
where a namespace could be anonymous or labeled
 
does it exist an event to trigger when a window variable is created?
 
Am I the only one not in favour of block scope?
 
1:20 PM
@Zirak I'm against block scope too :)
 
Would you use javascript if you liked block scope?
 
Nope, I don't like it either.
 
@Neil What I'd like is for stuff like window to be injected to an anonymous function, and use it from there. Think of the main execution point like a WebWorker which has an injected reference to window
 
hurray, I can be insane with other people
 
is it possible to trigger change on jquery slider, i have tried $('#theSlider').slider().trigger('slide'); and 'change' ?, Anyone ...
 
1:21 PM
I think basic concepts like scopes, scope chains (and block/context scope belongs in there too) should not be entirely changed
 
I mean, block scope is OK, it's just a lot less flexible
 
it would ultimately change the whole language concept
if you don't like ecmascript, don't use it
 
@Zirak I'm not against it, but it wasn't something I wished was there
 
Function scope with anonymous function literals is just much more powerful, it's just hard for newbies to get
 
@BenjaminGruenbaum So like a copy of window to avoid name collisions?
 
1:22 PM
or join the dart wierdos :p
 
if(stuff){function(){
   //tada, I simulated block scope
}();}
 
@AmaanCheval Yeah, I'm not strictly against block scope, but it's not something I miss or want to see forcefully introduced.
 
@BenjaminGruenbaum And such beautiful code too o_O
 
@Neil You should see the Crockford's lecture I linked to, at some points he talks about that stuff. Not a copy of window, just a reference, and just to one execution point
 
@jAndy in a short sentence, what actually is ECMAScript? please . . .
 
1:23 PM
@Neil I can do this in a more 'pretty' manner, I just don't need to 90/100 times
@Connor Standard JavaScript is based on es5.github.com
 
@Connor A. Programming. Language.
;)
 
@Connor A great language, my Life, the light..
you choose
 
@Connor ECMAScript is the formal name for javascript.
 
@jAndy so its javascript. end of??
 
oh the question was serious
 
1:24 PM
@BenjaminGruenbaum It's proof of feasibility, I know. Who would actually write that everywhere?
 
It's also one of the most badly chosen names in human history.
 
@OctavianDamiean Remember that shell scripting problem I was having last night?
 
this room is so cursed by trolling, I always assume trolls
@Connor yes, its the official name for JavaScript
 
Hey, @jAndy! Guess what?
 
@Neil I use them plenty of times actually, I just don't scope on blocks, I scope on logic
 
1:24 PM
@AmaanCheval bla :p
 
user2157210
@jAndy you are the troll
 
@jAndy :D
 
@jAndy i knew it had something to do with javascript :D
Can anyone suggest??
4 mins ago, by Connor
is it possible to trigger change on jquery slider, i have tried $('#theSlider').slider().trigger('slide'); and 'change' ?, Anyone ...
 
@BenjaminGruenbaum Right, like the rest of us
 
please . . . .
 
1:25 PM
function doSomeComplexAction(){
    //prepare for stuff
    (function processFirstPart(){
       //handle logic that does processing first part here
    })();
    (function processSecondPart(){
       //handle logic that does processing first part here
    })();
    //do more calculations
    return result
}
@Neil ^
 
@Connor might want to make a question on SO proper
 
room topic changed to JavaScript: All about ECMAscript and its various libraries. Please read the rules: rules.javascriptroom.com [ecmascript-5] [javascript]
 
I can see that. Creating block scope to imitate ifs in another language is psychotic
 
@Loktar can't
 
When I have code that has a scope logically , (not because it is in a certain conditional) , I scope it like that. Pretty much when I need the functionality and scope once but it's still very different
@jAndy Add -jQuery to there :P
 
1:27 PM
@Connor Banned from doing that?
 
@Neil yea its idiotic and should not be used like that
 
room topic changed to JavaScript: All about ECMAscript and its various libraries. Please read the rules: rules.javascriptroom.com [cheese] [ecmascript-5] [javascript]
I'm hungry.
 
@Neil Yeah, it is, but 99% of times you don't need block scope, it's stupid
 
GET THE WALKING DEAD NAAAOO
 
eats cheese
room topic changed to JavaScript: All about ECMAscript and its various libraries. Please read the rules: rules.javascriptroom.com [ecmascript-5] [javascript]
 
@AmaanCheval yes for this question, stackoverflow.com/questions/15798956/…
 
0
Q: How to check div tag contains partial view?

INFOhUbAs we know window.onload event will fire only when the page is completely loaded. I want to perform some action when a partial view loaded completely into div tag how to check that? like : $('divID').__ ??

 
@BenjaminGruenbaum I like to think that everytime I need code blocks an object to have its own scope, I need to start thinking of it like its own object
 
When i do variable = new MyObject, can i get the variable name from the inner object?
 
1:29 PM
@SomeKittens Yea
 
@Neil Pretty much, yeah. I'm not sure about the choice of the word object although in JavaScript functions are objects so that fits
 
rofl... thats the most patient and calm guy I've ever seen
is that for real :P
 
@BenjaminGruenbaum Well object in the sense of "object-oriented programming"
 
I'm thinking of making a screencast for Express/Node, on making a simple user registration / signin using bootstrap, thoughts?
 
@Mike that's called the reference, and no you can't get it in js. That'd be a pointer in C
 
1:30 PM
Groupings of logic according to an set of behaviors you expect that grouping to have
 
3
A: Set alias within bash script

Austin PhillipsIt's likely a problem of when the alias is expanded. The bash man page has the following to say: The rules concerning the definition and use of aliases are somewhat confusing. Bash always reads at least one complete line of input before executing any of the commands on that line. Ali...

 
@FlorianMargaine ok thank you :)
 
If you were curious
 
I'm off to get good Coffee, bye. @Neil I mostly agree
 
@BenjaminGruenbaum Happy coffee break
 
1:31 PM
@MikeBoutin variable, that's what you called it...
 
@BenjaminGruenbaum Benjamin, that's how you're called
 
@BenjaminGruenbaum G'coffee
 
@MikeBoutin Give me a circumstance in which you're dealing with a variable but you don't know how to access said variable by its name?
 
@Neil when you instanciate an object and make a callback in the function from a outer script
 
You want a string that you can use in eval and get the value for that variable? Is that what you're asking?
 
1:35 PM
@SomeKittens huh, that's interesting.
 
@MikeBoutin instantiate (I know, I used to make the same mistake)
 
function GmapLocalisation(apiInfos){
	this.options = apiInfos;
	this.apiKey = this.options.apiKey || console.error('The api key must be defined');
	this.sensor = this.options.sensor || true;
	this.mapId = this.options.mapId || console.error('The container ID must be defined');
	this.map = '';
	this.mapOptions = '';
	this.markers = [];
	this.coord = [];
	this.googleCoord = [];
	this.googleLoaded = false;
	this.test = '';

	this.createScriptTag('gmapLocalisation.render');

}

GmapLocalisation.prototype = {
this.createScriptTag('gmapLocalisation.render');
 
Neodymium is so cool
ANTI GRAVITY :D
 
i would like to get the reference name in it
 
@MikeBoutin Reference name?
 
1:36 PM
nvm
 
you want 'GmapLocalisation'?
 
Seems you're already passing the name of the callback
 
i want
gmapLocalisation = new GmapLocalisation();
gmapLocalisation
but if i called it poop
i want poop
2
instead of
you understand?
 
so you want a variable to have it's own name as a property of itself.
 
1:38 PM
Why?
 
kind of
dunno
 
If you renamed the variable, you'd know how it'd be called
 
var foo = new Bar();
foo.name = 'foo'; // this is the best solution
 
@MikeBoutin Nice.
 
@rlemon this can be great
ty
 
1:39 PM
any jQuery guru around?
 
ಠ_ಠ
 
@DineshVenkata jQuery is just a JS library. There are JS gurus here.
 
@FlorianMargaine any guru will do
 
var foo = 1;
var keys = Object.keys(window);
alert(keys[keys.length - 2]); // "foo"
^ don't do this.
 
just ask your question...
 
1:41 PM
but it works :P
 
it seems I'm stuck with very basic issues
 
user2157210
Gurus all arround i heard?
 
I'm loading a group of html files in various divs in a single html file later on when I try to access a input field from one of the files loaded using its id the script is not able to identify the input field @FlorianMargaine
 
why are you talking to me?
 
user2157210
you are the guru
 
user2157210
1:44 PM
..
 
and you probably want $(document).ready()
 
Jade or EJS?
 
user2157210
@Darkyen Master of indian destruction are you here?
 
@FlorianMargaine I'm using $(document).ready() to load these html files
 
^ that makes no sense
 
1:45 PM
OMG, Nairobi - 84 minutes to make a big mac
The Big Mac Index is published by The Economist as an informal way of measuring the purchasing power parity (PPP) between two currencies and provides a test of the extent to which market exchange rates result in goods costing the same in different countries. It "seeks to make exchange-rate theory a bit more digestible". The index takes its name from the Big Mac, a hamburger sold at McDonald's restaurants. Overview The Big Mac index was introduced in The Economist in September 1986 by Pam Woodall as a semi-humorous illustration and has been published by that paper annually since then. Th...
 
$(function() {});
<<
>>
 
@TemporaryNickName that is how long it would take an employee to earn enough money to purchase a big mac. not how long it takes them to make one.
 
@rlemon I prefer EJS because it's closer to HTML, thus no new language to learn
 
sold
 
@rlemon Jade, it's exactly what HTML should have been
 
1:50 PM
bastard
ejs++
 
hi, guys, I come in because I saw a lot of people here... can I ask a language question here? (English)
 
jade++
 
You really don't need to learn much more
jade++
 
don't ask to ask just ask.
asking to ask is redundant because you just asked.
 
@Nexxpresso always and forever
 
1:51 PM
@Kent sure
 
@rlemon jade
jade jade jade
 
@Kent Let me translate for @rlemon. He means "yes"
 
user2157210
@Darkyen you can java?
 
many programming language has "join", to join a list/array with sep, say [1,2,3,4].join('-') became 1-2-3-4
 
@Nexxpresso last i tried i ended up throwing coffee cups out of my house because they reminded me of it
 
1:52 PM
if the result is 4-3-2-1, can I say, it was joined "reversely" ?
 
user2157210
@Darkyen so you can
 
hey you're rlemon again!
 
the word "reversely" is my question
 
missing npm dependencies on local computer, time to write some pages on github >>
 
1:52 PM
@Kent "in reverse"
 
@Nexxpresso just a puny lil enough to pass my exams
 
@Kent are you asking how to reverse the array then join it?
 
no no, i am no asking how to do it
 
@eazimmerman He's asking about whether "reversely" is a word.
 
user2157210
@Darkyen why is nothing working
 
1:53 PM
It's not. Use "in reverse"
 
@DineshVenkata from english import grammar
@Nexxpresso cause its java
 
!!/google "define reversely"
 
user2157210
@Darkyen but the documentation does the same thing as me
 
user2157210
and for everyone else it works
 
1:53 PM
@Darkyen didn't get you
 
^ ... thats what i wanna say about what you posted
cant get wht you trying to mean there
 
ok, say I have a file with 5 lines, if I say, from 2nd line join 2 (count) lines in reverse. the result would be
1
432
5

or

12
3
4
5

?
 
@Kent 'reverse' is ambiguous. This assumes the original order is static, but ascending and descending orders are both quite valid. So in lieu of 'reverse' or 'normal' I would say 'These number are in Ascending / Descending order'
 
I don't know how to describe this. maybe "reverse" and "backwards"?
 
The lines are seen as strings and ordered in ascending or descending order.
 
1:56 PM
@rlemon strings, could be anything
 
but if they were ordered as numbers 432 > 5
 
not sorted
....
the original file is:
1
2
3
4
5
i hope this time it is clear
 
regardless, sorting and ordering generally falls into the category of ascending or descending orders, or some strange criteria which you would have to define yourself.
that is ascending order.
5, 4, 3, 2, 1 is descending order
 
ahr... ...
@rlemon you could think that they are line numbers
 
if this is not what you want then I'm sorry you need to better clarify your request.
doesn't matter what the list is comprised of. if you are ordering it in the way that it looks like you are ordering it that is called 'ascending' and 'descending' orders.
 
1:59 PM
it is nothing to do with tech. just want to know the right way to describe this.. ok, I try to make the example better
 

« first day (907 days earlier)      last day (4035 days later) »