digitalmars.D.announce - styx, a programming languange written in D, is on the bootstrap path
- Basile B. (5/5) Jan 14 2021 This is the last[1] occasion to speak about a programming
- Daniel N (2/8) Jan 14 2021 Love the design FWIW.
- Basile B. (14/24) Jan 15 2021 Initially I wanted something like libdparse + dsymbol, i.e a
- Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= (8/11) Jan 15 2021 Interesting project! How did you move from D to Styx? (I assume
- Basile B. (23/35) Jan 15 2021 self-hosting is not started yet, maybe next month, classes are
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (2/4) Jan 15 2021 Can you give examples of what a DotExpression alias is?
- Basile B. (6/10) Jan 15 2021 They allow to pull heavily nested members, similarly as getters
- Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= (20/39) Jan 15 2021 Ah, smart. I've been thinking about using an existing d-parser to
- Basile B. (6/29) Jan 18 2021 Yeah, in addition to my real name, I've been invovled in dmd as
- Basile B. (2/9) Jan 18 2021 on the internet nobody knows you're a dog ;)
- Basile B. (2/12) Jan 18 2021 https://de.fakenamegenerator.com/
- Ola Fosheim Grostad (3/6) Jan 19 2021 Awww... And here I thought you were a fellow Norwegian... But I
- Max Haughton (4/14) Jan 19 2021 Thoughts on libfirm? I am thinking about writing an online book
- Basile B. (5/21) Jan 19 2021 There is this small wiki page
- Basile B. (6/13) Jan 16 2022 It turns out that finally everything was translated manually.
- Brian Callahan (4/18) Jan 16 2022 Interesting language. I was able to make a quick port to OpenBSD;
- Basile B. (3/6) Jan 16 2022 holly s**t ! I'm a bit surprised that it works, especially
- Brian Callahan (5/13) Jan 16 2022 That's the only thing the port needs. You just have to teach the
- IGotD- (8/14) Jan 18 2021 Interesting project.
This is the last[1] occasion to speak about a programming language initiatly made in D, as the bootstrap phase is very near. I'd like to thank the D compiler developers, that let me work on DMD even if I borrow another path. [1] : https://gitlab.com/styx-lang/styx
Jan 14 2021
On Thursday, 14 January 2021 at 17:51:51 UTC, Basile B. wrote:This is the last[1] occasion to speak about a programming language initiatly made in D, as the bootstrap phase is very near. I'd like to thank the D compiler developers, that let me work on DMD even if I borrow another path. [1] : https://gitlab.com/styx-lang/styxLove the design FWIW.
Jan 14 2021
On Thursday, 14 January 2021 at 20:21:42 UTC, Daniel N wrote:On Thursday, 14 January 2021 at 17:51:51 UTC, Basile B. wrote:Initially I wanted something like libdparse + dsymbol, i.e a clean split of the AST the semantic phase, semi-success. There's still a Symbol class but the types have been moved to the AST. Another design idea is that I wanted to have useful visitors, i.e that always process a whole compilation unit, but that did not work well so now visitors are pretty much state-less and when a "state" is required it is stored in scopes, "like in dmd". I quote that because many times I've discovered that, in dmd, if things are done in a way and not another, it's not arbitrary. The main reason for that is that if you want to support out of order declarations and "auto" you have to drive the semantics like in dmd, declaration -> bodies -> statements -> expressions, and when you reach something that is not known you launch this chain...This is the last[1] occasion to speak about a programming language initiatly made in D, as the bootstrap phase is very near. I'd like to thank the D compiler developers, that let me work on DMD even if I borrow another path. [1] : https://gitlab.com/styx-lang/styxLove the design FWIW.
Jan 15 2021
On Thursday, 14 January 2021 at 17:51:51 UTC, Basile B. wrote:This is the last[1] occasion to speak about a programming language initiatly made in D, as the bootstrap phase is very near.Interesting project! How did you move from D to Styx? (I assume bootstrapping means a self hosting compiler?) Did you write some scripts to translate? I've found myself to sketch new programming languages whenever I hit things in existing languages that I find annoying over the past decade or so. I finally decided to start on a lexer for it... How long did it take you to get where you are now?
Jan 15 2021
On Friday, 15 January 2021 at 09:54:59 UTC, Ola Fosheim Grøstad wrote:On Thursday, 14 January 2021 at 17:51:51 UTC, Basile B. wrote:self-hosting is not started yet, maybe next month, classes are still to be implemented. I plan to use dparse for the most part, not only to convert but also to detect non bootstrapable code or missing features. Then, feature freeze, convert, catch and fix bugs as they will appear when feading the compiler with real food.This is the last[1] occasion to speak about a programming language initiatly made in D, as the bootstrap phase is very near.Interesting project! How did you move from D to Styx? (I assume bootstrapping means a self hosting compiler?) Did you write some scripts to translate?I've found myself to sketch new programming languages whenever I hit things in existing languages that I find annoying over the past decade or so.This is a noble reason. Styx has no such motivations. It is simpler than D1 for example and has no killer feature, just 3 or 4 creative things are - optional break/continue expression - explicit overloads - DotExpression aliases (they have been proposed to DMD this summer when I worked "under cover" as Nils.) - pointers to member function is very different from what I have seen so far (no fat pointer)I finally decided to start on a lexer for it... How long did it take you to get where you are now?The project exists since several years (2017-04-13 20:05:51) but is only actively developed since july 2020. The game changers were: - to use LLVM instead of libfirm - to that some part of the initial design were bad - proper lvalue implementation
Jan 15 2021
On Friday, 15 January 2021 at 19:18:09 UTC, Basile B. wrote:- DotExpression aliases (they have been proposed to DMD this summer when I worked "under cover" as Nils.)Can you give examples of what a DotExpression alias is?
Jan 15 2021
On Friday, 15 January 2021 at 19:25:38 UTC, Per Nordlöw wrote:On Friday, 15 January 2021 at 19:18:09 UTC, Basile B. wrote:They allow to pull heavily nested members, similarly as getters are sometime used and are supposed to make object composition easier. This [1] is the test file used to develop the feature. [1] https://gitlab.com/styx-lang/styx/-/raw/51611f2d5c023c0edfe97968b543660ae2e89c26/tests/backend/dotexp_alias.sx- DotExpression aliases (they have been proposed to DMD this summer when I worked "under cover" as Nils.)Can you give examples of what a DotExpression alias is?
Jan 15 2021
On Friday, 15 January 2021 at 19:18:09 UTC, Basile B. wrote:I plan to use dparse for the most part, not only to convert but also to detect non bootstrapable code or missing features.Ah, smart. I've been thinking about using an existing d-parser to convert unit tests from D to my Dex syntax (experimental project). Modifying the compiler is fun, but writing unit tests is not...This is a noble reason. Styx has no such motivations. It is simpler than D1 for example and has no killer feature,What made D1 attractive to many C++ programmers was that it was stripped down. Also, many language designers get tempted to add many features that are hollow, then they regret it and rip it all out again (lots of wasted effort and source code). So, being very restrictive and patient is a good thing, I believe. The truly good ideas takes time to "grow" (in ones mind).just 3 or 4 creative things are - optional break/continue expression - explicit overloads - DotExpression aliases (they have been proposed to DMD this summer when I worked "under cover" as Nils.) - pointers to member function is very different from what I have seen so far (no fat pointer)"Nils" is a very scandinavian name? :-) It will be interesting to see what your codebase looks like after moving to self hosted. I assume you will keep us up to date.But that is only 6 months? Then you have come quite far if you are already going for self hosting. I'm still rethinking my lexer. Hehe. Like, do I want to make keywords tokens or should they just be lexed as identifiers? I did the first, but think maybe the last is more flexible, so a rewrite... is coming. ;)I finally decided to start on a lexer for it... How long did it take you to get where you are now?The project exists since several years (2017-04-13 20:05:51) but is only actively developed since july 2020. The game changers were: - to use LLVM instead of libfirm - to that some part of the initial design were bad - proper lvalue implementation
Jan 15 2021
On Friday, 15 January 2021 at 19:40:11 UTC, Ola Fosheim Grøstad wrote:On Friday, 15 January 2021 at 19:18:09 UTC, Basile B. wrote:Yeah, in addition to my real name, I've been invovled in dmd as "Nils Lankila" and "Stian Gulpen" which are names generated using specialized services. You can choose to have a swedish name for example.I plan to use dparse for the most part, not only to convert but also to detect non bootstrapable code or missing features.Ah, smart. I've been thinking about using an existing d-parser to convert unit tests from D to my Dex syntax (experimental project). Modifying the compiler is fun, but writing unit tests is not...This is a noble reason. Styx has no such motivations. It is simpler than D1 for example and has no killer feature,What made D1 attractive to many C++ programmers was that it was stripped down. Also, many language designers get tempted to add many features that are hollow, then they regret it and rip it all out again (lots of wasted effort and source code). So, being very restrictive and patient is a good thing, I believe. The truly good ideas takes time to "grow" (in ones mind).just 3 or 4 creative things are - optional break/continue expression - explicit overloads - DotExpression aliases (they have been proposed to DMD this summer when I worked "under cover" as Nils.) - pointers to member function is very different from what I have seen so far (no fat pointer)"Nils" is a very scandinavian name? :-)
Jan 18 2021
On Monday, 18 January 2021 at 17:45:16 UTC, Basile B. wrote:On Friday, 15 January 2021 at 19:40:11 UTC, Ola Fosheim Grøstad wrote:on the internet nobody knows you're a dog ;)[...]Yeah, in addition to my real name, I've been invovled in dmd as "Nils Lankila" and "Stian Gulpen" which are names generated using specialized services. You can choose to have a swedish name for example.
Jan 18 2021
On Monday, 18 January 2021 at 17:51:16 UTC, Basile B. wrote:On Monday, 18 January 2021 at 17:45:16 UTC, Basile B. wrote:https://de.fakenamegenerator.com/On Friday, 15 January 2021 at 19:40:11 UTC, Ola Fosheim Grøstad wrote:on the internet nobody knows you're a dog ;)[...]Yeah, in addition to my real name, I've been invovled in dmd as "Nils Lankila" and "Stian Gulpen" which are names generated using specialized services. You can choose to have a swedish name for example.
Jan 18 2021
On Monday, 18 January 2021 at 17:58:22 UTC, Basile B. wrote:On Monday, 18 January 2021 at 17:51:16 UTC, Basile B. wrote:Awww... And here I thought you were a fellow Norwegian... But I guess a dog is ok too.on the internet nobody knows you're a dog ;)https://de.fakenamegenerator.com/
Jan 19 2021
On Friday, 15 January 2021 at 19:18:09 UTC, Basile B. wrote:On Friday, 15 January 2021 at 09:54:59 UTC, Ola Fosheim Grøstad wrote:Thoughts on libfirm? I am thinking about writing an online book about compiler backends so I'm curious what it's like to work with.[...]self-hosting is not started yet, maybe next month, classes are still to be implemented. I plan to use dparse for the most part, not only to convert but also to detect non bootstrapable code or missing features. Then, feature freeze, convert, catch and fix bugs as they will appear when feading the compiler with real food. [...]
Jan 19 2021
On Tuesday, 19 January 2021 at 12:50:40 UTC, Max Haughton wrote:On Friday, 15 January 2021 at 19:18:09 UTC, Basile B. wrote:There is this small wiki page https://proglangdesign.net/wiki/firm written by myself, so I have not much to add, as I've dropped FIRM at the very beginning of the backend exprimentation.On Friday, 15 January 2021 at 09:54:59 UTC, Ola Fosheim Grøstad wrote:Thoughts on libfirm? I am thinking about writing an online book about compiler backends so I'm curious what it's like to work with.[...]self-hosting is not started yet, maybe next month, classes are still to be implemented. I plan to use dparse for the most part, not only to convert but also to detect non bootstrapable code or missing features. Then, feature freeze, convert, catch and fix bugs as they will appear when feading the compiler with real food. [...]
Jan 19 2021
On Friday, 15 January 2021 at 09:54:59 UTC, Ola Fosheim Grøstad wrote:On Thursday, 14 January 2021 at 17:51:51 UTC, Basile B. wrote:It turns out that finally everything was translated manually. This was a bit painful but also an opportunity to review older parts and to change a details that otherwise would not have been done.This is the last[1] occasion to speak about a programming language initiatly made in D, as the bootstrap phase is very near.Interesting project! How did you move from D to Styx? (I assume bootstrapping means a self hosting compiler?) Did you write some scripts to translate?
Jan 16 2022
On Sunday, 16 January 2022 at 17:09:07 UTC, Basile B. wrote:On Friday, 15 January 2021 at 09:54:59 UTC, Ola Fosheim Grøstad wrote:Interesting language. I was able to make a quick port to OpenBSD; works fine there too. Thanks for your work on this! ~BrianOn Thursday, 14 January 2021 at 17:51:51 UTC, Basile B. wrote:It turns out that finally everything was translated manually. This was a bit painful but also an opportunity to review older parts and to change a details that otherwise would not have been done.This is the last[1] occasion to speak about a programming language initiatly made in D, as the bootstrap phase is very near.Interesting project! How did you move from D to Styx? (I assume bootstrapping means a self hosting compiler?) Did you write some scripts to translate?
Jan 16 2022
On Sunday, 16 January 2022 at 18:53:45 UTC, Brian Callahan wrote:I was able to make a quick port to OpenBSD; works fine there too. Thanks for your work on this! ~Brianholly s**t ! I'm a bit surprised that it works, especially because of the way linking is done.
Jan 16 2022
On Sunday, 16 January 2022 at 19:40:33 UTC, Basile B. wrote:On Sunday, 16 January 2022 at 18:53:45 UTC, Brian Callahan wrote:That's the only thing the port needs. You just have to teach the styx compiler how to link things on OpenBSD. It's incredibly straightforward :) ~BrianI was able to make a quick port to OpenBSD; works fine there too. Thanks for your work on this! ~Brianholly s**t ! I'm a bit surprised that it works, especially because of the way linking is done.
Jan 16 2022
On Thursday, 14 January 2021 at 17:51:51 UTC, Basile B. wrote:This is the last[1] occasion to speak about a programming language initiatly made in D, as the bootstrap phase is very near. I'd like to thank the D compiler developers, that let me work on DMD even if I borrow another path. [1] : https://gitlab.com/styx-lang/styxInteresting project. A few questions. I see that you use "var auto name" in order to automatically infer the type. Would it be possible just using "var name" for that, similar to other popular languages. There is currently no information about memory management, is this something you have an idea how to design right now?
Jan 18 2021
On Monday, 18 January 2021 at 18:03:12 UTC, IGotD- wrote:On Thursday, 14 January 2021 at 17:51:51 UTC, Basile B. wrote:yes, it would be possible, but it wont be done. In Styx "auto" is a type joker and that's it.This is the last[1] occasion to speak about a programming language initiatly made in D, as the bootstrap phase is very near. I'd like to thank the D compiler developers, that let me work on DMD even if I borrow another path. [1] : https://gitlab.com/styx-lang/styxInteresting project. A few questions. I see that you use "var auto name" in order to automatically infer the type. Would it be possible just using "var name" for that, similar to other popular languages. There is currently no information about memory management, is this something you have an idea how to design right now?
Jan 18 2021
On Monday, 18 January 2021 at 18:03:12 UTC, IGotD- wrote:On Thursday, 14 January 2021 at 17:51:51 UTC, Basile B. wrote:It has a memory management system very comparable to older Delphi (<= 2007) or current FreePascal. So dynamic arrays are reference counted and automatically managed when used a local var. Classes and structures are manually managed but the dtor is automatically called when the instance is a local. This system is proven to work as the compiler itself is now rewritten in styx. (example, the valgrind report after running the compiler with the equivalent of D "-unittest" CLI option : https://gitlab.com/styx-lang/styx/-/jobs/1980055910#L110. To be honest I already knew it will work before implementing ref counting. This has been used for something like 30 years by hundreds and hundreds of programmers.This is the last[1] occasion to speak about a programming language initiatly made in D, as the bootstrap phase is very near. I'd like to thank the D compiler developers, that let me work on DMD even if I borrow another path. [1] : https://gitlab.com/styx-lang/styxInteresting project. A few questions. I see that you use "var auto name" in order to automatically infer the type. Would it be possible just using "var name" for that, similar to other popular languages. There is currently no information about memory management, is this something you have an idea how to design right now?
Jan 16 2022