@piggo If you're not opposed to toolchain-specific extensions, the gas .incbin
directive is handy:
#include <stdio.h>
asm("sym: .incbin \"/etc/passwd\"\nendsym:");
extern char sym[];
extern char endsym[];
int main(void)
{
for (int i = 0; i < endsym - sym; i++)
putchar(sym[i]);
return 0;
}
"Surround yourself with shit that you can punch, my boy, and you will know peace."
@arj Do you really want to approach the latter without some preparation via the former?
It’s very funny to me that the dominant Twentieth Century conception of AI was a slightly awkward nerd with an inhuman mastery of facts and logic, when what we actually got is smooth-talking bullshit artists who can’t do eighth-grade math.
History in pics: Testing prototype Roomba's in 1982. It would take two decades until they could be made small enough to clean under a couch.
Normalize using the word "Safe" as the opposite of "Smart" in the context ot #IoT / home appliances.
"I got myself a nice new Safe TV." 👍
#InfoSec
@petersanchez @icy @ols @knapjack Heh, that's my reasoning for using apache. nginx still seems all newfangled-like.
Some say emailed patches are a relic of the past and projects need to modernize, PRs on web-based forges or bust.
But true modernity, true enlightenment...can only be reached one way: patches via honk.
@tedu Hmm, never tried donking anything but images before; let's see how a .patch file works I guess?
Attachment: mz.patch webs patch to fix mentions bug
@tedu something like this maybe?
diff --git a/mz/mz_test.go b/mz/mz_test.go
index a2259ab60891..17f431fb802a 100644
--- a/mz/mz_test.go
+++ b/mz/mz_test.go
@@ -5,14 +5,18 @@ import (
"testing"
)
-func doonezerotest(t *testing.T, input, output string) {
- var marker Marker
+func doonezerotestwithmarker(t *testing.T, marker *Marker, input, output string) {
result := marker.Mark(input)
if result != output {
t.Errorf("\nexpected:\n%s\noutput:\n%s", output, result)
}
}
+func doonezerotest(t *testing.T, input, output string) {
+ var marker Marker
+ doonezerotestwithmarker(t, &marker, input, output)
+}
+
func TestBasictest(t *testing.T) {
input := `link to https://example.com/ with **bold** text`
output := `link to <a href="https://example.com/">https://example.com/</a> with <b>bold</b> text`
@@ -121,6 +125,16 @@ func TestImagelink(t *testing.T) {
doonezerotest(t, input, output)
}
+func TestMentions(t *testing.T) {
+ input := "@foo@example.com @bar@example.org @baz@example.net are pals but @notamention isn't"
+ output := "foo@example.com bar@example.org baz@example.net are pals but @notamention isn't"
+ var marker Marker
+ marker.AtLinker = func(text string) string {
+ return text[1:]
+ }
+ doonezerotestwithmarker(t, &marker, input, output)
+}
+
func TestLists(t *testing.T) {
input := `hello
+ a list
(Probably still whitespace-damaged...but one bug at a time.)
Fails without the prior regex patch; passes with it applied.
@tedu Having now learned how to copy/paste/modify a go mod edit -replace
invocation, I can report that the following seems to work, at least in some cursory testing:
diff --git a/mz/mz.go b/mz/mz.go
index 90ce6ba39293..107d5cf82242 100644
--- a/mz/mz.go
+++ b/mz/mz.go
@@ -37,7 +37,7 @@ var re_lister = regexp.MustCompile(`((^|\n)(\+|-).*)+\n?`)
var re_tabler = regexp.MustCompile(`((^|\n)\|.*)+\n?`)
var re_header = regexp.MustCompile(`(^|\n)(#+) (.*)\n?`)
var re_hashes = regexp.MustCompile(`(?:^| |>)#[\pL\pN]*[\pL][\pL\pN_-]*`)
-var re_mentions = regexp.MustCompile(`(^|[ \n])@[[:alnum:]._-]+@[[:alnum:].-]*[[:alnum:]]([ \n.]|$)`)
+var re_mentions = regexp.MustCompile(`(^|[ \n])@[[:alnum:]._-]+@[[:alnum:].-]*[[:alnum:]]\b`)
var lighter = synlight.New(synlight.Options{Format: synlight.HTML})
@jk @verb @az With that kind of throughput potential, who needs forest fires?
@tedu That seems consistent with what I've seen -- when given three or more consecutively it appears to alternate between matching and non-matching I think. I don't know the go tooling well enough offhand to have figured out how to actually test this (given it being in a dependency rather than the honk codebase itself), but any chance something like the following in webs would do the trick?
diff --git a/mz/mz.go b/mz/mz.go
index 90ce6ba39293..72caa2fb8e43 100644
--- a/mz/mz.go
+++ b/mz/mz.go
@@ -37,7 +37,7 @@ var re_lister = regexp.MustCompile(`((^|\n)(\+|-).*)+\n?`)
var re_tabler = regexp.MustCompile(`((^|\n)\|.*)+\n?`)
var re_header = regexp.MustCompile(`(^|\n)(#+) (.*)\n?`)
var re_hashes = regexp.MustCompile(`(?:^| |>)#[\pL\pN]*[\pL][\pL\pN_-]*`)
-var re_mentions = regexp.MustCompile(`(^|[ \n])@[[:alnum:]._-]+@[[:alnum:].-]*[[:alnum:]]([ \n.]|$)`)
+var re_mentions = regexp.MustCompile(`\b@[[:alnum:]._-]+@[[:alnum:].-]*[[:alnum:]]\b`)
var lighter = synlight.New(synlight.Options{Format: synlight.HTML})
@carlmalamud I wonder how many additional hours of meetings and disclaimer clarifications could be incurred by pointing out the potential confusion that "remove before installing" and "warranty void if removed" logically combine to "warranty void if installed".
@tedu sobs into phone
Assuming this is the issue mentioned here, I'm guessing it's just some regex somewhere needing a tweak?
@oclsc @cks ...hopefully. Some BMCs will unconditionally power on the host during their boot sequence, so rebooting the BMC of a powered-off server might not leave it that way...
@bhaktishh @regehr Your first intro programming class was taught in...Haskell? Nevermind git, that seems like a bold move...after spending a length of time now comfortably measurable in decades writing code in various languages, lazy evaluation still regularly confuses the bejezus out of me.
@regehr @julesjacobs @djg Shuffle an array of bools? (Good chance it'd actually be less efficient in practice I'd expect, but arguably "elegant".)
@regehr I'm neither a compiler expert nor a testing expert, but I have a vague gut feeling it might be good to sprinkle in some non-power-of-2-but-low-Hamming-weight values? (e.g. 0xc0000000, 0x80008000, etc.) I guess maybe still "close to a power of 2", but by Hamming distance instead of arithmetically.
@tedu I've been seeing some slight wonkiness with usernames not all getting linkified with options.MentionAll
enabled -- e.g. here and here.
Bowie, besnoozed.
@djm @alx Seems odd to me that the remediation instructions say to uninstall/update the compromised packages, but make no mention of rotating your SSH keys. Wouldn't that also be...maybe a little bit important?
I've just been sent this.
@arj Hmm, hadn't heard that previously (though apparently it was announced in April?)...I had of course been expecting some more mundanely off-putting specific technical decision (e.g. more ads-in-motd or the like). Red Hat AFAIK managed to refrain from suchlike even after going public, but if Canonical was already engaged in that...who knows where they might end up?
@arj I'm gonna guess the question to ask here is "what last-straw thing has ubuntu done now?"
@arj I await the riches and paparazzi that will doubtless soon be flooding BMC-land...
@molly0xfff @kleb Honking is all some of us do on here!
(honk)
For your entertainment, I present:
Every Way that Google Meet Transcribed "I²C" in a Recent Video Call
I squared C
iceberg seed
I squirt, C
I scored sea
Iceberg, Sea
Expertise
ice script C
expert. C
Iceberg C
ice grid C
icecruity
I scored C
ice, courtesy
I scored see
Ice Court C
ice. Query city
I swear it's c
i squirt seat
@kenkeiter https://hachyderm.io/@bcantrill@mastodon.social I've done it before... https://honk.bewilderbeest.net/u/zev/h/tlHC6vrCqKSb3g2M1f
After some performance optimization work I was able to get about 1.5 Mbps of iperf3 throughput out of it, which was basically sufficient for the task it was intended for.
@darryl_ramm @bcantrill Oh -- unless I'm misunderstanding that looks more like what I'd call I2C-over-ethernet? (i.e. it looks like it presents a network-based API for performing I2C operations.) What I implemented was the inverse -- shuffling ethernet frames back and forth over I2C, essentially just using it as an alternate PHY layer.
Reports from the front, Maui edition.
@darryl_ramm @jkbecker @bcantrill Hah -- last year I wrote an ethernet-over-I2C Linux driver (for semi-perverse but actually pragmatic reasons); didn't know there was prior art in that space -- got any pointers to further info?
@Obdurodon Fresh or fried? And where from?
I think the Old Fashioned on the square has some of the best fried ones; my favorite fresh ones were a dill/herb variety from a farm whose name I can unfortunately no longer remember that Metcalfe's used to carry (or maybe still does?).
@GeoffWozniak Earlier this year I got a Framework, which I've been quite pleased with. I think it's a great concept, and the execution is pretty solid too IMO.
By popular demand, I have scanned my copy of Draft #1 of #Kernighan and #Ritchie's C Programming Language book. Here: https://drive.google.com/drive/folders/1OvgKikM8vpZGxNzCjt4BM1ggBX0dlr-y #ComputerHistory #UNIX #CLang
@kleavens syntax highlighting is also a form of illuminated manuscripts.
It’s finally here.
@rhalina
@w8emv @aka_pugs Even if only via the "firmware ⊂ software" relation, yes. (Though it's admittedly amplified by being hidden in dark corners where few people ever look.)
unspecified horror
unspecified horror
oh no, my job
@tedu Hmm, and it looks like that @-mention doesn't get parsed as such when it's followed by a \n
instead of a space... #honkbug?
@tedu
Twist ending with surprise vocabulary lesson?
$ dict berk
1 definition found
From WordNet (r) 3.0 (2006) [wn]:
berk
n 1: a stupid person who is easy to take advantage of
(Wiktionary's definition is slightly more colorful, even.)
@kittell I think about this fuzz tester often: https://vimeo.com/132609771
@arj Hadn't realized it had built-in rust bindings...happen to know if there are any efforts underway to get it listed on crates.io (or maybe lib.rs)? I recently ended up using gpiocdev for a thing I'm hacking at; had libgpiod itself been easily available via one of those I might've evaluated it as a another possibility...
@jk I have enough trouble typing "i2c" as it is...you mean I have to reach all the way up to the numeric keys? And remember not to keep holding shift when uppercasing it?
My typing accuracy is on the whole not great, but those three characters trip me up probably 50% of the times I attempt them.
@jwz It's a bit on the "minimalist" side, but as someone with similar requirements personally I've found honk checks those boxes pretty well, FWIW.
@mattblaze @sehe I dunno, honestly even in the ML sense I still bristle at the use of "AI" to describe anything that currently exists (or believably could in the foreseeable future). It's not just that it's not general, but even in the fairly limited scopes of the problem domains it's applied to, the failure modes it exhibits do not give the impression that what's going on under the covers has any relation to the workings of "real" intelligence.
It's certainly a pretty lost cause at this point, but I think I'll probably continue to stubbornly employ air-quotes any time I (grudgingly) use the term myself.
@benjojo While I can think of maybe two times ever when I had any need for one (for some fairly generous definition of "need"), every time I see one of these images I get major Flir jealousy.
@timkuijsten Yeah, that's essentially what I've been doing.
@w8emv Oh, and I guess you'll probably also need to hit the re-sub button on all your honkers, and maybe unsub them from the old domain first before changing it as a small courtesy to other servers? (If my vague understanding of ActivityPub is right, which it may well not be.)