Re: "Programming in D" on Educative.io

2020-05-13 Thread Ali Çehreli via Digitalmars-d-announce

On 5/13/20 12:25 PM, welkam wrote:

On Thursday, 7 May 2020 at 09:18:04 UTC, Ali Çehreli wrote:

Because D is a re-engineering of C++


I thought it was re-engineering of C


Thanks. I will have it fixed.

Ali



Re: my blog on recent code and dmd performance tips

2020-05-13 Thread Arine via Digitalmars-d-announce

On Wednesday, 13 May 2020 at 01:57:18 UTC, Adam D. Ruppe wrote:
I try to write something on this once a week, though longer 
posts like this tend to be less common (and some weeks, like 
last week, I post nothing at all...), but I rarely post here 
since I don't want to be super spammy.


However a reminder here my D blog is still active and if you 
use my libs you might want to check in once a month or so and 
if you don't, the general D tips are probably interesting 
enough for you to skim anyway every two or three months.


Anyway, I wrote something longer this time and talked both 
about my libs and about some dmd compile speed/ram tips in 
general so might be worth a skim by many of you:


http://dpldocs.info/this-week-in-d/Blog.Posted_2020_05_11.html

(and a couple weeks ago I wrote about the script lang too which 
if you are at all interested in that it might be fun to look 
at: 
http://dpldocs.info/this-week-in-d/Blog.Posted_2020_04_27.html 
you can subclass D classes in script and reuse them from D! 
pretty cool if i do say so myself lol)


Yah static foreach is slow for sure. Part of the problem is that 
it literally just runs a lambda at CTFE that creates a tuple. So 
that static foreach 0 .. 1 literally creates a tuple with 
1 elements. Might even create an array first that then gets 
converted to that tuple. So yah, not very efficient at all.


Re: "Programming in D" on Educative.io

2020-05-13 Thread welkam via Digitalmars-d-announce

On Thursday, 7 May 2020 at 09:18:04 UTC, Ali Çehreli wrote:

Because D is a re-engineering of C++


I thought it was re-engineering of C


Rising a dead module : SimpleVFS, a fork of D:GameVFS

2020-05-13 Thread Luis via Digitalmars-d-announce
Well, I need a simple VFS for my pet/toy game engine. And the 
only dub package that give me this... D:GameVFS. And it was 
abandoned some time ago.
So, I clone it, fixed & updated to work with D frontend 2.090, 
added travis and appveyor CI autotesting, documentation living on 
on GH pages, added package.d ...
I try to contact with the original author, and before waited some 
days for a response, I decide to publish my fork with a new name. 
So, if someone need a simple VFS, you can take a look to :


https://zardoz89.github.io/SimpleVFS/index.html

The initial release, 0.2.1, it's source compatible with D:GameVFS 
.


My TODO list for future versions, are :

* Rename modules to simplevfs.XXX
* Modernize the tests to use Silly
* Improve the test battery with more cases
* Check why it's using std.c.stdlib, and avoid using it. 
std.c.stdlib : fseek isn't compatible with files bigger that 2 
GiB ( don't calls _fseeki64 )
* Work to make @nogc friendly, if I can... I need to check how 
works exceptions with @nogc code.




Re: BindBC Updates: new loader function, SDL_net, streamlined SDL_* version indentifiers

2020-05-13 Thread Mike Parker via Digitalmars-d-announce

On Wednesday, 13 May 2020 at 14:39:13 UTC, Mike Parker wrote:

It's up to the caller to ensure the path is valid. For example, 
if the executable is run from a different directory, then 
"libs" will not be relative to the current working directory. 
`SDL_GetBasePath` can help there:


https://wiki.libsdl.org/SDL_GetBasePath?highlight=%28%5CbCategoryFilesystem%5Cb%29%7C%28CategoryEnum%29%7C%28CategoryStruct%29



Well, duh. I put the cart before the horse on that one. SDL2.dll 
is going to be in the same subdirectory since all the others 
depend on it and will fail to load if it isn't there (they don't 
load it dynamically, of course).


