Re: Dgame 0.3.2
On Saturday, 22 November 2014 at 15:38:35 UTC, Namespace wrote: On Saturday, 22 November 2014 at 06:49:04 UTC, uri wrote: On Saturday, 22 February 2014 at 10:00:46 UTC, Namespace wrote: On a side note, the author in the code is Stewart but it is still me :). It is my middle name, which the auto-header vim script grabs from the login. Yes that I have also seen. Otherwise, I would have used your github name. :) Cheers, ed (stewart) I just saw it up on the website, very cool, thanks :) I have to thank. Another game looks great on the page and it's nice to see that Dgame is used. The Dgame website has been down for a while now ... is it coming back? /uri Since I left D a while ago, I quit the domain. But the website itself is still on my webspace: http://rswhite.de/dgame4/ Cool, thanks :) Sorry to hear you've left D behind! Hopefully it's only temporarily because I'm finding Dgame is great fun to use. Cheers, uri
Temple v0.7.0: New API, Fewer Allocations
Hey all, I'd like to announce the release of Temple 0.7.0, a compile time templating engine for D. It's been a while since the last major release, and 0.7.0 brings a lot of changes and enhancements. Temple is a library for embedding arbitrary D code in text templates, similar to Vibe.d's Diet, or JS's Jade, but agnostic about the format of the text that it should output (much more similar to Ruby's ERB). An example, dynamically rendering text with embedded D code: --- auto hello = compile_temple!("Hello, <%= var.name %>"); auto ctx = new TempleContext; ctx.name = "Walter"; writeln(hello.toString(ctx)); // Writes "Hello, Walter" to stdout hello.render(stdout, ctx);// also writes "Hello, Walter" to stdout --- Templates can be arbitrarily nested, and the library includes a feature for 'yield'ing partial templates into a larger layout template. The "Filter" feature can dynamically transform template text as it's written to the output buffer, and can be used to build concepts like Safe Strings and automatic HTML escaping filters. I encourage you to look at some of the examples in the (fairly extensive) README. Here's the GitHub repo: https://github.com/dymk/temple For previous users of Temple, I'm sorry that the API has broken backwards compatibility. If you'd like to keep the old API, please keep tracking the 0.6.x versions. However, upgrading to 0.7.x should be a straightforward task of changing some 'alias'es to 'auto', and 'Temple{etc}' to 'compile_temple_{etc}'. More information on upgrading is available on the release page, here: https://github.com/dymk/temple/releases/tag/v0.7.0 Thank you! -- Dylan
Re: DerelictSASS
On 11/23/2014 1:44 AM, ponce wrote: A tip to keep in mind when translating C/C++ headers: --- enum Sass_Tag { SASS_BOOLEAN, SASS_NUMBER, SASS_COLOR }; --- is best translated as --- alias Sass_Tag = int; enum : Sass_Tag { SASS_BOOLEAN, SASS_NUMBER, SASS_COLOR } --- That way your enum isn't namespaced. I completely missed that. @Lodin The reason ponce suggests this is that when using the binding in D, it's a good idea to for it to look as close to the C code as possible. That way, existing C code (especially examples from documentation and tutorials) can more easily be ported to D. Since C enums aren't namespaced, they shouldn't be in the binding, either. Some people may prefer the bindings to include more D features, but IMO if you're going to put something out there for everyone and anyone to use, particularly if you want to be consistent with other Derelict bindings, it's better to avoid them.
Re: Visual Studio Community and .NET Open Source
On Friday, 21 November 2014 at 12:54:05 UTC, Paulo Pinto wrote: On Friday, 21 November 2014 at 08:02:07 UTC, philippecp wrote: .Net does have a pretty damn good GC. It is both a moving garbage collector (improves locality, reduces heap fragmentation and allows for memory allocation to be a single pointer operation) and a generational garbage collector (reduces garbage collection cost by leveraging heuristic that most collected objects are usually very young). I believe their server GC is even concurrent to avoid long stop the world pauses. The problem is I'm not sure how much of those principles can be applied to D. I can see moving objects being problematic given that D supports unions. Another thing to consider is that .Net's GC is the results of many man years of full time work on a single platform, while D is mostly done by volunteers in their spare time for many platforms. It would probably require a lot of work to port, unless you're volunteering yourself for that work;) ... The official .NET runs on x86, x64, ARM (including cortex variants), MIPS. It scales from embedded hardware running with 512KB of flash and 128KB of RAM (http://www.netmf.com/get-started/), all the way up to Azure deployments. http://www.microsoft.com/net/multiple-platform-support -- Paulo I meant operating system, not architecture. At this point it still only runs on Windows based OS.
Re: DerelictSASS
A tip to keep in mind when translating C/C++ headers: --- enum Sass_Tag { SASS_BOOLEAN, SASS_NUMBER, SASS_COLOR }; --- is best translated as --- alias Sass_Tag = int; enum : Sass_Tag { SASS_BOOLEAN, SASS_NUMBER, SASS_COLOR } --- That way your enum isn't namespaced. On Saturday, 22 November 2014 at 13:15:47 UTC, Mike Parker wrote: However, I do recommend you combine all the files into one -- sass.d. When I first started Derelict, I separated everything out into multiple modules for every binding. Over time, I found it makes maintenance easier to implement a binding in one module if it is feasible. Going to keep that in mind.
Re: Dgame 0.3.2
On Saturday, 22 November 2014 at 06:49:04 UTC, uri wrote: On Saturday, 22 February 2014 at 10:00:46 UTC, Namespace wrote: On a side note, the author in the code is Stewart but it is still me :). It is my middle name, which the auto-header vim script grabs from the login. Yes that I have also seen. Otherwise, I would have used your github name. :) Cheers, ed (stewart) I just saw it up on the website, very cool, thanks :) I have to thank. Another game looks great on the page and it's nice to see that Dgame is used. The Dgame website has been down for a while now ... is it coming back? /uri Since I left D a while ago, I quit the domain. But the website itself is still on my webspace: http://rswhite.de/dgame4/
Re: DerelictSASS
On Saturday, 22 November 2014 at 13:15:47 UTC, Mike Parker wrote: Nothing bad jumps out on a cursory look. However, I do recommend you combine all the files into one -- sass.d. When I first started Derelict, I separated everything out into multiple modules for every binding. Over time, I found it makes maintenance easier to implement a binding in one module if it is feasible. For large libraries like OpenGL and SDL, it's not going to help. For something like SASS, with so few functions and types, it should be the first choice. Granted, the real benefit probably only shows when maintaining several bindings like I do, but I still recommend it as I think it also improves readability. Thank you. I've combined it, and it really looks simpler now.
Re: DerelictSASS
On Saturday, 22 November 2014 at 12:32:50 UTC, Lodin wrote: Hello, I've made a smaill binding to libsass - a C/C++ implementation of popular CSS preprocessor SASS. Binding is dynamic and based on Derelict Project. You can find it here: https://github.com/Lodin/DerelictSASS It is my first attempt to make something like this, so if I did something wrong, please tell. Nothing bad jumps out on a cursory look. However, I do recommend you combine all the files into one -- sass.d. When I first started Derelict, I separated everything out into multiple modules for every binding. Over time, I found it makes maintenance easier to implement a binding in one module if it is feasible. For large libraries like OpenGL and SDL, it's not going to help. For something like SASS, with so few functions and types, it should be the first choice. Granted, the real benefit probably only shows when maintaining several bindings like I do, but I still recommend it as I think it also improves readability.
DerelictSASS
Hello, I've made a smaill binding to libsass - a C/C++ implementation of popular CSS preprocessor SASS. Binding is dynamic and based on Derelict Project. You can find it here: https://github.com/Lodin/DerelictSASS It is my first attempt to make something like this, so if I did something wrong, please tell.