425 Too Early - 🐱

1
1
submitted 34 seconds ago by [email protected] to c/demoscene
2
3
submitted 7 minutes ago by [email protected] to c/vscode

Is there an extension that allows for automatic stashing on branch switch like GitHub desktop does?

There was an a proposal about it, but it got declined: https://github.com/microsoft/vscode/issues/86668

3
2
submitted 19 minutes ago by secana to c/nix

Hi,

I want to sort my bookmarks in Firefox with home-manager into folders, but fail.

Simple example:

firefox = {
      profiles."user" = {
        bookmarks = [
          {
            name = "Nix";
            toolbar = true;
            bookmarks = [
              {
                name = "NixOS Search";
                url = "https://search.nixos.org/packages";
              }
              {
                name = "NixOS Options";
                url = "https://nixos.org/manual/nixos/unstable/options";
              }
              {
                name = "Home-Manager Options";
                url = "https://nix-community.github.io/home-manager/options.xhtml";
              }
              {
                name = "Home-Manager Options Search";
                url = "https://home-manager-options.extranix.com/";
              }
            ];
          }
        ];
      };

My assumption was that I get a folder "Nix" in the bookmarks toolbar that contains the four bookmarks. But instead the four bookmarks are added to the toolbar side-by-side without being in a folder.

How can I achieve that?

4
3
wxWidgets 3.2.5 Released (www.wxwidgets.org)
submitted 56 minutes ago by lysdexic to c/cpp
5
1
submitted 2 hours ago by [email protected] to c/javascript

I can do this manually using the following: Right-click on the video player, copy debug info, paste into text editor, and Ctrl+F for "addocid".

What is the best way to do this automatically?

By modifying an ad accelerator I found, I can reliably detect when a pre-roll ad is playing:

function handleVideoAd() {
	const video = document.querySelector('video');
	const adElement = document.querySelector('.video-ads.ytp-ad-module');
	if (video && adElement && adElement.children.length > 0) {
		alert('advertisement found!')
	}
}

function initializeAdHandling() {
	handleVideoAd();
	const observer = new MutationObserver(handleVideoAd);
	observer.observe(document.body, { childList: true, subtree: true });
}
initializeAdHandling()

If I had the video ID, I could then open the video in a new tab using something like:

window.open('https://www.youtube.com/watch?v=adVideoID');

However, I am at a bit of a loss as to how to extract the ad video ID itself.

In the browser inspector, the only places I can find the ad video ID are:

  1. Within the URL for ytp-cued-thumbnail-overlay-image
  2. As adVideoId within var ytInitialPlayerResponse, which itself is within <script nonce="rwc3vYf3vRLEyNQKsJOgig">, where rwc3vYf3vRLEyNQKsJOgig changes with every video.

What would be the best way to extract the advertisement video ID?

Apologies for if I'm going about this the wrong way. I am (very!) new to JavaScript, but interested in learning. Please let me know if I've broken any community rules, or committed any other sort of faux pas. Thanks! :)

6
3
submitted 2 hours ago by [email protected] to c/latex

cross-posted from: https://beehaw.org/post/13830031

Just learning LaTeX; apologies for the noobie-type question.

7
4
Day 9 - Diving into networking (linuxupskillchallenge.org)
submitted 4 hours ago by livialima to c/linuxupskillchallenge
8
13
submitted 7 hours ago by [email protected] to c/ask_experienced_devs

Hello. Like many of you I've been affected by the wave of layoffs and am struggling to even get a response for most of my applications.

I've recently been talking to a local manufacturing plant about employment regarding full stack development, but they told me they would only be willing to contract me. While this still leaves me without health insurance (USA), beggars can't be choosers.

The issue is, I'm early in my career and have never dabbled in contract work. They haven't been specific about what they want to contract me for as well, just asked me for an hourly rate.

I unfortunately have to dox myself, but I would really appreciate if anyone could take a look over my portfolio/resume and let me know what my worth is. Granted I would likely charge more if I was writing them a high performance Rust program as compared to some Python scripts, but I don't think I have the luxury of nuance.

Thank you, I appreciate it.

https://johnrigoni.me

Aside: I have an appointment to get a professional headshot next week, I know it's not great.

9
12
Raspberry Pi Ltd is considering an IPO (www.londonstockexchange.com)
submitted 9 hours ago by [email protected] to c/raspberry_pi

"Raspberry Pi Ltd, a leader in low-cost, high-performance computing, announces that it is considering an initial public offering (the "IPO" or the "Offer") and that it intends to publish today a registration document (the "Registration Document"). The Company is considering applying for admission of its ordinary shares to the premium listing segment of the Official List of the FCA and to trading on the Main Market of the London Stock Exchange ("Admission")."

10
7
submitted 11 hours ago by [email protected] to c/react
11
1
submitted 12 hours ago by canpolat to c/dotnet
12
9
submitted 13 hours ago by nieceandtows to c/meta

Invalid SSL certificate Error code 526

Including for me.programming.dev

13
387
submitted 13 hours ago by [email protected] to c/programmer_humor
14
3
submitted 13 hours ago* (last edited 13 hours ago) by Hammerheart to c/linux4noobs

I have been using sway (basically i3 for Wayland) instead of a traditional desktop environment because it really makes a difference in my laptops performance.

