René's URL Explorer Experiment


Title: Improper handling of negative signs with exponents and modulo · Issue #170 · vpython/glowscript · GitHub

Open Graph Title: Improper handling of negative signs with exponents and modulo · Issue #170 · vpython/glowscript

X Title: Improper handling of negative signs with exponents and modulo · Issue #170 · vpython/glowscript

Description: It seems that for some reason -10**2 was incorrectly being parsed as (-10)**2 instead of -(10**2). To fix this the preprocesser replaces all negative signs that don't directly follow "e", "E", or "**" and don't directly precede "=" with ...

Open Graph Description: It seems that for some reason -10**2 was incorrectly being parsed as (-10)**2 instead of -(10**2). To fix this the preprocesser replaces all negative signs that don't directly follow "e", "E", or "...

X Description: It seems that for some reason -10**2 was incorrectly being parsed as (-10)**2 instead of -(10**2). To fix this the preprocesser replaces all negative signs that don't directly follow "e&qu...

Opengraph URL: https://github.com/vpython/glowscript/issues/170

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improper handling of negative signs with exponents and modulo","articleBody":"It seems that for some reason `-10**2` was incorrectly being parsed as `(-10)**2` instead of `-(10**2)`. To fix this the preprocesser replaces all negative signs that don't directly follow `\"e\"`, `\"E\"`, or `\"**\"` and don't directly precede `\"=\"` with `- 1 *`. However, this changes parsing behavior on operators with greater or equal precedence to multiplication. This only actually matters for exponentiation and modulo, since multiplication and division don't care where the negative goes. Since the preprocesser doesn't check for whitespace after the exponentiation operator, `10 ** -2` is getting turned into `10 ** - 1 * 2` and parsed as `(10 ** (-1)) * 2` instead of `10 ** (-2)`. Since the preprocesser doesn't check for modulo, `5 % -2` is getting turned into `5 % - 1 * 2` and parsed as `(5 % (-1)) * 2` (which is `0`) instead of `5 % (-2)` (which is `1` if you ask JavaScript and `-1` if you ask CPython).\r\n\r\nThis is the exact spot where this is happening: [https://github.com/vpython/glowscript/blob/master/lib/compiling/GScompiler.js#L376](url)","author":{"url":"https://github.com/jackson-smith-a","@type":"Person","name":"jackson-smith-a"},"datePublished":"2023-04-07T00:32:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/170/glowscript/issues/170"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:510c37f2-2027-e35c-a912-ef348c905fea
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB2A0:8B50E:6569E6A:8301C84:6975BEA4
html-safe-noncecd06f681f11ad4b6970d72dca67188cde5b126091a1a3eeb7ceea880c2465378
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMkEwOjhCNTBFOjY1NjlFNkE6ODMwMUM4NDo2OTc1QkVBNCIsInZpc2l0b3JfaWQiOiI5MDc1NDUyMTAwOTczNTIzNTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac10e3dacf3ba1a8a90f1b438ceb410ebbca73fb3deb745b574a59774a59bd6f11
hovercard-subject-tagissue:1658200627
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/vpython/glowscript/170/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ffaa94900c342ff957600c0dc6891cf48769c181628c1e36f00e9aa93452eb68/vpython/glowscript/issues/170
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ffaa94900c342ff957600c0dc6891cf48769c181628c1e36f00e9aa93452eb68/vpython/glowscript/issues/170
og:image:altIt seems that for some reason -10**2 was incorrectly being parsed as (-10)**2 instead of -(10**2). To fix this the preprocesser replaces all negative signs that don't directly follow "e", "E", or "...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejackson-smith-a
hostnamegithub.com
expected-hostnamegithub.com
None4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f
turbo-cache-controlno-preview
go-importgithub.com/vpython/glowscript git https://github.com/vpython/glowscript.git
octolytics-dimension-user_id1280757
octolytics-dimension-user_loginvpython
octolytics-dimension-repository_id187905631
octolytics-dimension-repository_nwovpython/glowscript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id187905631
octolytics-dimension-repository_network_root_nwovpython/glowscript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release488b30e96dfd057fbbe44c6665ccbc030b729dde
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/vpython/glowscript/issues/170#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fvpython%2Fglowscript%2Fissues%2F170
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fvpython%2Fglowscript%2Fissues%2F170
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=vpython%2Fglowscript
Reloadhttps://patch-diff.githubusercontent.com/vpython/glowscript/issues/170
Reloadhttps://patch-diff.githubusercontent.com/vpython/glowscript/issues/170
Reloadhttps://patch-diff.githubusercontent.com/vpython/glowscript/issues/170
vpython https://patch-diff.githubusercontent.com/vpython
glowscripthttps://patch-diff.githubusercontent.com/vpython/glowscript
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fvpython%2Fglowscript
Fork 27 https://patch-diff.githubusercontent.com/login?return_to=%2Fvpython%2Fglowscript
Star 85 https://patch-diff.githubusercontent.com/login?return_to=%2Fvpython%2Fglowscript
Code https://patch-diff.githubusercontent.com/vpython/glowscript
Issues 3 https://patch-diff.githubusercontent.com/vpython/glowscript/issues
Pull requests 5 https://patch-diff.githubusercontent.com/vpython/glowscript/pulls
Actions https://patch-diff.githubusercontent.com/vpython/glowscript/actions
Projects 0 https://patch-diff.githubusercontent.com/vpython/glowscript/projects
Security 0 https://patch-diff.githubusercontent.com/vpython/glowscript/security
Insights https://patch-diff.githubusercontent.com/vpython/glowscript/pulse
Code https://patch-diff.githubusercontent.com/vpython/glowscript
Issues https://patch-diff.githubusercontent.com/vpython/glowscript/issues
Pull requests https://patch-diff.githubusercontent.com/vpython/glowscript/pulls
Actions https://patch-diff.githubusercontent.com/vpython/glowscript/actions
Projects https://patch-diff.githubusercontent.com/vpython/glowscript/projects
Security https://patch-diff.githubusercontent.com/vpython/glowscript/security
Insights https://patch-diff.githubusercontent.com/vpython/glowscript/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/vpython/glowscript/issues/170
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/vpython/glowscript/issues/170
Improper handling of negative signs with exponents and modulohttps://patch-diff.githubusercontent.com/vpython/glowscript/issues/170#top
https://github.com/jackson-smith-a
https://github.com/jackson-smith-a
jackson-smith-ahttps://github.com/jackson-smith-a
on Apr 7, 2023https://github.com/vpython/glowscript/issues/170#issue-1658200627
https://github.com/vpython/glowscript/blob/master/lib/compiling/GScompiler.js#L376https://patch-diff.githubusercontent.com/vpython/glowscript/issues/url
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.