jaunt

:jaunt: a jaunt away from Clojure | <https://www.jaunt-lang.org> | Currently `[org.jaunt-lang/jaunt "0.2.1"]`
eraserhd 2016-04-09T17:26:37.000124Z

I’m trying to run #C0F4MB8AY on #C0SBWN3AP. I’m getting a lot of warnings, which is cool. I’m also getting an error from prismatic.schema that clojure.core/refer* is not public.

eraserhd 2016-04-09T17:26:55.000125Z

@arrdem: I’ll dig in, but do you know off the top of your head?

eraserhd 2016-04-09T17:28:10.000126Z

Also, I had to upgrade my JDK and unset my JAVA_HOME to run it. Apparently I was pinned to Java 7

eraserhd 2016-04-09T17:33:15.000127Z

Aha, refer-clojure expands into refer*, which is now private.

eraserhd 2016-04-09T17:33:32.000128Z

It’s … refer madness

arrdem 2016-04-09T17:34:28.000129Z

Argh. Did I break refer-clojure?

eraserhd 2016-04-09T17:34:33.000130Z

yes :simple_smile:

arrdem 2016-04-09T17:34:36.000131Z

goddamnit.

arrdem 2016-04-09T17:35:26.000132Z

Okay. I know why. Would you please open an issue? I'll try and hotfix this.

arrdem 2016-04-09T17:36:27.000133Z

Sorry about that.

eraserhd 2016-04-09T17:39:20.000134Z

OK

eraserhd 2016-04-09T17:40:47.000135Z

https://github.com/jaunt-lang/jaunt/issues/132

arrdem 2016-04-09T17:41:20.000138Z

Yeah I'm surprised that this didn't break the test suite...

arrdem 2016-04-09T18:00:32.000139Z

@eraserhd: can you give me some details about what's breaking?

arrdem 2016-04-09T18:00:55.000140Z

@eraserhd: :refer-clojure in a ns form will work just fine. Are you seeing a (refer-clojure ...) at the top level of a file?

eraserhd 2016-04-09T18:03:53.000141Z

I didn't think so. The problem is in prismatic schema.

arrdem 2016-04-09T18:05:20.000142Z

can you post a stacktrace?

eraserhd 2016-04-09T18:05:31.000143Z

I did a quick grep, and didn't see anything weird, but I could have missed something. Jaunt is smarter about NS forms?

arrdem 2016-04-09T18:05:39.000144Z

it's starting to be.

eraserhd 2016-04-09T18:06:01.000145Z

Sure. I'll be back at my computer in a few minutes.

arrdem 2016-04-09T18:06:12.000146Z

thanks. Trying to repro on my end.

arrdem 2016-04-09T18:09:04.000147Z

:refer-clojure definitely works in Jaunt 0.2.0, do you have a snapshot build?

arrdem 2016-04-09T18:09:19.000148Z

(refer-clojure ...) as a top level form is definitely fucked.

eraserhd 2016-04-09T18:17:18.000150Z

It’s using refer-clojure in the middle of the namespace.

arrdem 2016-04-09T18:17:46.000151Z

Okay. That's what I'm patching right now. I'll have a 0.3.0-SNAPSHOT build for you in a sec.

arrdem 2016-04-09T18:19:20.000154Z

why refer-clojure needs to be a macro not a fn is beyond me...

eraserhd 2016-04-09T18:21:52.000155Z

midje has a lot of deprecation warnings. I will submit a PR later. (all about ‘:use’)

arrdem 2016-04-09T18:22:45.000156Z

Okay. Demoting refer-clojure to a fn from a macro takes care of this.

arrdem 2016-04-09T18:25:41.000157Z

@eraserhd: [org.jaunt-lang/jaunt "0.3.0-SNAPSHOT"] now has a bugfix for this.

arrdem 2016-04-09T18:25:53.000158Z

you should be able to just pull it down from clojars

eraserhd 2016-04-09T18:38:36.000159Z

@arrdem Cool! I shall do so in a short bit.

arrdem 2016-04-09T18:39:50.000160Z

Take your time. I've got my commit for the day in 😛

eraserhd 2016-04-09T19:00:52.000162Z

@arrdem I think I’m getting further now

eraserhd 2016-04-09T19:01:06.000163Z

OH, let me lein clean

eraserhd 2016-04-09T19:03:24.000164Z

All tests pass!

