11 ms·
Porting Swift to Haiku
- bantunes 9y agoI just feel like this project has lost track of priorities, or doesn't want to be a credible alternative OS anymore. As a long time fan of the project - who cares about Swift? Where's the next release?
- aargh_aargh 9y agoOpen source community (as opposed to corporate-sponsored open source) has never worked that way. There are different people focusing on different things. Speed of the release team has no bearing on progress of other activities. It's likely not even the same people.
- yardie 9y ago> who cares about Swift? Someone, obviously, cares. They took the time to port it. These same sentiments were said about another alternative open source OS 20 years ago. And yet, here we are 20 years later and it powers everything from supercomputers to mobile phones and TVs
- Quequau 9y ago> Someone, obviously, cares. They took the time to port it. Yeah, and I have to figure that with Swift being Apple's darling right now that there's the opportunity to attract more interest from idle developers that otherwise wouldn't have given Haiku a moment's thought.
- throwaway7645 9y agoIf I had to guess, it looks like someone wanted a really fast language with high level features. They could've also ported D, Rust, Nim...etc, but Swift is not a bad one to port. What is most of Haiku written in, C++? I think Swift would be a good app language now that it is Open Source.
- yjftsjthsd-h 9y agoI believe there is also a working Rust port. Still, more options is nice.
- petecox 9y agoIf they have LLVM up and running then any language that depends on it (swift, rust) should be doable.
- steveklabnik 9y agohttps://forge.rust-lang.org/platform-support.html https://forge.rust-lang.org/platform-support.html * i686-unknown-haiku * x86_64-unknown-haiku They're basically cross-compile only, Tier 3 supported at the moment.
- jessic4h 9y agoIt hasn't been packaged yet, but I've both bootstrapped rustc & cargo, and also compiled rustc & cargo on Haiku itself from the bootstrap packages, so it shall be self-hosting from here on out.
- steveklabnik 9y agoExcellent!
- yjftsjthsd-h 9y agoA credible OS needs applications. So ports matter, and languages matter.
- bebop 9y agoThis is a Google Summer of Code project. So in essence this is an R&D project that is "free" for the community. The Haiku devs are busy working on getting a Beta 1 release that should be here real soon now. Package management is in and the infrastructure around it is being worked on.
- slantyyz 9y ago>> I just feel like this project has lost track of priorities I've been following the development of Haiku (OpenBeOS) on and off since BeOS got discontinued -- for something like 16 years now. While the effort and progress of the Haiku team is commendable, 16 years is a long time to produce an OS, so one might argue that they never had a good grasp of their priorities in the first place. In the 16 years since OpenBeOS was announced, the world has changed drastically. I remember running BeOS on a Pentium II, and it was amazing... at the time. It did some stuff that Windows and MacOS couldn't easily do performance-wise, because of its time slicing. I remember simultaneously playing back four or five videos on BeOS at the same time without any hiccups, and you could barely do that with two videos on Windows on the same hardware. Because modern processors are so powerful, even on phones, most of the benefits I wanted out of OpenBeOS (Haiku) around 2000 no longer have value today. I still follow Haiku's progress because of some BeOS sentimentality, but to me, it's now a novelty more than anything.
- waddlesplash 9y agoIt's kind of off-topic for this thread, but I think there are quite a number of arguments to be made for Haiku's continuing relevancy (although I'm clearly biased :). You're right of course about performance being much less of a big deal these days (Haiku still far outshines even Linux in efficiency, though not in raw speed, mostly due to our lack of GPU acceleration). Instead, the relevancy now mostly has to do with the unity -- or rather the lack thereof -- amongst NIX operating systems. While Linux dominates the server market, the "year of the Linux desktop" that everyone's been hoping will arrive for at least a decade now hasn't arrived. Sure, there are new challengers now and again but most of the problems and criticisms of Linux aren't about the look and feel, but usually fall on a more fundamental level: "Stuff breaks and then it's impossible to fix." -- "My audio drivers don't work and this tutorial to troubleshoot it is incomprehensible to me." -- "I took some updates and now Kdenlive doesn't export audio anymore." Haiku is very different in this respect because its underlying architecture is the one thing Linux/BSDs are not and never will be: unified. The entire system, kernel to HTTP client to file manager, is developed by one team on one infrastructure inside one git repository. Which means as a result, you always know whose fault it is when something breaks (ours), and that when we fix it, it'll appear in the "nightly" update channel by the next day. It also means that there's no long series of configuration changes to try when something doesn't work; almost universally, stuff either works or it doesn't. Really -- there's only one exception to this I can think of (relating to a bug in our port of FreeBSD's Intel WiFi drivers.) Linux has been trying for a more unified system both up front (e.g. elementaryOS) and in back (systemd...), but the more I use it, the less I want to use it and the more I want to use Haiku.
- jlebrech 9y agothe bare minimum it needs is an IDE that can be used to code apps for the OS itself. and after that being able to run all kinds of programming languages. Personally i'd like to see the latest version of ruby work and postgres. But also docker support would suffice too.
- yjftsjthsd-h 9y agoDocker would be nice, but keep in mind that it would require running a Linux kernel in virtualization (Haiku has a POSIX layer but isn't directly Linux compatible). Still, if Macs can do it, there's no reason it couldn't work.
- girvo 9y ago> IDE that can be used to code apps for the OS itself I'm pretty sure Haiku has exactly that already? Pretty sure it did last time I ran it...
- throwaway91111 9y agoHaiku has an editor. Perhaps that's what you're remembering?
- coldtea 9y ago>the bare minimum it needs is an IDE Huh? Wouldn't the "bare minimum" be a programming editor?
- bebop 9y agoYou can run Qt Creator, which I think is one of the best C++ IDE's out there.
- quux 9y agoI wonder what the plan is for getting swift interop with C++, given that all the Be/Haiku APIs are C++ (IIRC) and swift has no ability to call into C++ code directly.
- mhh__ 9y agoIf you want to see one way of doing this, have a look at how D does it: The function mangling and v-table (for single inheritance) are matched between the two languages.
- Someone 9y agoNitpick: C++, the language, has function name mangling nor v-tables. Both are implementation-specific (and need not even be identical on a single platform. Early C++ compilers on Windows were incompatible with each other, for example)
- dzonga 9y agoyou can call c/c++/obj-c functions from swift
- sswezey 9y agoYou can call C and Obj-C. You can't call C++ code directly, it would have to go through a C/Obj-C shim first.
- FreeFull 9y agoHaiku is POSIX compatible, so at the very least there are the standard C APIs. It is true you need to call into C++ for things like GUIs though (unless you use a port of a C GUI library).
- oscargrouch 9y agoFor now i think you can just wrap it all up in C headers, and implement them in C++, calling the right API. But giving the way the Swift compiler is itself written in C++ and tied to the LLVM, i bet it will be "easy" for the Swift compiler team to create interoperability between C++ and Swift. I think their current goal with ABI compability is one step in that direction.. so it will be just a question of Swift understanding C++ mangling in elf/coff/mach-o objects for the link time, and interpret C++ headers using Clang for the compile time. Given all that, is not hard to predict that Swift will probably have the best interop with C++ code than any other language out there.
- iwantminus 9y agoI don't think swift is enough mature language for this..
- akerro 9y agoFor this immature OS?
- petepete 9y agoI do not think swift is enough mature language for this fine O S
- coldtea 9y agoYes, because Haiku is used in business critical applications...
- waddlesplash 9y agoTuneTracker, the radio broadcasting system from the BeOS days, uses Haiku now: http://tunetrackersystems.com/ http://tunetrackersystems.com/ -- so that's one "business critical" application, at least.
- imron 9y agoThe Haiku OS Could use a modern language Port Swift to Haiku
- PeCaN 9y agoTo be fair, it does have Rust (but no Cargo port yet). And Go, if that counts as a “modern” language.
- yellowapple 9y agoGreat to see. I personally don't use Swift (and don't really want to use Swift), but I do use Haiku, and more language support means more software, so I'm all for it.
- desireco42 9y agoI get it is not related, but, what are some of the things people do with Haiku? You can browse the web, what else? What other languages are supported, is there Haiku Ruby?
- waddlesplash 9y agoYes there is: https://github.com/haikuports/haikuports/blob/master/dev-lang/ruby/ruby-2.2.7.recipe https://github.com/haikuports/haikuports/blob/master/dev-lan...
- PeCaN 9y ago> You can browse the web, what else? There's a decent office suite, Vim, IRC client, etc > What other languages are supported, is there Haiku Ruby? The usual complement of scripting languages (Ruby, Python, Perl, Lua), any JVM language, Go, partially working ports of Haskell and Mercury, Rust (no Cargo port yet), probably some others.
- desireco42 9y agoThank you very much for taking the time to clarify this for me.
- cosinetau 9y agoI am really sad this isn't about writing swift as a haiku.
- deavmi 9y agoThis is gonna ba dank. Also first time seeing Haiku mentioned here.
- tracker1 9y agoI know it's blasphemous... but wouldn't mind seeing Haiku as an electron target platform. But I've thought that would be a good way to go for many things since first playing with ChromeOS.