René's URL Explorer Experiment


Title: Brand new RowScript · Issue #195 · rowscript/rowscript · GitHub

Open Graph Title: Brand new RowScript · Issue #195 · rowscript/rowscript

X Title: Brand new RowScript · Issue #195 · rowscript/rowscript

Description: I feel an urge to rewrite RowScript. If you stumble upon this issue, it should crack you up: Yes, there's still a great amount of flaws in current design (up to version v1.0.0-alpha.5). But now I'm feeling like a guru on making languages...

Open Graph Description: I feel an urge to rewrite RowScript. If you stumble upon this issue, it should crack you up: Yes, there's still a great amount of flaws in current design (up to version v1.0.0-alpha.5). But now I'm...

X Description: I feel an urge to rewrite RowScript. If you stumble upon this issue, it should crack you up: Yes, there's still a great amount of flaws in current design (up to version v1.0.0-alpha.5). But now...

Opengraph URL: https://github.com/rowscript/rowscript/issues/195

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Brand new RowScript","articleBody":"I feel an urge to rewrite RowScript. If you stumble upon this issue, it should crack you up: Yes, there's still a great amount of flaws in current design (up to version `v1.0.0-alpha.5`). But now I'm feeling like a guru on making languages, let me refine it, please be patient.\n\n## Motivation: Scripting over Native\n\nSoftware industries are now only workable upon *dynamic/scripting languages*, e.g., JavaScript, Python, Lua, Ruby, Julia, Matlab... In terms of systems languages, like C/C++, Java, Rust, Go and Zig, they mostly serve as the engines or components of some bigger realms.\n\n1. **Dynamic/scripting languages are usually the first option for early problems.**\n\nFor domains like UI, graphics, AI, microservices, games and scientific computing, we keep seeing people use them for fast-prototyping and flexible developer experience.\n\nNonetheless, further problems like performance tuning and hardware adoption would convince people to use *systems languages*. But we should notice that it's hard and even unnecessary to replace the existing components written in dynamic/scripting languages. Every language serves their own scopes, but sometimes multi-language project management can be hard.\n\n(NB: Problems like writing language VMs, compilers and IDEs are not taken into account here, since designing such language is a different topic.)\n\n2. **Native support for dynamic/scripting languages should be a first-class citizen.**\n\nIt should not just be an AOT compiler for the program bytecodes. It should emit machine code directly. Run as an executable.\n\nTo sum up, RowScript emits JavaScript for scripting by default, and should be able to emit machine code for native support.\n\n## Native Support\n\nI would try [Cranelift] for backend and [MMTk] for making a GC. I have no further comments on this topic for now, it just requires a whole bunch of groundwork.\n\nYou should be asking about concurrent programming. Yes, it can be just using `libuv`, it can be stackless coroutines, it can be something else. I would talk about it some day.\n\n[Cranelift]: https://cranelift.dev/\n\n[MMTk]: https://www.mmtk.io/\n\n## Split the `number` Type\n\nFor native support, `number` type is far from usable anymore. We split it into:\n\n* Integers: `u8`, `u16`, `u32`, `u64`, `u128`, `i8`, `i16`, `i32`, `i64`, `i128`.\n* Floating-point numbers: `f16`, `f32`, `f64`.\n\n## Consistent Syntax over Reusing Keywords\n\nWhen I implemented the capabilities (#156) feature, I reused the `throws`, `try` and `catch` keywords for so-called *familiarity*, but apparently I failed to deliver the intention of the syntax. Users came up to me for complaints.\n\nThis time, forget about the \"familiarity\", we should use consistent and similar syntax.\n\n## Dependent Types\n\n1. **Impose dependent types in the surface syntax by default.**\n\nUnleash the full power of dependent types! Because scripting is so natural with it. We banned it in the current version for that \"people might not understand what they're doing\". But this time I feel confident about this feature.\n\n2. **`comptime` function.**\n\nFunction marked with `comptime` can be run everywhere in compile-time.\n\n3. **No internal dependent-type encodings.**\n\nI used so many encodings (e.g., Sigma types for function arguments) in the current codebase, it screwed up everything, from concrete syntax to even code generation. We should never use it again.\n\n## Arbitrary Control-flow Constructs\n\n1. **Feel free to use any control flow.**\n\nEveryone just can't live without it.\n\n2. **Use statements in AST.**\n\nIn the current design, I used CPS-style AST for convenience, this was proven to be disappointing (e.g. I banned control-flow constructs in closures, that's stupid).\n\n3. **`comptime` function could also have control-flow constructs.**\n\nSince we need native support, we have to translate the control-flow code into graph-based IRs for typechecking and code generation, so it's easy to write an abstract interpreter/partial evaluator to run any functions in compile-time.\n\n## Nominal over Structural Typing\n\n1. **`struct` type.**\n\nWe will still have our record-concatenation row polymorphism in the feature set, but it only comes up to solve subtyping problems for existing JavaScript constructs. `struct` is recommended in new application code.\n\nA similar situation can be found in Python where `@dataclass` and `TypedDict` are both supported but the former is more widely used.\n\n2. **Find the boundaries.**\n\nThe first problem that comes to my mind is whether `Option\u003cT>` should be nominal or structural. We need to find the boundaries, and even the balance. Let's make such decisions in the future.\n\n## And More...\n\n1. **`enum` type and flexible pattern matching.**\n\nPattern unification, I have to challenge this feature for the ultimate user experience.\n\n2. **Tuple type.**\n\nIt's proven to be highly useful, just don't miss this.\n\n## \"Isn't It Just Another [Dart]?\"\n\nRowScript **WILL NOT HAVE**:\n\n* Bytecode\n* JIT bytecode-to-machine compilation\n* AOT bytecode-to-machine compilation\n\nThat says:\n\n1. **No [isolates] are needed for *concurrency*.**\n    - We might have something like this to solve other problems, for instance we could write many [Cgo]-based libraries and linked them into one single C executable to have many Go runtimes simultaneously. Some weird problems might arise, but we shouldn't isolate the runtime for concurrency if we only have one.\n3. **No subtyping-style [dynamic typechecking].**\n    - We should have other approaches to object systems. But classic OOP/subtyping sounds quite overcomplicated for me.\n    - We might also have inheritance, but it can be simple *has-a* inheritance for convenience. No complex subtyping cluttering.\n\nIt should just look like a compiled and managed language. No more magic inside.\n\n[Dart]: https://dart.dev/\n\n[isolates]: https://dart.dev/language/concurrency\n\n[Cgo]: https://pkg.go.dev/cmd/cgo\n\n[dynamic typechecking]: https://dart.dev/overview#runtime\n\n## New Slogan\n\n**A better JavaScript that types and compiles.**","author":{"url":"https://github.com/anqur","@type":"Person","name":"anqur"},"datePublished":"2025-05-10T06:15:05Z","url":"https://github.com/rowscript/rowscript/issues/195"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:486f9f1f-e0d3-fc18-9708-400c1b5913a0
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id899A:2FFF08:40F14BF:558D76D:6AFA3B2D
html-safe-nonce0ff2312fa28f44e084673bc8679530904c32328efccb50d2cebee2fbb2674be4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTlBOjJGRkYwODo0MEYxNEJGOjU1OEQ3NkQ6NkFGQTNCMkQiLCJ2aXNpdG9yX2lkIjoiNDM3NDUwNzg2MzAyODY3NzQyMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace13f3a0ca382d9a5dff0811f8d10c37f2f43ac89d7cceaec6cdc38e5752ab30b
hovercard-subject-tagissue:3053759683
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/rowscript/rowscript/195/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3b264c3cf3142d3aa8998452d21183f2150dd8072857b5955b44d84993f5ca1b/rowscript/rowscript/issues/195
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3b264c3cf3142d3aa8998452d21183f2150dd8072857b5955b44d84993f5ca1b/rowscript/rowscript/issues/195
og:image:altI feel an urge to rewrite RowScript. If you stumble upon this issue, it should crack you up: Yes, there's still a great amount of flaws in current design (up to version v1.0.0-alpha.5). But now I'm...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameanqur
hostnamegithub.com
expected-hostnamegithub.com
None612d3e6ffd693e7ea8d9fcf452370995872baef31d825b1fedef704cd3d24ac7
turbo-cache-controlno-preview
go-importgithub.com/rowscript/rowscript git https://github.com/rowscript/rowscript.git
octolytics-dimension-user_id87884599
octolytics-dimension-user_loginrowscript
octolytics-dimension-repository_id388972006
octolytics-dimension-repository_nworowscript/rowscript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id388972006
octolytics-dimension-repository_network_root_nworowscript/rowscript
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
release072e34035c13c31543fba9f025cbbbda4210dae4
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/rowscript/rowscript/issues/195#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Frowscript%2Frowscript%2Fissues%2F195
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Frowscript%2Frowscript%2Fissues%2F195
Sign uphttps://github.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=rowscript%2Frowscript
Reloadhttps://github.com/rowscript/rowscript/issues/195
Reloadhttps://github.com/rowscript/rowscript/issues/195
Reloadhttps://github.com/rowscript/rowscript/issues/195
rowscripthttps://github.com/rowscript
rowscripthttps://github.com/rowscript/rowscript
Codehttps://github.com/rowscript/rowscript
Issues19 (19)https://github.com/rowscript/rowscript/issues
Pull requestshttps://github.com/rowscript/rowscript/pulls
Discussionshttps://github.com/rowscript/rowscript/discussions
Actionshttps://github.com/rowscript/rowscript/actions
Projectshttps://github.com/rowscript/rowscript/projects
Security and qualityhttps://github.com/rowscript/rowscript/security
Insightshttps://github.com/rowscript/rowscript/pulse
https://github.com/rowscript/rowscript
New issuehttps://github.com/login?return_to=https://github.com/rowscript/rowscript/issues/195
New issuehttps://github.com/login?return_to=https://github.com/rowscript/rowscript/issues/195
Taskhttps://github.com/rowscript/rowscript/issues?q=type:"Task"
Brand new RowScripthttps://github.com/rowscript/rowscript/issues/195#top
https://github.com/anqur
enhancementNew feature or requesthttps://github.com/rowscript/rowscript/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/anqur
anqurhttps://github.com/anqur
on May 10, 2025https://github.com/rowscript/rowscript/issues/195#issue-3053759683
Cranelifthttps://cranelift.dev/
MMTkhttps://www.mmtk.io/
#156https://github.com/rowscript/rowscript/issues/156
Darthttps://dart.dev/
isolateshttps://dart.dev/language/concurrency
Cgohttps://pkg.go.dev/cmd/cgo
dynamic typecheckinghttps://dart.dev/overview#runtime
anqurhttps://github.com/anqur
on May 10, 2025https://github.com/rowscript/rowscript/issues/195#event-17600446637
anqurhttps://github.com/anqur
enhancementNew feature or requesthttps://github.com/rowscript/rowscript/issues?q=state%3Aopen%20label%3A%22enhancement%22
on May 10, 2025https://github.com/rowscript/rowscript/issues/195#event-17600446656
anqurhttps://github.com/anqur
Taskhttps://github.com/rowscript/rowscript/issues?q=type:"Task"
on May 10, 2025https://github.com/rowscript/rowscript/issues/195#event-17600446687
Sign up for freehttps://github.com/signup?return_to=https://github.com/rowscript/rowscript/issues/195
Sign in to commenthttps://github.com/login?return_to=https://github.com/rowscript/rowscript/issues/195
anqurhttps://github.com/anqur
enhancementNew feature or requesthttps://github.com/rowscript/rowscript/issues?q=state%3Aopen%20label%3A%22enhancement%22
Taskhttps://github.com/rowscript/rowscript/issues?q=type:"Task"
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.