Fork me on GitHub
#clr
<
2023-02-08
>
Benjamin11:02:48

I'm trying to run crl.tools.nrepl. How do I do it? lein clr repl [ERROR] No such environment variable: CLJCLR15_40 1

dmiller13:02:33

Depends on how you are running ClojureCLR. Assuming Windows. Adjust accordingly. Given I always have an executable of ClojureCLR sitting around and I'm often playing with local changes, I just set CLJCLR15_40=path-to-executable If you have ClojureCLR installed as a dotnet tool, then in CMD.exe: set CLJCLR15_40=%USERPROFILE%\.dotnet\tools In Powershell: $Env:CLJCLR15_40 = $Env:USERPROFILE + "\.dotnet\tools" (On linux, similarly except use $HOME/.dotnet/tools )

Benjamin13:02:37

I see thanks

bobcalco12:02:34

@dmiller caught this via reddit (https://www.reddit.com/r/Clojure/comments/10wsyws/london_clojurians_talk_simpler_user_interfaces/) and thought you might find this "functional ui meta wrapper" of sorts interesting in light of our recent side-discussion about UI stuff. Looks like this library is well designed and written portably - cljc with cljs/clj for specific UI frameworks: https://github.com/phronmophobic/membrane . Should be more straightforward to port to CLR UI frameworks than reinventing another paradigm. Maybe others will find it useful too. Was generally nodding my head throughout the talk.

dmiller15:02:13

I'm keeping an eye on https://github.com/tensegritics/ClojureDart. They have to deal with some of things I hope to deal better with in ClojureCLR.Next, such as real generics. See https://t.co/SVxdMLJPqb for their cheatsheet. (@cgrand @baptiste-from-paris)

❤️ 4
cgrand18:02:18

I don’t know the CLR world but two things were instrumental in dealing with generics: they have cast methods as part of many interfaces and they stick to their naming conventions.

baptiste-from-paris18:02:33

I was searching exactly for that

cgrand18:02:39

Thus our collections are dynamically typed, only the root deals with generics. And when we emit calls to cast methods (to ensure the root is properly typed) when we pass them as argument to a typed param.

dmiller18:02:01

Not really any equivalent of the cast methods, if I understand them correctly. I was looking at some of the notational variants you have introduced into the reader. I'm going to need something along those lines for designated generic types. What we have right now is just painful to use.

baptiste-from-paris18:02:47

If I recall correctly you use the | right?

dmiller18:02:23

Yes, | is used. That's not the problem. The problem is that it ties into the very basic and cumbersome platform designation for types rather than a simplified syntax that you see in C# or F#. Thus

|System.Collections.Generic.List`1[System.Int32]|

cgrand19:02:27

We chose to use symbols with metadata for types because it doesn’t break other dialects readers and we could leverage tagged literals to provide a more convenient notation. Two things that weren’t a concern or possible when ClojureCLR started.

cgrand19:02:55

In fact cast methods are not required we could have done it about the same way without them. They just gave us the idea and simplified implementation.

dmiller19:02:47

Yes, tagged literals came after I did |...|. If only ...

cgrand20:02:56

Well you can always offer two notations one legacy and a new one.

dmiller20:02:20

I figured I would have to do that.

cgrand21:02:26

Well, if you do that, I don’t think there’s any value in using the exact same notation as ClojureDart (since chances a generic type would be exactly the same on two targets is hair thin). However reusing / as the tag would create a precedent that #/ is an interop thing.

dmiller23:02:49

that thought occurred to me as i looked at your cheatsheet

baptiste-from-paris08:02:08

we also have "weirder" type hints in some rare situation like this one -> (let [a' ^#/(int double String -> void) a] a) which translates to final void Function(, dc.double, dc.String, ) a$PRIME_$1=(a$1 as void Function(, dc.double, dc.String, ));

baptiste-from-paris08:02:09

it's for type hinting as a Function that has 3 typed parameters and returns void. cljd users should never face this kind of forms, it's really for low level programming