Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Michal Vanko
@michalvankodev
the driver is ran before the adaptation thats's why it is happening
André Staltz
@staltz
@michalvankodev are you using xstream-run?
can you show your package.json?
Michal Vanko
@michalvankodev
"devDependencies": {
    "babel-cli": "^6.7.7",
    "babel-core": "*",
    "babel-eslint": "^6.0.3",
    "babel-preset-es2015": "^6.6.0",
    "babel-preset-stage-0": "^6.5.0",
    "babel-tape-runner": "^2.0.1",
    "babelify": "^7.2.0",
    "browserify": "^13.0.0",
    "browserify-hmr": "^0.3.1",
    "eslint": "^2.8.0",
    "eslint-config-cycle": "^3.2.0",
    "faucet": "0.0.1",
    "less": "^2.6.1",
    "nodemon": "^1.9.1",
    "supertest": "^1.2.0",
    "tape": "^4.5.1",
    "watchify": "^3.7.0"
  },
  "dependencies": {
    "@cycle/dom": "^10.0.0-rc7",
    "@cycle/history": "*",
    "@cycle/http": "^9.0.0-rc2",
    "@cycle/isolate": "^1.2.0",
    "@cycle/xstream-run": "^1.0.0",
    "bcrypt": "^0.8.6",
    "cycle-snabbdom": "^1.2.1",
    "cyclic-router": "^1.0.0",
    "dejavu-fonts-ttf": "^2.35.5",
    "history": "^2.1.0",
    "jsonwebtoken": "^5.7.0",
    "koa": "^1.2.0",
    "koa-bodyparser": "^2.0.1",
    "koa-favicon": "^1.2.1",
    "koa-jwt": "^1.2.0",
    "koa-logger": "^1.3.0",
    "koa-mount": "^1.3.0",
    "koa-route": "^2.4.2",
    "koa-router": "^5.4.0",
    "koa-watchify": "^1.1.1",
    "mongoose": "^4.4.13",
    "normalize.css": "^4.1.1",
    "ramda": "^0.21.0",
    "rx": "^4.1.0",
    "switch-path": "^1.1.6",
    "winston": "^2.2.0",
    "xstream": "^1.0.8"
  }
André Staltz
@staltz
Adaptation between stream libraries should happen smoothly because the http driver tells run() that it uses rx and run() will convert the xstream sink before giving it to the http driver
Michal Vanko
@michalvankodev
In callDrivers driverOutput is run first .. there it crashes and then it wants to check for validation .isValidStream
Michal Vanko
@michalvankodev
yea the source code in http-driver looks different then in chrome debugger
ok I had to restart watchify as it doesnt track node_modules
ok now I have an issue with makeHTMLDriver
André Staltz
@staltz
did it work now?
ok, what's the issue there?
Michal Vanko
@michalvankodev
runStreamAdapter.adapt is not a function
André Staltz
@staltz
hmm
Michal Vanko
@michalvankodev
yea I'm not using xstream run on the server side edit : yet!
Tylor Steinberger
@TylorS
Oh hey, I hadn't even thought about it, but @cycle/history should be automatically converted as well :+1:
Michal Vanko
@michalvankodev
Is @cycle/history adaptable?
Right now I have an issue with
TypeError: sink$.subscribe is not a function
      at historyDriver (/home/mvanko/Projects/cycle-blog/node_modules/@cycle/history/lib/makeHistoryDriver.js:97:11)
      at Object.routerDriver [as router] (/home/mvanko/Projects/cycle-blog/node_modules/cyclic-router/lib/makeRouterDriver.js:32:20)
Tylor Steinberger
@TylorS
It returns just a single stream, so it should get converted automatically I think.
@staltz I can't remember now :( lol
cyclic-router isn't ready for conversion though :(
Let me open an issue for that
Michal Vanko
@michalvankodev

@TylorS

cyclic-router isn't ready for conversion though :(

NOooooooooooooooooo

