Re: Binary Literals Not Going Anywhere

2022-09-27 Thread TheGag96 via Digitalmars-d-announce

On Monday, 26 September 2022 at 06:19:05 UTC, Max Samukha wrote:
Please do not take the backlash against the removal of binary 
literals as general aversion to breaking changes/deprecations. 
D has plenty to remove/deprecate (and it is NOT `alias this`, 
unless that is replaced with a more general mechanism, such as 
`using` in Jai).


+1 on Jai's `using` feature! `alias this` should definitely be 
more appreciated.


Re: Idioms for the D programming language

2021-02-12 Thread TheGag96 via Digitalmars-d-announce
On Friday, 12 February 2021 at 11:19:26 UTC, Guillaume Piolat 
wrote:

On Friday, 12 February 2021 at 00:26:09 UTC, H. S. Teoh wrote:
On Thu, Feb 11, 2021 at 12:12:36PM -0800, Walter Bright via 
Digitalmars-d-announce wrote: [...]

https://p0nce.github.io/d-idioms/


Not bad, but it seems to be missing some of the newer idioms.


It's because I lack the time to update it. It was always a page 
to let _me_ understand the language better, and then I got to a 
point where I wasn't following the D development enough.


I'd love if you'd pick up again. Years ago, when it was a bit 
more active, I'd check it all the time. I've learned a lot from 
the page. Thanks for all your work on it!


Re: D code running on the Nintendo 3DS

2019-10-21 Thread TheGag96 via Digitalmars-d-announce

On Monday, 21 October 2019 at 19:03:00 UTC, Iain Buclaw wrote:

(snip)


Yeah, I just learned you could do this not long after I posted - 
when I tried, I had a gdc from around the time of 9.0.1 instead 
of 9.2, so I just had to rebuild. I'm currently attempting to get 
a devkitARM based off of 9.2 going since I thought it'd be simple 
- that may go a long way to making no-runtime/betterC work better!




Re: D code running on the Nintendo 3DS

2019-10-20 Thread TheGag96 via Digitalmars-d-announce

On Sunday, 20 October 2019 at 20:31:04 UTC, Johan wrote:

(snip)


Awesome, I just might try to get LDC working with this...

On a different note, I'd really like a critique on a decision I 
made. Creating the bindings for libctru and citro3d was really 
tedious, partly because I made the decision to change every named 
enum from stuff like...


enum GPU_TEXTURE_WRAP_PARAM
{
  GPU_CLAMP_TO_EDGE   = 0x0, ///< Clamps to edge.
  GPU_CLAMP_TO_BORDER = 0x1, ///< Clamps to border.
  GPU_REPEAT  = 0x2, ///< Repeats texture.
  GPU_MIRRORED_REPEAT = 0x3, ///< Repeats with mirrored texture.
}

...to...

enum GPUTextureWrapParam
{
  clamp_to_edge   = 0x0, ///< Clamps to edge.
  clamp_to_border = 0x1, ///< Clamps to border.
  repeat  = 0x2, ///< Repeats texture.
  mirrored_repeat = 0x3  ///< Repeats with mirrored texture.
}

...in order to fit the D naming style, since the semantics for 
the enum was changing anyway. But of course, every struct must 
keep its old name... Is this alright? Should I add aliases for 
every struct for a better naming style, or maybe go back on my 
decision before, or...?


Re: D code running on the Nintendo 3DS

2019-10-20 Thread TheGag96 via Digitalmars-d-announce

On Sunday, 20 October 2019 at 17:40:04 UTC, Meta wrote:
Awesome work. I used to hack around on my original NDS and 
thought about maybe trying to get D working on it, but didn't 
have sufficient time or motivation. I'll definitely play around 
with this.


Last year I was able to get some C very simple code running on 
the DS, hacked into Pokemon Platinum... I imagine it could be 
done with -betterC, I guess! Following this tutorial might do a 
good chunk of the work to setting it up. You'd just need to copy 
similar stuff I did in 3ds_rules and my (horrific) Makefile in 
nds_rules. You could get by converting an example DS hello world 
and declaring any functions/structs needed in your main file as a 
start.


Re: D code running on the Nintendo 3DS

2019-10-20 Thread TheGag96 via Digitalmars-d-announce

