Preferences

made a PR for raku, hope it gets accepted

some cool things stood out:

  sub fixangle($a) { $a mod 360 }    # raku has built-in support for Euclidean modulo
  pi                                 # raku has pi
  
  # Solve equation of Kepler
  my $e = $M; 
  my $delta;

  repeat {                           # raku's repeat loop allows initialisation of delta to be folded in
    $delta = $e - $eccent * sin($e) - $M; 
    $e -= $delta / (1 - $eccent * cos($e));
  } while abs($delta) > 1e-6;

Thanks! (I'm a big fan of Raku; it doesn't get nearly the respect it deserves!)
Thank you! I accepted it
yay - it has made it to raku module status https://raku.land/zef:librasteve/Moonphase

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal