programming

301 readers
1 users here now

  1. Post about programming, interesting repos, learning to program, etc. Let's try to keep free software posts in the c/libre comm unless the post is about the programming/is to the repo.

  2. Do not doxx yourself by posting a repo that is yours and in any way leads to your personally identifying information. Use reports if necessary to alert mods to a potential doxxing.

  3. Be kind, keep struggle sessions focused on the topic of programming.

founded 2 years ago
MODERATORS
1
2
3
 
 

I've been using a package called pyvis for a while to help visualize general graph data, but it's been pretty limited in terms of exposed API for vis.js (which is what it renders in) so I've been working on a more general full featured wrapper in Python that uses a fast graph library backend.

My test project is to visualize the repository as an interactive graph. It builds the html template in under a second right now and I'm planning on trying to make it something you can use to generate interactive repo graphs with.

It's still very WIP, but I think it's fun so I wanted to share.

Also, you can double click any node to have it open the source on GitHub. My goal is to make it host agnostic so you can just slap a repo url in there and it'll generate a graph with properly formatted links. I've got all the components exposed though, so you can manipulate how the link is generated as needed.

4
5
6
7
1
Leave Me Behind (androidessence.com)
submitted 2 weeks ago by git@hexbear.net to c/programming@hexbear.net
8
9
10
11
12
1
Prolog Basics Explained with Pokémon (unplannedobsolescence.com)
submitted 1 month ago* (last edited 1 month ago) by AernaLingus@hexbear.net to c/programming@hexbear.net
 
 

This blog post introduces the basics of Prolog, then motivates and describes a project the author created where they built a Prolog database that allows them to easily make incredibly specific queries about Pokémon (which would be unwieldy in a relational database query language like SQL). For an idea of how powerful it is, here's one which "finds all the Special moves that Tornadus learns which are super-effective against any member of Justin’s team" (the Prolog database was set up to help the author in planning their teams for a Pokémon draft tournament):

?- justin(Target), learns(tornadus, Move), super_effective_move(Move, Target), move_category(Move, special).
   Target = charizardmegay, Move = chillingwater
;  Target = terapagosterastal, Move = focusblast
;  Target = alomomola, Move = grassknot
;  Target = scizor, Move = heatwave
;  Target = scizor, Move = incinerate
;  Target = runerigus, Move = chillingwater
;  Target = runerigus, Move = darkpulse
;  Target = runerigus, Move = grassknot
;  Target = runerigus, Move = icywind
;  Target = screamtail, Move = sludgebomb
;  Target = screamtail, Move = sludgewave
;  Target = trapinch, Move = chillingwater
;  Target = trapinch, Move = grassknot
;  Target = trapinch, Move = icywind
;  false.
?-
13
14
15
1
Programming Sucks (www.stilldrinking.org)
submitted 1 month ago by git@hexbear.net to c/programming@hexbear.net
16
17
 
 

a laptop, then ported the same algorithm to a Commodore 64.

Very cool stuff. In an age of throwing ungodly amounts of compute at LLMs, it's nice to see someone approach a problem with the goal of making it as lightweight as possible. Like the author, the extreme resource limitations are one of the reasons that I love retro tech, since they breed ingenious solutions.

18
19
20
21
22
23
24
25
view more: next ›