13
submitted 7 months ago by aloso@programming.dev to c/rust@programming.dev

l just released a new version of to-html. I created to-html a few years ago for my blog. It is very easy to use: When you want to include the output of a command on a website, run it with to-html:

to-html "cargo clippy"

Then copy and paste the output into your website. to-html comes with some options to customize its output. Starting with this release, you can create a configuration file, so you don't need to repeat the same CLI arguments every time you use to-html. This release also adds shell completions, a way to customize terminal colors via CSS, and a flag to not print the shell prompt. A big thank you to the contributors who implemented these features!

21
submitted 7 months ago by aloso@programming.dev to c/rust@programming.dev

Author of Pomsky here. Feel free to ask me anything!

[-] aloso@programming.dev 7 points 9 months ago* (last edited 9 months ago)

If all you do in the Err(e) => ... match arm is returning the error, then you absolutely should use the ? operator instead.

If the match arm also converts the error type into another error type, implement the From trait for the conversion, then you can use ? as well.

If you want to add more information to the error, you can use .map_err(...)?. Or, if you're using the anyhow crate, .with_context(...)?.

[-] aloso@programming.dev 7 points 10 months ago

"secure" is relative. They may not be e2e encrypted, but they are still encrypted via TLS, like any HTTPS traffic. It's the same encryption used for online banking. If you care about your instance admin being able to read your messages, you should use Signal or a Matrix client though.

But remember that only a few years ago, almost nobody used e2e encryption, and it wasn't much of an issue.

[-] aloso@programming.dev 11 points 10 months ago* (last edited 10 months ago)

The name "pull request" is actually more accurate, because you ask the upstream repository to git pull the changes from the downstream repo.

[-] aloso@programming.dev 9 points 11 months ago

It is so frustrating when a conspiracy narrative is mixed with valid criticism, which ultimately only taints the criticism by association with the "conspiracy."

[-] aloso@programming.dev 9 points 11 months ago

I guess it cannot be done if their IT infrastructure was not designed with that use case in mind. Although I'm not familiar with human resource management software, I don't find this hard to believe at all.

Also, you'll understand what Biron Tchaikovsky meant with "Please believe me" when you look at their email address. They already tried to do it, and probably complained many times before giving up.

[-] aloso@programming.dev 90 points 11 months ago

Oh, didn't the domain somesoftwarecorp.com give it away?

[-] aloso@programming.dev 12 points 11 months ago* (last edited 11 months ago)

Iframes cannot access the main frame's DOM if the iframe is from a different origin than the main frame, and they never share the same JavaScript execution context, so an iframe can't access the main frame's variables etc.

It's not required that iframes run in a different process, but I think they do at least in Chrome and Firefox if they're from a different origin. Also, iframes with the sandbox attribute have a number of additional restrictions, which can be individually disabled when needed.

[-] aloso@programming.dev 13 points 11 months ago

They still have their place; for example to embed Google Maps or a YouTube video. Generally, whenever you want to embed something from a different website you have no control over, that shouldn't inherit your style sheets, and should be sandboxed to prevent cross site scripting attacks.

[-] aloso@programming.dev 19 points 11 months ago* (last edited 11 months ago)

I do not use AI to solve programming problems.

First, LLMs like ChatGPT often produce incorrect answers to particularly difficult questions, but still seem completely confident in their answer. I don't trust software that would rather make something up than admit that it doesn't know the answer. People can make mistakes, too, but StackOverflow usually pushes the correct answer to the top through community upvotes.

Second, I rarely ask questions on StackOverflow. Most of the time, if I search for a few related keywords, Google will find an SO thread with the answer. This is much faster than writing a SO question and waiting for people to answer it; and it is also faster than explaining the question to ChatGPT.

Third, I'm familiar enough with the languages I use that I don't need help with simple questions anymore, like "how to iterate over a hashmap" or "how to randomly shuffle an array". The situations where I could use help are often so complicated that an LLM would probably be useless. Especially for large code bases, where the relevant code is spread across many files or even multiple repositories (e.g. a backend and a frontend), debugging the problem myself is more efficient than asking for help, be it an online community or a language model.

[-] aloso@programming.dev 7 points 11 months ago

because it's really not that much better than crates.io and it has the downside of the results being biased.

I use its search, because it produces much better search results. The crates.io search is almost unusable, it rarely finds anything useful in the top search results.

[-] aloso@programming.dev 6 points 11 months ago

Microsoft does collect a lot of data. But storing every keystroke is first of all impractical, because it would take a lot of disk space to store every keystroke of every user, and secondly not very useful unless they also knew when, in which application, and in what context each key was pressed.

view more: next ›

aloso

joined 1 year ago