Re: Beta 2.094.0
On Sunday, 13 September 2020 at 15:12:00 UTC, Steven Schveighoffer wrote: The first part of the change seems disruptive. If you just fix the second part (that you can now retrieve all members of std), doesn't it fix the problem? -Steve Main problem is that allMembers returns strings and you can't tell if member is an import from it. If it returned aliases then you could do is(m == module), etc.
Re: Beta 2.094.0
On Friday, 11 September 2020 at 07:48:00 UTC, Martin Nowak wrote: Glad to announce the first beta for the 2.094.0 release, ♥ to the 49 contributors. This is the first release to be built with LDC on all platforms, so we'd welcome some more thorough beta testing. http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.094.0.html As usual please report any bugs at https://issues.dlang.org -Martin One unfortunate sideeffect of allMembers change is that it breaks this king of loop: ``` foreach(m; __traits(allMembers, M)) { // M is module alias member = __traits(getMember, M, m); // now fails because std.stdio is not a member of M } ``` To fix I needed to rewrite it as: ``` foreach(m; __traits(allMembers, M)) { // M is module static if (__traits(compiles, __traits(getMember, M, m))) alias member = __traits(getMember, M, m); } ```
Re: Article: The surprising thing you can do in the D programming language
On Thursday, 20 August 2020 at 10:12:22 UTC, aberba wrote: Wrote something on OpenSource.com https://opensource.com/article/20/8/nesting-d The only nitpick, is that nested functions need to be declared before use, in order to compile.
Re: A D port of utf8proc
On Sunday, 12 April 2020 at 13:34:49 UTC, MrSmith wrote: On Saturday, 11 April 2020 at 23:36:17 UTC, Ferhat Kurtulmuş wrote: I could not find a similar library working with -betterC, so I ported utf8proc. https://github.com/aferust/utf8proc-d Please test it, contribute it, and enjoy! in readme this expression is wrong: `(mstring.sizeof / ubyte.sizeof) * mstring.length` should be `mstring.length` instead Actually even `mstring.length + 1` to account for null byte. But you may pass mstring.length to `utf8proc_map` instead of 0 length.
Re: A D port of utf8proc
On Saturday, 11 April 2020 at 23:36:17 UTC, Ferhat Kurtulmuş wrote: I could not find a similar library working with -betterC, so I ported utf8proc. https://github.com/aferust/utf8proc-d Please test it, contribute it, and enjoy! in readme this expression is wrong: `(mstring.sizeof / ubyte.sizeof) * mstring.length` should be `mstring.length` instead
Re: code.dlang.org reliability update
On Tuesday, 3 March 2020 at 08:26:19 UTC, Sönke Ludwig wrote: Nope, should be right. At least on my machines, %APPDATA% points to AppData\Roaming, which is the right base folder. My bad, confused %APPDATA% with AppData. It is indeed AppData\Roaming\dub\
Re: code.dlang.org reliability update
On Monday, 2 March 2020 at 19:17:59 UTC, Sönke Ludwig wrote: settings.json is found/needs to be created in %APPDATA%\dub\ on Windows I guess that should be %APPDATA%\Local\dub\
Re: Beta 2.080.1
On Monday, 4 June 2018 at 11:44:31 UTC, Martin Nowak wrote: First beta for the 2.080.1 patch release. Comes with a handful of fixes. http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.080.1.html Please report any bugs at https://issues.dlang.org - -Martin Is [1] included in that release? [1] https://issues.dlang.org/show_bug.cgi?id=18821
Re: DMD, Windows and C
On Wednesday, 25 October 2017 at 16:57:27 UTC, kinke wrote: The MS libs are obviously still required. They can be compressed to ~32 MB. The redistribution of the static libs is unclear, that's why I haven't pursued this further, but that's basically the only thing standing in the way of releasing a fully self-contained LDC package with a compressed size of roughly 50 MB (64-bit libs only). I wish we had zero-dependence distributions of all compilers for Windows. I want to redist compiler with my application for easy modding. And requiring VisualStudio / BuildToos is too much garbage for a small task. (Ideally it should be 20-30 MB at max).
Re: Introducing Diskuto - an embeddable comment system
On Tuesday, 14 March 2017 at 11:17:57 UTC, Sönke Ludwig wrote: Any comments suggestions and especially helping hands are highly appreciated! Would be nice to undo/change votes. I accidentally clicked -1 and can't undo it.
Re: Project Highlight: Voxelman
On Saturday, 31 December 2016 at 14:22:40 UTC, jkpl wrote: dub build --build=release Performing "release" build using dmd for x86_64. dmd failed with exit code 1. I've fixed compilation on linux on 2.072. However you need to use --DRT-oncycle=ignore when starting, due to new cycle handling in 2.072.
Re: Project Highlight: Voxelman
On Saturday, 31 December 2016 at 11:48:34 UTC, jkpl wrote: I don't blame your personally but the last time a blog post presented a game (it was the one made by the author of dlib) there was also a similar problem. Were you aware that something gonna be posted and that necessarily people would try to build it ? I haven't really got to building the whole thing on linux. For full functionality it needs LMDB, LZ4, GLFW3, Enet and IMGUI libs. Ideally there should be a linux build with all dependencies in releases.
Re: Project Highlight: Voxelman
On Friday, 30 December 2016 at 13:28:12 UTC, Mike Parker wrote: Voxelman is a plugin-driven voxel game engine that is built around a client-server architecture and sports multi-threaded world & mesh generation. I stumbled across a post on /r/VoxelGameDev a few weeks back and recognized the handle of MrSmith33 from these forums. That prompted me to click through and I was DlighteD to discover it was created with that language I can't seem to stop writing about. The post: http://dlang.org/blog/2016/12/30/project-highlight-voxelman/ Reddit: https://www.reddit.com/r/programming/comments/5l3eej/introducing_voxelman_a_plugindriven_voxel_game/ Thanks for doing this blog post, Mike!
Re: Minor updates: gen-package-version v1.0.4 and sdlang-d v0.9.6
On Tuesday, 23 August 2016 at 16:19:12 UTC, Nick Sabalausky wrote: I'm hoping to finally get around to taking care of some of the open enhancement requests for sdlang-d soon. Can you, please, take care of this issue: https://github.com/Abscissa/libInputVisitor/issues/1 ?
Re: LZ4 decompression at CTFE
On Tuesday, 26 April 2016 at 22:05:39 UTC, Stefan Koch wrote: Hello, originally I want to wait with this announcement until DConf. But since I working on another toy. I can release this info early. So as per title. you can decompress .lz4 flies created by the standard lz4hc commnadline tool at compile time. No github link yet as there is a little bit of cleanup todo :) Please comment. I would like to use this instead of c++ static lib. Thanks! (I hope it works at runtime too).
Re: DlangUI on Android
Works on Nexus 7, Android 6.0.1!
Re: Damage Control: An homage to Rampart (Alpha)
On Thursday, 31 December 2015 at 16:43:53 UTC, rcorre wrote: "Damage Control" is a game inspired by one of my old favorite SNES games, Rampart (ok, technically an arcade game, but I had it on SNES). [...] For me window is not shown. Windows 7 64bit. I see console and graphics windows in taskbar, but no actual window on the screen. Used release v0.2.
Re: Atrium - 3D game written in D
Would be nice to have demos avaliable on github
Re: Voting for std.experimental.allocator
Yes
Re: quick-and-dirty minimalistic LISP engine
With master dmd I'm getting milf.d(2): Error: ';' expected following module declaration instead of is milf.d(2): Error: no identifier for declarator aliced milf.d(99): Deprecation: typedef is removed milf.d(223): Error: basic type expected, not ; milf.d(223): Error: no identifier for declarator int milf.d(352): Error: no identifier for declarator CellCons milf.d(352): Error: declaration expected, not 'body' milf.d(359): Error: found 'body' instead of statement milf.d(374): Error: expression expected, not 'body' milf.d(380): Error: expression expected, not 'body' milf.d(760): Error: expression expected, not 'auto' milf.d(760): Error: found 's' when expecting ')' milf.d(760): Error: found '=' instead of statement milf.d(795): Error: declaration expected, not 'if' milf.d(796): Error: declaration expected, not 'if' milf.d(799): Error: declaration expected, not 'for' milf.d(799): Error: declaration expected, not ')' milf.d(801): Error: declaration expected, not 'if' milf.d(802): Error: no identifier for declarator stloc milf.d(802): Error: declaration expected, not '=' milf.d(804): Error: function declaration without return type. (Note that constructors are always named 'this') Also, there was no alias usize = size_t; There is no typedef and body is reserved word. Here is what I got: https://gist.github.com/MrSmith33/9bedde7b0721a6b40666
Re: DDocs.org: auto-generated documentation for all DUB projects (WIP)
On Tuesday, 10 February 2015 at 22:40:18 UTC, Kiith-Sa wrote: DDocs.org (http://ddocs.org) is a repository of documentation for DUB projects that automatically re-generates docs as new projects/releases/branch changes are added. The idea is to make documenting D projects as simple as possible, to the point where you don't need to do any work to get documentation for your project other than adding it to the DUB registry. Also, users can now browse documentation for DUB projects even if the author was too lazy to generate it themselves (assuming thy did include some documentation comments). Note that this is still in a very early stage, it was put together in a very quick-and-dirty style by a person with little webdev experience. Currently it just scans `code.dlang.org`, looking for changes (yes, I know, this will break as soon as code.dlang.org changes, I plan to raise issue/s (PRs?) to the dub registry project so it can have a full/stable API, but I wanted to get something to work *right now*. Code is here: * ddocs.org: https://github.com/kiith-sa/ddocs.org * hmod-dub: https://github.com/kiith-sa/hmod-dub * harbored-mod: https://github.com/kiith-sa/harbored-mod Background: When optimizing harbored-mod by testing it on big D projects (gtk-d, tango, vibe.d, etc.), I wrote a simple tool to fetch/generate docs for any DUB project; I got carried away and used that as base for a tool that checks for changes in the DUB registry and generates docs for all projects. That is pretty cool! I will put a link to it in all my project readmes. I've noticed that License: a$(WEB boost.org/LICENSE_1_0.txt, Boost License 1.0). gets rendered as a. Am I doing it wrong?
Re: DlangUI project update
On Friday, 26 December 2014 at 12:33:04 UTC, Vadim Lopatin wrote: Hello! DlangUI project is alive and under active development. https://github.com/buggins/dlangui Recent changes: - new controls: ScrollWidget, TreeView, ComboBox, ... - new dialogs: FileOpenDialog, MessageBox - a lot of bugfixes - performance improvements in software renderer - killer app: new example - Tetris game :) Try Demos: # download sources git clone https://github.com/buggins/dlangui.git cd dlangui # example 1 - demo for most of widgets dub run dlangui:example1 --build=release # tetris - demo for game development dub run dlangui:tetris --build=release DlangUI is cross-platform GUI library written in D. Main features: - cross platform: uses SDL for linux/macos, Win32 API or SDL for Windows - hardware acceleration: uses OpenGL for drawing when built with version USE_OPENGL - easy to extend: since it's native D library, you can add your own widgets and extend functionality - Unicode and internationalization support - easy to customize UI - look and feel can be changed using themes and styles - API is a bit similar to Android - two phase layout, styles Screenshots (a bit outdated): http://buggins.github.io/dlangui/screenshots.html See project page for details. I would like to get any feedback. Will be glad to see advises, bug reports, feature requests. Best regards, Vadim Is it possible to use your GUI for opengl game? I need to inject a gui in an existing main loop.
Re: DlangUI project update
On Tuesday, 30 December 2014 at 18:32:04 UTC, ketmar via Digitalmars-d-announce wrote: On Tue, 30 Dec 2014 18:18:38 + MrSmith via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: Is it possible to use your GUI for opengl game? I need to inject a gui in an existing main loop. as it seems to have OpenGL as one of the backends, i think that it shouldn't be hard even if it is not supported directly right now. please write about your progress here (if there will be any). I've built library with 2.066.1 and master Despite resources is not copied by dub it works fine. Fixed C-style arrays and sent PR https://github.com/buggins/dlangui/pull/24
Re: Concise Binary Object Representation (CBOR) binary serialization library.
On Friday, 19 December 2014 at 22:25:57 UTC, Nordlöw wrote: On Friday, 19 December 2014 at 18:26:26 UTC, MrSmith wrote: Here is github link: https://github.com/MrSmith33/cbor-d Destroy! It would be nice to have a side-by-side comparison with http://msgpack.org/ which is in current use by a couple existing D projects, include D Completion Daemon (DCD) and a few of mine. There is a comparison to msgpack here (and to other formats too): http://tools.ietf.org/html/rfc7049#appendix-E.2 which states: [MessagePack] is a concise, widely implemented counted binary serialization format, similar in many properties to CBOR, although somewhat less regular. While the data model can be used to represent JSON data, MessagePack has also been used in many remote procedure call (RPC) applications and for long-term storage of data. MessagePack has been essentially stable since it was first published around 2011; it has not yet had a transition. The evolution of MessagePack is impeded by an imperative to maintain complete backwards compatibility with existing stored data, while only few bytecodes are still available for extension. Repeated requests over the years from the MessagePack user community to separate out binary text strings in the encoding recently have led to an extension proposal that would leave MessagePack's raw data ambiguous between its usages for binary and text data. The extension mechanism for MessagePack remains unclear.
Re: Concise Binary Object Representation (CBOR) binary serialization library.
On Friday, 19 December 2014 at 22:33:57 UTC, BBaz wrote: Do you know OGDL ? http://ogdl.org/ It's currently the more 'appealing' thing to me for serialization. That is interesting! Is there a D implementation? Though, it looks like there is not much types of data there.
Re: Concise Binary Object Representation (CBOR) binary serialization library.
On Friday, 19 December 2014 at 22:46:14 UTC, ponce wrote: On Friday, 19 December 2014 at 22:33:57 UTC, BBaz wrote: On Friday, 19 December 2014 at 18:26:26 UTC, MrSmith wrote: The Concise Binary Object Representation (CBOR) is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation. These design goals make it different from earlier binary serializations such as ASN.1 and MessagePack. When implementing CBOR serialization/parsing I got the impression that it was remarkably similar to MessagePack except late. Dis you spot anything different? Not much in the sense of implementation, but it has text type, indefinite-length encoding, tags and can be easily extended if needed. I think of it as of better msgpack.
Concise Binary Object Representation (CBOR) binary serialization library.
The Concise Binary Object Representation (CBOR) is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation. These design goals make it different from earlier binary serializations such as ASN.1 and MessagePack. Here is more info about format: http://cbor.io/ You can easily encode and decode things like built-in types, arrays, hash-maps, structs, tuples, classes, strings and raw arrays (ubyte[]). Here is some simple code: import cbor; struct Inner { int[] array; string someText; } struct Test { ubyte b; short s; uint i; long l; float f; double d; ubyte[] arr; string str; Inner inner; void fun(){} // not encoded void* pointer; // not encoded int* numPointer; // not encoded } ubyte[1024] buffer; size_t encodedSize; Test test = Test(42, -120, 11, -123456789, 0.1234, -0.987654, cast(ubyte[])[1,2,3,4,5,6,7,8], It is a test string, Inner([1,2,3,4,5], Test of inner struct)); encodedSize = encodeCborArray(buffer[], test); // ubyte[] and string types are slices of input ubyte[]. Test result = decodeCborSingle!Test(buffer[0..encodedSize]); // decodeCborSingleDup can be used to auto-dup those types. assert(test == result); Here is github link: https://github.com/MrSmith33/cbor-d Destroy!
D is for Data Science - reddit discussion
D is for Data Science by Andrew Pascoe http://www.reddit.com/r/programming/comments/2n9gfb/d_is_for_data_science/
Re: D is for Data Science - reddit discussion
Haven't noticed that it was already posted. Sorry about that. The disscussion is here http://forum.dlang.org/thread/qeyftagcvkhjjeeba...@forum.dlang.org
Re: bgfx bindings
On Tuesday, 1 July 2014 at 20:43:27 UTC, ponce wrote: Hi, I'd like to announce DerelictBgfx, a dynamic bindings to the bgfx library. https://github.com/derelictorg/derelictbgfx bgfx is a library which abstract the accelerated graphics API through a common denominator. DX9, DX11, Desktop OpenGL and OpenGL ES can be used from the same abstraction. I believe it to be useful and risk-mitigating for games. To allows this feat, a shader language and compiler is included in the original library there: https://github.com/bkaradzic/bgfx Using the derelict-bgfx package, you would have to build bgfx as a dynamic library and the associated shader compiler. bgfx is decoupled from the windowing library. It can be used through the likes of SDL and GLFW, provided a OS-dependent window handle is given. That is awesome!