Re: How to get Laptop battery level

2021-02-22 Thread Greatsam4sure via Digitalmars-d-learn

On Monday, 22 February 2021 at 20:59:01 UTC, Greatsam4sure wrote:
Dlang is a system programming language. How do I access the 
battery level of my system using code in dlang? I will 
appreciate code sample


Sorry I mean to say code sample




How to get Laptop battery level

2021-02-22 Thread Greatsam4sure via Digitalmars-d-learn
Dlang is a system programming language. How do I access the 
battery level of my system using code in dlang? I will appreciate 
vide sample


Re: Vibe.d and NodeJs with Express

2020-07-12 Thread Greatsam4sure via Digitalmars-d-learn

On Sunday, 12 July 2020 at 10:44:13 UTC, Sebastiaan Koppe wrote:

On Sunday, 12 July 2020 at 10:01:54 UTC, greatsam4sure wrote:

[...]


How much speed do you need? I doubt you really need every last 
millisecond, at which point ease of development takes over.  
Instead it might be better to look at which third party 
libraries you need. D has got most you need but you might end 
up needing something which isn't there. If you are ready to 
code that yourself then go for D for sure.



[...]


If the app stays small that can work but you can also look at 
something a bit more modern. Angular, react, vue or svelte, 
there are plenty to pick from.



[...]


Of course. You just end up writing an rest or graphql backend 
in D and connect it to a frontend.




Thanks really appreciate it.


Vibe.d and NodeJs with Express

2020-07-12 Thread greatsam4sure via Digitalmars-d-learn
I am thinking of building an App with Vibe. D or NodeJS but my 
topmost priority is speed and ease of development due to third 
party libraries integration. I know Vibe. D is faster than NodeJS 
and I love to use Dlang. My question is can I eat my cake and 
have it if I go with Dlang and Vibe. D. I have being able to use 
jQuery and bootstrap with vibe. D and it work well. My believe is 
that most JavaScript library will work with Vibe. D out of the 
box. The application with use database heavily, can I work easily 
with database in vibe. D. For me I would love to use D for it raw 
power and speed.


Please this is a post to criticize D but to encourage me to use 
it. I need pros and cons


Re: Vibe.d navigation

2020-04-01 Thread GreatSam4sure via Digitalmars-d-learn
On Wednesday, 1 April 2020 at 02:15:25 UTC, Steven Schveighoffer 
wrote:

On 3/31/20 4:43 PM, GreatSam4sure wrote:


[...]


Vibe does not render templates automatically. You have to 
render them from a function. The function can be in a route 
that has nothing to do with the name of the template.


[...]



Thank you a million times. This is really helpful.


Re: Vibe.d navigation

2020-03-31 Thread GreatSam4sure via Digitalmars-d-learn
On Tuesday, 31 March 2020 at 19:34:55 UTC, Steven Schveighoffer 
wrote:

On 3/31/20 2:57 PM, GreatSam4sure wrote:

[...]


I'm not sure what you mean.

Vibe has ways to control the route names of the members of your 
web interface using UDAs, but primarily uses the name of the 
functions.


A nice way to see what is registered is to turn the log level 
to trace when you are setting up your routes, and then set it 
back to normal during runtime. This prints out all the routes 
as vibe registers them.


e.g.:

void main()
{
setLogLevel(LogLevel.trace);
auto router = new URLRouter();

... // set up routes

auto listener = listenHTTP(settings, router);
setLogLevel(LogLevel.diagnostic);

... // run your event loop
}

If you have more specific examples, I'm glad to help you 
understand. If you haven't already read it, you should read 
this page: 
https://vibed.org/api/vibe.web.web/registerWebInterface


-Steve




I have a head.dt file that is the head content of all my pages. 
How can I change the title programmatically. How can change the 
content of a diet template using code in D?






Re: Vibe.d navigation

2020-03-31 Thread GreatSam4sure via Digitalmars-d-learn
On Tuesday, 31 March 2020 at 19:34:55 UTC, Steven Schveighoffer 
wrote:

On 3/31/20 2:57 PM, GreatSam4sure wrote:
I am playing with the vibe.d for some days now. One thing I am 
struggling with is move from one page to another using web 
interface. The naming of the functions and proper navigation 
from one page to another is not clear to me.


How to move from one page to another. I will appreciate any 
help.


I'm not sure what you mean.

Vibe has ways to control the route names of the members of your 
web interface using UDAs, but primarily uses the name of the 
functions.


A nice way to see what is registered is to turn the log level 
to trace when you are setting up your routes, and then set it 
back to normal during runtime. This prints out all the routes 
as vibe registers them.


e.g.:

void main()
{
setLogLevel(LogLevel.trace);
auto router = new URLRouter();

... // set up routes

auto listener = listenHTTP(settings, router);
setLogLevel(LogLevel.diagnostic);

... // run your event loop
}

If you have more specific examples, I'm glad to help you 
understand. If you haven't already read it, you should read 
this page: 
https://vibed.org/api/vibe.web.web/registerWebInterface


-Steve



Thanks for your reply.

My problem is that I have two views say page1.dt and page2.dt 
each are HTML 5 pages with head and body. I want to click a 
button or a link in page to go page 2 vis-a-vis using 
webinterface. How do I define the web interface functions and how 
will reference it in the pages







Vibe.d navigation

2020-03-31 Thread GreatSam4sure via Digitalmars-d-learn
I am playing with the vibe.d for some days now. One thing I am 
struggling with is move from one page to another using web 
interface. The naming of the functions and proper navigation from 
one page to another is not clear to me.


How to move from one page to another. I will appreciate any help.


Scss file with vibe.d

2020-03-12 Thread GreatSam4sure via Digitalmars-d-learn
I want to ask if vibe.d support scss files. I could not get 
vibe.d to work with scss files.


As usual, I will appreciate any help and early reply


Re: Referencing an image in .css file in vibe.d

2020-03-11 Thread GreatSam4sure via Digitalmars-d-learn

On Wednesday, 11 March 2020 at 22:11:24 UTC, GreatSam4sure wrote:
I am trying to reference an image that is in 
public/imgs/pix1.jpg in CSS file using background-image using 
URL but the image does not show.


What is the proper way of reference to the URL of the image?

I will appreciate any help




Solve

The image did not show because I did not give it a height


Referencing an image in .css file in vibe.d

2020-03-11 Thread GreatSam4sure via Digitalmars-d-learn
I am trying to reference an image that is in public/imgs/pix1.jpg 
in CSS file using background-image using URL but the image does 
not show.


What is the proper way of reference to the URL of the image?

I will appreciate any help


Re: Typescript with vibe.d

2020-03-11 Thread GreatSam4sure via Digitalmars-d-learn

On Tuesday, 10 March 2020 at 08:55:56 UTC, Jacob Carlborg wrote:

On Monday, 9 March 2020 at 09:42:16 UTC, GreatSam4sure wrote:
I want to know if it is possible to use typescript with the 
vibe.d since typescript is a superset of javascript. I will 
appreciate any example if it is possible


There's a Diet filter for TypeScript here [1], but it hasn't 
been updated since 2015.


[1] https://code.dlang.org/packages/diet-typescript

--
/Jacob Carlborg


Thanks, it will be really nice to enable the use of typescript by 
default since it is type-safe. I will appreciate this feature of 
it can be added. I personally don't like dynamic languages due to 
lack of declaring a type for every variable


Re: Typescript with vibe.d

2020-03-10 Thread GreatSam4sure via Digitalmars-d-learn
On Monday, 9 March 2020 at 17:46:42 UTC, Steven Schveighoffer 
wrote:

On 3/9/20 1:23 PM, GreatSam4sure wrote:

[...]


You can use it, but you have to compile it yourself. Vibe.d 
does nothing with the javascript except serve it to the 
browser. It has no restrictions on what files can be sent, but 
does not convert anything for you.



[...]


No. This means that if you wanted to use, for instance, a diet 
template to generate typescript, this would not work.


My recommendation in that case is to generate javascript data 
using diet templates, and use it from a Typescript file that is 
pre-compiled before being served via vibe.d.


-Steve



Thanks, that is what I want to know



Re: Typescript with vibe.d

2020-03-09 Thread GreatSam4sure via Digitalmars-d-learn
On Monday, 9 March 2020 at 15:11:48 UTC, Steven Schveighoffer 
wrote:

On 3/9/20 5:42 AM, GreatSam4sure wrote:
I want to know if it is possible to use typescript with the 
vibe.d since typescript is a superset of javascript. I will 
appreciate any example if it is possible


My understanding is that Typescript needs to be compiled to 
javascript. You can't serve typescript directly to a browser.


So as long as you are doing this in a separate file, vibe.d can 
serve up the javascript files just fine.


-Steve


I am working on a web app using a vibe.d but I prefer typescript 
to javascript. So I want to use typescript. My question is that 
can I use typescript instead of javascript since it must be 
compiled to javascript? Does the vibe.d framework compile 
typescript to javascript?


Typescript with vibe.d

2020-03-09 Thread GreatSam4sure via Digitalmars-d-learn
I want to know if it is possible to use typescript with the 
vibe.d since typescript is a superset of javascript. I will 
appreciate any example if it is possible


Re: D vs Java which is more powerful

2019-11-17 Thread GreatSam4sure via Digitalmars-d-learn

On Saturday, 16 November 2019 at 22:25:46 UTC, bauss wrote:
On Saturday, 16 November 2019 at 07:24:50 UTC, GreatSam4sure 
wrote:

[...]


Java as a language in itself is not more powerful than D 
regardless of opinions.


[...]



Thanks, I am really shock about the claim that Java is move 
powerful than D since I have a working knowledge of both 
languages.


You are right in your analysis. Thanks




Re: D vs Java which is more powerful

2019-11-16 Thread GreatSam4sure via Digitalmars-d-learn

On Saturday, 16 November 2019 at 10:28:58 UTC, bachmeier wrote:
On Saturday, 16 November 2019 at 07:24:50 UTC, GreatSam4sure 
wrote:

[...]


What does "powerful" mean? I sure as heck wouldn't call Java a 
powerful language for interacting with C code, for instance.


This kind of discussion is not likely to be fruitful. Most 
participants will have a limited understanding of both 
languages, terms like powerful will go undefined, and claims 
will be based on anecdotes rather than data. If you want to 
compare languages, you need to start by figuring out what you 
want to do, then you need to decide which language will help 
you get there the easiest, which is the best option for 
long-term maintenance, and so on. A language's power (whatever 
that means) is not going to be a big factor in that decision.


Thanks, I was shock with the claim because I have knowledge of 
both languages


D vs Java which is more powerful

2019-11-15 Thread GreatSam4sure via Digitalmars-d-learn
According to this [1] a person that java is much more powerful 
than D. I am really surprised at this claim. Is this true? 
Because I believe D much more powerful than Java.



I will really appreciate detail analysis



1.https://forum.dlang.org/thread/lnrhskowvyighdnzb...@forum.dlang.org


Re: Translating Java into D

2019-11-15 Thread GreatSam4sure via Digitalmars-d-learn

