PixelPerfectEngine v0.11.0-alpha release

2024-01-20 Thread solidstate1991 via Digitalmars-d-announce
https://github.com/ZILtoid1991/pixelperfectengine/releases/tag/v0.11.0-alpha Two major changes are: 1) Implementation of the M2 format. Due to the lack of any proper MIDI2.0 formats, I decided to implement my own, and also added some additional function which allows it to be used for adaptive

Struct value either resets, or not getting passed correctly

2023-11-19 Thread solidstate1991 via Digitalmars-d-learn
https://github.com/ZILtoid1991/pixelperfectengine/blob/ed93bec15deea042516615e73c57d137a2c1f762/pixelperfectengine/src/pixelperfectengine/scripting/lua.d#L98 Struct `LuaVar` seems to work for the most part, however, at certain point, the value seems to be reset to zero, or not being passed to

Re: Visual Studio 2022 no longer debugs D program, need an alternative debugger for Windows

2023-08-26 Thread solidstate1991 via Digitalmars-d-learn
On Saturday, 26 August 2023 at 17:57:22 UTC, jmh530 wrote: You should report this to bugzilla. I'm using it in an unusual way. Since VisualD does not support dub, I have to rely on VSCode as my main editor, then load the executable in an empty C++ project in VS. This worked so far. On the

How can I restrict a library to be only included under a certain OS?

2023-03-28 Thread solidstate1991 via Digitalmars-d-learn
I added this line to my SDLang formatted dub build file: ``` dependency "libx11" version="0.0.1" platform="posix" ``` Yet it's included even on Windows, even if I change it to "linux". Since there's a fatal bug in the library that disallows it to be built, I'll be leaving it out for now, and

Re: Using Windbg to debug D applications and unittests

2023-02-25 Thread solidstate1991 via Digitalmars-d-learn
On Saturday, 25 February 2023 at 19:55:27 UTC, evilrat wrote: Nothing happens without a reason, check your project settings and make sure that for debugging you have correct paths, command, and arguments. Even with no debug info and no project you can just drop an executable to an empty VS

Re: Using Windbg to debug D applications and unittests

2023-02-25 Thread solidstate1991 via Digitalmars-d-learn
On Saturday, 25 February 2023 at 18:08:57 UTC, evilrat wrote: Turn on exception settings panel in top menu bar: Debug->Windows->Exceptions Settings (Crtl+Alt+E) My settings for D is full "D exceptions", under Win32 check "D Exception", or just click "Restore to default settings" in there on

Re: Using Windbg to debug D applications and unittests

2023-02-25 Thread solidstate1991 via Digitalmars-d-learn
On Saturday, 25 February 2023 at 16:22:49 UTC, evilrat wrote: VisualD for Visual Studio provides some extra help with displaying your data in debugger and on Windows is the best you can get for D. You can use Visual Studio Code + code-d to debug, but it is not as good as full Visual Studio

Using Windbg to debug D applications and unittests

2023-02-25 Thread solidstate1991 via Digitalmars-d-learn
I had a lot of trouble trying to get Visual Studio to catch handled exceptions, which would have been mandatory for debugging unittests, but I either forgot how to do it, or something have changed in either the newer versions of VS or the D compilers I use (LDC, DMD). So I downloaded the new

PixelPerfectEngine-0.10.0-beta.7 released

2022-12-10 Thread solidstate1991 via Digitalmars-d-announce
https://github.com/ZILtoid1991/pixelperfectengine/releases/tag/v0.10.0-beta.7 This version is okay for production, even if certain functionalities are either untested or unimplemented. For the next version, I'll finish as much of them as possible, as well as try to deprecate SDL2 in favor of

Re: Release of iota 0.3.0-alpha done

2022-11-17 Thread solidstate1991 via Digitalmars-d-announce
On Monday, 14 November 2022 at 22:55:56 UTC, ikelaiah wrote: Thanks and congrats for the latest alpha release. How can I donate to this project? -Ikel Monetary (recurring): https://www.patreon.com/ShapeshiftingLizard Monetary (one time): https://ko-fi.com/shapeshiftinglizard Alternatively,

Release of iota 0.3.0-alpha done

2022-11-12 Thread solidstate1991 via Digitalmars-d-announce
https://github.com/ZILtoid1991/iota/releases/tag/v0.3.0-alpha Intended as a D language native replacement for SDL/SFML/GLFW, now is starting to become a minimum viable alternative. Now it can support input polling and some windowing under Windows. OpenGL framebuffer support started but not

Re: How can I get the "owner" of a method?

