Where do you test syntax of D regexp online?

2017-03-09 Thread Suliman via Digitalmars-d-learn
I wrote two regexp: auto inlineCodeBlock = regex("`(.*?)`"); // --> `(.*?)` auto bigCodeBlock = regex("/`{3}[\\s\\S]*?`{3}/g"); // --> `{3}[\s\S]*?`{3} First for for selection inline code block. Second for multi-line: #Header my

Question about vibe.conf file

2017-03-05 Thread Suliman via Digitalmars-d-learn
I had seen some mentions about `vibe.conf` file in vibed docs. But can't understand it's structure and find examples of it's usage.

Re: Can't rending DT template

2017-02-26 Thread Suliman via Digitalmars-d-learn
On Sunday, 26 February 2017 at 12:31:21 UTC, Suliman wrote: It's look like wrong error, because project is buildable. So I have only one question. Can I do response not in .dt, but in .html? It's seems that serveStaticFiles is only one normal way to get it work.

Re: Can't rending DT template

2017-02-26 Thread Suliman via Digitalmars-d-learn
It's look like wrong error, because project is buildable. So I have only one question. Can I do response not in .dt, but in .html?

Can't rending DT template

2017-02-26 Thread Suliman via Digitalmars-d-learn
I have this code: module pages; import vibe.d; import database; import vibe.web.web; class MyPages { @path("/page1") void getPage() { render!("home.dt"); } } The error: https://snag.gy/PtNeSs.jpg Error: template instance vibe.web.web.render!"home.dt".render!("pages",

Re: Vibe.d: Listening to port 8080 on external device doesn't work

2017-02-22 Thread Suliman via Digitalmars-d-learn
On Wednesday, 22 February 2017 at 00:38:30 UTC, aberba wrote: Using vibe.d, I bind to port 8080 at 127.0.0.1 but I can't access server on my phone through hotspot using the external IP from ip addr on Linux. But 127.0.0 running Apache server works. Don't if its vibe.d or OS (ubuntu 14.04)

Re: Multiplayer Game Project

2017-02-09 Thread Suliman via Digitalmars-d
Do you have skype? I familiar with vibed and vue.js

Static array size?

2017-02-09 Thread Suliman via Digitalmars-d-learn
Docs says that: "The total size of a static array cannot exceed 16Mb." But when I am creation array of: int [1000_000] x; // 1000_000 is equal ~ 0,95MB app crush on start. Should it's reserve this memory with guaranty? I mean that after app start it should take +0.95MB of RAM in task manager.

Re: mysql-native: preview3 (docs)

2017-02-07 Thread Suliman via Digitalmars-d-announce
@Nick, could you explain how connection working if I am close it after opening and only then do request to DB. See comments on SO.

Re: mysql-native: preview3 (docs)

2017-02-06 Thread Suliman via Digitalmars-d-announce
On Monday, 6 February 2017 at 20:32:24 UTC, Nick Sabalausky wrote: https://github.com/Abscissa/mysql-native-experimental Tag: v0.2.0-preview3 Just a few doc updates this time: - Docs now include the `mysql.db.MysqlDB` to `mysql.pool.MySqlPool` change from preview2 - Clarified "Prepared" vs

Re: The reason of vibed slow down (request timeout)

2017-02-04 Thread Suliman via Digitalmars-d-learn
On Friday, 3 February 2017 at 07:44:15 UTC, crimaniak wrote: On Friday, 3 February 2017 at 06:46:37 UTC, Suliman wrote: If I open it's from VPS (as localhost:8080) it's work same as from Internet (no do not open at all). If problem is reproducible on localhost - very good, just debug it. If

Re: Fiber overhead

2017-02-04 Thread Suliman via Digitalmars-d-learn
On Saturday, 4 February 2017 at 06:54:01 UTC, Ali Çehreli wrote: On 02/03/2017 08:47 PM, Profile Anaysis wrote: What is the overhead of using a fiber? The performance overhead of call() and yield() are comparable to function calls because it's simply a few register assignments in each case.

The reason of vibed slow down (request timeout)

2017-02-02 Thread Suliman via Digitalmars-d-learn
I have simple web-app. Server part is based on vibed http://194.87.235.42:8080/ I can't understand the reason of issue. after some days of work when I trying to open it in web-browser it's begin opening very slooowly, or like now does not opens at all. On mobile web-browser I am getting

Re: mysql-native: preview2

2017-02-02 Thread Suliman via Digitalmars-d-announce
On Thursday, 2 February 2017 at 22:59:38 UTC, Nick Sabalausky wrote: On 02/02/2017 09:46 AM, Suliman wrote: Could you explain real case if rangification of ResultSet http://semitwist.com/mysql-native-docs/v0.2.0-preview1/mysql/result/ResultSet.html Does it's mean that I can write