On Friday, 15 November 2019 at 03:29:16 UTC, Heromyth wrote:

On Thursday, 14 November 2019 at 19:50:22 UTC, NonNull wrote:
Greetings, Java seems to be almost a subset of D in various 
ways.
No, it's not exactly right. Java is more powerful than D as for 
a language. Many things that Java can do can't be done by D. 
For example, reflection, full meta info for a type  in runtime, 
type deduction for a template, template member override.


See:
https://stackoverflow.com/questions/4829631/unusual-generic-syntax-arrays-stringaslist
https://www.baeldung.com/java-executor-service-tutorial

Has there been any work done to automatically translate Java 
source into D?


We ported some projects in Java by hand.



?
I really sure of this? Can this be true
? Pls I need more clarity on this by professional in this group.


I am of the opinion that D is much more powerful than Java since 
I am familiar with the language to some extent. I am even to 
start a GUI app in java due to the fact I have no find a GUI 
toolkit in D that meet all my need.


I will appreciate detail analysis of this claim


Re: arsd errors on windows

2019-10-17 Thread Greatsam4sure via Digitalmars-d-learn

On Thursday, 17 October 2019 at 12:10:21 UTC, Dennis wrote:

On Thursday, 17 October 2019 at 12:06:49 UTC, Dennis wrote:
You can put "buildRequirements": "allowWarnings" in your 
dub.json.


Should be
"buildRequirements": ["allowWarnings"]


the same error

Performing "debug" build using C:\D\dmd2\windows\bin\dmd.exe for 
x86_64.
arsd-official:cgi 4.0.3: building configuration 
"embedded_httpd"...

..\..\AppData\Local\dub\packages\arsd-official-4.0.3\arsd-official\cgi.d(5828,3):
 Warning: statement is not reachable
C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.


Re: arsd errors on windows

2019-10-17 Thread Greatsam4sure via Digitalmars-d-learn

On Thursday, 17 October 2019 at 08:57:06 UTC, Dennis wrote:
On Thursday, 17 October 2019 at 04:05:40 UTC, Greatsam4sure 
wrote:

what is the way out.


I made a pull request fixing it: 
https://github.com/adamdruppe/arsd/pull/222
In the mean time, you can add the subpackage 
"arsd-official:simpledisplay" as a depdendency instead so cgi.d 
won't be included (assuming you don't need it).




this is the error

Failed to get versions for package arsd-official:simpledisplay on 
provider registry at https://code.dlang.org/ (fallbacks registry 
at https://code-mirror.dlang.io/,
registry at https://dub-registry.herokuapp.com/): (1): Error: Got 
.arsd-official:simpledisplay of type undefined, expected object.

Could not find package 'arsd-official:simpledisplay'.


Re: arsd errors on windows

2019-10-17 Thread GreatSam4sure via Digitalmars-d-learn

On Thursday, 17 October 2019 at 08:57:06 UTC, Dennis wrote:
On Thursday, 17 October 2019 at 04:05:40 UTC, Greatsam4sure 
wrote:

what is the way out.


I made a pull request fixing it: 
https://github.com/adamdruppe/arsd/pull/222
In the mean time, you can add the subpackage 
"arsd-official:simpledisplay" as a depdendency instead so cgi.d 
won't be included (assuming you don't need it).




Thanks, I will try it out.


arsd errors on windows

2019-10-16 Thread Greatsam4sure via Digitalmars-d-learn

from my project root directory


dub add arsd-official

This is added to dub.json

"arsd-official": "~>4.0.3"

just run the project gives


Fetching arsd-official 4.0.3 (getting selected version)...
Performing "debug" build using C:\D\dmd2\windows\bin\dmd.exe for 
x86_64.
arsd-official:cgi 4.0.3: building configuration 
"embedded_httpd"...

..\..\AppData\Local\dub\packages\arsd-official-4.0.3\arsd-official\cgi.d(5828,3):
 Warning: statement is not reachable
C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.



import arsd.simpledisplay : SimpleWindow;

run the project gives



Performing "debug" build using C:\D\dmd2\windows\bin\dmd.exe for 
x86_64.
arsd-official:cgi 4.0.3: building configuration 
"embedded_httpd"...

..\..\AppData\Local\dub\packages\arsd-official-4.0.3\arsd-official\cgi.d(5828,3):
 Warning: statement is not reachable
C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.

Enter the following code get the same error

SimpleWindow window = new SimpleWindow;
window.eventLoop(0);

what is the way out. I am in need of a gui in D for Window.Gtkd 
and dlangui are not options for me. it should be easily 
customization









Re: Blog Post #77: Notebook, Part I

2019-10-09 Thread GreatSam4sure via Digitalmars-d-learn

On Wednesday, 9 October 2019 at 09:44:39 UTC, Ron Tarrant wrote:
On Wednesday, 9 October 2019 at 03:13:48 UTC, GreatSam4sure 
wrote:



Good works


Thanks, GreatSam4sure.

Is there any way to detect the size of my screen using gtkd? 
So that incan calculate the size of my screen and center my 
window on the screen using move(x, y).


I had a quick look into this and there is no straightforward 
solution, so I can't give you an immediate answer. It would be 
easier to explain with a demo, so I'll need some time to work 
one up. I've put it on my to-do list.


Besides can you convert all your posts to a pdf that is easily 
downloadable for those with little internet access?


I've been thinking about an ebook based on the blog, something 
that would start with installing a development environment, go 
into how to organize and write each part of an application, and 
end with how to distribute the finished product. It's in very 
early stages ATM, but I'm open to any suggestions you (or 
anyone else) may have for how to make it as useful as possible.



Thanks, it will be better to use coded. It is very easy to stand 
a gtkd project in coded and vs code.



All dependency taking care of. Dub will download the dependency 
for if you are connected to the internet


Re: formatting a float or double in a string with all significant digits kept

2019-10-09 Thread GreatSam4sure via Digitalmars-d-learn
On Wednesday, 9 October 2019 at 07:16:43 UTC, Jon Degenhardt 
wrote:

On Wednesday, 9 October 2019 at 05:46:12 UTC, berni44 wrote:

On Tuesday, 8 October 2019 at 20:37:03 UTC, dan wrote:
But i would like to be able to do this without knowing the 
expansion of pi, or writing too much code, especially if 
there's some d function like writeAllDigits or something 
similar.


You can use the property .dig to get the number of significant 
digits of a number:


writeln(PI.dig); // => 18

You still need to account for the numbers before the dot. If 
you're happy with scientific notation you can do:


auto t = format("%.*e", PI.dig, PI);
writeln("PI = ",t);


Using the '.dig' property is a really nice idea and looks very 
useful for this. A clarification though - It's the significant 
digits in the data type, not the value. (PI is 18 because it's 
a real, not a double.) So:


writeln(1.0f.dig, ", ", float.dig);  =>  6, 6
writeln(1.0.dig, ", ", double.dig);  => 15, 15
writeln(1.0L.dig, ", ", real.dig);   => 18, 18

Another possibility would be to combine the '.dig' property 
with the "%g" option, similar to the use "%e" shown. For 
example, these lines:


writeln(format("%0.*g", PI.dig, PI));
writeln(format("%0.*g", double.dig, 1.0));
writeln(format("%0.*g", double.dig, 100.0));
writeln(format("%0.*g", double.dig, 1.0001));
writeln(format("%0.*g", double.dig, 0.0001));

produce:

3.14159265358979324
1
100
1.0001
1e-08

Hopefully experimenting with the different formatting options 
available will yield one that works for your use case.




Good solution

But what does it takes to leave a number the way it is without 
formatting automatic to 6 significant figure out how that 
requires such a work around as shown above. I know C language is 
the same but must D follow suit.


One of the compilers, i think the DMD 2.084 (not sure now) 
correct but now the recent one's have revert back. Every number 
should be left the way it is like java, C#(not sure), 
actionscript, javascript, etc.


I don't think it will take that much effort for trivial things 
like to stress developers.


This is the best solution i have ever seen on this issue on the 
forum.i have ask this question several times on this forum




Re: Blog Post #77: Notebook, Part I

2019-10-08 Thread GreatSam4sure via Digitalmars-d-learn

On Tuesday, 8 October 2019 at 10:00:00 UTC, Ron Tarrant wrote:
Today starts a new series on the Notebook widget. Over the next 
few weeks, we'll dig in deep, looking at single-tab and 
multiple-tab demos, customizing the look of the actual tabs, 
adding and removing tabs... a whole ton of stuff. Sounds like 
fun, right?


Come on over and check it out: 
https://gtkdcoding.com/2019/10/08/0077-notebook-i-basics.html


Good works

Is there any way to detect the size of my screen using gtkd? So 
that incan calculate the size of my screen and center my window 
on the screen using move(x, y).


Besides can you convert all your posts to a pdf that is easily 
downloadable for those with little internet access?


Re: Blog Post #75: Cairo X - Noodling with the Mouse

2019-10-04 Thread Greatsam4sure via Digitalmars-d-learn

On Tuesday, 1 October 2019 at 09:58:42 UTC, Ron Tarrant wrote:
Here's the second installment of the Nodes-n-noodles coverage 
in which we get the mouse involved: 
https://gtkdcoding.com/2019/10/01/0075-cairo-x-mouse-noodle.html


Pls sir can you make a pdf of the tutorials. that can be easily 
downloaded once and for all. So that I need to be online. Not 
everybody have cheap internet.


Re: Help making a game with transparency

2019-09-28 Thread GreatSam4sure via Digitalmars-d-learn

On Friday, 27 September 2019 at 11:32:53 UTC, Adam D. Ruppe wrote:

On Friday, 27 September 2019 at 11:28:35 UTC, matheus wrote:
Sorry this is a bit vague. I suppose you're using engine.d or 
screen.d directly right?


those two are obsolete, new stuff should use simpledisplay

but with simpledisplay you need to use opengl for transparency 
since the xlib/gdi+ impl doesn't support it (though they 
probably could if someone wanted to write some code)


i just am doing 4 other things at once right now and can't do 
it myself at the moment






The last time I try this library on windows 10 it throws errors. 
Have you try it recently on windows


I want to know can the windows be customized and does it support 
styling like JavaFX


Re: Java to D

2019-09-01 Thread GreatSam4sure via Digitalmars-d-learn

On Saturday, 31 August 2019 at 16:44:01 UTC, Patrick wrote:
On Wednesday, 28 August 2019 at 10:33:33 UTC, GreatSam4sure 
wrote:
On Wednesday, 28 August 2019 at 09:35:55 UTC, Jacob Carlborg 
wrote:

[...]



Thanks i will check it up


Take a look at JavacTo  
https://sourceforge.net/projects/javacto/


This is a java tool that uses the javac compiler to translate 
java to another language.  And includes a java to D code set.


It is a very visual tool and has great animation during 
translation and works well while using the java debugger. I 
include “How to get started with Eclipse”.


You can find more translations statistics at this post: 
https://forum.dlang.org/thread/yuamvgsdfshgrbesm...@forum.dlang.org#post-yuamvgsdfshgrbesmjlt:40forum.dlang.org


