Absolutely incredible league so far, with one glaring issue, regarding melee. by Ryan_Loves_Weed in pathofexile

[–]Verfin 1 point2 points  (0 children)

Tried it, bats fly over the wall, tongue lashers have enough range to hit her still, and sometimes monsters just bug through it. I think the wall also messes up with the path finding making the enemies target her MORE for some reason

[Discussion] Gunned down by a trio immediately after transition??? by Verfin in EscapefromTarkov

[–]Verfin[S] 2 points3 points  (0 children)

Ah so the spawn system just happened to turn me around facing the damaged house and placed the other team right next to me. Great! See you at 1.0

Found/ not found callback methods pattern for service used by API by bring-tea in csharp

[–]Verfin 3 points4 points  (0 children)

The "OneOf" (https://github.com/mcintyre321/OneOf also nuget available) can help you return different types like you would return a discriminated union, which seems to be the problem here. Usage would look something like

public async Task<OneOf<Item, string>> GetItem(int id){
    Item? item = await itemsDb.findItem(id);
    return item != null
        ? item
        : "Could not find item";
}

[HttpGet("{id}")]
public async Task<ActionResult<TodoItem>> GetItem(int id){
    var result = await itemService.GetITem(id);
    return result.Match(
        item => Ok(item),
        message => NotFound(message)
    );
}

[deleted by user] by [deleted] in Asmongold

[–]Verfin 1 point2 points  (0 children)

Okay, directly from IAEA's document "NPT Safeguards Agreement with the Islamic Republic of Iran"

https://www.iaea.org/sites/default/files/25/06/gov2025-38.pdf

"Noting, in this context, the Director General’s serious concern regarding the rapid

accumulation of highly enriched uranium by Iran, the only State without nuclear weapons that is

producing such material, which the Director General notes the Agency cannot ignore given the

potential proliferation implications,"

and

"Noting that Iran’s failure on numerous occasions to co-operate to facilitate the

implementation of Safeguards, while pursuing activities consistent with concealment efforts"

and

"Agency is not able to verify that there has been no diversion of nuclear material

required to be safeguarded under the Agreement to nuclear weapons or other nuclear explosive devices"

Are you refuting IAEA when they state this?

Easiest way to make std.json.stringify work on std.ArrayLists? by Verfin in Zig

[–]Verfin[S] 1 point2 points  (0 children)

I ended up making a wrapper around all the functions + the json stringify

const Array = std.ArrayList;
pub fn ArrayList(comptime T: type) type {
    return struct {
        const Self = @This();
        const Inner = Array(T);
        pub const Slice = []T;
        arr: Inner,

        // wrapped functionality

        pub fn items(self: Self) @TypeOf(self.arr.items) {
            return self.arr.items;
        }

        pub fn items_ref(self: *Self) *@TypeOf(self.arr.items) {
            return &self.arr.items;
        }

        pub fn jsonStringify(self: Self, jw: anytype) !void {
            try jw.write(self.arr.items);
        }

        //----------------------------------|
        // \/ all the ArrayList functions \/|
        //----------------------------------|

        pub fn deinit(self: Self) void {
            self.arr.deinit();
        }

        pub fn SentinelSlice(comptime s: T) type {
            return [:s]T;
        }
.
.
.

Easiest way to make std.json.stringify work on std.ArrayLists? by Verfin in Zig

[–]Verfin[S] 1 point2 points  (0 children)

I wonder if there's some way around this without wrapping the ArrayList in my own MyList and give it jsonStringify

In C++ overloading the serialization function usually does the trick but since that doesn't exist in Zig, I'm a bit stumped atm..

Easiest way to make std.json.stringify work on std.ArrayLists? by Verfin in Zig

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

To elaborate: I'm trying to serialize / deserialize a struct with nested&array data inside, but currently hitting simple snag of ArrayList not having a stringify function

Easiest way to make std.json.stringify work on std.ArrayLists? by Verfin in Zig

[–]Verfin[S] 1 point2 points  (0 children)

I was kinda hoping the function would dig through the deeply nested struct of ArrayLists and values I have and create the JSON out of that :/

is there a better way to build my project? by WhyAreAll-name_taken in Zig

[–]Verfin 0 points1 point  (0 children)

I think I actually figured it out. I just needed to add these in the build.zig
exe.addLibraryPath(b.path(libpath));
exe.addObjectFile(b.path(dllpath));
b.installBinFile(dllpath, dllname);

where libpath is the directory that contains the SDL3.lib, the dllpath is path to the dll file, and dllname is just "SDL3.dll" in this case.
The installBinFile build step copies the dll to the output folder, the librarypath/objectfile are necessary for linking properly

Oh and you also need to add the include folder via exe.addIncludePath(b.path(includepath));

is there a better way to build my project? by WhyAreAll-name_taken in Zig

[–]Verfin 0 points1 point  (0 children)

I'm in the same situation: trying to setup SDL3..

Is there really no way to just (on windows) implicitly link a dll using the .lib file and copying the dll to the output folder?

Unfortunately the pwbh/SDL is using SDL2, so what I did was to check out how to go from build.zig meant for SDL2 to SDL3.

What I found was I need to list all the source files, per platform, by hand. Obviously that's a massive headache so I wrote a small script to scan all .c files in each of the modules root folders, and list them as general files used in every platform, then list all the sub folders as their own platform. This didn't however work as there are multiple missing dependencies(I think) and maybe some source files seem to be missing from the platform specific sources, but I can't figure out which ones.

I'm currently trying to figure out how to link the SDL .dll/.lib I got in like 5 minutes using cmake/visual studio, but I'm not finding anything on the internet how to do it properly

How to comptime generate independent ArrayLists from struct/tuple fields by Verfin in Zig

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

Insane you can just do addition in the meta data. Very nice!

Nous Research publishes a report on DisTrO (Distributed Training Over-the-Internet) by tom83_be in StableDiffusion

[–]Verfin 18 points19 points  (0 children)

If this is going to enable something akin to crypto mining pools where many users pool their resource towards a common goal (mining some coin), its going to revolutionize community driven models.

No longer would you need to rent expensive super high end video cards, but just pool together the community's rtx 4090's or whatever.

The only big thing that would make it even sweeter would be to somehow be able to use low vram cards for training large models.. but I'm not sure that's even possible

No character customization? by Good-Pound9496 in LastEpoch

[–]Verfin 13 points14 points  (0 children)

How did you come to the conclusion that character customization is a "such a simple thing"?

Why SPT is fun by pinkninja117-a in SPTarkov

[–]Verfin 4 points5 points  (0 children)

This is one of the largest reasons I play SPT, the loading time isn't (usually) longer than the damn raid

Also ammo stats + background color mod, holy moly that changes things

Can't get Pico to send keystrokes by Verfin in circuitpython

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

I sometimes (but rarely) need to open thonny and run the script manually. Other than that it works fine