cljsjs

martinklepsch 2016-12-13T09:58:06.000088Z

@ashnur re .inc.js: the package task finds the important files for a package by their file extensions

Aron 2016-12-13T09:58:30.000089Z

i see, but because .inc.js was not in the example i copied, this looks strange

martinklepsch 2016-12-13T09:58:36.000090Z

@ashnur have you read/walked through this: https://github.com/cljsjs/packages/wiki/Creating-Packages

martinklepsch 2016-12-13T09:59:07.000092Z

😉 https://github.com/cljsjs/packages/blob/master/blockapps/build.boot#L43

Aron 2016-12-13T10:00:53.000094Z

i did read that up until the part i am dealing with now: boot packages

Aron 2016-12-13T10:01:10.000095Z

so i have the externs file and everything what's written before it, that was easy

martinklepsch 2016-12-13T10:03:27.000096Z

in the blockapps line I linked the compiled JS file (the one you want to load in your app is moved from it's location to cljsjs/.../blockapps.inc.js

martinklepsch 2016-12-13T10:03:56.000097Z

once you have your compiled file you can take a look at that sift task invocation

Aron 2016-12-13T10:09:47.000098Z

Writing jsnetworkx-0.3.4-0.jar...

Aron 2016-12-13T10:09:56.000099Z

i have no idea if it works or not but no errors

martinklepsch 2016-12-13T10:25:21.000100Z

if you show me your build.boot again I can take a look if it looks proper

Aron 2016-12-13T10:27:05.000103Z

writing boot package install target creates a target directory with the jar

Aron 2016-12-13T10:27:16.000104Z

now i just have to try to require it i think

martinklepsch 2016-12-13T10:27:26.000105Z

you can inspect the contents of jars with jar tf some.jar btw

Aron 2016-12-13T10:30:47.000106Z

i have to upgrade lein

Aron 2016-12-13T10:30:53.000107Z

then i will try to require it

martinklepsch 2016-12-13T10:31:30.000108Z

@ashnur does the downloaded zip include a JS file that is meant to be used in a browser (i.e. via a script tag)?

martinklepsch 2016-12-13T10:31:50.000110Z

In this case you don't need the whole build-blockapps task

martinklepsch 2016-12-13T10:31:51.000111Z

🙂

Aron 2016-12-13T10:33:21.000112Z

i think it has, but the package json also has build tasks and i plan on using the output of that if i get there

Aron 2016-12-13T10:33:54.000113Z

maybe i shouldn't use the arch linux lein package, they didn't upgrade it yet it seems

Aron 2016-12-13T11:07:55.000114Z

@martinklepsch so, after boot package install target, and writing [cljsjs/jsnetworkx "0.3.4"] in the :dependencies, what else do I need to be able to use this locally?

martinklepsch 2016-12-13T11:10:09.000115Z

you need to require it in your code otherwise it's not added to the build (because nothing depends on it)

martinklepsch 2016-12-13T11:10:25.000116Z

https://gist.github.com/ashnur/5b21d929572bad24b5e26e09f8a27c24#file-build-boot-L45 — for that you should probably update the name here

martinklepsch 2016-12-13T11:10:48.000117Z

and then add a require like (:require [cljsjs.jsnetworkx]) to one of your namespaces

Aron 2016-12-13T11:10:59.000118Z

it just says this

Could not find artifact cljsjs:jsnetworkx:jar:0.3.4 in central (<https://repo1.maven.org/maven2/>)
Could not find artifact cljsjs:jsnetworkx:jar:0.3.4 in clojars (<https://clojars.org/repo/>)
This could be due to a typo in :dependencies or network issues.

martinklepsch 2016-12-13T11:11:11.000119Z

be aware that you cannot alias these namespaces or refer things in those namespaces. They're "synthetic"

Aron 2016-12-13T11:11:15.000120Z

updated the name of course 🙂

Aron 2016-12-13T11:11:28.000121Z

ok, i don't know what synthetic means

Aron 2016-12-13T11:11:36.000122Z

i am not trying anything weird afaik

martinklepsch 2016-12-13T11:11:54.000123Z

ls ~/.m2/repository/cljsjs/

martinklepsch 2016-12-13T11:12:20.000124Z

not important to understand, just don't forget that you cannot use :as and :refer with these namespaces

Aron 2016-12-13T11:12:20.000125Z

boot-cljsjs d3 jsnetworkx react react-dom react-dom-server

Aron 2016-12-13T11:12:31.000126Z

ok, i will keep in mind, thx

martinklepsch 2016-12-13T11:12:40.000127Z

what's in the jsnetworkx dir?

martinklepsch 2016-12-13T11:12:54.000128Z

ah. The version is missing the -0

martinklepsch 2016-12-13T11:13:11.000129Z

[cljsjs/jsnetworkx "0.3.4-0"]

Aron 2016-12-13T11:13:14.000130Z

0.3.4 0.3.4-0 maven-metadata-local.xml

Aron 2016-12-13T11:13:16.000131Z

trying it

martinklepsch 2016-12-13T11:13:37.000132Z

when you run the install task it will print the used version (you can check next time)

Aron 2016-12-13T11:13:56.000133Z

yes, it works now, thanks again

Aron 2016-12-13T11:14:14.000134Z

oh, it might be actually done

Aron 2016-12-13T11:21:49.000135Z

it works, but i am still not entirely happy about it. it bothers me that although i am requiring cljsjs/jsnetworkx i have to use js/jsnx if i want to reach the required module

martinklepsch 2016-12-13T11:22:26.000136Z

That's how the world works (right now) 😄

Aron 2016-12-13T11:22:50.000137Z

that was never a good enough answer for me 😄

Aron 2016-12-13T11:22:56.000138Z

especially in the case of learning projects

Aron 2016-12-13T11:23:10.000139Z

if i had to to this for money, i don't waste this much time on using a js lib 😄

martinklepsch 2016-12-13T11:24:11.000140Z

You can contribute to the Google Closure Compiler and ClojureScript compiler. There's work underway to convert various forms of JS to compatible modules which you could then use with :as :refer etc

Aron 2016-12-13T11:25:52.000141Z

"you can contribute" right 😄

Aron 2016-12-13T11:26:15.000142Z

you mean that there is nothing blocking me besides the shortness of an average human lifetime 😄

martinklepsch 2016-12-13T11:33:34.000143Z

That constraint applies to all of us 🙂

Aron 2016-12-13T11:33:43.000144Z

not to the same degree

martinklepsch 2016-12-13T11:34:09.000145Z

Not sure I follow?

martinklepsch 2016-12-13T11:34:23.000146Z

Some people don't die? 😄

Aron 2016-12-13T11:34:53.000148Z

well, the difference between me and someone who contributed to google closure compiler and clojurescript compiler is perhaps bigger than the difference between me and my 90 year old grandmother

Aron 2016-12-13T11:35:03.000149Z

at least from the perspective of how much each of us can help

martinklepsch 2016-12-13T11:35:30.000150Z

sure but they paid for that ability with a lot of time and commitment

martinklepsch 2016-12-13T11:35:45.000151Z

not doing other things 😉

Aron 2016-12-13T11:35:55.000152Z

having time to learn is a privilege, not one that most people have access to

martinklepsch 2016-12-13T11:36:58.000153Z

True. Although not sure what you're getting at?

Aron 2016-12-13T11:37:11.000154Z

well, we got very fast into philosophy, sorry 🙂

Aron 2016-12-13T11:37:49.000155Z

i am just saying that i don't see when i would have time and energy and ultimately motivation to learn what is required for those projects

Aron 2016-12-13T11:38:20.000156Z

especially how hard clojurescript is even though i've been using datascript for more than a year and mori more than even that

martinklepsch 2016-12-13T11:39:20.000157Z

If you think you don't have time to contribute that's fine. No one is expecting anyone to work on any of this stuff.

martinklepsch 2016-12-13T11:40:25.000158Z

Everyone has their individual priorities and that's something we all have to respect.

Aron 2016-12-13T11:41:21.000159Z

yeah, this is why we got into philosophy, the way you describe it sounds as if i had a choice 😛

Aron 2016-12-13T11:41:49.000160Z

anyway, not important ultimately

martinklepsch 2016-12-13T11:42:31.000161Z

Dunno, you always have a choice no? Just sometimes the downside is too big

Aron 2016-12-13T11:42:38.000162Z

that's the myth

Aron 2016-12-13T11:43:09.000163Z

i believe that there are no actual choices, more like situations when there are some flexibility in what we do, but not much

Aron 2016-12-13T11:43:20.000164Z

circumstances define most of our actions, etc.

Aron 2016-12-13T11:44:08.000165Z

not saying there is no free will, but it's free in the sense that it's not tied up, not in the sense that it has no or few limitations. actually, there are way way more limitations of our brains that most people even allow to be discussed

Aron 2016-12-13T11:44:52.000166Z

but again, that's the philosophy part. for me, this is just learning now, i want to use clojurescript reagent datascript canvas + d3 and now this jsnx too

Aron 2016-12-13T11:45:25.000167Z

i focus on short term goals like these, and when this is done, i have a list from which i choose, and sometimes i add to that list but it has dozens of items already 🙂

Aron 2016-12-13T11:47:21.000168Z

https://www.youtube.com/watch?v=DykJ9_nlvbY

Aron 2016-12-13T11:48:48.000171Z

i remember these were the first lectures i saw that made me think about these things in depth

Aron 2016-12-13T11:52:03.000172Z

https://www.youtube.com/watch?v=80R3goexOew and this was the latest and greatest. Ignore mostly everyone but what Carol Rovane talks about 🙂

Aron 2016-12-13T11:52:19.000174Z

and now you might think, "aha, that's why he has no time" 😛