Re: [dylan] The Future of Dylan: What do we use it for?
Bruce Mitchener <[email protected]> Tue, 9 Sep 2014 08:12:15 +0700
| Newsgroups | gmane.comp.lang.dylan.gwydion.devel |
|---|---|
| Message-ID | <CA+esKjMU_TsKqydm0-Rc3NZyUpjOCKxhgLMsChrOwBTe+Pnj=A@mail.gmail.com> |
--===============0939778292== Content-Type: multipart/alternative; boundary=001a11c2a3e03c7ff3050297a098 --001a11c2a3e03c7ff3050297a098 Content-Type: text/plain; charset=UTF-8 On Tue, Sep 9, 2014 at 2:03 AM, Andrew Glynn <[email protected]> wrote: > A while ago I did a bit of work on a Dylan game engine, but I ended up > getting kind of bogged down in various details, many of which were > unrelated to Dylan. Although I might be getting ahead of things here, I'll > briefly mention a couple of issues that could make the Dylan side of game > development easier in the future. > No problem with jumping ahead ... this topic didn't seem to result in much conversation. > First, Bruce (and others?) already put in a lot of work on improving > melange, and those improvements certainly made my life quite a bit easier. > But it's still not as painless as one might hope. Would the LLVM back-end > help for auto-generating FFI stuff? For example, integrating libclang > somehow? Being able to integrate with C++ (in addition to C) would be even > better, considering all the libraries it would make available, but I don't > know how complicated that would be. > C++ would be pretty difficult / a lot of work. The process of wrapping C APIs could be better though. As you say, we could use libclang to implement parts of melange. That's a decent amount of work, but doable. Also, melange could be integrated as a tool in our new build tool, Deft, which would make it easier to work with in some ways. > Second: value types. I'm not trying to create fancy AAA blockbuster games, > but even for a little toy physics engine I've had to replace my <vec2> > class and its useful library of vector math functions with a bunch of raw > <single-float>s in order to get acceptable performance. To be fair, I > didn't profile to see why the class-based version was so much slower, but I > imagine having unboxed, stack allocated value types (and vectors of them > allocated contiguously) would be helpful. > This sounds like something interesting. Can you provide more detail, perhaps in a new thread? Things like how you were defining <vec2> would be useful, as well as what operations you were defining for it and how they were implemented. I did a bit of a write up of how this sort of thing can generate good code in a blog post about the type system: http://dylanfoundry.org/2014/08/28/type-system-overview/ Look for the discussion of <float32x4>. So ... I'd love to see what you were running into as a new thread. :) - Bruce --001a11c2a3e03c7ff3050297a098 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On T= ue, Sep 9, 2014 at 2:03 AM, Andrew Glynn <span dir=3D"ltr"><<a href=3D"m= ailto:[email protected]" target=3D"_blank">[email protected]<= /a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:= 0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);= border-left-style:solid;padding-left:1ex"><div dir=3D"ltr">A while ago I di= d a bit of work on a Dylan game engine, but I ended up getting kind of bogg= ed down in various details, many of which were unrelated to Dylan. Although= I might be getting ahead of things here, I'll briefly mention a couple= of issues that could make the Dylan side of game development easier in the= future.</div></blockquote><div><br></div><div>No problem with jumping ahea= d ... this topic didn't seem to result in much conversation.</div><div>= =C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0= .8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-s= tyle:solid;padding-left:1ex"><div dir=3D"ltr"><div></div><div>First, Bruce = (and others?) already put in a lot of work on improving melange, and those = improvements certainly made my life quite a bit easier. But it's still = not as painless as one might hope. Would the LLVM back-end help for auto-ge= nerating FFI stuff? For example, integrating libclang somehow? Being able t= o integrate with C++ (in addition to C) would be even better, considering a= ll the libraries it would make available, but I don't know how complica= ted that would be.</div></div></blockquote><div><br></div><div>C++ would be= pretty difficult / a lot of work. The process of wrapping C APIs could be = better though. As you say, we could use libclang to implement parts of mela= nge. That's a decent amount of work, but doable.</div><div><br></div><d= iv>Also, melange could be integrated as a tool in our new build tool, Deft,= which would make it easier to work with in some ways.</div><div>=C2=A0</di= v><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;borde= r-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid= ;padding-left:1ex"><div dir=3D"ltr"><div>Second: value types. I'm not t= rying to create fancy AAA blockbuster games, but even for a little toy phys= ics engine I've had to replace my <vec2> class and its useful lib= rary of vector math functions with a bunch of raw <single-float>s in = order to get acceptable performance. To be fair, I didn't profile to se= e why the class-based version was so much slower, but I imagine having unbo= xed, stack allocated value types (and vectors of them allocated contiguousl= y) would be helpful.</div></div></blockquote><div><br></div><div>This sound= s like something interesting. Can you provide more detail, perhaps in a new= thread? Things like how you were defining <vec2> would be useful, as= well as what operations you were defining for it and how they were impleme= nted.</div><div><br></div><div>I did a bit of a write up of how this sort o= f thing can generate good code in a blog post about the type system:</div><= div><br></div><div>=C2=A0 <a href=3D"http://dylanfoundry.org/2014/08/28/typ= e-system-overview/">http://dylanfoundry.org/2014/08/28/type-system-overview= /</a></div><div><br></div><div>Look for the discussion of <float32x4>= .</div><div><br></div><div>So ... I'd love to see what you were running= into as a new thread. :)</div><div><br></div><div>=C2=A0- Bruce</div><div>= <br></div></div></div></div> --001a11c2a3e03c7ff3050297a098-- --===============0939778292== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ hackers mailing list [email protected] https://lists.opendylan.org/mailman/listinfo/hackers --===============0939778292==--