« first day (1874 days earlier)      last day (3296 days later) » 

22:00
@DemCodeLines yes. And I'm asking you what your code is on this side.
@AwalGarg: I want to set an onload handler to the thingemybob that holds a page's global topmost window-object, exactly like an iframe.
user1596138
Wait a minute!! @BartekBanachewicz the glow plugs only activate when the engine is cold right? ;P
user1596138
Diagnose coolant sensors.
It's all routes:
@GitaarLAB then the new_win you get from window.open can do that.
22:00
var express = require("express");
var router = express.Router();

router.get("/", function(req, res, next) {
  res.render("landing", {
    title: "Express"
  });
});

router.get("/:name", function(req, res, next) {
  res.render(req.params.name, {
    title: "EverMade"
  });
});
router.route("/partials/:name")
  .get(function(req, res, next) {
    res.render("partials/" + req.params.name, {
      title: "Express"
    });
  });

router.route("/auth/:name")
  .get(function(req, res, next) {
    res.render("auth/" + req.params.name, {
      title: "Express"
    });
  });

module.exports = router;
@AwalGarg do you understand what I meant when I said "learn http" now?
@Jhawins kinda
@FlorianMargaine I did from the start, all I am saying is it just isn't very optimal.
user1596138
It's not `if (key.isOn) { glowplugs():}`
It's `if (key.isOn && engine.temp < engine.glowPlugMinTemp) { glowplugs();}`.
Just a thought
@AwalGarg: how? All I'm getting with window.open's return value is a reference to the global window object, and therefore I'm setting something on the page that is loaded instead of on it's container.
(like with an iframe).
22:01
@Jhawins you almost made that sound easy
@GitaarLAB now you do new_win.onload = function () { ... }
@AwalGarg your suggested solution doesn't sound like you did :)
@FlorianMargaine So you see something wrong in that code, what is it?
@DemCodeLines anyway, if you go to /welcome/foo, a request is sent to the server, right?
22:03
@AwalGarg : yes, and if I do that, then I set an onload method on the window object inside the container. But I wish to set an onload method on the container itself.
user1596138
@BartekBanachewicz yeah lol Idk how you would do that Idk how that thing's setup... If you're set on figuring it out and not taking it to a shop I would genericify your search a little. "renault 1.5 dci no glow plug light", I'm seeing TONS of results
@DemCodeLines is there an express route for /welcome/foo?
My thinking went: "Well, normally it wouldn't find anything after /welcome/, but since I specifically defined /welcome/login, I expect it to find it.
user1596138
It will be the same basic circuit in every model with that motor.
@GitaarLAB the container has no load event. The window opens synchronously, and thus load happens just after the function call returns.
22:04
@FlorianMargaine See here is the problem. I had it set up like that and was here a couple days ago. Someone told me that I was not supposed to do it like that.
@DemCodeLines I don't see /welcome/login in your express code.
@DemCodeLines well, learn HTTP. It's request/response. If your server doesn't know how to serve the response, because it couldn't find a route for it, it'll return a 404. It's as simple as that.
I had /welcome/login, /welcome/signup all defined as express routes, but then this guy over here told me that I should be defining these routes in angular, not express.
literally, "route not found"
@AwalGarg so, 'window.open' containers have no onload event like iframe containers DO have one?
@DemCodeLines yes, but then you must configure your server to serve all these paths to the same html page that includes angular
user1596138
22:05
Some people said they found a bad relay in the glow plug box.. If they're the same pinout you can just swap relays around and see if a different one works
(now I'm using the word container to try and end the confusion with window).
user1596138
Either way good luck man
user1596138
!!afk home time
@DemCodeLines because HTTP.
!!afk home
22:06
!!afk Murdering the code.
!!are you alive?
@GitaarLAB iframe.onload is a shortcut to iframe.contentWindow.onload (not really, but in effect, yes)
@Jhawins hmfph I think I know which one is the plug unit
@rlemon?
i might have accidentaly damaged it
it's very close to the accu
22:07
@AwalGarg That does NOT appear to be true, and I've tested this.
(which was an eyeopener for me).
>This is a black unit attached to the side of the battery tray - you can see it clearly...Check it carefully for loose / broken wires and power to it before replacing it.
!!are you alive?
@FlorianMargaine Indubitably
@KendallFrey ^
22:08
Didn't expect that to work
@GitaarLAB explain
@DemCodeLines what the person meant is that you should have a single route, /welcome.*, that serves the same HTML page, that includes angular
By the way, I realized another problem. The hashtags and anchor links. If set HTML5Mode, then a link like <a href="..."> no longer redirects properly.
and then you let angular manage the subroutes. But your server needs to serve all these urls anyway.
I just decided to put the following:
router.route("/welcome/:name")
  .get(function(req, res, next) {
    res.render("welcome/" + req.params.name, {
      title: "Welcome"
    });
});
22:11
you still don't understand.
@AwalGarg If I set an onload event to an iframe element, it will fire every time when the content of the iframe loads of navigates to a different page. On top of that, I can set 'window.onload' to a function (in the pages that are loading) and they will work as well (they fire before the iframe element onload handler by the way).
!!afk driving the boss home and he's not getting off his ass to leave work.
router.route(/\/welcome.*/)
  .get(function(req, res, next) {
    res.render("welcome");
  });
});
Obviously, the iframe onload handler is persistent, the global window object (of page loaded in slave iframe) will reloaded on every page load in the slave.
They exist simultaniously.
As I said: reference_to_iframe_element.onload !== reference_to_iframe_element.contentWindow.onload
@GitaarLAB That is correct indeed. Initial setting of the HTMLIframeElement..onload maps it to ..contentDocument.onreadystatechange
22:14
@AwalGarg: now that's interesting!
@FlorianMargaine Here's the ultimate plot twist: I had :name in there because /welcome/login should pull up the login state. However, another state exists! /welcome/signup should be bringing up the signup state on that page.
@AwalGarg Then you say: reference_to_iframe_element.onload === reference_to_iframe_element.contentDocument.onreadystatechange?
@GitaarLAB I now see what you want. You can easily write our own custom event with the available methods. You seem to know enough to do that on your own. Listen for contentWindow.onunload and emit instances of CustomEvent on top
@DemCodeLines yeah you don't want to learn, I'm done with you
@GitaarLAB no, that only happens "in-effect".
22:16
@FlorianMargaine I'm sorry, I'm not trying to ignore you. I had identical code last time, then that guy came and told me where I failed. So I threw everything out and started over. Maybe I am missing something there.
Error 404 occured, I will call the maid (@Zirak)
Looks like Cap and @DemCodeLines are facing the same problem :P
!!what is wrong with you
@AwalGarg : that is one of the work-arounds I was thinking about, yes! But it feels so stupid compared to the iframe where I get a container.
22:17
ok...
@GitaarLAB window.open is not to be used, in simple words.
@AwalGarg So I wanted to really confirm there was no way around it (which is a darn hard question becouse the overloading of the meaning of the word 'window').
There is no inbuilt way, yes.
crl
crl
I'm using sessionStorage to communicate with an iframe (same domain), lazy-ass solution
!!tell crl mdn channel messaging API
FlorianMagazine, looking at the express code you provided above, how are you determining which module to show based on URL? it seems to be rendering welcome.ejs no matter what the parameter. That's fine, but I still don't understand how server is supposed to understand which state to bring up. Mostly because I can't see the code for it.
@DemCodeLines this is angular's job to do that.
Joe
Joe
hows it going JS
crl
crl
@AwalGarg know about that shit.. but I don't really want/need it
@AwalGarg: thanks for taking the effort to 'see through' the overloaded word 'window' and understanding my question (which once you understand it, is a simple one).
22:23
@crl edit that, it's annoying
crl
crl
@FlorianMargaine never!
does this look like scam to you :D
crl
crl
it's great you mean
crl
crl
22:24
:D
crl
crl
:(
@GitaarLAB All you needed to say was: "I want HTMLIframeElement..onload event's analogous event for Window instances" :-P
I asked nicely
crl
crl
ok sorry, you don't like horses :(
22:24
@BartekBanachewicz no, it looks like buzzfeed
@FlorianMargaine funny thing is that it actually looks legit
Joe
Joe
@cri I thought it was awesome, back pat
sadly, from the video also appears that immo isn't blocking me at all
it's the freaking plugs
@FlorianMargaine It's not doing the job then.
crl
crl
@Joe I'll try to make it in JS later
22:25
@DemCodeLines fix it
Joe
Joe
Anyone use or aware of a Browserify variant for converting Nodejs Modules in Harmony into Browser Harmony safe bundles?
da hell is a mistletoe
@AwalGarg : haha, yes that would probably be a good wording (that equally probably no-one thought about, making it useless to google, wait, I'm googling that) :) (PS: left you a little something).
@FlorianMargaine Quick question (obviously correct if wrong, please): /\/welcome.*/ serves the welcome page for all requests that are within the welcome route, and the angular serves whatever that * is. Is that right?
Nah: "did not match any documents."
22:30
@Joe browserify + babel?
Joe
Joe
i want to maintain es6 on the front end... can it do that?
yeah that's what babel does
Joe
Joe
checks
its transpiles from 6 to 5 i thought, my assumptions may be wrong!
thanks
yeah, wait so you don't want any transpilation?
Joe
Joe
I want to take my Harmony node code... and get Browser code still in ES6
essentially looking to use some es6 classes in node to do some isomorphic app dev, use those classes on the front end
22:33
@DemCodeLines no. express serves all the routes under /welcome. And angular manages the routes.
Joe
Joe
@Loktar correct
again, learn http
hey guys I'm very new to the javascript world and I have a question about using var or not. I have been told that using global variables is a "no go!" if you will. What about defining a var at the beginning of your script then changing it in other places. Using it as a placeholder if you will?
@Timg 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.
@Joe I guess I'm confused. You will be very limited then in what browsers your code will work, thats why transpilers are used on the frontend
so you can write es2015/17 today
22:34
Anyone give an angular newb some pointers?
hmm, in my possibly not so elegant tests, PHP7 basically smoked ruby 2.1.3 in both speed and memory consumption.
Keep getting an error "service is not defined"
@Plummer int*
don't wanna check against python because I want to continue loving python :(
@bar
Joe
Joe
22:35
@Loktar thats correct, but all of this is going into an electron app... which is chrome driver... and I can force harmony compatability there... also i test in Chrome with chrome://flags/#enable-javascript-harmony
@BartekBanachewicz that's just one pointer
@Plummer did you read the code/error?
@BartekBanachewicz int* what?
crl
crl
int** then
@FlorianMargaine Still a little confused, should I be altering the angular code that I shared above? Right now, going to /welcome/login and /welcome/signup both render /welcome page
Joe
Joe
22:36
So... its a SUPER SMALL edge case... but yea
@Plummer it's a pointer
ah yeah I'm not sure of a solution then personally @Joe
If that's a joke, it's way over my head.
@DemCodeLines Florian isn't trying to tell you what to do get it running, he is trying to tell you what the problem is so you can solve it.
crl
crl
@Plummer no it's serious, sadly
22:37
@BartekBanachewicz lol
Joe
Joe
@Loktar no worries appreciate the thought
@AwalGarg Somehow I forgot to write "I appreciate the help you have provided thus far, thanks." in that last message.
I think I might go for the 128th time today to try wiggling the wires again
I still can't believe I f*cked up my car
life's the worst
crl
crl
get a bike, and I'm happy you ignored me, reminds me why I didn't like c++room
I fold. What does int refer to?
crl
crl
22:43
a type
integer type
You pedant.
['form', {method: 'POST', onSubmit: submitLogin}, [
	['h1', {className: 'form-header'}, 'login'],
	['input', {type: 'email', name: 'email'}],
	['input', {type: 'password', name: 'pass'}],
	[SomeOtherComponent, {someProp: 'foo'}],
	['button', {type: 'submit'}, 'Login']
]]

vs

<form method="POST" onSubmit={submitLogin}>
	<h1 className="form-header">Login</h1>
	<input type="email" name="email"/>
	<input type="password" name="password"/>
	<SomeOtherComponent someProp="foo"/>
	<button type="submit">Login</button>
I'm considering trying this kind of thing instead of jsx
DOO EEET
crl
crl
makes sense
but it feels a bit like nested ternaries
22:46
it's pretty much s-expressions
here's how it looks in clojure
(defn hello []
  [:div {:class "well"}
   [:h1 {:class "text-info"} "Hello Hiccup and AngularJS"]
   [:div {:class "row"}
    [:div {:class "col-lg-2"}
     (label "name" "Name:")]
    [:div {:class "col-lg-4"}
     (text-field {:class "form-control" :ng-model "yourName" :placeholder "Enter a name here"} "your-name")]]
   [:hr]
   [:h1 {:class "text-success"} "Hello {{yourName}}!"]])
@Mosho look up cl-who :)
yeah, sadly I can't really use a lisp
crl
crl
also how would you do a .map() with that?
with what? with the js?
@Mosho why?
22:50
you would use .map
crl
crl
hmm ok
@FlorianMargaine not allowed to at work
also, ask for forgiveness, not permission :D
yeah, that's kinda verbose
I could understand for common Lisp, but they wouldn't mind clojure imo
22:53
they do
and by they I mean @BenjaminGruenbaum :P
tsk
hit Benji on the head for me
I tried once, was a small side project but plug was pulled in favor of other things after a couple things
used light table, and clojurescript
was fun while it lasted
So... generally speaking, is it bad to add to prototype on base classes like Array or Object?
ah, you already asked for forgiveness :D
@corvid yes
especially Object
Array is not so bad depending on the circumstance
@corvid generally, yes; polyfills for compatibility with older browsers are a possible exception, though their usage can be a bit hairy
22:59
but it's usually "yes, it's bad"

« first day (1874 days earlier)      last day (3296 days later) »