Fork me on GitHub
#fulcro
<
2017-08-21
>
jhorwitz01:08:42

Hey everyone, I have copied the beginning code from the tutorial exactly yet I am still getting a null pointer when running the fog wheel script, any ideas?

tony.kay02:08:18

you mean from Getting Started?

tony.kay02:08:03

It is possible there is a typo. When I built that I was running it as I went, so it should be ok.

tony.kay02:08:43

but you never know. I’ve been pretty aggressively updating things in prepartion for a larger release, so if you can give me the error or more info I’d be glad to try to help

tony.kay02:08:25

Did you use alternate versions of any dependency?

josh_horwitz02:08:43

No, typed , then copied straight from the guide

tony.kay02:08:05

Is is possible for you to throw you version up on a github repo so I can clone and look at it?

josh_horwitz02:08:22

BTW, love the project, hoping to contribute and help as much as possible, we are a Clojure shop so hoping to move us towards ClojureScript on the frontend

tony.kay02:08:08

sweet 🙂 You’ve found the Untangled videos I hope.

tony.kay02:08:22

I’m uploading another rebranded Fulcro video as we speak

tony.kay02:08:29

A lot of ppl find them really helpful

tony.kay02:08:05

There are a lot more old ones…just overdub “fulcro” anytime you hear “untangled” 😉

josh_horwitz02:08:16

lol, awesome! Thank you

tony.kay02:08:04

wow, stuff gets out of date quickly

tony.kay02:08:39

seems like I wrote that yesterday, and almost everything in the deps is now several version newer

tony.kay02:08:49

starting you project now…took a min for deps to update

tony.kay02:08:30

Tell me the following for your env: - IDE? - OS? - Java Version?

tony.kay02:08:35

@josh_horwitz it works fine for me, as written

tony.kay02:08:40

Java 8 is prob your problem

tony.kay03:08:24

no, it dies on me when I load the page

tony.kay03:08:45

Well, at least it is reproducible

tony.kay03:08:13

strange…did you check in you js code?

tony.kay03:08:19

cause if I reset the build, it works

tony.kay03:08:28

At the cljs REPL, type: (reset-autobuild)

tony.kay03:08:43

(after you’ve connected with a browser, so you get a prompt)

tony.kay03:08:38

My guess is something you did earlier made a bad resulting file, and it got cached in the output. That command cleans the source and rebuilds it.

tony.kay03:08:15

Make sure you don’t check in the resources/public/js generated code…you’ll regularly want to clean that. Sometimes when you make mistakes you have to clean the project to get things going again.

tony.kay03:08:13

Yeah, that’s all it was. I restarted to make sure.

rm -rf resources/public/js target

tony.kay03:08:24

and restart your figwheel. Should be dreamy

josh_horwitz03:08:53

Hey, sorry, had to go check on the kid!

josh_horwitz03:08:21

Thanks for taking the time to look at it! let me try that out

josh_horwitz03:08:47

That did it, thanks!

josh_horwitz03:08:59

And now I will keep working through it, I'm also here for any beginner issues that you will need help with

josh_horwitz03:08:54

Anything special that needs to be done for spacemacs vs emacs? Can't seem to get it to run with spacemacs starting up cider-jack-in-clojurescript

tony.kay04:08:42

@josh_horwitz There is, but I highly recommend IntelliJ CE and a free Cursive license.

tony.kay04:08:15

costs nothing unless commercial. Works well without configuration.

tony.kay04:08:26

I think you need piggieback and some other bits. The fulcro-template is tuned to allow it, but I personally prefer IntelliJ+Cursive, so I don’t personally maintain that part.

josh_horwitz04:08:55

I'll try IntelliJ and Cursive, haven't tried it yet

claudiu06:08:12

43 minutes ❤️

tony.kay06:08:33

hopefully not too boring minutes

claudiu06:08:01

Tried adding the right memory store but it also seemed to lose data on restart server. Is this a desired behavior ? 🙂

claudiu06:08:08

Ended up using the cookie store, since for my project I don't have any public pages and logging in after every restart was just not practical once I started working more on the server 🙂

josh_horwitz13:08:20

@tony.kay Watching the videos now, thanks! Is it recommended to work through your Om Next tutorial first? Or jump into Fulcro tutorials?

tony.kay13:08:21

@josh_horwitz Skip Om Next docs and let me know. The devguide in Fulcro is based on my original Om tutorial. Trying to make the docs stand alone. I’m trying to avoid the level of confusion stock Om Next causes in newbies.

