Fork me on GitHub

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


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 )


I see thanks


@dmiller caught this via reddit ( 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: . 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.


I'm keeping an eye on They have to deal with some of things I hope to deal better with in ClojureCLR.Next, such as real generics. See for their cheatsheet. (@cgrand @baptiste-from-paris)

❤️ 4

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.


I was searching exactly for that


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.


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.


If I recall correctly you use the | right?


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



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.


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.


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


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


I figured I would have to do that.


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.


that thought occurred to me as i looked at your cheatsheet


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, ));


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