question

2023-12-13 Thread fred via Digitalmars-d-learn

import core.thread;
import std.concurrency;
import std.stdio : w = writeln;

void w2(shared(bool) *done)
{
while (*done == false)
{
Thread.sleep(100.msecs);
w("print done? ", *done);
}
}

void s2()
{
shared(bool) isDone = false;
spawn(, );
Thread.sleep(400.msecs);
isDone = true;

}

void main()
{
s2();
}

=

a bug ?
thanks anyway


microservice story needed

2022-04-22 Thread fred via Digitalmars-d-learn
just need the libraries you use in microservice, and the reason 
you use them, and of course the URL link.


dll

2019-06-27 Thread fred via Digitalmars-d-learn

https://forum.dlang.org/thread/osnema$d5s$1...@digitalmars.com

dll support is it ok now?
i cant find the docs on thatm


Re: Linking to OpenCV OSX (dub.json LFLAG)

2019-05-02 Thread Fred via Digitalmars-d-learn

On Thursday, 2 May 2019 at 23:38:29 UTC, Fred wrote:

On Thursday, 2 May 2019 at 23:33:17 UTC, H. S. Teoh wrote:
On Thu, May 02, 2019 at 11:24:12PM +, Fred via 
Digitalmars-d-learn wrote:

[...]

[...]

Do you have any specific error messages and/or other problems 
that you could post here?  Being more specific about what 
problems you're facing would make it easier for us to help you.



T


Yeah, basically my project cannot find opencv


ld: library not found for -lopencv


There is more information and things I've tried in the github 
issue too.


I think I have my email associated with this account, an invite 
to the slack channel would be sweet as the IRC is dead


Re: Linking to OpenCV OSX (dub.json LFLAG)

2019-05-02 Thread Fred via Digitalmars-d-learn

On Thursday, 2 May 2019 at 23:33:17 UTC, H. S. Teoh wrote:
On Thu, May 02, 2019 at 11:24:12PM +, Fred via 
Digitalmars-d-learn wrote:

Hey Guys,

Complete Dlang n00b here and I'm having awful problems linking 
to opencv using my projects dub.json.