Working with args[0] or, since this is a Windows-only thing, 
calling the Win32 API directly (GetModuleFileName, IIRC) will get 
you there.


BindBC Updates: new loader function, SDL_net, streamlined SDL_* version indentifiers

2020-05-13 Thread Mike Parker via Digitalmars-d-announce
I've recently implemented some improvements centered on 
bindbc-sdl.


== New Loader Function

I've added a function to bindbc-loader (on Windows only) to allow 
adding a single path to the default DLL search path. This is to 
solve the problem that some of the SDL satellite libraries would 
fail to load when placed in a directory outside of the search 
path, such as a ./libs subdirectory.


The problem is that SDL loads its dependencies dynamically. So 
when a bindbc user would load a lib with a custom path, e.g., 
`loadSDLImage("libs\\SDL2_image.dll")`, the system loader would 
find that DLL just fine, but then when it in turn attempted to 
load a dependency like libpng, the system loader would search the 
DLL search path and *not* the libs subdirectory, thereby causing 
a failure.


Now you can do this:

```
version(Windows) setCustomLoaderSearchPath("libs");

if(loadSDL() < sdlSupport) { /* handle error */ }
if(loadSDL_Image() < sdlImageSupport) { /* handle error */ }

// Give SDL_image a chance to load libpng and libjpeg (it loads 
them lazily

// when the corresponding flags are passed to IMG_Init.
auto flags = IMG_INIT_PNG | IMG_INIT_JPEG;
if(IMG_Init(flags) != flags) { /* handle error */ }

// Now reset the default loader search path
version(Windows) setCustomLoaderSearchPath(null);
```

It's up to the caller to ensure the path is valid. For example, 
if the executable is run from a different directory, then "libs" 
will not be relative to the current working directory. 
`SDL_GetBasePath` can help there:


https://wiki.libsdl.org/SDL_GetBasePath?highlight=%28%5CbCategoryFilesystem%5Cb%29%7C%28CategoryEnum%29%7C%28CategoryStruct%29

I'm unaware of any issues with other libraries BindBC binds to, 
but if they do arise, this will solve those, too.


== SDL_net

I didn't initially port SDL_net over because I didn't think 
anyone was using it. I was waiting for someone to request it. 
Someone did. It's a small API, so it took a matter of minutes to 
complete.


== Streamlined SDL_* version identifiers

Previously, the SDL satellite library bindings could be enabled 
with e.g., `BindSDL_Image`, `BindSDL_TTF`, etc. That would enable 
the lowest supported version of the library. To enable a more 
recent version, an additional identifier was required 
(`SDL_Image_205`, `SDL_TTF_2014`). That's just dumb. Now, only 
one identifier is required, e.g., `SDL_Image_205` will do the 
trick by itself now. `SDL_Image` is equivalent to the 
`SDL_Image_200`. The old approach is still supported, though, so 
current build configs should continue to work without change.


See the loader documentation for details on the new function:

https://github.com/BindBC/bindbc-loader

There's also a bit about it in the bindbc-sdl documentation, 
along with the details about the approach to version identifiers.


https://github.com/BindBC/bindbc-sdl/blob/master/README.md

I've got some bigger packages to port over from Derelict yet (the 
OpenCL binding, for example). I've also had a request to include 
support for SDL's thread/mutex API so folks using DasBetterC can 
have access to it. That's all in the pipeline. Going forward, I 
plan to devote a handful of hours one day a week to bindbc until 
I've implemented everything on my task list, so it will get done 
sooner rather than later.




Re: [OT] What do you guys think of dark comedy channel on IT sh.. stuff?

2020-05-13 Thread Dmitry Olshansky via Digitalmars-d-announce

On Wednesday, 13 May 2020 at 12:26:48 UTC, user1234 wrote:

On Tuesday, 12 May 2020 at 07:52:29 UTC, Dmitry Olshansky wrote:
I find that I can vaguely amusing 100% of the day and I love 
standup comedy...