Hope this helps

Patrick



Thanks a lot. I will dive in soon. I am in the mid of a project 
now


Re: Java to D

2019-08-28 Thread GreatSam4sure via Digitalmars-d-learn
On Wednesday, 28 August 2019 at 09:35:55 UTC, Jacob Carlborg 
wrote:

On 2019-08-28 10:14, GreatSam4sure wrote:

[...]


DWT is ported manually from Java. Here's a very short guide 
[1]. That guide is probably written for D1.



[...]


I'm working on a tool do be able to automatically convert Java 
code to D code [2]. It's been a while since I did any actual 
work on that project. As far as I can remember, it can do a 
syntactic translation of most Java code. What's remaining is 
the semantic translation.


[1] http://dsource.org/projects/dwt/wiki/Porting
[2] https://github.com/d-widget-toolkit/jport/tree/dev



Thanks i will check it up


Java to D

2019-08-28 Thread GreatSam4sure via Digitalmars-d-learn

Good day everyone.

DWT is a library for creating cross-platform GUI applications. 
It's a port of the SWT Java library from Eclipse. Currently 
supported platforms are Windows, using Win32 and Linux, using GTK.


What are the tools and step involved in converting a java GUI 
toolkit to D2? Is it possible in D2? What are the tools and steps 
involved? Is there any tutorial involve? Can one get a mentor for 
such a program in the forum


I am thinking if it is possible to port JavaFX to D(i.e. DFx). 
That will be nice for the D language. Javafx is a nice GUI 
toolkit.


I am basically interested in GUI desktop app that connects to the 
web for the now.


I can do that on Java but I would love to use D if it is possible.


I will be happy to be linked to material, tools, and tutorial 
that will be of help






Re: Pro programmer

2019-08-27 Thread GreatSam4sure via Digitalmars-d-learn

On Tuesday, 27 August 2019 at 14:51:07 UTC, Ron Tarrant wrote:

On Sunday, 25 August 2019 at 21:30:10 UTC, GreatSam4sure wrote:
If I want to be a pro programmer what language must I start 
with?


If it's deep understanding you want, start with assembly 
language. Knowing how things are done down at that level—before 
all the layers of abstraction are added—will give you an edge 
over 99% of current coders.


It's the same with basic computer use. Wanna be a true expert 
user? Get any version of Linux or one of the BSDs and restrict 
yourself to using just the terminal for about a month. You'll 
be amazed at how much you'll learn. It'll also give you a great 
foundation for understanding coding.


And your typing skills will go through the roof.



Thanks a lot. I want to have a deep understanding of programming. 
I will look into your advice





Re: Pro programmer

2019-08-27 Thread GreatSam4sure via Digitalmars-d-learn

On Tuesday, 27 August 2019 at 08:09:40 UTC, Dukc wrote:

On Sunday, 25 August 2019 at 21:30:10 UTC, GreatSam4sure wrote:

[...]


Any general purpose language will do. Basically everything can 
be expressed in any language, through some tasks are very 
cumbersome in tasks they are not designed for.


[...]



Thanks a lot, really appreciate


Re: Pro programmer

2019-08-26 Thread GreatSam4sure via Digitalmars-d-learn

On Monday, 26 August 2019 at 15:29:47 UTC, Kagamin wrote:

On Monday, 26 August 2019 at 12:02:12 UTC, GreatSam4sure wrote:
I want customizable GUI toolkit like JavaFX and adobe spark 
framework in D.


DWT was translated from java SWT, you can do the same for 
JavaFX, D is heavily based on java and there's an automatic 
translation tool from java to D.


There's no silver bullet to become a pro, you just work and 
gain experience and this experience allows you to reflect on 
coding practices on increasing scale.


Thanks, is there tutorial on the translation of Java to D. Which 
tools is used?


Pls guide me, I am really interested in translating JavaFX to D


Re: Pro programmer

2019-08-26 Thread GreatSam4sure via Digitalmars-d-learn

On Monday, 26 August 2019 at 08:50:29 UTC, Chris wrote:

On Monday, 26 August 2019 at 06:46:04 UTC, GreatSam4sure wrote:



What is the path of becoming very good at programming? Which 
language will one start with.


Often it's the language that best solves the problem at hand 
for you, but it really depends on what you want to achieve. For 
fast scripting and modelling maybe Python would be a good 
choice. But Python can be a dead end when it comes to 
performance etc. If you want to develop apps for Android/iOS 
you're better off using Java or better still Kotlin (Android) 
and Swift (iOS). You should always decouple the business logic 
of your app from the UI. So you can write code in C/C++ or D 
and later link it to any UI. Anyway, always think of where you 
want to go, e.g. portability / cross-platform and see what best 
suits you. If you wanna go mobile use a language that runs on 
mobile platforms like Android and iOS. If you want to write for 
desktop or server only you have more choices. Unfortunately, 
Android/iOS support for D leaves much to be desired.


I have some real-world situation I want to model but I am at a 
loss as to how to start. For instance, I do one build a GUI 
framework like adobe spark, javafx,etc with minimum dependency 
or no dependency from the ground up.


The lack of easily customizable, platform native GUI in D is a 
real concern to me but I don't have the expertise to do it.


There is DlangUI: https://github.com/buggins/dlangui Check it 
out. And there are D bindings to other UI frameworks.



Where is the starting point of doing such amazing thing?


The truth of the matter is that you only know after years of 
programming what you need and what you don't need. As you get 
wiser you become less excited about the latest fancy feature of 
language X. Basically all languages have similar core features 
to model the world and solve problems (hash maps, arrays, 
structs, classes etc.) Just start to write programs that solve 
problems and enjoy...



Thanks for your reply





Thanks, I have check dlangui, it is not native go window at 
least. The display is poor and the fonts worse. I can even center 
the window on the screen. We notice the designer for a month now 
no reply. Skinning and theming is an issue too.


I want customizable GUI toolkit like JavaFX and adobe spark 
framework in D.


I just can find any. I don't know to link D code with any GUI if 
not I would have gone with JavaFX or adobe spark


Does, it means being a good programmer does not depend on any 
language? Does it imply being comfortable in any language of 
choice and domain of interest?


Thanks for the reply



Re: Pro programmer

2019-08-26 Thread GreatSam4sure via Digitalmars-d-learn

On Monday, 26 August 2019 at 04:39:39 UTC, Tony wrote:

On Sunday, 25 August 2019 at 21:30:10 UTC, GreatSam4sure wrote:
I am wondering as to what is the starting point of being a pro 
programmer. If I want to be a pro programmer what language 
must I start with?


Most pro programmer I have heard of are all C and C++ Guru. 
Most of the best guys on this D forum falls into that category.


I really want to know programming to the core not just tied to 
a language or just at the level of drag and drop or use a 
framework or library.




I will appreciate your help in this matter. I am ready to put 
in hard work. I ready know a little of java, actionscrip 3.0, 
kotlin, D but at the surface level but can use them to write 
app.


But I am a concern with a matter like how can I write a GUI 
toolkit from the ground up.


When you say "pro programmer" are you referring to someone who 
programs for a living for a company or a "top-notch/very good 
programmer"?



I am referring to a person who has a good understanding of 
programming that he can model any real-world situation. He can 
turn any real-world case to a program.


For instance, I consider Walter, Andrei, etc as a pro programmer 
this platform. They are c and C++ programmer.


What is the path of becoming very good at programming? Which 
language will one start with.


I have some real-world situation I want to model but I am at a 
loss as to how to start. For instance, I do one build a GUI 
framework like adobe spark, javafx,etc with minimum dependency or 
no dependency from the ground up.


The lack of easily customizable, platform native GUI in D is a 
real concern to me but I don't have the expertise to do it.


Where is the starting point of doing such amazing thing?

Thanks for your reply



Pro programmer

2019-08-25 Thread GreatSam4sure via Digitalmars-d-learn
I am wondering as to what is the starting point of being a pro 
programmer. If I want to be a pro programmer what language must I 
start with?


Most pro programmer I have heard of are all C and C++ Guru. Most 
of the best guys on this D forum falls into that category.


I really want to know programming to the core not just tied to a 
language or just at the level of drag and drop or use a framework 
or library.




I will appreciate your help in this matter. I am ready to put in 
hard work. I ready know a little of java, actionscrip 3.0, 
kotlin, D but at the surface level but can use them to write app.


But I am concern with matter like how can I write a GUI toolkit 
from the ground up.










Re: Desktop app with vibe.d

2019-08-13 Thread GreatSam4sure via Digitalmars-d-learn

On Tuesday, 13 August 2019 at 09:44:59 UTC, Russel Winder wrote:
On Mon, 2019-08-12 at 20:01 +, DanielG via 
Digitalmars-d-learn wrote:

[...]


GtkD allows for "reactive" UI. 
https://www.reactivemanifesto.org/


There is also Qt, I haven't tried any of the D bindings to Qt, 
but given Qt is event loop based I am sure it allows for 
"reactive" UI as well – it definitely does using Python/PySIDE2.


GTK+ doesn't have the equivalent of the stage/engine of QML. 
QML is Qt's
version of JavaFX, so you do not need a browser to get a 
dynamic reactive UI.



I want my back end to be in D. I want to write the app in D. I am 
comfortable with JavaFX, adobe flex and Kotlin, c# to some extent




Re: How to run the dub bundle with dmd

2019-08-12 Thread GreatSam4sure via Digitalmars-d-learn

On Sunday, 11 August 2019 at 10:04:47 UTC, Andre Pany wrote:
On Saturday, 10 August 2019 at 16:44:48 UTC, greatsam4sure 
wrote:
On Saturday, 10 August 2019 at 15:42:39 UTC, rikki cattermole 
wrote:

This is a crazy question but is your Windows install 64bit?


yes. See the spec below


https://ibb.co/M1TwY7W


I am currently assuming it is not a general problem. Do you 
have a virus scanner on your system?


You might also try instead of DMD try LDC
https://github.com/ldc-developers/ldc/releases/download/v1.16.0/ldc2-1.16.0-windows-x64.7z

Does the issue occur here too?

Kind regards
Andre




The problem is solved after I reset my window but I lost all 
installed app. I have to start again. I am still installing some 
of them




Desktop app with vibe.d

2019-08-12 Thread GreatSam4sure via Digitalmars-d-learn
Pls I want to know if it is possible to build desktop app with 
vibe.d just like nodejs. I am not satisfy with the GUI of Dlang 
such as dlangui and gtkd. I don't think they have good styling 
capabilities like HTML and CSS.


I will be happy if I can build an app in D with fanciful ui. I 
will also be happy if you know any other way to build a fanciful 
ui in D like adobe flex, javafx, etc.


Re: How to run the dub bundle with dmd

2019-08-10 Thread greatsam4sure via Digitalmars-d-learn
On Saturday, 10 August 2019 at 15:42:39 UTC, rikki cattermole 
wrote:

This is a crazy question but is your Windows install 64bit?


yes. See the spec below


https://ibb.co/M1TwY7W


Re: How to run the dub bundle with dmd