I've been getting some help on Github 
(https://github.com/aferust/opencvd/issues/1) but had no luck 
so far, if anyone has any good ideas I'd ever so greatful!

[...]

Do you have any specific error messages and/or other problems 
that you could post here?  Being more specific about what 
problems you're facing would make it easier for us to help you.



T


Yeah, basically my project cannot find opencv


ld: library not found for -lopencv


There is more information and things I've tried in the github 
issue too.


Linking to OpenCV OSX (dub.json LFLAG)

2019-05-02 Thread Fred via Digitalmars-d-learn

Hey Guys,

Complete Dlang n00b here and I'm having awful problems linking to 
opencv using my projects dub.json.


I've been getting some help on Github 
(https://github.com/aferust/opencvd/issues/1) but had no luck so 
far, if anyone has any good ideas I'd ever so greatful!


Thanks


Re: javascript or typescript

2018-11-05 Thread Fred via Digitalmars-d-learn
On Monday, 5 November 2018 at 08:49:42 UTC, Laurent Tréguier 
wrote:

On Monday, 5 November 2018 at 02:51:19 UTC, Fred wrote:

hi,
my javascript skill is bad.
but i want to host some nodejs app

i am aware that there is converter to js like dtojs. but it is 
out of date.


i'd like to give d a try. is there any other converter 
available. a decent one.


I haven't personally tried it, but there is an example of 
compiling D to Javascript here : 
https://github.com/Ace17/dscripten


ok will look at it. thanks.


Re: javascript or typescript

2018-11-05 Thread Fred via Digitalmars-d-learn

On Monday, 5 November 2018 at 05:07:49 UTC, Adam D. Ruppe wrote:

On Monday, 5 November 2018 at 02:51:19 UTC, Fred wrote:

i'd like to give d a try.


Why do you need to convert it to javascript? D can serve up web 
stuff by itself too.


did you mean vibe.d?

but i want to use in a shared hosting environment where my 
options are : ruby, python, nodejs and as usual php


vibe.d as standalone app will not work.

i know kotlin with js support, but maybe there is another option 
..



thanks for your answer and insight.


javascript or typescript

2018-11-04 Thread Fred via Digitalmars-d-learn

hi,
my javascript skill is bad.
but i want to host some nodejs app

i am aware that there is converter to js like dtojs. but it is 
out of date.


i'd like to give d a try. is there any other converter available. 
a decent one.


Re: Old but interesting link as to the low adoption reason for D

2018-02-15 Thread Fred via Digitalmars-d
When god (walter) create eden (dlang) the man (bo the biz 
developer) is very happy.

Man thinks he is in heaven.
Until man eat the forbidden apple(the ecosystem library, editor, 
tools).

Now man understand he is in hell.

Walter has created great language.
But this language is not first class( first choice) on those 
platform.

1. Windows : .net , java etc
2. Ios : swift etc
3. Android : java kotlin, no d
4. Linux : c java, may be d , etc

From what i understand( i am very sorry if i am wrong). D almost 
get customer, well almost. Bo was happy with the language but not 
ecosystem.


For biz developer they expect very few bumps. This is normal.

So what can d-community do : create subforum so that they know 
the bumps so they can avoid them.
Ask what they are building (the general only), on what platform, 
what db, their background.
Tell them what library you use, workaround, platform compiler 
odds tell them how you succeed. Provide them short cut : general 
build files, code management, idioms, etc.
In short words : may be subforum for mentorship(can be free or 
paid). Separate from learn forum.


It lowers heart attack , hipertension, anger, and disappointment.



Today big companies like microsoft, apple create great languages 
for their platform AND partial supported language on other 
platform.

Eg : swift for ios is official, swift on win is community.

These language serve as honey because they give away for free to 
attracts us (the bee) so their product ecosystem (software or 
hardware) survive.


D will never be rival for these language on that platform. For D 
to survive it must be the only champion on a platform or at least 
one of champion. My best guess is resource limited platform or 
/and linux.


On those resource limited hardware platform, now, only 6 or 8 
language but no clear champion ( for me, c and cpp not a 
champion, but i will use them if no alternative. ).
I think betterc and nogc feature will make that happen. Lets hope 
so.




But for now all d-community can do is serve that specific company 
need for success, for their thirst of money. And hope their 
feedback to the community when they want to leverage their 
requirement such as library used, running platform etc.



Again i am sorry if i offend someone. Or i give you wrong info.



Re: User input; quick question.

2017-04-29 Thread fred via Digitalmars-d-learn

On Saturday, 29 April 2017 at 21:18:27 UTC, cym13 wrote:

On Saturday, 29 April 2017 at 21:09:13 UTC, fred wrote:

import std.stdio;

I am somewhat new to D, and I am trying to receive user input, 
like this, with a prompt:


string str;
writeln("Enter a string: ");
str = readln;
writeln(str);

However, the prompt appears after I enter the input; any 
reason why?


I've trawled the internet for a good hour, but I can't seem to 
find an answer.


Your code is correct, it's your terminal or whatever you use to 
see your program's output that doesn't flush stdout. You can 
force it though:


string str;
writeln("Enter a string: ");
stdout.flush;
str = readln;
write(str);



Thank you, again.



User input; quick question.

2017-04-29 Thread fred via Digitalmars-d-learn

import std.stdio;

I am somewhat new to D, and I am trying to receive user input, 
like this, with a prompt:


string str;
writeln("Enter a string: ");
str = readln;
writeln(str);

However, the prompt appears after I enter the input; any reason 
why?


I've trawled the internet for a good hour, but I can't seem to 
find an answer.




simple newbie question

2015-11-22 Thread fred via Digitalmars-d-learn

How to generate temporary files so compilation time speeds up.
Normal compilation only produce obj, exe.

If what i mean is that if we compile the files that  unchanged, 
dmd will look for that temporary files instead of .d files.


simple newbie question

2015-11-22 Thread fred via Digitalmars-d-learn

Hi.
Dll or shared library is important feature of software 
development.

So why most d library still static link.
I am sorry for my stupid question.

Thanks.