2022-10-01 Thread solidstate1991 via Digitalmars-d-learn
On Friday, 30 September 2022 at 22:20:06 UTC, Salih Dincer wrote: Maybe this will help you: ```d template Bar(T) { void fun() {} } class Foo(T) { mixin Bar!T b; alias fun = b.fun; void test() { fun(); } } ``` SDB@79 The issue with that is in that case is instead of writing

How can I get the "owner" of a method?

2022-09-30 Thread solidstate1991 via Digitalmars-d-learn
Let's say I have a class or an interface with a function, and I want to pass that to a template to generate another function (in this case one that passes it to a scripting engine, and allows it to be called from there). Currently I have the following issues: 1. I have to pass the

Why this function just decides to not call another function and do its thing instead?

2022-09-17 Thread solidstate1991 via Digitalmars-d-learn
Code found here: https://github.com/ZILtoid1991/newxml/blob/main/source/newxml/domimpl.d#L1984 Even changing the code to this: ```d auto res = firstAttr; while (res) { if (res.localName != localName || res.namespaceURI != namespaceURI) res = res._nextAttr;

Is it valid in D to write an opSlice overload that takes no arguments?

2022-09-11 Thread solidstate1991 via Digitalmars-d-learn
Here's this code: ```d auto opSlice() { struct Range { Attr currentAttr; auto front() { return currentAttr; } void popFront() { currentAttr = currentAttr._nextAttr; } bool empty() { return currentAttr is null; } } return Range(firstAttr); } ```

Re: Initial release of newxml done!

2022-09-11 Thread solidstate1991 via Digitalmars-d-announce
On Sunday, 11 September 2022 at 07:13:18 UTC, WebFreak001 wrote: awesome! got some documentation or examples anywhere? Can't really seem to find how to use it really, but will definitely be useful when I do stuff with xml. Documentation is a work in progress. I'll try to make some examples

Re: Initial release of newxml done!

2022-09-10 Thread solidstate1991 via Digitalmars-d-announce
On Friday, 9 September 2022 at 22:00:42 UTC, solidstate1991 wrote: https://github.com/ZILtoid1991/newxml/releases/tag/v0.2.0 It's a heavily modified `std.experimental.xml` with the following changes: * Many templating have been removed in favor of other forms of setting. This means the

Initial release of newxml done!

2022-09-09 Thread solidstate1991 via Digitalmars-d-announce
https://github.com/ZILtoid1991/newxml/releases/tag/v0.2.0 It's a heavily modified `std.experimental.xml` with the following changes: * Many templating have been removed in favor of other forms of setting. This means the allocators have been axed in favor of using `new` and relying on D's

Re: Tracing out error that causes compiler crash

2022-09-04 Thread solidstate1991 via Digitalmars-d-learn
I tried to compile on the Raspberry Pi 400, now I'm getting segmentation fault during compilation with LDC. Still no idea what causes it, nor how to reduce it. Moved the codebase to a new repository, gave it a proper DOMString implementation instead of using it as a template name, and I'm

Re: Tracing out error that causes compiler crash

2022-09-04 Thread solidstate1991 via Digitalmars-d-learn
On Sunday, 4 September 2022 at 08:17:13 UTC, Nick Treleaven wrote: You may be able to use dustmite to automatically reduce the code to a minimal test case: https://dlang.org/blog/2020/04/13/dustmite-the-general-purpose-data-reduction-tool/ Send my regards to the planet smasher. What do I

Tracing out error that causes compiler crash

