Fork me on GitHub
#conjure
<
2020-05-21
>
Olical09:05:47

Going to get develop released this morning with a few fixes to Clojure as well as initial Janet support 😄 feedback has been "it works", so I'm happy with that.

Olical09:05:29

For the record, Janet is a really nice language! It's like Fennel, but runs it it's own little VM you can embed. Great for little lispy scripts, like babashka really.

pyrmont09:05:55

I'm a fan and honestly looks great for things where you'd perhaps use a language like Ruby. Amazing startup time if that's something that gets you frustrated about Clojure. Stack traces are short and useful too!

Olical09:05:37

I wonder what the performance is like compared to something like LuaJIT, like if I wanted to build a small and light graphical application, for example. Or embed it as a language in another program etc.

borkdude09:05:11

If you're frustrated about the startup time of Clojure, babashka solves that problem without changing the language. FYI 🙂

💯 8
pyrmont09:05:22

A big difference from Clojure is that while it does have some immutable types, it exposes and encourages the use of mutable equivalents for certain activities. Immutable types aren't persistent data structures with structural sharing.

borkdude10:05:46

@sogaiu just shared an interesting snippet with me where you can call janet from babashka btw 😄

Olical10:05:48

What is pod-derek? Is that a Janet wrapper or something?

sogaiu10:05:32

pod-derek is a proof-of-concept babashka pod: https://github.com/babashka/babashka.pods

sogaiu10:05:59

it's not as cool as a general janet wrapper -- i've only exposed janet's peg/match function. the gist demonstrates using the peg functionality in janet via babashka. there is a bit of meta-ness to it because the pod protocol is bencode-based, and the pod is being asked to decode a bencode string -- and this is being transferred back and forth using bencode 🙂

Olical10:05:14

Ah I see! That makes sense.

Olical10:05:18

Pretty cool though!

sogaiu10:05:34

just gluing cool bits that other folks have made

Olical10:05:43

That's all programming is.

sogaiu10:05:30

i got the sense that your aniseed / conjure stuff was somewhat more than that when looking at the source 🙂

Olical10:05:32

Hah, I mean, there's a lot of code there now, but I'm just trying to glue Neovim to every lispy tool I can find on top of Fennel.

Olical10:05:45

Standing on the shoulders of giants who are in turn on shoulders of giants.

sogaiu10:05:16

awesome work :thumbsup:

Olical10:05:06

My theory is that Lispy stuff needs to band together since it's small compared to mainstream things. So if I can have Racket, Clojure, Janet and Scheme people all using one core tool they all have a reason to improve the UX and fix bugs in the shell for each other.

💯 4
Olical10:05:20

Kind of tricking communities into helping each other in the long term 😅

sogaiu10:05:41

ah, that's an interesting idea!

borkdude10:05:51

giants all the way down?

sogaiu10:05:11

the protocol that babashka is using should be usable from other places too...so wouldn't editors be able to talk to pods too if they implemented one end of the protocol?

borkdude10:05:05

the protocol is very much the same as the nREPL protocol, but focused on invocation functions instead of arbitrary evaluation

borkdude10:05:47

this is because not all pod implementations have something like eval. e.g. it would be awkward to have to write a Lisp to expose some Rust libraries

Olical11:05:53

Quick guide on getting a CIDER nREPL running on the JVM, I'm going to do one for shadow-cljs too. Trying to keep it as small as possible, just the bare bones to get an eval going https://github.com/Olical/conjure/wiki/Quick-start:-Clojure

Olical11:05:57

Edits are welcome!

rafaeldelboni13:05:25

Where is the dog on the release? Is only on majors?

Olical13:05:57

It's just inconsistent 😅

😂 4
Olical13:05:13

I should be held accountable for dogless releases though!

Olical13:05:23

It won't happen again 🙏

Olical13:05:31

Currently adding support for different kinds of pairs for form selection, other than the default () to address https://github.com/Olical/conjure/issues/87

Olical14:05:10

I got number prefixed eval of the current expression working today 👀 That means that 1,ee inside this code where your cursor is the pipe [:one [:two [:thr|ee]]] would return [:two [:three]]

Olical14:05:36

Trying to get it to work for outside in so you could say "evaluate one form in from the root", but that's harder. (this should also work with eval+replace and eval at mark)

dave15:05:05

so would 0,ee eval [:three]? and 2,ee would eval [:one [:two [:three]]] ?

dave15:05:29

sorry, i misread how this works

dave15:05:37

