off-topic

https://github.com/clojurians/community-development/blob/master/Code-of-Conduct.md Clojurians Slack Community Code of Conduct. Searchable message archives are at https://clojurians-log.clojureverse.org/
jsyrjala 2020-09-29T05:15:55.065400Z

Also things like this https://dev.to/euantorano/validating-strings-at-compile-time-in-zig-539h

2020-09-29T12:59:06.067200Z

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?

borkdude 2020-09-29T15:12:42.068600Z

Can people here respond with their Java version, OS, processor and (System/getProperty "os.arch")?

borkdude 2020-09-29T15:14:25.069300Z

never mind, was just wondering if there is a meaningful difference between x86_64 or amd64, but I think they're the same

2020-09-29T15:52:13.069800Z

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)

2020-09-29T15:54:24.070Z

the one to look out for would be IA_64 but IIRC nobody actually uses that, intel lost that one

2020-09-29T16:42:36.070400Z

makes sense, thanks!

littleli 2020-09-29T18:01:58.070600Z

x86_64 and amd64 are about the same arch. IA_64 is Itanium, which is end-of-life architecture.

bherrmann 2020-09-29T18:59:57.071800Z

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()

richiardiandrea 2020-09-29T19:04:02.072500Z

Does anybody know if jq has got the equivalent of take-while and drop-while in Clojure?

sova-soars-the-sora 2020-09-29T20:09:04.073400Z

Say somebody is always inputting malformed login data into your login form... what's a funny redirect to give them ?

sova-soars-the-sora 2020-09-29T20:17:08.073600Z

...short of an electric shock

borkdude 2020-09-29T20:38:21.073700Z

Hmm, good point, maybe jet should support that too: https://github.com/borkdude/jet

2020-09-29T20:48:32.074500Z

keep a set of IPs that are doing this and redirect them to one another

borkdude 2020-09-29T20:49:09.074900Z

@richiardiandrea :

$ 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})

richiardiandrea 2020-09-29T20:50:53.075600Z

ah cool

sova-soars-the-sora 2020-09-29T21:31:15.078100Z

hahaha

sova-soars-the-sora 2020-09-29T21:31:25.078300Z

chat room of shame

sova-soars-the-sora 2020-09-29T21:31:45.078600Z

i was thinking maybe just making a quick strobe.js page

sova-soars-the-sora 2020-09-29T21:31:55.078800Z

#fff #000 #fff #000

sova-soars-the-sora 2020-09-29T21:32:22.079200Z

or a tiled 1x1px gif that achieves the same even with noscript enabled... >=)

sova-soars-the-sora 2020-09-29T21:32:46.079500Z

i think it is just 1 person but i have not been able to think of a humorous enough punishment yet.

2020-09-29T21:42:50.079900Z

Just be cautious what you put in, in case your boss ever reaches the same place 🙂

alexmiller 2020-09-29T21:44:33.080200Z

http://fbi.gov ?

1
emccue 2020-09-29T21:44:45.080600Z

@sova no redirect, just have something like the animation on tunnelbear

emccue 2020-09-29T21:45:03.080800Z

https://www.tunnelbear.com/

emccue 2020-09-29T21:45:12.081200Z

just something popping up in the corner of the screen

emccue 2020-09-29T21:45:28.081400Z

animated