Fork me on GitHub
#admin-announcements
<
2015-12-13
>
eugekev01:12:47

Can connect to remote REPL from CentOS to Mac, but not the reverse (Mac to CentOS). Opened up TCP and UDP on centos with firewall-cmd but still nothing. Not finding anything about firewalls and leiningen replโ€™s. Anyone know if anything fancy has to be done to centos?

naomarik08:12:08

@jaen brilliant, thanks for the link ๐Ÿ˜‰

hans10:12:22

eugekev: selinux

roelof13:12:49

If I have a template like this : https://laboutique.lemonstand.com/ which template engine like Selmer or Hiccup is the best ?

jaen13:12:35

The proper answer is "the one you feel more comfortable with".

jaen13:12:02

There are hardly things in template languages that make one better suited to certain types of pages than others.

roelof13:12:04

oke, I tried selmer and hiccup and both do not feel comfortable with

jaen13:12:46

Did you any web development in other language before at all?

roelof13:12:01

but maybe I schould give both a second try

roelof13:12:17

yep, I did any web development in ruby

jaen13:12:34

And what sort of template language did you prefer?

roelof13:12:59

I think they call it erb but that is a long time ago

jaen13:12:37

Yeah, that's the default Rails one. Were you comfortable with it?

jaen13:12:42

Then templating libraries most similar to ERB are https://github.com/weavejester/comb, https://github.com/Flamefork/fleet and https://github.com/kumarshantanu/basil (in no particular order)

jaen13:12:08

But I don't think selmer is all that far off to be honest in term of being alien.

jaen13:12:15

Certainly hiccup is the most different one.

roelof13:12:11

my problem with selmer was that I could not find how to convert the javascript , image and meta tags in html

roelof13:12:59

hiccup I miss something like template inheritance. I know you told me yesterday a way it could work but for me it was not working

sveri13:12:06

@roelof i think you should pick one now and stick with it. Build a prototype, start very simple and then raise the bar. After you are done, pick a different engine and repeat. See what you like an don't, maybe try another one.

roelof13:12:50

oke, so first without the javascript parts and so on

roelof13:12:46

then I think I give selmer a second try. I like the way that in selmer I can divide the template in parts

sveri13:12:04

Take it step by step, make it work for every single step, break it for every single step, understand every single step.

cjmurphy13:12:00

I am thinking of having views done in a templating language and then later use the snippets for Om-Next render 'methods'. Does this sound like a viable thing to do? If so which language would cause the least pain for translating to what Om-Next uses ?

cjmurphy13:12:40

The translating will just be done manually.

jaen13:12:57

With Om you could have used either sablono (hiccup-like) or kioo (enlive-like) templating. But I'm unsure if they are compatible with Om.next.

jaen13:12:19

Also while using kioo has a nice bonus of being able to interoperate with non-code-savvy designers easily (since the template is just a HTML mockup you select parts of with selectors and transform) at least with reagent it resulted in some awkwardness due to how reagent creates stateful components.

jaen13:12:28

It might have not been an issue with Om though.

cjmurphy13:12:33

I think with ON it might be quite stripped down. I like the idea of templating because the designer person can feed data in and we can get customer (potential) feedback. Having them as DevCards.

cjmurphy13:12:23

B/c the templating languages work on the Client and Server (cljs and clj).

cjmurphy13:12:37

I'm wondering out loud if this is a good idea. Another alternative is doing ON components straight - designer person to do that.

jaen13:12:20