"standup" lol.

That reminds mesomeone who likes this genre too but he's not 
here anymore...

you see just in case of...



Well if I will not run out of steam in a year or so he’ll find me 
anyhow.


Re: [OT] What do you guys think of dark comedy channel on IT sh.. stuff?

2020-05-13 Thread user1234 via Digitalmars-d-announce

On Tuesday, 12 May 2020 at 07:52:29 UTC, Dmitry Olshansky wrote:
I find that I can vaguely amusing 100% of the day and I love 
standup comedy...


"standup" lol.

That reminds mesomeone who likes this genre too but he's not here 
anymore...

you see just in case of...


Re: [OT] What do you guys think of dark comedy channel on IT sh.. stuff?

2020-05-13 Thread user1234 via Digitalmars-d-announce

On Wednesday, 13 May 2020 at 07:29:54 UTC, Dmitry Olshansky wrote:
On Wednesday, 13 May 2020 at 07:02:20 UTC, Dmitry Olshansky 
wrote:
On Tuesday, 12 May 2020 at 07:52:29 UTC, Dmitry Olshansky 
wrote:
I find that I can vaguely amusing 100% of the day and I love 
standup comedy...




And I’m too lame to figure out how do you open a brand channel 
on youtube. Anyone did that before? Was it that hard? Hope 
there is blood ritual involved, I expect anything now that I 
wasted 20 minutes and I’m only getting close to open it.


YT UX is silly. On top of that the whole site is crippled with 
incredible bugs.


Re: "Programming in D" on Educative.io

2020-05-13 Thread Ali Çehreli via Digitalmars-d-announce
On 5/7/20 5:53 AM, M.M. wrote:> On Thursday, 7 May 2020 at 09:18:04 UTC, 
Ali Çehreli wrote:


> Nice initiative with the online course. I will have a look soon; I am
> thinking of introducing D to my university students...

It's always exciting to see D used in teaching! :) Alex Ortiz, my 
contact at Educative.io, has student discounts. He say:



Please have them reach out if they'd like to use this course as part of 
the curriculum.


Maybe those students can avail themselves of Educative-related 
resources. We're part of the GitHub Student Education
Pack , through which college students 
can avail themselves of a free 6-month subscription to our courses. We 
also sometimes have special scholarships in place on our side. Finally, 
we can offer university students specifically of your course a 
discounted rate or somesuch.


In any case, the professor can in the future email *supp...@educative.io 
*, explain that they're a
professor who wants to use your course(s) in their university 
curriculum, and ask what we have in place to help their

students.



Ali




Re: "Programming in D" on Educative.io

2020-05-13 Thread Ali Çehreli via Digitalmars-d-announce

On 5/12/20 3:05 AM, Pavel Shkadzko wrote:

On Thursday, 7 May 2020 at 09:18:04 UTC, Ali Çehreli wrote:
I'm happy to announce that the first part of "Programming in D" is 
available on Educative.io:


[...]


This is great! Finally, a D course. It is a shorter than "Programming in 
D" book version though. But for the introductory course I think it's fine.


Educative.io decided to provide the book in two parts. They are still 
working on the second part.


Ali



Re: [OT] What do you guys think of dark comedy channel on IT sh.. stuff?

2020-05-13 Thread Dmitry Olshansky via Digitalmars-d-announce

On Wednesday, 13 May 2020 at 07:02:20 UTC, Dmitry Olshansky wrote:

On Tuesday, 12 May 2020 at 07:52:29 UTC, Dmitry Olshansky wrote:
I find that I can vaguely amusing 100% of the day and I love 
standup comedy...




And I’m too lame to figure out how do you open a brand channel on 
youtube. Anyone did that before? Was it that hard? Hope there is 
blood ritual involved, I expect anything now that I wasted 20 
minutes and I’m only getting close to open it.


Re: [OT] What do you guys think of dark comedy channel on IT sh.. stuff?

