This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-13
Channels
- # admin-announcements (208)
- # beginners (53)
- # boot (46)
- # cider (10)
- # cljs-dev (26)
- # cljsjs (10)
- # clojure (66)
- # clojure-dev (3)
- # clojure-russia (14)
- # clojurecup (5)
- # clojurescript (302)
- # cursive (22)
- # data-science (1)
- # datomic (10)
- # emacs (1)
- # events (2)
- # hoplon (91)
- # incanter (1)
- # ldnclj (3)
- # leiningen (1)
- # off-topic (2)
- # om (41)
- # re-frame (40)
- # reagent (78)
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?
If I have a template like this : https://laboutique.lemonstand.com/ which template engine like Selmer or Hiccup is the best ?
There are hardly things in template languages that make one better suited to certain types of pages than others.
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)
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.
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 ?
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.
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.
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).
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.
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.
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.
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)
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
.
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.
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.
Roelof - actually straight Reagent is the easiest thing to pick up IMO. No form-1-2-3, just use @ and it happens!
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.
> 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.
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.
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.
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'.
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.
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
You can take a look here - https://github.com/ptaoussanis/clojure-web-server-benchmarks
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).
So if you want to fetch something from a REST API or the like - you'd have to bring in another library with Immutant.
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).
If don't need hornetq - don't bring that in. No need for scheduling? Don't bring that in either.
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.
Other options you would have to look up, but there are shims that turn Ring handlers into servlets.
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
So you get distributed messaging, distributed caching, distrubted scheduling and distributed transactions
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.
@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
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
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
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 ...
sure... you knew about trampoline - though i guess that's probably my most public web association !
ha, the perils of a googleable handle !
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