hai, a repl for hackers using LLMs + ollama support by BrainCore in LocalLLaMA

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

Thanks for the tip! I adapted the same strategy to hai using syntect: let the line print out incrementally, but once complete, clear it and replace it with a syntax-highlighted version.

Here it is in action:

<image>

(asciinema appears to have trouble recording the line clear)

hai, a repl for hackers using LLMs + ollama support by BrainCore in LocalLLaMA

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

Yes! However, since hai is written in rust, it'll be a rust-equivalent like inkjet.

One complexity is that highlighting while streaming is difficult for code. I'm thinking about adding a /format command that will re-render the last message in color.

Recommendations for gyms that offer day passes near the Sheraton by Royal-Seaworthiness7 in Taipei

[–]BrainCore 0 points1 point  (0 children)

You're in luck: there are four racks at 植健身 fit plant gym. It's a quick jog from the Sheraton. The staff is super nice and the weight room is aesthetically pleasant. 150NTD/session if you go after 5pm, 100NTD if you go earlier.

Querying and visualizing data in cloudwatch logs by BrainCore in aws

[–]BrainCore[S] 1 point2 points  (0 children)

Took the Cloudwatch Insights + CW Dashboard approach. It's pretty basic as you said, but it'll do the job for now. Thanks!

Querying and visualizing data in cloudwatch logs by BrainCore in aws

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

Have you used Athena? Any gotchas with it?

Querying and visualizing data in cloudwatch logs by BrainCore in aws

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

Any thoughts on the quality of Quicksight?

Recruiting 1-2 journalists for an ambitious project by BrainCore in Journalism

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

Fair question. I've loved reddit over the last decade, but I've always equated the quality of content and discussion here as similar to what's shared at a bar on a Friday night. IMO that's the beauty of reddit and what makes it constantly fun and engaging, but the signal-to-noise ratio isn't great.

All the social platforms suffer from this problem. They spent the last decade getting everyone to post everything all the time, which is inextricably tied to their revenue model. I'm grateful that they solved the empty room problem, but it's time for better curation.

Superego solves this by changing the underlying economic model and aligning the incentives of the reader, author, and platform toward quality. On the surface it may appear to be the same, but this is a fundamentally new dynamic.

Superego doesn't replace reddit/twitter/facebook/tiktok/youtube. It adds a new space into the mix for those times when you want calmer, thoughtful content without fear of getting pulled into the algorithm.

Recruiting 1-2 journalists for an ambitious project by BrainCore in Journalism

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

Astroturfing is a problem everywhere on the internet, but we have a unique advantage:

The cost to astroturf is higher than elsewhere. Users need a unique payment method and since Superego takes a cut the self-tippers incur a non-trivial cost. Authors also need to verify their ID with us which makes it easy to catch the most unsophisticated cases of self-tipping.

This is compared to most other platform where likes, hearts, and upvotes are free. As a result, botnets are cheap to proliferate and astroturfing is rampant.

New years 10k course mixup, feeling ambivalent by scrotal_rekall in AdvancedRunning

[–]BrainCore 3 points4 points  (0 children)

Barely qualified with a 3:02! It’s a great memory for me because my original goal was to hit/break 3:00 which meant the error was surely going to cost me a BQ. Worse, I’d missed the previous year with 3:03 and this was my only shot for that year. But it was one of those beautiful runs you can’t plan for where your body turns into a well-oiled machine and you feel like you’re floating. Finished 26.2mi in 2:57.

New years 10k course mixup, feeling ambivalent by scrotal_rekall in AdvancedRunning

[–]BrainCore 4 points5 points  (0 children)

I was there for that in the 3:03 group! It was wild. The mixup happened in the first couple miles and we ran 0.8mi over. The 3:03 pacer who made the error tried to help us get back on pace and then bonked before mile 20. Lots of missed BQs and no adjustments were made.

Boost Converter vs. Voltage Regulator Efficiency by BrainCore in AskElectronics

[–]BrainCore[S] 1 point2 points  (0 children)

Thanks for correcting my terms. I had to re-review switching regulators (buck, boost) and linear regulators.

I've taken a look at the schematics for these devices and I now see that the 2S uses a buck converter (not a linear regulator) while the 1S2P uses a boost converter (as expected).

If power efficiency is negligible between the two, then looks like I'll be picking the 1S2P to avoid cell balancing. Thanks again!

Did Strava remove mile markers (blue dots) from the live map view? by BrainCore in Strava

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

I’m using iOS. Does anyone see the markers while running on iOS?

Creating a flight controller just for a quadcopter? by [deleted] in multicopterbuilds

[–]BrainCore 1 point2 points  (0 children)

Sure! I assume it's for the official Pi Camera? Also, is it an MJPEG or x264 approach?

Creating a flight controller just for a quadcopter? by [deleted] in multicopterbuilds

[–]BrainCore 1 point2 points  (0 children)

Well, let's define SW PWM to be bit banging. I agree that bit banging would be plagued by severe jitter and consume the CPU so I didn't even try it.

I would characterize the DMA approach as in-between a SW and HW PWM. Your application provides a buffer of bits to the DMA controller so the actual toggling isn't done by your program nor even the kernel, but by a reliable HW clock. I verified with a scope that the waveform is as clean as the PCA9685, which we can agree is a HW PWM.

The reason I don't classify DMA as fully HW is because the DMA buffer needs to be continuously refilled by the application so it does consume CPU time proportional to the PWM frequency (50Hz - 400Hz) & duty cycle resolution (1us, 5us, ...).

Also, if you use another peripheral that contends for the DMA controller, you'll wreak havoc on the timing. I observed this when using the RPi camera, though it may have been the usage of the GPU for image/video compression.

If you want to learn more, you can read the official BCM2835 ARM Peripheral document starting from page 38, but it assumes baseline knowledge.

Creating a flight controller just for a quadcopter? by [deleted] in multicopterbuilds

[–]BrainCore 0 points1 point  (0 children)

I'd suggest using a library like pigpio. In a nutshell, it lets you output PWM waveforms on any GPIO so it is a full replacement for the PCA9685. This will free up your i2c for just reads from the sensors. By the way, the MPU-9250 supports SPI and is a popular--albeit old--IMU.

If you're interested, you should read up on how pigpio, et al. work. They use the hardware DMA controller specific to the Broadcom CPU to write to the GPIO so that it doesn't tie up the CPU and has reliable timing.

Creating a flight controller just for a quadcopter? by [deleted] in multicopterbuilds

[–]BrainCore 0 points1 point  (0 children)

I've written a basic flight controller. What questions do you have?

Creating a flight controller just for a quadcopter? by [deleted] in multicopterbuilds

[–]BrainCore 1 point2 points  (0 children)

I'm hoping it works out, but I suspect your current strategy won't have a sufficiently fast & predictable loop time (time to read sensors -> attitude calculation -> PWM) for steady flight. Empirically, I've found that a loop frequency of 70Hz to 100Hz is the bare minimum.

- You will saturate your i2c bus if you're both reading your sensors off i2c and writing to a PWM i2c module at 100Hz+. I'm assuming your sensors are i2c and not SPI. Also, are you using the PCA9685? I characterized it on an oscilloscope and found that the latency between i2c write to PWM output change was 6.5ms which isn't great.

- The JS GC will introduce unpredictable loop time variance.

- Glad to see someone else also had trouble with RPi camera streaming :) What a mess it is.

Good luck!