Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk3 min

I Wrote a Programming Language Where You Code in Polish: 7 Things It Taught Me About Ruby

AlexScript is a Polish-keyword interpreter written in Ruby. Its author reports seven lessons about Ruby internals, from throw/catch and UTF-8 scanning to fibers and arbitrary-precision integers.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

AlexScript is an interpreted, object-oriented scripting language with Polish keywords, implemented in Ruby. Its author, Konstanty Koszewski, says building it taught him more about Ruby’s internals than years of Rails work did. He reports seven specific lessons from the project. Each one is an implementation experience, not a benchmark, so the sections below separate what he observed from what can be generalized.

What AlexScript is

Koszewski describes AlexScript as a weekend toy interpreter that grew over roughly eighteen months into a fuller language. The project’s GitHub README (repository N3BCKN/alexscript) lists modules, a REPL, cooperative async/await, a standard library, and a debugger. The author also says a web framework is written in the language itself.

The README states that the project requires Ruby 4.0.3 or later. Project requirements change, so confirm the current minimum in the repository before installing.

How the Polish keywords work

Keywords are written in Polish, and the language accepts both ASCII and accented spellings. The README treats the ASCII form as canonical in its documentation and examples. The table below lists the keywords the author cites.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Keyword (ASCII form) Meaning Accented form
klasa class not stated (the word has no diacritics)
funkcja function not stated (the word has no diacritics)
niech let not stated (the word has no diacritics)
zwroc return zwróć, the correct Polish spelling per the author

The accented spelling of return is the reason the feature exists. Typing ó and ć repeatedly can be awkward on some keyboard layouts, so the ASCII form lets people write code without switching layouts. Both forms are accepted by the interpreter, as the README documents.

Seven lessons from building it

1. Use exceptions for errors, and throw/catch for controlled non-local returns

Koszewski first implemented a language-level return by raising and rescuing an exception. He later switched to Ruby’s throw and catch. He attributes the speed difference to the cost of constructing exceptions and capturing backtraces, which matters most in deeply recursive code. He gives no benchmark figure. The lesson is narrow: throw/catch suits a known, deliberate exit from nested code, not a general replacement for raise.

2. Avoid repeated character indexing on UTF-8 strings

The lexer used indexed string access, and on text containing Polish diacritics it became, in his words, accidentally quadratic. Switching to getbyte and byteslice resolved the slowdown. This is an account of one lexer, not a general measurement of Ruby string performance.

3. One method table for native and user-defined methods

AlexScript stores native methods and user-defined methods in a single table, with native entries marked for dispatch. Koszewski says this made inheritance, super, reflection, and debugger behavior easier to implement. He also says MRI uses a similar shared approach for C and Ruby methods; that comparison is his, and it was not independently checked here.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

4. Fibers can underpin cooperative concurrency

His async/await is built on fibers. The surrounding machinery is his own work: a reactor with a ready queue, timers, IO.select, and an integration with Ruby’s fiber scheduler interface. Fibers supply the suspension mechanism, but they do not on their own provide a complete async runtime.

5. Weak references were unreliable for closure environments

Using WeakRef in this implementation produced intermittent invalid-reference failures, so he replaced the weak references with strong ones. This describes one design in one interpreter. It does not show that WeakRef is unsuitable in general.

6. Mapping language exceptions onto Ruby exception classes

AlexScript exceptions map onto Ruby exception classes. Koszewski reports that this gives the language real stack unwinding, backtraces, and ensure-style cleanup without reimplementing them. The benefit is the project’s own assessment of its architecture.

7. Arbitrary-precision integers for exact arithmetic

He uses pairs of Ruby integers to represent exact rational numbers and computes Bernoulli numbers, including B(60), without overflow or loss of precision. Ruby’s arbitrary-precision integers make this straightforward. The result is his example; it was not independently verified here.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

The fiber-scheduler disconnect problem

The most significant limitation Koszewski reports concerns the web framework. When a client disconnected during a blocked socket read, IO#close could not interrupt the fiber scheduler. As a result, the project runs one thread per connection. He describes this as an open Ruby bug. The search behind this article did not establish whether it still affects current Ruby releases, so check the status against the Ruby bug tracker and your target Ruby version before designing a server around fibers.

Sources

  • Konstanty Koszewski, “I wrote a programming language where you code in Polish. Here are 7 things it taught me about Ruby.”, DEV Community, September 16, 2026. This is the primary first-person account of the lessons and the limitation above.
  • N3BCKN/alexscript, GitHub project README, for the feature list, keyword conventions, and the Ruby 4.0.3 requirement.

The author writes Ruby for a living, and his own framing of the project is that it started as a question about what happens between typing x = 5 and the machine acting on it.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.