But apparently sway ignores .desktop files which was how i was autostarting things on KDE.

Is the best way to handle this by going through the sway config? If not, how would you do it.

Bonus points if you can tell me how to get the autostart programs to also open in specific workspaces.

15
19
submitted 14 hours ago by popcar2 to c/godot
16
9
submitted 15 hours ago by [email protected] to c/react
17
13
State of HTML 2023 (2023.stateofhtml.com)
submitted 15 hours ago by [email protected] to c/programming

cross-posted from: https://lemmy.world/post/15433712

State of HTML 2023

Results of the State of HTML 2023 Survey are out.

18
17
State of HTML 2023 (2023.stateofhtml.com)
submitted 15 hours ago by [email protected] to c/webdev

Results of the State of HTML 2023 Survey are out.

19
5
submitted 16 hours ago by notnotmike to c/rider

Around two years ago I was on a really small team, just two or three developers, and the other developer decided they wanted us to use Rider. Because I didn't have a preference, I used Rider and rather enjoyed it. However, that developer has since moved teams and now it is just me (for the time being).

So I was considering moving back to Visual Studio or even switching to Visual Studio Code, but I wanted to see some arguments against this.

Here is my list so far, but it's probably out of date since I haven't used Visual Studio in a long time.

Pros of Rider:

  • Much faster than using ReSharper
  • Less sharp interface with a better font
  • I'm used to it at this point
  • I have a Nyan cat loading bar which is kind of fun

Cons of Rider:

  • Enterprise license is expensive (probably)
  • New versions of C# aren't immediately supported
  • Refactorings are becoming less necessary with the rise of AI assistants
  • Don't really like their source control manager

Wanted to hear what other users think. What keeps you using Rider?

20
13
My LaTeX book (lemmy.world)
submitted 16 hours ago by [email protected] to c/cool_github_projects

Better design, new features and readme.

... and this is the most popular open source LaTeX book on github ❤️

https://github.com/AnMnv/eBook

21
7
LaTeX book in 2024? (lemmy.world)
submitted 16 hours ago by [email protected] to c/opensource

Better design, new features and readme.

... and this is the most popular open source LaTeX book on github ❤️

https://github.com/AnMnv/eBook

22
3
submitted 16 hours ago by [email protected] to c/latex

Better design, new features and readme.

... and this is the most popular open source LaTeX book on github ❤️

https://github.com/AnMnv/eBook

23
15
submitted 16 hours ago by [email protected] to c/terraform
24
14
submitted 18 hours ago by canpolat to c/git
25
3
submitted 18 hours ago by armchair_progamer to c/formal_methods

From README:

At the heart of coq-of-rust is the translation of Rust programs to the proof system Coq 🐓. Once some Rust code is translated to Coq, it can then be verified using standard proof techniques.

Here is an example of a Rust function:

fn add_one(x: u32) -> u32 {
    x + 1
}

Running coq-of-rust, it translates in Coq to:

Definition add_one (τ : list Ty.t) (α : list Value.t) : M :=
  match τ, α with
  | [], [ x ] =>
    ltac:(M.monadic
      (let x := M.alloc (| x |) in
      BinOp.Panic.add (| M.read (| x |), Value.Integer Integer.U32 1 |)))
  | _, _ => M.impossible
  end.

Functions such as BinOp.Panic.add are part of the standard library for Rust in Coq that we provide. We can then express and verify specifications on the code in Coq.

Blog:

The same group also recently started coq-of-python, which is the same thing but for Python:

Alternate Rust-to-_ translators:

Other Rust formal verification projects:

  • Creusot: Formally verifies Rust code with annotations representing preconditions/postconditions/assertions, by translating the MIR to Why3 then solving.
  • Kani: Formally verifies Rust code with annotations, by using model checking powered by CBMC.
  • Verus: Formally verifies a Rust DSL with syntax extensions to represent preconditions/postconditions/assertions, by using the Z3 SMT solver.
view more: next ›

programming.dev

8,236 readers
426 users here now

Welcome Programmers!

programming.dev is a collection of programming communities and other topics relevant to software engineers, hackers, roboticists, hardware and software enthusiasts, and more.

The site is primarily english with some communities in other languages. We are connected to many other sites using the activitypub protocol that you can view posts from in the "all" tab while the "local" tab shows posts on our site.


🔗 Site with links to all relevant programming.dev sites

🟩 Not a fan of the default UI? We have alternate frontends we host that you can view the same content from

ℹ️ We have a wiki site that communities can host documents on


⚖️ All users are expected to follow our Code of Conduct and the other various documents on our legal site

❤️ The site is run by a team of volunteers. If youre interested in donating to help fund things such as server costs you can do so here

💬 We have a microblog site aimed towards programmers available at https://bytes.programming.dev

🛠️ We have a forgejo instance for hosting git repositories relating to our site and the fediverse. If you have a project that relates and follows our Code of Conduct feel free to host it there and if you have ideas for things to improve our sites feel free to create issues in the relevant repositories. To go along with the instance we also have a site for sharing small code snippets that might be too small for their own repository.

🌲 We have a discord server and a matrix space for chatting with other members of the community. These are bridged to each other (so you can interact with people using matrix from discord and vice versa.

founded 11 months ago
ADMINS