Sunrise and sunset times, noon time, max elevation for any location coordinates (latitude & longitude) and any date & time https://github.com/jarmol/racket I would make a web version for racket if I could, similar to this one which I made in elm-language http://www.sci.fi/~benefon/sunposcalculator.html
There’s RacketScript which can compile Racket to JS. https://github.com/vishesh/racketscript
It’s pretty experimental though. Can’t guarantee that it will work for your code.
@jjlammi It happens periodically that the server needs restarting.
Send a mail to Vishesh or @stchang
Playground is either stopped or dead. whois : No match for domain "http://RAPTURE.TWISTEDPLANE.COM\|RAPTURE.TWISTEDPLANE.COM".
@soegaard2 urlang looks interesting too!
Thanks! I’d be happy to answer questions - the documentation is unfortunately next to non-existant, but there are some examples.
@soegaard2 I’ll test it, how it translates from racket to JS. I like just that kind of tiny examples as procedure fact preferring them instead of some huge examples like blog managers and todo lists which are always more or less boring and where you finally don’t learn much because they are too complicated for a beginner.
Note that with (require urlang/extra)
you use some of the standard Racket constructs missing from JavaScript, such as when
, unless
, cond
, case
, letrec
and a version of for
.
There are small examples here: https://github.com/soegaard/urlang/tree/master/urlang/tests
@soegaard2 Yesss, it works in deed! :+1:
@jjlammi
For programs that can run in Node directly, it can be convenient to set current-urlang-run?
to #t
Running the Racket program will then automatically run the generated JavaScript with Node.
@soegaard2 OK, mean while I have first run with simple (require urlang) without option extra and using drRacket, then it has apparently not run fact,js but I found afterwards the file created. Next I have run it from bash command line with racket, then the created js code was displayed in shell window and executed factorial calculation ok. Your urlang tool may be very useful also in some bigger projects which can be divided into small pieces and compiled. The remaining tricky pieces can be manually written in js Then you hopefully have at the end lots of cleaner functions and a package easier to test and maintain, so as the elm people claim (quite few in the world except in Norway). Well, I don’t anything useful with any programming languages as I’m not a developer, just interested in functional programming, having lots of time learning it as retired.
I believe the published RacketScript currently only works on versions of racket prior to the introduction of linklets https://docs.racket-lang.org/reference/linklets.html\|https://docs.racket-lang.org/reference/linklets.html
I believe @stchang is leading the work to upgrade it.