2019-08-10 Thread greatsam4sure via Digitalmars-d-learn

On Saturday, 10 August 2019 at 15:17:56 UTC, Andre Pany wrote:
On Saturday, 10 August 2019 at 14:06:11 UTC, greatsam4sure 
wrote:

On Saturday, 10 August 2019 at 13:46:23 UTC, Andre Pany wrote:
On Saturday, 10 August 2019 at 13:18:19 UTC, greatsam4sure 
wrote:

[...]


Can you make a screenshot of the popup?

Kind regards
Andre


I have make a screenshot of the popup but I don't know to post 
here. Is there away to post a pix here


Could you also please check wheter the dub executable is 
"signed". Maybe this was forgotten in the recent version and 
now causing the issue.


Kind regards
Andre


dub is digitally sign. It says name of signer: D language 
foundation
I have download dub for GitHub but I cannot build it with dub or 
rdmd. It gives the same error on the screenshot


Re: How to run the dub bundle with dmd

2019-08-10 Thread greatsam4sure via Digitalmars-d-learn

On Saturday, 10 August 2019 at 15:17:56 UTC, Andre Pany wrote:
On Saturday, 10 August 2019 at 14:06:11 UTC, greatsam4sure 
wrote:

On Saturday, 10 August 2019 at 13:46:23 UTC, Andre Pany wrote:
On Saturday, 10 August 2019 at 13:18:19 UTC, greatsam4sure 
wrote:

[...]


Can you make a screenshot of the popup?

Kind regards
Andre


I have make a screenshot of the popup but I don't know to post 
here. Is there away to post a pix here


Could you also please check wheter the dub executable is 
"signed". Maybe this was forgotten in the recent version and 
now causing the issue.


Kind regards
Andre



thanks, below is the link to the screenshot
https://ibb.co/CJLNQ6t


Re: How to run the dub bundle with dmd

2019-08-10 Thread greatsam4sure via Digitalmars-d-learn

On Saturday, 10 August 2019 at 13:46:23 UTC, Andre Pany wrote:
On Saturday, 10 August 2019 at 13:18:19 UTC, greatsam4sure 
wrote:
I came across the problem recently. I have dub 1.11.0 install 
on my windows 10 core i7 but does not support the command "dub 
add package name" since all the packages in dub package 
register now use this command. I cannot find window binary for 
the recent version of dub


I have uninstalled the dub 1.11.0 on my machine, I have to use 
the one bundled with DMD 2.087.1. If I run dub -version, 
windows 10 throw an error that says " this app can run on this 
machine". I cannot also install DLS. This same error. I get 
this error from dlang related app such as dub,rdmd, Dls, etc.



I will appreciate any help


Can you make a screenshot of the popup?

Kind regards
Andre


I have make a screenshot of the popup but I don't know to post 
here. Is there away to post a pix here


Re: How to run the dub bundle with dmd

2019-08-10 Thread GreatSam4sure via Digitalmars-d-learn

On Saturday, 10 August 2019 at 13:30:39 UTC, Dukc wrote:
On Saturday, 10 August 2019 at 13:18:19 UTC, greatsam4sure 
wrote:
I came across the problem recently. I have dub 1.11.0 install 
on my windows 10 core i7 but does not support the command "dub 
add package name" since all the packages in dub package 
register now use this command. I cannot find window binary for 
the recent version of dub


What did you precisely write on the console, and what was the 
output?




I have uninstalled the dub 1.11.0 on my machine, I have to use 
the one bundled with DMD 2.087.1. If I run dub -version, 
windows 10 throw an error that says " this app can run on this 
machine".


That means that either you installed wrong dub (Linux version 
for example), or the executable file is corrupt. Download a new 
one.




I am talking of the dub that is bundled with DMD 2.087.1

dmd is working fine but I can't use it dub




How to run the dub bundle with dmd

2019-08-10 Thread greatsam4sure via Digitalmars-d-learn
I came across the problem recently. I have dub 1.11.0 install on 
my windows 10 core i7 but does not support the command "dub add 
package name" since all the packages in dub package register now 
use this command. I cannot find window binary for the recent 
version of dub


I have uninstalled the dub 1.11.0 on my machine, I have to use 
the one bundled with DMD 2.087.1. If I run dub -version, windows 
10 throw an error that says " this app can run on this machine". 
I cannot also install DLS. This same error. I get this error from 
dlang related app such as dub,rdmd, Dls, etc.



I will appreciate any help


Re: Dub version

2019-08-09 Thread GreatSam4sure via Digitalmars-d-learn

On Friday, 9 August 2019 at 14:15:36 UTC, Andre Pany wrote:

On Friday, 9 August 2019 at 13:59:51 UTC, GreatSam4sure wrote:

On Friday, 9 August 2019 at 13:01:51 UTC, Andre Pany wrote:

On Friday, 9 August 2019 at 12:10:21 UTC, GreatSam4sure wrote:

On Friday, 9 August 2019 at 09:01:54 UTC, Andre Pany wrote:

[...]





I am at lost here. Before I can run my D project using 
dub.1.11.0 executable install on my system but after 
uninstalling and install dmd 2.087.1 cannot run my project 
using dub from the project root folder. In windows 10 it 
shows this app can't run on your PC. To find a version for 
your PC, check with the software publisher. The same how's 
for the com and rdmd



What is the way out.


With recent version of Dub the default architecture changed 
from x86 to x86_64. You can force the old architecture by 
using argument -a x86.


Does this help?

Kind regards
Andre



No luck sir. I can only run D app by installing dub 1.11.0.

Just to be clear, are you saying once DMD is installed I don't 
need to install dub again or add it as a dependency to app?

Pls clarify.


The package manager Dub is included within  the DMD archive / 
DMD setup executable.


Does you have the problem also for a simple hello world sub 
project?


Please execute:

dub init sample1
cd sample1
dub build -a x86
sample1.exe

Kind regards
Andre




Yes, from command prompt

Dub init sample1
Click enter

Windows 10 says this app can't run on your PC

This problem is common with Windows 10

It may be due to their smart screen app.


But all packages in dub registering has be updated to:

Dub add arsd- official


So what is the solution to this problem



Re: Dub version

2019-08-09 Thread GreatSam4sure via Digitalmars-d-learn

On Friday, 9 August 2019 at 13:01:51 UTC, Andre Pany wrote:

On Friday, 9 August 2019 at 12:10:21 UTC, GreatSam4sure wrote:

On Friday, 9 August 2019 at 09:01:54 UTC, Andre Pany wrote:

[...]





I am at lost here. Before I can run my D project using 
dub.1.11.0 executable install on my system but after 
uninstalling and install dmd 2.087.1 cannot run my project 
using dub from the project root folder. In windows 10 it shows 
this app can't run on your PC. To find a version for your PC, 
check with the software publisher. The same how's for the com 
and rdmd



What is the way out.


With recent version of Dub the default architecture changed 
from x86 to x86_64. You can force the old architecture by using 
argument -a x86.


Does this help?

Kind regards
Andre



No luck sir. I can only run D app by installing dub 1.11.0.

Just to be clear, are you saying once DMD is installed I don't 
need to install dub again or add it as a dependency to app?

Pls clarify.



Re: Dub version

2019-08-09 Thread GreatSam4sure via Digitalmars-d-learn

On Friday, 9 August 2019 at 09:01:54 UTC, Andre Pany wrote:

On Friday, 9 August 2019 at 08:30:49 UTC, GreatSam4sure wrote:

On Friday, 9 August 2019 at 03:52:11 UTC, Andre Pany wrote:

On Friday, 9 August 2019 at 01:36:43 UTC, greatsam4sure wrote:

On Friday, 9 August 2019 at 01:18:12 UTC, Elronnd wrote:

[...]




dub fetch dub
Fetching dub 1.16.0...
Please note that you need to use `dub run ` or add 
it to dependencies of your package to actually use/run it. 
dub does not do actual installation of packages outside of 
its own ecosystem.



besides in https://code.dlang.org/packages/arsd-official 
they said use dub add arsd-official


Instead if specifying a dub package manually in your project 
dub.json thr command dub add will edit the dub.json for you.


Normally you get dub with the dmd/ldc/gdc package. Just 
download/install a recent package compiler package if you 
want to have command dub add.


Kind regards
Andre



I am using dmd 2.087.1 and dub 1.11.0

But the command dub add... Did not work

rdmd cannot run on my system.


My assumption is, you have several dub executables on your 
computer. A recent one, bundled with dmd, and an old 1.11.0. 
Delete the old one, this should solve your problem.


Please provide more information what you mean with "rdmd does 
not work". In general rdmd is superseded by the command "dmd 
-run".


Kind regards
Andre





I am at lost here. Before I can run my D project using dub.1.11.0 
executable install on my system but after uninstalling and 
install dmd 2.087.1 cannot run my project using dub from the 
project root folder. In windows 10 it shows this app can't run on 
your PC. To find a version for your PC, check with the software 
publisher. The same how's for the com and rdmd



What is the way out.



Re: Dub version

2019-08-09 Thread GreatSam4sure via Digitalmars-d-learn

On Friday, 9 August 2019 at 03:52:11 UTC, Andre Pany wrote:

On Friday, 9 August 2019 at 01:36:43 UTC, greatsam4sure wrote:

On Friday, 9 August 2019 at 01:18:12 UTC, Elronnd wrote:

[...]




dub fetch dub
Fetching dub 1.16.0...
Please note that you need to use `dub run ` or add it 
to dependencies of your package to actually use/run it. dub 
does not do actual installation of packages outside of its own 
ecosystem.



besides in https://code.dlang.org/packages/arsd-official they 
said use dub add arsd-official


Instead if specifying a dub package manually in your project 
dub.json thr command dub add will edit the dub.json for you.


Normally you get dub with the dmd/ldc/gdc package. Just 
download/install a recent package compiler package if you want 
to have command dub add.


Kind regards
Andre



I am using dmd 2.087.1 and dub 1.11.0

But the command dub add... Did not work

rdmd cannot run on my system.


Re: Dub version

2019-08-08 Thread greatsam4sure via Digitalmars-d-learn

On Friday, 9 August 2019 at 01:18:12 UTC, Elronnd wrote:

Dub add is not supported in dub 1.11.0


Use 'dub fetch'.




dub fetch dub
Fetching dub 1.16.0...
Please note that you need to use `dub run ` or add it to 
dependencies of your package to actually use/run it. dub does not 
do actual installation of packages outside of its own ecosystem.



besides in https://code.dlang.org/packages/arsd-official they 
said use dub add arsd-official





Dub version

2019-08-08 Thread GreatSam4sure via Digitalmars-d-learn

Which version of dub support dub add library name?

Dub add is not supported in dub 1.11.0

Besides I could not run rdmd on my windows 10 core i7. It days 
this app cannot run on this machine


What is the way out? Where can I get window binary for dub that 
is higher than dub 1.11.0




Re: How to contact people on the forum

2019-07-25 Thread Greatsam4sure via Digitalmars-d-learn

On Wednesday, 24 July 2019 at 16:40:58 UTC, Mike Parker wrote:

