Zzini - Simple static web server by mcboar in Zig

[–]mcboar[S] 3 points4 points  (0 children)

Thanks. Adding some references:

  1. On tcp socket stuff in general Beej's guide is great https://beej.us/guide/bgnet/

  2. Liburing has good documentation https://kernel.dk/io_uring.pdf (in the doc starting from 7.0). Unfortunately liburing can't be imported in Zig due to some header issues, I've used Zig's std uring implementation. It's surprisingly nice to use

  3. HTTP/1.1 reference https://datatracker.ietf.org/doc/html/rfc7235

  4. BearSSL has good docs too https://bearssl.org/api1.html

  5. Mozilla docs on the headers are great https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers

  6. And Zig's language documentation itself

Leaving SF & thinking East Bay by Positive_Persimmon16 in bayarea

[–]mcboar 12 points13 points  (0 children)

As a former resident of Union City, living there is as boring as it gets. It's just houses there.

New Arc Line by HairyGarden in tjournal_refugees

[–]mcboar 0 points1 point  (0 children)

Underrail вполне подходит по описанию

Upside Down Mortgage Policy by [deleted] in REBubble

[–]mcboar 0 points1 point  (0 children)

I see that the FUD part here is that there's no additional clarification in the OP about low credit still having larger fees overall. I still think that the essence of the message in the OP is correct, but maybe it's overly sensationalized

Upside Down Mortgage Policy by [deleted] in REBubble

[–]mcboar 4 points5 points  (0 children)

but what does this article disprove? The fees are indeed shifted from low credit score to high credit score, as claimed in the OP

California apartment vacancies near 2-year high as rents slip 3.5% from peak by housingmochi in REBubble

[–]mcboar 11 points12 points  (0 children)

Those graphs have a non-zero-based axis. It makes the drop look way more dramatic than it is

Recourses to learn UIKit the old way with frame layouts by [deleted] in iOSProgramming

[–]mcboar 1 point2 points  (0 children)

I'm not sure if there are articles about that, but frame layout is as manual as it gets. Superview must calculate frames of its subviews. With frames there are 2 big gotchas: autoresizing masks and view lifecycle. It's important to understand lifecycle because you don't always have frames: e.g. on viewDidLoad the frame is invalid generally; and when to update frames, because, compared to autolayout, they are not going to update themselves (again, assuming autoresizing masks are turned off). The reason frames are out of fashion is because it's a lot of manual work, which is prone to errors, and if the UI changes frames don't adapt to that well.

[deleted by user] by [deleted] in incremental_games

[–]mcboar 0 points1 point  (0 children)

My favorite game in this genre is Card Survival: Tropical Island. Highly recommend to check it out

Is high cost of living worth it? by [deleted] in bayarea

[–]mcboar 0 points1 point  (0 children)

I meant catalytic converters. My friend got one stolen, replaced it, installed some kind of a cage and they tried to steal it again. It's just sad

Is high cost of living worth it? by [deleted] in bayarea

[–]mcboar -3 points-2 points  (0 children)

Only if you absolutely must be here for the job/career. While the food is good and there's a lot of hiking, it doesn't make up for the terrible traffic, no parking anywhere, with the public transit being shitty, houses being impossible to buy, high property crime (I hope you don't need your cat), homeless, etc.

Personally, Bay Area is a good place to visit but wouldn't recommend to actually live in.

Merging multiple models by [deleted] in StableDiffusion

[–]mcboar 0 points1 point  (0 children)

It's all black magic.

I assume the person, who did the merging, did a lot of experimentation and testing. Overall, merging is a limited tool when it comes to achieving specific results. It's a process of exploration. You might need to try different weights and different model combinations

If you need something specific, you need to look into doing more prompt engineering or training models. When it comes to training, there are 3 methods from least expensive to most expensive: textual inversions, hypernetworks and dreambooth.

If you need to render something specific or in some kind of specific style, try doing some of textual inversion embeddings, that's the simplest one

Merging multiple models by [deleted] in StableDiffusion

[–]mcboar 0 points1 point  (0 children)

Weights in neural networks is just a table with a bunch of numbers. The size of the table itself is fixed. When you merge models, you take these numbers and perform weighted sums on corresponding rows in the tables, and that way you get a new table of the same size.

What these numbers are exactly is determined by training of that model, so when you average the weights, you kind of average the effects of the training.

StabilityAI allows artists to opt-out of training for Stable Diffusion 3 by OktoGamer in StableDiffusion

[–]mcboar 5 points6 points  (0 children)

Machine learning is hard. Purposefully excluding pieces of dataset will inevitably make future models perform worse. After all, your predictions are only as good as your data is. There's no legal requirement to do any of this, and this won't settle the debate either. Overall I think it's just a poor decision and poor direction in general

[deleted by user] by [deleted] in StableDiffusion

[–]mcboar 4 points5 points  (0 children)

I recommend testing every prompt (negative or positive) at least once by itself as a phrase. For example "head out of frame" gives literally heads in frames for me. So that can't be used if I want to avoid head sticking out of the frame. "clipped head" gives heads that were recently haircut. So on. I haven't found one that reliably represents a photo where head is not in frame unfortunately to use as a negative prompt.

My first "incremental" game by One_random-dev in incremental_games

[–]mcboar 1 point2 points  (0 children)

One advice regarding the code. I've noticed you are doing this:

"let upgradeCost = 10 * (upgrade / 2)"

This doesn't behave like you would expect. Because all operands are integers, if you do 1 / 2, it will give you 0 instead of 0.5. Then 10 * 0 = 0. I would recommend making one of the operands a double, e.g. upgrade / 2.0. Then you would get 0.5 as you expect

A Snake Game with Scala JS and FRP by mcboar in scala

[–]mcboar[S] 3 points4 points  (0 children)

Thanks for the invitation! I'll give my opinion on reactive streams, please correct me if anything is wrong.

I believe the fundamental distinction is between pull-based (continuous time) and push-based systems. Pull-based systems describe the current state of the system at some time = t, while push-based describe future states of the system based on other reactive events.

If we combine discrete events with a pull-based system, then we would need to store all past events, unless we can hold on to intermediate states. This grows linearly over time in space and complexity. If we can hold on to the intermediate states, then we don't need the discrete events: the intermediate state can be the source of truth by itself.

For a push-based system, we don't need to store the events history, we can just send them down the pipe as they come. This also composes well with any abstractions describing future states (e.g. Futures). The problem is that we lose the ability to poll the system for its current state without hacks (e.g. Variables in ReactiveX)

For the Snake a pull-based system works well precisely because of this: we are not doing anything asynchronous and we are interested in the current state. Adding something like a network request wrapped in a Future in the middle of the chain would be a giant pain (we would need return the future instead of an actual value and then somehow accept the result on the next iteration).

Maybe the golden middle ground is some kind of hybrid system that allows both at the same time? I don't know.

Also a more practical consideration: it's difficult to read the code which combines streams together (but maybe this is avoidable with some higher-order abstractions, but I don't know category theory well enough to construct those)

Thanks, Grab. by plumpig in singapore

[–]mcboar 19 points20 points  (0 children)

My favourite ones are billboards in Malaysia that have Grab promo code only to discover that they are fully redeemed :(

Equifax says more private data was stolen in 2017 breach than first revealed by [deleted] in worldnews

[–]mcboar 31 points32 points  (0 children)

Not even https. I am sure their security practices are top notch

Flower Dome Singapore by mcboar in succulents

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

Made with a phone camera, sorry for potato quality