These are chat archives for canjs/canjs

8th
Dec 2018
Justin Meyer
@justinbmeyer
Dec 08 2018 01:00
Yeah, I don’t see how 103 is different than preload headers
It doesn’t have the same benefits of push if it lets the server decide
Justin Meyer
@justinbmeyer
Dec 08 2018 01:06
Client decide
Frank Lemanschik
@frank-dspeed
Dec 08 2018 04:44
oh you got that wrong the server decides nothin realy
it sends out on request of the client 103 even befor 200
1 GET request gets 2 responses The 103 Early Hints status codes were in this case sent as soon as the server could, while the real response (with 200 OK) took a bit longer to produce. This could allow a client to quickly fetch these additional resources.
HTTP/1.1 103 Early Hints
Link: </style.css>; rel=preload; as=style
Link: </script.js>; rel=preload; as=script
//wait a few hundred milliseconds
HTTP/1.1 200 OK
Date: Fri, 26 May 2017 10:02:11 GMT
Content-Length: 1234
Content-Type: text/html; charset=utf-8
Link: </style.css>; rel=preload; as=style
Link: </script.js>; rel=preload; as=script
but at present with preload enabled async css and other sure in order placed html tags
the client will fetch really amazing fast if it is a current browser
the 103 is really just suger on the ability of today and it is logic that the client chooses what to load when
Frank Lemanschik
@frank-dspeed
Dec 08 2018 04:49
a normal html project takes round about 60ms to get interactive
sure not with canjs :)
but if it is raw vanilla
But anyway canjs will gets its hornor once i have a good es2018 version of it and replaced all observables and queues with streams
Frank Lemanschik
@frank-dspeed
Dec 08 2018 04:55
then the journy of Algebra coding starts
Algebraic JavaScript Specification
Frank Lemanschik
@frank-dspeed
Dec 08 2018 05:04
and the best is the new Optimizers in the new engines them self
this code style will save a lot of memory
look into https://rustwasm.github.io/wasm-bindgen/ it will also make great stuff possible at present
we can use highlevel js with rust and wasm
rust entry point using js alert

#![allow(unused_variables)]
fn main() {
extern crate wasm_bindgen;

use wasm_bindgen::prelude::*;

#[wasm_bindgen]
extern "C" {
    fn alert(s: &str);
}

#[wasm_bindgen]
pub fn greet(name: &str) {
    alert(&format!("Hello, {}!", name));
}

}
then this js
const rust = import('./hello_world');

rust
  .then(m => m.greet('World!'))
  .catch(console.error);
bam we call alert in rust :D
Frank Lemanschik
@frank-dspeed
Dec 08 2018 05:10
@matthewp https://github.com/rustwasm/wasm-bindgen/tree/master/examples/hello_world a full example with webpack maybe you like to build that also into steal :)
Frank Lemanschik
@frank-dspeed
Dec 08 2018 05:23
imagin a world where i could inject simply a stream into a stream to find bugs
no dev tools to see relations the stream it self shows it
a Stream is simple the best Observable around in Code
Julian
@pYr0x
Dec 08 2018 15:22
@justinbmeyer @phillipskevin i have some trouble with testee and pupeteer (chrome). i created a repo to show the problem. https://gitlab.com/pYr0x/canjs . the problem is, if i test with chrome (pupeteer) the tests run but node does not exit. if i test with my local firefox all is fine. can you have a look at this? i have no idea where to look, there are several projects like "lunchpad" and i dont know where the problem occur
Justin Meyer
@justinbmeyer
Dec 08 2018 15:23
@pYr0x it's likely launchpad
what do you mean there are several projects like "launchpad"?
Julian
@pYr0x
Dec 08 2018 17:22
@justinbmeyer hey, i came up with this issue bitovi/launchpad#108
testee uses several projcets. i thought, testee all doing the stuff, connecting to a browser, open the url, start the reporter
Frank Lemanschik
@frank-dspeed
Dec 08 2018 19:35
@pYr0x testee does nothing afaik
its a client server thing
offering api for its client
to run tests on the server
via the client side script the api gets called and runs the tests in mocha or anything
look in the repo its not much code
i have made my own testee long time ago