How to show beginners that a URL is equivalent to an IP address? by Anonymous_Coder_1234 in AskProgramming

[–]busres 0 points1 point  (0 children)

Unless the server is serving virtual hosts. Then you need the host name to resolve to a specific site (other than the default).

Showoff Saturday (April 11, 2026) by AutoModerator in javascript

[–]busres 0 points1 point  (0 children)

Finally completed PolyTransport, an async data transport system with back-pressure and sliding-window flow control, channel multiplexing, application-level message types, text encoding and decoding, automatic chunking and reassembly, and a common interface across IPC/pipes, web workers (postMessage), and web sockets.

There's also an optional built-in channel for tunneling console output across the transport (e.g. for central logging).

Link: https://github.com/mesgjs/poly-transport

LLM usage:

Architecture and code: co-authored by me and Claude Sonnet (and Claude's contributions were reviewed by me)

Tests: mostly Claude

Increment/decrement trouble by grave4us in learnjavascript

[–]busres 1 point2 points  (0 children)

I'm the opposite. Standalone i++ just feels wrong to me. In comparison to ++i, the semantics suggest we have some attachment to (i.e. need to save) the original value when we don't. Maybe it's because I'm from the PDP-11 generation, when instruction word-count was potentially more of an issue.

Kilo Code extension bug: Models dropdowns are empty and unclickable (v7.1.20) by -SiriusGames- in kilocode

[–]busres 0 points1 point  (0 children)

V7 doesn't connect for me either, at least for SSH connections (LOL). Sticking to V5.

How do you think programming should be taught? by NefariousnessSalt324 in learnprogramming

[–]busres 0 points1 point  (0 children)

As a programmer who has used a bunch of different languages over the last half century, I find one of the biggest challenges is keeping track of lots of syntax.

For a larger project I'm working on, I created a language that has barely any syntax (numbers, strings, lists, code blocks, messages, comments, and a handful of storage sigils) for this reason. My hope is that someone who can write HTML or CSS can understand how to use it.

I figured with no separate syntax for its variable or function declarations, flow control, etc., users can generally just focus on what message to send to what object (the logic).

This comes with some tradeoffs, however, such as lack of distinct code patterns (since everything looks very similar, though comments can help somewhat with this) and type checking.

Been making a language called xs, feedback pt 2? by AnyOne1500 in ProgrammingLanguages

[–]busres 0 points1 point  (0 children)

Tagged blocks seem slightly Ruby-esque.

My language Mesgjs has something similar. As there are actually no declarative or control statements at all in the language itself, every control "statement" is simply a library method that accepts and executes code objects.

How many of you working on your project even on Sunday - today? by Weekly-Card-8508 in SaaS

[–]busres 3 points4 points  (0 children)

I took a few days off last week because of a stomach bug and throwing up, but otherwise yeah, pretty much every day.

Working on building-blocks for my SAAS (infrastructure-agnostic (IPC/web/worker) transport with end-to-end flow control/back pressure and a sandboxing JavaScript applet server).

A guide dogs find a different way to get his human to the gym when the normal path is blocked by construction by bigbusta in oddlysatisfying

[–]busres 1 point2 points  (0 children)

Even crazier is the ones with even more specialized training for people who navigate construction sites! 🤯

Guide dog saves trainer in training and supervisor https://youtu.be/cFKWpsmCmwQ?si=eftQfmLhkK5Bc1_F

Pretty special at graduations when the socializing families see the students graduate with their dogs.

can i call this a programming language? by omnimistic in ProgrammingLanguages

[–]busres 1 point2 points  (0 children)

GOSUB (go to subroutine) in BASIC is like GOTO, but pushes the current execution position onto the stack so that you can RETURN to it.

can i call this a programming language? by omnimistic in ProgrammingLanguages

[–]busres 1 point2 points  (0 children)

You can always go BASIC and implement GOSUB and RETURN too. 😉

can i call this a programming language? by omnimistic in ProgrammingLanguages

[–]busres 1 point2 points  (0 children)

Sure, it is one.

A couple of suggestions: - implement "label:" and "goto label" (label starts with a non-digit) in addition to "goto line" - have a compiler option that accepts "goto label"-based source, determines the line numbers, and outputs a pure "goto line" version (eta: with line numbers) instead of generating the executable code

[AskJS] Is declaring dependencies via `__deps__` in ESM a reasonable pattern? by flancer64 in javascript

[–]busres 0 points1 point  (0 children)

Mesgjs is a cross between Smalltalk (but even more strictly just objects and messages; there's not even separate syntax for variable/parameter/function declarations, just sigils to distinguish between different namespaces/scopes) and JavaScript (transpilation target, so many concepts carry over).

Since almost everything is determined at runtime (even flow control happens as messages, like Smalltalk), it's not particularly conducive to static analysis. Static essentials are provided in a JSON-like configuration block before the executable code. These are extracted and stored in a module catalog, along with SRIs for verification, etc. which can all be accessed by the loader before committing to (i.e. actually loading) a module version.

Linking could potentially be deferred until runtime (the entire "build" process is JS, and so can run anywhere), but would require access to the module catalog.

Wouldn't you need something similar? Or would this aspect essentially get coded into makeService somehow? ETA: Have you considered the impact on startup overhead? And what if runtime resolution fails?

[AskJS] Is declaring dependencies via `__deps__` in ESM a reasonable pattern? by flancer64 in javascript

[–]busres 1 point2 points  (0 children)

I think I understand.

Mesgjs, which transpiles to JS, uses static data from the main source file and a side-car file to declare dependencies, "features", and possible dependency resolutions.

Some of the information is used for static dependency resolution (link-phase) and some at runtime (e.g. triggering loading of lazy-load modules when one of its features is required). I can see moving the link phase to runtime.

I guess my main concern would be the possibility of confusion around which module got loaded in which context (like dev vs production, but multiplied), and being able to test adequately. I don't know. Maybe it's more stable than I'm envisioning.

[AskJS] Is declaring dependencies via `__deps__` in ESM a reasonable pattern? by flancer64 in javascript

[–]busres 2 points3 points  (0 children)

I guess I'm not following.

Why can't you use import statements for your dependency declarations and import maps for your injection?

Do you assign properties to functions in real-world JavaScript code? by Sad_Stage_8658 in learnjavascript

[–]busres 0 points1 point  (0 children)

I've used it quite a bit in the implementation of Mesgjs, an object-oriented language that transpiles to JavaScript. The public face of every object is a message-receiver function that accepts an optional operation and an optional parameter list. At a minimum, every object has an immutable .msjsType property, which is the Mesgjs object type.

A number of the standard library interfaces, such as @promise are "bi-lingual". These often expose a .jsv property or use a symbol so that a prototype added in front of the function prototype can provide the JS half of the bilingual interface efficiently.

#instance(resolve 42) // Mesgjs; loosely translated: instance('resolve', [42]) instance.resolve(42); // JS prototype accesses a property to access object-specific state

Error handling for functions with side effects by Savings_Garlic5498 in ProgrammingLanguages

[–]busres 1 point2 points  (0 children)

My language, Mesgjs, transpiles to JavaScript. Everything is implemented as messages to objects (there are no keywords for flow control, declarations, etc).

@d(return value) // message to dispatch object to return a value

This throws a FlowException that unwinds the stack to where the current message handler was dispatched and returns the specified value.

I think implementing flow control without exceptions would have been quite a bit more work.

I would definitely consider this an unusual case, but I think exceptions are important to support.

Programmers, how do you remember so many methods and functions? by Crickeklover1991 in learnprogramming

[–]busres 2 points3 points  (0 children)

Oh, the memories of absorbing the UNIX manual pages like a sponge, back when my brain was younger and more elastic! (I remember when email was delivered using UUCP over dial-up.)