threads, fibers and GPU kernels

2017-08-07 Thread Suliman via Digitalmars-d
Modern GPU have thousands of GPU kernels, it's far from CPU kernels, but it's interesting for me is there any chance that in future they be used in same maner as CPU kernels? If yes is there any reasons of exit for fibers? Or it would be easier to map one thread to one kernel? On system with

Re: Visual Studio Code code-d serve-d beta release

2017-08-06 Thread Suliman via Digitalmars-d-announce
Could anybody make Sublime plugin please?

Re: dlang-requetst: openssl 1.1 compatible release

2017-08-03 Thread Suliman via Digitalmars-d-announce
Moving any third party code to std library have both "pro" and "contra" and it was discussed several times. From my point of view there is nothing wrong with modules outside of std library as long as these modules are visible to newcomers, well documented and have developer support. HTTP

Re: dlang-requetst: openssl 1.1 compatible release

2017-08-03 Thread Suliman via Digitalmars-d-announce
On Thursday, 3 August 2017 at 10:02:24 UTC, Temtaime wrote: On Thursday, 3 August 2017 at 09:57:11 UTC, Suliman wrote: On Thursday, 3 August 2017 at 06:33:38 UTC, ikod wrote: Hello, Since version 0.5.0 dlang-requests has become compatible with both 1.0.x and 1.1.x versions of openssl

Re: dlang-requetst: openssl 1.1 compatible release

2017-08-03 Thread Suliman via Digitalmars-d-announce
On Thursday, 3 August 2017 at 06:33:38 UTC, ikod wrote: Hello, Since version 0.5.0 dlang-requests has become compatible with both 1.0.x and 1.1.x versions of openssl library. Please try and report any issues on github. Thanks! dlang-requests is HTTP/FTP client library, inspired by

Redox + D

2017-07-26 Thread Suliman via Digitalmars-d
I think most of people have heard about https://redox-os.org It is pretty modern micro-kernel OS written in Rust. I am not Rust fan, but if it solve some low-level task and allow to build on top of it more hight-level tools why not to use it? Now it have port of GCC, Python and some other

Why D have two function contains and canFind?

2017-07-24 Thread Suliman via Digitalmars-d-learn
Why D have two function `contains` and `canFind` if C# have only contains and it's enough?

Re: How to replace pairs tags with regexp

2017-07-21 Thread Suliman via Digitalmars-d-learn
On Friday, 21 July 2017 at 07:30:07 UTC, Antonio Corbi wrote: On Friday, 21 July 2017 at 07:08:34 UTC, Suliman wrote: On Friday, 21 July 2017 at 06:19:43 UTC, Suliman wrote: There reason of issue above is spaces before "#". What wrong with next regex https://dpaste.dzfl.pl/024a47ed2a56 I

Re: How to replace pairs tags with regexp

2017-07-21 Thread Suliman via Digitalmars-d-learn
On Friday, 21 July 2017 at 06:19:43 UTC, Suliman wrote: There reason of issue above is spaces before "#". What wrong with next regex https://dpaste.dzfl.pl/024a47ed2a56 I expect that it will select: #Header my header text ##SubHeader my sub header text Because: ^#{3}

Re: How to replace pairs tags with regexp

2017-07-21 Thread Suliman via Digitalmars-d-learn
There reason of issue above is spaces before "#".

Re: How to replace pairs tags with regexp

2017-07-20 Thread Suliman via Digitalmars-d-learn
Ali Thanks! I opened answer form before you answered me!

Re: How to replace pairs tags with regexp

