clojure-europe

For people in Europe... or elsewhere... UGT https://indieweb.org/Universal_Greeting_Time
djm 2021-02-10T06:52:31.333800Z

👋

dharrigan 2021-02-10T06:56:03.334Z

Good Morning!

2021-02-10T07:11:05.334300Z

Morning

agigao 2021-02-10T07:15:58.334500Z

Morning!

javahippie 2021-02-10T08:09:28.334700Z

Morning!

orestis 2021-02-10T08:32:25.334900Z

Morning!

raymcdermott 2021-02-10T08:47:11.335200Z

More Ning

borkdude 2021-02-10T08:47:57.335600Z

moarning!

ordnungswidrig 2021-02-10T09:06:32.335800Z

Good morning!

ordnungswidrig 2021-02-10T09:06:45.336200Z

Quick, can you use babashka to pretty print an edn file easily?

ordnungswidrig 2021-02-10T09:10:58.337100Z

^--- Could not resolve symbol: pprint/pprint

ordnungswidrig 2021-02-10T09:11:01.337300Z

Oh, got it.

borkdude 2021-02-10T09:11:01.337400Z

@ordnungswidrig

bb -e '(clojure.pprint/pprint (edn/read-string (slurp "deps.edn")))'

ordnungswidrig 2021-02-10T09:11:08.337600Z

bb -I -e '(clojure.pprint/pprint (first *input*))'

ordnungswidrig 2021-02-10T09:11:44.338700Z

hmmm, I wonder if an output parameter --pretty would make sense.

borkdude 2021-02-10T09:11:54.339Z

I is only needed when you are reading multiple top level EDN values from stdin

ordnungswidrig 2021-02-10T09:12:22.339500Z

well, read-string also only returns the first one, doesn’t it?

borkdude 2021-02-10T09:12:33.339800Z

@ordnungswidrig I use this tool for pretty-printing including colors on the terminal: https://github.com/borkdude/puget-cli

borkdude 2021-02-10T09:12:45.340200Z

Just cat deps.edn | puget

ordnungswidrig 2021-02-10T09:12:50.340400Z

oh, nice

borkdude 2021-02-10T09:13:33.340600Z

What I meant is *input* reads EDN by default, no other flags needed

borkdude 2021-02-10T09:13:47.340800Z

unless you want to read e.g. {:a 1} {:b 2} from stdin without a wrapping coll

ordnungswidrig 2021-02-10T09:15:43.341300Z

clojure -M -e "(require 'clojure.pprint) (clojure.pprint/pprint (clojure.edn/read-string (slurp *in*)))" This also works where you have no babashka

borkdude 2021-02-10T09:16:18.341800Z

yep. the same expression also works when you do have bb

ordnungswidrig 2021-02-10T09:16:30.342Z

nice

jasonbell 2021-02-10T09:27:20.342200Z

Morning

thomas 2021-02-10T09:32:23.342600Z

morning

ordnungswidrig 2021-02-10T09:34:57.342700Z

Oh I see.

ordnungswidrig 2021-02-10T09:35:52.342900Z

So bb -e '(clojure.pprint/pprint *input*)' -O actually does it. ☝️

ordnungswidrig 2021-02-10T09:49:29.343900Z

I’ve just registered a name on ENS with ethers I have trader with Lumens and it was the most thrilling thing I did in the recent past.

borkdude 2021-02-10T10:04:53.344Z

@ordnungswidrig Actually cat deps.edn | bb -e '(clojure.pprint/pprint *input*)' is sufficient

javahippie 2021-02-10T10:09:28.345100Z

I believe that Ethereum is the most interesting and complex tech project of the decade. And now that they reduce energy consumption, it’s also a little more responsible

ordnungswidrig 2021-02-10T10:12:10.346Z

I read that the miners nowadays use more and more rather excess engery e.g. from hydro plants in china.

ordnungswidrig 2021-02-10T10:12:29.346100Z

cljoure commandline golf 😛

2021-02-10T10:13:03.346500Z

hmm... hydro never needs to be excess tho

javahippie 2021-02-10T10:14:52.347400Z

I read that, too. That those damns in China would have no use for the excess energy, and cannot sell it to anybody, so it’s okay for it to go to Bitcoin & Co. Always wanted to read up on that

borkdude 2021-02-10T10:15:54.347500Z

I should maybe map the REPL requires (pprint, etc,) also to the user namespace, so you can just write (pprint *input*) and (doc inc) for one-liners

ordnungswidrig 2021-02-10T10:18:47.348100Z

That’d be awesome

borkdude 2021-02-10T10:22:49.348300Z

$ bb -e '(clojure.repl/doc inc)'
-------------------------
clojure.core/inc
([x])
  Returns a number one greater than num. Does not auto-promote
  longs, will throw on overflow. See also: inc'

2021-02-10T10:40:18.349Z

that isn't how hydro works tho, there should never be "excess hydro" tho there can be excess capacity to produce more electricity

