Better HN
topnewbestaskshowjobs
Log inSign up

ki_

120 karma · joined Mar 30, 2022 (4y ago) · 89 submissions

Submissions

comment 2y ago · link · parent

I dont know why they make it that difficult. I just do it like: https://pastebin.com/duN0cGJY

comment 2y ago · link · parent

I have an M2 for my work. MacOS still gives me random lag spikes sometimes. But it's probably because the OS is bad and not the hardware. This is never an issue on win/linux. idk. im not a fan. but.. im just saying.. if the hardware is so superior, why does it feel so inferior? Like.. my $500 linux laptop feels smoother and faster (GUI wise)

comment 3y ago · link · parent

1. You can share templates between front & back-end using any language. (im not talking about WASM)

2. CSS has NOTHING to do with js/ts.

3. Most single page js applications require SSR anyway, otherwise you have a blank screen or spinner until the browser has downloaded & intialized everything.

Personally, i dont care if it's SSR or SPA. But the js/ts community tends to use things like webpack in combination with ~20 packages which themselfs rely on ~20 packages, resulting in index.js files that are +2MB... That's bad programming.

comment 3y ago · link · parent

horrible article, title is super clickbait and totally not what the article represents. There is no backfire and all it says is that some people dont know what can or cannot be recycled...

comment 3y ago · link · parent

I thought v was older, hmm, ok. But still, all these languages should have reached 1.0 by now. Except for jai, because jblow has other things todo. Wasnt c created in 2 weeks?

comment 3y ago · link · parent

at the moment, if you want a non gc language with automatic memory management, rust is your only choice. ki is an alternative, but my goal is to make it a much simpler than rust. I need to spend some more time writing rust & ki in order to answer your question with full certainty.

comment 3y ago · link · parent

in v? i have no idea, never used it.

comment 3y ago · link · parent

! ignores the function error (only possible with void return types)

!? provides an alternative value when the function errors

!! exits the current scope on an error, e.g. return,continue,exit,...

It doesnt seem that complex. Ofcourse, there is also '??' and '?!'. That might make it more difficult. It's not vague actually. if it starts with '!', it's a function error handler. if it starts with '?', it's a null-check.

comment 3y ago · link · parent

I removed this section from the website. As others said, the text is not good and not really helpful.

comment 3y ago · link · parent

"It does not have any garbage collection and instead uses ownership combined with minimal ref counting to manage memory"

Because we only allow you to store values with ownership inside other objects, you cannot have a circular reference. It uses reference counting to know if something needs to be freed or not. But because we keep track of ownership and moved values we are able to run an algorithm that removes most of these counts.

comment 3y ago · link · parent

I think v-lang is faster than ki, rust, go. But their memory management isnt waterproof. Also, they have been in development for a really long time and there isnt much progress. They should have reached 1.0 by now, but they havent and i think it's because the language might have problems.

oh and, v-lang does have GC. they use boehm gc.

comment 3y ago · link · parent

yeah, that might be a good idea.

comment 3y ago · link · parent

I could add an example to the git README. Currently there is an example on:

https://ki-lang.dev/

https://ki-lang.dev/docs/dev/intro

For a more indept view of the language you will have to see the docs. An overview might not be bad indeed.

comment 3y ago · link · parent

i'll remove it ^_^ it seemed like they want you to use Visual studio and for me it was like 10GB+ for a minimal setup. idk.

15.

Show HN: Ki Programming Language(github.com ↗)

40 points · by ki_ · 3y ago · 70 comments

comment 3y ago · link · parent

All i see is that the php fpm based frameworks (e.g. laravel) are 100x - 300x slower. And this is the best case scenario. When projects grow, php-fpm gets slower and slower. Which is not the case for go. Im not a go-fanboy, my entire carreer has been in PHP. Im just saying, PHP is one of the most terrible languages for web servers. And it's all php-fpm's fault. On top of that, the PHP community seems to promote OOP and SOLID which are the last design patterns you want to combine with php-fpm. There's a reason why facebook created their own PHP transpiler.

comment 3y ago · link · parent

Ringbuffers are one of my favorite things to use. Thanks for the article.

comment 3y ago · link · parent

If both run under 500ms. I guess it's your choice. Just pick the one that's most productive for you. If flake8 takes longer than 1 second, i'd replace it with ruff. 1 second is a really really long time for a linter, even if your codebase is 1 million lines of code.

comment 3y ago · link · parent

Thanks for changing it, i dont know why people are giving you such a pushback, personally, i think the internet could use a bit less hype titles.

Side note, i'd pick "Using" instead of "Use"

comment 3y ago · link · parent

I like nix because it seems like an alternative to docker. Yet. Im never going to use it, because it has complexity and i dont understand why. Which is why i dont use docker nor nix. I can work with both, i just dont want to waste my time on them unless i have no other option.

comment 3y ago · link · parent

That's distributed ownership. Basically you get ownership of certain objects for no reason. And if you question the Goverment Class about this behaviour, you get freed from memory. Not a good strategy in my opinion.

comment 3y ago · link · parent

True. But doing this yourself can result in bugs. It would be nice if we didnt have to think about it.

comment 3y ago · link · parent

I just meant that 99% of software was written without the idea of ownership. Sure, we had objects containing other objects, but i dont see that as "ownership".

Interesting arguments. Thanks.

comment 3y ago · link · parent

as a language designer.. im still stuck wether ownership is a good or bad idea. I like ownership because that's how we handle things in the real world. Eg. 2 people grabbing potato chips out of a bag at the same time is a bad idea. We pass the bag along. wait turns. But for some reason, we dont do this with computer programs. So.. should we do this with computers or not? Feel free to reply.

My instinct says 'yes'. But i also have a feeling that im going to run into problems that current languages dont have. Such as being forced to copy data or have complex systems like in rust to make the compiler happy.

comment 3y ago · link · parent

You cant balance it. In order to balance it, you already have to put these people into certain boxes, which is already pretty offensive. Then you'll have to descriminate against people in certain boxes in order to balance it. ITS WRONG. Stop grouping people up based on their skin color or sex or whatever. stop it.

comment 3y ago · link · parent

Well, there is nothing to fix. As long as the speakers are picked based on their content, everything is fine. But OP suggests we pick speakers based on their skin color... that's fucked up.

comment 3y ago · link · parent

> FOSDEM is dominated by a very telling lack of diversity

No one cares about a persons gender or skin color. We care about the information that's being shared. Only racists and sexists care about the gender and skin color of the speakers.

123