Giter Site home page Giter Site logo

shoreleave-pubsub's People

Contributors

ohpauleez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

shoreleave-pubsub's Issues

No protocol method IPublishable.publishize defined for type function

Anyone seeing this error in the browser's console?

I'm using this version below with [org.clojure/clojure "1.5.1"].

[shoreleave/shoreleave-pubsub "0.3.0"]

Uncaught Error: No protocol method IPublishable.publishize defined for type function: function mytest_fn() {
return 5
}

(def bus (simplebus/bus))
(defn mytest-fn [] 5)
(def mytest-fn-p (pubsub/publishize mytest-fn bus))

window.BlobBuilder undefined when trying to require shoreleave.pubsubs

When I require from the pubsubs namespace:

(ns myapp.client
  (:require [shoreleave.pubsubs.simple :as pbus]))

I get a client error on blob.js:46 (from shoreleave-browser dependency):

window.BlobBuilder.prototype.cljs$core$ITransientCollection$ = true;

Uncaught TypeError: Cannot read property 'prototype' of undefined

`publishized?` implementation for Atom

Calling (publishized? ...) on an Atom will always return a truthy result:

https://github.com/shoreleave/shoreleave-pubsub/blame/master/src/shoreleave/pubsubs/protocols.cljs#L152

(publishized? [t]
        (-> t hash str))

This caused me a bit of consternation as I wanted to avoid double-subscribing to a topic, so I always wrote:

 (defn publishize [obj]
  (when-not (publishized? obj)
   (pubsub/publishize obj bus)))

This obviously won't work, since any atom will return true for publishized? - though strangely, this worked fine until two days ago. I'm not sure what changed.

Should the implementation for Atoms be similar to others, where we attach a key in the Atom's meta field? Happy to make a PR if so, otherwise would love to understand better.

Thanks for the great libraries!

defpub macro

What about a macro that combines function definition and publishize?

error while loading page when google.pubsub.PubSub is required

Hi Paul,

I am trying to use the pubsub in shoreleave. Here is the gist of my code - https://gist.github.com/3016422

On loading the page, this is the error I receive in the browser console -

goog.require could not find: goog.storage.mechanism.HTML5LocalStorage
goog.requireclient.js:96
(anonymous function)client.js:20191
client.js:98Uncaught Error: goog.require could not find: goog.storage.mechanism.HTML5LocalStorage
goog.requireclient.js:98
(anonymous function)

However there is no error on compiling of the cljs.

How do I get rid of the error?

Thanks,
murtaza

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.