[hackathon] FreeTree is FreeList on autotune
I'm just done implementing a pretty cool allocator: FreeTree. https://github.com/andralex/phobos/blob/allocator/std/experimental/allocator/free_tree.d http://erdani.com/d/phobos-prerelease/std_experimental_allocator_free_tree.html It's similar to the classic free list allocator but instead of a singly-linked list it uses a binary search tree for accommodating blocks of arbitrary size. The binary search tree accommodates duplicates by storing one extra pointer for each node, effectively embedding a singly-linked list (a free list really) for each node. So a FreeTree is have a bunch of freelists organized in a binary search tree. The tree is not balanced; instead, it uses an LRU heuristic - each freed block is inserted as (or close to) the root. Over the lifetime of a free tree, free lists naturally appear and disappear as dictated by the sizes most frequently allocated by the application. Feedback is welcome! Andrei
Re: [hackathon] FreeTree is FreeList on autotune
On Saturday, 2 May 2015 at 06:28:01 UTC, Andrei Alexandrescu wrote: I'm just done implementing a pretty cool allocator: FreeTree. https://github.com/andralex/phobos/blob/allocator/std/experimental/allocator/free_tree.d http://erdani.com/d/phobos-prerelease/std_experimental_allocator_free_tree.html It's similar to the classic free list allocator but instead of a singly-linked list it uses a binary search tree for accommodating blocks of arbitrary size. The binary search tree accommodates duplicates by storing one extra pointer for each node, effectively embedding a singly-linked list (a free list really) for each node. So a FreeTree is have a bunch of freelists organized in a binary search tree. The tree is not balanced; instead, it uses an LRU heuristic - each freed block is inserted as (or close to) the root. Over the lifetime of a free tree, free lists naturally appear and disappear as dictated by the sizes most frequently allocated by the application. Feedback is welcome! Andrei From the doc: If ParentAllocator defines (deallocate|allocate), ... I forget what the rules are for allocators exactly, but isn't something only an allocator if it defines allocate, deallocate, owns, etc.? It just seems weird that you mentioned something that I thought was implicit.
Re: [hackathon] FreeTree is FreeList on autotune
On 5/2/15 4:11 AM, Meta wrote: I forget what the rules are for allocators exactly, but isn't something only an allocator if it defines allocate, deallocate, owns, etc.? It just seems weird that you mentioned something that I thought was implicit. All members except alignment and allocate are optional. There are allocators that can't deallocate, such as Region. -- Andrei
DTiled: Tiled map loader
Any D game developers out there looking to create a tile-based game? DTiled aims to provide a quick and easy way to load maps created with Tiled (http://www.mapeditor.org). For those that don't know, Tiled is an open-source 2D tilemap editor that is a great tool for indie developers. At the moment, DTiled is a pretty thin wrapper around Tiled's JSON map format, though it provides a few useful helper functions and may expand to provide a higher-level API for inspecting tilemap data. DUB:http://code.dlang.org/packages/dtiled Docs: http://rcorre.github.io/dtiled/dtiled.html Github: https://github.com/rcorre/dtiled DTiled is focused on loading and inspecting tilemap data rather than rendering it, as I do not want to tie DTiled to a particular rendering engine. The idea is that a developer can use DTiled to inspect the information exported from tiled and populate their own in-game map data. Want to see it in action? Check out this example, which uses DTiled to load a map and Allegro to render it: https://github.com/rcorre/dtiled-example Other than that example and some unit tests on the loaded data, DTiled is not yet well-proven. However, I am trying to get back into gamedev and intend on developing DTiled further as I use it. If you give it a try, let me know what you think!
Re: DTiled: Tiled map loader
hmm ... apparently copy-pasting out of a vim buffer was not a good idea. Sorry about the weird line breaks.
Re: DTiled: Tiled map loader
On Saturday, 2 May 2015 at 19:17:51 UTC, rcorre wrote: hmm ... apparently copy-pasting out of a vim buffer was not a good idea. Sorry about the weird line breaks. Nice that you named Dgame on your repo. ;) As soon as it supports XML and CSV I would definitely use it. For my April/Mai game Angry Snowball (https://github.com/Dgame/AngrySnowball) I use currently a CSV format.
The hackathon week roundup
The hackathon week (Apr 25 - May 1) saw 70 PRs created (compare to 68 created Apr 18 through 24). Not much difference in terms of new work, but the PRs closed during the same two periods (75 vs 53) reflect a good bump in the reviewing activity. Another related data point: 143 PRs were updated (e.g. revised, commented on etc) during the hackathon week vs. 78 the week before that. Great work, thanks! Some good stuff has been happening, some manifestly hackathon-related, some perhaps just coincidental. * Article Using D Templates for Gamedev: https://marfisc.wordpress.com/2015/04/29/using-d-templates-for-gamedev. Did well on reddit (http://www.reddit.com/r/programming/comments/34ah1q/using_d_templates_for_game_development/) although it's been classified as spam for a few hours. * Proof of concept: https://github.com/JinShil/stm32f42_discovery_demo/blob/master/README.md * Tutorial: http://d.readthedocs.org (btw should we link that from the homepage?) * WIP: tracing memory allocations, see http://forum.dlang.org/thread/mhhmnr$2euj$1...@digitalmars.com, https://github.com/D-Programming-Language/dmd/pull/4621, https://github.com/D-Programming-Language/dmd/pull/4625, https://github.com/D-Programming-Language/druntime/pull/1246. * The if(arr) warning has been undone. This has caused a fair amount of stir. We believe we made the right call, though sadly it's impossible to make everyone happy. Please bear with us. * WIP: Unique https://github.com/D-Programming-Language/phobos/pull/3225 and RefCounted (can't seem to find the PR - where is it?) * WIP: allocators http://forum.dlang.org/thread/mi1qph$cgr$1...@digitalmars.com All in all, a great week! Congratulations to all participants, and let's do it again sometime. I'm looking into ways to make this more interactive (google hangouts?) and more fun (contests? prizes? etc). Chime in! Again - this is terrific. Many thanks to everyone who participated! Andrei
Re: The hackathon week roundup
On Saturday, 2 May 2015 at 23:02:05 UTC, Andrei Alexandrescu wrote: * WIP: Unique https://github.com/D-Programming-Language/phobos/pull/3225 and RefCounted (can't seem to find the PR - where is it?) already got pulled https://github.com/D-Programming-Language/phobos/pull/3171 Worth adding: AFAIK unique(?) and refcounted are completely usable in @nogc, and most of the unit tests likely can be marked @nogc for them to help prevent breakage.
Re: The hackathon week roundup
* Tutorial: http://d.readthedocs.org (btw should we link that from the homepage?) May I transfer the repositories (both GitHub and RTD) to the D-Programming-Language community?
Re: Quick Start with D: few examples and set of links.
Congratulations on that web site : trendy stripped down and efficient style, greatly instructive and easy to read for the new comers. That's what i think the D language misses the most, if i may. Rom On Friday, 1 May 2015 at 08:18:10 UTC, Ilya Yaroshenko wrote: http://d.readthedocs.org I hope this examples will be useful for students. Ilya
Re: The hackathon week roundup
On Saturday, 2 May 2015 at 23:02:05 UTC, Andrei Alexandrescu wrote: I'm looking into ways to make this more interactive (google hangouts?) and more fun (contests? prizes? etc). Chime in! My idea: 1. Members of the D leadership/committers form a working group. 2. The working group creates of list of bugs they are willing to work on. 3. Hackathon is announced. To motivate participants, the working group agrees to fix a bug of the winner's choosing. 4. After the hackathon, the working group subjectively chooses a winner from the participants. 5. The winner discloses which bug they would like fixed, and the qualified members of the working group agrees to fix it for the next release. 7. Wash, rinse, repeat. Mike
Re: The hackathon week roundup
On 5/2/15 4:50 PM, Ilya Yaroshenko wrote: * Tutorial: http://d.readthedocs.org (btw should we link that from the homepage?) May I transfer the repositories (both GitHub and RTD) to the D-Programming-Language community? That'd be a fine idea. Thoughts from Walter, Martin et al? -- Andrei
Re: The hackathon week roundup
On 5/2/2015 5:12 PM, Andrei Alexandrescu wrote: On 5/2/15 4:50 PM, Ilya Yaroshenko wrote: * Tutorial: http://d.readthedocs.org (btw should we link that from the homepage?) May I transfer the repositories (both GitHub and RTD) to the D-Programming-Language community? That'd be a fine idea. Thoughts from Walter, Martin et al? -- Andrei I think it's a great idea. It'd have to be Boost licensed, though.
Re: The hackathon week roundup
On 3/05/2015 1:27 p.m., Walter Bright wrote: On 5/2/2015 5:12 PM, Andrei Alexandrescu wrote: On 5/2/15 4:50 PM, Ilya Yaroshenko wrote: * Tutorial: http://d.readthedocs.org (btw should we link that from the homepage?) May I transfer the repositories (both GitHub and RTD) to the D-Programming-Language community? That'd be a fine idea. Thoughts from Walter, Martin et al? -- Andrei I think it's a great idea. It'd have to be Boost licensed, though. Shouldn't it be creative commons because it is more a creative work aka documentation?
Re: The hackathon week roundup
On 5/2/15 6:27 PM, Walter Bright wrote: On 5/2/2015 5:12 PM, Andrei Alexandrescu wrote: On 5/2/15 4:50 PM, Ilya Yaroshenko wrote: * Tutorial: http://d.readthedocs.org (btw should we link that from the homepage?) May I transfer the repositories (both GitHub and RTD) to the D-Programming-Language community? That'd be a fine idea. Thoughts from Walter, Martin et al? -- Andrei I think it's a great idea. It'd have to be Boost licensed, though. Ilya, your turn. Proceed and be bold. -- Andrei