Fork me on GitHub
#beginners
<
2015-06-08
>
samueldev18:06:56

is there a clojurescript beginners channel>

samueldev18:06:05

or does this channel encompass both cljs and clj

samueldev18:06:35

i.e. should cljs nooby questions be posted here, or in clojurescript? simple_smile

seancorfield18:06:47

I think I’ve seen both types of Qs posted here so go ahead!

robert-stuttaford18:06:04

i think you’ll get your answer just about anywhere on here simple_smile

samueldev18:06:10

thanks gents

seancorfield18:06:36

We’re very definitely not all "gents" here...

samueldev18:06:48

by gents I meant 'gentlefolk', which encompasses all genders

seancorfield18:06:10

LOL. It’s just something I’m painfully aware of in our community as we work hard to improve the balance.

seancorfield18:06:37

So, anyway, what’s your ClojureScript question @samueldev ?

samueldev18:06:04

It was how to get this equivalent

samueldev18:06:09

in my outputted javascript

samueldev18:06:26

(function() { 'use strict'; })();

samueldev18:06:43

with my code on that empty line, naturally

samueldev18:06:01

do i have to do that on my build step using grunt or gulp or something, or is there a way to do it in cljs

samueldev18:06:39

if the former, thats fine, just looking to be pointed in the right direction simple_smile

kamn18:06:53

So a func that executes immediately? Or the starting call to kick off the process?

samueldev18:06:50

anonymous self invoking function

samueldev18:06:59

how most JS libs/modules are comprised

samueldev18:06:09

acts as a closure for the internal code

robert-stuttaford18:06:15

((fn [] (js/alert “howdy”)))

robert-stuttaford18:06:32

you don’t need to worry about this with cljs, though

robert-stuttaford18:06:25

as cljs is whole-program optimised and compiled by Google Closure closurelib

kamn18:06:45

Are you looking to make a general js lib/module with clojurescript?

samueldev18:06:05

is that perhaps not what I should be doing with cljs ?

samueldev18:06:38

I am tasked with eventually learning Clojure for work, and figured I would try and kill 2 birds with 1 stone by doing my immediate JS work in CLJS

samueldev18:06:08

(Angular project)

kamn18:06:33

I am fairly sure you can do that because of how cljs uses the google closure compiler

robert-stuttaford18:06:46

you can hit @tonsky up for details if you need to

robert-stuttaford18:06:43

i am thrilled to hear that you’re to learn Clojure for work simple_smile

samueldev18:06:59

it's the stack we use at liveops

samueldev18:06:03

almost entirely clojure microservices

kamn18:06:22

I am envious

samueldev18:06:36

im presently frontend only working on our angular side of things, but would like to clojureify as much of that as possible, to as I said kill 2 birds with 1 stone

robert-stuttaford18:06:11

excellent. much is possible simple_smile

robert-stuttaford18:06:00

if you’re brand new (or close to it), i heartily recommend https://www.youtube.com/watch?v=j-kj2qwJa_E