Live data from Hacker News

Lilith: x86-64 OS written in Crystal

github.com

191–200 of 265 posts

Re: Lilith: x86-64 OS written in Crystal

#191
post #130

Earlier quoted context omitted.

Out of the box, Crystal does garbage collection through the boehmgc library, however if you pass in some compiler flags you can get application to not use GC. As for my OS, I wasn't gonna port libgc, and since I have prior knowledge of building a GC in rust (very badly!) I decided to make a tri-color concurrent, mostly precise (through compiler patches), garbage collector, in Crystal.

Have you read Mike Pall's proposal for a quad-color collector in LuaJIT?[0] That you took this approach leads me to think you'd find it interesting. [0]: http://wiki.luajit.org/New-Garbage-Collector

I've read up on how luajit does garbage collection (in fact the current gc/allocator with allocation/marking bitmaps is inspired by his tri-color gc. Apart from specifying when the GC should run, I won't be changing anything about the core gc algorithm used in the project anytime soon.

Re: Lilith: x86-64 OS written in Crystal

#192
post #6

Wow. Preemptive multitasking, graphical window management, POSIX-like, in a programming language that to my knowledge it hasn't yet been done in... and in just several months of work. There's no smoke and mirrors as far as I can tell. I dug back to the initial commit: https://github.com/ffwff/lilith/commit/c9fa1053dc6a22d630ee6... - and it's just bootstrapping to VGA. Very well done, and inspiring. Makes me want to t…

Maybe it's just because I come from Ruby, but Crystal seems like an amazing language. I'm interested why it seems to be getting little attention compared to Go, Rust, & Julia. It seems in the same league to me. Kotlin and Swift have more obvious reasons for their adoption.

>I'm interested why it seems to be getting little attention compared to Go, Rust, & Julia

I've noticed the slogan was change to "A language for humans and computers", what it really mean? Related to machine learning?

My impression that other than it was design to be as friendly as Ruby and fast as C. It's a lot helpful to have an FAQ if the Crystal team could provides.

Re: Lilith: x86-64 OS written in Crystal

#193

Earlier quoted context omitted.

Maybe it's just because I come from Ruby, but Crystal seems like an amazing language. I'm interested why it seems to be getting little attention compared to Go, Rust, & Julia. It seems in the same league to me. Kotlin and Swift have more obvious reasons for their adoption.

> I'm interested why it seems to be getting little attention compared to Go, Rust, & Julia. Rust essentially competes with C and C++ (and maybe D and Nim without their GCs), and the reason it gets hype is because it brings some unique features for that niche. Go brought some unique features as well (goroutines done right), and it is pushed by a major player. In Julia's niche, you only really have Julia and Fortran -…

Crystal _could be_ for game developers; there's large green pastures left almost entirely untouched for a language to disrupt it. You see a few niche languages make inroads, like Haxe, but I expect something could really effect change.

The key is to be as fast as possible, as memory light as possible, and able to produce and speak to C ABI.

Re: Lilith: x86-64 OS written in Crystal

#194

Neat project, though slightly undermined by the drawing of the half-naked underage girl in the readme

My thoughts exactly, I know people have their own tastes and preferences, but I think it's off-putting to newcomers.

If it's off-putting to _puritan_ newcomers, then good riddance, I guess.

Re: Lilith: x86-64 OS written in Crystal

#195
post #156

Earlier quoted context omitted.

I wouldn't say it's getting "little attention," rather it's relatively new (for a language) and not backed by a major player who can instantly give it a huge spotlight / platform. For being a 5-year old indie language out of South America, I think it's doing quite well, and projects like this are good evidence of why. Ruby is an outstandingly productive language. Copying the expressive syntax and ergonomics of Ruby i…

Two other languages that I can think of that have their roots in South America are Lua and Elixir.

i've been a huge fan of elixir ever since i found it a few years ago. The main web framework (phoenix) is doing some really cool stuff right now with live-view, too, and I'm pretty darn excited about it.

I've always thought that the best system for a web server would be erlang OTP, because of the design based around uptime and system recovery. It has been proven in production by a few companies now in web dev, and erlang has been used for years by telecom companies for their own infrastructure.

elixir, imo, is awesome because of the ruby-like syntax, but I would probably be using erlang for my personal projects regardless because of what I mentioned earlier.

Re: Lilith: x86-64 OS written in Crystal

#196
post #126

Oh wow someone actually posted this! Thanks a lot for the comments and criticisms guys, really means lot to me. Before I go I'll answer some questions, so ask them away!

- What are the things that you have patched in crystal and libc? - Any plan to release ISO for us to quickly run it in our local system?

Precise GC information, the crystal compiler prepends a dword/qword value indicating an class' typeid upon allocation. I decided to patch the compiler to generate 2 functions, one that outputs the class' size based on a typeid, another one that outputs the offsets of each pointer in that class as a bitmap, based on a typeid.

The compiler also generates a null-terminated array of pointers pointing to the offsets of global variables.

No iso images yet, I haven't implemented iso9660 filesystem support, but it's coming soon?

Re: Lilith: x86-64 OS written in Crystal

#197
post #171

Earlier quoted context omitted.

Does anyone actually care about Windows support?

I have had a huge amount of issues trying to use both Ruby and Rust on Windows for server / client use cases. It's not just that it "works" on Windows, but that it works easily out of the box for common use cases. Meanwhile Python and Golang work great on Windows with no extra effort. It's like night and day.

What issues did you have with Rust? I use Rust on Windows every day.

Re: Lilith: x86-64 OS written in Crystal

#198
post #190

Earlier quoted context omitted.

I just wanted to say, to build such a fully-featured OS on your own, and in such a short time frame, is an incredible achievement! I very much look forward to reading through the code and learning more about it.

Thanks but the code isn't that clean, there are hacks here and there and it isn't organized as clearly as I wanted to but feel free to look through it.

Hah, come on, to me you seem like a humble Linus Torvalds!

Re: Lilith: x86-64 OS written in Crystal

#199
post #15
post #12

Earlier quoted context omitted.

What's Crystal's unique selling point? It's older than Rust, Kotlin, Swift, Nim, or even OCaml, and doesn't really offer anything they don't. More Ruby-like syntax? Fine, but most people don't particularly like Ruby syntax.

> It's older than Rust, Kotlin, Swift, Nim, or even OCaml, and doesn't really offer anything they don't. Crystal is only five years old. Nim is 11, Rust is 9, Kotlin is 8, OCaml is 23 and Swift is 5. Basically, Crystal is tied with Swift as the youngest. What it offers right now is a simple porting process for those with Ruby codebases.

Rust is more like 4 than 9; 2015 was the initial stable release, most people couldn’t really use it for things before that.

Re: Lilith: x86-64 OS written in Crystal

#200

Earlier quoted context omitted.

> I'm interested why it seems to be getting little attention compared to Go, Rust, & Julia. Rust essentially competes with C and C++ (and maybe D and Nim without their GCs), and the reason it gets hype is because it brings some unique features for that niche. Go brought some unique features as well (goroutines done right), and it is pushed by a major player. In Julia's niche, you only really have Julia and Fortran -…

Crystal _could be_ for game developers; there's large green pastures left almost entirely untouched for a language to disrupt it. You see a few niche languages make inroads, like Haxe, but I expect something could really effect change. The key is to be as fast as possible, as memory light as possible, and able to produce and speak to C ABI.

Nim and Lua are in that pasture. Being fast, memory light, and the C interop are the key features of Lua.
Post reply on HN