pathom

:pathom: https://github.com/wilkerlucio/pathom/ & https://pathom3.wsscode.com & https://roamresearch.com/#/app/wsscode
2020-05-18T11:20:29.040900Z

is there any function to extract the eql from an arbitrary piece of data, eg given {:x 1 :y 2 :z [{:t 3 :u 4}] returns [:x :y {:z [:t :u]}]?

kszabo 2020-05-18T11:43:37.041100Z

not currently AFAIK

2020-05-18T13:05:54.042900Z

I am connecting my pathom parser to pathom viz and I'm getting transit encoding errors for unsupported types, in this case #tick/date. Is there a place to add transit handlers for your own types?

#error {
 :cause "Not supported: class java.time.LocalDate"
 :via
 [{:type java.lang.RuntimeException
   :message "java.lang.Exception: Not supported: class java.time.LocalDate"
   :at [com.cognitect.transit.impl.WriterFactory$1 write "WriterFactory.java" 65]}
  {:type java.lang.Exception
   :message "Not supported: class java.time.LocalDate"
   :at [com.cognitect.transit.impl.AbstractEmitter marshal "AbstractEmitter.java" 194]}]
 :trace
 [[com.cognitect.transit.impl.AbstractEmitter marshal "AbstractEmitter.java" 194]
  [com.cognitect.transit.impl.JsonEmitter emitMap "JsonEmitter.java" 171]
  [com.cognitect.transit.impl.AbstractEmitter emitMap "AbstractEmitter.java" 85]
  [com.cognitect.transit.impl.AbstractEmitter marshal "AbstractEmitter.java" 184]
  [com.cognitect.transit.impl.AbstractEmitter emitArray "AbstractEmitter.java" 97]
  [com.cognitect.transit.impl.AbstractEmitter marshal "AbstractEmitter.java" 182]
  [com.cognitect.transit.impl.JsonEmitter emitMap "JsonEmitter.java" 171]
  [com.cognitect.transit.impl.AbstractEmitter emitMap "AbstractEmitter.java" 85]
  [com.cognitect.transit.impl.AbstractEmitter marshal "AbstractEmitter.java" 184]
  [com.cognitect.transit.impl.JsonEmitter emitMap "JsonEmitter.java" 171]
  [com.cognitect.transit.impl.AbstractEmitter emitMap "AbstractEmitter.java" 85]
  [com.cognitect.transit.impl.AbstractEmitter marshal "AbstractEmitter.java" 184]
  [com.cognitect.transit.impl.AbstractEmitter marshalTop "AbstractEmitter.java" 211]
  [com.cognitect.transit.impl.JsonEmitter emit "JsonEmitter.java" 41]
  [com.cognitect.transit.impl.WriterFactory$1 write "WriterFactory.java" 62]
  [cognitect.transit$write invokeStatic "transit.clj" 167]
  [cognitect.transit$write invoke "transit.clj" 164]
  [com.wsscode.transit$write invokeStatic "transit.cljc" 37]
  [com.wsscode.transit$write invoke "transit.cljc" 33]
  [<http://com.wsscode.pathom.viz.ws|com.wsscode.pathom.viz.ws>_connector.impl.http_clj$send_message_BANG_ invokeStatic "http_clj.clj" 18]
  [<http://com.wsscode.pathom.viz.ws|com.wsscode.pathom.viz.ws>_connector.impl.http_clj$send_message_BANG_ invoke "http_clj.clj" 15]
  [<http://com.wsscode.pathom.viz.ws|com.wsscode.pathom.viz.ws>_connector.impl.http_clj$connect_parser$fn__56379 invoke "http_clj.clj" 75]
  [<http://com.wsscode.pathom.viz.ws|com.wsscode.pathom.viz.ws>_connector.core$connect_parser$connected_parser__56389$fn__56445$state_machine__7701__auto____56470$fn__56473 invoke "core.cljc" 57]
  [<http://com.wsscode.pathom.viz.ws|com.wsscode.pathom.viz.ws>_connector.core$connect_parser$connected_parser__56389$fn__56445$state_machine__7701__auto____56470 invoke "core.cljc" 56]
  [clojure.core.async.impl.ioc_macros$run_state_machine invokeStatic "ioc_macros.clj" 978]
  [clojure.core.async.impl.ioc_macros$run_state_machine invoke "ioc_macros.clj" 977]
  [clojure.core.async.impl.ioc_macros$run_state_machine_wrapped invokeStatic "ioc_macros.clj" 982]
  [clojure.core.async.impl.ioc_macros$run_state_machine_wrapped invoke "ioc_macros.clj" 980]
  [clojure.core.async.impl.ioc_macros$take_BANG_$fn__7719 invoke "ioc_macros.clj" 991]
  [clojure.core.async.impl.channels.ManyToManyChannel$fn__2538$fn__2539 invoke "channels.clj" 95]
  [clojure.lang.AFn run "AFn.java" 22]
  [java.util.concurrent.ThreadPoolExecutor runWorker "ThreadPoolExecutor.java" 1128]
  [java.util.concurrent.ThreadPoolExecutor$Worker run "ThreadPoolExecutor.java" 628]
  [clojure.core.async.impl.concurrent$counted_thread_factory$reify__2407$fn__2408 invoke "concurrent.clj" 29]
  [clojure.lang.AFn run "AFn.java" 22]
  [java.lang.Thread run "Thread.java" 834]]}

wilkerlucio 2020-05-20T00:23:40.060200Z

sorry the delay, got sidetracked on this, ok, I decided to force the fix to don't rely on transit version, I was able to run a parser returning a LocalDate, can you try version 1.0.3 of the connector and see if that works?

2020-05-20T02:54:16.062600Z

no problem! thanks for the quick fix, looks like it's working now 🙂

wilkerlucio 2020-05-18T15:06:48.043700Z

can you check with transit version are you using? they had a bug that was recently fixed related to fallback encodings, I believe if you use latest transit it may fix, but if not please let me know and lets debug it

2020-05-18T15:12:57.043900Z

must be it. Thank you!

2020-05-18T15:43:38.044100Z

sure thing: using clj -Stree:

com.wsscode/pathom-viz-connector 1.0.2
  com.wsscode/async 1.0.4
  com.cognitect/transit-clj 1.0.324
    com.cognitect/transit-java 1.0.343
com.cognitect/transit-cljs 0.8.264
com.cognitect/transit-js 0.8.861
I have the following in deps.edn:
com.fulcrologic/fulcro {:mvn/version "3.2.5"
                         :exclusions  [com.cognitect/transit-cljs                       
                                      com.cognitect/transit-js]}
com.cognitect/transit-cljs          {:mvn/version "0.8.264"}
com.cognitect/transit-js            {:mvn/version "0.8.861"}

2020-05-18T15:45:11.044400Z

the cljs and js versions were older pulled in from fulcro, I updated those but the issue is still happening (i assume it's in clojure anyway not cljs)

lepistane 2020-05-18T16:16:28.048900Z

Hello, I apologize in advance for the question for the zone "i dont know what i dont know" i am very interested in pathom but don't know how to handle it. it's just too complex and i lack foundational knowledge in order to use it. I couldn't get EQL but after looking at GraphQL and playing around with it little bit with my brother when he was preparing for interview i finally understood EQL. I even get pathom bit more but still have issues even with simple example from docs. Where would i need to look to build up my foundation and better understand terminology and thinking about this topic? I feel like with pathom i could create integration between api and this seems very very powerful

souenzzo 2020-05-18T20:52:59.051300Z

As a early-user of om/fulcro/pathom/EQL, the community is really small and there is a lot of WIP things (including naming) We need more users, more discussion, more uses to advance in naming/docs/explanations

2020-05-18T21:03:20.051400Z

I'd say one of the best stories for learning is focusing on fulcro, which makes using pathom easier. There's tons of documentation and videos. https://www.youtube.com/playlist?list=PLVi9lDx-4C_T7jkihlQflyqGqU4xVtsfi

2020-05-18T21:03:38.051700Z

Some of the server videos in that playlist have pathom setup

wilkerlucio 2020-05-18T21:09:54.051900Z

we gonna a real good oportunity for that soon, stay tuned 🙂

🚀 5
2020-05-18T21:16:49.052100Z

I'm still seeing the same error. I can try running the app locally in dev mode to see if i can find where it's falling over