@ace@lemmy.ananace.dev avatar

ace

@ace@lemmy.ananace.dev

Just another Swedish programming sysadmin person.
Coffee is always the answer.

And beware my spaghet.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

ace,
@ace@lemmy.ananace.dev avatar

2D grids and parsing data from them in all manner of interesting ways is a real AoC staple.

I’m still hoping to be met with a problem at some point which can be solved by handling it as a type of funge program.

ace,
@ace@lemmy.ananace.dev avatar

Yep, funge has been used to describe any kind of multi-dimensional programming language - often with self-modifying code, I’ve personally found both 3D and 4D funge languages.

There’s just something with the whole concept that amuses me, I’ve been trying to build some kind of funge-style programming puzzle game for a while now, but haven’t figured out a good hook to take it past being just a PoC yet.

ace,
@ace@lemmy.ananace.dev avatar

I get the feeling that I should include some default types for handling 2D maps in my boilerplate, it’s a very recurring problem in AoC after all.

My solution is reasonably simplistic - and therefore also a bit slow, but the design meant I could do part 2 with just a few extra lines of code on the already processed data, here’s the functional part of it; (I push the previous days solution as part of my workflow for starting with the current day so the full code won’t be up until tomorrow) :::spoiler Ruby The code has been compressed for brevity.


