Jump to page: 1 2 3
Thread overview
Talk on D at DORS/CLUC
May 10
RazvanN
May 10
Dukc
May 10
RazvanN
May 16
Martyn
May 13
JN
May 14
Monkyyy
May 10
aberba
May 10
rkompass
May 10
Hipreme
May 10
monkyyy
May 13
RazvanN
May 16
Martyn
May 20
RazvanN
May 20
Martyn
May 20
Mike Shah
May 21
RazvanN
May 21
RazvanN
May 21
aberba
May 22
aberba
May 10

Hello everyone,

Next week I'm going to have a talk on D at an open source conference in Zagrab [1].
This is a great opportunity to advertise D so I'm going to talk about D's strength's. However, the talk is only 30 minutes in length and there's a lot of things I could potentially touch on - templates, dynamic arrays, safety, C interoperability etc. What do you think that I should focus my talk on? Any suggestions or cool D snippets are welcome.

Regards,
RazvanN

[1] https://www.dorscluc.org/

May 10
RazvanN kirjoitti 10.5.2024 klo 11.43:
> What do you think that I should focus my talk on?

The fact that a language needn't have a built-in GC x-or be designed for system-level control. No mainstream language does both but D does.

I'm bad at understanding marketing though so don't listen to me if you feel you know better.
May 10
On Friday, 10 May 2024 at 10:26:31 UTC, Dukc wrote:
> RazvanN kirjoitti 10.5.2024 klo 11.43:
> > What do you think that I should focus my talk on?
>
> The fact that a language needn't have a built-in GC x-or be designed for system-level control. No mainstream language does both but D does.
>
> I'm bad at understanding marketing though so don't listen to me if you feel you know better.

I want to structure my talk in 2 parts:

- one "theoretical" part where I enumerate all the cool stuff D does (this is where I will mention the GC and no-GC part)
- one practical part where I show snippets of D code which should prompt a "wow" reaction.

I have the first part covered, I'm more interested in the second part if folks have any suggestions.
May 10
On Friday, 10 May 2024 at 10:59:37 UTC, RazvanN wrote:
> On Friday, 10 May 2024 at 10:26:31 UTC, Dukc wrote:
>> RazvanN kirjoitti 10.5.2024 klo 11.43:
>> > What do you think that I should focus my talk on?
>>
>> The fact that a language needn't have a built-in GC x-or be designed for system-level control. No mainstream language does both but D does.
>>
>> I'm bad at understanding marketing though so don't listen to me if you feel you know better.
>
> I want to structure my talk in 2 parts:
>
> - one "theoretical" part where I enumerate all the cool stuff D does (this is where I will mention the GC and no-GC part)
> - one practical part where I show snippets of D code which should prompt a "wow" reaction.
>
> I have the first part covered, I'm more interested in the second part if folks have any suggestions.

I'm not sure I know what will wow people either. I thought my blog post showing how easy (2 lines) it is to call nanomsg from Python via D got all sorts of pushback, which wasn't what I was expecting. For me at least the wow factor in D is how much gets done with so little.
May 10

On Friday, 10 May 2024 at 08:43:14 UTC, RazvanN wrote:

>

Hello everyone,

Next week I'm going to have a talk on D at an open source conference in Zagrab [1].
This is a great opportunity to advertise D so I'm going to talk about D's strength's. However, the talk is only 30 minutes in length and there's a lot of things I could potentially touch on - templates, dynamic arrays, safety, C interoperability etc. What do you think that I should focus my talk on? Any suggestions or cool D snippets are welcome.

Regards,
RazvanN

[1] https://www.dorscluc.org/

A product sells more when you talk about it's impact or benefits to potential customer. We've been talking about the list of features, which we have more than any of the other languages making headlines, but that alone isn't a strong enough call to action.

I personally would be more convinced by projects in D rather than JUST a list of features. Gtkd, vibe.d, severino, dub, dlib, dplug, bindbc-*, mir libraries, and the like. These are direct results of what D can and is capable of doing. Also projects that are as a result of D's interoperability with other languages.

Selling D by the list of features and not by it's impact IMO isn't a good enough strategy.

May 10

On Friday, 10 May 2024 at 08:43:14 UTC, RazvanN wrote:

>

Hello everyone,

Next week I'm going to have a talk on D at an open source conference in Zagrab [1].
This is a great opportunity to advertise D so I'm going to talk about D's strength's. However, the talk is only 30 minutes in length and there's a lot of things I could potentially touch on - templates, dynamic arrays, safety, C interoperability etc. What do you think that I should focus my talk on? Any suggestions or cool D snippets are welcome.

Regards,
RazvanN

[1] https://www.dorscluc.org/

