Fork me on GitHub
#clojure-uk
<
2020-03-07
>
dominicm07:03:07

I did look at open graph but it does seem like there are existing meta tags for most of it. E.g. Title, description, author.

dominicm07:03:40

Or at least, the bits that a blog is interested in.

dominicm07:03:01

@lady3janepl fwiw, I'll probably use that schema for attribute names in the blog parts, eg pubdate. Although there's some overlap with the rss standard which is perhaps more standard.

3Jane09:03:13

nice! did you test it already? what's the index size / page load?

3Jane09:03:22

> I did look at open graph but it does seem like there are existing meta tags for most of it. well, we're still in the vendor war era unfortunately. You need to repeat content in open graph, twitter, and normal meta tags, if you want nice "cards" to show for your links in facebook (og), linkedin (og), and twitter (twitter)

dominicm11:03:34

They don't fall back on a normal description?! Yikes. I assumed it was just for tailoring it to a site.

dominicm11:03:34

og:type is a good example of something that could be reused by cryogen but isn't.

dominicm11:03:30

Oh twitter is way worse than Facebook here it seems. Ouch.

practicalli-johnny12:03:39

@fmjrey I write a lot of static sites at http://practicalli.github.io and use Cryogen for the blog site. It's very simple to use and much faster than the nodejs tool I used previously. I use markdown, so haven't tried the asciidoc part yet. For the static site I use for books, I use http://Gitbook.io, the open source project, not the online service, but this is deprecated (and uses a lot of CPU to generate a 100+ page static site). It does create a nice responsive static site though with Klipse plugin. I am looking for another tool, ideally Clojure or ClojureScript to generate static sites for books. Something I can hack on and add features. Would be nice to create a library of tools that can build a range of different types of sites (blog, landing page, book, multi-page tutorial, etc) from a range of sources (markdown, asciidoc, org, hiccup), with a nice templating system.

👌 4
dominicm13:03:37

So, what would we need to do to make that kind of tool :thinking_face:

folcon13:03:09

Enjoy using cryogen, I do feel like using it to code snippeting was fiddly, I was trying to write a blog post about some code that I had written with the intention of making the code tinkerable in browser, pulled in klipse and could not get all the parts working with each other, probably was doing something wrong, but I decided to come back to it later

3Jane14:03:46

was it the most recent version, or a previous one? I can help with Klipse!

3Jane14:03:29

