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
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
is this a problem of hot/cold or completed stream?
Laszlo Korte
@laszlokorte
@atomrc yes, The proxy receives the "test" value before itself has any subscribers
You could either use a ReplaySubject or put the value$.subscribe(proxy$); call in the end
Thomas Belin
@atomrc
oh indeed putting it at the end is working, thk @laszlokorte
I find this pretty hard to understand at the beginning
Laszlo Korte
@laszlokorte
but is it clear now? Or should I elaborate?
Thomas Belin
@atomrc
No it's ok I got it thk :) The thing is I though this was my problem for the unit test I am writing but it not the same problem is seems :(