tony.kay13:08:16

@claudiu Restarting the server does lose state..that is part of leaving no trace behind. You’d have to use disk-based session store, or an atom in a non-refresh namespace in order to make it persistent across server restarts, which is what you’d need for production anyhow (session data shared among servers, and not affected by restarts).

tony.kay13:08:30

the memory store is just to show you how it works

josh_horwitz14:08:38

Great videos! Do you have a list of your Cursive keyboard shortcuts that you use?

cjmurphy14:08:00

@josh_horwitz: In IntelliJ go to file/Settings/keymap/Clojure keybindings to see the ones Colin Flemming (author of Cursive) has chosen.

cjmurphy14:08:10

If there isn't a keybinding and you want to put one in: File-&gt;Settings-&gt;Keymap. You can search for it there and assign it a key.

cjmurphy14:08:56

Also before anything you will want to read this carefully (speaking from experience): https://cursive-ide.com/userguide/keybindings.html

cjmurphy15:08:33

I only use raise (Control + Quote) and slurp forwards (Control + Shift + K). I'd be interested to know what would be a good addition to these two?? I've also defined F10 to be (restart) from user namespace and my own choice of F12 to jump to the REPL editor.

currentoor15:08:36

@tony.kay I was trying to write a macro to wrap logic in defmutation with some authorization but I’m stumped. I think I’ve got the issue down to a simple example. https://gist.github.com/currentoor/4241bb09de5293014e8633ff4e3ee6a5

currentoor16:08:15

@tony.kay bumping this in case you missed it, if you don’t have any ideas and I can’t figure it out, I suppose i could wrap the multimethod directly, instead of wrapping defmutation

tony.kay03:08:53

Hey, I guess I did miss this. Did you figure it out?

currentoor15:08:28

if both defmutation2 and defmuation3 example to the same code, why does one fail when i try to compile?

josh_horwitz18:08:41

@tony.kay Would Fulcro be appropriate if trying to integrate into an existing React application or is it more from the ground up?

gardnervickers19:08:11

@josh_horwitz most of what Fulcro/Om.next do replaces your React state store. So if you’re using Relay/Flux, Fulcro/Om.next forms opinions about that.

josh_horwitz20:08:42

Thanks @gardnervickers , I'm trying to figure out the best way to incrementally work in ClojureScript to my team

tony.kay21:08:23

I use the following: ALT-k - kill the form under the cursor ALT-SHIFT-( ) { } for slurp and barf (slurps are () and barfs are {}) ALT-r - raise (remove outer wrapping parens/brackets/braces) ALT-s - splice (inner list into outer list) ALT-t - thread (cursor on the thing you want to thread) CTRL-w ( - wrap with parens (let go of CTRL between w and ‘(’ ) also works with [ and { ALT-j - join (two adjacent lists) ALT-S - split the current list into two (capital S) CMD-SHIFT-R - open resource SHIFT-SHIFT (tap twice) is a built-in for an advanced open by fuzzy search on filename, symbol etc Raise, thread, open resource, splice, kill, and wrap are my heavy-hitters…I also use IdeaVIM to get VIM emulation, and I map CMD-SHIFT-V to toggle in on/off (it doesn’t work with multi-cursors, so I turn it off when I want that)

tony.kay21:08:47

Cursive also has parinfer (lower right control on the screen marked structural). I usually turn that OFF because it interferes with my editing habits. The parinfer mode is really cool but it isn’t my preference. See https://shaunlebron.github.io/parinfer/

tony.kay21:08:31

I think if I took the time to build the muscle memory I’d love it, which is why I mention it.

tony.kay21:08:52

@josh_horwitz As far as integrating: You can mount as many apps on a page as you want (each on their own div). So, you could partition bits off that way. You can also use any standard React stuff from Fulcro. Interop is complete, but Fulcro is meant to control the state model to give you a lot of the benefits. There is a project that can wrap stock Om components with queries and idents…so you can even make them part of the data model that way. Closure advanced optimizations does renaming, so you have to have the whole thing under clojurescript to get some of the goodies.

tony.kay21:08:30

Of course you can always hand-wrap components, as the dev guide shows in advanced UI with React victory charts.

tony.kay22:08:12

Off topic. A video I made as totality happened today (I live in the path of eclipse totality). https://youtu.be/cJz4Q1Nn1iE