(not that I'm trying to convert you, but if you're stuck, that's one of the things I was fixing yesterday)

folcon15:03:25

Give me a sec, looking up the version number…

folcon15:03:44

(sorry for not replying sooner, notifications aren’t firing for some reason >_<…)

folcon15:03:31

[cryogen-markdown "0.1.11"]
[cryogen-core "0.3.0"]

3Jane15:03:49

ah, right, you're on version HEAD^1 😉

3Jane15:03:09

in which case: unaffected by bug

3Jane15:03:13

this is what I do to enable Klipse

3Jane15:03:33

in /content/config.edn, add this:

:klipse                       {:settings {:selector ".klipse-cljs"}}

3Jane15:03:04

in the edn preamble of post which should load Klipse js, add this: :klipse {}

3Jane15:03:04

in the post, indicate which fenced code blocks should be klipsified by setting klipse-cljs as language

3Jane15:03:18

(I'm not sure if slack will allow me to show this to you, just a sec)

3Jane15:03:28

klipse-cljs (let [ages (map :age languages)] (/ (reduce + 0 ages) (count ages)))

3Jane15:03:30

^ like so!

folcon15:03:32

Ok, but how hard is it to load in external stuff? Like if I have a cljs or js file which contains a bunch of code, can I reference it and then use it in a snippet?

folcon15:03:46

That way I don’t have to have a big wall of text snippet =)…

folcon15:03:57

Just the bits that need to be explained…

3Jane15:03:37

I haven't tried loading external stuff, but you can interact with everything outside of klipse

3Jane15:03:10

(ignore the "rodent" mentions in the first one, blog used to be called something else 😉 imma update this once I'm done faffing with domain setup)

folcon19:03:06

Thanks @lady3janepl, I’ll give this a shot =)…

folcon22:03:18

btw, have you had any issues with new blogposts appearing on the front page…

folcon23:03:31

nvm, just updated the deps >_<…

fmjrey14:03:21

Hi everyone, cryogen does seem to be the winner here in terms of popularity so it will be my first choice, and before going NIH maybe consider improving it?

3Jane14:03:51

if you're looking to start immediately, comment out cryogen-flexmark in your dependencies, and use cryogen-markdown "0.1.11" until fixes hit

👍 8
dominicm15:03:15

I think the main reason I decided against this was that: • Fixing the asciidoctor integration requires not only fixing it to be "correct", but I expect I would find resistance in removing the edn. I'd have to extend the concept of metadata, provide coercions, etc. It's a lot of work and I'm not really sure it would be welcome • I felt like the API was a little bit rough. It generates 2 cryogen.x namespaces, which shouldn't really live in my project. Fixing this is somewhat breaking, it certainly makes the docs more confusing for "legacy" users. I just didn't want to fiddle with all of that. I also just wanted to challenge myself to write something. It was somewhat of a "huh, think you can do better do you Dominic? Prove it". I'm definitely not there yet 🙂.

3Jane14:03:29

btw, how do y'all use RSS as consumers?

Aleksander07:03:37

feedly + Firefox with RSS plugin

Gulli08:03:09

I use Rometools to fetch RSS and jsoup to fetch actual articles. Those are java libs though

dharrigan10:03:28

I use feedly too

3Jane10:03:46

badly formulated question. what do you find it useful for?

dharrigan11:03:35

Saves me time trawling throught lots of websites for up-to-date news/articles and such like.

dharrigan11:03:50

I can review on one page, everything I'm interested in.

Aleksander11:03:04

Following specific topics or blogs. I find it useful that I can subscribe to any topic on Guardian, eg all the theater reviews or articles related to particular areas I'm interested in. Plus i subscribe to some financial independence blogs, some tech blogs, some blogs of personal friends that post very occasionally.

👍 4
3Jane11:03:06

thanks! sounds like you read a lot of separate blogs?

3Jane11:03:23

aha: so, usecases: • notifications from blogs that post infrequently • receiving updates of subsections of a webpage which has a huge volume • reading a lot of smaller publications

rhinocratic12:03:47

That fits with my usage. I subscribe to a lot of feeds, and otherwise there's no way I'd remember to look at the ones that post less frequently.

3Jane14:03:40

I've heard from a lot of people that after google reader was shut down, they've stopped using RSS

dominicm14:03:58

I have a tt rss server up. But I've not been reading as much rss overall.

fmjrey14:03:05

I use inoreader with a starter supporter subs

3Jane14:03:13

personally, I tried other readers, and the problem for me wasn't readers, but that sites stopped publishing full articles in feeds

dominicm14:03:21

I'm thinking of changing that as there's some high quality blogs I feel I'm missing.

3Jane14:03:44

so the whole promise of syndication fizzled; I had to go to people's sites anyway, and click through the tedious pagination

dominicm14:03:51

The full article thing was annoying. There are tools out there which will convert those.

3Jane14:03:01

What are those? 👀

dominicm14:03:12

They go to the link and use standard "detect article" techniques.

dominicm14:03:02

https://www.feedenlarger.com/ something like this 🙂 can't remember what I used way back when.

👍 4
dominicm14:03:24

interestingly, I just learned that partial descriptions is a normal part of rss. It's essentially, by design.

3Jane14:03:52

rss is/was useful for different reasons than it was designed

3Jane14:03:27

because it allowed to work around the fact that most websites have poor UX

3Jane14:03:45

when I have an article to read on the net, more often than not I use Clearly

dominicm14:03:29

interestingly, not on firefox.

fmjrey14:03:42

To me RSS was more about knowing the headlines and then going to the article if needed, when the feed did not provide enough. Most sites still have much to gain from getting visits.

3Jane15:03:48

do you have opinions on domain names? what should be your primary address, http://www.somedomain.com or http://somedomain.com ?

3Jane15:03:03

(I'm partial to www. because I like having multiple specialised websites on the same domain, but I wonder what the general consensus is)

dominicm15:03:06

I saw a few articles about this on http://lobste.rs a little while ago. Seemed there was no social reason to go with www, there were some fiddly technical stuff which mostly didn't matter.

folcon15:03:08

I tend to prefer www, vs bare myself.

folcon15:03:40

I used to be the other way around, but it’s useful to just be able to create subdomains for various things…

folcon15:03:28

Looks like it’s time to begin the slow and laborious process of replacing my laptop…

dominicm15:03:32

Historic reason was to be a cue

fmjrey15:03:31

personally I'd favour subpaths instead of subdomains, but I'd still make a www. that redirects to main.

☝️ 4
fmjrey15:03:15

subdomains should serve very distinct purpose from main domain, things that cannot live under a subpath for good reasons, though you need to be mindful of the cookie payload, etc.

fmjrey15:03:14

also subdomains and cloud usage in large orgs can easily lead to subdomain takeover...

folcon15:03:53

Anyone willing to recommend any of the new macbook pro’s? Or alternatives? Surfaces any good etc?

Eamonn Sullivan15:03:05

I use a macbook pro at work, but a simple Lenovo Thinkpad X260 (cost me about £400) with the latest Ubuntu on it. Of the two, I think I like the thinkpad a bit more these days. Simpler, faster (even wit just i5 chips and 16gb of RAM) and easier to configure.

3Jane15:03:59

I bought an old macbook pro from 2015 and it's working 👌

3Jane15:03:16

old keyboard, magnetic charger, plenty of usb ports

Eamonn Sullivan15:03:35

but, of course, if work is paying, I might go for the very latest MBP. But get the very latest one -- the one with the real escape key. I've heard people complaining about those virtual keys, mostly vim users.

Eamonn Sullivan15:03:10

That's what I have now at work, a 2015 model. Plenty of ports and that magnetic charger has saved it more than once.

Eamonn Sullivan15:03:32

The people with the newer ones have to carry adapters with them whereever they go.

3Jane15:03:38

people at work had newer (but not the newest) ones and they had problems with keyboard and screen quality

folcon15:03:59

So the real key ones are decent?

folcon15:03:09

Not sure about the hardware changes they’ve been making recently, it’s super annoying to discover you need to tweak something at a low level and then go through a fun dance to change settings… Had to fiddle with system protection once to change a system setting and had to do a few reboots to get into safe mode to change it…

folcon15:03:55

Trying to remember what it was for but presently escapes me, something to do with tweaking .DS_Store I think…

folcon15:03:05

How is ubuntu these days @UR71VR71S?

folcon15:03:36

It’s been at least 5 years since I used it as a desktop, servers aren’t quite the same thing…

Eamonn Sullivan16:03:58

@folcon, I'm using 19.10 on the thinkpad, so a bit of the bleeding edge (not the LTS version), but everything works as expected. It sleeps correctly when I close the lid, uses an external monitor (or even two) and the battery life is good. I'm getting eight hours, but I have the extended battery on this. I've been using Ubuntu since Warty (the first version), but mostly on desktops. It's quietly gotten quite polished.

Eamonn Sullivan16:03:18

(But I've been using Linux since 1994-ish, when I had to download 20+ floppy disks. I think my first version was something called TAMU (Texas A&M University), then Slackware, Red Hat/Centos, Debian. I remember the days when you really could destroy your system or monitor with the wrong settings. So, by polished...)

Eamonn Sullivan16:03:41

Yep, remembered the name correctly: https://archiveos.org/tamu/ and it was probably 1993 when I started using it.

folcon16:03:49

That’s old-school =)…

practicalli-johnny17:03:08

I have a Lenovo X1 Extreme (2ng gen) with 32Gb Ram and dual SSDs in Raid0 and Nvidia graphics on demand. Running Ubuntu server (for the raid) with Regolith desktop. Works beautifully and is incredibly fast. No problems running this lightweight powerhouse.

practicalli-johnny17:03:15

It also has a keyboard I can type on all day, every day (as I do most weeks)

folcon17:03:45

Hmm, that’s a nice sounding machine =)…

mamapitufo19:03:03

I have a Lenovo x280 and I like it a lot (i7, 16GB RAM, 512GB ssd). I run Void Linux on it and manage to not break things too often :)

