This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-04
Channels
- # aleph (1)
- # aws-lambda (2)
- # beginners (30)
- # boot (2)
- # cider (7)
- # cljs-dev (65)
- # clojure (130)
- # clojure-denmark (1)
- # clojure-france (1)
- # clojure-germany (2)
- # clojure-greece (1)
- # clojure-italy (19)
- # clojure-kc (2)
- # clojure-nl (12)
- # clojure-poland (1)
- # clojure-russia (11)
- # clojure-spain (1)
- # clojure-spec (20)
- # clojure-uk (176)
- # clojurescript (65)
- # css (3)
- # cursive (8)
- # datomic (26)
- # editors (94)
- # emacs (10)
- # fulcro (66)
- # graphql (5)
- # midje (1)
- # off-topic (48)
- # om-next (2)
- # overtone (1)
- # re-frame (15)
- # reagent (6)
- # reitit (10)
- # shadow-cljs (68)
- # sql (3)
@hagmonk This is vaguely related to our discussion the other day: https://arxiv.org/pdf/1707.00015.pdf
You can try it out here: https://ravichugh.github.io/sketch-n-sketch/releases/v0.6.3/
Out of all the things my brain wants to remember, things like "It's tax day" or "cancel that comcast subscription" are impossible. I can instead recite much of the script of Full Metal Jacket, or SpaceBalls. I wish I knew why!
Like those walk-through-my-house tricks that people use to remember 100 names in 5 minutes.
Yeah I should try that someday - names! Another thing that totally escapes me. I need a “notional representation” in my head of the person before I can attach a name to them. Before that everyone gets filed under “person”.
I used to think I had a filing problem, then I realised that actually I just never paid attention when people told me their names. Once I started doing that I actually had a fighting chance of remembering some 🙂
Yeah there are tricks around repeating their name, finding a mnemonic - it’s very impressive when someone has mastered doing that to large groups. People do like it when their names are recalled.
This repo has some interesting stuff in it: https://github.com/ravichugh/sketch-n-sketch/blob/acafb67256dd59f177b17c4b051eae905ba11987/src/DeuceTools.elm
Now this is what I call a function name: https://github.com/ravichugh/sketch-n-sketch/blob/acafb67256dd59f177b17c4b051eae905ba11987/src/CodeMotion.elm#L456
They’ve put an impressive amount of work into the refactoring for what is essentially a glorified PoC
The pattern-matching stuff is really nice for programming tool work (compilers, refactoring tools)
I often find myself wanting core.match to be a little more integrated into clojure for similar reasons
Last time I used it was in depify
https://github.com/hagmonk/depify/blob/master/src/depify/project.clj
I had to break a larger match clause into several functions because it kept blowing the … whatever it is when there's too much code. ETOOMANYBYTECODE
breaking it into separate functions appeased the compiler. so things like that, plus it's a lib, plus it's a macro, I end up using it quite sparingly
maybe we could get partway there if it was possible to use specs in destructuring positions
e.g.:
(define-syntax while
(syntax-rules (<keywords>)
((<pattern>) <template>)
...
((<pattern>) <template>)))
Which might look like:
(define-syntax while
(syntax-rules ()
((while condition body ...)
(let loop ()
(if condition
(begin
body ...
(loop))
#f)))))
it seems very natural. and i love the first class pattern matching. but i haven't used it enough in anger. seems tough these days to flush out a real long project in scheme
microsoft just recently released a configuration purposed scheme for .NET: https://github.com/Microsoft/schemy
look in /usr/share/sandbox
, it's used to express the sandbox restrictions the kernel enforces on various subsystems
I think people run up against the limitations of syntax-rules pretty quickly, and then move on to syntax-case, which is way more complex and also (IIRC) turing complete.
Syntax-rules is just very simple templates. It’s really nice for basic things but can’t do anything more complex.
In syntax-case, you work with syntax objects, which are sort of like Clojure forms with metadata
And then in Racket you can go to syntax-parse, which is a full grammar-based macro definition like spec on steroids: https://docs.racket-lang.org/syntax/Parsing_Syntax.html
No, but I’m generally interested in macro systems - I’ve never actually sat down and used Scheme for much beyond some simple dabbling though.
wow. have you looked at bronsa's decompiler library about how it tries to reconstitute macros from their expanded forms?
Yeah, it’s pretty neat. He didn’t think it would be that useful for real-world things though, IIRC it special cases a bunch of things using heuristics for each macro form it tries to decompile.
I spoke about some of this at the conj a couple of years ago: https://www.youtube.com/watch?v=kt4haSH2xcs
@hagmonk Is that MacOS scheme interpreter available for apps to use? Not that embedding some other one in an app is hard to do I guess.
owing to the fact the entire reason it's there is to interpret sandbox profiles, I'm pretty sure it's quite locked down ... I haven't actually even thought to check if an API is exposed, lol
Yeah, just embedding whichever Scheme flavour you prefer is probably easier for an app anyway.
the biggest worry is probably asking questions about apple and stuff. which i won't do and don't care about
no no, I'm just joking. People often figure out where I work, I'm not particularly secretive about it
well i won't ask any more questions. i just hope you're at the new campus and not stuck at the old.
It’s surprising how many large companies don’t want this sort of thing public though, I’ve had to sign various EULA extensions for companies who don’t want me to identify them as customers, I think because they don’t want anyone knowing the technologies they use.
well, the fruit company has unique problems. people stalk social media looking for things engineers are talking about, trying to infer direction, you wouldn't believe the lengths ... some of the downside of being an almost $1T company that has a history of surprising markets
yeah. i hate the rumor stuff. sucks when products/services are introduced and get a yawn because everyone heard already and expects more surprises regardless of how great the actual release is