This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-29
Channels
- # announcements (1)
- # babashka (120)
- # beginners (184)
- # cider (14)
- # clara (2)
- # clj-kondo (25)
- # cljfx (9)
- # cljsrn (43)
- # clojure (46)
- # clojure-australia (2)
- # clojure-berlin (5)
- # clojure-dev (2)
- # clojure-europe (10)
- # clojure-france (3)
- # clojure-nl (1)
- # clojure-spec (14)
- # clojure-uk (30)
- # clojurescript (50)
- # code-reviews (19)
- # conjure (11)
- # core-logic (2)
- # cursive (20)
- # datascript (1)
- # datomic (74)
- # figwheel-main (1)
- # fulcro (10)
- # funcool (2)
- # graphql (1)
- # lambdaisland (1)
- # malli (2)
- # meander (22)
- # nrepl (13)
- # off-topic (28)
- # overtone (3)
- # pathom (7)
- # pedestal (4)
- # re-frame (4)
- # reagent (16)
- # reitit (4)
- # releases (1)
- # ring (8)
- # shadow-cljs (93)
- # specter (6)
- # sql (13)
- # test-check (1)
- # tools-deps (1)
- # tree-sitter (2)
- # vim (8)
- # xtdb (25)
What factors do you use to determine if a component needs a start
function separate from its constructor, or if the construction and starting should be done in one user function?
I'd put it all in the construction code unless/until some component is expensive to construct but cheap to restart, ideally your component library should have separate start / restart functions and use your restart if available (similar to reboot / warm-boot of an OS)
Can people here respond with their Java version, OS, processor and (System/getProperty "os.arch")
?
never mind, was just wondering if there is a meaningful difference between x86_64 or amd64, but I think they're the same
the one to look out for would be IA_64 but IIRC nobody actually uses that, intel lost that one
x86_64 and amd64 are about the same arch. IA_64 is Itanium, which is end-of-life architecture.
What is the extremely quick/simple way to serve https content from clojure? akin to python's ?
## generate certs using, $ openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365
## then run this from from python3
from http.server import HTTPServer, BaseHTTPRequestHandler
import ssl
class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.end_headers()
self.wfile.write(b'Hello, world!')
httpd = HTTPServer(('localhost', 4443), SimpleHTTPRequestHandler)
httpd.socket = ssl.wrap_socket (httpd.socket,
keyfile="key.pem",
certfile='cert.pem', server_side=True)
httpd.serve_forever()
Does anybody know if jq
has got the equivalent of take-while
and drop-while
in Clojure?
Hmm, good point, maybe jet should support that too: https://github.com/borkdude/jet
$ json=$(bb -e '(println (json/generate-string (map (fn [x] {:a x}) (range 10))))')
$ echo $json
[{"a":0},{"a":1},{"a":2},{"a":3},{"a":4},{"a":5},{"a":6},{"a":7},{"a":8},{"a":9}]
$ echo $json | bb -e '(->> (json/parse-stream *in* true) (drop-while #(< (:a %) 5)))'
({:a 5} {:a 6} {:a 7} {:a 8} {:a 9})
ah cool
Say somebody is always inputting malformed login data into your login form... what's a funny redirect to give them ?
...short of an electric shock
keep a set of IPs that are doing this and redirect them to one another
chat room of shame
i was thinking maybe just making a quick strobe.js page
#fff #000 #fff #000
or a tiled 1x1px gif that achieves the same even with noscript enabled... >=)
i think it is just 1 person but i have not been able to think of a humorous enough punishment yet.
Just be cautious what you put in, in case your boss ever reaches the same place 🙂