Giter Site home page Giter Site logo

hn-follow's Introduction

HN Follow

Follow friends on Hacker News

hn-follow's People

Contributors

film42 avatar baconsbits avatar

Stargazers

Owen avatar Vic Goldfeld avatar Jon George avatar Jacek Złydach avatar Austen Allred avatar

Watchers

 avatar James Cloos avatar  avatar Jon George avatar  avatar

Forkers

austenallred

hn-follow's Issues

Null pointer exception in tree-template

I'm getting a null pointer exception with the following code,
(interaction-feed (get-user "grellas"))
It works with other users, like qzcx and film42.

Stack Trace:
java.lang.NullPointerException: null
/Users/Jon/fall2014/hn-follow/src/hn_follow/core/api.clj:55 hn-follow.core.api/tree-template
            core.clj:2559 clojure.core/map[fn]
          LazySeq.java:40 clojure.lang.LazySeq.sval
          LazySeq.java:49 clojure.lang.LazySeq.seq
             Cons.java:39 clojure.lang.Cons.next
              RT.java:598 clojure.lang.RT.next
              core.clj:64 clojure.core/next
            core.clj:2884 clojure.core/nthnext
        core_print.clj:48 clojure.core/print-sequential
       core_print.clj:147 clojure.core/fn
         MultiFn.java:231 clojure.lang.MultiFn.invoke
            core.clj:3392 clojure.core/pr-on
            core.clj:3404 clojure.core/pr
             AFn.java:154 clojure.lang.AFn.applyToHelper
          RestFn.java:132 clojure.lang.RestFn.applyTo
             core.clj:624 clojure.core/apply
            core.clj:4373 clojure.core/pr-str
          RestFn.java:408 clojure.lang.RestFn.invoke
              eval.clj:69 lighttable.nrepl.eval/clean-serialize
          RestFn.java:423 clojure.lang.RestFn.invoke
              eval.clj:82 lighttable.nrepl.eval/->result
             AFn.java:156 clojure.lang.AFn.applyToHelper
             AFn.java:144 clojure.lang.AFn.applyTo
             core.clj:626 clojure.core/apply
            core.clj:2468 clojure.core/partial[fn]
          RestFn.java:408 clojure.lang.RestFn.invoke
            core.clj:2557 clojure.core/map[fn]
          LazySeq.java:40 clojure.lang.LazySeq.sval
          LazySeq.java:49 clojure.lang.LazySeq.seq
              RT.java:484 clojure.lang.RT.seq
             core.clj:133 clojure.core/seq
            core.clj:2595 clojure.core/filter[fn]
          LazySeq.java:40 clojure.lang.LazySeq.sval
          LazySeq.java:49 clojure.lang.LazySeq.seq
              RT.java:484 clojure.lang.RT.seq
             core.clj:133 clojure.core/seq
            core.clj:2855 clojure.core/dorun
            core.clj:2871 clojure.core/doall
             eval.clj:126 lighttable.nrepl.eval/eval-clj
          RestFn.java:442 clojure.lang.RestFn.invoke
             eval.clj:192 lighttable.nrepl.eval/eval2476[fn]
             AFn.java:152 clojure.lang.AFn.applyToHelper
             AFn.java:144 clojure.lang.AFn.applyTo
             core.clj:624 clojure.core/apply
            core.clj:1862 clojure.core/with-bindings*
          RestFn.java:425 clojure.lang.RestFn.invoke
             eval.clj:177 lighttable.nrepl.eval/eval2476[fn]
             eval.clj:176 lighttable.nrepl.eval/eval2476[fn]
         MultiFn.java:227 clojure.lang.MultiFn.invoke
              core.clj:98 lighttable.nrepl.core/queued[fn]
            core.clj:2402 clojure.core/comp[fn]
interruptible_eval.clj:138 clojure.tools.nrepl.middleware.interruptible-eval/run-next[fn]
              AFn.java:22 clojure.lang.AFn.run
ThreadPoolExecutor.java:1142 java.util.concurrent.ThreadPoolExecutor.runWorker
ThreadPoolExecutor.java:617 java.util.concurrent.ThreadPoolExecutor$Worker.run
          Thread.java:744 java.lang.Thread.run

Road to Pagination

I have a first round implementation of updates coming in realtime from the HN API running in production. If we can abstract the 10 parallel async requests on a profile load, we can probably start to implement pagination, which is a feature on the radar. I'll try prototyping something and checking performance. My biggest concern is load time when we need to cache a new user to the system. On the other hand, it might reduce the amount of time spent waiting for that first byte to be sent.

Other optimizations:

  • Only send a list of rendered items; stop sending the whole tree for each user over the wire.

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.