On Wednesday, 24 July 2019 at 16:37:33 UTC, Greatsam4sure wrote:

On Wednesday, 24 July 2019 at 15:56:43 UTC, drug wrote:

24.07.2019 18:51, Greatsam4sure пишет:
Good day everyone. I am thinking,  if there is a  way to 
contact any person on dlang forums through mail or any other 
means. How do I get their email from their forum post?


I use thunderbird to read the forum and every post contains 
email of its author, so I would use it to communicate.


I don't use thunderbird any other options


On the web forum there”s a link labeled “Source” on every post. 
Click it to see the raw message, including the header which 
contains the email address. Just be aware that not everyone 
uses a valid email address.



Thanks sir for your reply.




Re: How to contact people on the forum

2019-07-24 Thread Greatsam4sure via Digitalmars-d-learn

On Wednesday, 24 July 2019 at 15:56:43 UTC, drug wrote:

24.07.2019 18:51, Greatsam4sure пишет:
Good day everyone. I am thinking,  if there is a  way to 
contact any person on dlang forums through mail or any other 
means. How do I get their email from their forum post?


I use thunderbird to read the forum and every post contains 
email of its author, so I would use it to communicate.


I don't use thunderbird any other options




Re: Return the complete number

2019-07-24 Thread Greatsam4sure via Digitalmars-d-learn

On Wednesday, 24 July 2019 at 15:57:06 UTC, a11e99z wrote:

On Wednesday, 24 July 2019 at 15:56:13 UTC, a11e99z wrote:
On Wednesday, 24 July 2019 at 15:45:08 UTC, Greatsam4sure 
wrote:

int main(){
 double mum = 0;
 Write("enter a number: ")
 readf(" %s\n",);
 Writeln(num);

}

How do I return the complete number the user enter since I 
don't since the user can enter numbers of various length with 
dmd approximating it.


I will appreciate any help


  readf!" %s\n"( num );
or
  num.readf!" %s\n";
or
  num = readln.strip.to!double;


  writeln(num)

The result is always to six significant figure. I want the whole 
number to be diaplay


oops! i misunderstood





How to contact people on the forum

2019-07-24 Thread Greatsam4sure via Digitalmars-d-learn
Good day everyone. I am thinking,  if there is a  way to contact 
any person on dlang forums through mail or any other means. How 
do I get their email from their forum post?


Return the complete number

2019-07-24 Thread Greatsam4sure via Digitalmars-d-learn

int main(){
 double mum = 0;
 Write("enter a number: ")
 readf(" %s\n",);
 Writeln(num);

}

How do I return the complete number the user enter since I don't 
since the user can enter numbers of various length with dmd 
approximating it.


I will appreciate any help


Re: Blog Post #0051: MVC IV - ComboBox with Text

2019-07-10 Thread Greatsam4sure via Digitalmars-d-learn

On Tuesday, 9 July 2019 at 12:08:04 UTC, Ron Tarrant wrote:
Today's post starts a mini series-within-a-series on dressing 
up the ComboBox using a ListStore. Essentially, it's ListStore 
basics leading up to how this type of model is used with a 
TreeView.


You can find it here: 
https://gtkdcoding.com/2019/07/09/0051-mvc-iv-combobox-text.html


Great work! I see this series of tutorial becoming a book for 
gtkd. Is it possible to get all the tutorials in a pdf file for 
offline work? Thanks in advance






Re: gtkDcoding Facelift

2019-06-23 Thread Greatsam4sure via Digitalmars-d-learn

On Sunday, 23 June 2019 at 10:55:52 UTC, Ron Tarrant wrote:
Stage 1 is now complete. Blog entries are color-associated in 
an effort to make things more visual. Each topic also has its 
own avatar. Points to anyone who can figure out why each avatar 
is associated with its topic.


https://gtkdcoding.com/


Thanks a lot.it is very cool!




Re: DLS server can't install on my pc

2019-05-24 Thread greatsam4sure via Digitalmars-d-learn

On Friday, 24 May 2019 at 12:03:37 UTC, Laurent Tréguier wrote:

On Wednesday, 22 May 2019 at 12:59:13 UTC, greatsam4sure wrote:
I am having some difficulty installing DLS for dlang 1.16.4 
the visual studio code plugin for Dlang on my pc-windows 10 
Lenovo laptop ci7. it actually install in my ci3 running 
windows 10. It says this app can't install on this pc.



I will be appreciate any help


I just launched VSCode on Windows, and Windows Defender started 
telling me that DLS v0.25.9 contained a Trojan. The releases 
are automated and produced by AppVeyor [1], so it should 
probably be a false positive. Maybe this is what happened to 
you ?


A new patch (v0.25.10) is out now, and my Windows Defender 
doesn't seem to consider that one a threat apparently.



[1] https://ci.appveyor.com/project/dlanguageserver/dls


no luck yet. I have visual studio 2019 install on my laptop, ci7, 
8GB ram running windows 10


I have turn off my window defender, yet it says app can't run on 
this system


DLS server can't install on my pc

2019-05-22 Thread greatsam4sure via Digitalmars-d-learn
I am having some difficulty installing DLS for dlang 1.16.4 the 
visual studio code plugin for Dlang on my pc-windows 10 Lenovo 
laptop ci7. it actually install in my ci3 running windows 10. It 
says this app can't install on this pc.



I will be appreciate any help


Vibe.d throw error with dmd 2.086

2019-05-07 Thread greatsam4sure via Digitalmars-d-learn



dub run gives


The dependency resolution process is taking too long. The 
dependency graph is likely hitting a pathological case in the 
resolution algorithm. Please file a bug report at 
https://github.com/dlang/dub/issues and mention the package 
recipe that reproduces this error.


what is the solution to this problem. i am on windows 10


Re: lld-link.exe: error: could not open msvcrt100.lib

2019-02-01 Thread greatsam4sure via Digitalmars-d-learn

On Friday, 1 February 2019 at 14:00:15 UTC, Andre Pany wrote:

On Friday, 1 February 2019 at 13:52:05 UTC, Andre Pany wrote:

Hi,

lld-link was working fine on my windows pc. I set in global 
dub settings file
architecture to X86_64. DMD was installed by extracting the 
zip archive.


For python development ): I had to install "Build Tools for 
Visual Studio 2017".

Now dub (lld-link) fails always with error message:
lld-link.exe: error: could not open msvcrt100.lib: no such 
file or directory
lld-link.exe: error: could not open OLDNAMES.lib: no such file 
or directory

Error: linker exited with status 1

My assumption is, the Build Tools installation somehow 
confuses the link logic.

Is this a bug?

Kind regards
André


Already solved in nightly :)
Thanks!!!




Already solved in nightly. What is the meaning of this statement? 
I know it means the bug is fixed in the yet to release but which 
version do you refer to and how can I have that version. Pls I 
have the same problem too. I can compile d project in visual 
studio.






Re: code-d and serve-d fail to load after vs update

2019-01-26 Thread greatsam4sure via Digitalmars-d-learn

On Friday, 25 January 2019 at 22:19:01 UTC, WebFreak001 wrote:

On Friday, 25 January 2019 at 19:47:59 UTC, greatsam4sure wrote:

[...]


hi, can you check if you have write permissions to 
C:\Users\Greatsam\AppData\Local\dub\packages\dfmt-0.9.0\dfmt\bin ?


Are you using d.betaStream: true? If you set it to false again 
you will get precompiled binaries (though not the newest 
features, bugs and fixes)




setting d.betaStream to false finally work but how would one get 
the latest update.


code-d and serve-d fail to load after vs update

2019-01-25 Thread greatsam4sure via Digitalmars-d-learn
Just update vs code and since then I cannot use code-d and 
serve-d.


below is dmd 2.084 complains. I will appreciate any help



Installing into C:\Users\Greatsam\AppData\Roaming\code-d\bin
git clone --recursive https://github.com/Pure-D/serve-d.git 
serve-d

Cloning into 'serve-d'...

dub upgrade
Upgrading project in 
C:\Users\Greatsam\AppData\Roaming\code-d\bin\serve-d

dub build --arch=x86_mscoff
Invalid source/import path: 
C:\Users\Greatsam\AppData\Local\dub\packages\dfmt-0.9.0\dfmt\bin

Running pre-generate commands for dfmt...
Access is denied.
Command failed with exit code 1: rdmd 
C:\Users\Greatsam\AppData\Local\dub\packages\dfmt-0.9.0\dfmt/dubhash.d

Failed to install serve-d (Error code 2)



Re: Vibe.d throw link error

2019-01-05 Thread greatsam4sure via Digitalmars-d-learn

On Friday, 4 January 2019 at 09:56:14 UTC, bauss wrote:

On Friday, 4 January 2019 at 09:48:55 UTC, greatsam4sure wrote:

On Thursday, 3 January 2019 at 04:57:57 UTC, Me wrote:
On Thursday, 3 January 2019 at 00:23:50 UTC, greatsam4sure 
wrote:

[...]


Windows 10 --- got it
VibeD project --- got it
Error --- got it

What exactly were you trying to do? What you have given so 
far offers no incite. Try providing a bit more information, 
offending code, cli command and associated arguments used, 
etc...



Really don't know the cause.  All dependence are up to date.

No offending code to the best of my knowledge.

All I did create a vibe.d project using dub unit HelloWorld 
--type=vibe.d


After which run the program in 's code using dub.

All dependence compile but after showing linking, it will 
throw link error.


I have run vibe.d project before. It just straight forward


Try to compile with -a=x86_mscoff if you're on Windows at least.






Thanks this work for me.  What is the reason I must add 
-a=x86-mscoff to dub before my code compiles.


What can I do to compile or run vibe.d project without adding 
-a=x86-mscoff to dub


Thanks in advance


Re: Vibe.d throw link error

2019-01-04 Thread greatsam4sure via Digitalmars-d-learn

On Thursday, 3 January 2019 at 04:57:57 UTC, Me wrote:
On Thursday, 3 January 2019 at 00:23:50 UTC, greatsam4sure 
wrote:

On Wednesday, 2 January 2019 at 21:46:57 UTC, bauss wrote:


Error: linker exit with status 1
Dmd failed  with exit code 1


This is all the compiler emit


Windows 10 --- got it
VibeD project --- got it
Error --- got it

What exactly were you trying to do? What you have given so far 
offers no incite. Try providing a bit more information, 
offending code, cli command and associated arguments used, 
etc...



Really don't know the cause.  All dependence are up to date.

No offending code to the best of my knowledge.

All I did create a vibe.d project using dub unit HelloWorld 
--type=vibe.d


After which run the program in 's code using dub.

All dependence compile but after showing linking, it will throw 
link error.


I have run vibe.d project before. It just straight forward





Re: Vibe.d throw link error

2019-01-02 Thread greatsam4sure via Digitalmars-d-learn

On Wednesday, 2 January 2019 at 21:46:57 UTC, bauss wrote:


Error: linker exit with status 1
Dmd failed  with exit code 1


This is all the compiler emit


Vibe.d throw link error

