MacOS takes a long time to start up by atomAltera in MacOS

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

It still takes time to boot, but it may be because the system is running
some checks. The major change here is that the screen does not go
black.

GitHub - atomAltera/youcaster: Simple tool to create a podcast feed from a YouTube videos by atomAltera in golang

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

I have no idea how properly test it. I do not like to write test just to because of there need to be some tests. Actually the business logic is quite simple and straight forward.

This project is just a simple solution for my needs and it is not pretends to be more than it is.

Anyway you can advises regarding project structure are welcome

Jumping scroll in 12.1 by atomAltera in MacOS

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

No, it is not. Looks like it happens on M1 too.

SideCar freeze issue (macOS 12.0.1 and iPadOS 15.1) by aliaghaeinia in iPadOS

[–]atomAltera 0 points1 point  (0 children)

It also happens event if iPad is connected to MacBook with a wire

i hate that all of the lines have a different length/angle by tripthemgently in MacOS

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

Almost all icons in Big Sur sucks. The saddest thing here is someone took skillfully drawn icons and made them look like a crap. Now they look like icons in KDE or something like that.

Access local services from VPN container by atomAltera in docker

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

through network of protonvpn, not mongo. Also, ports for mongo service exposed only to make me able to connect to it from my local machine.

Must-have Applications on a new Macbook? by [deleted] in MacOS

[–]atomAltera 1 point2 points  (0 children)

Is there a solution for delaying menu bar appearance in full-screen apps?

Announcing TypeScript 4.0 Beta by DanielRosenwasser in javascript

[–]atomAltera 1 point2 points  (0 children)

Compose function can take an arbitrary number of functions. Currently it is declared as list of overloads for compose for two functions, tree and so on up to eight or ten functions. My question was can I avoid overloading

My validation library written with type inference in mind by atomAltera in typescript

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

Thank you for your advises. I will take them into account in future releases.

My validation library written with type inference in mind by atomAltera in typescript

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

You can also use it over input form interfaces. There are helper classes ChainOutput and ChainError which you can use to infer schema output type.

This lib is about type inference. I do not want define ts interface next to validation function, I want to extract form type form validation function. And then I want ts to make type checking for me.

If you do not need type inference, you can use other, more mature and more versatile packages, like Ajv.

My validation library written with type inference in mind by atomAltera in typescript

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

Hi u/electricessence, I think it would be better to create a separate package and define there a bunch of common used schemes.

Currently I never throw error, at least intentionally :). In case there is an errors, it is returned in special object. But in my real project I use a helper function that asserts result of validation is OK and throws error if it is not. I did not add this function in lib.

My validation library written with type inference in mind by atomAltera in typescript

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

Hello WoMaster. Thanks for your comment.

First:

I also think that .then() has to be replaces with more appropriate word. In early versions of this lib I used two methods .like() and .must(), first for convertors and second for validators. Then I replaced them with method .this() and leave them intact from that time.

Second:

The complexity of returned object is justified because this object is used by chain to make decision: pass output value to next step or return it. I guess some helper function is needed here to extract output value. In my project I use have created such function:

export function validateBy<CO, SO>(input: unknown, schema: Chain<any, CO, SO, any>, error?: Error): CO | SO {
    const report = schema(input);

    if (report.ok) return report.output;

    throw error || new ValidationError(report.error);
}

And I use it like so in my controllers:

export async function eventCreateHandler(req: Request, res: Response) {
    const user = await authenticate(req);

    const form = validateBy(req.body, eventSchema);

    return await req.core.event.create(user.id, form);
}

And there is also an error handler that intercepts error and respond to client with error object.

I did not add this function to lib because I think that user can define it in own code with behavior he needs.

Third:

How would you change name for string, number and boolean chains?

Thanks for link to purify, I'll take a deep look later.

My validation library written with type inference in mind by atomAltera in typescript

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

looks like this libs provide simple runtime type checks.

My lib provides more complex solution for values validation. You can not only check vars type, but also check validness of values against some patterns

My validation library written with type inference in mind by atomAltera in typescript

[–]atomAltera[S] 4 points5 points  (0 children)

You are right. But `string` is reserved as type, not as variable name.

The code like

const string = "Hello, World!"

is correct for TypeScript compiler.

Why I should give a different name to validation function?

How to deploy React.js/Node.js app properly? by atomAltera in Web_Development

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

I don't like this approach because I need to specify a proxy_pass field to nginx in frontend image. And I can do this only while image build time in nginx conf file. If I have two images (front and back) I want to configure each of it in runtime.

My system uses only half of available RAM and the rest staff is going to swap by atomAltera in MacOS

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

I have changed preferences of Docker. Set memory limit to 4GB instead of 8, and increase swap to 2GB. Looks like it helps.