I've seen so many IT projects, associations, communities of minorities using discord in lieu of wikis, forums, documentation, etc. I personally know a marginalized community with a dire need of visibility, information and stuff that has everything locked behind their discord server and everything is about to be lost. It's both extremely sad and a huge "told you so years ago"
Camille
Sounds like an old proverb lmao
Oui bah on est Mardi quoi
That's clearly AuDHD
Musk is also fucking white. Not that they didn't deport poor white people too. But the focus has long been on POC.
Tbh it should have been abolished right from the start, when the focus was on getting POC out of the US. It feels so late now
Just finished season one. It's so precious, so important for many people. I had many good cries. 10/10 will rewatch
Back when I was a student, we had to implement the following projects to validate and I think they are a really nice set of training projects for C (memory management, handling your own types, algorithms and off-by-one traps):
- a basic implementation of
diff - a fully functional hashmap (subproject of diff actually)
I personally wrote the followings too:
- a program to compress/decompress archives using only the LZ77 algorithm
- math expression evaluator (i.e. a basic interpreter)
- a basic garbage collector (mark&sweep, mark©, whatever grinds your gears)
If you are already a competent developer in other languages, these should be reasonable projects. The difficulty lies in doing them in C. For the hashmap, the evaluator and the archiver, you have to correctly manage your data and memory. this makes them excellent projects for learning what makes C... C. For the garbage collector... well... you are the memory manager. Basic GC algorithms are easy to understand but what you want to learn here is the actual management of the memory. See it as a more advanced project if you want to really grok dirty C.
Most importantly: have fun :)
What's the problem with Skouirrelle? :^)
Go
Well... I was about to dive into bin packing and stuff. I started by pruning the obvious candidates (those which can fit all the shapes one next to the other, without more computation) so save CPU time for the real stuff. I ran my code on the real input just to see and... what to do mean there are no candidate left? I write the number of obvious boys into the website's input box, just to check and... Ah. I understand why people on reddit said they felt dirty x)
Anyway the code:
day12.go
package main
import (
"aoc/utils"
"fmt"
"slices"
"strconv"
"strings"
)
type shape [3][3]bool
func parseShape(input chan string) shape {
// remove the header
_ = <-input
sh := shape{}
idx := 0
for line := range input {
if line == "" {
break
}
row := [3]bool{}
for idx, c := range []rune(line) {
if c == '#' {
row[idx] = true
}
}
sh[idx] = row
idx++
}
return sh
}
func (sh shape) usedArea() int {
sum := 0
for _, row := range sh {
for _, cell := range row {
if cell {
sum++
}
}
}
return sum
}
type regionConstraints struct {
width, height int
shapes []int
}
func parseRegionConstraint(line string) (rc regionConstraints) {
parts := strings.Split(line, ":")
dims := strings.Split(parts[0], "x")
rc.width, _ = strconv.Atoi(dims[0])
rc.height, _ = strconv.Atoi(dims[1])
shapes := strings.Fields(parts[1])
rc.shapes = make([]int, len(shapes))
for idx, shape := range shapes {
rc.shapes[idx], _ = strconv.Atoi(shape)
}
return rc
}
type problem struct {
shapes []shape
constraints []regionConstraints
}
func newProblem(input chan string) problem {
shapes := make([]shape, 6)
for idx := range 6 {
shapes[idx] = parseShape(input)
}
regionConstraints := []regionConstraints{}
for line := range input {
rc := parseRegionConstraint(line)
regionConstraints = append(regionConstraints, rc)
}
return problem{shapes, regionConstraints}
}
func (pb *problem) pruneRegionsTooSmall() {
toPrune := []int{}
for idx, rc := range pb.constraints {
availableArea := rc.height * rc.width
neededArea := 0
for shapeId, count := range rc.shapes {
neededArea += pb.shapes[shapeId].usedArea() * count
if neededArea > availableArea {
toPrune = append(toPrune, idx)
break
}
}
}
slices.Reverse(toPrune)
for _, idx := range toPrune {
pb.constraints = slices.Delete(pb.constraints, idx, idx+1)
}
}
func (pb *problem) pruneObviousCandidates() int {
toPrune := []int{}
for idx, rc := range pb.constraints {
maxShapePlacements := (rc.width / 3) * (rc.height / 3)
shapeCount := 0
for _, count := range rc.shapes {
shapeCount += count
}
if maxShapePlacements >= shapeCount {
toPrune = append(toPrune, idx)
}
}
slices.Reverse(toPrune)
for _, idx := range toPrune {
pb.constraints = slices.Delete(pb.constraints, idx, idx+1)
}
return len(toPrune)
}
func stepOne(input chan string) (int, error) {
pb := newProblem(input)
pb.pruneRegionsTooSmall()
obviousCandidates := pb.pruneObviousCandidates()
fmt.Println(pb)
fmt.Println(obviousCandidates)
return 0, nil
}
func stepTwo(input chan string) (int, error) {
return 0, nil
}
func main() {
input, err := utils.DownloadTodaysInputFile()
if err != nil {
_ = fmt.Errorf("error fetching the input: %v", err)
}
utils.RunStep(utils.ONE, input, stepOne)
utils.RunStep(utils.TWO, input, stepTwo)
}
JEAN-BAPTISTE
EMMANUEL
ZORG

La France qui jalouse la montée du fascisme aux USA et qui a décidé de speedrun nazi 100% all bosses all items.
Après, y a un monde où ils vont cramer tellement de cartouches nazies complètement dingues si vite que ça va dégoûter la masse avant 2027. Laissez-moi rêver un peu