arrdem 2016-04-09T19:03:29.000165Z

w00000t

arrdem 2016-04-09T19:03:58.000166Z

made my day 😄

eraserhd 2016-04-09T19:05:49.000167Z

pushed a patch to avi. Avi is now on jaunt

arrdem 2016-04-09T19:06:33.000168Z

We'll see how long that lasts 😛

eraserhd 2016-04-09T19:06:58.000169Z

heh

eraserhd 2016-04-09T19:07:12.000170Z

back to implementing horizontal splits

eraserhd 2016-04-09T19:07:19.000171Z

Let’s try out this code reloading thing :simple_smile:

arrdem 2016-04-09T19:07:35.000172Z

The ns reloading thing isn't in mainline yet 😢

arrdem 2016-04-09T19:07:37.000173Z

sorry

arrdem 2016-04-09T19:08:03.000174Z

turns out it's actually pretty hard. Will be the main feature of 0.3.0 tho.

eraserhd 2016-04-09T19:08:16.000175Z

Ah. :simple_smile:

arrdem 2016-04-09T19:08:33.000176Z

The fn metadata stuff bronsa was helping me with was the main blocker to getting that out the door. Should happen this week.

eraserhd 2016-04-09T19:09:21.000177Z

Oh, I read your whole blogpost last night. Oxcart is so what I would do, had I time.

eraserhd 2016-04-09T19:09:32.000178Z

I’ve been on-and-off working on a lisp called Moreso.

eraserhd 2016-04-09T19:09:59.000179Z

In fact, Clojure was the last Lisp to study before making Moreso, and it kind of broke me.

arrdem 2016-04-09T19:10:12.000180Z

Ha

bronsa 2016-04-09T19:10:36.000181Z

I feel like something like oxcart would be better off as a language started off from scratch rather than piling stuff on top of clojure

bronsa 2016-04-09T19:10:47.000182Z

too many edge cases to consider in order to adapt clojure

eraserhd 2016-04-09T19:10:57.000183Z

Yeah. Clojure definitely shows all the layers.

arrdem 2016-04-09T19:11:32.000184Z

Yeah. Oxcart was a bunch of fun. We'll see how much of that and the strict clojure stuff I did with amalloy makes it into Jaunt.

arrdem 2016-04-09T19:12:04.000185Z

Definitely agree wrt starting from scratch, but Jaunt is an exercise in avoiding those reinvention costs.

arrdem 2016-04-09T19:12:31.000186Z

I think you can get within a small epsilon from what's already there.

bronsa 2016-04-09T19:12:59.000187Z

btw @arrdem I was talking about oxcart/kiss at clojurex with @mtrimpe -- the "def as pure action over an immutable ns" thing has some non-trivial obstacles to overcome

bronsa 2016-04-09T19:13:10.000188Z

e.g. handling forward refs & mutually recursive defs

arrdem 2016-04-09T19:13:22.000189Z

Yeah. One of the main reasons I dropped the idea.

arrdem 2016-04-09T19:13:54.000190Z

I spent a lot of time last year sketching out how to make def a fn from an env and an expr to an ev.

eraserhd 2016-04-09T19:14:08.000191Z

I think you’d need a module form, e.g. R6RS.

arrdem 2016-04-09T19:14:25.000192Z

Yep. Your entire file ends up becoming an implicit module.

bronsa 2016-04-09T19:14:38.000193Z

I think a clojure-y language would gain a lot more by having racket-style compilation stages than immutable namespaces

arrdem 2016-04-09T19:14:40.000194Z

Which incidentally is pretty much where Jaunt is headed.

arrdem 2016-04-09T19:15:01.000195Z

I haven't read anything about those.

bronsa 2016-04-09T19:15:20.000196Z

