yanyingwang / ming

名语言/Ming-Language
https://yanying.wang/ming
Other
7 stars 0 forks source link

Cannot use #2

Closed Kalimehtar closed 1 year ago

Kalimehtar commented 1 year ago

Hello!

I installed ming, but it doesn't work for me.

I got an error after #lang ming

...\Racket\8.9\pkgs\ming\core.rkt:15:4: mapping/racket/list: undefined;
 cannot reference an identifier before its definition

The same error, if I write

#lang racket
(require ming/core)
(require (mingize racket/list))

What do I wrong?

yanyingwang commented 1 year ago

Sorry for the late reply, I missed the issue notification.

I tried that, it works for me. Did you run that as a script? If it did not work as a script, can you try that within the REPL?

2023-07-14 16-56-19 的屏幕截图

And also, a simpler way for your code would be like below:

#lang racket
(require ming/racket/base)
(require ming/racket/list)
yanyingwang commented 1 year ago

And there are other two points that need to be in the user's head always:

  1. I may change the mappings at any time, for your stable usage, I recommend using the git reference for the installation: raco pkg install "https://github.com/yanyingwang/ming.git#c88c0574ddda9a777bd8b996ef6b5468553639e3"
  2. the ming package is just and only works, the error messages and lots of other things need to be enhanced in my following time. since the mappings weigh more than others for me, so I may still put energy into that part.
Kalimehtar commented 1 year ago

I tried different Racket versions.

Ming works on Linux/racket-8.7 and doesn't work on WIndows/racket-8.9

./raco pkg install ming
...
raco setup: 3 making: <pkgs>/ming
mapping/racket/base: undefined;
 cannot reference an identifier before its definition
  in module: "C:\Users\Monk\AppData\Roaming\Racket\8.9\pkgs\ming\private\core.rkt"
  compilation context...:
   C:\Users\Monk\AppData\Roaming\Racket\8.9\pkgs\ming\racket\base.rkt
   C:\Users\Monk\AppData\Roaming\Racket\8.9\pkgs\ming\list.rkt
  context...:
   body of "C:\Users\Monk\AppData\Roaming\Racket\8.9\pkgs\ming\private\core.rkt"
   C:\Users\Monk\AppData\Roaming\Racket\8.9\pkgs\ming\private\core.rkt:17:0
   C:\Program Files\Racket\collects\syntax\wrap-modbeg.rkt:46:4
   C:\Program Files\Racket\collects\compiler\private\cm-minimal.rkt:686:0: compile-zo*
   C:\Program Files\Racket\collects\compiler\private\cm-minimal.rkt:452:15
   C:\Program Files\Racket\collects\compiler\private\cm-minimal.rkt:441:12: build
   C:\Program Files\Racket\collects\compiler\private\cm-minimal.rkt:412:0: maybe-compile-zo
   C:\Program Files\Racket\collects\compiler\private\cm-minimal.rkt:210:0: compile-root
   C:\Program Files\Racket\collects\compiler\private\cm-minimal.rkt:145:4: compilation-manager-load-handler
   C:\Program Files\Racket\collects\compiler\private\cm-minimal.rkt:686:0: compile-zo*
   C:\Program Files\Racket\collects\compiler\private\cm-minimal.rkt:452:15
   C:\Program Files\Racket\collects\compiler\private\cm-minimal.rkt:441:12: build
   C:\Program Files\Racket\collects\compiler\private\cm-minimal.rkt:412:0: maybe-compile-zo
   C:\Program Files\Racket\collects\compiler\private\cm-minimal.rkt:210:0: compile-root
   C:\Program Files\Racket\collects\compiler\private\cm-minimal.rkt:105:4
   C:\Program Files\Racket\collects\setup\parallel-build.rkt:332:9
   ...
yanyingwang commented 1 year ago

from my trying with a Windows, this is related to the difference of Windows path from the UNIX system. Even though I can fix that part of code, it's better for me to refactor it by explicitly defining them.

https://github.com/yanyingwang/ming/commit/56e429eb4916ee509747a7dd2bcf0d860c1de24a

please try it again, it works on my PC now.

Kalimehtar commented 1 year ago

Now it works.

谢谢