Arc Forumnew | comments | leaders | submitlogin
Rainbow Error on Win7x64
1 point by jsgrahamus 1970 days ago | 3 comments

  arc> (rbs)
  benchmark 1 of 9 arc-code-indexer
  warm-up   ....................
  benchmark ....................
  avg 351.21
  benchmark 2 of 9 catch/throw
  warm-up   ....................
  benchmark ....................
  avg 154.355
  benchmark 3 of 9 find-top-numbers
  warm-up   ....................
  benchmark ....................
  avg 110.0
  benchmark 4 of 9 generate-primes
  warm-up   ....................
  benchmark ....................
  avg 90.81
  benchmark 5 of 9 nbody-600
  warm-up   ....................
  benchmark ....................
  avg 88.475
  benchmark 6 of 9 read-arc-dot-arc-content
  warm-up   ....................
  benchmark ....................
  avg 37.08
  benchmark 7 of 9 sort-random-numbers
  warm-up   ....................
  benchmark ....................
  avg 98.705
  benchmark 8 of 9 sqrt
  warm-up   ....................
  benchmark ....................
  avg 115.845
  benchmark 9 of 9 string-tokeniser
  Message    : Unhandled exception on thread#0: File not found: /dev/urandom
  At instruction (invocation:[free:infile->[builtin:infile]][lit:"/dev/urandom"])
  (fn (nc s i) (let str (infile "/dev/urandom") (protect (fn nil (do ((let gs48 nil (assign gs48 (fn (gs49) (if gs49 (do (let x (readb str) (if (no (> x
   247)) (do (do (atomic-invoke (fn nil (with (gs50 s gs52 i gs53 (c (mod x nc))) (let gs51 gs53 (sref gs50 gs51 gs52)))))) (do (assign i (+ i 1)))) nil
  )) (gs48 (< i n))) nil)))) (< i n)))) (fn nil (close str)))) s) in (fn (c) (with (nc 62 s (newstring n) i 0) (let str (infile "/dev/urandom") (protect
   (fn nil (do ((let gs48 nil (assign gs48 (fn (gs49) (if gs49 (do (let x (readb str) (if (no (> x 247)) (do (do (atomic-invoke (fn nil (with (gs50 s gs
  52 i gs53 (c (mod x nc))) (let gs51 gs53 (sref gs50 gs51 gs52)))))) (do (assign i (+ i 1)))) nil)) (gs48 (< i n))) nil)))) (< i n)))) (fn nil (close s
  tr)))) s)) in rand-string

  ...

   gs512) (prn "benchmark " (do (assign i (+ i 1))) " of " n " " name) (let result (test repeat-count) (do (atomic-invoke (fn nil (with (gs525 t gs527 n
  ame gs528 result) (let gs526 gs528 (sref gs525 gs526 gs527)))))) (prn "avg " (result 'avg)))) (assign gs512 (+ gs512 1)) (gs523 (< gs512 gs522))) nil)
  ))) (< gs512 gs522))))))) t) in run-benchmark-suite
  rbs
          at rainbow.vm.VM.thread(VM.java:72)
          at rainbow.Console.compileAndEval(Console.java:193)
          at rainbow.Console.interpret(Console.java:127)
          at rainbow.Console.repl(Console.java:117)
          at rainbow.Console.main(Console.java:59)
  Caused by: rainbow.ArcError: File not found: /dev/urandom
          at rainbow.types.FileInputPort.getStream(FileInputPort.java:20)
          at rainbow.types.FileInputPort.<init>(FileInputPort.java:12)
          at rainbow.functions.fs.InFile.invoke(InFile.java:13)
          at rainbow.functions.Builtin.invoke(Builtin.java:23)
          at rainbow.types.ArcObject.invokef(ArcObject.java:44)
          at rainbow.vm.instructions.invoke.optimise.Invoke_free_literal.operate(Invoke_free_literal.java:25)
          at rainbow.vm.VM.loop(VM.java:91)
          at rainbow.vm.VM.thread(VM.java:58)
          ... 4 more
  Caused by: java.io.FileNotFoundException: \dev\urandom (The system cannot find the path specified)
          at java.io.FileInputStream.open(Native Method)
          at java.io.FileInputStream.<init>(FileInputStream.java:138)
          at java.io.FileInputStream.<init>(FileInputStream.java:97)
          at rainbow.types.FileInputPort.getStream(FileInputPort.java:18)
          ... 11 more
  arc>


1 point by jsgrahamus 1970 days ago | link

May be related to this error:

  arc> (profiler (repeat 5 (tokens (rand-string 1000) #\0)))
  Message    : Unhandled exception on thread#0: can't compare rand-string with rand-string
  At instruction (invocation:[free:rainbow-profile-report->[builtin:rainbow-profile-report]])
  (fn nil (html-prof ((rainbow-profile-report) 'invocation-profile)))
  [builtin:protect]
  Java stack : rainbow.ArcError: Unhandled exception on thread#0: can't compare rand-string with rand-string
  At instruction (invocation:[free:rainbow-profile-report->[builtin:rainbow-profile-report]])
  (fn nil (html-prof ((rainbow-profile-report) 'invocation-profile)))
  [builtin:protect]
          at rainbow.vm.VM.thread(VM.java:72)
          at rainbow.Console.compileAndEval(Console.java:193)
          at rainbow.Console.interpret(Console.java:127)
          at rainbow.Console.repl(Console.java:117)
          at rainbow.Console.main(Console.java:59)
  Caused by: rainbow.ArcError: can't compare rand-string with rand-string
          at rainbow.functions.rainbow.RainbowProfileReport$FunctionProfileComparator.compare(RainbowProfileReport.java:90)
          at rainbow.functions.rainbow.RainbowProfileReport$FunctionProfileComparator.compare(RainbowProfileReport.java:80)
          at java.util.TreeMap.compare(TreeMap.java:1188)
          at java.util.TreeMap.put(TreeMap.java:531)
          at java.util.TreeSet.add(TreeSet.java:255)
          at rainbow.functions.rainbow.RainbowProfileReport.createInvocationReport(RainbowProfileReport.java:60)
          at rainbow.functions.rainbow.RainbowProfileReport.createReport(RainbowProfileReport.java:36)
          at rainbow.functions.rainbow.RainbowProfileReport.report(RainbowProfileReport.java:31)
          at rainbow.functions.rainbow.RainbowProfileReport.invokef(RainbowProfileReport.java:22)
          at rainbow.vm.instructions.invoke.optimise.Invoke_free.operate(Invoke_free.java:22)
          at rainbow.vm.VM.loop(VM.java:91)
          at rainbow.vm.VM.thread(VM.java:58)
          ... 4 more
  arc>

-----

1 point by jsgrahamus 1970 days ago | link

When I try this -- (start-spiral-app) -- I get the following on the terminal session:

  *** redefining neighbours
  *** redefining start-spiral-app
  [thread#14031232: instruction stack -1; arg stack -1]
  arc> setuid:not implemented
  ready to serve port 8085
And when I point my browser to http://127.0.0.1:8085, I get "It's alive" on the browser.

Probably a problem with setuid not being implemented.

-----

1 point by jsgrahamus 1970 days ago | link

Seems to be the non-existence of /dev/urandom. Guess that makes sense.

-----