2019-01-02 Thread greatsam4sure via Digitalmars-d-learn
I am using windows 10. I could not run vibe project. It just give 
me the error:


Error: linker exit with status 1
Dmd failed  with exit code 1

I have use different dmd from 0.080 till 0.083. The same error.

What is the possible cause and solution to this error?


Vibe.d throw link error

2019-01-02 Thread greatsam4sure via Digitalmars-d-learn
I am using windows 10. I could not run vibe project. It just give 
me the error:


Error: linker exit with status 1
Dmd failed  with exit code 1

I have use different dmd from 0.080 till 0.083. The same error.

What is the possible cause and solution to this error?


Re: serve-d break on every update of vs code

2018-11-30 Thread greatsam4sure via Digitalmars-d-learn

On Friday, 30 November 2018 at 23:02:13 UTC, WebFreak001 wrote:
On Friday, 30 November 2018 at 22:37:02 UTC, greatsam4sure 
wrote:
On Friday, 30 November 2018 at 16:24:35 UTC, Laurent Tréguier 
wrote:
On Friday, 30 November 2018 at 13:04:37 UTC, greatsam4sure 
wrote:
vs code update every time I am connected to internet. Each 
time I accept the update my code-d stops to show 
autocomplete. what is the best way to solve this problem.


Just updated today. These are the error report



Installing into C:\Users\Greatsam\AppData\Roaming\code-d\bin

[...]

Cloning into 'serve-d'...

[...]
Upgrading project in 
C:\Users\Greatsam\AppData\Roaming\code-d\bin\serve-d

[...]

Running pre-generate commands for dfmt...
Running pre-generate commands for dscanner...
Performing "debug" build using dmd for x86, x86_mscoff.
[...]


If you need to keep your dmd at a version that can't compile 
it, there is a precompiled binary for Windows in the Github 
releases



Plz I need more explanation


Are you running vscode in some kind of sandbox like a flatpak 
or something? Try running dmd --version and send the output.


To validate, try manually compiling serve-d:

git clone --recursive https://github.com/Pure-D/serve-d.git 
serve-d

cd serve-d
dub build --arch=x86_mscoff


 Sorry, I am not using dmd 2.083 but 2.080. I just check and 
update it.
It is a mistake on my part. I was using dmd 2.083 before but due 
to link error with vibe.d 0.8.4, I change it.


It is just show installing DCD for a long time without installing 
it. I guess it is network issue. I think it will install later





Re: serve-d break on every update of vs code

2018-11-30 Thread greatsam4sure via Digitalmars-d-learn
On Friday, 30 November 2018 at 16:24:35 UTC, Laurent Tréguier 
wrote:
On Friday, 30 November 2018 at 13:04:37 UTC, greatsam4sure 
wrote:
vs code update every time I am connected to internet. Each 
time I accept the update my code-d stops to show autocomplete. 
what is the best way to solve this problem.


Just updated today. These are the error report



Installing into C:\Users\Greatsam\AppData\Roaming\code-d\bin

[...]

Cloning into 'serve-d'...

[...]
Upgrading project in 
C:\Users\Greatsam\AppData\Roaming\code-d\bin\serve-d

[...]

Running pre-generate commands for dfmt...
Running pre-generate commands for dscanner...
Performing "debug" build using dmd for x86, x86_mscoff.
[...]


If you need to keep your dmd at a version that can't compile 
it, there is a precompiled binary for Windows in the Github 
releases



Plz I need more explanation


Re: serve-d break on every update of vs code

2018-11-30 Thread greatsam4sure via Digitalmars-d-learn

On Friday, 30 November 2018 at 14:38:14 UTC, WebFreak001 wrote:
On Friday, 30 November 2018 at 13:04:37 UTC, greatsam4sure 
wrote:
vs code update every time I am connected to internet. Each 
time I accept the update my code-d stops to show autocomplete. 
what is the best way to solve this problem.


[...]


hi,

update dmd


I am using dmd 2.083. What can I do next


serve-d break on every update of vs code

2018-11-30 Thread greatsam4sure via Digitalmars-d-learn
vs code update every time I am connected to internet. Each time I 
accept the update my code-d stops to show autocomplete. what is 
the best way to solve this problem.


Just updated today. These are the error report



Installing into C:\Users\Greatsam\AppData\Roaming\code-d\bin
git clone --recursive https://github.com/Pure-D/serve-d.git 
serve-d

Cloning into 'serve-d'...

dub upgrade
Upgrading project in 
C:\Users\Greatsam\AppData\Roaming\code-d\bin\serve-d

dub build --arch=x86_mscoff

Running pre-generate commands for dfmt...
Running pre-generate commands for dscanner...
Performing "debug" build using dmd for x86, x86_mscoff.
diet-complete 0.0.1: building configuration "library"...
..\..\..\..\Local\dub\packages\diet-complete-0.0.1\diet-complete\source\dietc\complete.d(409,43):
 Error: statement expected to be `{ }`, not `(`
..\..\..\..\Local\dub\packages\diet-complete-0.0.1\diet-complete\source\dietc\complete.d(409,50):
 Error: template argument expected following `!`
..\..\..\..\Local\dub\packages\diet-complete-0.0.1\diet-complete\source\dietc\complete.d(409,50):
 Error: found `is` when expecting `)`
..\..\..\..\Local\dub\packages\diet-complete-0.0.1\diet-complete\source\dietc\complete.d(409,53):
 Error: missing `{ ... }` for function literal
..\..\..\..\Local\dub\packages\diet-complete-0.0.1\diet-complete\source\dietc\complete.d(409,53):
 Error: found `null` when expecting `;` following statement
..\..\..\..\Local\dub\packages\diet-complete-0.0.1\diet-complete\source\dietc\complete.d(409,57):
 Error: declaration expected, not `)`
..\..\..\..\Local\dub\packages\diet-complete-0.0.1\diet-complete\source\dietc\complete.d(413,9):
 Error: no identifier for declarator `code`
..\..\..\..\Local\dub\packages\diet-complete-0.0.1\diet-complete\source\dietc\complete.d(413,9):
 Error: declaration expected, not `~=`
..\..\..\..\Local\dub\packages\diet-complete-0.0.1\diet-complete\source\dietc\complete.d(414,4):
 Error: declaration expected, not `if`
..\..\..\..\Local\dub\packages\diet-complete-0.0.1\diet-complete\source\dietc\complete.d(417,16):
 Error: unexpected `(` in declarator
..\..\..\..\Local\dub\packages\diet-complete-0.0.1\diet-complete\source\dietc\complete.d(417,22):
 Error: no identifier for declarator `stmt.accept(this)`
..\..\..\..\Local\dub\packages\diet-complete-0.0.1\diet-complete\source\dietc\complete.d(418,10):
 Error: no identifier for declarator `code`
..\..\..\..\Local\dub\packages\diet-complete-0.0.1\diet-complete\source\dietc\complete.d(418,10):
 Error: declaration expected, not `~=`
..\..\..\..\Local\dub\packages\diet-complete-0.0.1\diet-complete\source\dietc\complete.d(423,35):
 Error: statement expected to be `{ }`, not `(`
..\..\..\..\Local\dub\packages\diet-complete-0.0.1\diet-complete\source\dietc\complete.d(423,42):
 Error: template argument expected following `!`
..\..\..\..\Local\dub\packages\diet-complete-0.0.1\diet-complete\source\dietc\complete.d(423,42):
 Error: found `is` when expecting `)`
..\..\..\..\Local\dub\packages\diet-complete-0.0.1\diet-complete\source\dietc\complete.d(423,45):
 Error: missing `{ ... }` for function literal
..\..\..\..\Local\dub\packages\diet-complete-0.0.1\diet-complete\source\dietc\complete.d(423,45):
 Error: found `null` when expecting `;` following statement
..\..\..\..\Local\dub\packages\diet-complete-0.0.1\diet-complete\source\dietc\complete.d(423,49):
 Error: declaration expected, not `)`
..\..\..\..\Local\dub\packages\diet-complete-0.0.1\diet-complete\source\dietc\complete.d(426,5):
 Error: declaration expected, not `if`
dmd failed with exit code 1.
Failed to install serve-d (Error code 2)



Re: How to center dlangui Window on screen

2018-11-29 Thread greatsam4sure via Digitalmars-d-learn

On Thursday, 29 November 2018 at 05:54:37 UTC, bauss wrote:
On Wednesday, 28 November 2018 at 23:07:50 UTC, greatsam4sure 
wrote:
On Wednesday, 28 November 2018 at 17:23:21 UTC, Edgar Huckert 
wrote:
On Wednesday, 28 November 2018 at 08:55:11 UTC, greatsam4sure 
wrote:

[...]


For a little bit of information look at: 
https://github.com/buggins/dlangui/pull/372


Without going into depth I have tested this under Linux/GTK 
with dlangui:


WindowState state;
Rectrect;
rect.left   = 800;
rect.top= 10;
rect.bottom = 600;
rect.right  = 1000;
bool bRet= window.setWindowState(state,
 false,
 rect);

window.show();

This changed the position and size of my initial window.

Edgar Huckert




This help a little but not what I am looking for.
I want to calculate the width and window of the screen so as 
to center my window on screen


I also notice that a window of 350 x 550 appear bigger compare 
to the same Widow dimension in Havana and adobe air.


Why is it so?

Plz help!  Thanks in advance


To center horizontal:

l = left
s = screen width
w = window width

l = (s / 2) - (w / 2)

To center vertical:

t = top
s = screen height
h = window height

t = (s / 2) - (h / 2)

And about the window size.

It has probably to do with the type of Window you're rendering, 
like whether it has borders or not. Borders are not calculated 
in the width / height, so they take up extra space. Adobe 
usually never uses the native GUI for borders etc. so the 
border size (if there is one) is included in their width / 
height.



Which class in dlangui is use to obtain the screen height and 
width?
A Windom of dimension 280 x 445 in dlangui is the same as a 
Windom of 350 x 550 in Javafx and adobe air.


What could be responsible for this wide difference?
A window of 350 x 550 in adobe air is the same as a window of 350 
x 550 in javafx. So why is dlangui window bigger?


Note that I  am using  w x h for my window dimension and I am on 
windows 10








Re: How to center dlangui Window on screen

2018-11-28 Thread greatsam4sure via Digitalmars-d-learn
On Wednesday, 28 November 2018 at 17:23:21 UTC, Edgar Huckert 
wrote:
On Wednesday, 28 November 2018 at 08:55:11 UTC, greatsam4sure 
wrote:

I am learning Dlang and Dlangui.

I encounter, a little problem on:

 how to center dlangui window on screen.

How to set the window width and height outside the constructor

How to maximize and minimize the window using code.

How to set global font for the application.  The font display 
is not too nice.


I have check online, the documentation  and available tutorial 
to no help


Thanks in advance


For a little bit of information look at: 
https://github.com/buggins/dlangui/pull/372


Without going into depth I have tested this under Linux/GTK 
with dlangui:


WindowState state;
Rectrect;
rect.left   = 800;
rect.top= 10;
rect.bottom = 600;
rect.right  = 1000;
bool bRet= window.setWindowState(state,
 false,
 rect);

