Fork me on GitHub
#conjure
<
2020-04-15
>
Olical09:04:34

Gooooood morning! Onwards with polish and docs!

Olical09:04:06

Let's add a ConjureConnect [host - optional] [port] command since that's sorely required.

Olical09:04:11

Hmm, annoying, the socket I'm using only accepts IP addresses, not hostnames.

Olical09:04:24

I'd like to allow people to set up mappings to connect to a staging hostname and port ideally.

Olical09:04:01

Ah hah! vim.loop.getaddrinfo! More undocumented stuff I'm discovering through example C code 😅

Olical10:04:48

Ayyy

; localhost:37797 (connected)
; --------------------------------------------------------------------------------
; Assumed session: d2ec65ba-0cdc-411e-b813-2e035534de30

Olical10:04:30

Now you can provide IP or host and it'll get resolved. I'll test it without an internet connection and make sure it can fallback too.

Olical10:04:59

You can also change the default host from localhost just in case you're running in a docker container or something and you want your automatic .nrepl-port file connection to hook into that.

sogaiu10:04:46

@olical i am curious how you are thinking to support janet

Olical10:04:20

Good question! No idea yet, I'm thinking at the very least I can start the Janet process from Neovim and then read/write stdio but I'd like something a bit richer than that if I can get it.

Olical10:04:26

So I can tell the difference between stdout etc.

Olical10:04:39

I might have to design my own wrapping of calls to capture and tag output.

Olical10:04:08

Another longer term approach would be implementing an nREPL server for it.

Olical10:04:29

Since all you need is a server, bencode and a fairly simple handler function.

Olical10:04:57

Wait, Janet is bakpakin too!?

Olical10:04:08

That's the person behind Fennel alongside technomancy haha

sogaiu10:04:40

it's awesome stuff

Olical10:04:52

Now I'm even more impressed.

sogaiu10:04:56

there is a net branch that has some work on tcp stuff too

Olical10:04:13

Ah so network isn't a standard easy to use thing with Janet?

sogaiu10:04:22

it's thanks to you and your fennel / aniseed work that i started looking into it 🙂

🎉 4
sogaiu10:04:31

it doesn't seem to be yet

sogaiu10:04:47

but there is recent work so i'm guessing it won't be long

Olical10:04:35

Well yeah, maybe I'll end up with a minimal stdio based thing to begin with then upgrade to a networked (either faithful or loosely based on nREPL) implementation

Olical10:04:44

Same with Racket really.

sogaiu10:04:45

ah, racket doesn't have an nrepl thing?

Olical10:04:57

I don't think so.

sogaiu10:04:57

it has been so many years so i have no idea what's up with racket these days 🙂

sogaiu10:04:06

i'll go sniff around

Olical10:04:27

Each of these will be their own challenge and tradeoffs, but should be fun since I can implement them as drop in modules that can be rewritten or replace without impacting the rest of Conjure.

Olical10:04:32

Modular design ftw

👍 4
Olical10:04:53

Does this guy ever stop building cool things

sogaiu10:04:02

apparently not

sogaiu10:04:16

you seem to be doing your share too 😉

Olical10:04:25

That looks great to be honest. I wouldn't connect the Conjure Clojure nREPL client to it since it assumes Clojure (babashka is okay). So I'd extract the nREPL parts out into a reusable module and write a Racket stdio module and a Racket nREPL module I think.

Olical10:04:19

As far as I can tell, if you want a good Racket eval experience you have to use DrRacket at the moment, it'll be nice to give them more options https://stackoverflow.com/questions/5352997/programming-schemeracket-with-vim-how-to-get-started

Olical10:04:31

It'll make working though SICP more attractive to me too 😅

👍 4
Olical10:04:42

I didn't like the inability to just eval forms while working on MIT Scheme

Olical10:04:02

Having to edit things into the bottom of the file, save, change terminal and exec the file got boring after a while.

👍 4
sogaiu10:04:21

