Re: Tips on TCP socket to postgresql middleware

2022-02-23 Thread eugene via Digitalmars-d-learn
On Tuesday, 22 February 2022 at 20:19:39 UTC, Chris Piker wrote: On Monday, 21 February 2022 at 07:00:52 UTC, eugene wrote: On Monday, 21 February 2022 at 04:46:53 UTC, Chris Piker wrote: On Sunday, 20 February 2022 at 18:00:26 UTC, eugene wrote: I'm adverse to reading it closely since there wa

Re: Tips on TCP socket to postgresql middleware

2022-02-23 Thread eugene via Digitalmars-d-learn
On Tuesday, 22 February 2022 at 20:19:39 UTC, Chris Piker wrote: credit you for the basic ideas As you might have been already noted, the key idea is to implement SM explicitly, i.e we have states, messages, actions, transitions and extremely simple engine (reactTo() method) Switch-based imple

Re: how to return map(fn)

2022-02-23 Thread steve via Digitalmars-d-learn
Thank you both a lot for your help. I am new to D so all of this is incredibly helpful. This seems like an amazing community! @Ali I will have a look at std.functional as I think this is really what I was looking for. Until then, I have solved the problem with a simple class (e.g. below). I'm

Will it be possible to write a GCC frontend in D?

2022-02-23 Thread rempas via Digitalmars-d-learn
I'm using a book called "modern compiler design (version 2)" to learn how to create compiler and I thought about learning and applying this knowledge on writing a GCC frontend just for fun to see where this gets me. However, I've seen some tutorials and I've seen people doing it in C++. Now, I

Re: Will it be possible to write a GCC frontend in D?

2022-02-23 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 23 February 2022 at 19:58:45 UTC, rempas wrote: I'm using a book called "modern compiler design (version 2)" to learn how to create compiler and I thought about learning and applying this knowledge on writing a GCC frontend just for fun to see where this gets me. However, I've see

Re: Will it be possible to write a GCC frontend in D?

2022-02-23 Thread Adam D Ruppe via Digitalmars-d-learn
On Wednesday, 23 February 2022 at 19:58:45 UTC, rempas wrote: Will it be possible to write a GCC frontend in D? I should hope so, otherwise gdc wouldn't exist, yet it does.

Re: Will it be possible to write a GCC frontend in D?

2022-02-23 Thread rempas via Digitalmars-d-learn
On Wednesday, 23 February 2022 at 20:06:58 UTC, bachmeier wrote: Not sure if this is the same thing (a link would have helped) but [this is done in C](https://www.cs.usfca.edu/~galles/compilerdesign/C/csupport.html) Thank you! However, one things that I didn't mentioned is that GCC was once

Re: Will it be possible to write a GCC frontend in D?

2022-02-23 Thread rempas via Digitalmars-d-learn
On Wednesday, 23 February 2022 at 20:19:04 UTC, Adam D Ruppe wrote: I should hope so, otherwise gdc wouldn't exist, yet it does. [extern (C++)](https://github.com/D-Programming-GDC/gdc/tree/master/gcc/d/dmd) and manually creating the decorations. At least that's my understanding of browsing t

Re: Will it be possible to write a GCC frontend in D?

2022-02-23 Thread Adam D Ruppe via Digitalmars-d-learn
On Wednesday, 23 February 2022 at 20:42:10 UTC, rempas wrote: Do you know where is the updated GDC branch btw? There is no branch, it is just part of the upstream mainline. see: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=gcc/d/dmd;h=454baa71a0d270fb891acdda6fd0215a3d6cb588;hb=HEAD and yeah i

Re: how to return map(fn)

2022-02-23 Thread Steven Schveighoffer via Digitalmars-d-learn
On Wednesday, 23 February 2022 at 16:48:00 UTC, steve wrote: Thank you both a lot for your help. I am new to D so all of this is incredibly helpful. This seems like an amazing community! @Ali I will have a look at std.functional as I think this is really what I was looking for. Until then, I

Re: Tips on TCP socket to postgresql middleware

2022-02-23 Thread Tejas via Digitalmars-d-learn
On Wednesday, 23 February 2022 at 09:34:56 UTC, eugene wrote: On Tuesday, 22 February 2022 at 20:19:39 UTC, Chris Piker wrote: [...] As you might have been already noted, the key idea is to implement SM explicitly, i.e we have states, messages, actions, transitions and extremely simple engine

Re: Tips on TCP socket to postgresql middleware

2022-02-23 Thread eugene via Digitalmars-d-learn
On Thursday, 24 February 2022 at 06:30:51 UTC, Tejas wrote: On Wednesday, 23 February 2022 at 09:34:56 UTC, eugene wrote: On Tuesday, 22 February 2022 at 20:19:39 UTC, Chris Piker wrote: [...] As you might have been already noted, the key idea is to implement SM explicitly, i.e we have states

Re: Will it be possible to write a GCC frontend in D?

2022-02-23 Thread rempas via Digitalmars-d-learn
On Wednesday, 23 February 2022 at 21:33:00 UTC, Adam D Ruppe wrote: There is no branch, it is just part of the upstream mainline. see: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=gcc/d/dmd;h=454baa71a0d270fb891acdda6fd0215a3d6cb588;hb=HEAD Oh, this is what I mean by saying "branch" so my mi

Re: Tips on TCP socket to postgresql middleware

2022-02-23 Thread eugene via Digitalmars-d-learn
On Thursday, 24 February 2022 at 06:54:07 UTC, eugene wrote: Wagner F. et al Modeling Software with Finite State Machines: A Practical Approach I've adopted some ideas from this book to POSIX/Linux API. Ah! I also have EDSM for bare metal (AVR8 to be exact) There is [some description](http: