This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-02
Channels
- # announcements (26)
- # architecture (29)
- # babashka (8)
- # beginners (91)
- # calva (70)
- # cider (7)
- # circleci (2)
- # cljs-dev (1)
- # clojure (79)
- # clojure-australia (2)
- # clojure-dev (3)
- # clojure-europe (40)
- # clojure-italy (2)
- # clojure-losangeles (4)
- # clojure-nl (4)
- # clojure-uk (4)
- # clojurescript (34)
- # cursive (13)
- # datomic (16)
- # defnpodcast (2)
- # emacs (11)
- # events (1)
- # fulcro (13)
- # graalvm (17)
- # gratitude (3)
- # instaparse (10)
- # introduce-yourself (2)
- # jobs (1)
- # jobs-discuss (5)
- # juxt (3)
- # kaocha (5)
- # meander (5)
- # membrane (2)
- # nextjournal (43)
- # off-topic (42)
- # pathom (52)
- # pedestal (8)
- # portal (3)
- # rdf (2)
- # re-frame (10)
- # reveal (21)
- # shadow-cljs (56)
- # slack-help (7)
- # vim (33)
- # xtdb (43)
I've hit something totally baffling. I have a project with a Seesaw GUI. I have a function that does (into {} ...)
which works fine. But I need it sorted. When I change that to (into (sorted-map) ...)
the GUI freezes. It seems like no matter where I put sorted-map
it causes a freeze. The same function can be called on the same data from in vim-fireplace with no problem. No freeze.
What are the keys?
sorted-maps are not entirely drop in replacements for maps, some things will throw exceptions on sorted-maps that work on maps
so my guess is things aren't frozen, but a thread has died and stopped doing work because of exception
Usually exceptions show up on the terminal, but nothing shows up after I change to the sorted map. I'm partitioning the map and the summing the partitions. I'll play with that, though.
Take a thread dump and see what it's doing. Ctrl-/ on *nix, ctrl-break on win, or use jstack on the pid if not in process
Best as I can figure, changing the sort was bubbling up a nil, and that was ... doing something bad. Somehow that was returning Inf
along the way, and then I'm guessing that was making the (range)
call run forever.
When in doubt, search through the transcripts of Rich Hickey's talks. :) The word "complect" is mentioned here, with a definition and a discussion: https://github.com/matthiasn/talk-transcripts/blob/9f33e07ac392106bccc6206d5d69efe3380c306a/Hickey_Rich/SimpleMadeEasy-mostly-text.md

Definition of complect
obsolete. : intertwine, embrace especially : to plait together : interweave.
de-complectto separate things that were woven
more like "weave" than tangle, but yes - combining things is the core concept
I find that distinction useful because a lot of "complecting" in software looks relatively simple - eg. combing the concept of a value with the concrete detail of a storage location. it is not a tangle in the code to do that. the aspects can be skillfully handled together. but they are woven together and this has larger scale consequences.
What is step function
as in the docstring of transduce
f should be a reducing
step function that accepts both 1 and 2 arguments
I'm 80% certain it's supposed to be read as "f should be a (reducing step) function [...]". So, just a reducing function - something that you'd pass as the first argument to reduce
, nothing fancy (except for the fact that it must also have a 1-arity).
Nevermind, I'm wrong, it's "(step function)": https://clojure.org/reference/transducers#_early_termination

Although this section makes me think that it doesn't matter much how you group the words together: https://clojure.org/reference/transducers#_creating_transducers
Yep, although I don't use the word "step" myself, reading other discussion here after searching for "step function" tells me that that's a synonym for "reducing function".
Hi everyone! Did anyone have the experience of receiving Twitter approval to use its API Keys and Tokens? I am from the https://github.com/clojure-garden/clojure-garden team, maybe you've heard about this project at the re:Clojure conference. We are planning to create a LibRank ranking system based on social mentions and therefore it's necessary to get access to Academic Research. But Twitter refuses our request. What would you advise in this case?
there is a hack I did awhile ago https://github.com/vlaaad/tweet-defhttp://github.comhttps://github.com/vlaaad/tweet-def
It's complicated to say the least. If you're trying to make a business out of it I say run away
I co founded a company that was relying quite a bit on their API. Every now and then they change the rules and make it difficult to adapt unless you get exceptions, most of the time through partnerships or just knowing people inside.
If it's for non profit I have no clue. In our cases we also leveraged the fact some of our clients were fortune 500, so they would get a "call" from them for particular use cases. The only times it was easy is when Twitter itself was the client
Since we were working with their api for a long time we had this option for exploratory work
I do recall ppl having to make videos of the use case for approval towards the end, and even then it was hit/miss
@U050SC7SV @U47G49KHQ thanks a lot! Will take a look!
hi! When doing a (require '[nextjournal.clerk :as clerk]), I get the following: Execution error (IllegalArgumentException) at com.oracle.truffle.polyglot.OptionValuesImpl/failNotFound (OptionValuesImpl.java:279) Could not find option with name engine.WarnInterpreterOnly.
No idea what this means?! Do I need to upgrade my JVM? (currently java 11)
we should document this, please try upgrading to a later version of graal vm or use any regular (non-graal) JDK
we use the graal js scriptengine as a library, see https://github.com/nextjournal/viewers/blob/a20c8b54d1f0b15008d101d7a1ed86dea296d451/modules/markdown/deps.edn#L5-L6
unfortunately the graal JDK ignores the library and uses it’s version of the scriptengine that’s built-in, even when it’s an older one and doesn’t understand all options the newer lib understands
openjdk version "17.0.2" 2022-01-18 LTS
OpenJDK Runtime Environment Zulu17.32+13-CA (build 17.0.2+8-LTS)
OpenJDK 64-Bit Server VM Zulu17.32+13-CA (build 17.0.2+8-LTS, mixed mode, sharing)
~/.m2/repository/org/graalvm/js/js-scriptengine/20.0.0/js-scriptengine-20.0.0.jar:
~/.m2/repository/org/graalvm/js/js/20.0.0/js-20.0.0.jar:
~/.m2/repository/org/graalvm/regex/regex/20.0.0/regex-20.0.0.jar:
~/.m2/repository/org/graalvm/sdk/graal-sdk/20.0.0/graal-sdk-20.0.0.jar:
~/.m2/repository/org/graalvm/truffle/truffle-api/20.0.0/truffle-api-20.0.0.jar
our markdown parsing library is written in javascript, and we call it from Clojure via the graal vm polyglot capabilities
our goal is having one markdown parser that works in the browser and in Clojure. That’s how we ended up going with https://markdown-it.github.io
@surf-kid24 There's a #nextjournal channel that may be able to help with that?
oh, I'm not sure how it handles namespacedness when renaming, but I saw it changing local bindings in :keys [...]
block
apologies if this question has been asked before: is there an idiomatic way of detecting at runtime whether some code is running via a REPL or via CLI/`deps`/java invocation? Should I try to detect REPL libraries injected by tools like CIDER on the classpath or is there another way?
XY problem: I want shutdown-agents
to run with my test suite as a fixture in CI, but not in the REPL (because it will kill the REPL).