Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 06:45
    frank-dspeed commented #5460
  • 06:42
    frank-dspeed edited #5460
  • 06:41
    frank-dspeed opened #5460
  • Jan 20 21:58
    justinbmeyer commented #5459
  • Jan 20 07:49
    frank-dspeed opened #5459
  • Jan 19 16:39
    leoj3n commented #5107
  • Jan 19 16:37
    leoj3n commented #5107
  • Jan 19 16:32
    ThomasBrickerBK starred canjs/canjs
  • Jan 18 01:06
    greenkeeper[bot] commented #5422
  • Jan 18 01:06

    greenkeeper[bot] on @feathersjs

    chore(package): update @feather… (compare)

  • Jan 18 00:48

    greenkeeper[bot] on @octokit

    (compare)

  • Jan 18 00:46

    greenkeeper[bot] on @octokit

    chore(package): update @octokit… (compare)

  • Jan 17 18:14
    patosullivan starred canjs/canjs
  • Jan 17 17:42
    bmomberger-bitovi synchronize #5451
  • Jan 17 17:42

    bmomberger-bitovi on update-deps

    update can-view-live, can-dom-m… (compare)

  • Jan 16 00:11
    greenkeeper[bot] labeled #5458
  • Jan 16 00:11
    greenkeeper[bot] opened #5458
  • Jan 16 00:11

    greenkeeper[bot] on can-simple-dom-1.7.1

    fix(package): update can-simple… (compare)

  • Jan 14 01:51
    likun7981 starred canjs/canjs
  • Jan 13 14:06
    piraz starred canjs/canjs
Kevin Phillips
@phillipskevin
but they're pretty hard to learn
the value behavior is a lot simpler and solves most of the same problems
Frank Lemanschik
@frank-dspeed
why do you think streams are hard to learn
they are a simple observe able
that emit values
Kevin Phillips
@phillipskevin
because I've tried to teach them to people
and people find them confusing
Frank Lemanschik
@frank-dspeed
hmmm i like teaching streams
i am at present preparing a biger series of streaming tutorials maybe your interrested in them will send you url once released
<form>
    <input class="x"> + <input class="y"> = <span class="result"></span>
</form>
Using most.js to make it reactive:
import { fromEvent, combine } from 'most'

const xInput = document.querySelector('input.x')
const yInput = document.querySelector('input.y')
const resultNode = document.querySelector('.result')

const add = (x, y) => x + y

const toNumber = e => Number(e.target.value)

const renderResult = result => {
    resultNode.textContent = result
}

export const main = () => {
    // x represents the current value of xInput
    const x = fromEvent('input', xInput).map(toNumber)

    // y represents the current value of yInput
    const y = fromEvent('input', yInput).map(toNumber)

    // result is the live current value of adding x and y
    const result = combine(add, x, y)

    // Observe the result value by rendering it to the resultNode
    result.observe(renderResult)
}
ups
with canjs all this is even much more easy
Kevin Phillips
@phillipskevin
I like teaching streams too
Frank Lemanschik
@frank-dspeed
yaa stream love
:D
i think they are the most logic for long running processes
Kevin Phillips
@phillipskevin
but if you're teaching canjs and you need to solve the one problem mentioned above (resetting city when state changes), then having to teach all of streams is a bit of overkill
Frank Lemanschik
@frank-dspeed
and the clean up is like magic
so out of memory managment view this is the holy gral
for any resource managment
did you use most.js ?
or only kefir if so look into most js it has magic stuff like multicast streams
i design whole apps with it i will even rewrite canjs to use only that :)
Thomas Sieverding
@Bajix
I bet it would be easy to make most.js compatible with can-streams
Frank Lemanschik
@frank-dspeed
but thats hard work i first start with can-quee
as a stream is a queue and most has shedulers
its all a dream
in some month a canjs app could be a monadic self healing stream
the ecosystem of most is growing to be the defacto framework of frameworks
Kevin Phillips
@phillipskevin
I usually use RxJS
Frank Lemanschik
@frank-dspeed
look into most you will laught about rhx
rx
see the benchmark but the ecosystem is also the most amazing
its also nativ promise compatible
so works for any canjs value ;)
here the amazing docs
andre-cgn
@andre-cgn
hey all. does anyone use canjs & webpack? i am having problems with the connect behaviours :/
Frank Lemanschik
@frank-dspeed
what has webpack todo with your connect behaviors?
Kevin Phillips
@phillipskevin
we have an example setup using canjs with webpack: https://github.com/canjs/webpack-example
Jeroen Cornelissen
@jeroencornelissen
Schermafbeelding 2018-02-15 om 16.52.46.png
Any idea why I keep getting this error RangeError: Maximum call stack size exceeded. It’s something CanJS internal.
Jeroen Cornelissen
@jeroencornelissen
I get that error every now and then, but sometimes no error and our app crashes completely...
Kevin Phillips
@phillipskevin
kind of hard to tell from just that
can you show what MyDocRouting looks like?
Pestdoktor
@Pestdoktor
hey there, wanted to take a look at stream properties today, but can't get it to work
can anyone tell me why this isn't logging anything
https://glitch.com/edit/#!/quill-condition?path=test/test.js:34:0
?
Kevin Phillips
@phillipskevin
the version of can-define-stream-kefir you have is compatible with can-define@2
"can-define-stream-kefir": "^0.1.0", works with the rest of your app