This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-02
Channels
- # 100-days-of-code (1)
- # announcements (2)
- # beginners (122)
- # boot (5)
- # calva (5)
- # cider (54)
- # cljdoc (1)
- # clojure (132)
- # clojure-brasil (1)
- # clojure-italy (4)
- # clojure-nl (6)
- # clojure-uk (105)
- # clojurescript (43)
- # core-async (17)
- # cursive (14)
- # datomic (60)
- # emacs (35)
- # figwheel-main (44)
- # fulcro (70)
- # graphql (1)
- # jobs (19)
- # jobs-discuss (5)
- # leiningen (5)
- # luminus (2)
- # off-topic (40)
- # onyx (2)
- # overtone (5)
- # re-frame (36)
- # reagent (29)
- # ring-swagger (20)
- # rum (13)
- # shadow-cljs (19)
- # testing (5)
- # tools-deps (25)
- # vim (5)
I am in a newbie conundrum, I thought I had a good grasp of promises but I am slightly confused as to why this throws
cljs.user=> (def f (js/Promise. #(throw (js/Error. "Test"))))
#'cljs.user/f
cljs.user=> (node:640) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): Error: Test
no that's not the case ...a sec
no I am confused never mind š
@manutter51 @jesse.wertheim sorry for the late reply, thank you for the hashmap suggestion. I think multimethod works best for me right now.
Iām trying to use google closure-logging targeting node. With optimization-level none
logging is visible, with simple
itās not.
What am I missing?
I have some fairly straightforward hashmap data that needs to be stored flexibly on my server, sent to my (CLJS) client, and ideally stored in its IndexedDB or LocalStorage or whatever. I'm new to Clojure, though, and don't know where to look.
by "stored flexibly" I mean "I don't get to pick the underlying storage layer"
so whatever Clojure library I use needs to be flexible enough to be adapted to that storage layer.
@braden.shepherdson not sure I understand what you're looking for. Are you looking for recommendations how to persist hashmap style data on a Clojure server?
or are you looking for a library that allows you to persist hashmap style data on any storage layer? Maybe a bit more context on your situation would be helpful š
@braden.shepherdson - Are you interested in document store type DBs..? Would you consider using an RDBMS - I mean PostgreSQL can be used really flexibly as a mixture of both since the finalisation of JSONB on PostgreSQLā¦ How about MongoDB / Riak / Redis / DynamoDB (if youāre on AWS)? Maybe you could just use text files to store serialised data structures, like EDN or JSON,,?
Clojure is very capable in using all of these paradigms and more. It really depends EXACTLY what you want š
I use yED. The desktop version is what I use, but there's an online version too
@isak - I used to use this when I had to draw such thingsā¦ https://www.lucidchart.com/
They used to have a āfreeā account, not sure any more, looks as though itās a trial nowā¦
@maleghast that one looks cool, but i'm hoping for something I can use as a library in my app
sorry, I didn't give a lot of context. the underlying storage is not my choice, so I can't really use Riak or Mongo or whatever else. I was more looking for Clojure interfaces to data that I'm loading from somewhere, with bonus points if it can bridge to CLJS too. DataScript looks like the most promising thing some searching revealed.
this one looks Ok, for example: http://visjs.org/examples/network/data/dynamicData.html
@braden.shepherdson - Datascript will help you with that, for sure (based on what Iāve read, no hands-on)
@braden.shepherdson @maleghast with Datascript, one thing you might want to check first is how quickly you can initialize a database. I did some tests, and my SQL queries took like 5 seconds, but initializing datascript in memory with that data took like 25 seconds.
@maleghast I haven't seen anything yet, agree that would be cool
actually, now that I think about it, persistence is not strictly required. I could get away with purely in-memory, since some of the services I'm pulling new data from retain enough history to make a freshly-started server interesting.
@isak where were you loading data from?
@braden.shepherdson SQL Server. Also tried via transit first, then sync from DB, but haven't gotten the load time down to a great level yet
Hi! I have a newbie question about cljsjs packages and how to use them... I'm trying to use firebase by adding cljsjs/firebase
as a dependency. No problems so far but I'm not sure how to call firebase after that. I'm trying:
(ns ^:figwheel-hooks checklist.core
(:require [ :as firebase-app]]))
(firebase-app/initializeApp #js{ ... })
But all I get is TypeError: firebase.app.initializeApp is not a function
. Is this not how it's supposed to be used?