window.show();

This changed the position and size of my initial window.

Edgar Huckert




This help a little but not what I am looking for.
I want to calculate the width and height of the screen so as to 
center my window on screen


I also notice that a window of 350 x 550 appear bigger compare to 
the same Widow dimension in javafx and adobe air.


Why is it so?

Plz help!  Thanks in advance



Re: How to center dlangui Window on screen

2018-11-28 Thread greatsam4sure via Digitalmars-d-learn
On Wednesday, 28 November 2018 at 17:23:21 UTC, Edgar Huckert 
wrote:
On Wednesday, 28 November 2018 at 08:55:11 UTC, greatsam4sure 
wrote:

I am learning Dlang and Dlangui.

I encounter, a little problem on:

 how to center dlangui window on screen.

How to set the window width and height outside the constructor

How to maximize and minimize the window using code.

How to set global font for the application.  The font display 
is not too nice.


I have check online, the documentation  and available tutorial 
to no help


Thanks in advance


For a little bit of information look at: 
https://github.com/buggins/dlangui/pull/372


Without going into depth I have tested this under Linux/GTK 
with dlangui:


WindowState state;
Rectrect;
rect.left   = 800;
rect.top= 10;
rect.bottom = 600;
rect.right  = 1000;
bool bRet= window.setWindowState(state,
 false,
 rect);

window.show();

This changed the position and size of my initial window.

Edgar Huckert




This help a little but not what I am looking for.
I want to calculate the width and window of the screen so as to 
center my window on screen


I also notice that a window of 350 x 550 appear bigger compare to 
the same Widow dimension in Havana and adobe air.


Why is it so?

Plz help!  Thanks in advance



How to center dlangui on screen

2018-11-28 Thread greatsam4sure via Digitalmars-d-learn

I am learning Dlang and Dlangui.

I encounter, a little problem on:

 how to center dlangui window on screen.

How to set the window width and height outside the constructor

How to maximize and minimize the window using code.

How to set global font for the application.  The font display is 
not too nice.


I have check online, the documentation  and available tutorial to 
no help


Thanks in advance


Vibe throw link error

2018-11-14 Thread greatsam4sure via Digitalmars-d-learn
Vibe.d 0.8.4 throw link error with dmd-2.08.0 and newer on 
windows 10. What is the what out. In dub package register, it was 
said that vibe 0.8.4 works with dmd 2.08.0 and old version but in 
my case it does not work


looking forward for help


Re: Could not setup D extension on vs code

2018-11-14 Thread greatsam4sure via Digitalmars-d-learn

On Wednesday, 14 November 2018 at 19:28:44 UTC, WebFreak001 wrote:
On Wednesday, 14 November 2018 at 13:20:31 UTC, greatsam4sure 
wrote:

[...]


Hi,

thanks for the report, I tagged a new version of workspace-d 
which will fix this issue.


Simply reload vscode and let it rebuild to fix.

Issue was: for a long time dfmt didn't get a new tagged release 
and wasn't compatible with the dscanner and libdparse version I 
used anymore, so I changed it to use ~master instead. Since a 
few days it has been tagged and it was added to workspace-d 
~master but serve-d still uses the latest tagged release.


So as dfmt now got updated to an even newer libdparse, the 
other components don't match that libdparse version anymore and 
now dfmt is too new for it...


It's a real pain that you can't select specific commits in dub, 
but I try to keep up with the updates and make them work 
somehow. Sometimes it feels like unnecessary major (minor) 
version bumps that just break all the version compatibility 
with barely any backwards incompatibility in the code.


thanks,fix after reloading vs code several times with internet 
connection. DCD was not downloaded i have to manually download 
it, extract it and copy dcd-client.exe and dcd-server.exe to 
code-d\bin and set up the path in vs code for auto completion to 
work


Could not setup D extension on vs code

2018-11-14 Thread greatsam4sure via Digitalmars-d-learn

What is the solution to this:

Unresolvable dependencies to package libdparse:
  dfmt ~master depends on libdparse ~>0.10.7
  libddoc 0.4.0 depends on libdparse ~>0.9.0
Failed to install serve-d (Error code 2)



Where can i download libdparse 0.10.7

The full error file below. i am on windows 10

Installing into C:\Users\Greatsam\AppData\Roaming\code-d\bin
Removing old version
Removed old version
git clone --recursive https://github.com/Pure-D/serve-d.git 
serve-d

Cloning into 'serve-d'...

dub upgrade
Upgrading project in 
C:\Users\Greatsam\AppData\Roaming\code-d\bin\serve-d

Unresolvable dependencies to package libdparse:
  dfmt ~master depends on libdparse ~>0.10.7
  libddoc 0.4.0 depends on libdparse ~>0.9.0
Failed to install serve-d (Error code 2)


Re: How do I install a library?

2018-11-10 Thread greatsam4sure via Digitalmars-d-learn

On Saturday, 10 November 2018 at 20:04:21 UTC, aberba wrote:

On Thursday, 8 November 2018 at 23:51:39 UTC, bachmeier wrote:

On Thursday, 8 November 2018 at 23:43:38 UTC, Murilo wrote:

It finally worked, but I can't just compile it normally, I 
have to use dub run, I wish it were something simple that I 
just download into the folder and then use an import 
statement and then compile it like any other program. I wish 
it were as simple as using std.stdio for example.


Unfortunately your stuck with Dub if you want to use D. It's 
an awful experience compared to Python and other scripting 
languages, so I understand what you're saying, but most people 
around here think Dub is the way to go.



Stop bashing dub. Its completely fine for me. I don't get what 
OP mean by "simple" but:


dub init
add package name
dub run

... doesn't look "not simple" to me.


It will pay some of us if you explain more on how to us dub. To 
me dub is too difficult to us and is not user friendly. It is not 
every body who is interested in Dlang is in a country with strong 
internet connection. A tutorial on how to use dub will really 
help. I don't need a link as i have gone through them but did not 
help me. How i wish dlang tools will be as simple and user 
friendly as the language itself.


Re: Prime number

2018-08-02 Thread Greatsam4sure via Digitalmars-d-learn

On Thursday, 2 August 2018 at 09:35:20 UTC, Cym13 wrote:

On Thursday, 2 August 2018 at 08:30:05 UTC, Greatsam4sure wrote:
I know D is very powerful from my little experience. What is 
the idiomatic way to get prime numbers say from 1-30 without 
using loops(outer and inner loop). Can map, filter, fold etc 
in algorithm be use.  Pls show some code with chain call.


I can easily achieve even numberd and odd numbers using 
filter. But prime numbers I have to use 2loops.


I will appreciate any help,just a newbie in D


Denis' answer is good but I'd like to add that the idiomatic D 
solution is to use whatever tool is the most adequate to solve 
the issue. If two loops is more natural it wouldn't make much 
sense to force yourself to use range functions (even though I'd 
obviously understand that stand to learn to use them).




Thanks, I like the idea of using helper function from algorithm 
module to do the magic instead of loops.  I want to know How To 
optimize it to efficient.

I will appreciate any help.
I will also appreciate a link to a comprehensive tutorial on the 
algorithm module. The documentation did not give me all the help 
I needed




Prime number

2018-08-02 Thread Greatsam4sure via Digitalmars-d-learn
I know D is very powerful from my little experience. What is the 
idiomatic way to get prime numbers say from 1-30 without using 
loops(outer and inner loop). Can map, filter, fold etc in 
algorithm be use.  Pls show some code with chain call.


I can easily achieve even numberd and odd numbers using filter. 
But prime numbers I have to use 2loops.


I will appreciate any help,just a newbie in D


Gui framework

2018-08-01 Thread Greatsam4sure via Digitalmars-d-learn
Please help me recommend a gui toolkit for slang,  the has the 
following

* work well on windows
*look native on windows
*support css styling like adobe flex
 spark toolkit and javafx
*support custom chrome. That is easily
 customizable.
*Integrate well with dlang.
*Has fairly OK tutorials

I will appreciate your help(s)


Gui framework

2018-08-01 Thread Greatsam4sure via Digitalmars-d-learn
Please help me recommend a gui toolkit for dlang,  that has the 
following

* work well on windows
*look native on windows
*support css styling like adobe flex
 spark toolkit and javafx
*Support theming and skinning
*support custom chrome. That is easily
 customizable.
*Integrate well with dlang.
*Has fairly OK tutorials

I will appreciate your help(s)


Gui framework

2018-08-01 Thread Greatsam4sure via Digitalmars-d-learn
Please help me recommend a gui toolkit for dlang,  the has the 
following

* work well on windows
*look native on windows
*support css styling like adobe flex
 spark toolkit and javafx
*support custom chrome. That is easily
 customizable.
*Integrate well with dlang.
*Has fairly OK tutorials

I will appreciate your help(s)


Re: Template variable not reach at compile

2018-07-21 Thread Greatsam4sure via Digitalmars-d-learn

On Saturday, 21 July 2018 at 13:13:11 UTC, Mike Parker wrote:

On Saturday, 21 July 2018 at 12:17:54 UTC, Greatsam4sure wrote:

Sorry for the typo.  This is the problem

auto arithmetic(T, V, U)(T a,  V b,  U op){
   return mixin("a"~op~"b");
}

//call like this
arithmetic(1.5,2.5,"+");


Compiler says the variable op is not reach at compile time.  
So how can the varible a and b be reach at compile time and op 
is not reach. I will appreciate any help. I have also use a 
static if but the same complain.  Just a newbie in D


You aren't using a or b at compile time -- you're using the 
string literals "a" and "b", which have nothing at all to do 
with a and b. In order to get what you want, you need to make 
op a template parameter like this:


auto arithmetic(string op, T, V)(T a, V b)
{
mixin("a"~op~"b");
}

arithmetic!("+")(1.5, 2.5);



Thanks Sir.  Really appreciate your reply it works for me. I also 
want to thank you for all your labour in the dlang ecosystem or 
foundation. I read about the dlang announce group every day. I 
will also want update to dlang this week or close it down or 
redirect to the announce group directly




Template variable not reach at compile

2018-07-21 Thread Greatsam4sure via Digitalmars-d-learn

Sorry for the typo.  This is the problem

auto arithmetic(T, V, U)(T a,  V b,  U op){
   return mixin("a"~op~"b");
}

//call like this
arithmetic(1.5,2.5,"+");


Compiler says the variable op is not reach at compile time.  So 
how can the varible a and b be reach at compile time and op is 
not reach. I will appreciate any help. I have also use a static 
if but the same complain.  Just a newbie in D


Template variable not reach at compile

2018-07-21 Thread Greatsam4sure via Digitalmars-d-learn

auto arithmetic(T, V, U)(T a,  V b,  U op){
   return mixin("a"~op~"b");
}

//call like this
arithmetic(1.5,2.5,"op");


Compiler says the variable op is not reach at compile time.  So 
how can the varible a and b be reach at compile time and op is 
not reach. I will appreciate any help. I have also use a static 
if but the same complain.  Just a newbie in D