practicalli-johnny20:03:11

@folcon its a machine that will carry me through the whole decade :)

folcon20:03:41

I’m getting that impression :)…

folcon21:03:10

Not heard of Void Linux, what’s it like?

folcon23:03:50

Actually, question to any and sundry still paying attention to this thread, how’s the touchpad experience? If I think about it the two things I’d miss is good driver/compile experience, (tons of dev stuff seem to default to mac in my experience) and apples touchpad, nothing too fancy, just responsive and what I would think of as basic stuff like 2 finger scroll etc…

folcon23:03:24

Totally understand if it’s not a priority for some =)…

Aleksander08:03:40

I use X1 Carbon. Touchpad ... it takes some getting used to. I mainly use trackpoint though. What doesn't work for me: fingerprint scanner and microphone. Still happier to use it then my MacBook Pro. I have the last one with very shallow keyboard

Eamonn Sullivan08:03:14

The Mac’s touchpad is very nice, and as you say a lot of development stuff seems to target Mac OSX. I’m a keyboard oriented user — a touch typist and some 25-30 years of emacs bindings muscle memory — so the track point is merely nice, not a deal maker or breaker for me. I like the Thinkpad’s rubber thingy in the keyboard, whatever it is called, because I don’t have to move my hands too much. But moving back and forth between the thinkpad and the MacBook is a real pain. As for the Mac dev environment, it’s good, but so is Linux’s, and we’re (almost) all deploying to Linux, so you eliminate some issues by also developing there. Apologies for the typos — wrote this on my phone.

