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?
@jaen brilliant, thanks for the link π
eugekev: selinux
If I have a template like this : https://laboutique.lemonstand.com/ which template engine like Selmer or Hiccup is the best ?
The proper answer is "the one you feel more comfortable with".
There are hardly things in template languages that make one better suited to certain types of pages than others.
oke, I tried selmer and hiccup and both do not feel comfortable with
Did you any web development in other language before at all?
but maybe I schould give both a second try
yep, I did any web development in ruby
And what sort of template language did you prefer?
I think they call it erb but that is a long time ago
Yeah, that's the default Rails one. Were you comfortable with it?
yep
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)
But I don't think selmer is all that far off to be honest in term of being alien.
Certainly hiccup is the most different one.
my problem with selmer was that I could not find how to convert the javascript , image and meta tags in html
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
@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.
oke, so first without the javascript parts and so on
then I think I give selmer a second try. I like the way that in selmer I can divide the template in parts
Take it step by step, make it work for every single step, break it for every single step, understand every single step.
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 ?
The translating will just be done manually.
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.
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.
It might have not been an issue with Om though.
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.
B/c the templating languages work on the Client and Server (cljs and clj).
I'm wondering out loud if this is a good idea. Another alternative is doing ON components straight - designer person to do that.
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).
And then you can just use kioo to turn that plain HTML mockup into React components.
You can take a look at the sample here - https://github.com/ckirkendall/kioo/tree/master/example/om
So if it's important for you that the designer has as little friction as possible, kioo might be the right choice.
I did animation with SVG, didn't know you could do it with CSS.
For a certain value of "can", SVG is probably more expressive.
But things like fading buttons, sliding drawers and so on - sure.
CSS3 is pretty powerful these days.
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.
So CSS3 for sliding buttons and drawers. I did trending/graphing with SVG. Dropped Quil for SVG.
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.
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.
I'll copy him in on this thanks. Still yet to know what the format is for O-Next...
Format as in?
templating language - so if like hiccup (which it it not I can tell that already) or more like html or like writing code...
Basically plain Om (and Om.next) follows React in that regard - you have functions creating virtual DOM elements.
(dom/button #js {} "Save")
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)
Yes
But they are not vectors.
And this is as much as om gives you
No, just plain function calls.
Exactly as in React.
I don't have Om experience, only React and reframe, bit re-com and re-views
Me neither, I kind of didn't like Om v1.
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
.
Yes that was what he said in the video - just React.
*React.DOM
But for some people it is somewhat too verbose
So they created two libraries
That wrap React.DOM
into something nicer
And there are two main options
Sablono - which looks like hiccup (just as in Reagent) and kioo, which works like enlive.
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.
Yes so I've got some familiarity with hiccup style.
And the choice is entirely up to you
The most important deciding factor I think
Is what I described above
Regarding the designer
Or him in this case. Either just as easy/hard to manually translate to React.DOM
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.
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
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.
When using one of the two can I then loose the javascript parts ?
Roelof - actually straight Reagent is the easiest thing to pick up IMO. No form-1-2-3, just use @ and it happens!
From Reagent then re-frame not a big step.
It organises you not to have many ratoms.
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
Best way to learn is to try and understand other people's code. I started off with flappy-bird, which has been mentioned before.
I think I will do the examples of the reagent github page and try to understand them
> 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.
I will focus on that and forget my personal project for a time.
and focus mainly on 4clojure
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.
Don't try to make a whole big SPA right from the get go.
no, first learn to make some compents
Yes, that sounds reasonable
like the one on the intro page of reagent github page
and try to understand them
A good idea.
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.
They will make sure you've gotten all your reagent basics right.
oke, that will take care that im busy the next week or so
thanks all
last questions. Do I need to use the reagent template to try these examples on my own computer
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'.
That's +test
not test
, maybe try creating the project again?
But I don't use lein, so I can't help you here much.
yes, you use boot but I do not know if cursive can work with boot
no the name is test I do not want to use testing at this moment
I think I start the reagent the wrong way I did use lein ring server
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.
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.
I will not
I will hit some more tutorials how to start the standard reagent tutorial
ICYMI Prismatic is shutting down: http://blog.getprismatic.com/next-chapter/
Is this prismatic the company shutting down or just their news feed products while the rest of the company continues to exist?
would be good for someone from their co to confirm, but I think itβs just their news feed
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
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
what are opinions on http-kit vs immutant2? anyone have experience using both?
Any specific thing you want to compare them on?
@jaen performance? :simple_smile:
anything you'd have to say about either
You can take a look here - https://github.com/ptaoussanis/clojure-web-server-benchmarks
If performance is what you're after
Immutant is usually somewhat faster compared to http-kit as you can see.
Both support asynchronous streaming replies.
Both have sente adapters.
http-kit seems less maintained these days.
is there any reason to use http-kit instead of immutant?
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).
Hmm
I suppose a downside can be Immutant doesn't have a http client like http-kit has.
You'd have to use http-kit or aleph or something for that part.
isn't that what undertow is?
It's a http server.
Http-kit has both.
Aleph as well.
Immutant has just the server part.
So if you want to fetch something from a REST API or the like - you'd have to bring in another library with Immutant.
aha
But I don't think that's a major downside.
I'm not sure if there's anything else.
Maybe someone else will chime in. There's also #C085AR8RE here.
that's kinda weird considering it's a combination of a few libs
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).
Hmm, why would that be weird?
If don't need hornetq - don't bring that in. No need for scheduling? Don't bring that in either.
Kinda Clojurish to compartmentalise things into libraries.
there a single resource that compares and explains wildfly/glassfish/uberjar?
I don't know, never done Java and those are specific Java things.
aren't these deployment options for clojure webapps?
That too, but quite a bit of Clojure people were Java devs, so they just kind knew those things, I suppose.
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)
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.
yeah i've already played with that and used jconsole to JMX into it
was pretty awesome
from the luminus template
Immutant has the ability to easily work both standalone and in a Wildfly.
Http-kit can't work inside a container I think.
Other options you would have to look up, but there are shims that turn Ring handlers into servlets.
what're the practices for deployments? compile locally and scp uberjar?
i'm sure there's some automation π
Could be one option.
Well, sure, but that's orthogonal to Clojure
No-one's stopping you from using Capistrano or something.
ya
If you use uberjar you have to have something to take care it's running
runit, monit, supervisord or somesuch
Just like you would with a puma running a Rails app
Or you can pack it up into a docker container.
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
And you just drop the war into the servlet container's deploy directory
And it takes it from there.
wildfly seems like a sensible option
Yeah, I've used it and it seemed quite nice
i'm assuming caring much about scaling isn't a concern like it is with rails
Well, all applications need to scale at some point
But yeah, the curve is less steep than in Ruby
yeah, but reaching that point with clojure you'd have to have something very used
rails not so much
Can't tell you concrete numbers but yeah, you cen get by with less servers for sure
When you learn the ropes of Wildfly you can look into clustering
Immutant's stuff says it works easily with clustered Wildfly
So you get distributed messaging, distributed caching, distrubted scheduling and distributed transactions
Though distributed transactions are kind of an antipattern tbh.
i feel like i'm reaching the daily limit of new neuron connections my brain can make for the past few days
Hahaha, I can understand that, at a certain point it can certainly feel like information overload.
@martinklepsch: Pretty sure prismatic as a company is continuing - and they are pivoting to leverage their software in a different way.
One of the co founders left tho
@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
@mccraigmccraig: you have any centralized logging with that?
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
nice
filebeat looks like the New Thing now
ooo i hadn't seen that. logstash-forwarder occasionally seems to get wedged so i'll def check out filebeat
what kind of app you running @mccraigmccraig ? is it trampoline data analytic stuff?
trampoline uses that architecture too - though i'm mostly working on a new enterprise chat system atm
a chat system like slack?
or SaaS like http://intercom.io?
a bit different from slack... we've got specialised conversation types for solving specific problems - such as arranging shift-swaps / emergency cover
more for enterprisey kinda companies eh?
this release is mostly for companies where an unplanned absence directly causes loss of revenue - cafΓ©s, restaurants, bars, hospitals etc
nice π so you can politely tell your boss you're not coming in while avoiding that confrontation π
and, most importantly, have arranged for someone else to cover for you, requiring your boss only to confirm the arrangement
have i met you @naomarik ? don't recognise the nick ...
nope, you only just started telling me about your docker deployment
sure... you knew about trampoline - though i guess that's probably my most public web association !
yah it's all over your handle π
ha, the perils of a googleable handle !
lol, have to act professional now at all times else risk your reputation!
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?
oooh.. (all-ns)
doesn't show the brute.system namespace. So that is very odd...
it's not codox's fault