Re: mysql-native: preview2

2017-02-02 Thread Suliman via Digitalmars-d-announce
On Thursday, 2 February 2017 at 14:08:19 UTC, Steven Schveighoffer wrote: On 2/2/17 1:50 AM, Suliman wrote: On Thursday, 2 February 2017 at 05:28:10 UTC, Nick Sabalausky wrote: Made a couple more long-needed changes while I'm at it: https://github.com/Abscissa/mysql-native-experimental Tag:

Re: mysql-native: API Refresh RC

2017-02-02 Thread Suliman via Digitalmars-d-announce
ResultSet querySet(Connection conn, string sql, ColumnSpecialization[] csa = null) Could you explain last parameter? `ColumnSpecialization[] csa = null`. I can't understand how to use it. Could you give me your skype? Also I think it's better to remove old deprecated methods at all,

Re: mysql-native: API Refresh RC

2017-02-02 Thread Suliman via Digitalmars-d-announce
On Thursday, 2 February 2017 at 04:04:15 UTC, Nick Sabalausky wrote: On 02/01/2017 01:54 PM, Suliman wrote: Also I can't understand what is SQL Command and what exec is doing if it's returning ulong? "struct Command" should not be used. It is old, and a bad design. This new release

Re: mysql-native: API Refresh RC

2017-02-02 Thread Suliman via Digitalmars-d-announce
mydb.lockConnection() does create a new connection if it needs to. And that WILL throw an exception if there's a problem connecting to the DB server. So your code above WILL catch an exception if the connection information (server address/port/login/etc) is wrong. But it does not. I am

Re: mysql-native: preview2

2017-02-01 Thread Suliman via Digitalmars-d-announce
On Thursday, 2 February 2017 at 06:50:34 UTC, Suliman wrote: On Thursday, 2 February 2017 at 05:28:10 UTC, Nick Sabalausky wrote: Made a couple more long-needed changes while I'm at it: https://github.com/Abscissa/mysql-native-experimental Tag: v0.2.0-preview2 - For better clarity, renamed

Re: mysql-native: preview2

2017-02-01 Thread Suliman via Digitalmars-d-announce
On Thursday, 2 February 2017 at 05:28:10 UTC, Nick Sabalausky wrote: Made a couple more long-needed changes while I'm at it: https://github.com/Abscissa/mysql-native-experimental Tag: v0.2.0-preview2 - For better clarity, renamed `mysql.db.MysqlDB` to `mysql.pool.MySqlPool`. - Package

Re: mysql-native: API Refresh RC

2017-02-01 Thread Suliman via Digitalmars-d-announce
Also I can't understand what is SQL Command and what exec is doing if it's returning ulong?

Re: mysql-native: API Refresh RC

2017-02-01 Thread Suliman via Digitalmars-d-announce
On Wednesday, 1 February 2017 at 14:06:39 UTC, Suliman wrote: Am I right understand that Connection instance should created at constructor and be one single for all class (and it will be reused by fibers) or am I wrong? If yes, where I should to close it? To put scope(exit) c.close(); In

Re: mysql-native: API Refresh RC

2017-02-01 Thread Suliman via Digitalmars-d-announce
Am I right understand that Connection instance should created at constructor and be one single for all class (and it will be reused by fibers) or am I wrong? If yes, where I should to close it? To put scope(exit) c.close(); In destructor? If yes, does it behavior should be same as for

Re: Convert struct to set of fields and pass it's to constructor