Enlive/kioo in this case probably has an edge - the designer can create a mockup of the whole page in technologies he knows - HTML, CSS, jQuery, whatever. He doesn't need to understand one bit about Clojure or Clojurescript, maybe apart of how you have to do animation for React's CSS transform groups (but it's quite simple).

jaen13:12:37

And then you can just use kioo to turn that plain HTML mockup into React components.

jaen14:12:41

So if it's important for you that the designer has as little friction as possible, kioo might be the right choice.

cjmurphy14:12:05

I did animation with SVG, didn't know you could do it with CSS.

jaen14:12:59

For a certain value of "can", SVG is probably more expressive.

jaen14:12:11

But things like fading buttons, sliding drawers and so on - sure.

jaen14:12:19

CSS3 is pretty powerful these days.

cjmurphy14:12:29

The designer is actually more a Clojure person than an actual designer. I just like the idea of development going in two streams - one the view part and the other the data part, and then they meet from time to time.

cjmurphy14:12:41

So CSS3 for sliding buttons and drawers. I did trending/graphing with SVG. Dropped Quil for SVG.

jaen14:12:19

Hmm, if the designer is more of a Clojure person then I suppose there's nothing wrong with using the hiccup-like sablono then instead. If the person doing the designs groks Clojure it will be less friction for him.

jaen14:12:51

Kioo gives you this nice separation between the designer and templating, but if the designers groks Clojure I think it might be an unneeded barrier.

cjmurphy14:12:49

I'll copy him in on this thanks. Still yet to know what the format is for O-Next...

jaen14:12:24

Format as in?

cjmurphy14:12:17

templating language - so if like hiccup (which it it not I can tell that already) or more like html or like writing code...

jaen14:12:26

Basically plain Om (and Om.next) follows React in that regard - you have functions creating virtual DOM elements.

cjmurphy14:12:04

(dom/button #js {} "Save")

jaen14:12:20

Like in React you would do React.createElement("tag", {attribute: "value"}, content, here) in Om you do (om.dom/tag #js {:attribute "value"} content here)

cjmurphy14:12:24

But they are not vectors.

jaen14:12:29

And this is as much as om gives you

jaen14:12:36

No, just plain function calls.

jaen14:12:44

Exactly as in React.

cjmurphy14:12:16

I don't have Om experience, only React and reframe, bit re-com and re-views

jaen14:12:38

Me neither, I kind of didn't like Om v1.

jaen14:12:55

If you look at this - https://github.com/omcljs/om/blob/master/src/main/om/dom.clj - om.dom is basically a thing wrapper over React.createElement.

cjmurphy14:12:02

Yes that was what he said in the video - just React.

jaen14:12:14

*React.DOM

jaen14:12:24

But for some people it is somewhat too verbose

jaen14:12:28

So they created two libraries

jaen14:12:44

That wrap React.DOM into something nicer

jaen14:12:49

And there are two main options

jaen14:12:06

Sablono - which looks like hiccup (just as in Reagent) and kioo, which works like enlive.

jaen14:12:56

They both work with Reagent and Om V1. I see Sablono works with Om.next as well, but you'd have to check with kioo.

cjmurphy14:12:01

Yes so I've got some familiarity with hiccup style.

jaen14:12:01

And the choice is entirely up to you

jaen14:12:20

The most important deciding factor I think

jaen14:12:23

Is what I described above

jaen14:12:30

Regarding the designer

cjmurphy14:12:41

Or him in this case. Either just as easy/hard to manually translate to React.DOM

jaen14:12:15

If he knows only HTML+CSS+jQuery, then kioo is a better choice - he can remain in his comfort zone of technologies he knows well and you just write enlive templates in Clojure.

roelof14:12:28

I miss a sort of tutorial for beginners on react . I thought about using OM or re-frame but cannot find a complete tutorial for a complete beginner

jaen14:12:55

Or if he knows Clojure, then sablono is a better choice - you don't have to separate the designs out, since most of that benefit is lost when your designer can do Clojure.

roelof14:12:05

When using one of the two can I then loose the javascript parts ?

cjmurphy14:12:03

Roelof - actually straight Reagent is the easiest thing to pick up IMO. No form-1-2-3, just use @ and it happens!

cjmurphy14:12:21

From Reagent then re-frame not a big step.

cjmurphy14:12:49

It organises you not to have many ratoms.

roelof14:12:26

oke, then I have to learn reagent . I like the idea when a customer is adding something to the shopping cart , the cart is updating direct and no browser refresh is needed

cjmurphy14:12:35

Best way to learn is to try and understand other people's code. I started off with flappy-bird, which has been mentioned before.

roelof14:12:28

I think I will do the examples of the reagent github page and try to understand them

jaen14:12:46

> When using one of the two can I then loose the javascript parts ? Well, if you are using React, then normal Javascript libraries are more or less useless to you (I mean, you can wrap them to work with React most of the time, but that's not something I'd advise to a beginner), so you can ditch all the Javascript that is not Clojurescript.

roelof14:12:15

I will focus on that and forget my personal project for a time.

roelof14:12:35

and focus mainly on 4clojure

jaen14:12:19

Don't try to do big things. But don't focus only on 4Clojure - you will never learn anything other than writing algorithmic code that way. Just start really simple and learn things in chunks.

jaen14:12:29

Don't try to make a whole big SPA right from the get go.

roelof14:12:07

no, first learn to make some compents

jaen14:12:28

Yes, that sounds reasonable

roelof14:12:04

like the one on the intro page of reagent github page

roelof14:12:15

and try to understand them

jaen14:12:14

A good idea.

jaen14:12:22

Then, after you start getting hang of basic Reagent remember to read those - https://github.com/Day8/re-frame/wiki#reagent-tutorials - until you are sure you understand them completely.

jaen14:12:46

They will make sure you've gotten all your reagent basics right.

roelof14:12:13

oke, that will take care that im busy the next week or so

roelof14:12:48

thanks all

roelof14:12:36

last questions. Do I need to use the reagent template to try these examples on my own computer

roelof14:12:12

First problem. I did lein new reagent test and after that lein deps. but still I see this error message : 'ring' is not a task. See 'lein help'.

jaen14:12:00

That's +test not test, maybe try creating the project again?

jaen14:12:56

But I don't use lein, so I can't help you here much.

roelof14:12:58

yes, you use boot but I do not know if cursive can work with boot

roelof14:12:13

no the name is test I do not want to use testing at this moment

roelof14:12:25

I think I start the reagent the wrong way I did use lein ring server

jaen14:12:17

Ah, the name of project is test, that makes sense. I'd read the documentation then, it doesn't seem to say anything about lein ring in there.

jaen14:12:58

As for boot - yep, you can use it with Cursive pretty well, I'm using Cursive myself. But I'm not saying you should switch, don't overwhelm yourself with too much new things.

roelof14:12:23

I will not

roelof14:12:06

I will hit some more tutorials how to start the standard reagent tutorial

martinklepsch16:12:11

Is this prismatic the company shutting down or just their news feed products while the rest of the company continues to exist?

djkianoosh17:12:08

would be good for someone from their co to confirm, but I think itโ€™s just their news feed

djkianoosh17:12:30

but their news feed was really awesome, at least for me.. it sits right next to twitter, whatsapp, slack, etc on my phone.. it had an uncanny ability to show me relevant articles from different/new sources

roelof17:12:00

Re-frame is only usefull on SPA's ? Then I will only try to use Reagent. I think a ecommerce shop as spa is not so handy

naomarik18:12:17

what are opinions on http-kit vs immutant2? anyone have experience using both?

jaen18:12:59

Any specific thing you want to compare them on?

naomarik18:12:21

@jaen performance? simple_smile

naomarik18:12:41

anything you'd have to say about either

jaen18:12:42

If performance is what you're after

jaen18:12:00

Immutant is usually somewhat faster compared to http-kit as you can see.

jaen18:12:18

Both support asynchronous streaming replies.

jaen18:12:33

Both have sente adapters.

jaen18:12:46

http-kit seems less maintained these days.

naomarik18:12:53

is there any reason to use http-kit instead of immutant?

jaen18:12:07

Immutant has a slew of awesome companion libraries apart from the webserver - caching, messaging, scheduling. Can be deployed to Wildfly both standalone or in clustered mode (or you can make plain old uberjar as well).

jaen18:12:39

I suppose a downside can be Immutant doesn't have a http client like http-kit has.

jaen18:12:50

You'd have to use http-kit or aleph or something for that part.

naomarik18:12:18

isn't that what undertow is?

jaen18:12:32

It's a http server.

jaen18:12:40

Http-kit has both.

jaen18:12:44

Aleph as well.

jaen18:12:50

Immutant has just the server part.

jaen18:12:31

So if you want to fetch something from a REST API or the like - you'd have to bring in another library with Immutant.

jaen18:12:40

But I don't think that's a major downside.

jaen18:12:05

I'm not sure if there's anything else.

jaen18:12:17

Maybe someone else will chime in. There's also #C085AR8RE here.

naomarik18:12:14

that's kinda weird considering it's a combination of a few libs

jaen18:12:45

Generally undertow is a very good server and the additional libraries provided are a really nice touch, especially if you plan to deploy to Wildfly (otherwise less so, but still nice).

jaen18:12:51

Hmm, why would that be weird?

jaen18:12:20

If don't need hornetq - don't bring that in. No need for scheduling? Don't bring that in either.

jaen18:12:34

Kinda Clojurish to compartmentalise things into libraries.

naomarik18:12:09

there a single resource that compares and explains wildfly/glassfish/uberjar?

jaen18:12:41

I don't know, never done Java and those are specific Java things.

naomarik18:12:15

aren't these deployment options for clojure webapps?

jaen18:12:44

That too, but quite a bit of Clojure people were Java devs, so they just kind knew those things, I suppose.

jaen18:12:10

But generally you can either use a servlet container which then takes care of the server part and treats you application like a web request handler (Widlfy, Glassfish, Tomcat and so on are servlet containers)

jaen18:12:05

Or you can write your application as a server - then you would use an uberjar. It's a jar archive that has all libraries needed to run your application inside. You just java -jar uberjar.jar it.

naomarik18:12:27

yeah i've already played with that and used jconsole to JMX into it

naomarik18:12:29

was pretty awesome

naomarik18:12:40

from the luminus template

jaen18:12:44

Immutant has the ability to easily work both standalone and in a Wildfly.

jaen18:12:55

Http-kit can't work inside a container I think.

jaen18:12:11

Other options you would have to look up, but there are shims that turn Ring handlers into servlets.

naomarik18:12:38

what're the practices for deployments? compile locally and scp uberjar?

naomarik18:12:49

i'm sure there's some automation ๐Ÿ˜›

jaen18:12:59

Could be one option.

jaen18:12:06

Well, sure, but that's orthogonal to Clojure

jaen18:12:27

No-one's stopping you from using Capistrano or something.

jaen18:12:54

If you use uberjar you have to have something to take care it's running

jaen19:12:10

runit, monit, supervisord or somesuch

jaen19:12:27

Just like you would with a puma running a Rails app

jaen19:12:38

Or you can pack it up into a docker container.

jaen19:12:23

When you are using a servlet container it's a bit easier to deploy - you just have to make sure that Wildfly or something is running as a service

jaen19:12:36

And you just drop the war into the servlet container's deploy directory

jaen19:12:40

And it takes it from there.

naomarik19:12:58

wildfly seems like a sensible option

jaen19:12:56

Yeah, I've used it and it seemed quite nice

naomarik19:12:58

i'm assuming caring much about scaling isn't a concern like it is with rails

jaen19:12:18

Well, all applications need to scale at some point

jaen19:12:27

But yeah, the curve is less steep than in Ruby

naomarik19:12:39

yeah, but reaching that point with clojure you'd have to have something very used

naomarik19:12:44

rails not so much

jaen19:12:58

Can't tell you concrete numbers but yeah, you cen get by with less servers for sure

jaen19:12:08

When you learn the ropes of Wildfly you can look into clustering

jaen19:12:33

Immutant's stuff says it works easily with clustered Wildfly

jaen19:12:04

So you get distributed messaging, distributed caching, distrubted scheduling and distributed transactions

jaen19:12:16

Though distributed transactions are kind of an antipattern tbh.

naomarik19:12:32

i feel like i'm reaching the daily limit of new neuron connections my brain can make for the past few days

jaen19:12:22

Hahaha, I can understand that, at a certain point it can certainly feel like information overload.

donmullen19:12:06

@martinklepsch: Pretty sure prismatic as a company is continuing - and they are pivoting to leverage their software in a different way.

mpenet19:12:33

One of the co founders left tho

mccraigmccraig20:12:36

@naomarik: i'm putting my uberjars (with aleph servers or onyx peers) into docker containers, then deploying those with marathon on mesos - there's some upfront learning and setup cost, but once you are going it's super easy to deploy (docker push and then a curl to the marathon api, and your rolling upgrade is done) and scales nicely

naomarik20:12:06

@mccraigmccraig: you have any centralized logging with that?

mccraigmccraig20:12:27

yeah, i'm using logstash-forwarder/lumberjack on all nodes, pushing to a couple of logstash instances running on mesos/marathon... collecting logs from docker containers by mounting syslog into the containers and pushing application logs to syslog with a sensible tag

naomarik20:12:19

filebeat looks like the New Thing now

mccraigmccraig20:12:44

ooo i hadn't seen that. logstash-forwarder occasionally seems to get wedged so i'll def check out filebeat

naomarik20:12:39

what kind of app you running @mccraigmccraig ? is it trampoline data analytic stuff?

mccraigmccraig20:12:42

trampoline uses that architecture too - though i'm mostly working on a new enterprise chat system atm

naomarik20:12:11

a chat system like slack?

mccraigmccraig20:12:21

a bit different from slack... we've got specialised conversation types for solving specific problems - such as arranging shift-swaps / emergency cover

naomarik20:12:36

more for enterprisey kinda companies eh?

mccraigmccraig20:12:08

this release is mostly for companies where an unplanned absence directly causes loss of revenue - cafรฉs, restaurants, bars, hospitals etc

naomarik20:12:12

nice ๐Ÿ˜‰ so you can politely tell your boss you're not coming in while avoiding that confrontation ๐Ÿ˜›

mccraigmccraig20:12:06

and, most importantly, have arranged for someone else to cover for you, requiring your boss only to confirm the arrangement

mccraigmccraig20:12:40

have i met you @naomarik ? don't recognise the nick ...

naomarik20:12:07

nope, you only just started telling me about your docker deployment

mccraigmccraig20:12:04

sure... you knew about trampoline - though i guess that's probably my most public web association !

naomarik20:12:22

yah it's all over your handle ๐Ÿ˜›

mccraigmccraig20:12:09

ha, the perils of a googleable handle !

naomarik20:12:25

lol, have to act professional now at all times else risk your reputation!

markmandel23:12:20

Anyone else seen codox missing namespaces when generating documentation? Doesn't want to see brute.system namespace for some odd reason - https://github.com/markmandel/brute/blob/feature/reader-conditionals/src/brute/system.cljc. Wondering if it may have something to do with me moving to reader conditionals?

markmandel23:12:07

oooh.. (all-ns) doesn't show the brute.system namespace. So that is very odd...

markmandel23:12:13

it's not codox's fault