I have some cool features which is quite hard to see in other languages:

    module hip.systems.input;
        import hip.jni.jni;
        import hip.jni.helper.jnicall;

        ///Setups an Android Package for HipremeEngine
        alias HipAndroidInput = javaGetPackage!("com.hipremeengine.app.HipInput");
        alias HipAndroidRenderer = javaGetPackage!("com.hipremeengine.app.Hip_GLES30_Renderer");

        @JavaFunc!(HipAndroidInput) void onMotionEventActionMove(int pointerId, float x, float y)
    	{
            HipEventQueue.post(0, HipEventQueue.EventType.touchMove, HipEventQueue.Touch(cast(ushort)pointerId, x,y));
    	}

        @JavaFunc!(HipAndroidInput) void onMotionEventActionPointerDown(int pointerId, float x, float y)
    	{
            HipEventQueue.post(0, HipEventQueue.EventType.touchDown, HipEventQueue.Touch(cast(ushort)pointerId, x,y));
    	}

mixin javaGenerateModuleMethodsForPackage!(HipAndroidInput, hip.systems.input);

This code exposes functions on Java/Android, they iterate the current module, looking for @JavaFunc (I could have written ExternJava). They will generate based on the java package:

    // file com/hipremeengine/app/HipInput.java
    public static class HipInput
    {
        public static native void onMotionEventActionMove(int pointerId, float x, float y);
        public static native void onMotionEventActionPointerDown(int pointerId, float x, float y);

}

Not only that, but you can also pretty easily call Java functions from D:


        alias HipAndroid = javaGetPackage!("com.hipremeengine.app.HipremeEngine");
        int[2] wsize = HipAndroid.javaCall!(int[2], "getWindowSize");
        AAssetManager* aaMgr = cast(AAssetManager*)HipAndroid.javaCall!(Object, "getAssetManager");

Beyond that, I have also written code that auto translates to Lua and Objective-C. So D is quite flexible into that.

The main 2 packages I know from dub that does that are:

  1. arsd.jni
  2. objc_meta
May 10

On Friday, 10 May 2024 at 13:23:01 UTC, aberba wrote:

>

On Friday, 10 May 2024 at 08:43:14 UTC, RazvanN wrote:

>

Hello everyone,

Next week I'm going to have a talk on D at an open source conference in Zagrab [1].
This is a great opportunity to advertise D so I'm going to talk about D's strength's. However, the talk is only 30 minutes in length and there's a lot of things I could potentially touch on - templates, dynamic arrays, safety, C interoperability etc. What do you think that I should focus my talk on? Any suggestions or cool D snippets are welcome.

You could start by demonstrating a C interpreter, (which under the hood is a
alias cint="dmd -run", which you don't reveal yet).
Then surprise the audience with associative arrays, working out of the box, and perhaps CTFE working on a file.
Explain then that you are still in the same "interpreter" but in a slightly better language (D).
Give more demonstrations of Ds features then reveal that the interpreter is in fact a very fast compiler.
Perhaps then present the EBay table processing code for a commercial application using CTFE.

May 10

On Friday, 10 May 2024 at 08:43:14 UTC, RazvanN wrote:

>

Hello everyone,

Next week I'm going to have a talk on D at an open source conference in Zagrab [1].
This is a great opportunity to advertise D so I'm going to talk about D's strength's. However, the talk is only 30 minutes in length and there's a lot of things I could potentially touch on - templates, dynamic arrays, safety, C interoperability etc. What do you think that I should focus my talk on? Any suggestions or cool D snippets are welcome.

Regards,
RazvanN

[1] https://www.dorscluc.org/

explaining this code

template toggle(bool defualt=false,alias discriminator=void, int i=__LINE__){
	static bool __toggle=defualt;
	bool toggle(bool input){
		if(input){
			__toggle= ! __toggle;
		}
		return __toggle;
	}
	bool toggle(){
		return __toggle;
	}
}
May 11
Here's one I like:

https://github.com/dlang/dmd/blob/master/compiler/src/dmd/backend/var.d#L188

This table used to be generated by a separate C program. The C program would build the table, and write a .c file with the initializer for the table.

The code now demonstrates a lambda that is executed at compile time to generate the table. There are several examples in the file.

1. there is no need for constexpr
2. the lambda code is not emitted to the executable

The cool thing is you've got the full power of D available to generate static tables.
May 13
On Sunday, 12 May 2024 at 01:47:51 UTC, Walter Bright wrote:
> Here's one I like:
>
> https://github.com/dlang/dmd/blob/master/compiler/src/dmd/backend/var.d#L188
>
> This table used to be generated by a separate C program. The C program would build the table, and write a .c file with the initializer for the table.
>
> The code now demonstrates a lambda that is executed at compile time to generate the table. There are several examples in the file.
>
> 1. there is no need for constexpr
> 2. the lambda code is not emitted to the executable
>
> The cool thing is you've got the full power of D available to generate static tables.

Thanks everyone for your suggestions. I will how I can put everything together in a 30 min talk. I'll keep you updated on how it went!

Regards,
RazvanN
« First   ‹ Prev
1 2 3