Programming

26150 readers
269 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
151
 
 

The Hideout is a browser-based place to play social deduction games with friends or randoms.

What’s in right now:

🕵️ Mafia roles, night/day, voting, chaos

🦎 Chameleon fast bluffing, one player doesn’t know the word

🌐 Public & private rooms

🚫 No downloads, just click and play

It’s meant for quick games, late-night sessions, and arguing over who’s sus.

👉 joinhideout.vercel.app

Feedback welcome. I’m actively building this.

152
153
154
155
 
 

Hey everyone! After week of work finally rewrote dsci runner on golang.

git clone https://github.com/melezhik/dsci-runner.git cd dsci-runner go mod tidy go build -o dsci_runner main.go ./dsci_runner

That means just a single binary install Check it out ! )

Forgejo integrations details are here - http://deadsimpleci.sparrowhub.io/doc/forgejo-setup

156
 
 

Hey everyone! After week of work finally rewrote dsci runner on golang.

git clone https://github.com/melezhik/dsci-runner.git cd dsci-runner go mod tidy go build -o dsci_runner main.go ./dsci_runner

That means just a single binary install Check it out ! )

Forgejo integrations details are here - http://deadsimpleci.sparrowhub.io/doc/forgejo-setup

157
 
 

n quest’articolo vediamo come creare l’indice di una guida, supponiamo, sul linguaggio HTML. Apriamo OneCompiler e creiamo il seguente indice:

  1. Il linguaggio HTML

  2. I Tag: cosa sono e come si usano

  3. I commenti

  4. I paragrafi

Per farlo ci serviremo di un elenco numerato, quindi dei tag e il tag di chiusura ed il tag

158
 
 

To be clear: I do not think we should actually forget technical debt. Also, this is not the nth post discussing if “debt” is an appropriate metaphor. I do not have a strong opinion regarding the metaphor. My point is rather that I realized in a recent discussion that in the end, it is not so much about technical debt but rather about something else, and I wanted to share the thought.

159
160
 
 

I've recently started to get into containerized development (of LaTeX documents for now) using VSCode with the Dev Containers Extension. While compilation and everything works fine, I'm a bit annoyed by the very barebones shell of my podman container in the integrated terminal. I'm used to zsh with syntax highlighting and autocompletion, I like to use neovim to write my commit messages (even when I'm using VSCode to write my code) and of course I need git and ssh to push to my git forge.

I wonder if it is recommended to

  1. install neovim, zsh, ssh, git inside the dev container using the package manager (apt in this case) and manually write some config files
  2. Specify the installation of those packages in the Containerfile for my dev container and configure the devcontainer.json to mount my host's config files
  3. Use those tools from outside my dev container somehow
  4. Just not use any convenience tools like zsh, neovim, with individual config even, and only install purely functional packages like git and ssh in the container?

Since I'm not a software developer by training (trying to become one right now) I'd be very happy about some best practices or recommendations.

161
162
 
 

I've been thinking, would it be worth creating a separate community for AI coding related articles and discussion? I know there is !Aii@programming.dev, however AI coding has a lot of overlap with !programming@programming.dev.

I know some people have expressed they aren't interesting in reading these articles, so a separate community would make it easier for them to filter them out. Rather than simply vote them down as they aren't interested in the topic.

Or is it better to have broad communities in Lemmy given the current number of users?

163
164
 
 

An interesting perspective on the future of software development. I short: software that can save energy (token) consumption, will survive.

165
 
 

https://positive-intentions.com/blog/quantum-resistant-encryption

demo: https://cryptography.positive-intentions.com/iframe.html?args=&globals=&id=cascading-cipher-ml-kem-demo--mlkem-standalone&viewMode=story

code: https://github.com/positive-intentions/cryptography/blob/staging/src/crypto/CascadingCipher/layers/MLKEMCipherLayer.ts

166
20
submitted 1 month ago* (last edited 1 month ago) by codeinabox@programming.dev to c/programming@programming.dev
167
 
 

Changing Piefed Worker Scaling to be Based on Queue Size in Kubernetes with KEDA
I recently caused myself a bit of a minor issue by installing some updates on the Keyboard Vagabond cluster. It wasn't a big deal, just s...

