GithubHelp home page GithubHelp logo

Keyword equals is false about mal HOT 9 CLOSED

kanaka avatar kanaka commented on September 26, 2024
Keyword equals is false

from mal.

Comments (9)

ktodyruik avatar ktodyruik commented on September 26, 2024

FYI, I noticed this in the 'issue_166_string_ops' branch as I was trying out the new string functions.

from mal.

kanaka avatar kanaka commented on September 26, 2024

@ktodyruik I'm not seeing that behavior. Are you certain you are on the most recent version of the branch (what git hash are you testing against)? Also, what version of mono do you have?

from mal.

ktodyruik avatar ktodyruik commented on September 26, 2024

I built it using .NET 4.0 on Windows (not mono), and I checked out the
issue_166_string_ops branch.

Kerry

On Wed, Feb 17, 2016 at 8:20 AM, Joel Martin [email protected]
wrote:

@ktodyruik https://github.com/ktodyruik I'm not seeing that behavior.
Are you certain you are on the most recent version of the branch (what git
hash are you testing against)? Also, what version of mono do you have?


Reply to this email directly or view it on GitHub
#177 (comment).

from mal.

ktodyruik avatar ktodyruik commented on September 26, 2024

I just tried it with the main branch. The issue appears to be in the _equal_Q type comparison.

debug

from mal.

kanaka avatar kanaka commented on September 26, 2024

@ktodyruik interesting. But all the other tests work for you? For the statement (= kw :abc) you shouldn't be getting a MalSymbol passed to the _equal_Q function because the symbol should have been resolved to it's value from the environment (unless you intentional quote the symbol). I don't see that behavior myself with mono on Linux so I don't have a way to reproduce it in order to debug and come up with a fix. If it really is getting passed _equal_Q as a symbol, then the problem is more likely to be in eval_ast (where symbols are resolved in the environment) or EVAL (which sets up the call to eval_ast).

Also, are you using an unmodified source tree and are those complete (and only) commands that you ran? I only ask because the prompt should be user> and not >.

from mal.

ktodyruik avatar ktodyruik commented on September 26, 2024

@kanaka Thanks. Good suggestions. I have been playing around with the source code. I'll make sure I'm testing on a clean copy and take a closer look.

from mal.

ktodyruik avatar ktodyruik commented on September 26, 2024

@kanaka I just ran it on a fresh copy and it worked correctly. So I caused the bug somehow. Sorry to trouble you. :)

from mal.

kanaka avatar kanaka commented on September 26, 2024

@ktodyruik glad you figured it out.

from mal.

ktodyruik avatar ktodyruik commented on September 26, 2024

@kanaka I see my mistake now. I tried to create an alias from = to eq?. This was executed prior to the above equals expression.

I mistakenly wrote

(defmacro! eq? =)

instead of

(def! eq? =)

This caused the _equal_Q function to be a macro. Then, EVAL called macroexpand which evaluated the expression to false.

from mal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.