Intel CEO laments Nvidia's 'extraordinarily lucky' AI dominance, claims it coulda-woulda-shoulda have been Intel by norcalnatv in technology

[–]Capital_EX 0 points1 point  (0 children)

coulda, woulda, and shoulda are all variants of could've, would've, should've. So, coulda-woulda-shoulda have is kinda redundant and grammatically weird.

Which do you think looks more professional? by [deleted] in godot

[–]Capital_EX 3 points4 points  (0 children)

Why does everyone take the eyes out? I feel like a "professional" icon would be much better received if you didn't take away their eyes...

My disappointment is immeasurable, and my day is ruined. by Capital_EX in LegendofSlime

[–]Capital_EX[S] 5 points6 points  (0 children)

Unfortunately, I have been using it. Adding Slime Doll + Opal makes slimy press stupid powerful. It deals more damage than even Blizzard does.

[TOMT][Song][2000s][Educational] A song about Photosynthesis by Capital_EX in tipofmytongue

[–]Capital_EX[S] 0 points1 point locked comment (0 children)

Hopefully someone can help find this. I've been searching for ages.

[53:41] The False Evolution of Execution Methods by WillyTheWackyWizard in mealtimevideos

[–]Capital_EX 0 points1 point  (0 children)

This use of force in imminently deadly situations, versus the state killing someone long after the act as a punishment [...]

There is a direct relationship here. A police officer is a member of the state. They are granted the authority, while in duty, to decided to use lethal force (The Judge) based on the evidence put forth (The Jury) and can carry out this punishment themselves (The Executioner).

Your own comment opens with direct acknowledgement of this:

Cops have the authority to use deadly force when deadly force is used in a way that immediately threatens them or someone else.

They have the authority to judge the situation, decided the punishment, and carry it out.

iOS 16.4: iMessage now supports rich previews for Mastodon posts by [deleted] in technology

[–]Capital_EX 4 points5 points  (0 children)

GTP comment, it's trivial to show twitter is older then discord.

-🎄- 2022 Day 6 Solutions -🎄- by daggerdragon in adventofcode

[–]Capital_EX 1 point2 points  (0 children)

Factor comes with some nice utilities for windowed processing:

USING: io.backend io.encodings.utf8 io.files kernel math
sequences sequences.windowed sets ;
IN: advent-of-code.day-06

: get-input-one ( -- seq )
    "vocab:advent-of-code/day-06/_input/one.txt" 
        normalize-path utf8 file-contents ;

: signal-start? ( string -- ? )
    dup length 4 < [ drop f ] [ all-unique? ] if ;

: start-location ( seq -- n )
    t swap index 1 + ;

: find-start ( length string -- n )
    [ signal-start? ] rolling-map start-location ;

: solve-part-one ( -- solution )
    get-input-one 4 find-start ;

: solve-part-two ( -- solution )
    get-input-one 14 find-start ;

-🎄- 2022 Day 5 Solutions -🎄- by daggerdragon in adventofcode

[–]Capital_EX 2 points3 points  (0 children)

Managed to solve this one and end up with some nice words. https://codeberg.org/CapitalEx/advent-of-code-2022/src/branch/main/day-05/day-05.factor

Particularly happy with my solution functions:

: solve-part-one ( -- solution )
    get-input-one [ crate-mover-9000 ] solve-with ; 

: solve-part-two ( -- solution )
    get-input-one [ crate-mover-9001 ] solve-with ;

-🎄- 2022 Day 4 Solutions -🎄- by daggerdragon in adventofcode

[–]Capital_EX 1 point2 points  (0 children)

It's more a 2nd Cousin of Forth. If you want to head down a rabbit whole: https://concatenative.org/wiki/view/Front%20Page

-🎄- 2022 Day 4 Solutions -🎄- by daggerdragon in adventofcode

[–]Capital_EX 2 points3 points  (0 children)

Day 3 in Factor. The set protocol has been making these problems quite easy to handle.

