8 votes

What programming/technical projects have you been working on?

This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

3 comments

  1. spctrvl
    Link
    I built a LiFePO4 battery pack for my bike from some 6AH 32700 cells I got off eBay, wanted to build a battery for a while, I like the chemistry and it was pretty cheap. I got a 24 pack for $99,...

    I built a LiFePO4 battery pack for my bike from some 6AH 32700 cells I got off eBay, wanted to build a battery for a while, I like the chemistry and it was pretty cheap. I got a 24 pack for $99, so I was a little skeptical, but they seem legit, I've been riding the pack 8 miles a day since Monday and only just got down to nominal voltage (3.2v per cell which LiFePO4 stays at for most of its discharge cycle), so if anything they sandbagged the capacity a little.

    Selling in units of 24 cells is perfect for a 36v battery since you can go 12s2p, so I went with that configuration plus an overkill 60A BMS. Slotted them into these little 2 pack holders that snapped together into a 4x6 grid, spot welded them together with nickel strips, wired the bms and shrunk wrapped the whole thing, process was pretty smooth. I got one of those $40 LiPo powered pocket spot welders that's proliferated in the last few years and it was super easy to use.

    With the strip widths and thicknesses I should be able to push 30A pretty easily, way more than my bike's 10A maximum, so I was thinking of getting an inverter to hook it up to so it can do double duty as a UPS and solar power system component, reluctant as I am to invest in more weird 36V equipment than I already have.

    5 votes
  2. DaveJarvis
    (edited )
    Link
    Crafted a lightweight natural language parser to convert straight quotes into curly quotes. Check it out: https://whitemagicsoftware.com/keenquotes/ The implementation performs a multi-stage...

    Crafted a lightweight natural language parser to convert straight quotes into curly quotes. Check it out:

    https://whitemagicsoftware.com/keenquotes/

    The implementation performs a multi-stage traversal through prose to tokenize lexemes (words, numbers, spaces, etc.), emit quotation marks, build an abstract syntax tree, and resolve as many remaining ambiguous single straight quotes as possible. Handles American and British English. The API supports XML/XHTML, in addition to plain text, but that feature isn't exposed via the web site. If you find any incorrectly curled results, let me know.

    I've integrated the API into KeenWrite, my Markdown text editor. Quotation marks can be curled prior to typesetting into a PDF file:

    https://i.ibb.co/dGrQ8d3/curl.png

    Most other algorithms use regular expressions, which can't curl quotes in real-world prose such as Helen's Babies. By using a nested abstract syntax tree, my implementation can disambiguate between straight single quotes and straight apostrophes, much of the time. The tree tracks alternating double and single quotes as well as quotation marks that span multiple paragraphs.

    As a side-note, an upshot to creating the software lead to logging an issue against the wordlists file that ships with most Linux distros with suggestions for hundreds of words missing -ing endings. Many of these -ing words were formed into contractions so that KeenQuotes can distinguish between trailing apostrophes and closing single quotes.

    4 votes
  3. talklittle
    Link
    Been finding more areas to use Rust lately. It's great fun finding code to replace with Rust, as it's so efficient it can be stuck anywhere, and without the inevitability of memory bugs/exploits...

    Been finding more areas to shoehorn use Rust lately. It's great fun finding code to replace with Rust, as it's so efficient it can be stuck anywhere, and without the inevitability of memory bugs/exploits with similar C/C++ programs.

    Can be a good fit for desktop, servers, mobile apps, and web (WebAssembly). No GC/runtime is awesome as it means programs can also start up very fast and use little memory; great for serverless applications like AWS Lambda where you're charged by the millisecond and MB of memory allocation.

    On Android in particular, I came across some useful posts about how to cross-compile and then call code from Kotlin/Java:

    Using a tool like cargo-ndk makes the cross-compile painless. A downside so far is that even a minimal Rust library adds a few MB to your app's binary size.

    Now just hoping I can finish a "real" project interesting enough to show off. Have a couple ideas that might stick, but don't want to talk about them yet, as I'm one of those people whose motivation kind of nosedives when hyping stuff too soon.

    4 votes