it's been so many years since i touched sicp, i don't remember much of what i tried with 😅

sogaiu10:04:33

may be i should try again

Olical10:04:49

I mainly gave up because math tends to break my brain and I found that harder than the programming concepts by an order of magnitude.

Olical10:04:31

I couldn't even get to the interesting "write a language" bit because I was getting stuck googling what different mathematical symbols meant (I had to draw them on a character lookup website to find out what they were called)

sogaiu10:04:16

i have similar experiences -- but luckily these days there are more online resources and people to be easily queried

dave14:04:17

i've had the exact same experience with SICP!

Olical11:04:44

Opinions on test file running? Are these sufficient as a baseline? * run all tests * run current buffer tests * run test word under cursor? (think it'd be kind of tricky to extract the name from the root form but maybe)

👍 8
Olical11:04:23

And if you are in the source file, should "run this buffers tests" go and find the -test suffix version of your namespace and test that? What if you want to test your current namespace since the tests are bundled with it.

Olical11:04:23

I guess there's all, this buf and it's test counterpart (or the other way around) and root form under cursor.

Olical11:04:37

If there's any more essential ones, please do shout!

Olical12:04:35

:run-all-tests "ta"
   :run-ns-tests "tt"
   :run-current-test "tr"
Going with these as the default mappings.

dharrigan12:04:35

how about "ta" - test all, "tn" - test (in) namespace and "tc" - test (under current) cursor?

👍 4
sogaiu12:04:21

i find those easier to remember

Olical13:04:59

Hmm, I like the first two, still on the fence about current one

Olical13:04:09

Since ee is current expression

Olical13:04:13

er is root

Olical13:04:35

Technically I'll extract the root form then regex the var name out

Olical13:04:44

tt for test this

dharrigan13:04:23

It may be technically correct, but for the user-experience, often one has to go with something that just sounds better and is easier to remember as a mnenomic.

dharrigan13:04:39

Life is full of compromises, esp when users are concerned 🙂

sogaiu13:04:59

choosing keybindings is naming isn't it? no wonder it's hard

dharrigan13:04:12

Yes, one of the 2 classic computing problems: cache invalidation, naming and off-by-one errors.

😆 16
Olical13:04:11

My USB headphones have ceased to work correctly with my Ubuntu laptop 🙃

Olical13:04:27

If I plug the jack in directly it's input only, if I go over USB it's output only.

rafaeldelboni14:04:08

I'm more arch linux user, but I usually check which one is active using this command: pacmd list-sinks | grep -e 'name:' -e 'index:'

rafaeldelboni14:04:37

Then I can set the one I want to use with: pacmd set-default-sink 1

rafaeldelboni14:04:53

where 1 is the id listed on the command above

rafaeldelboni14:04:26

try close the app you want to use your headphone before

Olical14:04:49

Ah interesting, thanks! I'll take a look at some point. If I undock everything and just plug the jack in it's all fine

Olical14:04:59

It's when I have the USB soundcard in that everything messes up

rafaeldelboni14:04:42

yeah, same happens here with a usb headset, so I need to do the set-default

dharrigan16:04:56

try installing pulseaudio volume control

dharrigan16:04:06

and see if you can adjust the inputs/outputs?

Olical16:04:14

Yeah, tried that, it's just not there 😬

Aron14:04:18

Sounds linux all right.

Olical14:04:39

I'm going to leave the current implementation on the legacy-jvm branch when I'm done. Just in case people want to keep using it for a while after release.

nate16:04:26

just tried out develop branch, everything works great. I really like the HUD UI and how it complements the log

nate16:04:42

and I really like how it doesn't add another JVM to computer

nate16:04:53

I love the JVM, but I have enough of them running already

😂 8
nate17:04:39

if I can vote for two things for the new conjure: pretty printing and completion

nate17:04:44

missed those two

nate17:04:52

but it is looking fantastic

nate17:04:55

I really like the HUD