168
 
 

Without human feedback, LLMs tend to write software like an early-career engineer - code that solves the immediate problem but tends to accumulate “design debt” over time, leading to software that’s becomes brittle and buggy.

169
 
 

A company not making self-serving predictions & studies.

170
171
172
 
 

The vast majority of events (talks, hacking sessions, open discussions) are held inside “developer rooms” (“devrooms”), which are mini-conferences organized and managed by open source projects themselves.

It’s also FREE !! 🥳

And there are cookies 🍪

173
174
12
submitted 1 month ago* (last edited 1 month ago) by WrenHavoc@lemmy.dbzer0.com to c/programming@programming.dev
 
 

cross-posted from: https://lemmy.dbzer0.com/post/62659556

Edit: I managed to get it working by using :has and nesting css classes!

body:has(#theme-toggle:checked) {
  background-color: #eff1f5;
  .content {
    color: #4c4f69;
  }
  .header {
    color: #8839ef
  }
  .nav {
    background-color: #dce0e8;
    color: #4c4f69;
  }
}

I'm making a website for my school's robotics team and I'm trying to create a dark theme toggle but it's just not working. I'm trying to avoid javascript and I've seen this kind of thing done with only css and html before so I know it's possible. any advice?

repo: https://github.com/WrenHavoc/JudgeMent-Call-Website

edit: currently my code looks something like this:

#theme-toggle:checked ~ body {
  background-color: #eff1f5;
  color: #fff;
}

#theme-toggle:checked ~ html {
  background-color: #eff1f5;
}

#theme-toggle:checked ~ .content {
  background-color: #eff1f5;
}

the button itself is a checkbox that has display set to none and the label set as an svg so when you click the icon, it gets checked.

<input style="display: none;" type="checkbox" id="theme-toggle">
                <label for="theme-toggle" class="theme-button">
                    <img class="theme-button-svg" src="./icons/half-moon.svg">
                </label>

I used a similar strategy when making the menu for the site so I know it should work

.menu {
  position:absolute;
  margin:0%;
  right:20px;
  top:20px;
}

.menu-button {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  cursor: pointer;
  z-index: 2; /* above menu */
}

.menu-button span {
  display: block;
  height: 4px;
  background-color: #cba6f7;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-items {
  top: 30px;
  right: -20px;
  width: 200px;
  background-color: #181825;
  position: absolute;
  display: none;
}

.menu-items li {
  margin: 20px 0;
}

.menu-items a {
  text-decoration: none;
  color: #cba6f7;
  font-size: 18px;
  padding:5px;
}

.menu-items a:hover {
  text-decoration: none;
  background-color: #cba6f7;
  color: #181825;
  font-size: 18px;
}

.menu-selected {
  text-decoration: underline;
  text-decoration-color: #cdd6f4;
  text-decoration-thickness: 3px;
}

.menu-selected:hover {
  text-decoration-color: #181825;
}

#menu:checked ~ .menu-items {
  display: inline;
}

#menu:checked + .menu-button span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 7.5px);
}
#menu:checked + .menu-button span:nth-child(2) {
  opacity: 0;
}
#menu:checked + .menu-button span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -7.5px);
}
<input style="display: none;" type="checkbox" id="menu">
                <label for="menu" class="menu-button">
                    <span></span>
                    <span></span>
                    <span></span>
                </label>
175
 
 

I want to write a reader for multiple lightweight markup languages. It must only support pretty basic "rich text" features (bold, indent, lists, such things), complicated formatting and not-matching tags will be entirely ignored.

I don't want to use a intermediate markup like pandoc does, since it should not convert but only display.
Which is why i thought of using a "mapping file" for each language. Guess it should support hierarchies, since formats like Markdown require context (prior line has this and next line that), so it will likely be in YAML/TOML/JSON.

Is this sufficient, or is there any better approach for simple addition of markup languages?
Or other projects doing similiar, i could learn from?

The context is a simple mbox/eml reader for a start (html and markdown), and the experience/ideas will be used in a bigger project later, with more language support.

view more: ‹ prev next ›