HackerTrans
TopNewTrendsCommentsPastAskShowJobs

ki_

no profile record

Submissions

Show HN: Ki Programming Language

github.com
40 points·by ki_·3 lata temu·70 comments

comments

ki_
·2 lata temu·discuss
I dont know why they make it that difficult. I just do it like: https://pastebin.com/duN0cGJY
ki_
·2 lata temu·discuss
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)
ki_
·3 lata temu·discuss
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.
ki_
·3 lata temu·discuss
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...
ki_
·3 lata temu·discuss
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?
ki_
·3 lata temu·discuss
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.
ki_
·3 lata temu·discuss
in v? i have no idea, never used it.
ki_
·3 lata temu·discuss
! 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.
ki_
·3 lata temu·discuss
I removed this section from the website. As others said, the text is not good and not really helpful.
ki_
·3 lata temu·discuss
"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.
ki_
·3 lata temu·discuss
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.
ki_
·3 lata temu·discuss
yeah, that might be a good idea.
ki_
·3 lata temu·discuss
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.
ki_
·3 lata temu·discuss
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.
ki_
·3 lata temu·discuss
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.
ki_
·3 lata temu·discuss
Ringbuffers are one of my favorite things to use. Thanks for the article.
ki_
·3 lata temu·discuss
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.
ki_
·3 lata temu·discuss
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"
ki_
·3 lata temu·discuss
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.
ki_
·3 lata temu·discuss
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.