This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-24
Channels
- # announcements (22)
- # babashka (33)
- # babashka-sci-dev (161)
- # beginners (25)
- # calva (57)
- # cider (6)
- # clara (6)
- # clerk (14)
- # clj-kondo (24)
- # clojars (10)
- # clojure (65)
- # clojure-austin (1)
- # clojure-conj (2)
- # clojure-europe (23)
- # clojure-miami (3)
- # clojure-nl (3)
- # clojure-norway (3)
- # clojure-uk (3)
- # clojurescript (28)
- # cursive (24)
- # datomic (136)
- # emacs (38)
- # graalvm (29)
- # graphql (3)
- # introduce-yourself (8)
- # jackdaw (4)
- # jobs-discuss (9)
- # malli (5)
- # nbb (36)
- # off-topic (11)
- # pathom (58)
- # polylith (2)
- # practicalli (1)
- # re-frame (5)
- # reagent (11)
- # releases (1)
- # remote-jobs (8)
- # sci (15)
- # shadow-cljs (31)
- # slack-help (2)
- # spacemacs (11)
- # sql (7)
- # tools-build (9)
I once read something about how passing args to shell/sh
or equivalent should not be done as string. For security reasons? But it seems like way less error prone also to not build a striing
I guess the security angle of not generating a string is similar to SQL injection against string vs parameterised query.
e.g. (shell/sh (str "bash -c \"" user-input " && ls \"")
This code might be a problem if user-input
is && rm -rf *
(warning: don't try to run this!)
You can always start off with a string and then edit it into args before production.
ah yea totally stuff like this. In my example we ended up having a bug when you pass a string with '
then it counted as the next arg
Anyone knows if, in the browser, I can assume (js/Blob. chunks #js {:type "audio/mp3"})
will work in most browsers? Phones being the most important. And only browsers supporting recording via MediaDevices, which is what i am using.
https://caniuse.com/blobbuilder ~98% of tracked mobile, I think it is alright
Thanks! I wonder also about the encoding. Like is audio/mp3
going to be supported broadly, or is there some safer ground I should take.
I don't think Blob is doing any encoding at all. Maybe adds "audio/mp3" as a header? but idk
yeah, https://w3c.github.io/FileAPI/#blob-section from here it is just immutable reference to byte sequence
That's interesting. I've been wondering when the encoding is determined. Here is seems stuff is happening based on that param: • https://w3c.github.io/FileAPI/#attributes-blob which references: • https://w3c.github.io/FileAPI/#blob-package-data I'm not very good at parsing formal descriptions like this...
I'm reading through "Types and Programming Languages" by Pierce, and plan to translate all of the OCaml implementations into Clojure, to make sure I understand them and can explain their behaviour. Here's the first https://github.com/moea/tapl-clojure/blob/main/src/tapl_clojure/arith.clj — if anyone wants to do a read-along (with like a weekly call to sync up, and a channel to gripe in, send me a PM).