This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-10
Channels
- # asami (2)
- # babashka (28)
- # beginners (91)
- # calva (38)
- # cider (7)
- # clj-kondo (20)
- # cljfx (3)
- # clojure (88)
- # clojure-austin (1)
- # clojure-australia (2)
- # clojure-bay-area (10)
- # clojure-europe (68)
- # clojure-france (8)
- # clojure-italy (14)
- # clojure-nl (4)
- # clojure-sanfrancisco (1)
- # clojure-uk (14)
- # clojurescript (37)
- # clojureverse-ops (14)
- # clojurewerkz (1)
- # clr (1)
- # conjure (13)
- # cursive (10)
- # datascript (30)
- # datomic (6)
- # emacs (13)
- # exercism (3)
- # fulcro (10)
- # graalvm (4)
- # graphql (2)
- # instaparse (5)
- # jobs (3)
- # kaocha (10)
- # off-topic (20)
- # pathom (17)
- # polylith (7)
- # re-frame (25)
- # remote-jobs (1)
- # shadow-cljs (60)
- # spacemacs (5)
- # specter (1)
- # startup-in-a-month (1)
- # tools-deps (48)
- # vim (4)
- # xtdb (11)
Morning!
More Ning
Good morning!
Quick, can you use babashka to pretty print an edn file easily?
^--- Could not resolve symbol: pprint/pprint
Oh, got it.
bb -I -e '(clojure.pprint/pprint (first *input*))'
hmmm, I wonder if an output parameter --pretty
would make sense.
well, read-string
also only returns the first one, doesn’t it?
Oh I see.
So bb -e '(clojure.pprint/pprint *input*)' -O
actually does it. ☝️
@ordnungswidrig Actually cat deps.edn | bb -e '(clojure.pprint/pprint *input*)'
is sufficient
cljoure commandline golf 😛
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
That’d be awesome
$ 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'
@ordnungswidrig I use this tool for pretty-printing including colors on the terminal: https://github.com/borkdude/puget-cli
oh, nice
clojure -M -e "(require 'clojure.pprint) (clojure.pprint/pprint (clojure.edn/read-string (slurp *in*)))"
This also works where you have no babashka
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.
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
I read that the miners nowadays use more and more rather excess engery e.g. from hydro plants in china.
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
that isn't how hydro works tho, there should never be "excess hydro" tho there can be excess capacity to produce more electricity
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
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
(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)
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.
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).
I'm having fun now learning about the difference between follow power (30-40 min up and down) and burst power (in fewer minutes) and stored hydro. https://www.sserenewables.com/hydro/foyers/ Interesting that they were going to use the excess baseload power from a nearby nuke, but it looks like it didn't happen. The reasons seem a bit Chernobyl level "yikes" https://en.wikipedia.org/wiki/Hunterston_B_nuclear_power_station
sry, pumped storage can reach power in seconds https://www.electricmountain.co.uk/About-Pumped-Storage
Anyway, you should probably listen to otfrom and not to me about this stuff.
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.
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.
(pun intended)
I like the idea of a decentralised currency, but BTC is not that (certainly at the moment)
I also find the idea of decentralised interesting. That being said, I recently read a book (in French, sorry) about financing the environmental transition via careful state-managed money creation rather than debt (yup, printing money, you read that right). I found it made a convincing case for an approach that is a polar opposite to decentralised currency. Essentially, such an approach can be seen as a society collectively deciding to re-organize its priorities (and therefore wealth distribution and flows) via monetary power rather than just state taxes and expenditures, which are showing their limits currently. It seems all the more relevant than the current structure of debt is so much tied to fossil assets, and that Europe shows signs of a deflationary spiral. As an exemple of historical "success" of this approach, they point to how Nazi Germany used that strategy to recover from their economic crisis and rise up to an industrial powerhouse in just a few years (as neighbouring countries so painfully experienced during WW2). The American New Deal and French reconstruction after WW2 are other examples. For those interested who can read French: https://www.odilejacob.fr/catalogue/sciences/sciences-de-la-terre/une-monnaie-ecologique_9782738152220.php
This is just on the HN frontpage https://news.ycombinator.com/item?id=26088455
I also find the idea of decentralised interesting. That being said, I recently read a book (in French, sorry) about financing the environmental transition via careful state-managed money creation rather than debt (yup, printing money, you read that right). I found it made a convincing case for an approach that is a polar opposite to decentralised currency. Essentially, such an approach can be seen as a society collectively deciding to re-organize its priorities (and therefore wealth distribution and flows) via monetary power rather than just state taxes and expenditures, which are showing their limits currently. It seems all the more relevant than the current structure of debt is so much tied to fossil assets, and that Europe shows signs of a deflationary spiral. As an exemple of historical "success" of this approach, they point to how Nazi Germany used that strategy to recover from their economic crisis and rise up to an industrial powerhouse in just a few years (as neighbouring countries so painfully experienced during WW2). The American New Deal and French reconstruction after WW2 are other examples. For those interested who can read French: https://www.odilejacob.fr/catalogue/sciences/sciences-de-la-terre/une-monnaie-ecologique_9782738152220.php
I'm having fun now learning about the difference between follow power (30-40 min up and down) and burst power (in fewer minutes) and stored hydro. https://www.sserenewables.com/hydro/foyers/ Interesting that they were going to use the excess baseload power from a nearby nuke, but it looks like it didn't happen. The reasons seem a bit Chernobyl level "yikes" https://en.wikipedia.org/wiki/Hunterston_B_nuclear_power_station
sry, pumped storage can reach power in seconds https://www.electricmountain.co.uk/About-Pumped-Storage
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.
(Seriously though, hydro is not all good. There are risks associated with it, and it causes more environmental damage than we used to think)
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)
Also emits more methane than we used to think a few decades ago.
Anaerobic decomposition of flooded biomass.
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)
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 🙂
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)
https://en.wikipedia.org/wiki/Environmental_impact_of_reservoirs#Greenhouse_gases https://www.un.org/esa/sustdev/sdissues/energy/op/hydro_tremblaypaper.pdf https://pubs.acs.org/doi/abs/10.1021/es401820p (Haven't read them thoroughly)
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