RE: https://mstdn.social/@michaelmagras/117600327414725650
YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAS!
this, hands down, is the most important election not just this year, but of the century. well done #ScottColom 🥳 🥳 🥳
Discussion
RE: https://mstdn.social/@michaelmagras/117600327414725650
YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAS!
this, hands down, is the most important election not just this year, but of the century. well done #ScottColom 🥳 🥳 🥳
Papyrix vendors "md_parser" to actually parse Markdown files, though it might be better to call it a lexer. Though at the same time Papyrix's "parsers" perform a fair bit of layout logic.
Reportedly md_parser was specifically designed for ESP32 microcontrollers like what Papyrix runs on, yet Papyrix adds logic around it to cut down on RAM use.
For datastructures md_parser defines an enum of different tokens. Furthermore it has a struct adding sized-text & possibly an int to these tokens.
1/?
A son of a bitch
... possibly & carefully checks for triple-"-"/"*"/"_" on line to emit as an HR token, possibly checks for preceding ">" to possibly emit as a blockquote-start token setting, checks for non-blank lines without that prefix while that flag's set to emit as a blockquote-end token, possibly checks for a "-"/"+"/"*" char followed by a space to emit as a listitem-start, possibly checks for & parses digits (capped to 255) followed by ". " to also emit as a listitem-start.
4/?
Other datastructures define a callback type, as well as a struct turning it into a closure & adding some bitflags indicating enabled features. Macros define these different bitflags.
A 3rd macro references this "config" alongside bytes for the current state & substate, header level, list number, & various flags. Furthermore it stores a max-4-char lookahead buffer, & a current slice of text.
An internal enum defines these states.
A helper assembles a token & passes it to the callback.
2/?
@ewen @colindean Heh. I have memories of "riding the clutch" on San Francisco hills when I first moved to America and still drove a manual car.
@nomdeb @ewen @colindean
The best invention in the world, for this San Franciscan at least, is Hill-Hold Control for automatic transmissions. It prevents roll-back when you stop at a stop sign on a hill. I have it now in my 2024 Mazda but man, I wish I had it on my other cars years ago.
A wrapper around that token emits one for the current slice of text if any.
Other helpers checks a feature-bitflag, counts repeated chars, skips whitespace, detects blank lines, & locates a given char in the line.
At the start of any line it skips any spaces, possible checks for triple-"`", checks if its inside a codeblock & if so echoes lines of text verbatim, possibly checks for "#" & if so counts them to carefully emit as a token, ...
3/?
Posted in
Fediverse
size is not what made reddit bad. commercialization is.
cross-posted from: feddit.org/post/37870004
reddit got bad because spez (the reddit admin) restricted API access to the platform for third-party apps, such that people would be forced to use the official app or web UI, both of which display advertisement and collect user data (e.g. scroll behavior).
the reason why this happened is because reddit is a for-profit company and tries to extract money out of the userbase, at the expense of the users.
another example of a bad decision that reddit made was to push a lot of ragebait (“Am I The Asshole?”) because company shareholders want to see “engagement numbers” go up, and if somebody writes an angry reply to a post, that’s “engagement”. but it makes you angry at the stupidity of the “Asshole”, so it makes your day worse. that is another example how reddit makes money at the expense of the users.
size (number of monthly active users) is not what made reddit bad. commercialization is.
we should probably get rid of the “don’t make lemmy grow, it will ruin the platform if we grow” idea.
Upon those triple-"`"s it flushes any existing spans & checks if it has a flag set. If so it emits a codeblock-end token & skips the line clearing the flag. If not it reads the rest of the line trimming any whitespace, emits a codeblock-start, & sets that flag.
As for inline text it checks for 2-char escape sequences to translate into text tokens, possibly for "`"s in which case it emits all text until the next one as a code-inline token, ...
5/6?
... possibly checks for double-"*"/"_"s to emit as a bold-start/end depending on a flag, possibly does equivalent for double-"-", ditto for single "*"/"_", possibly checks for "![" in which case it scans ahead to the next "]" checking & if followed by "(" scans ahead to ")" emitting results as multiple tokens (image-alt-start, text, image-alt-end, & image-url), does similar for unadorned "[", upon newline emits any queued text & a newline-token before ending any headings clearing flags, ...
6/7
Aquarium experts of the fediverse we need your help. We have a 60L tank with plants & rocks, only a month old, fully cycled. Got 8 minnows 2 wks ago, all very active and happy. Got home today to find two dead, one sick and one MIA. The others look ok to me. They all seemed absolulely fine at lunchtime.
A few shrimp have quietly died over the last few days and I've been wondering why. The snails all seem completely fine. There's a spray bar and a bubbler, so there should be plenty of oxygen. We've not been sure how much to feed them, and although they feed at the surface they don't catch everything before it reaches the bottom (I assume that's feeding the shrimp). But ammonia has been zero throughout - I've been testing very regularly.
Ammonia 0, nitrite 0.2, nitrate 30. Help! 🐟
@helenczerski sudden seasonal changes in ambient temperature can have a big impact on the fish, even just a few degrees. may not be it, but something to check whether the tank is in a relatively temperature steady spot.
hearing that jensen huang has tripled the amount of partners he has in just under two weeks.
if these trends continue, i think we need to have a serious conversation about the possibility of jensen huang dating every women on earth.
even in moderate scenarios he may send up with 82% of all leather jackets
... & otherwise updates the properties tracking the current span of text.
The public API populates those structs, clears properties, emits any remaining tokens based on saved flags, convert token types to human-legible names, & most importantly abstracts those parsing routines!
The main one repeatedly calls (if a flag's set) that line-start parser followed by that inline parser, while a further abstraction also emits any remaining tokens after the end of the text.
7/7 Fin for today!
@thomholwerda ooohh which distro? :3
@Foritus I'm going to go with what I know best and think is the best: Fedora KDE.
My wife doesn't like change, though, and the odds of her actually using it for more than 30 second are very slim. 😂
forgot to mention just as I was leaving Swansea services to go back to my car a large rat crossed my path.
Is this lucky?
@llamasoft_ox It didn’t bite your face off, so yeah I say it’s lucky 🤪
magnets
If a Karen or SWATer can make a false report and SPD can use that as an exscuse to spy on anyone, anytime, anywhere then we NEED stronger Karen Laws.
https://www.change.org/p/make-karen-law-accessible-in-washington-state
LLM-generated papers be like "here, let me punch you in the face with words"
It really is magical how they somehow take the worst aspects of their training data
@elsemusic Not to be confused with the Australian band Beaches, I’m sure. https://chaptermusic.bandcamp.com/album/second-of-spring
@soundclamp Frequently to be confused, I expect.
Sorry, the app encountered an unexpected error