folcon12:03:24

Yea, I switch back and forth between keyboard first and touchpad first, it’s just touchpad is such an ingrained driver on the browsing level, I could certainly go back, but I know I will miss it, so I’m wondering will I have to =)…

dominicm15:03:09

https://lobste.rs/s/gfi4xp/domain_ical_domain_ssl_expiration it's a shame this site doesn't exist anymore. Such a good idea!

folcon15:03:36

Huh, perhaps not enough usage?

folcon15:03:26

I’ve done little things like that in the past, and stopped supporting them when I stopped needing them, I know in my case if they had usage there would be some impetus to keep it up in some capacity…

dominicm16:03:28

I've had domains and ssl expire on clients before. It's surprising how unprepared they are.

folcon16:03:57

I suppose I’m surprised that this is not prepared for? However perhaps after the first scare people get their act together? Hence no real follow on interest?

dominicm16:03:31

I was surprised too. But that becomes next year's problem... Domain iCal has the nice side effect of being that solution I suppose.

dotemacs18:03:31

I suppose with letsencrypt that stopped being next year’s problem, but a problem every 3 months unless you automate it ? 🙂

dominicm20:03:42

Oh yeah. Domain expiration is pretty bad if you don't have auto renew on. Aws solves this mostly too.

folcon16:03:56

Ok, that’s really silly…

yogidevbear16:03:57

Re static site generators, I started playing around with Gatsby and then a work colleague recommended trying react-static instead for a couple of reasons. Ended up reviving my site with that, hosting the build on Netlify whenever I publish my master branch to GitHub. It was an interesting learning experience, but I'm not sold on react-static. The docs/videos seem very sparse or outdated. I may switch to something else soon. Netlify seems pretty cool though

👍 4
folcon20:03:40

Ugh, any suggestions for transforming a complex nested map than clojure.walk? (I’m getting the impression the answer is lots of reducers)…

dominicm20:03:03

What transformation are you doing that walk isn't appropriate?

seancorfield21:03:40

(never used it myself but I hear folks recommend it for that sort of thing)

folcon21:03:32

basically sending some state over a wire, wrote something really naive, now its time to pay the piper :)…

folcon21:03:36

Yea, that might be a good solution @seancorfield… I haven’t used it in a while

dominicm21:03:39

Meander is very nice in this space.

folcon21:03:49

I’ve been planning on taking a close look at that 😃

dominicm21:03:15

@folcon what's wrong with walk btw?

folcon21:03:52

In general nothing, after all as I said I wrote something naive to start. At the moment however, this happens:

(let [w (s/start-sim setup)
        w (nth (iterate s/tick-world w) 1000)]
    (time (dotimes [_i 10]
            (redacted-game-state w))))
"Elapsed time: 249599.23 msecs"

folcon21:03:41

All that redacted-game-state is supposed to do is make the sim state safe to send over a sente websocket, this is after all, very much a prototype =)…

Aleksander07:03:37

feedly + Firefox with RSS plugin