This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # boot (42)
- # cider (26)
- # cljs-dev (6)
- # cljsrn (6)
- # clojure (119)
- # clojure-berlin (3)
- # clojure-dev (2)
- # clojure-nl (1)
- # clojure-russia (38)
- # clojure-spec (1)
- # clojurescript (44)
- # component (3)
- # cursive (1)
- # data-science (2)
- # datomic (19)
- # dirac (60)
- # emacs (12)
- # figwheel (2)
- # hoplon (13)
- # iot (4)
- # keechma (2)
- # klipse (38)
- # leiningen (5)
- # luminus (1)
- # lumo (1)
- # off-topic (6)
- # om (2)
- # om-next (4)
- # onyx (21)
- # perun (79)
- # reagent (32)
- # untangled (39)
- # vim (36)
- # yada (1)
@bhagany Resuming my perun-upgrading today… fixed the get-meta thing (turns out I don’t need it anymore) but now I run into the following...
I need the rendered markdown in two places (one
render and one
collection task, e.g. the most recent article is on the index page)
render task however replaces the
:content field of the the files metadata with the rendered HTML and so I think there’s no way for me to obtain the previous markdown rendering result
On the plus side the new
:io.perun/trace was quite helpful in figuring out what’s going wrong 🙂
@martinklepsch I think this can be fixed by reordering the tasks. If it is
(markdown) (collection) (render) then
render will both see only the results from
markdown. You may need to add a
render though, to exclude the collection.
Now that I'm a bit more awake, I have a few more bits of advice that are semi-related to the difficulty you're having. Previously, render functions had to go from unique content to completed page in one step. This meant that if you had things in common on each page, like the header and footer, you had to write separate functions for the common elements, and call them in each render function. In recent versions of Perun, you still can do this, but in my opinion, it's better to think of pages as having many layers, like an onion, and to build them from the inside out.
So a simple example would be something like:
(comp (markdown) (collection :renderer 'render-collection-content) (render :renderer 'render-header))
render-collection-content, produces content that's analogous to what
markdown produces - that is, it's just a page fragment, not a complete html page. Then
render-header adds the header to the
markdown results and the
collection results alike. Your render functions will end up being simpler as well.
@bhagany I'm trying to follow up on your work (thanks again!) and upgrade our page from 0.3.0.
I picked up from your [Merge Request](https://gitlab.com/200ok/200ok.gitlab.io/merge_requests/12/diffs) and had to uprade to 0.4.2-SNAPSHOT to get
boot dev running. Otherwise it would not have found the new
assortment task that you used.
Now it stats and all pages are being built. So far so good(:
However, there are some regressions in how pages are built and I'm kinda stuck. The
collection task seems to render post into the index page twice.
Compared to http://200ok.ch (where the old version still runs), there's two things: 1. Each post is rendered twice 2. Both renders are different and neither yields the post(;
As I can see from the new and awesome(!!) guides, the collection task shouldn't have changed for how we are using it. Do you have any hunch on what's going on?
ah, I was probably using a local build that was still called 0.4.1-SNAPSHOT, apologies for that. I'll take a look at the rendering problems 🙂
No need to apologize, you are incredibly helpful! Also, you don't have to fix the issue^^ I was just wondering on whether this might be a known thing and you can point me to the right direction(; I don't want to be lazy, I tried before I asked^^
I don't have any good guesses off the cuff, and don't worry, I didn't think you were being lazy 🙂
it's actually related to my random advice above - try moving the two
render tasks after the
assortment task, and see if that does what you expect (It looks good to me)
Seems like I have to keep up better with the good things that are said in this channel. I have to admit that I'm sometimes skimming and sometimes skipping it.
heh, I'm not sure if I'd have picked it up right away myself, if our roles were reversed. I learn a lot better by doing than by reading.
One last question that comes to mind: Will there be a '0.4.2' on Clojars, soon? Alternatively, do you plan new API changes in 0.4.2-SNAPSHOT before you do it? I'd be a little afraid to keep the -SNAPSHOT in the build file otherwise, because our page gets re-built on every change. This means that if the Perun API changes in the snapshot that we are targeting, this might yield a regression even though we only changed content.
I think there are not many large API changes in the works anymore, but I definitely hear you on the snapshot builds in production. I think @podviaznikov would be open to doing a non-snapshot release soon, hopefully. In the meantime, I remember someone saying in #boot that there's a way to peg to a particular day's snapshot. googling that now...
That's good advice. Seems like this can be done with Maven: http://dev.clojure.org/display/community/Maven+Settings+and+Repositories
yeah, I'm looking for a way to see the timestamp on the snapshot that's being used now. no luck yet
➜ .m2 find . | ag perun ./repository/perun/perun/0.4.2-SNAPSHOT ./repository/perun/perun/0.4.2-SNAPSHOT/resolver-status.properties ./repository/perun/perun/0.4.2-SNAPSHOT/maven-metadata-clojars.xml.sha1 ./repository/perun/perun/0.4.2-SNAPSHOT/perun-0.4.2-SNAPSHOT.jar ./repository/perun/perun/0.4.2-SNAPSHOT/perun-0.4.2-20170215.172730-2.pom ./repository/perun/perun/0.4.2-SNAPSHOT/perun-0.4.2-SNAPSHOT.pom ./repository/perun/perun/0.4.2-SNAPSHOT/perun-0.4.2-20170215.172730-2.jar ./repository/perun/perun/0.4.2-SNAPSHOT/maven-metadata-clojars.xml ./repository/perun/perun/0.4.2-SNAPSHOT/perun-0.4.2-20170215.172730-2.jar.sha1 ./repository/perun/perun/0.4.2-SNAPSHOT/_maven.repositories ./repository/perun/perun/0.4.2-SNAPSHOT/perun-0.4.2-20170215.172730-2.pom.sha1 ./repository/perun/perun/perun-0.4.2-SNAPSHOT ./repository/perun/perun/perun-0.4.2-20170215.172730
perun-0.4.2-20170215.172730-2 seem to be ok for boot to find the snapshot on clojars on a new run.
With the knowledge on how to do a specific pin, I guess my question above is obsolete. Please continue doing leading edge and fast work and don't be afraid to break things^^
I just deleted the 0.4.2-SNAPSHOT folder and it pulled down
[perun "0.4.2-20170215.172730-2"], which matches yours
then, deleting the folder again and running with that dependency works for me as well
Well, now I learned something about the Java/Clojure tooling that I have been using for years with other stacks. Feels interesting to be a beginner, again^^
although, if you hear about any good clojure jobs out there, passing those along will more than make up for any dinner 🙂
Oh, that's sad to hear. Well.. we are using Clojure and ClojureScript for our startup http://collecture.io and could (of course^^) make good use of another engineer. However, we are completely bootstrapped. Meaning everyone involved has a part-time job or a freelance gig to support himself. We don't want to take funding and build this business properly up. So if you're interested in having a talk on a business opportunity, let's talk. However, I'm a pragmatic non-bullshitter, so I'll be clear and say that it'll take a while before big bucks are rolling in. We already spent some money for freelancers (like 10k), but that was for a designer. If you're more interested in a job that pays immediately, I know a shop that needs good Clojure people. Unfortunately they require engineers to be located in Berlin. But I'll see those guys next week, maybe something could be arranged if I put in a good word. Otherwise I have no Clojure leads at the moment. I'm happy to be using it myself and would be happy to pay more engineers to do the same, but that'll take a little more time(;
Thanks! If it were just me, I'd be looking for some higher-risk, lower-pay opportunities, but unfortunately my wife isn't of the same mind. That's probably a good thing while we have young kids 🙂
As for Berlin, I'm probably going to look for remote opportunities first, but if we're going to move anyway, Berlin sounds better to me than New York or San Francisco. So I'd be open to it, but probably not immediately.
I understand. Well, if you were interested to locate to Switzerland (there's certainly Clojure jobs that I'm not aware of, because I'm not searching), there's one more thing that I can offer. We do have a huge house in the Swiss mountains with a nice garden and rooms to spare. If you wanted a place to stay to look around and not loose money for having a bed, you're welcome any time!
if you come to Berlin, give us a shout, you could do a talk about Perun at Clojure Berlin 🙂
@pesterhazy I apologize, my brain seems to need to take a break. I'll see the guys next week in Berlin, but they actually are located in Hamburg!
Regarding Switzerland, especially Zurich, it's not uncommon to work remotely and have the same benefits like a Swiss local worker. However it's beneficial to be here in person to actually get the job if you don't know someone already.
At least that's what I've seen the last years in the Ruby and JS community. Could be that Clojure is different. Maybe depending on whether it's a younger company (then it'll be easy) or a monolith that rebuilds some Cobol into Clojure (then it'll probably be harder/impossible to work remote).
@bhagany do consider Berlin, it's (still) a laid back place with a friendly Clojure community
and family friendly - it's a lot easier to find a larger apartment than in SF or NYC I'm sure
They also did sponsor EuroClojure where I met them last. They had four people down there, too. I have a good friend from back in the day in one of those Clojure teams.
Not to change the subject, but just so you know @jjttjj, I am still working on the windows compatibility. Turns out it is more than just separators, as you said. And @munen your tip about the vm's has come in handy.
@bhagany awesome thanks! Sorry, I never got around to submitting anything anywhere since I didn't think anything was worth submitting at my current level of understanding! Basically what all I did was
and reference those throughout perun.core but that definitely wasn't a complete solution
(def file-separator (System/getProperty "file.separator")) (def file-separator-regex (re-pattern (java.util.regex.Pattern/quote file-separator)))
no worries, that was about my level of understanding until last night as well 😉 not that it's really advanced much beyond "wtf" yet...