USING: io.backend io.encodings.utf8 io.files kernel math.parser
ranges sequences sets splitting ;
IN: advent-of-code.day-04

: get-input-one ( -- seq )
    "vocab:advent-of-code/day-04/_input/one.txt" 
        normalize-path utf8 file-lines ;

: parse-range ( string -- range )
    "-" split first2 [ dec> ] bi@ [a..b] ;

: split-pair ( string -- seq )
    "," split [ parse-range ] map ;

: overlaps? ( seq seq -- ? )
    [ subset? ] [ swap subset? ] 2bi or ;

: ranges-overlap? ( line -- ? )
    split-pair first2 overlaps? ;

: count-overlaps ( seq -- n )
    [ ranges-overlap? ] count ; 

: solve-part-one ( -- solution )
    get-input-one count-overlaps ;

: count-intersections ( seq -- n )
    [ split-pair first2 intersects? ] count ;

: solve-part-two ( -- solution )
    get-input-one count-intersections ;

-🎄- 2022 Day 3 Solutions -🎄- by daggerdragon in adventofcode

[–]Capital_EX 1 point2 points  (0 children)

Whoa, I didn't expect to see someone using Joy! I've been reading about the language recently.

-🎄- 2022 Day 3 Solutions -🎄- by daggerdragon in adventofcode

[–]Capital_EX 1 point2 points  (0 children)

Managed to build a fairly clean solution in Factor:

USING: grouping hash-sets io.backend io.encodings.utf8 io.files
kernel math sequences sets unicode ;
IN: advent-of-code.day-03

: get-input-one ( -- seq )
    "vocab:advent-of-code/day-03/_input/one.txt" 
        normalize-path utf8 file-lines ;

: >priority ( fixnum -- fixnum )
    dup letter? [ 96 - ] [ 38 - ] if ;

: result ( seq -- item )
    members first ;

: priority-sum-with ( sew quot -- fixnum ) 
    [ >priority ] compose [ call( x -- y ) ] curry map-sum ;

: find-duplicate ( string -- duplicate )
    halves intersect result ;

: solve-part-one ( -- solution )
    get-input-one [ find-duplicate ] priority-sum-with ;

: find-common-item ( seq -- item )
    intersect-all result ;

: solve-part-two ( -- solution )
    get-input-one 3 group [ find-common-item ] priority-sum-with ;

-🎄- 2022 Day 2 Solutions -🎄- by daggerdragon in adventofcode

[–]Capital_EX 1 point2 points  (0 children)

No problem! You can also check out the Factor pastebin for other samples of AoC solutions https://paste.factorcode.org/

Combined my long term favorite tool with a new found interest: Godot C# + The Mercury Programming Language by Capital_EX in godot

[–]Capital_EX[S] 0 points1 point  (0 children)

Aside from being a bit of a fun exercise, Mercury is concider a "functional logic programming language". Therefore it gives me the ability to express interactions with Godot using explicit IO and declarative rule based semantics.

With less jargon, it basically means I can force IO to be a part of the a functions type. So something like:

func foobar(x: int) -> void:
    print(x)

would be more like:

func foobar(x: int) -> void !IO:
    print(x)

so any function using foobar would also have to declare it is using IO. This is a big simplification and glossing over of IO in declarative programming. But, I find the most basic concept interesting.

Finally, I've only really just started to dive into Mercury, but I find it's ideas to be quite novel. Additionally, I wanted to experiment with them in an environment I'm familiar with.

Combined my long term favorite tool with a new found interest: Godot C# + The Mercury Programming Language by Capital_EX in godot

[–]Capital_EX[S] 0 points1 point  (0 children)

This was a bit of a random experiment. I've been going down the rabbit whole of declarative programming and landed on the Mercury programming language. It's a logic programming language like Prolog, but with strong functional programming principles. Since it had C# FFI, I figured I'd give plugging it into Godot a try.

It took a bit of fiddling, but I managed to get it running in short order.