2017-07-20 Thread Suliman via Digitalmars-d-learn
Question above do not actual now. Now I have got next problem. import std.stdio; import std.regex; import std.file; void main() { auto text = "#Header my header text ##SubHeader my sub header text ###Sub3Header my sub 3 text #Header2 my header2 text";

How to replace pairs tags with regexp

2017-07-20 Thread Suliman via Digitalmars-d-learn
I have got next code: import std.stdio; import std.regex; import std.file; void main() { auto text = readText("book.txt"); auto inlineCodeBlock = regex("`([^`\n]+)`"); auto bigCodeBlock = regex(r"`{3}[\s\S]*?`{3}"); foreach(t;

Re: DMD library available as DUB package

2017-07-18 Thread Suliman via Digitalmars-d-announce
Could you explain where it can be helpful?

Re: Need help to get OpenSSL 64 work on Windows x64 | I hate D's GC!

2017-07-14 Thread Suliman via Digitalmars-d-learn
On Friday, 14 July 2017 at 14:50:04 UTC, bauss wrote: On Friday, 14 July 2017 at 13:16:17 UTC, Suliman wrote: It's look that GC in D is really suxx. There is already second toy-project where I am getting stuck on Windows with D for last 3 month. I'm using 32-bit build, because I can't

Need help to get OpenSSL 64 work on Windows x64 | I hate D's GC!

2017-07-14 Thread Suliman via Digitalmars-d-learn
It's look that GC in D is really suxx. There is already second toy-project where I am getting stuck on Windows with D for last 3 month. I'm using 32-bit build, because I can't understand which libs I should use to get OpenSSL 64 bit work with dlang-request. 32-bit version compile and works

Re: How to add authentificaion method to request?

2017-07-12 Thread Suliman via Digitalmars-d-learn
Compiler require libssl32.dll for run dlang-request based app. Where I can get it? I installed, OpenSSL, but can't find this lib in C:\OpenSSL-Win64

How to add authentificaion method to request?

2017-07-11 Thread Suliman via Digitalmars-d-learn
I am using dlang-requests. I need authentificate on https://scihub.copernicus.eu/dhus/login and than do some data-parsing. MultipartForm form; form.add(formData("login_username", "Suliman")); form.add(formData("login_password", "123")); // changed auto content =

Re: Compile without generating code

2017-07-07 Thread Suliman via Digitalmars-d
On Wednesday, 5 July 2017 at 22:05:53 UTC, Stefan Koch wrote: On Wednesday, 5 July 2017 at 21:58:45 UTC, Lewis wrote: I was reading https://blog.rust-lang.org/2017/07/05/Rust-Roadmap-Update.html, which mentioned that the Rust compiler now has a mode to go through the motions of compiling and

Re: Diet template is crush

2017-06-28 Thread Suliman via Digitalmars-d-learn
It's look like issue in another part of code...

Diet template is crush

2017-06-28 Thread Suliman via Digitalmars-d-learn
I can't understand why follow code is crushing: string error = "503 Server error!"; int error_code = 503; res.render!("error.dt", error, error_code); on res string (last in code above) I am getting error: CoreTaskFiber was terminated unexpectedly: Access Violation error.dt

Re: past.code123.org new service for sharing D code.

2017-06-26 Thread Suliman via Digitalmars-d-announce
On Saturday, 24 June 2017 at 12:59:50 UTC, Suliman wrote: Sorry! Domain should be not `past` `but` `paste` http://paste.code123.org/ version 0.2 split-view support: http://paste.code123.org/86fc5ded-90e1 P.S. WIP

Re: past.code123.org new service for sharing D code.

2017-06-24 Thread Suliman via Digitalmars-d-announce
Sorry! Domain should be not `past` `but` `paste` http://paste.code123.org/

past.code123.org new service for sharing D code.

2017-06-23 Thread Suliman via Digitalmars-d-announce
http://past.code123.org/ I did small paste-bin service for sharing D code. Now it's deep alpha it's powered by vibed. It's simply works and nothing more. It's support basic syntax highlighting (after page refresh) for few language besides D. I hope to finish it in next few days, but you can

How to add class in DIET template

2017-06-23 Thread Suliman via Digitalmars-d-learn
I need to get external variable and make class by it's value - string mystr = "lng-" ~ language; - foreach(i, line; arrayOfLines ) li code.mystr #{line} I need to get HTML code like this: some D code But class name become "mystr" and I am getting: some D code How

Re: Isn't it about time for D3?

2017-06-18 Thread Suliman via Digitalmars-d
But C++ will still be big in 10 years. Ok, let's assume it will be poplar in 10 years. But it's very short time. D exists almost 17 years. And not every people need to interfacing with C/C++. For me it's more important to have static-typing and compilable alternative to Python. And a lot of

Re: Isn't it about time for D3?

2017-06-18 Thread Suliman via Digitalmars-d
Why for example not Rust (i am not its fan). I do not see any real perspective in C++. What to do in next 5 years if C++ will start loosing it's popularity? Implement D4? Plus any backwards compatibility make implementation new ideas in language very hard.

Re: Isn't it about time for D3?

2017-06-17 Thread Suliman via Digitalmars-d
On Saturday, 17 June 2017 at 04:32:41 UTC, Liam McGillivray wrote: On Wednesday, 14 June 2017 at 12:08:16 UTC, Mike wrote: > THINGS TO DROP -- * C++ interoperabiliy Walter's right: memory safety is going to kill C and C++ will go with it. Don't waste time on this; it's not going

Re: Replacing Make for the DMD build

2017-06-16 Thread Suliman via Digitalmars-d
Also looks good https://github.com/jasonwhite/button

Re: Isn't it about time for D3?

2017-06-15 Thread Suliman via Digitalmars-d
Should D really move to GC-free? I think there is already enough GC-free language on the market. D even now is very complected language, and adding ways to manually managing memory will make it's more complicated. A lot of people need more powerful static-typing alternative to Python/C# for

Re: Isn't it about time for D3?

2017-06-10 Thread Suliman via Digitalmars-d
There is already something like D3 exists. https://github.com/VoltLang

Re: How to cleanup array of structs?

2017-06-04 Thread Suliman via Digitalmars-d-learn
// Will reuse the array, overwriting existing data. // If other parts of the program are using existing data // in the array, this will lead to hard-to-track-down bugs. mytracks.length = 0; mytracks.assumeSafeAppend(); Could you give an example where it can lead bugs? Do you mean multi-thread

How to cleanup array of structs?

2017-06-02 Thread Suliman via Digitalmars-d-learn
I remember that there was topic about remobing data from struct/arrays of structs. But I do not remember what is idiomatic way to do it, and can't google it. something like: struct MyTrack { ulong id; string recordDate; int velocity; int

Re: Best way for handle missing args in REST interface in vibed

2017-05-30 Thread Suliman via Digitalmars-d-learn
I had post question here http://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/thread/43511/

Re: Best way for handle missing args in REST interface in vibed

2017-05-29 Thread Suliman via Digitalmars-d-learn
@rootPathFromName interface API { @path("mytrack") @method(HTTPMethod.GET)Json doTrackSpeedAnalyze(int trackid, string startDateTime, string endDateTime); } class MyRouter : API { Config config; Database database; this(Config config, Database database) {

Re: Best way for handle missing args in REST interface in vibed

2017-05-29 Thread Suliman via Digitalmars-d-learn
I wrote next code: void foo(string _error = null) { writeln("Error"); } override: @errorDisplay!foo Json doTrackSpeedAnalyze(int trackid, string startDateTime, string endDateTime) // /api/mytrack?trackid=123=2000=2010 {

Re: Best way for handle missing args in REST interface in vibed

2017-05-29 Thread Suliman via Digitalmars-d-learn
On Monday, 29 May 2017 at 12:23:59 UTC, Suliman wrote: I am doing REST interface with vibed. And thinking about handling errors, if users forgot to pass all expected args in function. For example: foo(int x, int y) // get request { } /api/foo?x=111 And if user is forgot to pass `y` we will

Best way for handle missing args in REST interface in vibed

2017-05-29 Thread Suliman via Digitalmars-d-learn
I am doing REST interface with vibed. And thinking about handling errors, if users forgot to pass all expected args in function. For example: foo(int x, int y) // get request { } /api/foo?x=111 And if user is forgot to pass `y` we will get error in the browser. What is the right way to

Re: Faster Command Line Tools in D

2017-05-25 Thread Suliman via Digitalmars-d-announce
std.string, std.array, and std.algorithm all have cross-polination when it comes to array operations. It has to do with the history of when the modules were introduced. Is there any plan to deprecate all splitters and make one single. Because now as I understand we have 4 functions that make

Re: Anyone tried to emscripten a D/SDL game?

2017-05-24 Thread Suliman via Digitalmars-d
On Wednesday, 24 May 2017 at 17:06:55 UTC, Guillaume Piolat wrote: On Wednesday, 24 May 2017 at 17:00:51 UTC, Nick Sabalausky "Abscissa" wrote: Anyone have any experience (successful or unsuccessful) attempting this? Any info on the current state of it, or pitfalls, or pointers for getting

Re: Trip notes from Israel

2017-05-22 Thread Suliman via Digitalmars-d-announce
On Monday, 22 May 2017 at 15:12:42 UTC, Andrei Alexandrescu wrote: On 05/22/2017 11:05 AM, Andrei Alexandrescu wrote: http://dlang.org/blog/2017/05/22/introspection-introspection-everywhere/ -- Andrei Submitted to reddit as well:

Getopt default int init and zero

2017-05-19 Thread Suliman via Digitalmars-d-learn
I would like to check if user specified `0` as getopt parameter. But the problem that `int`'s are default in `0`. So if user did not specified nothing `int x` will be zero, and all other code will work as if it's zero. In std.typecons I found Nullable that allow init int to zero. I tried to

Re: dmd download spike

2017-05-17 Thread Suliman via Digitalmars-d
How often the stat are recalculating?

Re: "Programming in D" is up-to-date

2017-05-16 Thread Suliman via Digitalmars-d-announce
On Saturday, 13 May 2017 at 23:22:41 UTC, Ali Çehreli wrote: I've updated the book to 2.074.0. I've updated all paper and electronic versions at all publishers. However, I recommend that you wait a week or so before ordering (e.g. from Amazon) so that you get the latest version. (The copyright

How to write parser?

2017-05-14 Thread Suliman via Digitalmars-d-learn
I am trying to learn how to write text parser. I have example doc with follow format: #Header my header text ##SubHeader my sub header text ###Sub3Header my sub 3 text #Header21 my header2 text ##SubHeader21 my header2 text ###SubHeader22 my header3 text I would like to wrap all level(#)

Re: File Input

2017-05-07 Thread Suliman via Digitalmars-d-learn
On Sunday, 7 May 2017 at 13:57:47 UTC, JV wrote: Hi guys I'd like to know how to get an input from the user to be stored in a .txt file using import std.file and is it possible to directly write in a .txt file without using a variable to store the user input? Thanks for the answer in

Re: problem with std.variant rounding

2017-05-02 Thread Suliman via Digitalmars-d-learn
On Tuesday, 2 May 2017 at 08:02:23 UTC, Suliman wrote: On Saturday, 29 April 2017 at 08:57:09 UTC, Petar Kirov [ZombineDev] wrote: On Friday, 28 April 2017 at 18:08:38 UTC, H. S. Teoh wrote: On Fri, Apr 28, 2017 at 04:42:28PM +, via Digitalmars-d-learn wrote: [...]

Re: problem with std.variant rounding

2017-05-02 Thread Suliman via Digitalmars-d-learn
On Saturday, 29 April 2017 at 08:57:09 UTC, Petar Kirov [ZombineDev] wrote: On Friday, 28 April 2017 at 18:08:38 UTC, H. S. Teoh wrote: On Fri, Apr 28, 2017 at 04:42:28PM +, via Digitalmars-d-learn wrote: [...] writefln(text("%.", i, "f"), x); [...] There's no need to use text()

Re: problem with std.variant rounding

2017-04-28 Thread Suliman via Digitalmars-d-learn
On Friday, 28 April 2017 at 16:49:18 UTC, kinke wrote: On Friday, 28 April 2017 at 16:24:55 UTC, Suliman wrote: import std.stdio; import std.variant; void main() { Variant b = 56.051151; float x = b.coerce!float; writeln(x); } 56.0512 void main() { import

Re: problem with std.variant rounding

2017-04-28 Thread Suliman via Digitalmars-d-learn
On Friday, 28 April 2017 at 15:45:25 UTC, Suliman wrote: I am using https://github.com/mysql-d/mysql-native It's return from DB variant data-type. My DB include value: 56.051151 (double type in DB) I need to extract it. I tried several variants: writeln(point[3].coerce!float);

problem with std.variant rounding

2017-04-28 Thread Suliman via Digitalmars-d-learn
I am using https://github.com/mysql-d/mysql-native It's return from DB variant data-type. My DB include value: 56.051151 (double type in DB) I need to extract it. I tried several variants: writeln(point[3].coerce!float); writeln(point[3].coerce!string); writeln(point[3].coerce!double); but

Re: Can't break App execution by ctrl+c

2017-04-27 Thread Suliman via Digitalmars-d-learn
Just catch the empty result exception. I do not want to go to catch block if I have empty result. I just want to get there if any other error type occur. If result is empty that simply skip this step.

Re: Can't break App execution by ctrl+c

2017-04-27 Thread Suliman via Digitalmars-d-learn
On Thursday, 27 April 2017 at 12:25:11 UTC, Adam D. Ruppe wrote: On Thursday, 27 April 2017 at 12:17:12 UTC, Suliman wrote: Before my code handle empty result in `catch` block. You must be catching the ctrl+c exception... don't do that. Just catch the empty result exception. The issue is

Can't break App execution by ctrl+c

2017-04-27 Thread Suliman via Digitalmars-d-learn
Before my code handle empty result in `catch` block. Then I moved it's checking to main loop, and now I can't abort App execution by ctrl+c. It's simply continue working. Here is my code: foreach(cargpspoint; cargpspoints) { auto cmd_dist = new

Re: How to fix date format?

2017-04-26 Thread Suliman via Digitalmars-d-learn
On Wednesday, 26 April 2017 at 05:21:32 UTC, Jonathan M Davis wrote: On Wednesday, April 26, 2017 04:02:12 Suliman via Digitalmars-d-learn wrote: I tried to do: writeln(DateTime.toISOExtString(DateTime.fromSimpleString(point[1].coerce! string))); But got error: Error: function

Re: How to fix date format?

2017-04-25 Thread Suliman via Digitalmars-d-learn
I tried to do: writeln(DateTime.toISOExtString(DateTime.fromSimpleString(point[1].coerce!string))); But got error: Error: function std.datetime.DateTime.toISOExtString () const is not callable using argument types (DateTime) Error: function database.Database.getSingleTrackInfo no return exp;

Re: How to fix date format?

2017-04-25 Thread Suliman via Digitalmars-d-learn
On Tuesday, 25 April 2017 at 20:10:02 UTC, Jonathan M Davis wrote: On Tuesday, April 25, 2017 17:41:25 Suliman via Digitalmars-d-learn wrote: I am using mysql native. Date in DB have next format: 2016-11-01 06:19:37 But every tile when I am trying to get it I am getting such format: 2016-Oct

How to fix date format?

2017-04-25 Thread Suliman via Digitalmars-d-learn
I am using mysql native. Date in DB have next format: 2016-11-01 06:19:37 But every tile when I am trying to get it I am getting such format: 2016-Oct-31 15:37:24 I use next code: writeln(point[1].coerce!string); Why coerce is forcing format changing? How I can extract result as without

Why File is exists in std.stdio and in std.file?

2017-04-25 Thread Suliman via Digitalmars-d-learn
Just interesting. Is there any rational reasons for this decision?

Re: Vibed + osv.io

2017-04-24 Thread Suliman via Digitalmars-d
On Monday, 24 April 2017 at 15:10:29 UTC, Suliman wrote: I have found very interesting project http://osv.io Has anybody to use it with vibed? I am not sure if it's yet-another-linux distrib or OS written from scratch. I found link on Redox page https://github.com/redox-os/redox/issues/925

Vibed + osv.io

2017-04-24 Thread Suliman via Digitalmars-d
I have found very interesting project http://osv.io Has anybody to use it with vibed? I am not sure if it's yet-another-linux distrib or OS written from scratch. I found link on Redox page https://github.com/redox-os/redox/issues/925 It would be nice to have way to get run vibed from

Re: The app hanging after reach 1750MB of RAM

2017-04-24 Thread Suliman via Digitalmars-d-learn
The problem is solved. See for more detail https://github.com/mysql-d/mysql-native/issues/104

Re: {OT} Youtube Video: newCTFE: Starting to write the x86 JIT

2017-04-20 Thread Suliman via Digitalmars-d
On Thursday, 20 April 2017 at 12:56:11 UTC, Stefan Koch wrote: Hi Guys, I just begun work on the x86 jit backend. Because right now I am at a stage where further design decisions need to be made and those decisions need to be informed by how a _fast_ jit-compatible x86-codegen is

Re: The app hanging after reach 1750MB of RAM

2017-04-19 Thread Suliman via Digitalmars-d-learn
On Wednesday, 19 April 2017 at 15:18:32 UTC, crimaniak wrote: On Tuesday, 18 April 2017 at 11:43:24 UTC, Suliman wrote: I am writing app that extract data from DB to array of structures. void getSingleTrackInfo() { foreach(item;

Re: The app hanging after reach 1750MB of RAM

2017-04-19 Thread Suliman via Digitalmars-d-learn
I have added GC.stat https://dlang.org/library/core/memory/gc.stats.html here the result: freeSize: 49698640 | usedSize: 170502320 freeSize: 41174592 | usedSize: 217823680 freeSize: 53868576 | usedSize: 247072736 freeSize: 86494800 | usedSize: 307769776 freeSize: 58176640 | usedSize:

Re: The app hanging after reach 1750MB of RAM

2017-04-19 Thread Suliman via Digitalmars-d-learn
auto mymem = cargpspoints.length * typeof(cargpspoints[0]).sizeof; writeln(mymem); And it's print: 16963440 it's about 16MB... What is takes all other memory? 1. You're measuring it wrong. Array length is already measured in terms of type size. So should I do: cargpspoints.length *

Re: The app hanging after reach 1750MB of RAM

2017-04-18 Thread Suliman via Digitalmars-d-learn
On Tuesday, 18 April 2017 at 14:15:59 UTC, Stanislav Blinov wrote: On Tuesday, 18 April 2017 at 14:09:28 UTC, Stanislav Blinov wrote: foreach(row; result) { arr ~= row.toStruct(cargpspoint); } Sorry, this should be foreach(row; result) {

Re: The app hanging after reach 1750MB of RAM

2017-04-18 Thread Suliman via Digitalmars-d-learn
Also I can't understand why app take so much memory? I checked array of structures size with this code: auto mymem = cargpspoints.length * typeof(cargpspoints[0]).sizeof; writeln(mymem); And it's print: 16963440 it's about 16MB... What is takes all other memory?

The app hanging after reach 1750MB of RAM

2017-04-18 Thread Suliman via Digitalmars-d-learn
I am writing app that extract data from DB to array of structures. void getSingleTrackInfo() { foreach(item; getTablesGPSSensorList) { ResultRange result = mysqlconnection.query(sqlquery);

Re: Can't build simple project. Very strange errors

2017-04-17 Thread Suliman via Digitalmars-d-learn
On Friday, 14 April 2017 at 15:53:18 UTC, Rene Zwanenburg wrote: On Friday, 14 April 2017 at 15:42:33 UTC, Suliman wrote: On Friday, 14 April 2017 at 15:40:18 UTC, Rene Zwanenburg wrote: On Friday, 14 April 2017 at 15:31:21 UTC, Suliman wrote: On Friday, 14 April 2017 at 15:22:49 UTC, Rene

Re: Can't pass data from filter to each

2017-04-17 Thread Suliman via Digitalmars-d-learn
New question. Can I put result of filtering in itself without creation of new variables like x: auto x = MySQLTablesRange.array.filter!(a=>a[0].coerce!string.canFind("_"));

Can't pass data from filter to each

2017-04-17 Thread Suliman via Digitalmars-d-learn
I am writing lambda function. I need filter data at first step and than do dome operation on them (for start simply print on the screen. I wrote next code: MySQLTablesRange.filter!(a=>a[0].coerce!string.canFind("_")).each!(a => to!int(a[0].coerce!string.split("_")[1]).writeln); But it's

Re: Why map return [] ?

2017-04-14 Thread Suliman via Digitalmars-d-learn
On Friday, 14 April 2017 at 15:55:13 UTC, Rene Zwanenburg wrote: On Friday, 14 April 2017 at 15:49:00 UTC, Suliman wrote: I found problem! ResultRange should be converted to array before it can be `map`ed That shouldn't be necessary. Can you post your complete code? ResultRange

Re: Why map return [] ?

2017-04-14 Thread Suliman via Digitalmars-d-learn
On Friday, 14 April 2017 at 15:38:19 UTC, Suliman wrote: On Friday, 14 April 2017 at 15:35:15 UTC, cym13 wrote: On Friday, 14 April 2017 at 15:29:33 UTC, Suliman wrote: auto x = MySQLTablesRange.map!(a=>a); writeln(x); return: [] while next code: MySQLTablesRange.each!(a=>a.writeln); return

Re: Can't build simple project. Very strange errors

2017-04-14 Thread Suliman via Digitalmars-d-learn
On Friday, 14 April 2017 at 15:40:18 UTC, Rene Zwanenburg wrote: On Friday, 14 April 2017 at 15:31:21 UTC, Suliman wrote: On Friday, 14 April 2017 at 15:22:49 UTC, Rene Zwanenburg wrote: On Friday, 14 April 2017 at 09:49:09 UTC, Suliman wrote: on: dub build --compiler=ldc2 link OPTLINK (R)

Re: Why map return [] ?

2017-04-14 Thread Suliman via Digitalmars-d-learn
On Friday, 14 April 2017 at 15:35:15 UTC, cym13 wrote: On Friday, 14 April 2017 at 15:29:33 UTC, Suliman wrote: auto x = MySQLTablesRange.map!(a=>a); writeln(x); return: [] while next code: MySQLTablesRange.each!(a=>a.writeln); return data line by line. Why? What library is that supposed

Re: Can't build simple project. Very strange errors

2017-04-14 Thread Suliman via Digitalmars-d-learn
On Friday, 14 April 2017 at 15:22:49 UTC, Rene Zwanenburg wrote: On Friday, 14 April 2017 at 09:49:09 UTC, Suliman wrote: on: dub build --compiler=ldc2 link OPTLINK (R) for Win32 Release 8.00.17 Optlink isn't able to link object files produced by ldc. Could you try an x64_86 build?

Why map return [] ?

2017-04-14 Thread Suliman via Digitalmars-d-learn
auto x = MySQLTablesRange.map!(a=>a); writeln(x); return: [] while next code: MySQLTablesRange.each!(a=>a.writeln); return data line by line. Why?

Re: Can't build simple project. Very strange errors

2017-04-14 Thread Suliman via Digitalmars-d-learn
On Friday, 14 April 2017 at 10:40:00 UTC, Suliman wrote: I checked all possible combination of dmd and vibed (0.7.30 brunch). No result. Only a little bit another error: Copyright (C) Digital Mars 1989-2013 All rights reserved. http://www.digitalmars.com/ctg/optlink.html

Re: Can't build simple project. Very strange errors

2017-04-14 Thread Suliman via Digitalmars-d-learn
I checked all possible combination of dmd and vibed (0.7.30 brunch). No result. Only a little bit another error: Copyright (C) Digital Mars 1989-2013 All rights reserved. http://www.digitalmars.com/ctg/optlink.html

Re: Can't build simple project. Very strange errors

2017-04-14 Thread Suliman via Digitalmars-d-learn
On Friday, 14 April 2017 at 09:51:55 UTC, Suliman wrote: But I tested it on 2.073.0 too Not 2.073.0 but v2.073.2 I checked v2.073.1 too and he reported that it's buildable with v2.073.1 on his PC. Any ideas?

Re: Can't build simple project. Very strange errors

2017-04-14 Thread Suliman via Digitalmars-d-learn
But I tested it on 2.073.0 too Not 2.073.0 but v2.073.2

Can't build simple project. Very strange errors

2017-04-14 Thread Suliman via Digitalmars-d-learn
I am getting very strange bug on very simple project. Here is sources http://rgho.st/7j5LQLZxb (blue button for downloading). On: dub build I am getting error: Unexpected OPTLINK Termination at EIP=0040F60A EAX=0393 EBX=00438C70 ECX=0EE6 EDX=02CE ESI=0104 EDI=03930468

Re: Single exe vibe.d app

2017-04-11 Thread Suliman via Digitalmars-d-learn
On Friday, 7 April 2017 at 07:15:44 UTC, rikki cattermole wrote: I'm going to give you a very bad but still a good place to begin with explanation. So, what is an executable? Well in modern operating systems that is a file with a very complex structure inside, like PE-COFF or ELF. It has a

Re: Single exe vibe.d app

2017-04-07 Thread Suliman via Digitalmars-d-learn
On Thursday, 6 April 2017 at 17:39:15 UTC, Stefan Koch wrote: On Wednesday, 5 April 2017 at 12:13:38 UTC, Satoshi wrote: Hi, How can I build single exe application with vibe.d (windows)? now it require zlib.dll, libeay32.dll and ssleay32.dll But I need it as single app. One solution would be

Re: shared: Has anyone used it without a lot of pain?

2017-04-06 Thread Suliman via Digitalmars-d
On Thursday, 6 April 2017 at 09:00:33 UTC, Kagamin wrote: On Wednesday, 5 April 2017 at 14:01:24 UTC, Guillaume Piolat wrote: My pet peeve with shared is the RoI. Risk of infection? Return of Investment :)

Can vibed be fast as Go or Python?

2017-03-28 Thread Suliman via Digitalmars-d
I found very interesting Python async framework japronto https://github.com/squeaky-pl/japronto Test show that in some cases japronto may work as fast as Go. Can vibed be competitor (or even better) than Go and Python for micro-services?

Re: Introducing Diskuto - an embeddable comment system

2017-03-17 Thread Suliman via Digitalmars-d-announce
On Friday, 17 March 2017 at 16:42:28 UTC, Sönke Ludwig wrote: Am 17.03.2017 um 16:42 schrieb cym13: On Wednesday, 15 March 2017 at 02:14:34 UTC, Sönke Ludwig wrote: Am 14.03.2017 um 21:56 schrieb Daniel Kozak via Digitalmars-d-announce: Dne 14.3.2017 v 21:24 Sönke Ludwig via

Re: What is PostgreSQL driver is most stable?

2017-03-15 Thread Suliman via Digitalmars-d-learn
The retrieval of records is done via the execution of a (prepared) sql query, that returns a range object (PGResultSet), and the element of that range is the DBRow, in one of its form. So, basically, the elements are retrieved on demand while you popFront that range, leveraging what the

Re: [vibe.d] How to create authentication system via REST interface?

2017-03-15 Thread Suliman via Digitalmars-d-learn
On Wednesday, 15 March 2017 at 13:24:07 UTC, NX wrote: I'm trying to understand how to create some json-rest api that would return data (in json format) related to that specific logged in user. I see the documentation covers these but I'm totally new to vibe.d so can't quite figure out putting

Re: What is PostgreSQL driver is most stable?

2017-03-15 Thread Suliman via Digitalmars-d-learn
On Tuesday, 14 March 2017 at 13:36:04 UTC, Daniel Kozak wrote: Dne 14.3.2017 v 14:21 Daniel Kozak napsal(a): Dne 14.3.2017 v 14:13 Suliman via Digitalmars-d-learn napsal(a): I need to develop App that should work on Linux and Windows. It need PostgreSQL driver. I tried Vadim's ddbc

Re: So no one is using Amazon S3 with D, why?

2017-03-15 Thread Suliman via Digitalmars-d
On Tuesday, 14 March 2017 at 20:21:44 UTC, aberba wrote: Amazon S3 seem like a common solution for object storage these days[1] but I'm seeing almost no activity in this area (stable native D API). Why? [1] https://trends.builtwith.com/cdn/Amazon-S3 How much the lowest vibed ready instance

Re: What is PostgreSQL driver is most stable?

2017-03-14 Thread Suliman via Digitalmars-d-learn
On Tuesday, 14 March 2017 at 13:21:39 UTC, Paolo Invernizzi wrote: On Tuesday, 14 March 2017 at 13:13:31 UTC, Suliman wrote: I need to develop App that should work on Linux and Windows. It need PostgreSQL driver. I tried Vadim's ddbc for PostgreSQL but it's fail on x64 version of PostgreSQL

What is PostgreSQL driver is most stable?

2017-03-14 Thread Suliman via Digitalmars-d-learn
I need to develop App that should work on Linux and Windows. It need PostgreSQL driver. I tried Vadim's ddbc for PostgreSQL but it's fail on x64 version of PostgreSQL and possible will not on x64 PG on Linux (I can't test it now). Could anybody advice me good driver without problems? I seen

Re: Where do you test syntax of D regexp online?

2017-03-10 Thread Suliman via Digitalmars-d-learn
On Friday, 10 March 2017 at 14:36:48 UTC, Suliman wrote: On Thursday, 9 March 2017 at 16:47:18 UTC, Adam D. Ruppe wrote: On Thursday, 9 March 2017 at 16:40:13 UTC, Suliman wrote: How should I write to file result without \r\n\ symbols? auto x = content.matchFirst(bigCodeBlock); File f =

Re: Where do you test syntax of D regexp online?

2017-03-10 Thread Suliman via Digitalmars-d-learn
On Thursday, 9 March 2017 at 16:47:18 UTC, Adam D. Ruppe wrote: On Thursday, 9 March 2017 at 16:40:13 UTC, Suliman wrote: How should I write to file result without \r\n\ symbols? auto x = content.matchFirst(bigCodeBlock); File f = File("foo.txt", "w"); f.write(x); Just f.write(x[0]); to

Re: Where do you test syntax of D regexp online?

2017-03-09 Thread Suliman via Digitalmars-d-learn
On Thursday, 9 March 2017 at 16:23:23 UTC, Adam D. Ruppe wrote: On Thursday, 9 March 2017 at 16:14:28 UTC, Suliman wrote: But now output is: [["```\r\nvoid foo()\r\n{\r\n\twriteln(\"ppp\");\r\n}\r\n```"]] But I do not \r\n\ symbols... That's just the writeln array formatter. The matchFirst

Re: Where do you test syntax of D regexp online?

2017-03-09 Thread Suliman via Digitalmars-d-learn
Adding "r" helped: auto bigCodeBlock = regex(r"`{3}[\s\S]*?`{3}"); But now output is: [["```\r\nvoid foo()\r\n{\r\n\twriteln(\"ppp\");\r\n}\r\n```"]] But I do not \r\n\ symbols...

Re: Where do you test syntax of D regexp online?

2017-03-09 Thread Suliman via Digitalmars-d-learn
On Thursday, 9 March 2017 at 15:22:00 UTC, rikki cattermole wrote: On 10/03/2017 4:17 AM, Suliman wrote: I would use dpaste and write a quick script but here is where I think your problem is: regex("/.*/g") It should be: regex(".*", "g") As per[0]. [0]

Re: Where do you test syntax of D regexp online?

2017-03-09 Thread Suliman via Digitalmars-d-learn
I would use dpaste and write a quick script but here is where I think your problem is: regex("/.*/g") It should be: regex(".*", "g") As per[0]. [0] http://dlang.org/phobos/std_regex.html#.regex Sorry, but what regexp are you talking? There is nothing like: `regex("/.*/g")` in my code...

<    1   2   3   4   5   6   7   8   9   >