mratsim / weave

A state-of-the-art multithreading runtime: message-passing based, fast, scalable, ultra-low overhead
Other
532 stars 22 forks source link

error: special identifier '_' ignored #195

Closed alperyilmaz closed 2 hours ago

alperyilmaz commented 8 months ago

I tried the nested matrix transposition and when I compiled it I got the following error:

/home/user/.nimble/pkgs2/weave-0.4.0-91b8ef3189383a89f75e3c35c64687b8a67bf549/weave/runtime_fsm.nim(228, 12) Error: the special identifier '_' is ignored in declarations and cannot be used

my nim version is 2.1.1, I'm on Linux.

edit: I dont get error message in Nim stable version1.6.10 so, this error involves devel version of Nim, can be ignored.. just consider this issue as a heads up..

mratsim commented 6 months ago

197 should help tracking the issue

PhilippMDoerner commented 6 months ago

Just for reference, the very first example on the README

import weave

proc fib(n: int): int =
  # int64 on x86-64
  if n < 2:
    return n

  let x = spawn fib(n-1)
  let y = fib(n-2)

  result = sync(x) + y

proc main() =
  var n = 20

  init(Weave)
  let f = fib(n)
  exit(Weave)

  echo f

main()

Is also affected.

/home/philipp/.nimble/pkgs2/weave-0.4.0-91b8ef3189383a89f75e3c35c64687b8a67bf549/weave/runtime_fsm.nim(228, 12) Error: the special identifier '_' is ignored in declarations and cannot be used
Miqueas commented 5 months ago

I have the same problem. But I have Nim 2.0.2 on Windows. I fixed it by just replacing that "_" with a "w" lmao

mratsim commented 2 hours ago

I've tagged new release to workaround this. It was fixed in https://github.com/mratsim/weave/pull/190 but nimble pulls the latest based on Github tags.