2017-02-01 Thread Suliman via Digitalmars-d-learn
On Wednesday, 1 February 2017 at 13:51:28 UTC, Minty Fresh wrote: On Wednesday, 1 February 2017 at 13:37:27 UTC, Suliman wrote: Class constructor accept only set if fields like this(string login, string pass) Can I create structure, fill it, and than pass to constructor? Like this: ``` import

Convert struct to set of fields and pass it's to constructor

2017-02-01 Thread Suliman via Digitalmars-d-learn
Class constructor accept only set if fields like this(string login, string pass) Can I create structure, fill it, and than pass to constructor? Like this: ``` import std.stdio; struct ConnectSettings { string login; string pass; }; ConnectSettings cs; void main() { cs.login =

Re: Can't find the reason of issue: "std.file.FileException@std\file.d(360): path/to/file.conf:"

2017-02-01 Thread Suliman via Digitalmars-d-learn
Not even issue, but unhandled exception when access to nonexistent file.

Re: Can't find the reason of issue: "std.file.FileException@std\file.d(360): path/to/file.conf:"

2017-02-01 Thread Suliman via Digitalmars-d-learn
On Wednesday, 1 February 2017 at 11:39:46 UTC, Suliman wrote: Full error log: 0x00580A4D in @trusted bool std.file.cenforce!(bool).cenforce(bool, const(char)[], const(wchar)*, immutable(char)[], uint) 0x00412AB6 in @safe void[] std.file.read!(immutable(char)[]).read(immutable(char)[], uint)

Re: Can't find the reason of issue: "std.file.FileException@std\file.d(360): path/to/file.conf:"

2017-02-01 Thread Suliman via Digitalmars-d-learn
Full error log: 0x00580A4D in @trusted bool std.file.cenforce!(bool).cenforce(bool, const(char)[], const(wchar)*, immutable(char)[], uint) 0x00412AB6 in @safe void[] std.file.read!(immutable(char)[]).read(immutable(char)[], uint) at C:\D\dmd2\windows\bin\..\..\src\phobos\std\file.d(229)

Can't find the reason of issue: "std.file.FileException@std\file.d(360): path/to/file.conf:"

2017-02-01 Thread Suliman via Digitalmars-d-learn
After building vibed project and running it I am getting error: "std.file.FileException@std\file.d(360): path/to/file.conf: Системе не удается найти указанный путь." (System can't find selected path) I even do not understand where is the error... It's do not seems that it's vibed issue.

Re: mysql-native: API Refresh RC

2017-02-01 Thread Suliman via Digitalmars-d-announce
Plz update dub package on code.dlang.org

Re: Why fatal log throw object.Error@(0) on console?

2017-01-30 Thread Suliman via Digitalmars-d-learn
I found in the docs mention "If data is logged with LogLevel fatal by default an Error will be thrown.". But what the reason of such behavior?

Why fatal log throw object.Error@(0) on console?

2017-01-30 Thread Suliman via Digitalmars-d-learn
import std.stdio; import std.experimental.logger; void main() { sharedLog = new FileLogger("New_Default_Log_File.log"); fatal("Fatal error: "); } All other log-levels write as expected log files, but `fatal` throw on console: app.exe object.Error@(0): A fatal log message

When I should create structures with new keywords?

2017-01-26 Thread Suliman via Digitalmars-d-learn
In the past I asked Adam about when I should use keyword `new` with structures and got next answer: "The File in the first one is put on the stack as a reference counted local object whereas the second one would be on the garbage collected heap, which often isn't what you want for files since

Re: Bug in documentation or misunderstanding it?

2017-01-26 Thread Suliman via Digitalmars-d-learn
On Thursday, 26 January 2017 at 18:42:29 UTC, Suliman wrote: On Thursday, 26 January 2017 at 17:52:24 UTC, H. S. Teoh wrote: On Thu, Jan 26, 2017 at 05:38:59PM +, Suliman via Digitalmars-d-learn wrote: I read docs and can't understand what's wrong. Or I am do not understand

Re: Bug in documentation or misunderstanding it?

2017-01-26 Thread Suliman via Digitalmars-d-learn
On Thursday, 26 January 2017 at 17:52:24 UTC, H. S. Teoh wrote: On Thu, Jan 26, 2017 at 05:38:59PM +, Suliman via Digitalmars-d-learn wrote: I read docs and can't understand what's wrong. Or I am do not understand it, or there is come mistake. Let's look at function https://dlang.org

Bug in documentation or misunderstanding it?

2017-01-26 Thread Suliman via Digitalmars-d-learn
I read docs and can't understand what's wrong. Or I am do not understand it, or there is come mistake. Let's look at function https://dlang.org/phobos/std_stdio.html#.File.byLine auto byLine(Terminator = char, Char = char)(KeepTerminator keepTerminator = No.keepTerminator, Terminator

Re: module std.stream is deprecated - Will be removed by phobos version 2.070

2017-01-23 Thread Suliman via Digitalmars-d
On Monday, 23 January 2017 at 17:39:00 UTC, ixid wrote: On Friday, 11 September 2015 at 21:16:06 UTC, Brian Schott wrote: On Friday, 11 September 2015 at 20:29:56 UTC, Vladimir Panteleev wrote: Apparently it was decided at DConf 2015 to remove std.stream and friends from Phobos. Kill it with

Re: Can't understand if deallocation happens?

2017-01-22 Thread Suliman via Digitalmars-d-learn
You have *two* distinct strings here. Yes, I understand, I am trying to find out how it's work on low level. Any ideas why zero is used?

Re: Can't understand if deallocation happens?

2017-01-22 Thread Suliman via Digitalmars-d-learn
On Sunday, 22 January 2017 at 15:51:01 UTC, Suliman wrote: string str = "abc"; writeln(str.ptr); str = "def"; writeln("last data: ", *(str.ptr)); writeln("old data: ", *(str.ptr-1)); // print nothing writeln("old data: ", *(str.ptr-2)); // print c

Re: Can't understand if deallocation happens?

2017-01-22 Thread Suliman via Digitalmars-d-learn
string str = "abc"; writeln(str.ptr); str = "def"; writeln("last data: ", *(str.ptr)); writeln("old data: ", *(str.ptr-1)); // print nothing writeln("old data: ", *(str.ptr-2)); // print c It's look like that there is some gap between data, because

Re: Can't understand if deallocation happens?

2017-01-22 Thread Suliman via Digitalmars-d-learn
Supported answer: you don't, it has infinite lifetime and you're claiming it is immutable, but then trying to pull the memory out from under it! The supported solution is simply to let the garbage collector manage it. But.. //GC.free(str_ptr.ptr); // Error: function core.memory.GC.free

Re: Can't understand if deallocation happens?

2017-01-22 Thread Suliman via Digitalmars-d-learn
str_ptr.ptr returns exactly the same thing as str.ptr or (*str_ptr).ptr, a pointer to the contents. When you write str_ptr, you print the pointer to the container. So str.ptr is just shortcut? Ok, but how to free memory from first located value (from `aaa`)? I changed my code to next:

Re: Can't understand if deallocation happens?

2017-01-22 Thread Suliman via Digitalmars-d-learn
You do not append to anything, only overwrite it. There is no reallocation because "aaa".length == "bbb".length. I changed my code to: str_ptr.length +=1; str[] = ""[]; But now it's print length 4 before and after writing "bbb" to `str`. I expected that size will be 3+4=7.

Re: Release Candidate 2.073.0-rc1

2017-01-20 Thread Suliman via Digitalmars-d-announce
If you just want a single executable, the default (libcmt) is good enough. It adds the C runtime as a static library in the link step. I already tried it, but app is still require msvcr120.dll when run it's on another PC.

Re: Release Candidate 2.073.0-rc1

2017-01-19 Thread Suliman via Digitalmars-d-announce
On Thursday, 19 January 2017 at 19:22:07 UTC, Rainer Schuetze wrote: On 19.01.2017 08:32, Suliman wrote: http://dlang.org/changelog/2.073.0.html#mscrtlib-option How can I set this flag in dub.json? I tried: "dflags": [ "-mscrt=msvcrt" ] but got error: Error: unrecognized switch

Re: What do you use to generate documentation?

2017-01-19 Thread Suliman via Digitalmars-d-learn
On Thursday, 19 January 2017 at 18:09:20 UTC, Basile B. wrote: On Thursday, 19 January 2017 at 15:20:37 UTC, Suliman wrote: What do dflag: `-c do not link`. Should I pass it during the generation of the docs? dub is append it's automatically, but if I want to generate new docs every rebuild of

Re: What do you use to generate documentation?

2017-01-19 Thread Suliman via Digitalmars-d-learn
What do dflag: `-c do not link`. Should I pass it during the generation of the docs? dub is append it's automatically, but if I want to generate new docs every rebuild of app what is the reason to use this flag?

Re: Release Candidate 2.073.0-rc1

2017-01-18 Thread Suliman via Digitalmars-d-announce
On Wednesday, 18 January 2017 at 13:48:06 UTC, Martin Nowak wrote: First release candidate for 2.073.0. http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.073.0.html Comes with a couple of more fixes: https://github.com/dlang/dmd/compare/v2.073.0-b2...v2.073.0-rc1

Re: Why my app require MSVCR120.dll?

2017-01-18 Thread Suliman via Digitalmars-d-learn
On Wednesday, 18 January 2017 at 09:54:43 UTC, Suliman wrote: On Friday, 6 November 2015 at 18:34:45 UTC, Cauterite wrote: On Friday, 6 November 2015 at 13:16:46 UTC, Suliman wrote: On Windows 7 it's work fine. On Windows 10 (clean install) it's do not start and require MSVCR120.dll D

Re: Why my app require MSVCR120.dll?

2017-01-18 Thread Suliman via Digitalmars-d-learn
On Friday, 6 November 2015 at 18:34:45 UTC, Cauterite wrote: On Friday, 6 November 2015 at 13:16:46 UTC, Suliman wrote: On Windows 7 it's work fine. On Windows 10 (clean install) it's do not start and require MSVCR120.dll D doesn't make particularly heavy use of the C runtime, so there's a

Re: Lets talk about fibers

2017-01-08 Thread Suliman via Digitalmars-d
"The type of concurrency used when logical threads are created is determined by the Scheduler selected at initialization time. The default behavior is currently to create a new kernel thread per call to spawn, but other schedulers are available that multiplex fibers across the main thread or

Re: Lets talk about fibers

2017-01-08 Thread Suliman via Digitalmars-d
Simply picking a worker thread + worker fiber when task is assigned and sticking to it until finished should work good enough. It is also important to note though that "fiber" is not the same as "task". Former is execution context primitive, latter is scheduling abstraction. In fact, heavy

Re: How to detect free/unfree memory segments?

2016-12-23 Thread Suliman via Digitalmars-d-learn
On Saturday, 24 December 2016 at 01:15:43 UTC, jkpl wrote: On Friday, 23 December 2016 at 06:18:02 UTC, Suliman wrote: I would like to visualize how GC works and display free/not free memory segments. How I can understand which of them are used and which not? Could anybody explain what

Re: D future ...

2016-12-19 Thread Suliman via Digitalmars-d
The whole focus on C++ people marketing is simply wrong! Every time this gets mentioned in external forums, the language gets a pounding by people with the same argumentation. Why go for D when C++ 20xx version does it also. +100 I totally agree with another part of post. Plus the docs is

Re: Linux Kernel in D?

2016-12-17 Thread Suliman via Digitalmars-d
On Friday, 16 December 2016 at 16:12:38 UTC, D.Rex wrote: A D port of the Linux Kernel? https://github.com/whatsthisnow/ProjectD Any thoughts on the project? Linux is too bloated and there is no any reasons to re-implement it.

Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-14 Thread Suliman via Digitalmars-d
On Wednesday, 14 December 2016 at 07:17:57 UTC, Jacob Carlborg wrote: On 2016-12-14 03:23, Andrei Alexandrescu wrote: On 12/13/16 9:22 PM, Hatem Oraby wrote: with(import std.range) bool equal(R1, R2) if (isInputRange!R1 && isInputRange!R2) { ... } I considered this, then figured with is

Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-13 Thread Suliman via Digitalmars-d
On Tuesday, 13 December 2016 at 22:33:24 UTC, Andrei Alexandrescu wrote: Destroy. https://github.com/dlang/DIPs/pull/51/files Imho such syntaxis construction make language harder to learn. D is already pretty complex, but DIPs should simplify language, but do not make its harder

Re: [OT] Is there anybody from D-community in Tel Aviv?

2016-12-11 Thread Suliman via Digitalmars-d
On Sunday, 11 December 2016 at 11:37:39 UTC, Shachar Shemesh wrote: On 11/12/16 12:02, Suliman wrote: On Saturday, 10 December 2016 at 08:10:46 UTC, Shachar Shemesh wrote: On 10/12/16 09:25, Suliman wrote: I plan to visit Tel Aviv from 31 December to 6-th of January of next year. Is there

Re: [OT] Is there anybody from D-community in Tel Aviv?

2016-12-11 Thread Suliman via Digitalmars-d
On Saturday, 10 December 2016 at 08:10:46 UTC, Shachar Shemesh wrote: On 10/12/16 09:25, Suliman wrote: I plan to visit Tel Aviv from 31 December to 6-th of January of next year. Is there anybody who take part in D-community there? There are about 30 D programmers in the Weka.io offices in

Re: [OT] Is there anybody from D-community in Tel Aviv?

2016-12-10 Thread Suliman via Digitalmars-d
On Saturday, 10 December 2016 at 08:10:46 UTC, Shachar Shemesh wrote: On 10/12/16 09:25, Suliman wrote: I plan to visit Tel Aviv from 31 December to 6-th of January of next year. Is there anybody who take part in D-community there? There are about 30 D programmers in the Weka.io offices in

function is not callable using argument types ()

2016-12-10 Thread Suliman via Digitalmars-d-learn
import std.stdio; import std.concurrency; void main() { void sp(int i) { receive((int i) { writeln("i: ", i); }); } auto r = new Generator!int( { foreach(i; 1 .. 10) yield(i); });

[OT] Is there anybody from D-community in Tel Aviv?

2016-12-09 Thread Suliman via Digitalmars-d
I plan to visit Tel Aviv from 31 December to 6-th of January of next year. Is there anybody who take part in D-community there?

Re: Using the result of a comma expression is deprecated

2016-11-27 Thread Suliman via Digitalmars-d-learn
As an aside, for security reasons you should use a prepared statement. Even if it's server-side code and there is no any iteration with user data (they come as JSON) Also, this is a decent usecase for scope(exit) but it should be put earlier in the function. Am I right understand that

Re: Using the result of a comma expression is deprecated

2016-11-27 Thread Suliman via Digitalmars-d-learn
Looks like you forgot a call to format before the opening parenthesis. should be: string sqlinsert = format(`INSERT INTO usersshapes (userlogin, uploading_date, geometry_type, data) VALUES ('%s', '%s', '%s', '%s') `, login, uploading_date, geometry_type, data); because what ends up happening

Re: Using the result of a comma expression is deprecated

2016-11-27 Thread Suliman via Digitalmars-d-learn
On Sunday, 27 November 2016 at 11:21:58 UTC, drug007 wrote: On 27.11.2016 14:07, Suliman wrote: I am getting deprecation message: "Using the result of a comma expression is deprecated" on this code: string sqlinsert = (`INSERT INTO usersshapes (userlogin, uploading_date, geometry_type,

Using the result of a comma expression is deprecated

2016-11-27 Thread Suliman via Digitalmars-d-learn
I am getting deprecation message: "Using the result of a comma expression is deprecated" on this code: string sqlinsert = (`INSERT INTO usersshapes (userlogin, uploading_date, geometry_type, data) VALUES ('%s', '%s', '%s', '%s') `, login, uploading_date, geometry_type, data); What's wrong

Re: Why some function are class-less?

2016-11-17 Thread Suliman via Digitalmars-d-learn
On Thursday, 17 November 2016 at 18:02:02 UTC, Jesse Phillips wrote: On Thursday, 17 November 2016 at 17:54:23 UTC, Suliman wrote: Ok, but when the logger class may be more helpful that function usage? You'd use the logger class when you need to make customizations or have multiple logging

Re: Why some function are class-less?

2016-11-17 Thread Suliman via Digitalmars-d-learn
On Thursday, 17 November 2016 at 17:45:31 UTC, Stefan Koch wrote: On Thursday, 17 November 2016 at 17:42:44 UTC, Suliman wrote: On Thursday, 17 November 2016 at 16:46:37 UTC, Steven Schveighoffer wrote: On 11/17/16 11:28 AM, Suliman wrote: [...] D does not require classes to write

Re: Why some function are class-less?

2016-11-17 Thread Suliman via Digitalmars-d-learn
On Thursday, 17 November 2016 at 16:46:37 UTC, Steven Schveighoffer wrote: On 11/17/16 11:28 AM, Suliman wrote: There is some functions that can be called without creation of class. For example: http://vibed.org/api/vibe.core.log/ As I understand I can create write log in two way. First

Why some function are class-less?

2016-11-17 Thread Suliman via Digitalmars-d-learn
There is some functions that can be called without creation of class. For example: http://vibed.org/api/vibe.core.log/ As I understand I can create write log in two way. First create instance of Logger, second simply call function. Why it's done so? Just as shortcut? But is I create class

Re: Earthquakes - New Zealand

2016-11-14 Thread Suliman via Digitalmars-d
On Monday, 14 November 2016 at 09:09:59 UTC, Paolo Invernizzi wrote: On Sunday, 13 November 2016 at 18:03:59 UTC, Suliman wrote: On Sunday, 13 November 2016 at 12:17:22 UTC, rikki cattermole But it's very interesting that right now I am doing portal about Earthquakes on D. It's now not ready

Re: Earthquakes - New Zealand

2016-11-13 Thread Suliman via Digitalmars-d
On Sunday, 13 November 2016 at 12:17:22 UTC, rikki cattermole wrote: Hello everyone! So to summarize New Zealand right now is being hit with some major earthquakes. But don't fret, I'm ok. There is a couple of other members in NZ, so please do let us know that you're safe! Now, for W, is

Re: SecureD - A simple cryptography library for D

2016-11-13 Thread Suliman via Digitalmars-d-announce
It would take some research, but the native Botan library makes heavy use of C++ templates There is native lib https://github.com/etcimon/botan Some people with whom I talked said that botan is too low level for them and it's hard for them to use it. So your lib maybe very good wrap on top of

Re: SecureD - A simple cryptography library for D

2016-11-12 Thread Suliman via Digitalmars-d-announce
Is its possible to make its wrap on botan instead of openssl? Some of developers have problems with openssl because it's require openssl lib. But botan is more native but much more lowlevel. So its hard to use.

Add format future to Phobos date time

2016-11-10 Thread Suliman via Digitalmars-d
Date formating is very common operation. Is it's possible to add this future to Phobos datetime module? There is already external lib https://github.com/cmays90/datetimeformat but I think that is's much better to have in base lib.

Re: libcurl

2016-10-21 Thread Suliman via Digitalmars-d
On Saturday, 22 October 2016 at 01:20:52 UTC, Andrei Alexandrescu wrote: Guess we need to get ready! https://curl.haxx.se/mail/lib-2016-10/0076.html -- Andrei I think that it much better to force https://github.com/ikod/dlang-requests developing its much easier than curl and its native

Re: scone 1.2.0

2016-10-11 Thread Suliman via Digitalmars-d-announce
On Monday, 10 October 2016 at 19:50:53 UTC, vladdeSV wrote: scone, Simple CONsole Engine, version 1.2.0 has just been released! https://github.com/vladdeSV/scone/releases/tag/v1.2.0 This version includes a restructure of the whole project (should not affect applications), and the addition of

Re: code-d 0.12.0 - The user friendly release (code-d for noobs)

2016-10-04 Thread Suliman via Digitalmars-d-announce
Please, add Sublime support

Re: [GSoC] std.experimental.xml is now a PR!

2016-10-02 Thread Suliman via Digitalmars-d-announce
On Sunday, 28 August 2016 at 06:28:35 UTC, NVolcz wrote: On Wednesday, 24 August 2016 at 09:31:44 UTC, Lodovico Giaretta wrote: Hi! I'm pleased to announce that my GSoC project, a replacement for the outdated std.xml, is now a Phobos PR! [1] It is an (almost complete) mirror of my repository

Re: Beta 2.072.0-b1

2016-10-02 Thread Suliman via Digitalmars-d-announce
On Saturday, 1 October 2016 at 20:57:17 UTC, Martin Nowak wrote: First beta for the 2.072.0 release. This release comes with many new phobos features, native TLS support on OSX, the first bunch of @safety enhancements (try -transition=safe), and a few smaller language and compiler additions.

Re: Question about __treats

2016-09-21 Thread Suliman via Digitalmars-d-learn
On Wednesday, 21 September 2016 at 07:09:01 UTC, rikki cattermole wrote: On 21/09/2016 7:06 PM, Suliman wrote: It's seems that __treats is language keyword that help to get info from compile-time. But there is also lib named std.traits and I can't understand difference

Question about __treats

2016-09-21 Thread Suliman via Digitalmars-d-learn
It's seems that __treats is language keyword that help to get info from compile-time. But there is also lib named std.traits and I can't understand difference https://dlang.org/spec/traits.html https://dlang.org/phobos/std_traits.html Could you explain the difference?

Re: dub: how to update package?

2016-09-17 Thread Suliman via Digitalmars-d-learn
On Saturday, 17 September 2016 at 07:25:29 UTC, Intersteller wrote: I have a dub project, is there a way to update to get the latest package? dub upgrade

Re: I hate new DUB config format

2016-09-14 Thread Suliman via Digitalmars-d
Sönke Ludwig, really sorry. It's look my big mistake. I looked at SDL more detail, and this format is much better than JSON. I hope a lot of people is changed their position too.

Re: workspace-d 2.7.2 & code-d 0.10.14

2016-09-08 Thread Suliman via Digitalmars-d-announce
On Wednesday, 7 September 2016 at 18:27:41 UTC, WebFreak001 wrote: On Wednesday, 7 September 2016 at 18:14:29 UTC, Suliman wrote: You could look my PC with TeamViewer Ok problem fixed. The config was invalid, it needs to look like this: { "d.stdlibPath": [

Re: workspace-d 2.7.2 & code-d 0.10.14

2016-09-07 Thread Suliman via Digitalmars-d-announce
On Wednesday, 7 September 2016 at 18:10:23 UTC, WebFreak001 wrote: On Wednesday, 7 September 2016 at 18:09:23 UTC, Suliman wrote: On Wednesday, 7 September 2016 at 18:08:14 UTC, Suliman wrote: If open working folder: https://snag.gy/MnTJtB.jpg https://snag.gy/5r2REm.jpg it should work now

Re: workspace-d 2.7.2 & code-d 0.10.14

2016-09-07 Thread Suliman via Digitalmars-d-announce
On Wednesday, 7 September 2016 at 18:08:14 UTC, Suliman wrote: If open working folder: https://snag.gy/MnTJtB.jpg https://snag.gy/5r2REm.jpg

Re: workspace-d 2.7.2 & code-d 0.10.14

2016-09-07 Thread Suliman via Digitalmars-d-announce
If open working folder: https://snag.gy/MnTJtB.jpg

Re: workspace-d 2.7.2 & code-d 0.10.14

2016-09-07 Thread Suliman via Digitalmars-d-announce
On Wednesday, 7 September 2016 at 18:00:45 UTC, WebFreak001 wrote: On Wednesday, 7 September 2016 at 17:55:59 UTC, Suliman wrote: Sorry, I do not understand what do you mean? Clean solution with empty project? And what part? Just screenshot of main window? Ctrl-Shift-P -> Toggle Developer

Re: workspace-d 2.7.2 & code-d 0.10.14

2016-09-07 Thread Suliman via Digitalmars-d-announce
On Wednesday, 7 September 2016 at 17:26:04 UTC, WebFreak001 wrote: On Wednesday, 7 September 2016 at 17:24:45 UTC, Suliman wrote: On Wednesday, 7 September 2016 at 17:21:17 UTC, Suliman wrote: On Wednesday, 7 September 2016 at 17:08:36 UTC, Suliman wrote: "d.stdlibPath": [

Re: workspace-d 2.7.2 & code-d 0.10.14

2016-09-07 Thread Suliman via Digitalmars-d-announce
On Wednesday, 7 September 2016 at 17:21:17 UTC, Suliman wrote: On Wednesday, 7 September 2016 at 17:08:36 UTC, Suliman wrote: "d.stdlibPath": [ "C:\\D\\dmd2\\src\\phobos", "C:\\D\\dmd2\\src\\druntime\\import" ] I check path, look like this is correct (al lst they are exists). But I still

Re: workspace-d 2.7.2 & code-d 0.10.14

2016-09-07 Thread Suliman via Digitalmars-d-announce
On Wednesday, 7 September 2016 at 17:08:36 UTC, Suliman wrote: "d.stdlibPath": [ "C:\\D\\dmd2\\src\\phobos", "C:\\D\\dmd2\\src\\druntime\\import" ] I check path, look like this is correct (al lst they are exists). But I still do not getting surrestion for import like std. and for any

Re: workspace-d 2.7.2 & code-d 0.10.14

2016-09-07 Thread Suliman via Digitalmars-d-announce
"d.stdlibPath": [ "C:\\D\\dmd2\\src\\phobos", "C:\\D\\dmd2\\src\\druntime\\import" ] I check path, look like this is correct (al lst they are exists). But I still do not getting surrestion for import like std. and for any Phobos functions like writeln etc

Re: workspace-d 2.7.2 & code-d 0.10.14

2016-09-07 Thread Suliman via Digitalmars-d-announce
And to get the visual studio code extension, simply search for `code-d` in >the extensions manager. It will pop up as `D Programming Language (code-d)` So to get it work I should place dcd-client.exe dcd-server.exe dscanner.exe and workspace-d.exe in dir that set in PATH (for me it's

How it's better to store data from DB?

2016-09-05 Thread Suliman via Digitalmars-d-learn
Usually I am storing daba from DB as array of structures. Something like: struct MyData { int id; string name; int age; } MyData mydata; Then I am creating array of structures: MyData [] mydatas; And fill data in my code. Then append it to `mydatas` to get it iterable. But is it's

Re: Beta release vibe.d 0.7.30-beta.1

2016-09-01 Thread Suliman via Digitalmars-d-announce
On Thursday, 1 September 2016 at 07:32:43 UTC, Sönke Ludwig wrote: Am 31.08.2016 um 16:56 schrieb Martin Tschierschke: On Wednesday, 31 August 2016 at 09:00:47 UTC, Sönke Ludwig wrote: Am 31.08.2016 um 10:57 schrieb Sönke Ludwig: [...] All changes:

Re: Do we need a FAQ page?

2016-08-29 Thread Suliman via Digitalmars-d
I already wrote one alternative version. Dlang.ru is down, but on page there is germany translation version http://forum.dlang.org/thread/vxmieatguqfkwgzli...@forum.dlang.org

D-ideas collection

2016-08-27 Thread Suliman via Digitalmars-d
We already have DIPs, but I think we should have place for collecting good ideas that can be integrated in D. Most people from here prefer posting it's on forum, but such topics (like ideas from new version of C#) is go down in few days. Fro example now I read about interesting future in

Re: Few questions about concurrency

2016-08-27 Thread Suliman via Digitalmars-d-learn
Message passing is an alternative to relying on globals + mutex's. In the end its implemented by a global + stack FIFO (mailbox). Where it's better? Could you give an example? Ring transition e.g. system calls are not all that expensive. Its what the kernel does with that system call that is

Few questions about concurrency

2016-08-27 Thread Suliman via Digitalmars-d-learn
Hello! I am still attempt to better understand how concurrency works. I read a lot of info but still misunderstood some key-points. Here is my thought about it and questions: 1. There is OS threads. Context-switching is very expensive because during it we should to save ALL CPU registers to

<    1   2   3   4   5   6   7   8   9   >