abucci, to ProgrammingLanguages
@abucci@buc.ci avatar

A weird thing about being 50 is that there are programming languages that I've used regularly for longer than some of the software developers I work with have been alive. I first wrote BASIC code in the 1980s. The first time I wrote an expression evaluator--a fairly standard programming puzzle or homework--was in 1990. I wrote it in Pascal for an undergraduate homework assignment. I first wrote perl in the early 1990s, when it was still perl 4.036 (5.38.2 now). I first wrote java in 1995-ish, when it was still java 1.0 (1.21 now). I first wrote scala, which I still use for most things today, in 2013-ish, when it was still scala 2.8 (3.4.0 now). At various times I've been "fluent" in 8086 assembly, BASIC, C, Pascal, perl, python, java, scala; and passable in LISP/Scheme, Prolog, old school Mathematica, (early days) Objective C, matlab/octave, and R. I've written a few lines of Fortran and more than a few lines of COBOL that I ran in a production system once. I could probably write a bit of Haskell if pressed but for some reason I really dislike its syntax so I've never been enthusiastic about learning it well. I've experimented with Clean, Flix, Curry, Unison, Factor, and Joy and learned bits and pieces of each of those. I'm trying to decide whether I should try learning Idris, Agda, and/or Lean. I'm pretty sure I'm forgetting a few languages. Bit of 6502 assembly long ago. Bit of Unix/Linux shell scripting languages (old enough to have lived and breathed tcsh before switching to bash; I use fish now mostly).

When I say passable: in graduate school I wrote a Prolog interpreter in java (including parsing source code or REPL input), within which I could run the classic examples like append or (very simple) symbolic differentiation/integration. As an undergraduate I wrote a Mathematica program to solve the word recognition problem for context-free formal languages. But I'd need some study time to be able to write these languages again.

I don't know what the hell prompted me to reminisce about programming languages. I hope it doesn't come off as a humblebrag but rather like old guy spinning yarns. I think I've been through so many because I'm never quite happy with any one of them and because I've had a varied career that started when I was pretty young.

I guess I'm also half hoping to find people on here who have similar interests so I'm going to riddle this post with hashtags:

#C #R

dcz, to rust
@dcz@fosstodon.org avatar

A part of that doesn't get mentioned but is a ridiculous quality of life boon:

dbg!()

Just #[derive(Debug)] on a struct and print it. Suddenly you get insight into what's going on. Very rarely do you need to write your own print.

Insert a dbg in the middle of anything

let diffi = debug!(diffs).iter();

and you get a message with line number and the name of variable:

[src/lib.rs:192:19] diffs = [16, 86, 11]

Not even has that!

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

My #R has been submitted to CRAN for version 1.4.0

Lots of good stuff in this one!

#R

https://github.com/spsanderson/TidyDensity/blob/master/NEWS.md

vingtroiseize, to demoscene
@vingtroiseize@mastodon.world avatar

Whoever did this, must be immediately hired him into a demomaker group!

#pharmacie 🇫🇷 #drugstore #demoscene #Tube #coding #coder #demo

video/mp4

beanjbunny, to gamedev
@beanjbunny@nerdculture.de avatar

Unbelievably this is proof that I fixed this bug

dusthillperson, to programming
@dusthillperson@mastodon.me.uk avatar

I've released 'Folder Size Analysis', a tool for visualising the size of various items in your filesystem, written in Tcl/Tk,
tested on Linux, Mac OS, and Windows

https://github.com/dusthillresident/FolderSizeAnalysis

https://wiki.tcl-lang.org/page/Folder+Size+Analysis

beanjbunny, to gamedev
@beanjbunny@nerdculture.de avatar

me on my way to tell discord I busted my code again

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

Just finished a hair over 20 issues for my #R package 📦 for

video/mp4

stevensanderson, to random
@stevensanderson@mstdn.social avatar

Master data manipulation in R by dropping unnecessary columns from data frames using simple methods like the $ operator, subset() function, and dplyr package's select() function.

Try these techniques on your own datasets for efficient data cleaning and analysis!

Post: https://www.spsanderson.com/steveondata/posts/2024-04-25/

#R

hayjay, to Java German
@hayjay@social.tchncs.de avatar

GRRRR!

stevensanderson, to programming
@stevensanderson@mstdn.social avatar
syntaxseed, to php
@syntaxseed@phpc.social avatar

Today I learned that a random shuffle of an array/list, where no element is in the same spot as it started is called a "derangement".

I had to implement this for a project creating picture->word matching worksheets where I didn't want the match to be on the same row.

It was a nice chuckle to think "this array is deranged." 🤣

doesn't have a built in function to do this kind of shuffle.

useR_conf, to statistics
@useR_conf@mastodon.social avatar

useR! 2024, the global R user conference, will be taking place in Salzburg, Austria (as well as virtually) in July 2024. We have a full lineup of giants in the field of data science. Thank you Maëlle Salmon for being a part of the conference!

