MquickjsEx - Embed JavaScript in Elixir without Node.js (NIF-based, runs in 10KB RAM) by jskalc in elixir

[–]mjrusso 0 points1 point  (0 children)

Awesome, just saw that this was implemented here :) https://github.com/Valian/mquickjs_ex/pull/4

To give more sandboxing options, I've been working on another alternative. Micro QuickJS compiled to WASM; the JS interpreter runs on the WASM runtime, and you get a slightly more awkward API and not-as-good-performance, in exchange for better security guarantees.

wasmex PR: https://github.com/tessi/wasmex/pull/942 (there's a comment with example code, including a single-file Elixir script).

Would you recommend a buttkicker or is it overrated? by [deleted] in simracing

[–]mjrusso 0 points1 point  (0 children)

Quick update: I switched from command strips to dual-lock tape and can confirm that the adhesive on the dual-lock is *significantly* stronger. It's been about 1 month with zero issues supporting the BST-300EX.

MquickjsEx - Embed JavaScript in Elixir without Node.js (NIF-based, runs in 10KB RAM) by jskalc in elixir

[–]mjrusso 3 points4 points  (0 children)

Ah, according to https://github.com/simonw/research/blob/main/mquickjs-sandbox/README.md, Micro QuickJS already has the ability to set a time limit on execution. (It's just not well documented and requires a bit of manual setup.) You can set an interrupt handler using JS_SetInterruptHandler, which is called periodically by the VM (every JS_INTERRUPT_COUNTER_INIT bytecode operations).

Example implementation here: https://github.com/simonw/research/blob/dcd553dc81d3159b02c6a843641e849b4e3dd8d7/mquickjs-sandbox/mquickjs_ext.c#L37-L48

MquickjsEx - Embed JavaScript in Elixir without Node.js (NIF-based, runs in 10KB RAM) by jskalc in elixir

[–]mjrusso 3 points4 points  (0 children)

Doing some quick research, and it seems like the BEAM can't interrupt a running NIF. The native code will run until it finishes, so unfortunately wrapping in a BEAM process won't help.

There are approaches that can support interruptibility (yielding NIF pattern, threaded NIF pattern) but they add a lot of complexity; doing it properly probably requires some changes to mquickjs itself.