2022-09-03 Thread solidstate1991 via Digitalmars-d-learn
During unittest in my own fork of std.experimental.xml (link: https://github.com/ZILtoid1991/experimental.xml ), potentially an error so severe is present, that it causes to crash the compiler (both DMD and LDC2, on Windows). I was able to separate the issue by commenting out all unittests,

Re: Window created with Windows API is not visible

2022-06-20 Thread solidstate1991 via Digitalmars-d-learn
It seems I solved most of the problems by modifying event handling. I'll continue solving further ones and adding more functionality.

Re: Window created with Windows API is not visible

2022-06-18 Thread solidstate1991 via Digitalmars-d-learn
On Saturday, 18 June 2022 at 22:46:45 UTC, rikki cattermole wrote: registeredClass.style = 32_769; Don't use an integer like that, stick with bit wise ors. LPCWSTR classname = toUTF16z(name); GC owned memory, that could result in surprises. const LPWSTR windowname = toUTF16z(title);

Re: Window created with Windows API is not visible

2022-06-18 Thread solidstate1991 via Digitalmars-d-learn
On Saturday, 18 June 2022 at 21:33:31 UTC, Vinod K Chandran wrote: It seems that you are created a layered window. So chances are there to it become translucent. Did not set the flags for the layered window style, so I don't know. Might be an event processing error, since in Windows it's a

Window created with Windows API is not visible

2022-06-18 Thread solidstate1991 via Digitalmars-d-learn
Code: https://github.com/ZILtoid1991/iota/blob/main/inputtest/app.d https://github.com/ZILtoid1991/iota/blob/main/source/iota/window/base.d#L104 Second one contains the constructor that should make the window without any issues. When I try to create a window for testing purposes, I get

Re: A New Game Written in D

2022-05-18 Thread solidstate1991 via Digitalmars-d-announce
On Tuesday, 17 May 2022 at 16:36:34 UTC, Kenny Shields wrote: Hello, I've been building a game engine in D for the past 2 and a half years and have finally reached a point where it's usable in day-to-day game development. Earlier this year I decided to make a simple shooter game to serve as

Re: PixelPerfectEngine v0.10.0-beta.5 : Now with a synth

2022-02-25 Thread solidstate1991 via Digitalmars-d-announce
On Thursday, 24 February 2022 at 17:36:49 UTC, Salih Dincer wrote: On Thursday, 24 February 2022 at 13:15:50 UTC, Salih Dincer wrote: Is there anything I can do for this problem? I solved it using the following commands having two parts: * sudo apt-get -y install libasound2-dev * dub build

PixelPerfectEngine v0.10.0-beta.5 : Now with a synth

2022-02-23 Thread solidstate1991 via Digitalmars-d-announce
https://github.com/ZILtoid1991/pixelperfectengine/releases/tag/v0.10.0-beta.5 After I created my own IO library that has audio features that are easier to interoperate with D code (iota), I decided to finish up my phase modulation (often sold as either frequency modulation or phase distortion

First release of the iota library have been released (also looking for contributors)

2021-12-21 Thread solidstate1991 via Digitalmars-d-announce
iota, an I/O library that currently only has audio stream support under Windows has been finished. The library itself can be seen as a partial, D language native replacement of SDL, SFML, and other similar libraries. I begun writing it after I got dissatisfied with SDL and libsoundio, then

Re: Thread exits immediately with no reason.

2021-12-21 Thread solidstate1991 via Digitalmars-d-learn
On Tuesday, 21 December 2021 at 19:00:01 UTC, solidstate1991 wrote: Well, it seems like it's an error on the WASAPI side. I totally disabled error handling (including the switch-case thingy), then GetBuffer returns with an error code indicating buffer is too large. The solution was to call

Re: Thread exits immediately with no reason.

2021-12-21 Thread solidstate1991 via Digitalmars-d-learn
Well, it seems like it's an error on the WASAPI side. I totally disabled error handling (including the switch-case thingy), then GetBuffer returns with an error code indicating buffer is too large.

Re: Thread exits immediately with no reason.

2021-12-21 Thread solidstate1991 via Digitalmars-d-learn
On Tuesday, 21 December 2021 at 01:13:10 UTC, Ali Çehreli wrote: I bet it's throwing an Error. Call your thread entry function from a try-catch wrapping function to see whether that's the case: // Rename existing function: protected void audioThreadImpl() @nogc nothrow { // ... } // New

Thread exits immediately with no reason.

2021-12-20 Thread solidstate1991 via Digitalmars-d-learn
Here's this function, which serves as a thread entry point: https://github.com/ZILtoid1991/iota/blob/main/source/iota/audio/wasapi.d#L220 The problem is, that even with disabling all error-handling that would allow to shut down the thread safely, the thread only runs that while loop once.

How can I check a newly set ref value

2021-10-23 Thread solidstate1991 via Digitalmars-d-learn
Let's say I have something like this: ``` struct Foo { int[] bar; this() { bar.length = 10; } ref int opIndex(size_t i) { return bar[i]; } } void main() { Foo f = Foo(); f[3] = 15; } ``` If I wanted to check whether the assigned value is within a

Re: std.format doesn't want to work

2021-10-17 Thread solidstate1991 via Digitalmars-d-learn
On Sunday, 17 October 2021 at 13:03:46 UTC, jfondren wrote: then it's likely that some memory corruption prior to format() has broken the GC, and format's allocation of a string is what's failing. Try sprinkling `@safe` and and see what it complains about; try valgrind; try reducing your

Re: std.format doesn't want to work

2021-10-17 Thread solidstate1991 via Digitalmars-d-learn
On Sunday, 17 October 2021 at 05:22:17 UTC, russhy wrote: On Saturday, 16 October 2021 at 22:47:09 UTC, solidstate1991 wrote: When I make this call ``` format(" %3.3f"w, avgFPS); ``` my program immediately crashes with an access violation error. The debugger out is different between x86 and

std.format doesn't want to work

2021-10-16 Thread solidstate1991 via Digitalmars-d-learn
When I make this call ``` format(" %3.3f"w, avgFPS); ``` my program immediately crashes with an access violation error. The debugger out is different between x86 and x86-64. I've made all sanity checks, so I need some other suggestions.

Registering-unregistering threads

2021-07-30 Thread solidstate1991 via Digitalmars-d-learn
I'm doing some audio-related work, and one thing I need is to unregister from (and maybe later temporarily re-register to) the GC, since it would cause some issues, and it would be nice if I still could use the GC during disk operations, etc. Info on it is quite scarce and a bit confusing. If

Re: Unknown bug disallows growth of dynamic arrays

2021-07-01 Thread solidstate1991 via Digitalmars-d-learn
On Monday, 28 June 2021 at 20:55:44 UTC, solidstate1991 wrote: Here's the offending function: https://github.com/ZILtoid1991/collections-d/blob/master/source/collections/sortedlist.d#L38 It causes to throw an exception with `Access violation reading location` and a memory address, int the

Unknown bug disallows growth of dynamic arrays

2021-06-28 Thread solidstate1991 via Digitalmars-d-learn
Here's the offending function: https://github.com/ZILtoid1991/collections-d/blob/master/source/collections/sortedlist.d#L38 It causes to throw an exception with `Access violation reading location` and a memory address, int the function `_d_arraysetlengthT`. Variable `ti` is a TypeInfo_Array,

Re: PixelPerfectEngine v0.10.0-beta.1 release + looking for a team

2021-05-31 Thread solidstate1991 via Digitalmars-d-announce
On Tuesday, 18 May 2021 at 09:19:30 UTC, Anton Pastukhov wrote: Does it have a website/docs? Are there any demo games? There's a few demo games in the works, but first I have to fix bugs in the editor. For docs, see the source. Except for stuff I forgot to document for a quite long time,

PixelPerfectEngine v0.10.0-beta.1 release + looking for a team

2021-05-16 Thread solidstate1991 via Digitalmars-d-announce
https://github.com/ZILtoid1991/pixelperfectengine/releases/tag/v0.10.0-beta.1 https://ziltoid1991.itch.io/pixelperfecteditor The new release contains the refactored and cleaned-up GUI subsystem, a new input subsystem, more composing functions, etc. Also, since I got a full-time job, I have

Re: How to specify an exact template?

2021-01-16 Thread solidstate1991 via Digitalmars-d-learn
Well, it's quite complicated to do. I have to manually unwrap each and all function template, then pray for the compile-time optimization gods that they'll be inlined. This is so annoying, that I might issue a DIP...

Re: How to specify an exact template?

2021-01-16 Thread solidstate1991 via Digitalmars-d-learn
On Saturday, 16 January 2021 at 14:18:55 UTC, Tove wrote: probably you can use https://dlang.org/spec/traits.html#getOverloads I don't know how to use it with functions outside of structs/classes.

Re: How to specify an exact template?

2021-01-16 Thread solidstate1991 via Digitalmars-d-learn
On Saturday, 16 January 2021 at 14:13:29 UTC, solidstate1991 wrote: Here's the following line, among many others: return !(ubyte); This generates an error, as this function template matches two instances, but currently I don't know how to choose the one I need, other than write a local

How to specify an exact template?

2021-01-16 Thread solidstate1991 via Digitalmars-d-learn
Here's the following line, among many others: return !(ubyte); This generates an error, as this function template matches two instances, but currently I don't know how to choose the one I need, other than write a local function, that looks a bit ugly.

PixelPerfectEngine v0.10.0-beta released - editor is also now on itch.io

2020-09-26 Thread solidstate1991 via Digitalmars-d-announce
https://ziltoid1991.itch.io/pixelperfecteditor https://github.com/ZILtoid1991/pixelperfectengine/releases/tag/v0.10.0-beta My next goal will be refactoring the GUI subsystem (with hopefully fixing many rendering bugs), then add even more features to the editor/engine.

Re: opApply and attributes

2020-07-16 Thread solidstate1991 via Digitalmars-d-learn
On Tuesday, 14 July 2020 at 00:17:14 UTC, solidstate1991 wrote: Something like that, but with @safe, pure, etc. attributes. I've tried to "bruteforce" it by generating functions with combinations of attributes, and it kinda works, but is a very janky solution. I'll brainstorm some DIP to

Re: opApply and attributes

2020-07-13 Thread solidstate1991 via Digitalmars-d-learn
On Tuesday, 7 July 2020 at 20:53:05 UTC, Ali Çehreli wrote: I am not sure whether I understand it correctly but there has been a request for opApply() to gain the attributes of the delegate (or the range?). In other words, "transfer the attributes to opApply". This is needed because I want

Re: opApply and attributes

2020-07-07 Thread solidstate1991 via Digitalmars-d-learn
On Tuesday, 7 July 2020 at 13:33:41 UTC, Paul Backus wrote: You can make opApply a template: int opApply(Dg)(Dg dg) if (is(Dg : scope int delegate(ref E))) { // etc. } Because `scope int delegate(ref E) @safe` implicitly converts to `scope int delegate(ref E)`,

opApply and attributes

2020-07-06 Thread solidstate1991 via Digitalmars-d-learn
See implementation of data structure here: https://github.com/ZILtoid1991/collections-d/blob/master/source/collections/treemap.d#L565 If I try to compile this code, it'll fail, limiting it's usecase: @safe pure unittest { alias IntMap = TreeMap!(int, int, false); IntMap test;

Re: Post: Why no one is using your D library

2020-07-02 Thread solidstate1991 via Digitalmars-d-announce
On Thursday, 2 July 2020 at 14:56:09 UTC, aberba wrote: Why no one is using your D library So I decided to write a little something special. Its my love letter to D folks. https://aberba.vercel.app/2020/why-no-one-is-using-your-d-library/ Thanks, I'll try to write better documentation for

Re: A custom name for variables

2020-05-29 Thread solidstate1991 via Digitalmars-d-learn
On Thursday, 28 May 2020 at 20:26:55 UTC, Quantium wrote: I need to create a variable with custom name, like this import std; void main() { string name; readf(" %s", ); // some code that generates a variable of type integer and value 0 } Could you help me with that? This might be

Re: DIP 1028 "Make @safe the Default" is dead

2020-05-29 Thread solidstate1991 via Digitalmars-d-announce
On Friday, 29 May 2020 at 04:53:07 UTC, Walter Bright wrote: The subject says it all. If you care about memory safety, I recommending adding `safe:` as the first line in all your project modules, and annotate individual functions otherwise as necessary. For modules with C declarations, do as

Re: Linker error under Ubuntu

2020-05-15 Thread solidstate1991 via Digitalmars-d-learn
On Friday, 15 May 2020 at 03:46:57 UTC, evilrat wrote: Um, pardon the stupid question, but did you just forgot to link it? I can't see a mention of it anywhere in both the old json and dub.sdl, and I don't see subpackages either. (does it links implicitly by the compiler?) Also if it's

Linker error under Ubuntu

2020-05-14 Thread solidstate1991 via Digitalmars-d-learn
When I try to compile my own project under Ubuntu with dub, I get the following linker error: /usr/bin/ld: .dub/obj/pixelperfectengine_pixelperfecteditor.o: undefined reference to symbol 'inflateEnd' //lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line

Re: Fixing race issues the right way

2020-04-20 Thread solidstate1991 via Digitalmars-d-learn
On Sunday, 5 April 2020 at 22:33:50 UTC, Stefan Koch wrote: Look at your program in a debugger and see if it does spawn threads. If it does find out where and why they are spawned. Thanks for the answer, but it seems the issue was the lack of the ability of unittesting such a large

Fixing race issues the right way

2020-04-05 Thread solidstate1991 via Digitalmars-d-learn
My game engine is currently broken due to some race issue I don't really know how to resolve. It seems that the compiler tries to skip instructions that are not locked with a `writeln()` or something similar. Usually I can safely remove the writeln after compiling it once with that way.

PixelPerfectEngine 0.9.4 - now with a (barely) working editor

2020-01-04 Thread solidstate1991 via Digitalmars-d-announce
It took me some headaches (especially as some errors were due to hard to spot typos), but finally I got the editor working after a lot of refactoring and no direction. https://github.com/ZILtoid1991/pixelperfectengine/releases/tag/v0.9.4 Future plans: - better version numbering - better

Re: How to debug in vscode Windows?

2020-01-01 Thread solidstate1991 via Digitalmars-d-learn
On Wednesday, 1 January 2020 at 14:46:01 UTC, NaN wrote: You can use visual studio (works in 2019, havent tried earlier versions) to debug any exe you want. You do this... Go to File menu, then Open, then Project/Solution Make sure "all project files" is selected, then find the exe you want

LLD-link doesn't work, how do I change linkers?

2020-01-01 Thread solidstate1991 via Digitalmars-d-learn
I cannot do any work, since LLD-link is broken and doesn't want to link for anything. It just gives me a bunch of errors for missing symbols, that supposed to be in the core libraries. How can I set up the Microsoft linker instead?

"Mixin is not defined" error when trying to use template mixins

2019-10-27 Thread solidstate1991 via Digitalmars-d-learn
There's a template mixin in my dimage project's new version in base.d, and when I try to access it from another file I get two errors: undefined identifier `ChunkyAccess4bit`, did you mean template `ChunkyAccess4Bit()`? and mixin `dimage.tga.TGA.ChunkyAccess4bit!()` is not defined Should

Re: I've created a binding for an LZW library

2019-10-27 Thread solidstate1991 via Digitalmars-d-announce
On Sunday, 27 October 2019 at 16:19:58 UTC, Andre Pany wrote: That is really great. Side question, did you considered to rewrite a C library (e.g. https://github.com/vapier/liblzw) to D? Kind regards Andre Probably it would be easier than the times I tried to rewrite much more complex C++

I've created a binding for an LZW library

2019-10-26 Thread solidstate1991 via Digitalmars-d-announce
https://github.com/ZILtoid1991/lzwford The hardest part was to find one that could work with D easily. I guess now Imageformats (and my own dimage) can have GIF and TIFF file support.

Re: Symantec has been sold to Broadcom

2019-08-09 Thread solidstate1991 via Digitalmars-d-announce
On Friday, 9 August 2019 at 02:22:11 UTC, DanielG wrote: Software is a funny thing. I'm old enough to remember when everything was locked down and proprietary, of economic necessity. Nowadays it's almost entirely the opposite, for the same reason. We're definitely well into the Singularity,

Any easy way to check if an object have inherited an interface?

2019-07-22 Thread solidstate1991 via Digitalmars-d-learn
It seems that I've to write my own function that searches in the given object's classinfo.interfaces since I couldn't find anything related in Phobos.

Re: std.zlib odd behavior

2019-05-20 Thread solidstate1991 via Digitalmars-d-learn
On Wednesday, 6 March 2019 at 01:50:16 UTC, solidstate1991 wrote: Thanks, it seems I'll have to write my own solution for this, and I really dislike the way streaming compression works in C. I've spotted some other bugs regarding my PNG implementation, but those were unrelated and didn't

Datapak: Data storage format with support for multiple compression algorithms

2019-05-10 Thread solidstate1991 via Digitalmars-d-announce
https://github.com/ZILtoid1991/datapak It's primarily function is to store application (such as game) assets in either compressed or uncompressed format, but its extendability enables it to store longer filenames and other OS important data, metadata, etc. Currently it's in a preliminary

Re: std.zlib odd behavior

2019-03-05 Thread solidstate1991 via Digitalmars-d-learn
On Tuesday, 5 March 2019 at 02:19:26 UTC, Adam D. Ruppe wrote: I haven't found the bug in your code yet, but one thing I suspect from my experience is you might be reusing a buffer. std.zlib actually stores pointers internally across function calls, so if you are trying to compress a stream,

std.zlib odd behavior

2019-03-04 Thread solidstate1991 via Digitalmars-d-learn
https://github.com/ZILtoid1991/dimage/blob/master/source/dimage/png.d It seems that after a certain point, it doesn't add more data to the compression stream, flushing doesn't help.

Re: Odd behavior of darray.dup

2019-02-23 Thread solidstate1991 via Digitalmars-d-learn
On Saturday, 23 February 2019 at 19:21:10 UTC, Bastiaan Veelo wrote: It works for me: https://run.dlang.io/gist/473b0021487275751accaebeb00be05c -- Bastiaan Still no luck, not even with memcpy. There's even more mystery as I printed out the original static immutable array's content, which

Odd behavior of darray.dup

2019-02-22 Thread solidstate1991 via Digitalmars-d-learn
If I want to copy an array of structs with .dup (cannot post the link in question here at the moment due to non-working clipboard, it's Color from pixelperfectengine.graphics.common) I get all zeroes instead of the values from the original array. I haven't disabled post-blit to my knowledge.

Where to start with SafeD?

2019-02-13 Thread solidstate1991 via Digitalmars-d-learn
When I tried to apply to a position at Symmetry, I've got a criticism from Atila Neves that some of my code relied too much on memcpy, thus making it unsafe. After digging into std.array, I found some function that could possibly replace it to emulate writing in the middle of a file, but at

Should this library binding work?

2018-12-26 Thread solidstate1991 via Digitalmars-d-learn
https://github.com/ZILtoid1991/bindbc-zstandard After looking for alternatives to my megaproject of porting LZHAM to D (since it had several issues, I'll salvaging my tar implementation as well as another archive format meant for application data storage), I found out that zstandard not only

I've created two new libraries

2018-12-16 Thread solidstate1991 via Digitalmars-d-announce
https://github.com/ZILtoid1991/dimage https://github.com/ZILtoid1991/vfile The first is a yet another image library for D, but this time it can read and write indexed images, and also have support for some more obscure TGA features such as embedded data (developer area) and the extra fields

Template matches more than one template declaration error when trying to pass function's pointer

2018-11-30 Thread solidstate1991 via Digitalmars-d-learn
After some refactoring, there are four functions sharing the same name (technically four, but LDC didn't complain about them): @nogc void blitter(T)(T* src, T* dest, size_t length){...} and @nogc void blitter(T)(T* src, T* dest, size_t length, T* mask){...} I need the first one, but at

Re: Just found this debugger...

2018-10-20 Thread solidstate1991 via Digitalmars-d
On Wednesday, 3 October 2018 at 13:08:50 UTC, Vladimir Panteleev wrote: On Wednesday, 3 October 2018 at 03:25:04 UTC, solidstate1991 wrote: and I don't want to go back to VisualD after VSCode for either a usable mago or VS native debug. Visual Studio makes a decent stand-alone source-level

How do I debug externally with Visual Studio?

2018-10-20 Thread solidstate1991 via Digitalmars-d-debugger
I use VSCode since it has better D support, however until I make mago-mi usable (it doesn't even support all the commands currently it claims, --args seems to be completely broken) or find again a working copy of LLDB for Windows (doesn't want to compile with Mingw also being installed), I

Can opApply be made @nogc?

2018-10-19 Thread solidstate1991 via Digitalmars-d-learn
Since it's a bit difficult to make tree traversal through range (especially if someone wants to make it @nogc), I thought I'll make it through opApply override, however the delegate passed by it doesn't have the @nogc attribute, which would automatically make it incapable to be used in a @nogc

Re: My statements related to terminating my SAoC relationship

2018-10-17 Thread solidstate1991 via Digitalmars-d
On Tuesday, 16 October 2018 at 02:20:09 UTC, Soulsbane wrote: Have you tried melatonin? My doctor has me take a 1mg tablet and split it in two. So I take 1/2 at bedtime. That is the sweet spot. If you take more than that you will end up groggy. No, but I'll since I used to have this issue

My statements related to terminating my SAoC relationship

2018-10-15 Thread solidstate1991 via Digitalmars-d
I have done two mistakes: I underestimated the scope of the project and overestimated my capabilities. This caused a chain reaction, which in turn made the first milestone unreachable. At the same time, my sleep disorder became even worse. I started to sleep 10-12 hours a day while spending

Interfacing D with C++ functions that take reference values

2018-10-03 Thread solidstate1991 via Digitalmars-d-learn
I need some C++ stuff, but some of the functions take reference values (Stuff&), and I don't know if this feature is emulated on D side with extern(C++) functions. While I don't have to worry about it with functions that are defined in the header, other ones and classes are a different matter.

Just found this debugger...

2018-10-02 Thread solidstate1991 via Digitalmars-d
I wanted to do some work on lzbacon (D port of lzham-codec with some extras such as tarball support), but without a debugger it's pretty hard (I suspect an error in the multithreading when looking up for a value, or some C++ language quirk I missed). The current state of mago-mi is nearly

Re: Quick C bindings

2018-10-02 Thread solidstate1991 via Digitalmars-d
I would also like something, but for the C11 runtime, as it's essential for mago (uses it for unicode strings, rewriting them for Phobos would take too much time, and I've already ran out of time).

Re: A facebook group for D programmers

2018-09-17 Thread solidstate1991 via Digitalmars-d-announce
On Monday, 17 September 2018 at 18:40:21 UTC, Bill Baxter wrote: Here's the link : https://www.facebook.com/dlang.org . ;-) That's the page, not the group. It seems the group is set to secret, it'll make joining very hard, only through invitations.

Will the core.stdc module be updated for newer versions of C?

2018-09-07 Thread solidstate1991 via Digitalmars-d
While for the most part it still works very well, however when porting Mago I found a few functions that are not present in C99 (most notably wcsncpy_s). While I can write my own functions to do the same (already done this with C++'s array since a few classes inherited from std::vector,

Re: Looking for a mentor for SAoC

2018-08-31 Thread solidstate1991 via Digitalmars-d
On Monday, 27 August 2018 at 20:47:08 UTC, Stefam Koch wrote: I guess I could help you out with coff. generating it is not the problem but linking it on windows currently requires the MS linker. which may not be desired. then again ... I think binutils do support coff as well. I might need

Re: D now has a dangerous competitor

2018-08-28 Thread solidstate1991 via Digitalmars-d
On Tuesday, 28 August 2018 at 11:30:20 UTC, JN wrote: On Tuesday, 28 August 2018 at 08:39:20 UTC, bauss wrote: The following language is a dangerous competitor to D. https://github.com/joaomilho/Enterprise I often feel like this kind of 'jokes' are trying too hard. FizzBuzz Enterprise was

Looking for a mentor for SAoC

2018-08-26 Thread solidstate1991 via Digitalmars-d
I've chosen to work on Mago, with the following goals: -Porting it to D first and foremost to make code maintenance and expansion easier in the future. -Add better support for Win32-COFF (there's a few more bugs compared to Win32-OMF in my experience) and Win64-COFF. As I read COFF32 needs

LZHAM port to D is live on GitHub

2018-08-07 Thread solidstate1991 via Digitalmars-d-announce
https://github.com/ZILtoid1991/lzbacon Completely untested, no compression or test cases yet, no dub integration, and probably will fail at compilation, however if someone would like to help me out then it would be awesome. - Close to LZMA compression rates with higher decompression speed

Using fibers

2018-08-03 Thread solidstate1991 via Digitalmars-d-learn
I'm porting LZHAM to D, and the original used some very unusual approach for coroutines: - the whole thing is running inside of a single switch-case block created by C++ macros - the function saves some local values - a macro sets the state variable to the current line number, returns the

Casting a pointer and length value as a dynamic array

2018-07-30 Thread solidstate1991 via Digitalmars-d-learn
I need this to port a C++ code to D (a compression algorithm known as LZHAM), and the easiest way to deal with it would be that. The ADLER32 and CRC32 algorithms had to be ditched, and while I could rewrite the former to make sense (used some form of "vectorization") I would like to use the

Re: Weird bugs in DMD 2.81.0

2018-07-14 Thread solidstate1991 via Digitalmars-d
Well, it seems I fixed the AA issue by removing a totally unrelated thing (an undoable event chain system, that got "deprecated"), but now I got another weird issue. Sometimes setting a dynamic array's length causes an access violation. Still only on WindowMaker, and nothing in

Re: Weird bugs in DMD 2.81.0

2018-07-14 Thread solidstate1991 via Digitalmars-d
On Saturday, 14 July 2018 at 07:01:59 UTC, Seb wrote: Any chance you can make a minimal, reproducible example of this? Would be great because then it can be put on bugzilla and other people can have a look at it too. I might try, but first I'll look at the functions to see if I can fix some

Re: Weird bugs in DMD 2.81.0

2018-07-13 Thread solidstate1991 via Digitalmars-d
On Saturday, 14 July 2018 at 00:58:08 UTC, solidstate1991 wrote: I found a temporary workaround. Basically I just save the content of the AA, then reapply it after the application's constructor finished, before that it always generated an exception when I tried to check its content e.g. via

Re: Weird bugs in DMD 2.81.0

2018-07-13 Thread solidstate1991 via Digitalmars-d
On Saturday, 7 July 2018 at 02:21:31 UTC, solidstate1991 wrote: I'll upload code tomorrow, but here's the premise: Sometimes elements disappear from associative arrays, causing all sorts of errors down the line, mostly access violations. My engine (PixelPerfectEngine) has a style sheet for

Re: Weird bugs in DMD 2.81.0

2018-07-07 Thread solidstate1991 via Digitalmars-d
On Saturday, 7 July 2018 at 07:31:29 UTC, Seb wrote: I'm sorry but without code there's not much we can do for you. However, one thing we can try is to get your project on the project tester once this regression is fixed. https://github.com/ZILtoid1991/pixelperfectengine Just did a commit

Re: How about implementing SPMD on SIMD for D?

2018-07-07 Thread solidstate1991 via Digitalmars-d
On Saturday, 7 July 2018 at 13:20:53 UTC, Guillaume Piolat wrote: Oh yes, so much this. It would be very nice to have D_SIMD on DMD 32-bit. Does D_SIMD work on LDC?

Weird bugs in DMD 2.81.0

2018-07-06 Thread solidstate1991 via Digitalmars-d
I'll upload code tomorrow, but here's the premise: Sometimes elements disappear from associative arrays, causing all sorts of errors down the line, mostly access violations. My engine (PixelPerfectEngine) has a style sheet for its GUI, which generates basic values upon construction. This

Re: How about implementing SPMD on SIMD for D?

2018-07-06 Thread solidstate1991 via Digitalmars-d
I think fixing the SIMD support would be also great. 1) Make it compatible with Intel intrinsics. 2) Update it to work with AVX-512. 3) Add some preliminary support for ARM Neon. 4) Optional: Make SIMD to compile for all 32 bit targets, so I don't have to write long-ass assembly code for

  1   2   3   >