i was thinking inside out instead of outside in 🙂

Olical15:05:15

Inside out, so 0 would be whatever your cursor is on, that's normal. 1 would skip one later and 2 would skip both.

Olical15:05:32

If you go too far out it just esplodes because you get unmatched parens, no idea how to get around that.

dave15:05:36

i double misread it 😄

Olical15:05:38

Just don't give it a big n? 😬

Olical15:05:55

It's the "so many forms in from the outermost" that's proving impossible right now.

Olical15:05:00

I can't work out how I can do it.

dave15:05:02

if you do that, you deserve the performance you get ¯\(ツ)

dave15:05:35

at that point, it's much easier to just visually select what you want to eval and use ,E

dave15:05:29

being able to use small N's seems super useful though

dave15:05:50

i can imagine trying to eval something with ,ee, realizing that it's a level in from what i want, and then being able to just do 1,ee to jump a level out

Olical15:05:13

Yup, that's the goal! I like that 1,e! and 1,em[mark] just works too 😄

Olical15:05:19

Just gotta work out the root version.

Olical15:05:26

Without it introducing bugs or slowing things down.

dave15:05:39

that's awesome

dave15:05:23

one thing that's kind of weird about going outside-in (the eval root version) is that there can be more than one form

dave15:05:38

i guess you could wrap the forms in do?

Olical15:05:03

Yeaaaah, it becomes ambiguous and I'm really not sure about it

Olical15:05:08

You can just send multiple forms for eval

Olical15:05:13

and you'll get all the results back

Olical15:05:31

So I'll probably do that if I get it working. Wrapping things in do changes the behaviour of some macros etc so I want to avoid that.

dave15:05:50

ah, even better

dave15:05:03

nothing wrong with sending multiple forms

dave15:05:29

@olical i noticed this on the quick start wiki page for clojure:

clj -m nrepl.cmdline \-A:nrepl:cider
    --middleware "[cider.nrepl/cider-middleware]" \
    --interactive
is the backslash on the first line a typo? maybe there was supposed to be a newline after it?

Olical15:05:53

Indeed it is, that -A shouldn't be there, I thought I deleted it!

Olical15:05:58

Good catch

Olical16:05:41

Also added support for evaluating [] and {} pairs if you didn't spot that 😄

Olical16:05:49

You can configure it and add more pairs if you want

dave16:05:03

i saw that! i'm looking forward to giving that a try

pyrmont18:05:42

:ConjureSchool is fantastic.

✔️ 8
💯 4
pyrmont18:05:18

I want all my programming tools to teach me how to use them like this.

Olical18:05:20

That's great to hear and exactly the sort of thing I want to provide. Put a smile on my face 😄

pyrmont18:05:52

How should I go about changing the background colour of the HUD? I tried putting highlight TabLine ctermbg=Black in my init file but it doesn't seem to have an impact.

Olical18:05:32

I think it counts as a popup menu?

Olical18:05:55

Like the completion menu, I'm pretty sure it's the same group? Maybe I can define a specific group for Conjure's log though :thinking_face:

pyrmont18:05:01

Ah, OK. I was searching for floating window so that might have been the issue.

Olical18:05:05

Yeah, I've never set it myself, but I remember someone else having an issue with their theme. Mine is easily readable so I've never worried about it, but a bit of documentation about this would be great.

pyrmont18:05:44

:highlight Pmenu ctermbg=<colour> guibg=<colour>

pyrmont18:05:03

Works a treat 😄

Olical18:05:29

Not sure where best to document that, maybe an FAQ in the wiki :thinking_face:

pyrmont18:05:30

Yeah. Not sure. I thought it might be in the :help but actually searched that by just putting variations of 'colour' and 'background' into GitHub's repository search.

pyrmont18:05:40

So if it had been in the wiki, I would have found it 🙂

Olical21:05:02

Started an FAQ https://github.com/Olical/conjure/wiki/Frequently-asked-questions - any other gotchas with regards to Conjure in general that could go on there are more than welcome.

👍 8
rafaeldelboni19:05:53

What features should works for janet-lang in conjure? Would be cool to have a table showing what we can do per language in conjure WDYT?

Olical19:05:10

Everything other than completion and go to definition, and those could potentially added.

rafaeldelboni19:05:19

so yeap, is working fine here haha

Olical19:05:39

I don't know if a comparison table is really required since 95% will work out of the box with everything, it's just the more IDE like stuff (completion etc) that can be hit or miss depending on the environment.

Olical19:05:58

But I may be wrong!