TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Ki Programming Language

40 pointsby ki_almost 2 years ago
Alpha preview for the ki programming language. Currently linux-x64, macos-x64 only. Windows users can use WSL for now. Feedback is much appreciated.

15 comments

giancarlostoroalmost 2 years ago
I say this every other programming language thread: Please, get some code examples up front and center, simple Hello World, and anything that shows whatever strong features your language has for organizing code like classes and so on.<p>Python, Racket and a few others do this really well. Even on the GitHub a simple short but significant enough code snippet would do wonders.<p>Maybe the syntax is exactly what I expect and I&#x27;ll have more interest, or maybe its way off and I don&#x27;t want to bother. Whatever the case, put some sample code up front and center.
评论 #36031483 未加载
评论 #36031931 未加载
评论 #36032030 未加载
lagniappealmost 2 years ago
&gt; Go: Go is amazing. But it does have garbage collection, which can cause lag spikes in some cases. The creators were also very late on implementing common sense features, such as package versioning and generics. There are some other small mistakes, but the point is that we lack trust in their descission making.<p>&gt; Rust: Rust right now might be the best language out there right now. It&#x27;s hard for us to criticize them because we lack the experience of building big rust projects. We do however think rust has a really slow compiler. We also think that rust might be too idealistic where it restricts the developer too much.<p>&gt; C: C is obviously the best but... we dont always want to manage our own memory. Also their std-lib lacks alot of basic functions. You are forced to work with makefiles or similar build tools and most of those tools are very badly designed.<p>&gt; C++: C++ is like a worse version of c. They do have the most features of any language, which allows the developers to write the greatest code and also the worst code. You let a developer work on a project for a year and suddenly you are looking at a codebase full of OOP, templates and the most hacky preprocessor logic you&#x27;ve ever seen. That developer says it&#x27;s built using todays greatest standards, yet no one is able to understand the code at all. Sometimes you have to limit bad practices.<p>&gt; Other: All other languages use garbage collection which makes them hard to use for millisecond realtime applications. Secondly, most languages allow you to have undefined behaviour.<p>I&#x27;m not sure if this section is really making the case you wanted to make. Either this needs to be rephrased or scrapped all together, it doesn&#x27;t present the best foot forward because ideally you are recruiting people from these languages, and in your descriptions of them you make some very facile comparisons.
评论 #36032316 未加载
评论 #36033125 未加载
评论 #36032701 未加载
评论 #36032059 未加载
评论 #36031429 未加载
评论 #36031539 未加载
bheadmasteralmost 2 years ago
Always love to see people tinkering with their own languages. Everyone should write a language, at least once in their life :)<p>Skimmed through the docs. On the first look, the syntax seems to be a blend of Go and Rust.<p>Was confused by this sentence [0], perhaps some additional explanation&#x2F;code example could help:<p><pre><code> When a value has ownership, it can be stored and used anywhere. But you can only store it in one place. </code></pre> Aside from that, I&#x27;d really like to know about<p>1) concurrency support<p>2) memory management techniques<p>As those are the most interesting aspects of any C-like language to me.<p>Good luck!<p>[0] <a href="https:&#x2F;&#x2F;ki-lang.dev&#x2F;docs&#x2F;dev&#x2F;borrow-ref" rel="nofollow">https:&#x2F;&#x2F;ki-lang.dev&#x2F;docs&#x2F;dev&#x2F;borrow-ref</a>
theolivenbaumalmost 2 years ago
Confused by the &quot;C#: We do not use languages that expect you to install a 20GB IDE just to compile a &#x27;hello world&#x27;.&quot; note, the .NET SDK is ~200MB last I checked, and Visual Studio is not required to compile C#. Seems like the <a href="https:&#x2F;&#x2F;ki-lang.dev&#x2F;dist&#x2F;download&#x2F;linux&#x2F;x64&#x2F;latest" rel="nofollow">https:&#x2F;&#x2F;ki-lang.dev&#x2F;dist&#x2F;download&#x2F;linux&#x2F;x64&#x2F;latest</a> build from Ki is ~40MB, so similarly sized.
评论 #36031330 未加载
评论 #36031516 未加载
naaskingalmost 2 years ago
Reference counting is garbage collection. I mention this because the site claims no GC nut you claim I&#x27;m this thread that ref counting is sometimes used, which makes sense because borrowing sometimes isn&#x27;t enough.
评论 #36032054 未加载
Atlas22almost 2 years ago
Not knocking Ki or any new language but what does it offer over existing systems? I see the criticism of a few languages on the website but they all boil down in reasoning to things like: garbage collection = bad, makefiles = bad. It also doesn&#x27;t mention or demonstrate how Ki addresses the complaints. For example: if Ki doesn&#x27;t do garbage collection or manual memory management, what does it do? Smart pointers&#x2F;reference counting? How are circular references handled? (E.g. doubly linked list)<p>Would recommend removing the &quot;Other&quot; comparison as pretty much anything that can be said there is wildly inaccurate. Would also like to see comparison with Zig as it seems to have similar goals.
评论 #36031989 未加载
janalsncmalmost 2 years ago
&gt; let num : u8 = 5; &lt;-- auto converts to u8;<p>Can we please knock it off with reinventing different ways to declare a variable? This also irritates me about Rust. There’s nothing wrong with having syntax that looks like languages that have existed before. How about<p>[modifiers] [type] [variable name] = [initial value];<p>What I want in a programming language is not arbitrary new grammars, I want drop-in improvements to languages that already exist. C++ but with better dependency management. Python but statically typed (Mojo where you at?). PHP but standardize all the weirdness.<p>(Some or all of these rants could be out of date as my knowledge cutoff for languages ends at various times in the last 15 years.)
评论 #36033414 未加载
评论 #36036092 未加载
评论 #36035442 未加载
wiz21calmost 2 years ago
&gt; LLVM is however really slow. There isnt much we can do about this except write our own IR compiler, which we would rather not do.<p>So compilation times are dominated by llvm so there won&#x27;t be any significant improvement on compilation speed.<p>&gt; Ki is a statically typed language. It&#x27;s advantage over most languages is that you cannot have any undefined behaviour.<p>Java, C, C++ are statically typed. I understand it&#x27;s not many languages, but they do represent a pretty large share of coders...
ModernMechalmost 2 years ago
Word to the wise: stay away from reporting benchmarks against establish langs until your language is further along. It&#x27;s often misleading when you see that your toy language is faster to compile &#x2F; run than established languages, because what you&#x27;ll find is that as your language grows and becomes more complete, your timings will times will go up.
评论 #36031805 未加载
chompalmost 2 years ago
This looks promising. If it ends up as Rust without the line noise, I’m 100% on board.
评论 #36032839 未加载
pxeger1almost 2 years ago
I think the !! operator is redundant. If your language has a &quot;never&quot; type, then exit&#x2F;return&#x2F;break&#x2F;panic should have a return type of never, so those expressions would be acceptable on the right hand side of !? anyway. I guess it&#x27;s necessary if your language lacks a never type, or has a distinction between expressions and statements, although I don&#x27;t know really why you <i>would</i> have either of those
frodowtfalmost 2 years ago
Good effort. It feels like there is still a lot of improvement space for languages with a soundness+productivity focus.<p>Docs need some polishing tough. The comparison to other languages doesn&#x27;t make the point of Ki clear to me.<p>Also, error handling feels like black-box magic with all those exclamation and question marks sprinkled everywhere. Those symbols seem vaguely chosen.
评论 #36032186 未加载
fridentalalmost 2 years ago
If you like C but don&#x27;t want to manage your memory yourself, why don&#x27;t you take a look at glib&#x2F;gobject?
评论 #36032782 未加载
评论 #36033004 未加载
return_to_monkealmost 2 years ago
Why would someone choose this over Rust?
评论 #36034141 未加载
haspokalmost 2 years ago
Another brand new language with curly braces and semicolons... emphasizing line noise over information &#x2F;sigh OK, ok, I&#x27;ll show myself out.
评论 #36034174 未加载