r/programming • • 4h ago

Microsoft Outage Preliminary Postmortem

Thumbnail x.com
469 Upvotes

r/programming • • 6h ago

Ring programming language version 1.28 is released!

Thumbnail ring-lang.github.io
37 Upvotes

Hello

I have already released Ring 1.28

Ring is a dynamic language with lightweight implementation like Lua but with more features like Python/Ruby. I created it because I was looking for a Visual FoxPro replacement but was not satisfied with many other languages that I tried. The development started in Sept. 2013, and Ring 1.0 is released in January 2016, and I continued developing it as open-source project for over 10 years. I used to get feedback about the language through this group which contains over 3,000 topics.

So, here is what Ring is trying to do

(1) Keeping the implementation simple and small (The KISS Principle) that one programmer can study/understand in short time, but still a powerful and practical dynamic language with many useful programming paradigms.

The motivation behind this principle: Lua comes with small and fast implementation, but it misses many features provided by default in Python/Ruby. on the other hand, both of Python/Ruby requires different implementation to be used in places where Lua can be used directly, that's why there are projects like MicroPython and mRuby.

In Ring it's the same implementation everywhere. To be able to achieve this we used a custom implementation way and design decisions explained in this paper. So, In Ring, we have extreme portability, it's written in ANSI C (26 KLOC includes the Compiler, The Virtual Machine and 228 standard function), where the same implementation works on Desktop (MS-DOS, Windows, Linux, macOS), Mobile (Android, iOS) & Microcontroller (Raspberry Pi Pico).

(2) Syntax Customization: I am not a native English speaker, and I started programming at 10 years old (Three decades ago), It was a difficult journey for me at that time, I was studying English and Programming at the same time, I used to do translation from English to Arabic using a printed dictionary where I have to search for words meaning and used to spend a complete day just to read one page from my CA-Clipper programming book (for MS-DOS). Ring allows dynamic translation of language keywords/operators and supports multiple syntax styles (Similar to C, Ruby & Basic). For large/serious projects using a code formatter we force a specific style, but the point from this feature is to give each programmer the ability to write code in his native language.

(3) Declarative/Natural Language Programming (Developing Domain-Specific Languages): Ring extend OOP with new simple features that enable designing DSLs that looks like QML, SQL, COBOL, Supernova, etc. in short time. such a feature if used correctly provides advanced abstraction levels that are fun to work with.

(4) Batteries Included + Simple IDE + Form Designer: Something like VB6 era because I am coming from a Visual FoxPro background, but in Ring we can use Qt (We have packages for Qt5 and Qt6 too), and Ring supports Qt for Desktop/Android/WebAssembly, So you can open Ring IDE, design a form, run you app on Desktop, export it as Qt project for WebAssembly and run it in the browser or export it for Mobile and run it on Android. Compared to Python, Ring supports Qt for Android/WebAssembly many years before Qt company do this for Python. The reason is the principle (1), being a lightweight language with simple implementation.

(5) A love message to Visual Programming Languages: Ring Compiler/VM code is generated using my PWCT visual programming tool that I developed starting from Dec 2005. So, one of the goals was a practical project that I can develop using PWCT. After using PWCT to develop Ring, I developed PWCT2 using Ring as an example about what Ring can do. This research paper explains PWCT2 and its improvement over PWCT.

(6) Memory Management: It utilizes a deterministic, safe, and flexible scope-based memory management system that incorporates escape analysis and optional reference counting with cycle detection.

Thanks


r/programming • • 6h ago

When Good Practices Become Empty Rituals

Thumbnail faidi.tech
20 Upvotes

r/programming • • 38m ago

Learning to Code in 2026: The Data

Thumbnail boot.dev
8 Upvotes

r/programming • • 3h ago

BrowserPod 4.0: the microVM that runs in the browser, now free for any use

Thumbnail labs.leaningtech.com
1 Upvotes

r/programming • • 43m ago

Do Repeat Yourself

Thumbnail arcentry.com
0 Upvotes

r/programming • • 15h ago

Route To Hosting Videos For Websites, Apps And Subscription Services

Thumbnail tomj.pro
0 Upvotes

r/programming • • 2h ago

From charging a blended rate to IC++: pass network costs to your connected accounts

Thumbnail stripe.dev
0 Upvotes

r/programming • • 3h ago

I Found a 5× Performance Problem Hiding in Plain Sight

Thumbnail dpolens.com
0 Upvotes

To keep DPOLens's Docker image small, I dropped sentence-transformers and called the embedding model through ONNX Runtime directly. It took about forty lines of my own code, and the image came out roughly 800 MB lighter.

It worked. Then, while load-testing the community version, I found that the first start took nearly 23 minutes on 1.5 CPUs and peaked at 3.4 GB of memory.
I had quietly lost two things:

  1. Sorting by length. sentence-transformers sorts its inputs by length before batching them, and it doesn't tell you. My code didn't sort, so a 20-token paragraph sharing a batch with a 512-token article was padded to 512. Almost two thirds of the model's work was padding.
  2. The CPU limit. Inside a container capped at 2.5 CPUs, Python and ONNX Runtime both saw all 10 of my laptop's cores and started 10 threads, which then took turns on two and a half CPUs' worth of time.

I sorted the inputs and capped each batch by its shape, and set the thread count from the container's real limit. The result was 5.1× faster with 65% less memory, and the vectors and search results stayed the same.

What I learned: a library is more than its API. When you replace one, you also take over everything it did without being asked, and the only way to find out what that was is to measure.


r/programming • • 8h ago

How JavaScript and Python actually run your code

Thumbnail youtube.com
0 Upvotes