2021-02-10T10:40:40.349500Z

you can have excess coal and nuclear, but if you create a market to sell that at a good cost you remove the incentive to get rid of it

2021-02-10T10:41:19.350300Z

you can have excess wind and solar (as they are intermittent) and that is probably a sort of good thing to use the electricity on, but it would have to be a better use than storage

2021-02-10T10:48:27.351700Z

(the original Mastodon idea was to use unused baseload power to do big data analytics w/o increasing co2 emissions (follow the moon rather than follow the sun), when we ran the numbers, doing things on 0ish carbon sources was far, far better)

2021-02-10T11:09:08.353700Z

I thought the nice thing about hydro is you can turn it on at times of peak demand (and deplete the contents of the reservoir) and then turn it off when demand is sufficiently low to be served by power sources that you can’t turn off and on so easily (and allow the reservoir to fill up again during those times). I don’t really understand how you’d end up with peak hydro power, unless the reservoir gets completely full or something.

2021-02-10T11:12:05.355700Z

Other types of power plants - e.g. coal/nuclear - take much longer to start up and shut down so there are situations where there might not be much demand for power right now but you still have to keep running the plant, so you could possible advance an argument that meh, you might as well do bitcoin mining during that time, and as otfrom points out, you don’t get to choose how much power you get from wind/solar at anmy particular moment (depends on the weather etc).

2021-02-10T11:13:01.356400Z

Anyway, you should probably listen to otfrom and not to me about this stuff.

val_waeselynck 2021-02-10T12:25:10.357500Z

Note that there are also hydro plants on rivers rather than in mountains; for those, you don't have much control over the power, and you can't do much storage.

val_waeselynck 2021-02-10T12:40:26.363700Z

But to be frank folks, having spent quite a bit of time studying climate and energy issues, when I see Bitcoin advocates telling us that Bitcoin mining is the best use for that electricity, it seems to me that they're simply not conscious of what's at stake with energy in the 21st century, and not really treating it as something precious. The task of replacing fossil fuels is absolutely daunting even when being optimistic about renewables, and the goal of the energy transition should be to preserve what we can on basic needs like heating, food security, healthcare and mobility while limiting damage, not to advance the world into a transcending new digital era. We just won't be that high in the Maslow pyramid. This reality is especially hard to accept for us programmers, who have made a career out of digital progress. E.g if we had so much excess decarbonized power that we don't know what to do with it, we should probably first spend it on hydrogen generation or other industrial applications.

👍 4
borkdude 2021-02-10T12:48:51.364900Z

I'm ignoring bitcoin as hard and as long as I can.

val_waeselynck 2021-02-10T12:50:24.365300Z

Don't ignore it - undermine it 😉

😂 2
🙌 1
val_waeselynck 2021-02-10T12:50:30.365500Z

(pun intended)

thomas 2021-02-10T13:52:52.367600Z

I like the idea of a decentralised currency, but BTC is not that (certainly at the moment)

dakra 2021-02-10T14:08:44.368Z

This is just on the HN frontpage https://news.ycombinator.com/item?id=26088455

val_waeselynck 2021-02-10T16:37:51.371500Z

Yeah, pumped hydro is awesome. And to think of those barbarians that choose to live in plains rather than mountains, forcing us to have thermal power stations.

val_waeselynck 2021-02-10T16:39:41.372400Z

(Seriously though, hydro is not all good. There are risks associated with it, and it causes more environmental damage than we used to think)

2021-02-10T16:41:29.373200Z

yeah, hydro can be bad for the rivers and other waterways they are on and big dams can damage communities and ecosystems and fail catastrophically (as witness recent events)

val_waeselynck 2021-02-10T16:42:08.373700Z

Also emits more methane than we used to think a few decades ago.

2021-02-10T16:42:40.374Z

which bits emit the methane?

val_waeselynck 2021-02-10T16:43:56.374300Z

Anaerobic decomposition of flooded biomass.

2021-02-10T16:47:37.375Z

I thought that might be the case. I wonder then about whether that methane could be captured and then burned (not sure where the economic/tech tipping points are on that)

2021-02-10T16:48:13.375700Z

I like anaerobic digesters for power as well. 🙂

❤️ 2
raymcdermott 2021-02-11T14:57:25.381100Z

Also see her writing on Indian dams - a very impressive summary of the BS around such projects as well as explaining how local and Western elites benefit from such projects more than the locals https://en.wikipedia.org/wiki/Arundhati_Roy#Sardar_Sarovar_Project

val_waeselynck 2021-02-10T17:12:32.376200Z

I'd be surprised if that were the case - I guess if those emissions were concentrated enough to make that viable, we'd have detected them sooner, and more accurately 🙂

2021-02-10T17:31:43.376500Z

sounds like it is a location dependent (or exacerbated) problem. I think there are some other river based systems that don't have the big reservoir problem (I'd have to dig up sources)