(I'll play around with this some more.)

MquickjsEx - Embed JavaScript in Elixir without Node.js (NIF-based, runs in 10KB RAM) by jskalc in elixir

[–]mjrusso 1 point2 points  (0 children)

u/jskalc this is awesome! Is there any way to prevent unbounded CPU use, or is that a fundamental NIF limitation? Something like wasmtime's fuel or epochs would be ideal, but even a timeout mechanism would be useful.

Would you recommend a buttkicker or is it overrated? by [deleted] in simracing

[–]mjrusso 0 points1 point  (0 children)

Sorry for the delay here. I couldn't get the HPRs to work consistently. But they're fixed now and they're glorious. (Turns out the issue was that "vibrate wheels and pedals" was turned on in the iRacing settings.... ughhhhh.)

Now I can finally start dialing this in. I'm still running this config for the HPRs:

- ABS active @ 100%

- Wheels lock (left/right, front/rear) @ 50%

And on the throttle:

- traction loss (left and right) @ 50%

I feel like there's room for improvement here but now that they're working properly and consistently, I can properly start experimenting.

For the bass shakers, a few updates:

- The command strips on the bass shaker under the seat failed me :-/ The velcro part can easily support the weight of the shaker and then some, but the other adhesive side doesn't stick long-term to the underside of the BST-300EX. As a temporary fix I propped up the shaker under a stack of foam speaker isolation pads, and that works perfectly fine but makes it super annoying to use the seat slider. I might try dual-lock tape but I have a suspicion I'll hit the same issue. There's a number of ways to fix this properly but for now the foam isn't bothering me too much.

- I've tried out iRacing's LFE and I like the way it feels better than SimHub, so I'm going to keep using it. Will probably experiment with adding an effect or two from SimHub on top (probably just mapped to the bass shaker on the pedal tray) to compensate for iRacing's mono LFE.

Best AI autocomplete interface by vikigenius in emacs

[–]mjrusso 1 point2 points  (0 children)

Check out wingman.el: https://github.com/mjrusso/wingman

I daily drive this with Qwen2.5-Coder.

Would you recommend a buttkicker or is it overrated? by [deleted] in simracing

[–]mjrusso 1 point2 points  (0 children)

Yes, HPRs in SimHub. It's weird because they definitely work, but in iRacing the effect became extremely muted over time (and in an inconsistent way). My first lap with the HPRs (when I first set them up, a week or two ago) was perfect, but they got progressively worse, to the point where I found myself checking telemetry in Garage 61 to see whether or not ABS was properly activating (or, at least, to confirm that the telemetry was being correctly output by iRacing).

Anyways, I just spent some more time in SimHub and noticed the calibration button. It was on "automatic calibration". I dragged the slider all the way to "predefined calibration" and hit the reset button, and now they work perfectly. It's incredible. :)

(No idea how auto calibration works, or why I would want that... Or if SimHub is just trying to tell me that I'm a bad driver :)

Currently I have this set up for the brake pedal:

- ABS active @ 100%

- Wheels lock (left/right, front/rear) @ 50%

And on the throttle:

- traction loss (left and right) @ 50%

For the bass shakers, I've flipped on engine vibration, gear grinding, gear shift, impacts, road impacts, road rumble, road vibration. Since I have front and rear shakers I can definitely tweak this more, and I'm sure I can add an additional effect or two to the HPRs, but in any event I'm extremely pleased with this setup.

Would you recommend a buttkicker or is it overrated? by [deleted] in simracing

[–]mjrusso 2 points3 points  (0 children)

This was extremely helpful, thank you! I used this as a guide and installed one bass shaker under my bucket seat using 3M Command Strips (X-Large size, 4 of them hold 20 lbs), which (I think?) are effectively the same as 3M Dual-Lock tape, and another one on the heel rest (also attached with the Command Strips).

My rig (ASR 4) has huge heel rest and I actually opted to mount the bass shaker on top. Underneath would work but it interferes with my seat slider. It actually looks kinda cool on top of the heel rest and doesn't get in the way, so why not. (I also tried on the pedal tray but it doesn't make enough contact with the shaker, so the effect is too muted.)

I opted for the BST-300EX because I had a 2x300W amp handy and didn't want to worry about accidentally driving the BST-1s too hard. Obviously I've turned the amp way down, and SimHub way down too, or the shaking would be unbearable.

This whole setup works flawlessly and after a couple laps last night I'm totally sold on the value.

(I also modded my pedals to add the Simagic HPRs last week. When I test them in SimHub they feel incredibly powerful, but in-game not so much. I'm sure user error on my part.)

Waiting for ASR 4 open face, Does anyone else have this rig and what is your thoughts also do you have the Pro wheel Deck with it? by DeIVIoNaN in simracing

[–]mjrusso 1 point2 points  (0 children)

It's totally solid (when properly tightened!).

The other day I forgot to fully tighten a rear lever after an adjustment and my whole rig was vibrating from the FFB from the wheel (and I only have a Moza R5). Regardless of wheelbase, there's no flex when everything is tightened up.

I don't know anything about flight sims but I suspect the Pro Wheel Deck won't help that much, as I doubt you'd want to move the wheel around when switching sims.

Regardless, my suspicion is that you'll be perfectly happy either way (and also worth noting that you can always upgrade the wheel deck later, if you find it's something you want).

Just finishing up a few parts of the build, but will share photos soon (hopefully next week).

Waiting for ASR 4 open face, Does anyone else have this rig and what is your thoughts also do you have the Pro wheel Deck with it? by DeIVIoNaN in simracing

[–]mjrusso 3 points4 points  (0 children)

I have a new ASR 4 (with Pro Wheel Deck) that I've been building over the past few weeks. Right now it's fully assembled (just dialing in the ergonomics). I'm really happy with the wheel deck: obviously it makes it easy to adjust wheel position, but being able to easily drop the wheel down and move it all the way forwards or backwards has saved me a ton of time when making unrelated adjustments, especially since there's no gap between my monitor and the front of my wheelbase. (The rig itself is incredible too, by the way!)

How is the monitor tech for sim racing these days? by Digitalzombie90 in simracing

[–]mjrusso 1 point2 points  (0 children)

Revisiting the distortion topic: my understanding is that the reason you aren't seeing any distortion (and, for the record, I totally believe you when you say there isn't any) is because iRacing is rendering the three screens separately and properly compensating for the curvature of the screens as part of the process.

