Fork me on GitHub

@ackerleytng I am interested in knowing why you decided against. I am currently using ClojureScript for lamdba functions. Have you profiled how much the size of the compiled JavaScript influences lamdba runtime or startup?


I myself have not but I do not think size neither really matters for runtime nor startup


@richiardiandrea and you don't have any startup issues?


Which issues are we talking about? Do you mean time? Function code is cached and if the lamdba is warm you never have to startup again. Having said that I did not perform any measurements of startup time vs zip size


I guess the issue for some is the getting warm part, where code size does affect execution time


but I understand some applications can afford that


I have yet to see a non-warm lamdba during normal app life. I would not try to optimize for that use


Also, usually on AWS the js file is one for all the lamdbas so they are effectively fetching it (and they cache it for you) for at least one call

Karol Wójcik05:08:30

Every concurrent execution of aws lambda has cold start. IMO the clojurescript is not the problem here because a lot of people use webpack so their bundle has higher siz than cljs one


@richiardiandrea i guess it's mainly because i have a hard 100kb limit, as imposed by how big are your compiled javascript files?


In this order of megabytes - webtask's limit feels very odd. I will investigate that

Karol Wójcik05:08:24

@ackerleytng could you please share your code?


Can you recommend something to read about best practices for module development? Especially about how to try version on my hard drive during development as dependency in another project. Also I want to give developers example of projects depend on this module. Should I make separate repositories or create folder “examples” in module repository?


So silence… what happen to everybody? Friday? 😉


@kwladyka you could do npm link, to globally install npm module youre developing, its basicslly a symbolic link to a directory, or do you want to access multiple versions locally?


In that case, you could always ask your companys sysadmin to set up verdaccio.


I need to change repo of module and use it as dependency in example, so I need only version from my local hard drive during development


hmm symbolic link can be a solution, but not sure how to link cljs module to node_modules in correct way to use it as dependency in project.clj?


Hmm, what do you mean by cljs module. Because the idea is that you compile the cljs to js before requireing it from node_modules


Otherwise you can always just use maven


For local jars in development


Food on the table brb


I mean the obvious solution looks like use it in :dependecies in project.clj


No reason to make node_module dependency from that


thx, I am going to read what is it 🙂


Is it a way to do it the same with shadow-cljs?


Ah I remember this checkouts… I was reading about it a long time ago


nothing built-in no. you can just add the :source-paths though


:source-paths ["src/main" "checkouts/foo/src/main"]


hi - has anybody had success using React.createRef() and om-next components? I seem to be having issues with the ref that I create not being bound to the DOM object due to the lifecycle in React. I am reluctant to use the string refs as they are supposedly going to be deprecated.


So I'm trying to update cljs-react-material-ui to 1.4 which is what cljsjs.material-ui is on atm. I'm wondering if there is a good way to update a library as you're using it in another project. So far it seems that I need to rebuild my project every time I make a change to the library. The only solution I can think of is to build the library source as part of my project which doesn't seem ideal. Anyone been in this kinda situation before?


I have example project in the library repository which has the library in sources: Bad thing is that you have to copy-paste dependencies from the library. I noticed though that Metosin is using some plugin lein-parent: ( which seems to be able to inherit project.clj from the library (I didn't test it yet though).


interesting. Thank you!


hey @lane are you trying to use a different version of material-ui in two different projects?


@funkrider nope, pretty much just working with a template. I'm planning to use material-ui for a project, but I wanted to use a newer version. That lead me to start updating cljs-react-material-ui so that I could use 1.4 for this project.


I was just thinking it'd be nice to run the example code while updating the library


Since it helps me figure out what I need to change in the library


side note, when we have cljs libraries that are basically just wrappers for js libraries, wouldn't it make sense to version the library based on the version of the js library that it uses?


I see [cljsjs/material-ui "1.4.0-0"] on


you can just go ahead and use that as a ref in your project and your good to go i think?


Yep, that one is good to go. The one I'm referencing, cljs-react-material-ui is basically just reagent adaptation and some other helpers so that you can do, for example, (color :blue200) rather than (aget js/MaterialUIColors "blue" "200")


and so when i finish updating it I'll probably upload a jar somewhere so that other folks can use the updated version. I was just wondering if there's any downside to me making the version match the cljsjs/material-ui version

Michael Thurmond23:08:31

I'm trying to get his in my cljs ns `<script type="text/javascript"> window.onload = function () { var gridViewScroll = new GridViewScroll({ elementID : "gvMain" // Target element id }); gridViewScroll.enhance(); } </script>`

Michael Thurmond23:08:18

and here is my handler `clojure (defn on-load-hander [] (prn "onload handler mt") (reset! my-table (js/GridViewScroll. (clj->js {:elementID "test" :freezeColumn true :freezeColumnCssClass "GridViewScrollItemFreeze" :freezeHeaderRowCount 1 :freezeColumnCount 1 :onscroll (fn [scrollTop scrollLeft]) }))) (prn @my-table) (prn (js->clj @my-table)) (prn (aget (js->clj @my-table) "GridViewScroll")) (js-invoke @my-table "enhance") ;(prn (js->clj @my-table)) ;(prn (clj->js @my-table)) ;(prn (aget (clj->js @my-table) (clj->js :elementID))) ;(prn (aget (clj->js @my-table) (js->clj :elementID))) ;(prn (aget @my-table "elementID")) ;(prn (aget (clj->js @my-table) "elementID")) ; (prn (aget (js->clj @my-table) "elementID")) ) `

Michael Thurmond23:08:32

for some reason I'm having trouble refrencing my-table atom and viwiew the properties to see if gridviewscroll was actually created