Fork me on GitHub
#editors
<
2018-07-04
>
cfleming02:07:30

@hagmonk This is vaguely related to our discussion the other day: https://arxiv.org/pdf/1707.00015.pdf

cfleming02:07:45

Although I think Prune is more along the lines of what you meant.

hagmonk02:07:07

@cfleming oh sweet, that's pretty interesting, I'll put that on the stack of papers

cfleming02:07:23

Seems a little buggy though

cfleming02:07:50

I’m sad they never released Prune, even if they just threw a zip over the fence.

hagmonk02:07:03

Hah, web based - at first I was trying to recognize the UI chrome. OS/2? Irix??

cfleming02:07:36

It does have that 80's sort of feel 🙂

hagmonk02:07:59

"I know this … this is UNIX …"

cfleming02:07:22

You’re quite the treasure trove of movie quotes!

cfleming02:07:31

Although even I get that one.

hagmonk02:07:38

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!

cfleming03:07:03

There’s probably a way you can encode useful information using that.

cfleming03:07:40

Like those walk-through-my-house tricks that people use to remember 100 names in 5 minutes.

hagmonk03:07:20

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”.

hagmonk03:07:46

I just apologize up front and tell people to prepare to be asked several times

cfleming03:07:22

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 🙂

hagmonk03:07:31

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.

cfleming03:07:21

They’ve put an impressive amount of work into the refactoring for what is essentially a glorified PoC

hagmonk03:07:14

Interesting, I haven't actually looked at Elm before

cfleming03:07:27

It’s like haskell-lite

cfleming03:07:51

The pattern-matching stuff is really nice for programming tool work (compilers, refactoring tools)

hagmonk03:07:34

I often find myself wanting core.match to be a little more integrated into clojure for similar reasons

cfleming03:07:17

I think it works best with static types (ADTs), but that would be nice, yeah.

hagmonk03:07:17

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

hagmonk03:07:01

it was probably angry because I was using recur on the rhs of the matches

cfleming03:07:32

No, I think it just generates a humungous amount of code.

hagmonk03:07:42

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

hagmonk03:07:29

maybe we could get partway there if it was possible to use specs in destructuring positions

dpsutton03:07:16

the scheme macro syntax with its case style is just outstanding

hagmonk03:07:52

I'd love to see an example!

cfleming03:07:47

e.g.:

(define-syntax while
  (syntax-rules (<keywords>)
    ((<pattern>) <template>)
    ...
    ((<pattern>) <template>)))

cfleming03:07:12

Which might look like:

(define-syntax while
  (syntax-rules ()
    ((while condition body ...)
     (let loop ()
       (if condition
           (begin
             body ...
             (loop))
           #f)))))

cfleming03:07:52

So it’s a pattern-matching system rather than defmacro

hagmonk03:07:31

so this relieves us from having to quote and splice?

cfleming03:07:09

Right. I haven’t used it enough in anger to know whether it does so totally or not.

dpsutton03:07:52

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

cfleming03:07:02

It makes simple macros much easier IMO, but it can’t be used for more complex ones.

cfleming03:07:13

i.e. something like core.match can’t be expressed as a simple template.

hagmonk03:07:45

fun fact: there's a scheme interpreter in the macOS and iOS kernels

cfleming03:07:05

Really? I didn’t know that.

dpsutton03:07:32

microsoft just recently released a configuration purposed scheme for .NET: https://github.com/Microsoft/schemy

hagmonk03:07:50

look in /usr/share/sandbox, it's used to express the sandbox restrictions the kernel enforces on various subsystems

cfleming03:07:06

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.

dpsutton03:07:35

ah i've always been confused by the distinction.

cfleming03:07:07

Syntax-rules is just very simple templates. It’s really nice for basic things but can’t do anything more complex.

cfleming03:07:38

In syntax-case, you work with syntax objects, which are sort of like Clojure forms with metadata

cfleming03:07:31

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

dpsutton03:07:44

are you a schemer? from college or part time?

cfleming03:07:57

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.

cfleming03:07:29

I read a lot about all this when writing the macro parsing stuff for Cursive.

dpsutton03:07:02

wow. have you looked at bronsa's decompiler library about how it tries to reconstitute macros from their expanded forms?

dpsutton03:07:39

the stuff you've done with static analysis is amazing

cfleming03:07:54

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.

cfleming03:07:07

Thanks! It’s a fun project to work on.

cfleming03:07:53

I spoke about some of this at the conj a couple of years ago: https://www.youtube.com/watch?v=kt4haSH2xcs

cfleming03:07:07

In case you’re interested.

cfleming03:07:08

@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.

cfleming03:07:29

I just looked in /usr/share/sandbox/, that’s pretty wild

hagmonk03:07:34

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

hagmonk04:07:08

I think there's also a plist interpreter in there too. ah, the sacrifices we make

cfleming04:07:21

Yeah, just embedding whichever Scheme flavour you prefer is probably easier for an app anyway.

dpsutton04:07:35

do you work at apple @hagmonk?

cfleming04:07:22

If he told you that, he’d probably have to kill you.

dpsutton04:07:43

haha my friend works there. it's secretive but it's not that secretive

dpsutton04:07:09

the biggest worry is probably asking questions about apple and stuff. which i won't do and don't care about

cfleming04:07:26

The armed drones are in flight and on course to your location as we speak.

hagmonk04:07:18

I'm not at liberty to discuss the nature of my mission :thinking_face:

dpsutton04:07:28

fair enough 🙂

dpsutton04:07:50

i didn't mean to derail anything

hagmonk04:07:03

I get this question all the time ;)

hagmonk04:07:01

no no, I'm just joking. People often figure out where I work, I'm not particularly secretive about it

hagmonk04:07:28

but I've been there for 13 years so this is how I survive ;)

dpsutton04:07:56

well i won't ask any more questions. i just hope you're at the new campus and not stuck at the old.

cfleming04:07:19

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.

dpsutton04:07:07

i've heard google uses Go. keep that down low though

hagmonk04:07:54

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

dpsutton04:07:36

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

cfleming04:07:28

How’s that self-driving car coming along, @hagmonk?

dpsutton04:07:47

drones are rerouted and will be at your location soon

hagmonk04:07:16

LOL, I drive myself to work every day, dunno what you're talking about :) plus originally from .au, so I'm in the market for a V8 self-driving car but they're hard to come by …

cfleming04:07:17

I haven’t heard much about Holden’s self-driving plans.

cfleming04:07:33

(this is getting dangerously #off-topic)

hagmonk04:07:57

last I heard they self-drove themselves to an off-shore manufacturing facility

hagmonk04:07:12

there aren't too many people in the channel ;)

dpsutton04:07:30

and sean got bored and left. i think we're safe

😂 16