scene.org File Archive

File download

<root>­/­parties­/­2023­/­vccc23­/­christmas-diamonds/pdw_j_j_vc3-2023.zip

File size:
9 720 bytes (9.49K)
File date:
2024-01-03 14:15:18
Download count:
all-time: 5

Preview

  • file_id.diz 740B
  • jstars.j 23B
  • result.png 7.57K
  • source.png 6.16K

file_id.diz

JStars

Author:   pdw
Category: Christmas Challenge
System:   Portable
Language: J
Len source code: 23
Len exe file:    23
Len code only:   23
Instructions:
  Download and install from https://www.jsoftware.com
  Then run it with `j9.4/bin/jconsole jstars.j` (Or, using Windows,
  drag and drop the file on top of `jconsole.exe` I suppose)
Description:
  This program uses the equation x²-y²≡3 (mod 6) to find the locations
  of the stars. And no, this is not obfuscated. This is just what J
  code looks like ;) Perhaps try:
    load 'trace'
    trace '3=6|-/~*:i.19'
Comments:
  The code uses an 'echo' verb to turn it into a "program", as
  required by the rules. If you're typing at the REPL, you can
  omit it and save four bytes.