Maëlle Salmon, with a PhD in statistics, is a Research Software Engineer and blogger.

Venue: Wyndham Grand Salzburg Conference Centre
Dates: Monday 8th to Thursday 11th July 2024
Website: https://events.linuxfoundation.org/user/

bits, to programming
@bits@mastodon.online avatar

My definition of an expert in any field is a person who knows enough about what’s really going on to be scared.

-- P. J. Plauger, Computer Language, March 1983

libreoffice, to random
@libreoffice@fosstodon.org avatar

Improve your and knowledge – join the project! That's what Kira Tubo did: https://blog.documentfoundation.org/blog/2024/04/22/community-member-monday-kira-tubo/

Neurostroke, to Software
@Neurostroke@mastodon.social avatar
kaiserkiwi, to random
@kaiserkiwi@corteximplant.com avatar

I really like this post. Over the past 17 (oof nearly 18) years I've pretty much seen every archetype that is mentioned here.

And also had the situation multiple times where the management loved the negatively framed types while the other devs were annoyed.

https://www.simplethread.com/the-10x-programmer-myth/

Mastering the Challenges of Coding & Programming Cacultor, Free Online Calculator & Useful Tools (www.quickpickdeal.com)

At Quick Pick Deal, we ignite curiosity in the exciting realms of coding, programming, math, physics, and electrical engineering. We empower students and developers by demystifying complex subjects like power usage and energy consumption. Through engaging resources and insightful content, we equip learners with the knowledge to...

kaiserkiwi, to webdev
@kaiserkiwi@corteximplant.com avatar

Wanted to get some low hanging fruit tickets done for Questlog. Well I also decided to create more robust testing and now I finished the first task after 3 minutes and fighting Pest for 27 minutes now.

Why in all seven hells is Game::factory()->count(5)->create(); not creating 5 games? It's always 2 or 3. Never 5. This is absolutely infuriating…

I just wanted to get my list shorter and don't break stuff while I do.

The fun part? Also creating all 5 games manually fails. Without any log or something like that…

#WebDev #PHP #Pest #Laravel #Coding

kaiserkiwi,
@kaiserkiwi@corteximplant.com avatar

Oof. This was a really stupid error… My factory generated games with different categories. Main Game, DLC/AddOn and Expansion.

But the view I was testing filtered games by Main Game only… So by chance it was extremely unlikely that every game is a Main Game and so the count never was 5.

If feel really dumb right now.

#WebDev #PHP #Pest #Laravel #Coding

kaiserkiwi,
@kaiserkiwi@corteximplant.com avatar

I'm glad I marked some tasks as "low hanging fruit" while I had no time or energy to work on Questlog.

This way I was able to complete 5 small tasks, while my child slept, that were in my head for a long time, as I didn't need to search for issues but had a list I just could work through.

seav, (edited ) to random
@seav@en.osm.town avatar

I’ve finished doing perspective corrections on 250 photos of NHCP ! 🎉 I have been doing this sort of photo editing on and off since 2017 and this is in support of the historical markers @wikidata /Commons project I and a few others are working on (e.g., my Panandâ mobile app).

You can explore all 250 photos in this Commons category page: https://commons.wikimedia.org/wiki/Category:Perspective_corrections_by_Eugene_Alvin_Villar

If you’re curious how I am doing this, a slightly outdated process is on my blog: https://www.vaes9.com/posts/perspective_correction

seav,
@seav@en.osm.town avatar

Generating the mosaic image in my previous toot was an interesting micro-coding project. I conjectured but didn't expect that it was possible to arrange photos of varying sizes into a near square. I just used a naïve randomized heuristic to essentially solve a variation of the bin packing problem¹ and the results turned out to be good enough™ though obviously not rigorously optimal. Thanks also to the MediaWiki Action API!

¹ https://en.wikipedia.org/wiki/Bin_packing_problem

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

🔍 How to Extract Last Row in Data Frame in R

Base R
Use nrow(my_df) to get the total rows.
Extract the last row with indexing: my_df[nrow(my_df), ].

dplyr
Use tail(my_df, 1) to get the last row.

data.table
Convert to data.table: my_dt <- as.data.table(my_df).
Get last row using .N: my_dt[.N].

Now you know three ways to extract the last row. Try it yourself! 📊

#R

Post: https://www.spsanderson.com/steveondata/posts/2024-04-18/

liztai, to python
@liztai@hachyderm.io avatar

The one reason why I want to learn is so that I could program my computer to copy my social media posts and just stuff them into my Daily Note automatically. Ambitious or impossible? lol

collin, to random
@collin@ruby.social avatar

Playing with the JetBrains AI thing in their IDEs. The chat seems roughly as good as Copilot for normal rubber ducking.

The completion is different, but close. It operates on a line by line basis, so it kind of works like better autocomplete. It won't do the thing where it generates a whole method for you unless you ask it to. I might grow to prefer that.

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