These are chat archives for pozadi/kefir

8th
May 2015
Roman Pominov
@rpominov
May 08 2015 09:40
looks like soon it will be possible to import Kefir by piece:
const stream = require('kefir/primary/stream');
const map = require('kefir/one-source/map');

let myStream = stream(emitter => {
  emitter.emit(1);
});

let mapped = map(myStream, x => x + 1);
so the app bundle.js will contain only necessary parts of Kefir.
Roman Pominov
@rpominov
May 08 2015 09:45
while for app code it usually not so important, it could be a game changer for using Kefir in libs
Ulric Wilfred
@shamansir
May 08 2015 10:00
will it be possible to use myStream.map and keep chaining if I want to?
Roman Pominov
@rpominov
May 08 2015 10:04
@shamansir no, for that you'll need to require('kefir') that will add .map to Observable.prototype, but also will load whole lib
Ulric Wilfred
@shamansir
May 08 2015 10:05
@pozadi ok, not a problem for me, since last time it was tiny enough and I use almost everything from it :)
Roman Pominov
@rpominov
May 08 2015 10:06
cool)
but after transition to ES6 it got heavier: 50kb -> 100kb, 7kb -> 10kb for dev and min.gzip versions respectively
not much for gzipped version though
Ulric Wilfred
@shamansir
May 08 2015 10:09
yep. but why ES6 version is twice larger uncompressed, ES6 should shorten the syntax, isn’t it? :)
Roman Pominov
@rpominov
May 08 2015 10:10
100kb is ES6 compiled to ES5
also splitting to modules add some boilerplate
Petr Myazin
@pqr
May 08 2015 10:15
interestion question: what if to port Kefir also to TypeScrypt, Coffee, Dart, ClojureScript and compile back to ES5
witch version of compiled code will be smallest? witch largest?
Roman Pominov
@rpominov
May 08 2015 10:16
heh, dunno
Ulric Wilfred
@shamansir
May 08 2015 10:18
got it, thanks! I actually keep in mind updating RPD to latest Kefir and/or even ES6, but I don’t know when I have a chance to do it)
Roman Pominov
@rpominov
May 08 2015 11:39
this feature (import by pieces) probably won't be included in the next version, need to think about it a little more