Tylor Steinberger
@TylorS
I want to rewrite it in TS and XStream
Definitely high on my todo list
Michal Vanko
@michalvankodev
Thank you.. My todays journey is therefore in the end.. If there is any way to help you I'd like to :)
Tylor Steinberger
@TylorS
If you'd like to submit a patch for simple conversion before it gets rewritten that'd be very welcomed, but I don't expect it from anyone. Not many people are familiar with how to do the conversions inside of drivers just yet
Michal Vanko
@michalvankodev
What is your estimate for a rewrite?
I can perhaps help you with that
Tylor Steinberger
@TylorS
I'm trying to get a tangible POC of a library I'm writing right now (probably by the weekend), then my priorities are most-run and most-adapter (mostly done), and then converting all of my existing libraries.
André Staltz
@staltz
It's rather easy to make a driver ready for Cycle Diversity
Really, it's
function makeMyDriver(lol) {
  function myDriver(sink) {
    // ...
    return source;
  }
  myDriver.streamAdapter = RxAdapter; // <=== this
  return myDriver;
}
Michal Vanko
@michalvankodev
nice going to try it out :)
André Staltz
@staltz
So try that out and make a PR to cycle/history if that's the case
Michal Vanko
@michalvankodev
of course :) going to relax a bit
and then i will take a look at it.. looks really simple
Laszlo Korte
@laszlokorte
@staltz doesn't sink need to be converted by the driver as well?
Oh, never mind, cycle does that automatically, right? but nested streams need to be converted manually?
Andrey
@frontendthug

hello, guys! i'm just start to play with cyclejs, and when i try to run simple examples, like checkbox, i'm always get error like:

this.runStreamAdapter.adapt is not a function

core v6.0.3
do i need to create issue? i have standart webpack app with babel, rx and cycle-dom ;d

Adam Wendell
@AdamWendell
@frontendthug Please link your package.json
Andrey
@frontendthug
'''
{
"name": "cycle",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "webpack-dev-server --hot --inline --content-base app"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@cycle/core": "^6.0.3",
"@cycle/dom": "^10.0.0-rc7",
"@cycle/rx-adapter": "^1.0.3",
"babel-core": "^6.7.7",
"rx": "^4.1.0"
},
"devDependencies": {
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.6.0",
"babel-preset-stage-0": "^6.5.0",
"html-webpack-plugin": "^2.16.0",
"webpack": "^1.13.0",
"webpack-dev-server": "^1.14.1"
}
}
'''
damn
André Staltz
@staltz
@laszlokorte yes laszlo, Cycle run converts sinks to the driver's stream lib, but I think sinks are always first-order, so no need for flattening :smile:
Laszlo Korte
@laszlokorte
Sorry, I meant nested sources, like the ones in the http driver
Steve Lee
@SteveALee
those xstream performance results are very interesting - well at least to me :) SO yes xstream in same ballpark as RxJS 5 - sometimes faster, sometimes slower. Most is impressive. Note sure about Array though.
Adam Wendell
@AdamWendell
@frontendthug With "@cycle/core": "^6.0.3" you don't need a adapter
André Staltz
@staltz
Yeah, the driver receives from run the stream lib used by the application, so the driver needs to adapt the stream before giving it as sources @laszlokorte
Adam Wendell
@AdamWendell
So you might need to use a older version of the @cycle/dom. But I'm not sure. Haven't played around enough with the latest to be sure.
Andrey
@frontendthug
@AdamWendell please check https://github.com/frontendthug/cyclejs-issue :(
Thomas Belin
@atomrc
Hey guys, I guess my question is going to be dead simple for you, but I don't understand why the proxy$ stream doesn't produce any value here :
javascript
function log(from) {
  return function () {
    console.log(from, arguments);
  };
}

const proxy$ = new Rx.Subject();
const value$ = Rx.Observable.just("test");

value$.subscribe(proxy$);
value$.subscribe(log("original"));
proxy$.subscribe(log("proxy"));
here is the corresponding jsbin : https://jsbin.com/vihuga/edit?html,js,console