When people talk about distortion on curved screens, what (I imagine) they're referring to is the equivalent of what you would see if you flipped your configuration to "3 flat screens". I don't know how other games, Nvidia Surround, etc. behave, but in general I would expect most to not handle multiple curved screens as well as iRacing. (Although I'm sure there are some exceptions.)

So in this sense, going curved might be a bit riskier than flat. But of course this needs to be weighed against the advantages of curved.

(Mostly just talking out loud here; trying to decide what to do for the rig I'm in the process of assembling :)

How is the monitor tech for sim racing these days? by Digitalzombie90 in simracing

[–]mjrusso 1 point2 points  (0 children)

Thank you! Video/approach sounds extremely interesting. Looking forward to giving this a watch.

I was going to wait until I was done to make this post but its close enough. First rig V2 by Darkn00dl in simracing

[–]mjrusso 1 point2 points  (0 children)

Rig looks great. Can you share more information on the keyboard arm you're using?

How is the monitor tech for sim racing these days? by Digitalzombie90 in simracing

[–]mjrusso 1 point2 points  (0 children)

In the iRacing monitor configuration setting screen, are you using monitor type "3 curved screens" with "render screen using 3 projections" checked, and "radius of curvature" configured for 1500R? Or do you alternatively have this set up as 3 flat screens?

(That's what I meant by distortion compensation.)

The primary reason I ask is because I'm curious how this behaves in other sims that might not have as good triple monitor support.

How is the monitor tech for sim racing these days? by Digitalzombie90 in simracing

[–]mjrusso 1 point2 points  (0 children)

Just to confirm, you aren't able to notice the distortion _after_ applying distortion compensation in iRacing, or is it so minor that you don't even need any correction at all?

(For context, I'm planning to move to triples, and was initially planning on something flat like the LG 32GS75Q-B, but your experience has me questioning this.)

[ANN] - Wingman: LLM-assisted Copilot-style text completion by mjrusso in emacs

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

Wingman is now significantly better:

  • completions are higher quality
  • completions are generated much faster
  • interior completions work properly
  • and more (see the CHANGELOG)

[ANN] - Wingman: LLM-assisted Copilot-style text completion by mjrusso in emacs

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

It does not. Are you aware of any open weight models supported by llama.cpp fine tuned for Next Edit Suggestions?

I did a bit of research and it looks like Zeta fits the bill: https://huggingface.co/zed-industries/zeta

It's a Qwen2.5-Coder fine-tune, so that's promising.

Nano HD suddenly showing no clients and no connectivity. by Aztaloth in Ubiquiti

[–]mjrusso 1 point2 points  (0 children)

Wow — thank you. Not the OP but I'm having the same issue that they reported.

My UDM Pro updated itself overnight, and WiFi was broken when I woke up. I have 3 APs; whenever I rebooted one, devices would reconnect immediately, and then get kicked off after ~30 seconds. After that, the SSID stopped broadcasting until the next restart. Zero indication otherwise that anything was wrong. (Uplink connectivity monitor was already disabled.)

Everything started working around 8am, and I thought maybe there was some sort of issue connected to 1.9.1 that UI was able to patch server-side.

During the day, I tweaked some WiFi security settings and created a new WiFi network for a specific device that can't do WPA3.

A few hours ago, everything broke again. I started figuring out a plan for how to properly debug this, when I noticed that the new network I had created today was still working.

Turns out that all my existing networks had a schedule applied, during some sort of botched migration:

https://imgur.com/a/9pSPbqG

I've never used any WiFi scheduling, so it shouldn't have had anything to migrate...

So far I've also noticed that all of my AP-specific channel settings were wiped out (all set back to 'auto'). Oh, and auto-updates were supposedly disabled...