Re: how to define infix function

2018-06-03 Thread greatsam4sure via Digitalmars-d-learn

On Saturday, 2 June 2018 at 22:09:49 UTC, Neia Neutuladh wrote:

On Saturday, 2 June 2018 at 21:44:39 UTC, greatsam4sure wrote:

[...]


This is a horrible abuse of D's operator overloading discovered 
by FeepingCreature in the distant past.


You have to delimit your custom infix operator with slashes; 
you can't make `3 min 5` work, but you can make `3 /min/ 5` 
work.


Observe:

struct Min
{
MinIntermediate!T opBinaryRight(string op, T)(T value) if 
(op == "/")

{
return MinIntermediate!T(value);
}
}
struct MinIntermediate(T)
{
T value;
T opBinary(string op, T)(T value2) if (op == "/")
{
if (value < value2) return value;
return value2;
}
}
Min min;
void main()
{
writeln(1 /min/ 2);
}


thanks


Re: how to define infix function

2018-06-02 Thread greatsam4sure via Digitalmars-d-learn

On Saturday, 2 June 2018 at 22:01:02 UTC, Ali Çehreli wrote:

On 06/02/2018 02:44 PM, greatsam4sure wrote:

> is it possible to define infix function in D
>
> 3.min(5)// 3: where min is a function, works in D
> 3 min 5 // does not work.

This is called universal function call syntax (UFCS) in D. The 
idea is simple: You can pull the first argument out as if the 
function is a member function of that argument. So, in your 
case it already works because there is already a min() function 
that works with two (actually, many) parameters:


import std.algorithm;

void main() {
assert(min(3, 5) == 3);
assert(3.min(5) == 3);
}

However, many people don't like overusing it; it works well 
only in cases where the first parameter is arguably the "main 
character" in the operation. For example, min doesn't look good 
because all parameters have equal roles in that function.


Ali


Thanks for your reply to my question.
Your book: programming in D is real a great help learning D. I 
will appreciate it if your can expand the book to advance use of 
D. That is, dealing with D advance use Case. I discover that the 
D language is very advance but I am lock in the elementary yet 
don't know the way out. This is because D is the most Higher 
programming language that I ever use. Better still you can direct 
me to more materials about D. I am already familiar will all D 
books.


thanks


how to define infix function

2018-06-02 Thread greatsam4sure via Digitalmars-d-learn

Sorry for the typo

is it possible to define infix function in D

3.min(5)// 3: where min is a function, works in D
3 min 5 // does not work.

thanks in advance


how to definte infinix function

2018-06-02 Thread greatsam4sure via Digitalmars-d-learn

is it possible to definite infix function in D

3.min(5)// 3 where min is a function works in D
3 min 5 // does not work.

thanks in advance




how to set up libuid on wondows 10

2018-04-04 Thread greatsam4sure via Digitalmars-d-learn

I am have problem setting up libuid on windows 10.

These are the errors thus far:

C:\Users\Greatsam\Desktop\HelloApp>dub
Fetching libuid 0.0.7 (getting selected version)...
Performing "debug" build using dmd for x86.
libuid 0.0.7: building configuration "lib"...
helloapp ~master: building configuration "application"...
Linking...
OPTLINK (R) for Win32  Release 8.00.17
Copyright (C) Digital Mars 1989-2013  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(App)
 Error 42: Symbol Undefined _uiControlDestroy
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(App)
 Error 42: Symbol Undefined _uiMain
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowTitle
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowSetTitle
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowPosition
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowSetPosition
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowCenter
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowContentSize
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowSetContentSize
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowFullscreen
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowSetFullscreen
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowBorderless
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowSetBorderless
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowSetChild
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowMargined
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowSetMargined
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiOpenFile
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiSaveFile
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiMsgBox
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiMsgBoxError
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiNewWindow
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowOnPositionChanged
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowOnContentSizeChanged

can't build libuid examples

2018-03-06 Thread greatsam4sure via Digitalmars-d-learn

Try to build libuid examples get the following error.
dub build, build successfully on the root folder. I will 
appreciate any help. Just try to build a gui app using dlang.



OPTLINK (R) for Win32  Release 8.00.17
Copyright (C) Digital Mars 1989-2013  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(App)
 Error 42: Symbol Undefined _uiControlDestroy
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(App)
 Error 42: Symbol Undefined _uiMain
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowTitle
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowSetTitle
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowPosition
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowSetPosition
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowCenter
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowContentSize
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowSetContentSize
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowFullscreen
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowSetFullscreen
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowBorderless
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowSetBorderless
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowSetChild
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowMargined
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowSetMargined
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiOpenFile
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiSaveFile
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiMsgBox
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiMsgBoxError
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiNewWindow
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowOnPositionChanged
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowOnContentSizeChanged
..\..\AppData\Roaming\dub\packages\libuid-0.0.7\libuid\.dub\build\lib-debug-windows-x86-dmd_2079-7AA4D084E1AB1DF72ADCC536E95F2BDA\uid.lib(Window)
 Error 42: Symbol Undefined _uiWindowOnClosing

Re: can't run libuid examples

2017-12-24 Thread greatsam4sure via Digitalmars-d-learn

On Friday, 22 December 2017 at 04:41:09 UTC, bauss wrote:
On Thursday, 21 December 2017 at 18:41:28 UTC, greatsam4sure 
wrote:
I am having problem with running the examples of libuid on 
Windows and how to use libuid on a project without errors. I 
am using dmd version 2.076


Okay, but how are we supposed to help if you don't show us what 
errors you get?


Errors can depend on many things like your compiler-setup, 
paths, linker, your code, packages, compiler-flags and so on.




These are the errors I am having

example2.obj(example2)
 Error 42: Symbol Undefined _uiEditableComboboxText
.dub\build\example2-debug-windows-x86-dmd_2076-2BF5EBEC270C34966AAC50F10B4761A
example2.obj(example2)
 Error 42: Symbol Undefined _uiEditableComboboxSetText
.dub\build\example2-debug-windows-x86-dmd_2076-2BF5EBEC270C34966AAC50F10B4761A
example2.obj(example2)
 Error 42: Symbol Undefined _uiNewPasswordEntry
.dub\build\example2-debug-windows-x86-dmd_2076-2BF5EBEC270C34966AAC50F10B4761A
example2.obj(example2)
 Error 42: Symbol Undefined _uiEntryOnChanged
.dub\build\example2-debug-windows-x86-dmd_2076-2BF5EBEC270C34966AAC50F10B4761A
example2.obj(example2)
 Error 42: Symbol Undefined _uiNewEntry
.dub\build\example2-debug-windows-x86-dmd_2076-2BF5EBEC270C34966AAC50F10B4761A
example2.obj(example2)
 Error 42: Symbol Undefined _uiNewSearchEntry
.dub\build\example2-debug-windows-x86-dmd_2076-2BF5EBEC270C34966AAC50F10B4761A
example2.obj(example2)
 Error 42: Symbol Undefined _uiEntryText
.dub\build\example2-debug-windows-x86-dmd_2076-2BF5EBEC270C34966AAC50F10B4761A
example2.obj(example2)
 Error 42: Symbol Undefined _uiEntrySetText
.dub\build\example2-debug-windows-x86-dmd_2076-2BF5EBEC270C34966AAC50F10B4761A
example2.obj(example2)
 Error 42: Symbol Undefined _uiEntryReadOnly
.dub\build\example2-debug-windows-x86-dmd_2076-2BF5EBEC270C34966AAC50F10B4761A
example2.obj(example2)
 Error 42: Symbol Undefined _uiEntrySetReadOnly
.dub\build\example2-debug-windows-x86-dmd_2076-2BF5EBEC270C34966AAC50F10B4761A
example2.obj(example2)
 Error 42: Symbol Undefined _uiFontButtonOnChanged
.dub\build\example2-debug-windows-x86-dmd_2076-2BF5EBEC270C34966AAC50F10B4761A
example2.obj(example2)
 Error 42: Symbol Undefined _uiNewFontButton
.dub\build\example2-debug-windows-x86-dmd_2076-2BF5EBEC270C34966AAC50F10B4761A
example2.obj(example2)
 Error 42: Symbol Undefined _uiFontButtonFont
.dub\build\example2-debug-windows-x86-dmd_2076-2BF5EBEC270C34966AAC50F10B4761A
example2.obj(example2)
 Error 42: Symbol Undefined _uiNewForm
.dub\build\example2-debug-windows-x86-dmd_2076-2BF5EBEC270C34966AAC50F10B4761A
example2.obj(example2)
 Error 42: Symbol Undefined _uiFormAppend
.dub\build\example2-debug-windows-x86-dmd_2076-2BF5EBEC270C34966AAC50F10B4761A
example2.obj(example2)
 Error 42: Symbol Undefined _uiFormDelete
.dub\build\example2-debug-windows-x86-dmd_2076-2BF5EBEC270C34966AAC50F10B4761A
example2.obj(example2)
 Error 42: Symbol Undefined _uiFormPadded
.dub\build\example2-debug-windows-x86-dmd_2076-2BF5EBEC270C34966AAC50F10B4761A
example2.obj(example2)
 Error 42: Symbol Undefined _uiFormSetPadded
.dub\build\example2-debug-windows-x86-dmd_2076-2BF5EBEC270C34966AAC50F10B4761A
example2.obj(example2)
 Error 42: Symbol Undefined _uiNewGrid
.dub\build\example2-debug-windows-x86-dmd_2076-2BF5EBEC270C34966AAC50F10B4761A
example2.obj(example2)
 Error 42: Symbol Undefined _uiGridAppend
.dub\build\example2-debug-windows-x86-dmd_2076-2BF5EBEC270C34966AAC50F10B4761A
example2.obj(example2)
 Error 42: Symbol Undefined _uiGridInsertAt


can't run libuid examples

2017-12-21 Thread greatsam4sure via Digitalmars-d-learn
I am having problem with running the examples of libuid on 
Windows and how to use libuid on a project without errors. I am 
using dmd version 2.076




Re: floating point value rounded to 6digits

2017-09-19 Thread greatsam4sure via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 21:52:57 UTC, Ivan Kazmenko 
wrote:
On Tuesday, 19 September 2017 at 20:47:02 UTC, greatsam4sure 
wrote:

double  value = 20.89766554373733;
writeln(value);
//Output =20.8977

How do I output the whole value without using writfln,write or 
format. How do I change this default


The default when printing floating-point numbers is to show six 
most significant digits.
You can specify the formatting manually with writefln, for 
example,


writefln ("%.10f", value);

will print the value with 10 digits after the decimal point.
The writef/writefln function behaves much like printf in C.

See here for a reference on format strings:
https://dlang.org/library/std/format/formatted_write.html#format-string

Ivan Kazmenko.


I don't  want to use write,writefln or format. I just want to 
change the default


floating point value rounded to 6digits

2017-09-19 Thread greatsam4sure via Digitalmars-d-learn

double  value = 20.89766554373733;
writeln(value);
//Output =20.8977

How do I output the whole value without using writfln,write or 
format. How do I change this default


  1   2   >