Fork me on GitHub
#clojurescript
<
2015-10-18
>
val_waeselynck02:10:55

that being said, learning ClojureScript and Reagent may be too much at a time, you may want to start with just ClojureScript simple_smile

underplank02:10:08

So im trying to get natal work. and it looks like this line is failing.

underplank02:10:21

testId = readFile("#{projName}.xcodeproj/project.pbxproj")
      .match(new RegExp "([0-9A-F]+) \/\\* #{projName}Tests \\*\/ = \\{")[1]

underplank02:10:34

Im not sure what the regex is trying to find.

underplank02:10:06

@mfikes: any idea? im only asking because it seems you might have an idea about how this all works?

mfikes02:10:51

@underplank: Did you use a funky project name?

mfikes02:10:16

Try something simple like FooApp simple_smile

underplank02:10:56

At the moment Im just trying the FutureApp as in the instructions

mfikes02:10:11

So, it’s not that...

mfikes02:10:29

What error did you get?

underplank02:10:29

hmm… let me run it again.

underplank03:10:04

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.

mfikes03:10:22

Which version of Xcode?

underplank03:10:54

Cannot read property '1' of null is the error.

underplank03:10:26

I just upgraded to El Capitan, and the latest Xcode.

mfikes03:10:42

OK. I just tried that today and it worked for me...

underplank03:10:56

hmm… at his point has it actually used any xcode stuff?

mfikes03:10:08

There are half a dozen major deps. Node, CocoaPods…, etc. I just tried today with the latest of all of them.

underplank03:10:41

ok.. I think I should be uptodate.

underplank03:10:02

Could you look in your working version at the file "#{projName}.xcodeproj/xcshareddata/xcschemes/#{projName}.xcscheme”,

underplank03:10:18

and see what the value of BlueprintIdentifier is?

mfikes03:10:26

Yeah… let me generate a FutureApp real quick

underplank03:10:26

thats what its trying to put testId into.

underplank03:10:39

at least then I can see what its trying to get out simple_smile

mfikes03:10:42

@underplank: I see a line that looks like this in project.pbxproj:

00E356EF1AD99517003FC87E /* FutureAppTests */ = {

mfikes03:10:49

@underplank: I also see the same identifier in the xcscheme file with some likes that look like

BlueprintIdentifier = "00E356ED1AD99517003FC87E"
               BuildableName = "FutureAppTests.xctest"
               BlueprintName = “FutureAppTests”

underplank03:10:35

@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,

mfikes03:10:43

@underplank: Yeah, perhaps there is a bad assumption Dan Motzenbecker’s code is making.

underplank03:10:21

hmm.. I found it.. I wonder why the regex is not matching

underplank03:10:09

its like line 207 or so of that file?

mfikes03:10:09

@underplank: For me node —version -> v4.2.1

underplank03:10:28

im v4.2.1 as well

mfikes03:10:47

Yes, exactly on line 207

underplank03:10:35

hmm.. so I have the value. the regex just isnt pulling it out..

underplank03:10:23

curioser and curioser… when building the regex manually in the node repl… seems to work.

underplank03:10:51

ok, so managed to get pass that issue. not sure what changed.

underplank03:10:01

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

mfikes03:10:03

@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.

underplank03:10:47

great. that worked.

mfikes03:10:01

@underplank: Does it build in Xcode, start up the React Packager, and launch the app in the simulator?

underplank03:10:44

looks like it doesnt build in xcode. Its saying it has Parse Issues with RCTWebSocket and RCTNetwork...

underplank03:10:04

I dont know what those do, but are they packages by Natal?

underplank03:10:40

ahh looks like they are react native libs

underplank03:10:09

hmm… where do you specify the version of react installed>

mfikes03:10:27

That’s a good question

underplank03:10:48

Im wondering if somehow I have an older version of react-native?

underplank03:10:34

ahh ok… so im on -.13.0-rc

underplank03:10:22

might see if bumping it down to 0.12.0 might help.

mfikes04:10:49

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?

underplank04:10:57

@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.

underplank04:10:13

gah… I think I know what it is… Im running an older version of xcode. That I partially installed a while ago...

mfikes04:10:42

@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.

mfikes04:10:57

@underplank: Ahh, was the parse error related to null / nullability annotations?

underplank04:10:48

It was some kind of type problem.. RCT_EXPORT_METHOD or something.

underplank04:10:18

Oh while you are here, have you tried do react-native with reagent instead of Om?

underplank04:10:55

ha, just found your blog post simple_smile it appears it does simple_smile

mfikes04:10:43

Yes... I haven't done much at all with Reagent but sorted how to hook the Ambly REPL to it.

sander13:10:10

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.

bhauman13:10:13

@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.

sander13:10:44

@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

sander13:10:12

also, telnet <ip-address-of-sanderbook.local> 3449 gives the suggestion port 3449 is accessible

sander13:10:09

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

sander13:10:34

@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

bhauman13:10:19

websocket-host only affects the client script.

bhauman13:10:55

@sander there is a :debug true option that you can put right next to your :websocket-host

bhauman13:10:23

@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

sander13:10:42

@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

sander13:10:56

turned out to be an error on my side, shouldn't put :websocket-host in :figwheel-options but in specific build configurations

mulchy15:10:21

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

mulchy15:10:03

Can anyone here help me try and figure out what I am doing wrong with ^

sander15:10:09

@mulchy: s/fist/first in display-name

mulchy15:10:36

@sander thanks a lot. I feel reaaal dumb now 😖

sander15:10:05

no problem, you might want to use a code editor that highlights unused variables

mulchy15:10:58

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?

sander15:10:29

no, i find intellij/cursive easy for this stuff (still haven't gotten to setting up emacs as i'd like either)

mulchy15:10:01

Yeah a friend was telling me how much they like cursive. I'll have to check it out

practicalli-johnny23:10:11

@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 ?