Fork me on GitHub
#clojurescript
<
2018-09-13
>
john00:09:16

I thought I saw an example of a self updating static blog site on github in js, but I can't find it now

john00:09:49

WRT security, you can just save your creds to your browser. And for private backend (admin) content, an encrypted datascript store would probably be fine

john02:09:55

hah! I just did a commit from code eval'd in this maria cloud like interface (finally without blowing the tree away)

john02:09:55

Yeah, I might have something forkable this weekend

priornix02:09:21

Quick question, what's the difference between #js and #object types?

priornix02:09:30

Also, why does (object?) return true for #js but false for #object?

priornix03:09:18

Also, for this #object that I'm getting from a nodejs library, (instance? js/Object x) is true but (object? x) is false. Why is that so?

priornix03:09:25

http://cljs.github.io/api/cljs.core/objectQMARK Is this a bug in (object?). It checks only for (identical? (.constructor x) js/Object)

priornix03:09:32

But in this case, for the #object in question, (.-constructor x) returns #object[Foobar] instead of #object[Object]

borkdude08:09:15

Fastest way to get going with a new cljs node script except lumo? shadow-cljs, figwheel main, what template to use?

thheller08:09:56

npx create-cljs-project your-script then add the config for https://shadow-cljs.github.io/docs/UsersGuide.html#target-node-script

thheller08:09:14

no full template available yet though

borkdude08:09:29

npx or npm?

thheller08:09:46

npx is for running an npm command without installing it first. if you have a semi-recent npm version installed that is available as well.

borkdude08:09:39

yeah it worked 😉

borkdude08:09:59

@thheller what’s the best way to connect to a node repl through emacs/cider? I see there is already an nREPL running, can I connect to that one?

borkdude08:09:15

(I’m running shadow-cljs watch script )

thheller08:09:46

not an emacs user but as I understand it cider support shadow-cljs directly

thheller08:09:56

so cider-connect or whatever the command is should work

borkdude08:09:53

yeah, I did that. it spins up a session within the shadow.user namespace. when I eval something, it says no cljs repl for current session

borkdude08:09:18

oh of course, thanks

borkdude09:09:28

I might be forgetting something. I now have a sibling cljs repl. when I eval something I get:

cljs.user> (+ 1 2 3)
No application has connected to the REPL server. Make sure your JS environment has loaded your compiled ClojureScript code.

borkdude09:09:19

I needed to run node itself. Works now. Many thanks.

1
Garrett Hopper22:09:24

Can :global-exports be used in :foreign-libs for a :target :nodejs build? (Assuming the :file declares global variables on global instead of window.)

Garrett Hopper22:09:35

Or perhaps I need to create a global.window instead?

dnolen23:09:29

I would just assign to global