Masthash

#Programming

BlackPixelDust: Art :autism:
2 hours ago

(Cont'd)
Oh. Idk if my poll question about AI, AGI and ML is worded most effectively. But would love it if you'd retoot. (Top of thread.)

For the record... I dont trust these AI companies out here to protect humanity or have our best interests in mind. But that's something I could possibly discuss in comics or zines.
Just... gauging knowledge before I run my mouf talking about ish.
(Thank you!)

#blackmastodon #mastodon #tech #comics #zines #programming

podfeet
2 hours ago

Another fun episode of Programming By Stealth with @bbusschots where we learn about filter chaining, operators, and functions in jq

CCATP #781 — Bart Busschots on PBS jq7 of X — jq: Querying JSON with `jq` https://www.podfeet.com/blog/2023/12/ccatp-781/

#ProgrammingByStealth #programming #jq

Luke
3 hours ago

As part of tackling the undo system I decided to spend a little time building a debug view that shows the undo buffer on-screen.

Now to actually ... do something with that buffer.

#programming #undo #redo

seven lines of colored text on a black background
Lisp & Scheme Weekly
3 hours ago
Python Weekly 🐍
3 hours ago

Gooey: Turn almost any Python command line program into a full GUI application

https://github.com/chriskiehl/Gooey

Discussions: https://discu.eu/q/https://github.com/chriskiehl/Gooey

#programming #python

EdTheDev
4 hours ago

I have a new blog post: HELLO in the Pikachu Programming Language
at https://edward.delaporte.us/pikachu/

#programming #devOps #blog

"Energy is the key" [in programming]

Programming a 144-computer Chip to Minimize Power

Chuck Moore discusses what it takes to program a 144-core asynchronous chip that consumes only 7 pJ/inst, the idle cores taking just 100 nW while the active ones need 4mW running at 666 Mips: tight coding to minimize the number of instructions executed, reducing instruction fetches, transistor switching, and duty cycle.

https://www.infoq.com/presentations/power-144-chip/

#programming #lowpower #forth

Carlos 
8 hours ago

I've completed "Cube Conundrum" - Day 2 - Advent of Code 2023 #AdventOfCode

Check my solutions at: https://github.com/cdalvaro/advent-of-code-2023

#Ruby #AdventOfCode #Puzzle #Challenge #Programming #Coding #CodingChallenge

Preslav Rachev
9 hours ago

Q: How do I learn Django?

A: Skip the books. Django is not something you learn by solving theoretical puzzles. It is a framework meant for solving real needs. The best way to learn it is to concentrate on a small business idea, and jump right into it. Understanding the business and product needs will drive the rest of the process. The more you intertwine Django’s concepts with real world needs, the better.

#django #python #programming

Ruby Weekly
9 hours ago
Golang Weekly
9 hours ago
PHP Weekly
9 hours ago
Java Weekly
9 hours ago

Lenses and Reflection make light work of Kotlin Data Classes

https://youtu.be/hTLUELJDaec

Discussions: https://discu.eu/q/https://youtu.be/hTLUELJDaec

#kotlin #programming

Tanys Foster
10 hours ago

#gamedev #programming
omg I just finished a top-to-bottom upgrade of my sector map UI to utilize the new scene-and-layer framework, input changes, and map layers.

Architecture looks a little something like this now:

Scene
- Layers
-- Input
-- Map
--- MapLayers

90s Craig 🎢
10 hours ago

I've been trying to write some c# code to send inputs to vJoy.

1. I have no idea what I'm doing
2. The SDK may be broken (unlikely)
3. I'm just doing something wrong (likely)

#csharp #programming #Coding #ihavenoideawhathashtagstouseforthis

Šimon Tóth
11 hours ago

📆 Day 9 of Advent of Code 2023 is here. Today, we are predicting the next value in a histogram.

📖 Today was all about getting through the long-winded description.

https://open.substack.com/pub/simontoth/p/daily-bite-of-c-advent-of-code-day-cf0?r=1g4l8a&utm_campaign=post&utm_medium=web

#cpp #cplusplus #coding #programming #dailybiteofcpp #adventofcode

Sal Rahman
11 hours ago

Spotify's shuffle algorithm feels more random, even if the shuffling does not yield a truly randomized ordering of songs.

They did this because their original algorithm that truly randomized the order of the songs didn't quite feel random to listeners, and this was due to two songs from the same artist playing back-to-back, giving the illusion that the playlist has not truly shuffled. It just does not feel random to them.

Article: "Scrambling Eggs for Spotify with Knuth's Fibonacci Hashing"

https://pncnmnp.github.io/blogs/fibonacci-hashing.html

#Programming #Coding #Algorithms

We noticed some users complaining about our shuffling algorithm playing a few songs from the same artist right after each other. The users were asking “Why isn’t your shuffling random?”. We responded “Hey! Our shuffling is random!
At first we didn’t understand what the users were trying to tell us by saying that the shuffling is not random, but then we read the comments more carefully and noticed that some people don’t want the same artist playing two or three times within a short time period.
If you just heard a song from a particular artist, that doesn’t mean that the next song will be more likely from a different artist in a perfectly random order. However, the old saying says that the user is always right, so we decided to look into ways of changing our shuffling algorithm so that the users are happier. We learned that they don’t like perfect randomness.
Martin Geisler
11 hours ago

I always thought that doctests were an evolution of literate programming pioneered by Donald Knuth. However, reading https://en.wikipedia.org/wiki/Literate_programming again, I now see that it's explicitly called out that literate programming is about the ability to form a program from a web of smaller pieces. Importantly, this web does not have to follow the structure of the finished program.

I have not actually tried to do #literate #programming — is there anybody here who have experience with it?

Sam Seltzer-Johnston
12 hours ago

#ScreenshotSaturday this blueprint validation framework is starting to look pretty slick 🤩
#GameDev #UnrealDev #UnrealEngine #Blueprint #Programming

uvok
12 hours ago

#golang #programming
Hum. How would I "locate" a SQL schema file inside a go test function, so I can apply it to an in-memory-database (sqlite)?

I.e. can I always assume the CWD of the test is the package in which I also place the sql schema file?

And now going to get ChatGPT to write this in BASIC.
https://youtu.be/QPZ0pIK_wsc?si=b25NZpGiWLws-f2k
#programming #coding

IT News
12 hours ago

Go Programmers Surveyed: Most Use Linux or MacOS - The Go team conducted a survey of Go Developers in August — and has just released ... - https://developers.slashdot.org/story/23/12/09/0445214/go-programmers-surveyed-most-use-linux-or-macos?utm_source=rss1.0mainlinkanon&utm_medium=feed #programming

Joey Gibson :fez:
12 hours ago

Wow. #AdventOfCode Day 9 was shockingly easy. Day 8 wasn't that hard, either, so I'm worried that Day 10 is going to be a serious ass-kicker.

#AdventOfCode2023 #code #programming #python

What's a good tutorial or resource I can follow to learn myself some Rust by giving it max 2h a week?

Edit: if you have tips to get started with a vim setup I'd love them as well (using ALE for everything lint/lsp)

#rust #programming

Cameron
15 hours ago

Hooboy, I thought authentication documentation was hard to come by, but I just started looking into cross platform image processing with DotNet. I've settled on Magick . Net (ImageMagick wrapper) as that actually has some documentation, hasn't been deprecated, and is being actively maintained.

#DotNet #Programming

Lisp & Scheme Weekly
15 hours ago

basilisp-lang/basilisp: A Clojure-compatible(-ish) Lisp dialect targeting Python 3.8+

https://github.com/basilisp-lang/basilisp

Discussions: https://discu.eu/q/https://github.com/basilisp-lang/basilisp

#clojure #lisp #programming #python

Golang Weekly
15 hours ago

This is impressive, but why use #BBCBASIC for writing programs for modern systems? 🤔

“BBC BASIC For SDL 2.0”, R. T. Russell (https://www.bbcbasic.co.uk/bbcsdl/index.html).

Via HN: https://news.ycombinator.com/item?id=38455985

#Programming #BBCMicro #RetroComputing #OldSkool #SDL2

C:\KKJ\>:idle:
16 hours ago

I tested Lazarus and two Delphi versions with a simplest possible app. Results are interesting: from few MB to KB :)

Read full at https://smol.p1x.in/delphi.html

#Delphi #Pascal #Programming

Wortex17
16 hours ago

@eniko *David Attenborough voice
"And here we can see a cpp compiler in the wild mangling a rare, carefully selected function name. It will leave behind nothing but an intelligible carcass. It's family will not even be able to unambiguously identify their former member."

#ShitpostSaturday #programming

Russ
18 hours ago

#introduction Hello! My name is Russell, but I tend to go by Russ!

I'm a software dev (I tend to prefer backend or possibly mobile development) who tries to dabble in what tech offers these days - I might even be one of those "tech enthusiasts"

I also have always been a fan of #opensource and enjoy self-hosting stuff, even if I don't have an immediate need for that particular "thing"

Generally I'm an open book, so feel free to ask me whatever you'd like! #programming #linux

Even if you're not into Lisp, the level of discussion on this topics is just a really nice read.

#lisp #gc #typing #programming

Why are Common Lisp arrays this weird? https://www.reddit.com/r/lisp/comments/18dr7so/why_are_common_lisp_arrays_this_weird/

Timo Tiuraniemi
20 hours ago

Debugging. The game where you are the detective, the victim, and the criminal at the same time. You don’t know where the crime took place or what it was, but you're pretty sure there was one.

#programming

lorddimwit: not a typewriter
23 hours ago

Playing with my interpreter that I'm working on.

"Why is the garbage collector not freeing this allocation? It should. It's not referenced anywhere."

Dear reader, I fucked up writing a doubly-linked list insert function. I am a professional software engineer. I've done this professionally for 25 years and for fun for longer.

#Programming

Dinakar
1 day ago

Due to a stupid mistake I made very early in the project, I had to change a Class name, code file name and all corresponding references and test cases. Boy, what a chore.

Visual Studio Python extension offered to refactor with new Class name but only changed few references, making the task worse 🙁

Anyway I’m done with it and ready to enjoy the weekend with some NBA and NFL. #programming #python

Eric Vitiello
1 day ago

In this post, we’ll take a look at how to customize the macOS about panel for a SwiftUI app, to let us show custom content.

#macOS #SwiftUI #Swift #Programming
https://danielsaidi.com/blog/2023/11/28/how-to-customize-the-macos-about-panel-in-swiftui

Kroc Camen
1 day ago

Final version! https://github.com/Kroc/v80/blob/main/src/v80.wla#L417-L527 This took two days to prefect due to my requirements that I have to read the input number one byte at a time, blind, unlike most examples online that assume the digits are already available and valid. This code has a nice waterfall effect of falling through each digit 1-4, gracefully handling variable length hex numbers, even including 3 digit ones! #z80 #asm #programming #RetroComputing

Hank G ☑️
1 day ago
@filiph shared this link in his very grounded video on how to be a successful solo game developer. The context of this advice is on how to improve the odds of finishing a game even from before you start. I've found most of these to be true for solo/very small app projects in general. All of the advice is common sense yet that seems to often be the first thing that goes out the window when doing these sorts of things. At least it often does for me :) #software #programming makegames.tumblr.com/post/1136…
Eric Vitiello
1 day ago

In this post, we’ll take a look at how to customize the macOS menu bar for a SwiftUI app, using SwiftUI tools like CommandMenu and CommandGroup.

#SwiftUI #Swift #Programming #macOS
https://danielsaidi.com/blog/2023/11/22/how-to-customize-the-macos-menu-bar-in-swiftui

IBBoard
1 day ago

Is it possible to improve the refactoring in #VSCode?

I was using #Eclipse nearly 20 years ago now and its Java refactoring was FAR superior to what VS Code has.

It might be a Python vs Java thing, but some of it is simple stuff like "extract variable" extracting _all_ instances in scope, or being able to rearrange function arguments.

#SoftwareDevelopment #Programming #Python

Ruby Weekly
1 day ago

Hacking on Ruby Prism with Kevin Newton · Senior-level skills for experienced developers

https://www.hexdevs.com/events/live-hacking-on-ruby-prism/

Discussions: https://discu.eu/q/https://www.hexdevs.com/events/live-hacking-on-ruby-prism/

#programming #ruby

Nate Gaylinn
1 day ago

I just published a new coding project on github!

This is an early exploration of what I call an “epigenetic algorithm.” It’s inspired by an observation: in living cells, the process of evolution is actively managed by the cell, which itself is an evolved mechanism. Using evolution to optimize evolution seems like a powerful trick, so I’m trying to reproduce it in small-scale AI experiments. I hope to make evolutionary computing more open-ended, more successful in vast search spaces, and less biased by the programmer. In this case, I’m generating cool looking Game of Life simulations, but I hope to find many more practical applications in the future.

I hope folks find this interesting, and I’d love to hear your thoughts and feedback!
Presentation: https://docs.google.com/presentation/d/1ZIYj8Rg4xPHukQ-Glk9_IZTgimEYh5dtWsyXrbkX9Dc/edit?usp=sharing
Code: https://github.com/ngaylinn/epigenetic-gol-v1
Results: https://github.com/ngaylinn/epigenetic-gol-v1-results

#ai #evolution #alife #programming #python #cuda #gameoflife #github

Kagan MacTane (he/him)
1 day ago

Spicy take: If your software development team is using Prettier, you should set it to indent with tabs, not spaces.

That makes it easy for everyone to set whatever indentation depth they want, and even adjust it if they feel the need. Someone who can pick out a 4-column indent better than 2 will have trouble reading that "indented with 2 spaces" stuff, but tabs let everyone coexist.

#SoftwareDevelopment #coding #programming #webdev #code #Prettier #indentation

Eric Vitiello
2 days ago

Learn Swift and iOS Development on tanaschita.com. Stay up to date with guides and tutorials on topics like SwiftUI, Combine, concurrency with async/await and more.

#Swift #SwiftUI #Programming #SwiftData #Database #macOS #iOS
https://tanaschita.com/

Evan Hahn
2 days ago

"One way of describing the history of programming languages over the past 75 years is: They have steadily raised the baseline of what 'normal' programmers can express in their languages." https://v5.chriskrycho.com/journal/wizardry-frontier/

#programming #coding #ProgrammingLanguages #Rust

teamtuck
2 days ago

As someone who has “spotty” knowledge, ranging from beginner to intermediate, about #python , can anyone recommend a good training course to fill in all the gaps? I’m thinking about building on my knowledge of Python and getting a better understanding of it. 
#question #askfedi #programming

Joshua Byrd 🎄
2 days ago

I thought I might try blogging some kind of Rust tutorial alongside learning it myself. So anyway here's the first of a series if you wanna follow along. Just a simple Hello World! https://josh.is-cool.dev/2023-12-7-nature-keeps-evolving-rustaceans/

#Rust #RustLang #Tutorial #Blog #Programming

Webdev Weekly
2 days ago

Show HN: Recompyle – A JavaScript developer-friendly console / debugger

https://www.recompyle.com/

Discussions: https://discu.eu/q/https://www.recompyle.com/

#javascript #programming #webdev

Glyph
2 days ago

PEP 593 is a bit vague on how you’re supposed to actually consume arguments to `Annotated`; here is my proposal.

https://blog.glyph.im/2023/12/annotated-at-runtime.html

#python #programming #mypy

Collin Donnell
2 days ago

I know that writing tests is valuable and important, because whenever I don't do it and then backfill them later, I find out something was broken in a subtle and unexpected way. #programming

Jonathan Channon
2 days ago

Is Pluralsight, conference tickets and Safari Books Online still the thing to offer developers in a team for resources to be able to learn things? Are there other alternatives? #dotnet #dev #programming

Eric Vitiello
2 days ago

Animations were the most powerful feature of SwiftUI from day one. You can quickly build fluid animations in SwiftUI. The only downside was how we control animations whenever we need to run multi-step animation or scope the animation to a particular part of the view hierarchy.

#Swift #SwiftUI #Animation #Programming #iOS #macOS
https://swiftwithmajid.com/2023/11/21/scoped-animations-in-swiftui/

Nayab Sayed
2 days ago

Here are valuable resources on #eBPF to guide you from beginner to advanced levels:

- First, watch this #documentary: https://www.youtube.com/watch?v=Wb_vD3XZYOA. This video will motivate you to learn about eBPF.

- Following that, view one of the guests, Liz Rice, from the aforementioned documentary, showcasing the eBPF 'Hello World!' program at https://www.youtube.com/watch?v=uBqRv8bDroc. In brief, eBPF is an in-kernel virtual machine where user space programs can run. In this video, she codes the eBPF hello program in #C, loads it into the #kernel with the assistance of another program written in #Go, and there is much more covered in the video. The presentation slides are accessible at https://speakerdeck.com/lizrice/beginners-guide-to-ebpf-programming-with-go

- Following that, you can delve into one of the reports by Liz Rice herself titled 'What is eBPF?'. The report is available for free download at https://isovalent.com/books/ebpf/. In this insightful document, the author covers topics ranging from understanding the eBPF program, the advantages of eBPF over a #Linux kernel module, the process of crafting user and kernel space code for eBPF programs, attaching an eBPF program to various kernel events, the portability of eBPF programs across kernel versions with CO-RE (compiled once and run everywhere), eBPF's role in the cloud, and an exploration of various eBPF tools.

- I also recommend the second book from the same author, titled 'Learning eBPF', available for free and legally downloadable from https://isovalent.com/books/learning-ebpf/. This practical book covers topics in-depth, featuring a 'Hello World!' program in chapter 3 where both kernel and user space programs are entirely written in C. This provides a comprehensive understanding of what unfolds behind the scenes during eBPF program execution. Additionally, there is a dedicated chapter focusing on eBPF #Programming.

Additional Resources:
- Explore various documentation, talks, tutorials, articles, and blogs about eBPF at https://ebpf.io/what-is-ebpf/#further-reading.
- Liz Rice blog: https://www.lizrice.com/
- Liz Rice LinkedIn: https://www.linkedin.com/in/lizrice/

Show your support for the author (and me 😉) by ordering the physical book online on #Amazon (#India) - https://amzn.to/3GyJ6TW

jeremy
2 days ago
David Zaslavsky
3 days ago

@ploum @drewdevault Hmm... Well, each maintainer needs to do what works for them, of course, but personally the worst experiences I've ever had contributing to open source projects have been the ones that accept patches by email. I've been driven away from multiple projects by the sheer difficulty of understanding changes and following discussions in that workflow.

Some handle it better than others, but still, for me, no email-based workflow approaches the ease of use and clarity of something like #Github or #Gitlab.

#programming #Git

Harry W.
3 days ago

It's been a while since I last saw a repo that made me laugh

https://github.com/christina-de-martinez/babel-plugin-glowup-vibes

(Also, check out the issue page for extra fun)

#JavaScript #Node #JS #Programming #Funny #Tech

Tyler Mumford
3 days ago

#Programming hot take:

Ruby (over Python)

Just (over Make & others)

PowerShell (over bash, with caveats, and over cmd all day long)

Nushell (over bash & others)

Scoop (over Chocolatey & manual installation)

EditorConfig (over dealing with whitespace conflicts _again_)

Larry Garfield
4 days ago

Magic in code/APis is not bad. *Excessive* magic is bad.

Magic (aka, "things happen automatically") should be limited, self-evident, transparent, and discoverable. But not verboten.

#PHP #Programming