Code Monkey home page Code Monkey logo

Comments (4)

wodeni avatar wodeni commented on May 9, 2024

Can't reproduce yet but created a sharable link for this trio: https://penrose.cs.cmu.edu/try/?gist=47f337506eb5f0500ed1cf1c98a8061c. Thanks for reporting @Johnicholas!!

from penrose.

samestep avatar samestep commented on May 9, 2024

Interesting; that error message comes from here:

const getIndex = (locals: Locals, id: ad.Id): number => {
const local = safe(locals.indices.get(id), "missing local");
return (
numAddendParams +
(local.typename === "i32" ? 0 : locals.counts.i32) +
local.index
);
};

Seems like a bug? But @wodeni you said you're unable to reproduce?

from penrose.

Johnicholas avatar Johnicholas commented on May 9, 2024

Another occurrence of the same error message:

index-b4db132c.js:236 Uncaught (in promise) TypeError: missing local
    at ru (index-b4db132c.js:236:22024)
    at AT (index-b4db132c.js:247:19681)
    at KAe (index-b4db132c.js:247:20722)
    at index-b4db132c.js:247:21692
    at Array.map (<anonymous>)
    at JU (index-b4db132c.js:247:21662)
    at rgt (index-b4db132c.js:247:24285)
    at fAt (index-b4db132c.js:266:2926)
    at async mAt (index-b4db132c.js:266:3451)
    at async wFe (index-b4db132c.js:308:7815)

image

.domain empty, .substance empty, .style:

canvas {
    width = 1000
    height = 1000
}

GLOBAL {
    COLOR_TRANSPARENT = #00000000
    COLOR_DEBUG = #ff0000ff
    COLOR_BLACK = #000000ff


    -- sqrtFirstRun = 10 -- or ?
    -- firstRun = sqr(sqrtFirstRun)
    -- a = (?, ?)
    -- b = a + (firstRun, 0)
    -- sqrtSecondRun = 10 -- or ?
    -- secondRun = sqr(sqrtSecondRun)
    -- sqrtRise = 10 -- or ?
    -- rise = sqr(sqrtRise)
    -- c = b + (secondRun, rise)
    -- sqrtThirdRun = 10 -- or ?
    -- thirdRun = sqr(sqrtThirdRun)
    -- d = c + (thirdRun, 0)
    -- ab = Line {
    --     start: a
    --     end: b
    -- }
    -- bc = Line {
    --     start: b
    --     end: c
    -- }
    -- cd = Line {
    --     start: c
    --     end: d
    -- }
    -- -- Polyline {
    -- --     points: [a, b, c, d]
    -- -- }
    -- -- ensure a[1] == b[1]
    -- -- ensure a[0] < b[0]
    -- -- ensure b[0] < c[0]
    -- -- ensure c[0] < d[0]
    -- -- ensure c[1] == d[1]
    -- -- ensure a[1] < c[1]
    -- -- firstCornerCenter = (?, ?)
    -- firstCornerCircle = Circle {
    --     fillColor: COLOR_TRANSPARENT
    --     r: 50
    --     strokeWidth: 1
    --     strokeColor: COLOR_BLACK
    -- }

    -- Circle {
    --     center: firstCornerCircle.center
    --     r: 6
    --     fillColor: COLOR_DEBUG
    -- }
    -- Circle {
    --     center: closestPointLine(a, b, firstCornerCircle.center)
    --     r: 6
    --     fillColor: COLOR_DEBUG
    -- }
    -- Circle {
    --     center: closestPointLine(b, c, firstCornerCircle.center)
    --     r: 6
    --     fillColor: COLOR_DEBUG
    -- }
    -- ensure 

    -- ensure signedDistanceLine(a, b, firstCornerCircle.center) == firstCornerCircle.r
    -- ensure signedDistanceLine(b, c, firstCornerCircle.center) == firstCornerCircle.r
    -- ensure signedArea([closestPointLine(a, b, firstCornerCircle.center), firstCornerCircle.center, closestPointLine(b, c, firstCornerCircle.center)], true) > 10


    -- secondCornerCircle = Circle {
    --     fillColor: COLOR_TRANSPARENT
    --     r: 50
    --     strokeWidth: 1
    --     strokeColor: COLOR_BLACK
    -- }
    -- ensure signedDistanceLine(b, c, secondCornerCircle.center) == secondCornerCircle.r
    -- ensure signedDistanceLine(c, d, secondCornerCircle.center) == secondCornerCircle.r
    -- ensure secondCornerCircle.center[1] < c[1]
    -- Circle {
    --     center: closestPointLine(b, c, secondCornerCircle.center)
    --     r: 6
    --     fillColor: COLOR_DEBUG
    -- }
    -- Circle {
    --     center: closestPointLine(c, d, secondCornerCircle.center)
    --     r: 6
    --     fillColor: COLOR_DEBUG
    -- }

    -- a = (?, ?)
    -- b = (?, ?)
    -- c = (?, ?)
    -- d = (?, ?)
    -- line1 = Line {
    --     start: a
    --     end: b
    -- }
    -- circle1 = Circle {
    --     fillColor: COLOR_TRANSPARENT
    --     strokeWidth: 1
    --     strokeColor: COLOR_BLACK
    -- }
    -- ensure collinearOrdered(a, closestPointLine(a, b, circle1.center), b)
    -- ensure vdist(closestPointLine(a, b, circle1.center), circle1.center) == circle1.r
    -- line2 = Line {
    --     start: b
    --     end: c
    -- }
    -- ensure collinearOrdered(b, closestPointLine(b, c, circle1.center), c)
    -- ensure vdist(closestPointLine(b, c, circle1.center), circle1.center) == circle1.r

    a = (?, ?)
    b = (?, ?)
    c = (?, ?)
    d = (?, ?)
    Line {
        start: a
        end: b
    }
    Line {
        start: b
        end: c
    }
    Line {
        start: c
        end: d
    }
    Circle {
        center: innerPointOffset(a, b, c, 50)
        r: 6
        fillColor: COLOR_DEBUG
    }
}

I am guessing it has something to do with using the /try editor for a while.

from penrose.

Johnicholas avatar Johnicholas commented on May 9, 2024

image

Trio at https://penrose.cs.cmu.edu/try/?gist=60790bafa8d6be51b778c348ad8a43e2

from penrose.

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.