Re: CalderaD - SDL2 Vulkan renderer for windows, linux, and android
On Friday, 14 May 2021 at 21:12:55 UTC, Imperatorn wrote: On Friday, 14 May 2021 at 16:39:53 UTC, Danny Arends wrote: Dear all, I'm proud to announce CalderaD, yet another SDL2 Vulkan renderer in the D Programming Language. However, this one will work on Windows, Linux, and even Android. The current 'engine' is based on the excellent vulkan-tutorial.com, and uses SDL2 via the bindbc-sdl bindings for cross-platform support. Vulkan support is provided by using the ErupteD binding for Vulkan. [...] Nice! Is it on dub as well? No not yet, It's still very very early for that I think. I was hoping to get some more feedback on the code as well as have more people test it on different platforms (e.g. 32 bit linux/android) But I do plan on releasing a v0.0.1 to dub in the near future, when I get things like multi-texture support, STL and 3DS model formats working. Danny
Re: CalderaD - SDL2 Vulkan renderer for windows, linux, and android
On Friday, 14 May 2021 at 17:29:13 UTC, evilrat wrote: On Friday, 14 May 2021 at 16:39:53 UTC, Danny Arends wrote: Find the GPL-v3 licensed code here: https://github.com/DannyArends/CalderaD You can set up platform filters in dub to automatically match target platforms without specifying configuration for build. See this https://github.com/Superbelko/android-sdl-d/blob/master/dub.json P.S. No idea why you choose GPL, I usually don't bother with GPL libraries because of license, and I think this is also the majority of people on this forum. Hmm, things gotta have a license, why not GPL would CC0 be better? is attribution and sharing code so weird ? I think: "license": "proprietary" also doesn't sound very inviting Any suggestions license-wise ? Thanks for the configuration tip
CalderaD - SDL2 Vulkan renderer for windows, linux, and android
Dear all, I'm proud to announce CalderaD, yet another SDL2 Vulkan renderer in the D Programming Language. However, this one will work on Windows, Linux, and even Android. The current 'engine' is based on the excellent vulkan-tutorial.com, and uses SDL2 via the bindbc-sdl bindings for cross-platform support. Vulkan support is provided by using the ErupteD binding for Vulkan. Find the GPL-v3 licensed code here: https://github.com/DannyArends/CalderaD The name CalderaD, comes from the word caldera a large cauldron-like hollow that forms shortly after a volcanic eruption. The term comes from Spanish caldera, and Latin caldaria, meaning "cooking pot". I hope this project can help others cook up some nice android apps, and will show that a language like D has something to offer on the mobile platform. Danny
Re: BindBC -- The successor to Derelict
On Friday, 19 October 2018 at 17:34:10 UTC, Mike Parker wrote: In the 14.5 (!) years I've been maintaining the Derelict bindings, I've restructured the source tree a few times (Derelict 1 - 3 to DerelictOrg), had three implementations of the loader (that I can remember), switched from Subversion to Git, and supported a few different approaches to building (bud, dss, Visual D projects, a couple of custom scripts) before finally settling exclusively DUB. [...] Hey Mike, Nice work on the new loader, I'm a big user of the Derelict loader, and I agree that having a betterC / @nogc loader is a big win, so thanks in advance for working on it. Which libraries are going to be supported ? In my current project I use the following Derelict bindings: derelict-al derelict-alure derelict-vorbis derelict-lua Will these be ported to BindBC eventually ? Thanks for the effort in maintaining Derelict for so long. Danny
A D blog post about my web server
Hey all, Don't know if this is the right place to put this (delete if needed) I made some updates to my web server (written in the D language), and thought some of you might find it interesting: https://www.dannyarends.nl/Compression%20and%20encryption See the project here: https://github.com/DannyArends/DaNode I did a short talk about this project at D Conf 2016.
Re: Opensourced my web server written in D
It was related to the update of std.process, I was using the 'bad way' just building a string and then executing it. Using the old API I could just get back the stdout and stderr as strings. And when the new API came in the old version got deprecated or something else I don't know exactly, it broke the execution of external code but the original code was bad code anyway. The new API is much cleaner and I now use the spawnShell command, which allows to use pipes. This means the server can read data in nice chunks, and that I could tweak the throughput/chunksize based on the amount accepted by a client. I could look up in the old repository when/where. but in general I dont mind a little breakage because in general bad code breaks.. Gr, Danny Arends http://www.dannyarends.nl On Friday, 7 February 2014 at 17:06:58 UTC, Martin Nowak wrote: On 02/03/2014 11:02 AM, Danny Arends wrote: I wrote a small web server in D to learn the language. It's not done yet (what software ever is) but I wanted to show it off anyway. As always of-course any feedback is welcome See it here: https://github.com/DannyArends/DaNode Gr, Danny Arends http://www.dannyarends.nl Sorry to read that a compiler update broke your code. http://www.reddit.com/r/programming/comments/1x0625/small_opensource_web_server_written_in_d/cf8ftqv It would be interesting to get some more feedback for this. What was the old and the new version? Do you remember what broke? Thanks, Martin
Re: Opensourced my web server written in D
Thanks for posting, I just posted it here because I mentioned I wrote it to someone who then wanted a look. So why not open it up for everyone. But the whole reddit attention already got me 10 stars ! yay ! I am planning on making a blog post series out of it describing the components, there is a little write up already in the DDOC of the files (I love DDOC), to generate run: ./sh/doc Then the documentation will be at: http://localhost/ddoc or just: cd www/localhost/ddoc Anywayz will keep you guys posted. Danny Arends On Tuesday, 4 February 2014 at 18:21:32 UTC, Andrei Alexandrescu wrote: On 2/3/14, 2:02 AM, Danny Arends wrote: I wrote a small web server in D to learn the language. It's not done yet (what software ever is) but I wanted to show it off anyway. As always of-course any feedback is welcome See it here: https://github.com/DannyArends/DaNode Gr, Danny Arends http://www.dannyarends.nl Vote up! http://www.reddit.com/r/programming/comments/1x0625/small_opensource_web_server_written_in_d/ Andrei
Re: Opensourced my web server written in D
Rolled my own, It's purely to learn the language, but it has been tested by running my own website for almost 6 months now. The only dependency is Deimos & openSSL for the HTTPS connections. which are still untested and kind of unstable Gr, Danny On Monday, 3 February 2014 at 14:17:22 UTC, Rory McGuire wrote: Interesting, are you using any event libraries or did you roll your own? On Mon, Feb 3, 2014 at 12:02 PM, Danny Arends wrote: I wrote a small web server in D to learn the language. It's not done yet (what software ever is) but I wanted to show it off anyway. As always of-course any feedback is welcome See it here: https://github.com/DannyArends/DaNode Gr, Danny Arends http://www.dannyarends.nl
Opensourced my web server written in D
I wrote a small web server in D to learn the language. It's not done yet (what software ever is) but I wanted to show it off anyway. As always of-course any feedback is welcome See it here: https://github.com/DannyArends/DaNode Gr, Danny Arends http://www.dannyarends.nl
Re: "D Developer Network" group on LinkedIn reached 100 members.
Signed up also ;) Didn't knew it was there
Re: dlib - d utility library
Apart from a description of the project this site seems empty! Is there anywhere a person can download the source code/try this out. If you want to browse it online (without check-out): http://code.google.com/p/dlib/source/browse/ Gr, Danny
Re: Wrote a blog post about CTFE and D
Thanks for redditting, also put the second blog post on there http://redd.it/zcj4p I'll update both blogs (due to previous comments )as soon as I get round 2 it. On Tuesday, 4 September 2012 at 16:55:14 UTC, Andrei Alexandrescu wrote: On 8/30/12 11:41 AM, Danny Arends wrote: I wrote a blog post about the stuff I've been doing last weekend using CTFE. All comments are welcome, you can find the blog post at: http://www.dannyarends.nl/index.cgi?viewDetailed=00029 On reddit: http://www.reddit.com/r/programming/comments/zcd19/using_ds_compiletime_evaluation_to_speed_up_sine/ Andrei
Re: Yaw, Pitch and Roll with D 2.0
On Saturday, 1 September 2012 at 00:47:20 UTC, bearophile wrote: Danny Arends: Another post: http://www.dannyarends.nl/?viewDetailed=00030 pure mat!(T)[3][] gen_rotationmatrices(T = float)(){ I suggest to write something like this (note the casing and other details): Mat!T[3][] genRotationMatrices(T = float)() pure { Again many thanks for the feedback. I'll fix this indeed :) tmp += mixin('A[i][k] '~op~' B[k][j]'); This seems OK, but it looks a bit convoluted. Maybe something like this works (untested): tmp += A[i][k].opBinary!op(B[k][j]); I'll test it, though I wanted to show off the mixin concept, I put a hyper link to the Dlang information page about mixins. So that people can read up on what they are. pure auto yaw(int deg){ deg = degreeloop(deg); return cast(matrix)rmatrix[deg][YAW]; } I suggest generally to try to avoid casts, where possible. Do you have a suggestion to get around this cast ? Bye, bearophile Gr, Danny Arends
Re: Wrote a blog post about CTFE and D
On Saturday, 1 September 2012 at 01:46:38 UTC, Rene Zwanenburg wrote: On Thursday, 30 August 2012 at 09:41:43 UTC, Danny Arends wrote: I wrote a blog post about the stuff I've been doing last weekend using CTFE. All comments are welcome, you can find the blog post at: http://www.dannyarends.nl/index.cgi?viewDetailed=00029 Danny Arends http://www.dannyarends.nl It's always good to see someone write about the unusual features of D, but I have a non-D related point of criticism regarding your post: lookup tables for trig functions are a thing from the nineties. Thanks for reply! I see you got the point from the post :) The stuff I implemented in CTFE is course many times worse then the std.math sine and cosine functions (they fall back to single operators in ASM)I could have just as well done: pure T[2][] gen_trigonometric(){ T[2][] result = new T[2][](360); foreach(i; 0 .. 360){ result[i] = [sin(x), cos(x)]; } return result; } But well then showing off D's feature to call (polymorphic) user functions in CTFE is then less clear :) I'm not trying to make some bad 'the nineties called' joke ;). Since at least a decade, calling the trig functions will usually be significantly faster in a real application than a lookup table. Simple benchmarks may show a performance improvement, but that's because the table still resides in the L1 cache. A real application will often have to read the table from main memory, which is orders of magnitude slower than simply doing the computation. Use caching for data which is really expensive to calculate. For relatively trivial stuff like sin(), just calculate it during runtime. I don't try to advocating people start using look-up tables for sine and cosine. It's an example to show how cool I think CTFE is for stuff like this. I could have also taken the much more used example of CTFE calculating primes. However in that case (primes) it is not useful to have a user function doing it for floats, doubles and reals. :-P Gr, Danny Arends
Yaw, Pitch and Roll with D 2.0
Another post: http://www.dannyarends.nl/?viewDetailed=00030 Again all comments are welcome Danny Arends
Re: Wrote a blog post about CTFE and D
On Thursday, 30 August 2012 at 17:40:16 UTC, Philippe Sigaud wrote: On Thu, Aug 30, 2012 at 7:10 PM, Danny Arends wrote: I wrote a blog post about the stuff I've been doing last weekend using CTFE. All comments are welcome, you can find the blog post at: http://www.dannyarends.nl/index.cgi?viewDetailed=00029 Nice article, Danny! A few remarks: degToRad!(float,int) 45 First, it seems like you missed a parenthesis pair? Indeed, fixed The compiler will be able to determine V in degToRad, you can call it like this: degToRad!(float)(45) Following bearophile's use of isFloatingPoint, you can use a default value, if that's what you need most of the time: import std.traits; pure U degToRad(U = float, V)(in V deg) if (isFloatingPoint!U && isIntegral!V) { return (deg * PI) / 180.0; } Interesting, I knew about defaults but I tend to forget about them, when I can use them... Then, to call it: degToRad(45) => automatically expand to detToRad!(float,int)(45) And the same type deduction for cordic gives you cordic( degToRad(45) ); instead of cordic!(float)(degToRad!(float,int) 45); In gen_trigonometric, I think the float call should be a T: result ~= cordic!T(degToRad!(float,int)(i), iter); Indeed, fixed ! => result ~= cordic( degToRad!(T)(i), iter); And, since you know the result's size in advance, you might want to generate it at once: T[2][] result = new (T[2][])(iter); foreach(i; 0 .. 360) result[i] = cordic(degToRad!(T)(i), iter); return result; (no need for braces for a one-expression foreach) Again valid point. Though the compile time benefits will be minor with all the memory CTFE is gobbling up anyway. Or even, using map: import std.algorithm, std.array; return map!( i => cordic(degToRag!(T)(i), iter) )(result).array; I like the map syntax, that's prob. because I've got an R background where we have lapply (1D) and apply (2D) Still I don't seem to get used to the => syntax... Thanks for the feedback, Gr, Danny If I get round to it I'll also update the code to use default return types. Though I like being explicit with types, if you got them flaunt them...
Re: Wrote a blog post about CTFE and D
On Thursday, 30 August 2012 at 16:27:05 UTC, Dmitry Olshansky wrote: On 30-Aug-12 13:41, Danny Arends wrote: I wrote a blog post about the stuff I've been doing last weekend using CTFE. All comments are welcome, you can find the blog post at: http://www.dannyarends.nl/index.cgi?viewDetailed=00029 Danny Arends http://www.dannyarends.nl Nice read. A couple of nits: Use T[2] for fixed arrays like Cord one. It also helps tremendously for lookup speed of the final lookup table. Thus instead of array of arrays you'd have an array of pairs i.e. 2 indirections ---> 1 indirection and cache friendly layout. You're right about that, I made it initially to be variable length. because I was also planning on storing the other ones (tan, cosh, sinh) but didn't get around to that yet. And an awful typo in degreeloop function I think: pure int degreeloop(int deg){ while(deg < 0 || deg >= 360){ if(deg < 0) deg += 360; if(deg >= 0) deg -= 360; //shouldn't it be >= 360 ?? } return deg; } Thanks for the spot ;) it actually doesn't matter seeing as the while condition already forced it to be out of array bounds. I could just as well use an else Thanks for the feedback ! And I'll create a blog post about the rotation matrices also when I finish off that code Danny Arends http://www.dannyarends.nl
Re: Wrote a blog post about CTFE and D
Thanks for the feedback, I'll update it.. I was thinking to remove the struct all together, but when doing the rotation matrices its actually more clean / useful to have structures. Danny Arends http://www.dannyarends.nl On Thursday, 30 August 2012 at 11:25:55 UTC, bearophile wrote: Danny Arends: http://www.dannyarends.nl/index.cgi?viewDetailed=00029 struct Coord(T : float){ T[] d = [1.0, 0.0]; Maybe better ==> struct Coord(T) if (isFloatingPoint!T) { T[2] d = [1.0, 0.0]; (isFloatingPoint is in std.traits) Bye, bearophile
Wrote a blog post about CTFE and D
I wrote a blog post about the stuff I've been doing last weekend using CTFE. All comments are welcome, you can find the blog post at: http://www.dannyarends.nl/index.cgi?viewDetailed=00029 Danny Arends http://www.dannyarends.nl