This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
@jr0cket: I wrote a tutorial on Reagent, aimed at beginners: https://github.com/vvvvalvalval/reagent-phonecat-tutorial
that being said, learning ClojureScript and Reagent may be too much at a time, you may want to start with just ClojureScript
hope it helps
So im trying to get natal work. and it looks like this line is failing.
testId = readFile("#{projName}.xcodeproj/project.pbxproj")
.match(new RegExp "([0-9A-F]+) \/\\* #{projName}Tests \\*\/ = \\{")[1]
Im not sure what the regex is trying to find.
@mfikes: any idea? im only asking because it seems you might have an idea about how this all works?
@underplank: Did you use a funky project name?
At the moment Im just trying the FutureApp
as in the instructions
hmm… let me run it again.
I think the issue with the line is that it reads the file (which is there) but when it runs the regex it gets a null back. which it cant get the first element from.
Cannot read property '1' of null
is the error.
I just upgraded to El Capitan, and the latest Xcode.
hmm… at his point has it actually used any xcode stuff?
There are half a dozen major deps. Node, CocoaPods…, etc. I just tried today with the latest of all of them.
ok.. I think I should be uptodate.
Could you look in your working version at the file "#{projName}.xcodeproj/xcshareddata/xcschemes/#{projName}.xcscheme”,
and see what the value of BlueprintIdentifier is?
thats what its trying to put testId into.
at least then I can see what its trying to get out
@underplank: I see a line that looks like this in project.pbxproj
:
00E356EF1AD99517003FC87E /* FutureAppTests */ = {
@underplank: I also see the same identifier in the xcscheme
file with some likes that look like
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "FutureAppTests.xctest"
BlueprintName = “FutureAppTests”
@mfikes: ahh ok. i’ll see if I can track it down… I wonder if Im missing something that means thats not getting generated correctly or something,
@underplank: Yeah, perhaps there is a bad assumption Dan Motzenbecker’s code is making.
hmm.. I found it.. I wonder why the regex is not matching
its like line 207 or so of that file?
@underplank: For me node —version
-> v4.2.1
im v4.2.1 as well
hmm.. so I have the value. the regex just isnt pulling it out..
curioser and curioser… when building the regex manually in the node repl… seems to work.
ok, so managed to get pass that issue. not sure what changed.
now im getting
The following build commands failed:
CompileC /Users/underplank/Library/Developer/Xcode/DerivedData/Future-gowhketvrxqjhkftpaopyzoggoqt/Build/Intermediates/RCTNetwork.build/Debug-iphonesimulator/RCTNetwork.build/Objects-normal/x86_64/RCTNetworking.o RCTNetworking.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
Analyze RCTNetworking.m
@underplank: It may have progressed far enough through initialization where you can now go into future-app
and do natal xcode
and maybe see more details about the failure.
great. that worked.
@underplank: Does it build in Xcode, start up the React Packager, and launch the app in the simulator?
looks like it doesnt build in xcode. Its saying it has Parse Issues with RCTWebSocket and RCTNetwork...
I dont know what those do, but are they packages by Natal?
ahh looks like they are react native libs
hmm… where do you specify the version of react installed>
Im wondering if somehow I have an older version of react-native?
See this for example: https://github.com/dmotz/natal/commit/7b5e56b4ed597b3318f5493fa43085d96236282c
ahh ok… so im on -.13.0-rc
might see if bumping it down to 0.12.0 might help.
Earlier today, I had a spurious build failure when testing with one box, but retrying worked. Otherwise, things generally have been reliable for me assuming I keep all of the dependencies in line. 5 runtimes: V8 , Java, Ruby, Objective-C, JavaScriptCore, and 6 languages or so: JavaScript, Java, Clojure, ClojureScript, CoffeeScript, Ruby, Objective-C. What can possibly go wrong?
@mfikes: well I dont think its an issue with natal as such. I think it might be something on my laptop thats stuffing it up. If I do just a straight-up react-native it doesnt work either.
gah… I think I know what it is… Im running an older version of xcode. That I partially installed a while ago...
@underplank: Yeah. Dan started off Natal with the philosophy that it would simply set everything up for you, but presume that you have all of the underlying deps in line. But since then, he’s been adding checks for things, given that Natal is likely to be used by some new curious user, and there is might be only one chance for it to work before that user gives up if it breaks. For example, it makes sure you have watchman
installed, etc.
@underplank: Ahh, was the parse error related to null / nullability annotations?
It was some kind of type problem.. RCT_EXPORT_METHOD or something.
Oh while you are here, have you tried do react-native with reagent instead of Om?
ha, just found your blog post it appears it does
Yes... I haven't done much at all with Reagent but sorted how to hook the Ambly REPL to it.
should it be possible to serve figwheel to a node client on another host? i've set :figwheel-options {:websocket-host "sanderbook.local"}
. running node main.js
on sanderbook.local
creates the connection as expected, but running node main.js
on a different computer on the same network quits at Figwheel: trying to open cljs reload socket
.
@sander: I have no idea, it should work, but it has never been tested. This works for devices. I would check the obvious network stuff. And see if you can get to your machine from the outside.
@bhauman: thanks for the quick reply, ping sanderbook.local
from the device (intel edison computer on the same local network) works normally. i'll check what happens if i remove the :websocket-host, i.e. whether node still exists early on the edison
also, telnet <ip-address-of-sanderbook.local> 3449
gives the suggestion port 3449 is accessible
ok, seems to be a different problem, node main.js
also exits early when :websocket-host
is not set, so it doesn't exit after setting up figwheel. maybe it just exits because all of the :main
code finished running before a figwheel connection was set up
@bhauman: now i got the process to keep running (`(js/setInterval (fn []) 10000)`), but figwheel still doesn't say any more than trying to open cljs reload socket
. is there a way to get more debug info, e.g. see what hostname figwheel is trying to access? i wonder whether :websocket-host
affects the client-side script, or just the server-side script
@sander there is a :debug true option that you can put right next to your :websocket-host
@sander but if you are really wanting to dbug this you are going to need to checkout the fighweel code and modify it. You can also checkout remote debugging for node.js
@bhauman: thanks, looks useful, will check that out later. now i ran with NODE_DEBUG=net,http
and saw that the compiled script still tried to connect to localhost
, so i'll try to figure out why it didn't pick up :websocket-host
turned out to be an error on my side, shouldn't put :websocket-host
in :figwheel-options
but in specific build configurations
Hello friends. I am trying to work through the om tutorial https://github.com/omcljs/om/wiki/Basic-Tutorial and I am having some issues that I don't understand. I was able to successfully render the list of strings, but when I attempt to render the contacts components I get some JS functions printed as strings in the browser. cljs and browser output here http://pastebin.com/6vxsNq0B
Yeah that would definitely help. I am trying to get emacs set up in a way I like. Do you know of an emacs package that can do that?
no, i find intellij/cursive easy for this stuff (still haven't gotten to setting up emacs as i'd like either)
@val_waeselynck thanks for the tutorial, it looks very good, however we could not get figwheel to start a repl. It looks like it starts up but we get no repl prompt. We are using Java 8 on MacOSX, Windows & Ubuntu. Are we missing something ?