<span style="color:#323232;">Point </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#0086b3;">Struct</span><span style="color:#323232;">.</span><span style="font-weight:bold;color:#a71d5d;">new</span><span style="color:#323232;">(</span><span style="color:#183691;">'Point'</span><span style="color:#323232;">, </span><span style="color:#0086b3;">:x</span><span style="color:#323232;">, </span><span style="color:#0086b3;">:y</span><span style="color:#323232;">)
</span><span style="color:#323232;">PartNumber </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#0086b3;">Struct</span><span style="color:#323232;">.</span><span style="font-weight:bold;color:#a71d5d;">new</span><span style="color:#323232;">(</span><span style="color:#183691;">'PartNumber'</span><span style="color:#323232;">, </span><span style="color:#0086b3;">:number</span><span style="color:#323232;">, </span><span style="color:#0086b3;">:adjacent</span><span style="color:#323232;">) </span><span style="font-weight:bold;color:#a71d5d;">do
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">def </span><span style="font-weight:bold;color:#795da3;">adjacent?</span><span style="color:#323232;">(to); adjacent.</span><span style="color:#62a35c;">include?</span><span style="color:#323232;">(to); </span><span style="font-weight:bold;color:#a71d5d;">end
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">def </span><span style="font-weight:bold;color:#795da3;">irrelevant?</span><span style="color:#323232;">; adjacent.empty?; </span><span style="font-weight:bold;color:#a71d5d;">end
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">def </span><span style="font-weight:bold;color:#795da3;">to_i</span><span style="color:#323232;">; number; </span><span style="font-weight:bold;color:#a71d5d;">end
</span><span style="font-weight:bold;color:#a71d5d;">end
</span><span style="color:#323232;">
</span><span style="font-weight:bold;color:#a71d5d;">class </span><span style="color:#0086b3;">Implementation
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">def </span><span style="font-weight:bold;color:#795da3;">initialize
</span><span style="color:#323232;">    @map </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#323232;">[]; @dim </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#323232;">{ </span><span style="color:#0086b3;">width: 0</span><span style="color:#323232;">, </span><span style="color:#0086b3;">height: 0 </span><span style="color:#323232;">}; @symbols </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#323232;">[]; @numbers </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#323232;">[]
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">end
</span><span style="color:#323232;">
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">def </span><span style="font-weight:bold;color:#795da3;">input</span><span style="color:#323232;">(line)
</span><span style="color:#323232;">    @dim[</span><span style="color:#0086b3;">:width</span><span style="color:#323232;">] </span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#323232;"> line.size; @dim[</span><span style="color:#0086b3;">:height</span><span style="color:#323232;">] </span><span style="font-weight:bold;color:#a71d5d;">+= </span><span style="color:#0086b3;">1
</span><span style="color:#323232;">    @map </span><span style="font-weight:bold;color:#a71d5d;">+=</span><span style="color:#323232;"> line.chars
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">end
</span><span style="color:#323232;">
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">def </span><span style="font-weight:bold;color:#795da3;">calc
</span><span style="color:#323232;">    </span><span style="font-weight:bold;color:#a71d5d;">for</span><span style="color:#323232;"> y </span><span style="font-weight:bold;color:#a71d5d;">in </span><span style="color:#323232;">(</span><span style="color:#0086b3;">0</span><span style="font-weight:bold;color:#a71d5d;">..</span><span style="color:#323232;">@dim[</span><span style="color:#0086b3;">:height</span><span style="color:#323232;">]</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#0086b3;">1</span><span style="color:#323232;">) </span><span style="font-weight:bold;color:#a71d5d;">do
</span><span style="color:#323232;">      </span><span style="font-weight:bold;color:#a71d5d;">for</span><span style="color:#323232;"> x </span><span style="font-weight:bold;color:#a71d5d;">in </span><span style="color:#323232;">(</span><span style="color:#0086b3;">0</span><span style="font-weight:bold;color:#a71d5d;">..</span><span style="color:#323232;">@dim[</span><span style="color:#0086b3;">:width</span><span style="color:#323232;">]</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#0086b3;">1</span><span style="color:#323232;">) </span><span style="font-weight:bold;color:#a71d5d;">do
</span><span style="color:#323232;">        chr </span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#323232;"> get(x, y); </span><span style="font-weight:bold;color:#a71d5d;">next if</span><span style="color:#323232;"> chr </span><span style="font-weight:bold;color:#a71d5d;">=~ </span><span style="color:#183691;">/</span><span style="color:#0086b3;">d</span><span style="color:#183691;">/ </span><span style="font-weight:bold;color:#a71d5d;">||</span><span style="color:#323232;"> chr </span><span style="font-weight:bold;color:#a71d5d;">== </span><span style="color:#183691;">'.'
</span><span style="color:#323232;">        @symbols </span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">lt;</span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">lt; </span><span style="color:#0086b3;">Point</span><span style="color:#323232;">.</span><span style="font-weight:bold;color:#a71d5d;">new</span><span style="color:#323232;">(x, y)
</span><span style="color:#323232;">      </span><span style="font-weight:bold;color:#a71d5d;">end
</span><span style="color:#323232;">    </span><span style="font-weight:bold;color:#a71d5d;">end
</span><span style="color:#323232;">
</span><span style="color:#323232;">    </span><span style="font-weight:bold;color:#a71d5d;">for</span><span style="color:#323232;"> y </span><span style="font-weight:bold;color:#a71d5d;">in </span><span style="color:#323232;">(</span><span style="color:#0086b3;">0</span><span style="font-weight:bold;color:#a71d5d;">..</span><span style="color:#323232;">@dim[</span><span style="color:#0086b3;">:height</span><span style="color:#323232;">]</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#0086b3;">1</span><span style="color:#323232;">) </span><span style="font-weight:bold;color:#a71d5d;">do
</span><span style="color:#323232;">      buf </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#183691;">""</span><span style="color:#323232;">; adj </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#323232;">[]
</span><span style="color:#323232;">      </span><span style="font-weight:bold;color:#a71d5d;">for</span><span style="color:#323232;"> x </span><span style="font-weight:bold;color:#a71d5d;">in </span><span style="color:#323232;">(</span><span style="color:#0086b3;">0</span><span style="font-weight:bold;color:#a71d5d;">..</span><span style="color:#323232;">@dim[</span><span style="color:#0086b3;">:width</span><span style="color:#323232;">]) </span><span style="font-weight:bold;color:#a71d5d;">do </span><span style="font-style:italic;color:#969896;"># Going one over, to fake a non-number as an end char on all lines
</span><span style="color:#323232;">        chr </span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#323232;"> get(x, y)
</span><span style="color:#323232;">        </span><span style="font-weight:bold;color:#a71d5d;">if</span><span style="color:#323232;"> chr </span><span style="font-weight:bold;color:#a71d5d;">=~ </span><span style="color:#183691;">/</span><span style="color:#0086b3;">d</span><span style="color:#183691;">/
</span><span style="color:#323232;">          buf </span><span style="font-weight:bold;color:#a71d5d;">+=</span><span style="color:#323232;"> chr
</span><span style="color:#323232;">          (</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#0086b3;">1</span><span style="font-weight:bold;color:#a71d5d;">..</span><span style="color:#0086b3;">1</span><span style="color:#323232;">).each </span><span style="font-weight:bold;color:#a71d5d;">do </span><span style="color:#323232;">|adj_x|
</span><span style="color:#323232;">            (</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#0086b3;">1</span><span style="font-weight:bold;color:#a71d5d;">..</span><span style="color:#0086b3;">1</span><span style="color:#323232;">).each </span><span style="font-weight:bold;color:#a71d5d;">do </span><span style="color:#323232;">|adj_y|
</span><span style="color:#323232;">              </span><span style="font-weight:bold;color:#a71d5d;">next if</span><span style="color:#323232;"> adj_x </span><span style="font-weight:bold;color:#a71d5d;">== </span><span style="color:#0086b3;">0 </span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">amp;</span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">amp; adj_y </span><span style="font-weight:bold;color:#a71d5d;">== </span><span style="color:#0086b3;">0 </span><span style="font-weight:bold;color:#a71d5d;">||
</span><span style="color:#323232;">                (x </span><span style="font-weight:bold;color:#a71d5d;">+</span><span style="color:#323232;"> adj_x </span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">lt; </span><span style="color:#0086b3;">0</span><span style="color:#323232;">) </span><span style="font-weight:bold;color:#a71d5d;">|| </span><span style="color:#323232;">(x </span><span style="font-weight:bold;color:#a71d5d;">+</span><span style="color:#323232;"> adj_x </span><span style="font-weight:bold;color:#a71d5d;">>= </span><span style="color:#323232;">@dim[</span><span style="color:#0086b3;">:width</span><span style="color:#323232;">]) </span><span style="font-weight:bold;color:#a71d5d;">||
</span><span style="color:#323232;">                (y </span><span style="font-weight:bold;color:#a71d5d;">+</span><span style="color:#323232;"> adj_y </span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">lt; </span><span style="color:#0086b3;">0</span><span style="color:#323232;">) </span><span style="font-weight:bold;color:#a71d5d;">|| </span><span style="color:#323232;">(y </span><span style="font-weight:bold;color:#a71d5d;">+</span><span style="color:#323232;"> adj_y </span><span style="font-weight:bold;color:#a71d5d;">>= </span><span style="color:#323232;">@dim[</span><span style="color:#0086b3;">:height</span><span style="color:#323232;">])
</span><span style="color:#323232;">              sym </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#0086b3;">Point</span><span style="color:#323232;">.</span><span style="font-weight:bold;color:#a71d5d;">new</span><span style="color:#323232;">(x </span><span style="font-weight:bold;color:#a71d5d;">+</span><span style="color:#323232;"> adj_x, y </span><span style="font-weight:bold;color:#a71d5d;">+</span><span style="color:#323232;"> adj_y)
</span><span style="color:#323232;">              adj </span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">lt;</span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">lt; sym </span><span style="font-weight:bold;color:#a71d5d;">if </span><span style="color:#323232;">@symbols.any? sym
</span><span style="color:#323232;">            </span><span style="font-weight:bold;color:#a71d5d;">end
</span><span style="color:#323232;">          </span><span style="font-weight:bold;color:#a71d5d;">end
</span><span style="color:#323232;">        </span><span style="font-weight:bold;color:#a71d5d;">elsif !</span><span style="color:#323232;">buf.empty?
</span><span style="color:#323232;">          @numbers </span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">lt;</span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">lt; </span><span style="color:#0086b3;">PartNumber</span><span style="color:#323232;">.</span><span style="font-weight:bold;color:#a71d5d;">new</span><span style="color:#323232;">(buf.</span><span style="color:#62a35c;">to_i</span><span style="color:#323232;">, adj)
</span><span style="color:#323232;">          buf </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#183691;">""</span><span style="color:#323232;">; adj </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#323232;">[]
</span><span style="color:#323232;">        </span><span style="font-weight:bold;color:#a71d5d;">end
</span><span style="color:#323232;">      </span><span style="font-weight:bold;color:#a71d5d;">end
</span><span style="color:#323232;">    </span><span style="font-weight:bold;color:#a71d5d;">end
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">end
</span><span style="color:#323232;">
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">def </span><span style="font-weight:bold;color:#795da3;">output
</span><span style="color:#323232;">    part1 </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#323232;">@numbers.reject(</span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">amp;</span><span style="color:#0086b3;">:irrelevant?</span><span style="color:#323232;">).map(</span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">amp;</span><span style="color:#0086b3;">:to_i</span><span style="color:#323232;">).sum
</span><span style="color:#323232;">    </span><span style="color:#62a35c;">puts </span><span style="color:#183691;">"Part 1:"</span><span style="color:#323232;">, part1
</span><span style="color:#323232;">
</span><span style="color:#323232;">    gears </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#323232;">@symbols.</span><span style="color:#62a35c;">select </span><span style="font-weight:bold;color:#a71d5d;">do </span><span style="color:#323232;">|sym|
</span><span style="color:#323232;">      </span><span style="font-weight:bold;color:#a71d5d;">next unless</span><span style="color:#323232;"> get(sym) </span><span style="font-weight:bold;color:#a71d5d;">== </span><span style="color:#183691;">'*'
</span><span style="color:#323232;">      </span><span style="font-weight:bold;color:#a71d5d;">next unless </span><span style="color:#323232;">@numbers.</span><span style="color:#62a35c;">select </span><span style="color:#323232;">{ |num| num.adjacent? sym }.size </span><span style="font-weight:bold;color:#a71d5d;">== </span><span style="color:#0086b3;">2
</span><span style="color:#323232;">      </span><span style="color:#0086b3;">true
</span><span style="color:#323232;">    </span><span style="font-weight:bold;color:#a71d5d;">end
</span><span style="color:#323232;">    part2 </span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#323232;"> gears.sum { |gear| @numbers.</span><span style="color:#62a35c;">select </span><span style="color:#323232;">{ |num| num.adjacent? gear }.map(</span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">amp;</span><span style="color:#0086b3;">:to_i</span><span style="color:#323232;">).inject(</span><span style="color:#0086b3;">:*</span><span style="color:#323232;">) }
</span><span style="color:#323232;">
</span><span style="color:#323232;">    </span><span style="color:#62a35c;">puts </span><span style="color:#183691;">"Part 2:"</span><span style="color:#323232;">, part2
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">end
</span><span style="color:#323232;">
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">private
</span><span style="color:#323232;">
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">def </span><span style="font-weight:bold;color:#795da3;">get</span><span style="color:#323232;">(x, y </span><span style="font-weight:bold;color:#a71d5d;">= -</span><span style="color:#0086b3;">1</span><span style="color:#323232;">)
</span><span style="color:#323232;">    y </span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#323232;"> x.y </span><span style="font-weight:bold;color:#a71d5d;">if</span><span style="color:#323232;"> x.</span><span style="color:#62a35c;">is_a?</span><span style="color:#323232;">(</span><span style="color:#0086b3;">Point</span><span style="color:#323232;">)
</span><span style="color:#323232;">    x </span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#323232;"> x.x </span><span style="font-weight:bold;color:#a71d5d;">if</span><span style="color:#323232;"> x.</span><span style="color:#62a35c;">is_a?</span><span style="color:#323232;">(</span><span style="color:#0086b3;">Point</span><span style="color:#323232;">)
</span><span style="color:#323232;">    </span><span style="font-weight:bold;color:#a71d5d;">return unless </span><span style="color:#323232;">(</span><span style="color:#0086b3;">0</span><span style="font-weight:bold;color:#a71d5d;">..</span><span style="color:#323232;">@dim[</span><span style="color:#0086b3;">:width</span><span style="color:#323232;">]</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#0086b3;">1</span><span style="color:#323232;">).</span><span style="color:#62a35c;">include?</span><span style="color:#323232;">(x) </span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">amp;</span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">amp; (</span><span style="color:#0086b3;">0</span><span style="font-weight:bold;color:#a71d5d;">..</span><span style="color:#323232;">@dim[</span><span style="color:#0086b3;">:height</span><span style="color:#323232;">]</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#0086b3;">1</span><span style="color:#323232;">).</span><span style="color:#62a35c;">include?</span><span style="color:#323232;">(y)
</span><span style="color:#323232;">
</span><span style="color:#323232;">    @map[y </span><span style="font-weight:bold;color:#a71d5d;">* </span><span style="color:#323232;">@dim[</span><span style="color:#0086b3;">:width</span><span style="color:#323232;">] </span><span style="font-weight:bold;color:#a71d5d;">+</span><span style="color:#323232;"> x </span><span style="font-weight:bold;color:#a71d5d;">% </span><span style="color:#323232;">@dim[</span><span style="color:#0086b3;">:width</span><span style="color:#323232;">]]
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">end
</span><span style="font-weight:bold;color:#a71d5d;">end
</span>

:::

ace,
@ace@lemmy.ananace.dev avatar

Amusingly enough, one of the HP laptops I used in that era actually worked better with ndiswrapper somehow.

It was the only one to do so though.

ace,
@ace@lemmy.ananace.dev avatar

“It’s a ndiswrapper miracle!” - a statement only uttered by the completely deranged.

ace,
@ace@lemmy.ananace.dev avatar

Definitely the third / middle left, but the bottom right definitely gets second place to me.
Not a major fan of too abstract art, and those are just both so serene.

ace,
@ace@lemmy.ananace.dev avatar

People love to complain about CMake, often with valid complaints as well. But it - to this day - remains the only build system where I’ll actually trust a project when they say they are cross-platform.

Being the Windows maintainer for OpenMW, it used to be absolute hell back a decade and half ago when an indirect dependency changed - and used something like SCons or Premake while claiming to be “cross-platform”, used to be that I had to write my own build solutions for Windows since it was all hardcoded against Linux paths and libraries.

CMake might not be the coolest, most hip, build system, but it delivers on actually letting you build your software regardless of platform. So it remains my go-to for whenever I need to actually build something that’s supposed to be used.
For personal things I still often hack together a couple of Makefiles though, it’s just a lot faster to do.

ace,
@ace@lemmy.ananace.dev avatar

Have a snippet of Ruby, something I hacked together as part of a solution during the WFH morning meeting;


<span style="font-weight:bold;color:#a71d5d;">class </span><span style="color:#0086b3;">String
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">def </span><span style="font-weight:bold;color:#795da3;">to_numberstring</span><span style="color:#323232;">(digits_only: </span><span style="color:#0086b3;">false</span><span style="color:#323232;">)
</span><span style="color:#323232;">    tokens </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#323232;">{ 
</span><span style="color:#323232;">      </span><span style="color:#0086b3;">one: 1</span><span style="color:#323232;">, </span><span style="color:#0086b3;">two: 2</span><span style="color:#323232;">, </span><span style="color:#0086b3;">three: 3</span><span style="color:#323232;">,
</span><span style="color:#323232;">      </span><span style="color:#0086b3;">four: 4</span><span style="color:#323232;">, </span><span style="color:#0086b3;">five: 5</span><span style="color:#323232;">, </span><span style="color:#0086b3;">six: 6</span><span style="color:#323232;">,
</span><span style="color:#323232;">      </span><span style="color:#0086b3;">seven: 7</span><span style="color:#323232;">, </span><span style="color:#0086b3;">eight: 8</span><span style="color:#323232;">, </span><span style="color:#0086b3;">nine: 9
</span><span style="color:#323232;">    }.</span><span style="color:#62a35c;">freeze
</span><span style="color:#323232;">    ret </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#183691;">""
</span><span style="color:#323232;">
</span><span style="color:#323232;">    i </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#0086b3;">0
</span><span style="color:#323232;">    </span><span style="font-weight:bold;color:#a71d5d;">loop do
</span><span style="color:#323232;">      </span><span style="font-weight:bold;color:#a71d5d;">if </span><span style="color:#ed6a43;">self</span><span style="color:#323232;">[i] </span><span style="font-weight:bold;color:#a71d5d;">=~ </span><span style="color:#183691;">/</span><span style="color:#0086b3;">d</span><span style="color:#183691;">/
</span><span style="color:#323232;">        ret </span><span style="font-weight:bold;color:#a71d5d;">+= </span><span style="color:#ed6a43;">self</span><span style="color:#323232;">[i]
</span><span style="color:#323232;">      </span><span style="font-weight:bold;color:#a71d5d;">elsif !</span><span style="color:#323232;">digits_only
</span><span style="color:#323232;">        tok </span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#323232;"> tokens.find { |k, _| </span><span style="color:#ed6a43;">self</span><span style="color:#323232;">[i, k.size] </span><span style="font-weight:bold;color:#a71d5d;">==</span><span style="color:#323232;"> k.</span><span style="color:#62a35c;">to_s </span><span style="color:#323232;">}
</span><span style="color:#323232;">        ret </span><span style="font-weight:bold;color:#a71d5d;">+=</span><span style="color:#323232;"> tok.last.</span><span style="color:#62a35c;">to_s </span><span style="font-weight:bold;color:#a71d5d;">if</span><span style="color:#323232;"> tok
</span><span style="color:#323232;">      </span><span style="font-weight:bold;color:#a71d5d;">end
</span><span style="color:#323232;">      
</span><span style="color:#323232;">      i </span><span style="font-weight:bold;color:#a71d5d;">+= </span><span style="color:#0086b3;">1
</span><span style="color:#323232;">      </span><span style="font-weight:bold;color:#a71d5d;">break if</span><span style="color:#323232;"> i </span><span style="font-weight:bold;color:#a71d5d;">>=</span><span style="color:#323232;"> size
</span><span style="color:#323232;">    </span><span style="font-weight:bold;color:#a71d5d;">end
</span><span style="color:#323232;">
</span><span style="color:#323232;">    ret
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">end
</span><span style="font-weight:bold;color:#a71d5d;">end
</span>
ace,
@ace@lemmy.ananace.dev avatar

My favourite advent calendar.
Got a private leaderboard with the other sysadmins from work - as well as a few people from our application/development team.

ace,
@ace@lemmy.ananace.dev avatar

It’s basically just a copy of the main leaderboard, but the scores are given based on the size of the group.

ace,
@ace@lemmy.ananace.dev avatar

My guess is that drilling is going to cause the Vulcanus-version of pollution, since it makes sense that a volcanic planet wouldn’t have much problem with regular pollution.

ace,
@ace@lemmy.ananace.dev avatar

It could be interesting with something like the old Pharaoh game and its receding riverbed farming, but you’d have to balance that compared to costs of resourcing in Factorio - or offer some reasonably simple way for the player to protect their resourcing operations against the rising lava.

HP says I should have known its £399 laptop bargain was too good to be true (www.theguardian.com)

[…] Parcelforce texted the delivery slot. No delivery. Parcelforce and HP’s tracking systems then claimed I had refused the parcel. I scheduled a redelivery for the next day. Parcelforce then rang me and the agent acknowledged a delivery had not been attempted and that the tracking information was false. It claimed HP had...

ace,
@ace@lemmy.ananace.dev avatar

Got a pair of old HPE gen8 1U servers that are chewing through fan packages like nobody’s business, replaced at least five burnt-out fans on them in a similar amount of years.

We’re running a mix of HPE, Dell, and Fujitsu servers and they all absolutely suck in their individual ways - HP(E) adds a bunch of arbitrary hardware limitations which we have to work around, Dell intentionally degrades our multi-system setups with firmware updates, and Fujitsu’s boot firmware goes absolutely pants-on-head retarded if you’re doing netboot first.

We’ve gotten some Supermicro systems now as well, and they’ve been a real treat in comparison, though their software UX feels like it’s about two decades behind.

ace,
@ace@lemmy.ananace.dev avatar

We’ve recently kicked out our entire Cisco networking core due to it actively refusing to interoperate with other pieces of necessary hardware for us, which was causing us to have to run an almost entire second redundant core network. Switching it out with ALE has been really nice in that regard, SPB scales like a dream even between locations and cities, we even get working L2 routes all the way over to some of our locations almost half a country away.

For us, Dell has been the far better of the two (HPE/Dell) big server-providing beasts in terms of just being able to use the hardware they provide, but they’re very close to getting a complete block from future procurement due to how they’ve been treating us.

Honestly, Fujitsu is probably our best current provider; their hardware is reasonably solid, their rack-kits aren’t insane, their BMC doesn’t do a bunch of stupid things, they don’t do arbitrary vendor locking on expansion cards, etc. Unfortunately their EFI/BIOS is a complete mess, especially in regards to boot ordering and network boot, and they’ve so far not been able to provide us Linux-based firmware upgrade packages - despite using a RHEL image in their BMC-orchestrated offline firmware upgrade process.

ace,
@ace@lemmy.ananace.dev avatar

It’s great to see more full-AMD hardware from TUXEDO. I’m currently using their Aura 15 Gen2, and my only complaint is about the fingerprint sensor - which isn’t even really a TUXEDO issue as they have written and submitted a patch upstream for libfprint which makes it work. (And since I’m using Gentoo I’ve just dropped that patch into my local portage tree until upstream merges it)
They’re definitely not the cheapest computer vendor, but their quality is good and their support is great. No odd boot behaviors, ACPI errors, random device disappearances, etc, like I’ve had with other non-Linux-first vendors.

ace,
@ace@lemmy.ananace.dev avatar

Has anything actually happened in ownClouds development?

The last I saw of them was FOSDEM a few years back, where NextCloud were handing out whitepapers and showing off their new Hub, chat, VoIP stack, group sharing system, and more. And ownCloud were sat somewhat opposite with two people and a screen showing a screenshot of a default ownCloud install, along with a big sign hanging from the ceiling saying “Join the winning team.”

ace,
@ace@lemmy.ananace.dev avatar

It’s great to hear that they’re not just giving up. And it’s also definitely good to hear that they’re not sticking with PHP either, that language is a true bane to modern hosting - and especially Kubernetes.

I’ll remain cautiously optimistic that they’ll be able to stay relevant, and not go hard in again on cutting away core functionality in the name of enterprise offerings - what caused the NextCloud split in the first place.

ace,
@ace@lemmy.ananace.dev avatar

Apparently the new OLED screen will be available through iFixit

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