这是indexloc提供的服务,不要输入任何密码
Skip to content

Trying to compile nested let takes up a lot of resource #1463

@mikecat

Description

@mikecat

I'm trying Carp 0.5.5 on Windows (using released binary).

When I tried to compile this code:

(defn test [] 42)

(let [s (prn (test))]
  (IO.println &s)
)

With a command line:

carp -b test.carp

It failed saying 'clang-cl.exe' is not recognized in a few seconds.
I don't think this failure is not a large problem here: It is suggesting that I should find or create the executable file in some way if I want to go further.

However, when I tried to compile this code in the same way:

(defn test [] 42)

(let [a (test)]
  (let [s (prn a)]
    (IO.println &s)
  )
)

The compiler used almost 100% of the CPU for at least several minutes, and it used more than 20GB of memory.

I think this usage of resources is too much for trying to compile this simple code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions