<unmatched-paren>i was wondering, if rekado_'s ghc bootstrapping doesn't work out, could we write a translator from haskell to ocaml, since they're so similar? i don't know much haskell, so i'm not sure if it has some feature that's impossible to add to ocaml (ocaml does have a `lazy` keyword, btw) <unmatched-paren>we might even be able to reuse the ghc runtime with ocaml's ffi, idk ***ChanServ sets mode: +o rekado_
<rekado_>unmatched-paren: it would be easier to write a translator from non-standard haskell to haskell 98 <rekado_>ML and Haskell are only superficially similar. <rekado_>GHC Haskell is again rather different from Haskell 98 ***iridium.libera.chat sets mode: +o oriansj
<fossy>is ghc haskell the modern standard? or are there other dialects of haskell still used <rekado_>there are newer versions of the standard, but there really is only GH <rekado_>other compilers exist, but they are written in the GHC dialect <rekado_>so they are no viable targets for bootstrapping <rekado_>but I think we can make some progress here with STGHugs <rekado_>the non-standard Argv.lhs may not be needed at all. This escape hatch to embed plain C in Haskell files may not be needed, because we *can* translate this to standard Haskell. <rekado_>just looking at ``prog_argv'' – there is a pure Haskell way to access argv, so we could use that, I guess <rekado_>it has a different type – IO String instead of FASTSTRING, but I think that with some newtype declarations we could work around that <muurkha>GHC has pretty much eclipsed everything else yeah <muurkha>janus__: seen the discussion here over the last few days? <janus__>no, i will read it in the new few hours :) ***janus__ is now known as janus
***Noisytoot_ is now known as Noisytoot
<oriansj>unmatched-paren: well to your exact question, yes that could be done. Even if rekado's work is a success, anyone who feels that would be a fun project could certainly do that. To the more likely alternative bootstrap paths: blynn's Haskell compiler is trivial to bootstrap and appears to be actively developed. So once it reaches a large enough subset, it could be used to build GHC directly. But ultimately the solution will be decided by <oriansj>people who are hacking on it with the right idea. <unmatched-paren>oriansj: even after we've _technically_ bootstrapped all the things that matter, we're still relying on all these gross hacks <unmatched-paren>muurkha: yes, though i am currently working on bootstrapping pascal myself; i'm in the early stages, tho, so i'm not really talking about it here much yet <unmatched-paren>sadly none of the currently available pascal compilers will be adequate <unmatched-paren>i'm not particularly knowledgable about C land, so although it _might_ be possible to use gpc with really old gcc, even rekado_ couldn't do it, so i don't fancy my chances <unmatched-paren>pascal is popular in that hellscape known as the commercial software industry, not so much in the libre world; however, the <https://nim-lang.org> compiler was originally written in Object Pascal, and i like nim :) <roptat>slycelote_, the main limitation right now is that it targets ocaml 4.07 <roptat>but that's what we use for it in Guix, the later OCaml versions are still not bootstrapped <roptat>at least we used it to perform DDC on ocaml 4.07 ;) <roptat>we'd have to find the bootstrap commits starting from ocaml 4.07 to the current version, otherwise the plan was to port camlboot to the more recent versions <roptat>it shouldn't be missing too much, but we have to implement the missing features <unmatched-paren>i guess i'll try to find those bootstrap commits, because my pascal compiler will otherwise be pretty useless... <roptat>one reason why we targetted 4.07 is that starting from 4.08, the compiler needs to use menhir to generate its parser, and menhir is written in ocaml <Hagfish>(sorry, i couldn't resist. i knew you must have been going to get a reference) <unmatched-paren>then, i find out that pascal isn't bootstrapped and try to build it with existing stuff <unmatched-paren>urgh, i'll rewrite it in rUsT then, since that's the only other language that i'm comfortable with... <unmatched-paren>it's a working interpreter written in a language i'm very comfortable working in, so why not :) <unmatched-paren>hm, do i add my name to the license copyright, since i'm forking it? <roptat>yes, once you do modifications, you own copyright on those modifications <stikonas>yes, that might work since rust is bootstrapped <stikonas>and right now mrustc can build rustc-1.54, so it's not even that far behind the latest version <unmatched-paren>obviously rust is not the best idea re writing bootstrap programs, but i am not a good c programmer <muurkha>pascal is popular in the commercial software industry? <muurkha>unmatched-paren: you could write it in OCaml 4.07 too <unmatched-paren>no sane free source developer would use an expensive proprietary ide/compiler like Delphi, but it still exists and is being developed, so it must be selling somehow <unmatched-paren>apparently there's quite a lot of developers who refuse to learn anything else so they just produce commercial pascal programs <unmatched-paren>muurkha: true, but i've found an existing tiny rust pascal interpreter which can do basic stuff, so i'd be better off forking that <unmatched-paren>obviously not as popular as javascript :) and it's certainly getting less popular. <unmatched-paren>i kind of meant 'more popular' in the commercial software industry, not 'very popular', sorry for the bad wording <muurkha>oh, I'd believe "more popular" for sure <muurkha>and ⅙ the popularity of SQL Server isn't that bad <unmatched-paren>there's only two free source programs (that are not part of the freepascal project itself) that i know that use pascal: double commander (gui file manager) and the old nim compiler <muurkha>yeah, bootstrapping nim could be pretty important <unmatched-paren>it's a neat language, and i want to look into it more, but i have a rule where i won't use a non-bootstrappable language <unmatched-paren>most important changes first: change that blasphemous `README.md` to a beautiful `readme.org` :) <stikonas>hmm, looks like rascal is quite limited subset of pascal <unmatched-paren>i had to make some minor modifications to make it compile when cargo's edition was set to 2021, but apart from that it works fine <stikonas>well, I just tried some sample programs from tutorials and it almost always complains <stikonas>but yes, that's much better than nothing <unmatched-paren>it seems like it can't handle `char`s yet, which is a pretty gaping hole <unmatched-paren>they have the same syntax as strings in pascal, which makes it quite hard to tell when the programmer means a string and when they mean a char <unmatched-paren>as i said, you can't tell whether 'a' is a string or a char with just a parser <unmatched-paren>you need to do type analysis on the functions and procs you're passing it to