On Sunday, 20 October 2019 at 15:27:35 UTC, Iain Buclaw wrote:
Great stuff!  Though I don't think you'll find much improvement 
in gdc 10 regarding switching off D features.  Backported 
patches to make gdc on parity with dmd as of April 2019 was 
done prior to the gdc 9 release.  I'm not aware of much more 
being done regarding that other than some extern(C) library 
functions being converted into templates, and the C main 
function being moved to a common location in D runtime (C main 
is not "compiled into" gdc unlike previous versions of dmd).


Darn... Are there any plans at some point in the future to add a 
real -betterC sort of flag? It would be really really nice to be 
able to compile something like...


import std.bitmanip : bitfields;

struct Stuff {
  mixin(bitfields!(
uint, "x",2,
int,  "y",3,
uint, "z",2,
bool, "flag", 1));
}

extern(C) void main() {
  Stuff x;
}

...just as in DMD or LDC.


Re: D code running on the Nintendo 3DS

2019-10-20 Thread TheGag96 via Digitalmars-d-announce

On Sunday, 20 October 2019 at 09:36:17 UTC, Johan Engelen wrote:

Did you try with LDC?
Just a wild guess but perhaps this triple will work: 
`-mtriple=armv6k-unknown-eabi`.


-Johan


I haven't yet, but I've been told also by someone else to try! It 
would certainly be nice to have a true -betterC going with this. 
Does LDC have equivalent flags for what devkitARM wants passed 
into GCC, like:


-march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft
-mword-relocations -fomit-frame-pointer -ffunction-sections

?


D code running on the Nintendo 3DS

2019-10-20 Thread TheGag96 via Digitalmars-d-announce
Hi, all. I wanted to get into the world of 3DS homebrew, but I 
really didn't feel like coding in C or C++. So, through an effort 
of sheer will, I somehow got a hello world example written in D 
up and running, along with bindings for most of libctru and 
citro3d.


https://github.com/TheGag96/3ds-hello-dlang

Included are instructions on how to set this up (although it's 
pretty hacky). I imagine one could easily start writing Switch 
homebrew in D by following most of these steps as well. Once GCC 
10 comes out with an updated GDC, it might become a pretty 
attractive alternative to C/++ for such projects if some work is 
put into bindings and stuff.


Hope someone finds this interesting!


Re: sumtype 0.3.0

2018-05-08 Thread TheGag96 via Digitalmars-d-announce

On Sunday, 6 May 2018 at 19:18:02 UTC, Paul Backus wrote:

snip


Wow.. without comments and unittests, the implementation is only 
116 lines. Awesome job. Even now I still find it incredible what 
D can do. Is Algebraic in the standard library really that bad? 
And if so, why aren't implementations like this being accepted?


Re: d_to_html.d

2017-08-06 Thread TheGag96 via Digitalmars-d-announce

On Saturday, 5 August 2017 at 19:07:50 UTC, WebFreak001 wrote:

snip


Man, this is absolutely nuts. Overriding opBinary to catch 
hyphens, aliasing opAssign to opCall... Just evil, haha! Amazing 
job!


Re: Commercial video processing app in D (experience report)

2016-05-05 Thread TheGag96 via Digitalmars-d-announce

On Wednesday, 27 April 2016 at 12:42:05 UTC, thedeemon wrote:

(snip)


Sorry to bump this thread, but how did you handle multiple 
windows using DlangUI? (As in, were you able to prevent input on 
the main window while another one was open, etc.) I know 
Vadim/buggins is working on improving that right now but I'd like 
to know if there's a clean way to handle more than one window 
already.


Re: DlangUI on Android

2016-04-22 Thread TheGag96 via Digitalmars-d-announce

On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote:

(snip)


Wow, really nice stuff! I wasn't even aware we could write D for 
Android at all...




Re: Sublime Text 3 Gets Better D Support

2016-02-09 Thread TheGag96 via Digitalmars-d-announce
Just got the new update, and when I reloaded my files, any source 
code inside a class has every variable name and all punctuation 
colored according to my theme: http://i.imgur.com/RxqTqoP.png


If I'm remembering right Java files look like the right half of 
the image as well, though I'm not sure what parameter in my theme 
I'm supposed to change to make this go back to what it was 
before, though... As it is it's a little eye-searing. Is this 
just a result of Sublime parsing D better now?