(not that they mutually exclusive concepts, I don't think)

arrdem 2016-04-09T19:15:27.000197Z

I think that the ns reloading changes I've got coming down the pipe address the primary shortcomings of the existing mutable nss.

arrdem 2016-04-09T19:15:36.000198Z

but I'm not biased at all.

bronsa 2016-04-09T19:16:34.000199Z

@arrdem: I'll link you the paper as soon as I can find it

arrdem 2016-04-09T19:16:43.000200Z

@bronsa: thanks.

bronsa 2016-04-09T19:16:47.000201Z

here's some context though https://docs.racket-lang.org/guide/phases.html#(tech._phase._level)

arrdem 2016-04-09T19:17:02.000203Z

I need to read the Typed Racket paper and Ambrose's thesis too....

arrdem 2016-04-09T19:17:17.000204Z

debating how far I want to push adding :arglist metadata to fns directly.

bronsa 2016-04-09T19:17:35.000205Z

https://www.cs.utah.edu/plt/publications/gpce13-f-color.pdf here it is

arrdem 2016-04-09T19:17:54.000206Z

@bronsa: I discovered that Clojure can't/won't emit an invokePrim call for a lambda because it uses arglist var metadata to find the prim hint 😕

bronsa 2016-04-09T19:18:02.000207Z

yeah

bronsa 2016-04-09T19:18:33.000208Z

which partially explains my crusade against people who alter :arglists

arrdem 2016-04-09T19:18:38.000209Z

Hah.

arrdem 2016-04-09T19:18:49.000210Z

Yeah. I'm all aboard that train.

arrdem 2016-04-09T19:19:25.000211Z

I've been pondering whether it makes sense for defn to put metadata on the var. For instance doc metadata would arguably be more useful on the fn.

arrdem 2016-04-09T19:19:57.000212Z

since the var itself doesn't actually have any usage...

bronsa 2016-04-09T19:20:08.000213Z

up until 1.3 (I think) clojure used to store the metadata on fns

arrdem 2016-04-09T19:20:12.000214Z

although deprecated only makes sense on the var.

bronsa 2016-04-09T19:20:12.000215Z

or 1.2

bronsa 2016-04-09T19:20:25.000216Z

sometime around those versions anyway

arrdem 2016-04-09T19:23:23.000217Z

@bronsa: so I had this idea today... #:foo {:unqual 0 ::bar 1 ::baz/qux 2 'unqual 3 '/qual 4 '/alias/qual 5}

bronsa 2016-04-09T19:23:34.000218Z

please no

arrdem 2016-04-09T19:23:41.000219Z

lmao

bronsa 2016-04-09T19:23:59.000220Z

'/foo made my eyes bleed

arrdem 2016-04-09T19:24:19.000221Z

I mean... if it gets rid of :_/

arrdem 2016-04-09T19:24:45.000223Z

and ' there is normal quote on eval.

arrdem 2016-04-09T19:25:16.000224Z

the idea is just that you define / as a symbol prefix to mean contextual qualification same as :: on keywords does.

bronsa 2016-04-09T19:25:35.000225Z

😞

bronsa 2016-04-09T19:25:42.000226Z

I.. just don't like it

arrdem 2016-04-09T19:25:54.000227Z

I understand that Rich considers it a syntax bikeshed, but I agree with you about : vs :: and think it's a critical one.

bronsa 2016-04-09T19:26:00.000228Z

but yeah, I get what you're going for

bronsa 2016-04-09T19:27:03.000229Z

shrug I've done my bit, not going to spend any more time arguing on that proposal

bronsa 2016-04-09T19:27:26.000230Z

kinda hard to gauge if the syntactic tradeoffs being proposed are worth it without them giving us the full context

arrdem 2016-04-09T19:27:54.000231Z

Yeah.

bronsa 2016-04-09T19:28:34.000232Z

happy to at least know that macro grammars in some form or the other are likely coming in 1.9

bronsa 2016-04-09T19:28:50.000233Z

(and that Rich is, indeed, still alive)

arrdem 2016-04-09T19:29:04.000234Z

Those will be interesting.

arrdem 2016-04-09T19:29:25.000235Z

I agree they're much needed.

eraserhd 2016-04-09T19:41:31.000237Z

I don’t think I’ve needed anything like this. Though I guess I understand the semantic thing.

arrdem 2016-04-09T19:41:57.000238Z

It's Rich's language and he's gonna do what he likes with it.

arrdem 2016-04-09T19:44:24.000239Z

The example I like is that core.async was gonna be baked into compiler.java until tbaldridge wrote the existing implementation...

arrdem 2016-04-09T19:45:11.000240Z

or at least that's how I've heard the story.

arrdem 2016-04-09T19:46:02.000242Z

eeeeeh

bronsa 2016-04-09T19:52:04.000243Z

I'll take any other implementation over lexical transformations

arrdem 2016-04-09T20:03:01.000244Z

One thought on the arglist thing... having that metadata on the Var allows hinted invocations in forward declared cases.