vinbiodiesel, to linux German
@vinbiodiesel@mathstodon.xyz avatar

Currently deciding which distro to install besides on my laptop. I want to switch back to Linux for (had to switch to Windows for work). I have used and in the past. Any suggestions?

aksharvarma, to programming
@aksharvarma@mathstodon.xyz avatar

Evolution of how I think of while :

  1. When I first learned "loops":

while (condition is true) {do these things, adjust things so a slightly new condition is checked}

// That's where I first saw infinite loop and how there are intentional infinite loops.

  1. A small step to move condition update out of the loop body:

for (i=0; i< N; i++) {do these things}

// After the couple of days it took to get used to them, I found them neater and closer to how I think of things.

  1. Most of the time, the i from before is indexing into something, so let's directly deal with the item being indexed:

for item in collection:
do stuff

After the few days to rewire syntax muscle memory, going back would decidedly feel like a step back.

I don't want to give up automatic (and transparent) out-of-bound checks.

  1. There are actually only about 3/4 things one does inside a loop:

map/fold/scan/filter function-to-call collection-to-traverse-through

;; Getting rid of explicit indexing was just step one.
-- After a few days/months/years, I now realize that it is more important and less buggy if I think only of the function to call (and whether I want to end up with a new (maybe pruned) collection, a single thing, or "both" (that's how I think of scans))


Alternatively, my evolution as I learned new languages idioms:
-->
or -->
-->
or --> ???

diazona, to python
@diazona@techhub.social avatar

I remember having a discussion about argument parsing in a while ago where someone recommended a small library that was kind of like argparse except that instead of returning an argparse.Namespace, it returns a fully typed object (which you define), a dataclass or something similar. Anyone know what I'm talking about? I wanted to try that library but I forgot what it is and I can't find the discussion.

sos, to programming
@sos@mastodon.gamedev.place avatar

Every single time I check out one of those upcoming shiny new programming languages that claim to be simple:

publicvoit, to programming
@publicvoit@graz.social avatar

What happens, when you join two paths in a language when the second one is an absolute one?

join("foo", "/bar")
returns "foo/bar" or "/bar"?

The wonderful @meisterluk wrote a great article about that you might want to read: https://lukas-prokop.at/articles/2024-05-03-filepath-join-behavior

I can not tell what version I'd actually prefer. There are situations where both versions would be "proper".

#C++

SergKoren, to programming
@SergKoren@writing.exchange avatar

Anyone who has ever told you that spelling and punctuation don’t matter, has never programmed.

dalonso, to ai
@dalonso@mas.to avatar

Esto va a ser un quebradero de cabeza. 👇

AI Copilots Are Changing How Coding Is Taught

Professors are shifting away from syntax and emphasizing higher-level skills

https://spectrum.ieee.org/ai-coding

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

working on the next release of TidyDensity

#R

hankg, to retrocomputing

When I decided to try to build up some development momentum by restarting the Ray Tracing Challenge but with Dart/Flutter it was a toss up between that idea and deep diving into some retro coding on an Apple II. I briefly thought, "Why not do both?" Har har har. Well, it turns out someone did just that. A ray tracer in BASIC on a ZX Spectrum. gabrielgambetta.com/zx-raytrac…

davidbisset, to webdev
@davidbisset@phpc.social avatar

Starting work on someone's legacy codebase realizing with TERROR it's not built with the framework you expected.

cpponline, to cpp
@cpponline@mastodon.social avatar

What’s New in Compiler Explorer? 2024 Update – by @mattgodbolt – C++Online 2024

https://www.youtube.com/watch?v=28Gp3TTQYp0

SergKoren, to programming
@SergKoren@writing.exchange avatar

The good news is Android Studio has come a long way since I first tried it when Android first launched. It’s matured, but still has a lot of obtueseness. At least it’s usable now.

I wish CompSci people would stop designing tools and programming language syntax.

SergKoren, to android
@SergKoren@writing.exchange avatar

Well. You know how I complain how slow XCode is? Android Studio is just as slow. It has something that goes through “Gradle project sync” on launch every time and takes as long as XCode’s “Preparing device”. I’m liking Python and its ilk more and more… Get more done.

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

Want a simple form of analysis in #R well, I got you covered.

My #R TidyDensity has a function called tidy_mcmc_sampling() that is pretty straight forward. It takes a raw vector and performs the calculation you give it over a default of 2k samples.

I hope you find it useful.

#R

Post: https://www.spsanderson.com/steveondata/posts/2024-05-03/

image/png
image/png

nulleric, to VintageOSes
@nulleric@mastodon.social avatar

Is there anyone who knows about the internals of the 3.3 finder/wm? It does some mount magic with CDROMs on inject/eject - but I cant find it documented or if there's API's to hook into that process.

dedsyn4ps3, to windows
@dedsyn4ps3@fosstodon.org avatar

The newest project is finally ready for its public debut! Inspired by a tool on #Kali for XFCE desktops, Nix-Incognito was developed to provide a similar mechanism for masking a user's GNOME desktop to better blend in with surrounding #windows PC's during #redteam engagements!

Although it's meant for use on #NixOS systems, it can easily be compiled and ran on any device running #GNOME. Support for other DE's is in the works! 🙌 🤘 😎 #rustlang #cli #programming

https://github.com/dedSyn4ps3/nix-incognito

SergKoren, to books
@SergKoren@writing.exchange avatar

Remember when you’d go into a bookstore and see walls lined with programming books? Remember when there were bookstores?

royal, to python
@royal@theres.life avatar

I think in PowerShell and can manage in Python. I want to learn Rust to the degree I can write in it directly, rather than prototyping in PowerShell and then converting.

A lot of what I do is data manipulation and analysis. (Take several CSV files as input, and output new CSV files that answer business questions based on the inputs.) I'm seriously impressed with Rust's performance here.

If you've made this transition, advice on where to begin?

firusvg, to programming
@firusvg@mastodon.social avatar

"The hard part of #programming is building and maintaining a useful mental model of a complex system. The easy part is writing code."

-- Jennifer Moore, "Losing the imitation game" #q

treyhunner, to python
@treyhunner@mastodon.social avatar

With the "else", this code looks to me a bit like a balance scale, with an "if" and an "else" on either side.

Read more 👉 https://trey.io/FlSco3

#Python #programming

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

Exciting news for R users! TidyDensity's latest update introduces util_chisquare_param_estimate(), leveraging MLE to estimate Chi-square distribution parameters like dof and ncp.

Generate a dataset with rchisq() and use util_chisquare_param_estimate() to analyze it, even without knowing the underlying distribution. Visualize results with tidy_combined_autoplot().

Try it in your next R project!

Post: https://www.spsanderson.com/steveondata/posts/2024-05-02/

#R

image/png
image/png
image/png

rladies_bergen, to programming
@rladies_bergen@hachyderm.io avatar

It's May already! Let's do something fresh and learn about how to use containers with your projects!
RSVP here:
https://www.meetup.com/rladies-bergen/events/300711368/

jameskerr, to CSS
@jameskerr@mastodon.social avatar

Trying to put gridlines on children of display: grid in a non-hacky way is simply impossible.

#css #webdev #programming

jhpratt, to rust
@jhpratt@mastodon.social avatar

In #Rust, how can I leverage the type system to enforce that one object originates from another? Even requiring the lifetime be exact ('a: 'b and 'b: 'a) wouldn't work.

Basically, I have struct Bytes&lt;'a&gt;(&amp;'a [u8]); and want to prevent someone from creating an arbitrary value that can be swapped in for the correct one. Yet at the same time it is essential that arbitrary values can be created.

Basically I'm trying to enforce my own version of provenance…

#RustLang

jhpratt,
@jhpratt@mastodon.social avatar

I believe I've done it. After a few attempts, I was able to enforce provenance while minimally affecting the API.

Implementing a trait now has a trivial amount of overhead, while end users will see no difference whatsoever from what I wanted.

To those wondering, I ended up using the closure hack along with forcing invariance. GhostCell, while neat, only appears to work within a single function.

Should I write something up about this? It's an interesting problem.

#Rust #RustLang #programming

leanpub, to Kotlin
@leanpub@mastodon.social avatar

Kotlin Coroutines http://leanpub.com/courses/leanpub/kotlin_coroutines by Marcin Moskała is the featured online course on the Leanpub homepage! https://leanpub.com

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • kavyap
  • PowerRangers
  • khanakhh
  • magazineikmin
  • hgfsjryuu7
  • rosin
  • vwfavf
  • Youngstown
  • slotface
  • everett
  • thenastyranch
  • mdbf
  • DreamBathrooms
  • Leos
  • Durango
  • ethstaker
  • osvaldo12
  • InstantRegret
  • cisconetworking
  • GTA5RPClips
  • modclub
  • ngwrru68w68
  • cubers
  • tacticalgear
  • normalnudes
  • tester
  • provamag3
  • All magazines