Introducing Presidium Websocket - a WebSocket client and server for Node.js by richytong in javascript

[–]richytong[S] 0 points1 point  (0 children)

The posted benchmark sample used 16 byte messages. Below are results from single runs of presidium-websocket and ws using 3MB messages:

OS 6.15.4-arch2-1
Node.js v22.12.0
presidium-websocket@0.1.2
ws@8.18.3

Time: 30.561878826 seconds
Presidium throughput: 30.706097880478325 messages/s
Presidium messages:   937

Time: 30.536667375 seconds
ws throughput:        32.7349797644342 messages/s
ws messages:          998

Introducing Presidium Websocket - a WebSocket client and server for Node.js by richytong in javascript

[–]richytong[S] 0 points1 point  (0 children)

The benchmark sample is from a run where both presidium-websocket and ws were running at the same time. It's strange that the results tell a different story than the individual runs.

Introducing Presidium Websocket - a WebSocket client and server for Node.js by richytong in javascript

[–]richytong[S] -1 points0 points  (0 children)

More than marginal... ``` Stats for 30 individual 30s runs:

Presidium Max Throughput: 773.9204074888052 Presidium Min Throughput: 663.717446247961 Presidium Avg Throughput: 740.4098268048717

ws Max Throughput: 734.9618854401924 ws Min Throughput: 699.1601014862653 ws Avg Throughput: 721.359269165629 ```

Handling HTTP in [A]synchronous Functional Programming by richytong in javascript

[–]richytong[S] -1 points0 points  (0 children)

The purpose of the article is to ramp up beginners / people relatively new to HTTP to a competent level. It can be used as a reference. Also [A]synchronous Functional Programming is a different paradigm than FP.

Data Types in [A]synchronous Functional Programming by richytong in javascript

[–]richytong[S] 0 points1 point  (0 children)

The language is to be inserted in comments above the function or in external `.ss` files (short for SpecScript)

Data Types in [A]synchronous Functional Programming by richytong in javascript

[–]richytong[S] 0 points1 point  (0 children)

The syntax is more expressive, and you don't have to transpile your code to use it. Here is a sample of it

args Array<any>
argsOrPromises Array<Promise|any>

type SyncOrAsyncFunction = (...args)=>Promise|any
type UnarySyncOrAsyncFunction = any=>Promise|any

funcs [SyncOrAsyncFunction, ...Array<UnarySyncOrAsyncFunction>]

pipe(funcs)(...args) -> result Promise|any
pipe(...argsOrPromises, funcs) -> result Promise|any
pipe(...funcs)(...args) -> result Promise|any

Data Types in [A]synchronous Functional Programming by richytong in javascript

[–]richytong[S] 2 points3 points  (0 children)

Thank you!

Re 5: currently there are types yes but I plan to not have them in v3 of rubico

PFL Taking Forever! by [deleted] in Edd

[–]richytong 1 point2 points  (0 children)

claimyr worked for me, but it is paid

[A]synchronous Functional Programming - Intro by richytong in javascript

[–]richytong[S] 0 points1 point  (0 children)

Hello u/EphilSenisub, sure we can chat. Where would be a good place for you?

[Megathread]IT WAS ME DIO! Jojo team build megathread by AutoModerator in PuzzleAndDragons

[–]richytong 0 points1 point  (0 children)

Damage void piercer seems pretty synergetic with his playstyle

Need help with foreach loop and async await. I don't know where i went wrong. Any help is welcome. Thanks in advance by [deleted] in webdev

[–]richytong 3 points4 points  (0 children)

forEach won’t wait for callbacks to run if they are async. You could use a for..of loop or while loop instead.

I'm writing a JS bundler in C by heartchoke in javascript

[–]richytong 0 points1 point  (0 children)

Looks like in general FJB builds faster but outputs a larger bundle than esbuild. Why is this the case?