2020-05-13 Thread Dmitry Olshansky via Digitalmars-d-announce

On Tuesday, 12 May 2020 at 07:52:29 UTC, Dmitry Olshansky wrote:
I find that I can vaguely amusing 100% of the day and I love 
standup comedy...


So I thought maybe I can give it a shot with a youtube channel? 
I already invent a cool personality - think Dirk Gently in 
computer science setting;)


BTW for those of us who can’t do google search with a single 
click because of poor browser integration with the ecosystem, 
it’s this stuff:


https://en.wikipedia.org/wiki/Dirk_Gently_(TV_series)

It’s hilarious. Monthy Python  is classic and all, but this stuff 
- totally insane and incredibly long chains of jokes, just what I 
like in humor the most...



If that seems cool to you shoot me an email, or reply in this 
thread ... I need to the count to have a rough estimate of how 
low the size of my initial audience is..





Re: [OT] What do you guys think of dark comedy channel on IT sh.. stuff?

2020-05-13 Thread Dmitry Olshansky via Digitalmars-d-announce

On Wednesday, 13 May 2020 at 06:52:55 UTC, Basile B. wrote:

On Tuesday, 12 May 2020 at 07:52:29 UTC, Dmitry Olshansky wrote:
I find that I can vaguely amusing 100% of the day and I love 
standup comedy...


So I thought maybe I can give it a shot with a youtube 
channel? I already invent a cool personality - think Dirk 
Gently in computer science setting;)


If that seems cool to you shoot me an email, or reply in this 
thread ... I need to the count to have a rough estimate of how 
low the size of my initial audience is..


I rarely watch videos about programming (even talk) but I'd 
certainly take a look if you start something. It cant be worst 
than one of these tutorial produced by random Indian guys.


Let’s put this way - if you don’t like it 10 minutes in - I owe 
you 1 VBJ token, it’s kind 1 favor ask anything digital currency. 
Simple GNU PG with funny trxt signed by my key + I’ll post the 
fingerprint EVERYWHERE just in case...





Re: [OT] What do you guys think of dark comedy channel on IT sh.. stuff?

2020-05-13 Thread Basile B. via Digitalmars-d-announce

On Tuesday, 12 May 2020 at 07:52:29 UTC, Dmitry Olshansky wrote:
I find that I can vaguely amusing 100% of the day and I love 
standup comedy...


So I thought maybe I can give it a shot with a youtube channel? 
I already invent a cool personality - think Dirk Gently in 
computer science setting;)


If that seems cool to you shoot me an email, or reply in this 
thread ... I need to the count to have a rough estimate of how 
low the size of my initial audience is..


I rarely watch videos about programming (even talk) but I'd 
certainly take a look if you start something. It cant be worst 
than one of these tutorial produced by random Indian guys.


Re: [OT] What do you guys think of dark comedy channel on IT sh.. stuff?

2020-05-13 Thread Dmitry Olshansky via Digitalmars-d-announce

On Tuesday, 12 May 2020 at 19:52:35 UTC, Dmitry Olshansky wrote:

Depending on what it looks like when it is finished.
If it should have a teaching aspect, you would need to collect 
the sources and information into the video description.


I’m going to describe the way I do creative work and try to 
capture this fleeting moment of me discovering something new.


I have started my own company as of 1 day ago. I have no idea 
where I will be in one year with that but sure as hell I’m 
having fun and I have an array of ambitious projects already in 
the works. I want to explore what a Holistic Computer Scientist 
at work looks like.


Just in case - if you have lot of cash on your hands and no idea 
on where to invest (these days it takes a blood while to figure 
it out)... Glow labs is a new R company run by a guy you 
probably know due to past DConf and stuff.


I’m doing my own ICO with my own coin, and it’s more like strong 
collectible even in case I’m broke(!) digital obligation thing. I 
believe that is the future of digital currency, in fact I’m 
living in that future but it gets kind lonely here...


Contact me if that’s something you can relate to ... Maybe
—
Dmitry Olshansky