Search
Items tagged with: programming
#RustConf videos have been posted! Check out my talk among others.
https://www.youtube.com/watch?v=MTnIexTt9Dk&list=PL85XCvVPmGQgR1aCC-b0xx7sidGfopjCj
Rust web frameworks have subpar error reporting
https://www.lpalmieri.com/posts/rust-web-frameworks-have-subpar-error-reporting/
Discussions: https://discu.eu/q/https://www.lpalmieri.com/posts/rust-web-frameworks-have-subpar-error-reporting/
Rust web frameworks have subpar error reporting
None of the major Rust web frameworks have a great error reporting story. We try to implement robust error logging with both axum and Actix Web and then compare the results with Pavex, an upcoming Rust web framework.www.lpalmieri.com
This should be the default in #git
[branch] sort = -committerdate
Adding it to your git config will make the command `git branch` sort by last used branches instead of alphabetical. No more trying to remember what I called that last branch!
So you think you know C?
https://wordsandbuttons.online/so_you_think_you_know_c.html
Discussions: https://discu.eu/q/https://wordsandbuttons.online/so_you_think_you_know_c.html
So you think you know C? - discu.eu
Discussions and related articles for «So you think you know C?»discu.eu
I built something that lets you import Node modules from BitTorrent. It's weird. https://gitlab.com/EvanHahn/node-torrent-import
#Node #NodeJS #JavaScript #BitTorrent #decentralization #programming
As much as it conflicts with convention, I actually think arrays starting at 1 in Lua is more programmer-friendly.
Question for #programmers:
I maintain that there is exactly 1 correct usage of a `goto` (language doesn't matter, you know the construct). I'm not the first person to make the claim; I'm not the only person (certainly not the most famous); and I know other people know the answer to this.
Feel free to say what it is in the comment/scoop me. I have a disassembled comparison to show after the poll to explain.
#programming #controlFlow #shitpost
Do you know the appropriate place to use a `goto`?
- I know what a goto is supposed to be used for. (53%, 8 votes)
- I do not know what a goto is for. (13%, 2 votes)
- There are no correct uses of goto. (26%, 4 votes)
- What's a goto? (6%, 1 vote)
#Swift is a very expressive programming language. Many of us seem to overlook a very interesting method that is available to us on sequence types. That method is `forEach` don't mistake it with the `ForEach` view of the #SwiftUI framework. The `forEach` method executes a given closure on *every* elemnt of the sequence in same order as a for loop does. The closure takes one parameter, and that parameter is, obviously the element ofthe sequence that is currently iterated over. So for an array defined as so
```
let countries = ["Russia", "Poland", "belarus", "China"]
```
something that most programmers would do would be
```
for country in countries {
print("\(country) is a very interesting country.")
}
```
Using the array's forEach methdo we can simplify this code to that
```
countries.forEach {
country in
print("\(country) is a very interesting country.")
}
```
There is a way we can simplify our code. It is shorthand parameter names for closures, where we can omit `country in` part and replace it with $0 in our print statement,
There are two important things to consider when thinking of using the forEach over a traditional forr loop.
1. We should really interpret the name name literally in this content. There is no break or continue statements here. The forEach method will iterate through *every* element of the collection, essentially stripping us from all the control we have over the execution flow.
2. It is pretty obvious but can make some people frustrated: when our closure returns, we return only from the current iteration, ski pping to the next one. It cannot be used like break.
#swift #apple #programming #tip
https://www.cisa.gov/news-events/news/urgent-need-memory-safety-software-products#:~:text=CISA's%20secure%20by%20design%20white,will%20incorporate%20all%20three%20principles.
#security #programming
The Urgent Need for Memory Safety in Software Products | CISA
Cybersecurity Technical Advisor Bob Lord stresses the importance of memory safety in making software safer by design.Cybersecurity and Infrastructure Security Agency CISA
Announcing `async fn` and return-position `impl Trait` in traits | Rust Blog
https://blog.rust-lang.org/2023/12/21/async-fn-rpit-in-traits.html
Discussions: https://discu.eu/q/https://blog.rust-lang.org/2023/12/21/async-fn-rpit-in-traits.html
Announcing `async fn` and return-position `impl Trait` in traits | Rust Blog
Empowering everyone to build reliable and efficient software.blog.rust-lang.org
We used to have programming books.
(patch notes: added a more detailed description of the man to the alt text)
On inheritance and why it's good Rust doesn't have it
https://www.thecodedmessage.com/posts/oop-3-inheritance/
Discussions: https://discu.eu/q/https://www.thecodedmessage.com/posts/oop-3-inheritance/
Rust Is Beyond Object-Oriented, Part 3: Inheritance :: The Coded Message - discu.eu
Discussions and related articles for «Rust Is Beyond Object-Oriented, Part 3: Inheritance :: The Coded Message»discu.eu
So I've been working with GTK4/Libadwaita in Python (in Flatpak), and I'm trying to get notifications to work.
I keep getting this error: "gi.repository.GLib.GError: g-io-error-quark: Error calling StartServiceByName for org.freedesktop.Notifications: Timeout was reached (24)"
Am I missing Flatpak overrides? (Docs seem to say no https://docs.flatpak.org/en/latest/portals.html )
Am I doing this wrong? (Code at https://github.com/TheKrafter/Groupings/blob/rewrite/src/groupings/internal/push.py#L31 )
#AskFedi #GTK4 #Python #LibAdwaita #gnome #Programming
loco-rs: releasing a framework inspired by Rails on Rust
Discussions: https://discu.eu/q/https://loco.rs/
#programming #rails #ruby #rustlang #webdev
I've been looking at this for 20 minutes and I am still not sure whether this is real programming language or extremely sophisticated trolling.
Rustlantis: a fuzzer for the Rust compiler that already found 9 miscompilation bugs
Rustlantis: Semantic fuzzing of the Rust compiler and interpreter - discu.eu
Discussions and related articles for «Rustlantis: Semantic fuzzing of the Rust compiler and interpreter»discu.eu
Since other people are discussing these things, always a good reminder that on #scala using cats-effect library and using #FunctionalProgramming these thing are properly abstracted away nowadays and on daily usage one finally barely has to care at all about it. - https://typelevel.org/cats-effect/docs/thread-model
----
Two kinds of threads pools, and why you need both | Lobsters - https://lobste.rs/s/k8knw4/two_kinds_threads_pools_why_you_need_both
I've written a #tutorial on how to program #accessible #native #gui #windows applications in #rust using the native-windows-gui library: https://modulus.isonomia.net/tech/nwg/
Also available in Spanish: https://modulus.isonomia.net/tech/nwg-es/
Programando GUIs nativos y accesibles en Windows con Rust
Hoy os explico como podemos crear nuestros propios GUIs accesibles en Windows utilizando el lenguaje de programación Rust y la...modulus.isonomia.net
Bueno, ya he sacado tutorial. Aquí os explico como programar una aplicación de #gui nativa para #windows con #rust, y #accesible. https://modulus.isonomia.net/tech/nwg-es/
Programando GUIs nativos y accesibles en Windows con Rust
Hoy os explico como podemos crear nuestros propios GUIs accesibles en Windows utilizando el lenguaje de programación Rust y la...modulus.isonomia.net
"Safety vs Performance. A case study of C, C++ and Rust sort implementations."
#cpp #rust #c #programming
https://github.com/Voultapher/sort-research-rs/blob/main/writeup/sort_safety/text.md
Feedback wanted: I made a drop-in JSON replacement that produces smaller payloads. It's for busy programmers who want a quick win. https://evanhahn.com/jsos-proof-of-concept/
It might be a bad idea! Please let me know what you think.
#JSON #compression #programming
Proof of concept: drop-in JSON replacement that produces smaller payloads
What if your JSON payloads got smaller by changing one line of code? I made a proof of concept.evanhahn.com
Announcement: All-in-one JMAP, IMAP and SMTP server written in Rust
https://github.com/stalwartlabs/mail-server
Discussions: https://discu.eu/q/https://github.com/stalwartlabs/mail-server
#programming #rustlang #selfhosted
GitHub - stalwartlabs/mail-server: Secure & Modern All-in-One Mail Server (IMAP, JMAP, SMTP) - discu.eu
Discussions and related articles for «GitHub - stalwartlabs/mail-server: Secure & Modern All-in-One Mail Server (IMAP, JMAP, SMTP)»discu.eu
Remixing: The oldest Midi composed by me in my collection!
This is my first completed piece that I wrote using Zel, the MIDI programming language! How long ago, you ask? The year, 2001! I’m pretty sure it was Decembe...YouTube
#Yaga #mod for the #Gothic #game status update.
Recently the Open Gothic reimplementation of the ZenGin engine became quiet stable which let me to wonder whether it wouldn’t be easier to port YAGA to this engine, instead of relying on the Union SDK which is basically a set of reverse-engineered classes of the original ZenGin engine. This way, we get macOS compatibility, future-proof support for future Windows releases, ETC. That means a lot of Yaga’s code base would have to be rewritten from scratch, but that’s with the benefit.
Tell me what you guys think, and let’s comment on this issue if you have some valuable insights
https://github.com/try/opengothic/issues/479
#programming #GameDev #accessibility #blind
Integrating Accessibility into Open Gothic · Issue #479 · Try/OpenGothic
Introduction Hello everyone. My name is Nuno and I have been working on the YAGA project which aims to make Gothic I, Gothic II/Gothic II NotR accessible and playable for blind players. The current...GitHub
Parallel build: tuning the performance - LibreOffice Development Blog
Here I discuss how to build LibreOffice on your system, while keeping the system responsive by tuning the parallel build.Hossein Nourikhah (LibreOffice Development Blog)
We've discussed the name squatting situation in our team meetings over the past weeks and concluded that it might be time for a crates.io policy update
Early #Perl luminary and author (#OReilly camel and llama books, many magazine articles, etc.) Randal Schwartz, a/k/a merlyn, is in dire financial straits.
He needs gainful #employment NOW of any kind, and although his #programming language of choice now is #Dart and the #Flutter framework, he’s willing to fall back on his @Perl chops.
Refer or reach him at https://linkedin.com/in/randalschwartz
Or do what I’m doing and sign up for his #Patreon at https://www.patreon.com/randalschwartz
March 21: "Foundations First: Improving C’s Viability in Introductory Programming Courses with the Debugging C Compiler" - a live talk, evidently viewable over Zoom
If you ever teach people C or learn C, this might interest you
#programming #C #teaching #EngineeringEducation #education
(This is a rant because I'm exhausted after debugging something. If you've made RegEx your whole personality, I'm sorry.) The other day I had to fix a multi-line Regular Expression (RegEx). After a few hours of peering at…
👀 Read more: https://shkspr.mobi/blog/2023/02/regular-expressions-make-me-feel-like-a-powerful-wizard-and-thats-not-a-good-thing/
⸻
#ComputerScience #programming #regex
Regular Expressions make me feel like a powerful wizard - and that's not a good thing
(This is a rant because I’m exhausted after debugging something. If you’ve made RegEx your whole personality, I’m sorry.) The other day I had to fix a multi-line Regular Expressio…Terence Eden’s Blog
https://github.com/Raibows/MLinRust
Discussions: https://discu.eu/q/https://github.com/Raibows/MLinRust
#programming #rustlang
GitHub - Raibows/MLinRust: A machine learning library in Rust from scratch.
A machine learning library in Rust from scratch. Contribute to Raibows/MLinRust development by creating an account on GitHub.GitHub