Re: How to create instance of class that get data from 2 another instance?

2015-01-02 Thread Suliman via Digitalmars-d-learn
Oh mama mia! I did it! http://www.everfall.com/paste/id.php?a5pp73ns1e4k auto seismodownload = new seismoDownload(emsc_csem, this); then: auto mysql = new MySQL(parseconfig,eqs); So could anybody show me better way? As I said I did not fully understand how use global class instance...

Re: How to create instance of class that get data from 2 another instance?

2015-01-02 Thread Suliman via Digitalmars-d-learn
I looked at my code and it's seems that I can create instance of MySQL in main. void main() { auto parseconfig = new parseConfig(); auto mysql = new MySQL(parseconfig, seismodownload); } In parseConfig I am creation instance of seismoDownload: class parseConfig { if

Re: How to create instance of class that get data from 2 another instance?

2015-01-02 Thread Suliman via Digitalmars-d-learn
What I am doing wrong? http://www.everfall.com/paste/id.php?iwh4qdcqv6zi Well, there's no `parseconfig` there. Do you expect the `parseconfig` from line 30 or line 193 to be available in line 170? From line 30. In line 193 I am get in instance of class instance of parseconfig to be able

function ... is not callable using argument types

2015-01-01 Thread Suliman via Digitalmars-d-learn
I need to pass some config to ddbc driver. When I use static const all work ok. static const string PGSQL_UNITTEST_HOST = localhost; static const intPGSQL_UNITTEST_PORT = 5432; static const string PGSQL_UNITTEST_USER = postgres; static const string PGSQL_UNITTEST_PASSWORD = Infinity8;

Re: function ... is not callable using argument types

2015-01-01 Thread Suliman via Digitalmars-d-learn
But why variant: static const int PGSQL_UNITTEST_PORT = 5432; do not require of implicit convert to!short() at connection string?

Re: DlangUI project update

2014-12-28 Thread Suliman via Digitalmars-d-announce
Vadim, could you check your email. I Have do not related with DLAGGUI question.

Re: Worst Phobos documentation evar!

2014-12-28 Thread Suliman via Digitalmars-d
Walter, can be documentation moved to wiki? I think a lot of valanter will help with it's improving and adding more samples. The reading and understanding it's sometime is bug pain, especially with programmers, who come to D from Python and other simple languages.

Re: Need example of usage DerelictPQ

2014-12-28 Thread Suliman via Digitalmars-d-learn
Adam, I trying to build simple app: import std.stdio; import postgres; import database; void main() { auto db = new PostgreSql(dbname = test2); foreach(line; db.query(SELECT * FROM customer)) { writeln(line[0], line[customer_id]); } } and getting next

OT: HelenOS 0.6.0 released

2014-12-27 Thread Suliman via Digitalmars-d
It's not related with D topic, but maybe it would be interesting for some programmers. Could anybody explain would it hard to create port DMD to HelenOS, and what needed for it? http://www.helenos.org/node/139 image to play http://www.qemu-advent-calendar.org/#day-20

Re: OT: HelenOS 0.6.0 released

2014-12-27 Thread Suliman via Digitalmars-d
Helen OS do not have Posix-compatibility.

Re: DlangUI project update

2014-12-26 Thread Suliman via Digitalmars-d-announce
Vadim, could you add in file path in browsing window ability to click on any needed segment of path and move to it level. I mean system like does in Windows 7 in when you can move to D:\code\foo\bar\baz, and after click on foo move to D:\code\foo\

Re: GBAiD (GameBoy Advance in D)

2014-12-24 Thread Suliman via Digitalmars-d
reddit: http://www.reddit.com/r/programming/comments/2qaxvs/gbaid_a_gameboy_advance_emulator_in_d/ github: https://github.com/DDoS/GBAiD Matheus. Cool! And what you can say about D after Java? What do you liked\disliked?

Need example of usage DerelictPQ

2014-12-24 Thread Suliman via Digitalmars-d-learn
Could anybody provide any simple examples of usage DerelictPQ. I do not have experience of C, and I can't understand how to use this driver. I need just basics like connect, select and insert. http://code.dlang.org/packages/derelict-pq thanks!

Re: Need example of usage DerelictPQ

2014-12-24 Thread Suliman via Digitalmars-d-learn
I have done next: string connString = psql -h localhost -p 5432 -U postgres -d testdb; package PGconn* conn; @property bool nonBlocking(){ return PQisnonblocking(conn) == 1; } this(parseConfig parseconfig) { void connect() {

Re: Need example of usage DerelictPQ

2014-12-24 Thread Suliman via Digitalmars-d-learn
On Wednesday, 24 December 2014 at 14:08:53 UTC, Adam D. Ruppe wrote: I haven't used the derelict version but I have used the C library itself and wrapped it briefly in my postgres.d here: https://github.com/adamdruppe/arsd/blob/master/postgres.d Thanks! But few questions: 1. how to build it

Re: Need example of usage DerelictPQ

2014-12-24 Thread Suliman via Digitalmars-d-learn
DerelictPQ is only a binding to libpq. The only difference is the DerelictPQ.load method. Just follow the libpq documentation. http://www.postgresql.org/docs/9.1/static/libpq.html Actually, Derelict binds to version 9.3, so the proper link should be

Why call function rise exception?

2014-12-20 Thread Suliman via Digitalmars-d-learn
The problem with 31 string. http://www.everfall.com/paste/id.php?jgsdz7mdbrnm If I uncomment it, and server response is return 404 code I code at runtime throw exception with text: Can't parse config: HTTP request returned status code 404 I thought that checkLinkCode is throw any king

Re: Why call function rise exception?

2014-12-20 Thread Suliman via Digitalmars-d-learn
Oh sorry I understood where problem.

Re: Gumbo-d - D binding for Gumbo HTML 5 Parser

2014-12-14 Thread Suliman via Digitalmars-d-announce
Look like binding have some issues. I am getting next error, after inducing: import gumbo.node, gumbo.parse; to my App Compiling using dmd... Linking... OPTLINK (R) for Win32 Release 8.00.15 Copyright (C) Digital Mars 1989-2013 All rights reserved. http://www.digitalmars.com/ctg/optlink.html

Re: SQLLite driver

2014-12-14 Thread Suliman via Digitalmars-d-learn
There is also a branch named `develop` which at least compiles, maybe it is usable. how to add to dub this branch?

Re: SQLLite driver

2014-12-14 Thread Suliman via Digitalmars-d-learn
On Sunday, 14 December 2014 at 13:33:27 UTC, Suliman wrote: There is also a branch named `develop` which at least compiles, maybe it is usable. how to add to dub this branch? Compiling using dmd... Linking... OPTLINK (R) for Win32 Release 8.00.15 Copyright (C) Digital Mars 1989-2013 All

Re: scope block do not handle failure, but try-catch does

2014-12-13 Thread Suliman via Digitalmars-d-learn
If I right understand scope is not good for checking if one of function is fail. For example: string dbpass = config.getKey(dbpass); string dbpass = config.getKey(dbpass); string dbhost = config.getKey(dbhost); string dbport = config.getKey(dbport); if I will try to add scope(failure)

Re: scope block do not handle failure, but try-catch does

2014-12-13 Thread Suliman via Digitalmars-d-learn
I reread docs and understood that scope not for such case. Next code is do what I need: try { string dbname = config.getKey(dbname); string dbpass = config.getKey(dbpass); string dbhost = config.getKey(dbhost); string dbport = config.getKey(dbport); } catch

SQLLite driver

2014-12-13 Thread Suliman via Digitalmars-d-learn
On the code.dlang.org I found SQLLite driver https://github.com/biozic/d2sqlite3 Look like it's not ready for Windows: pragma(msg, \nWARNING !!!\nDevelopped for POSIX systems only.\nNot tested on Windows.\n); I tried to add import to my project and I got next errors:

Re: SQLLite driver

2014-12-13 Thread Suliman via Digitalmars-d-learn
Yes I used 2.0.65, but after updating compiler the situation did not resolved... http://www.everfall.com/paste/id.php?apd0bfs5z4eg

File Not Found: pq.lib

2014-12-11 Thread Suliman via Digitalmars-d-learn
I am trying to start with http://code.dlang.org/packages/dpq2 But I can't understand where I should to get pq.lib and where I should to place it. In the Program Files I did not find such file...

scope block do not handle failure, but try-catch does

2014-12-11 Thread Suliman via Digitalmars-d-learn
string dbname = config.getKey(dbname1); scope(failure) writeln(look like dbname is missing); I am using dini and trying to throw exception if value can't be extract from config. If I am wrap it's in try-сефср block it's work or. But in this situation scope block do not execute and I see only

Re: curl: catching exception on connect.

2014-12-02 Thread Suliman via Digitalmars-d-learn
connect() sends a CONNECT request to the server, as defined by HTTP [1]. This method is only used when you're working with proxies and the like. What you most likely want, however, is a GET request. Use get() for that. So what is the best way to check status server response (400, 404 etc)

Re: curl: catching exception on connect.

2014-12-01 Thread Suliman via Digitalmars-d-learn
Big thanks Ali! Only the small last question: why: string link = dlang.org; writeln(connect(link)); cause crash: std.net.curl.CurlException@C:\DMD\dmd2\windows\bin\..\..\src\phobos\std\net\curl .d(779): HTTP request returned status code 400 0x00404263

Re: curl: catching exception on connect.

2014-12-01 Thread Suliman via Digitalmars-d-learn
My guess is that you have to use HTTPS for CONNECT and that you have to have credentials for it. (?) Ali dlang.org should work on HTTP, but not HTTPS. Also I do not think that when I connect to HTTPS I should have any credentials. It's mostly like issue with curl...

Re: general questions on reference types versus value types...

2014-12-01 Thread Suliman via Digitalmars-d-learn
Could anybody explain why there is opinion that stack is fast and the heap is slow. All of them are located in the same memory. So the access time should be equal.

curl: catching exception on connect.

2014-11-30 Thread Suliman via Digitalmars-d-learn
I can't understand why I am getting exception on next code: void downloadFile() { foreach(link; links) { try { writeln(connect(link)); }

Re: curl: catching exception on connect.

2014-11-30 Thread Suliman via Digitalmars-d-learn
Am I right understand all exception are derived from assertThrown http://dlang.org/phobos/std_exception.html So msg in catch(Exception msg) is from function assertThrown? Could you show me example of how to handle type of exception?

Re: Error: cannot return non-void from void function

2014-11-27 Thread Suliman via Digitalmars-d-learn
Full function look like this: auto parseConfig() { auto config = Ini.Parse(getcwd ~ \\ ~ config.ini); string txtlinks = getcwd ~ \\ ~ config.getKey(input_links); if(!exists(txtlinks)) { writeln(Can't find input file with list of links.);

Error: cannot return non-void from void function

2014-11-27 Thread Suliman via Digitalmars-d-learn
auto parseConfig() { auto lines = File(txtlinks, r).byLine; return lines; } Error: cannot return non-void from void function I can't understand the reasons of the error; Can I return auto from function?

function app.download (string[] links) is not callableusing argument types (string, string)

2014-11-27 Thread Suliman via Digitalmars-d-learn
I try to compile simple example: import std.net.curl; void main() { download(ftp.digitalmars.com/sieve.ds, D:\\Project\\2014\\txt_downloader\\img\\1.foo); } but I am getting error: function app.download (string[] links) is not callableusing argument types (string, string)

Re: function app.download (string[] links) is not callableusing argument types (string, string)

2014-11-27 Thread Suliman via Digitalmars-d-learn
Look like it was missed installation or so. I installed new copy of dmd and error gone away.

Re: function app.download (string[] links) is not callableusing argument types (string, string)

2014-11-27 Thread Suliman via Digitalmars-d-learn
The downloading still do not work. Work only: get(dlang.org);

Re: Error: cannot return non-void from void function

2014-11-27 Thread Suliman via Digitalmars-d-learn
ah, that's it! as spec says, D determines function return value from the first 'return' statement it seen. in your case this is `return;`, so function return type is determined to be `void`. if you doing `auto` functions, try to arrange your code so the first `return` returning the actual

Re: function app.download (string[] links) is not callableusing argument types (string, string)

2014-11-27 Thread Suliman via Digitalmars-d-learn
Running .\txtdownloader.exe std.stream.OpenException@std\stream.d(50): Cannot open or create file 'D:\Projec t\2014\txt_downloader\img\1.foo' 0x0041BA59 in void std.stream.File.open(immutable(char)[], std.stream.FileMode) 0x00404B75 in void

Re: function app.download (string[] links) is not callableusing argument types (string, string)

2014-11-27 Thread Suliman via Digitalmars-d-learn
Is there any way to detect where collision was occurred?

Re: function app.download (string[] links) is not callableusing argument types (string, string)

2014-11-27 Thread Suliman via Digitalmars-d-learn
Oh! It's work! I forgot to change path on my home PC!

Re: function app.download (string[] links) is not callableusing argument types (string, string)

2014-11-27 Thread Suliman via Digitalmars-d-learn
On Thursday, 27 November 2014 at 17:39:10 UTC, Suliman wrote: Is there any way to detect where collision was occurred? It's look like collision was with method name.

Best way to add slash to tail of the path

2014-11-27 Thread Suliman via Digitalmars-d-learn
Sometimes it's path string may do not have tail slash of the path Compare: string path = C:\\folder\\name string path = C:\\folder\\name\\ in case if I need to append file name to path to get full path I can get error like: path ~= foo.txt C:\\folder\\namefoo.txt instead of

Re: Best way to add slash to tail of the path

2014-11-27 Thread Suliman via Digitalmars-d-learn
see std.path, it contains alot of useful things. I looked there, but found only buildNormalizedPath, but it's not for such situation...

Re: Best way to add slash to tail of the path

2014-11-27 Thread Suliman via Digitalmars-d-learn
take a second look then. ;-) you'll find `buildPath()` here too. Not better: string foo = D:/code/txtDownloader; writeln(foo); foo = foo.buildPath; foo ~= config.txt; writeln(foo); Running .\txtdownloader.exe D:/code/txtDownloader

Re: Best way to add slash to tail of the path

2014-11-27 Thread Suliman via Digitalmars-d-learn
Could you quote for me part of docs where it's written? I really can't understand about what you are taking.

Re: Best way to add slash to tail of the path

2014-11-27 Thread Suliman via Digitalmars-d-learn
thanks! I understood!

Re: Error when downloading with +

2014-11-26 Thread Suliman via Digitalmars-d-learn
This is an issue with your version of dub with a buggy url encoding method. Download the latest at code.dlang.org http://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/thread/22266/

Re: print yyyy-mm-dd

2014-11-24 Thread Suliman via Digitalmars-d-learn
Is there any way to set separator? For example I want use '/' or ':'?

Re: print yyyy-mm-dd

2014-11-24 Thread Suliman via Digitalmars-d-learn
And could anybody explain me how the cast is work. How to understand which types to which may be casted?

Re: Sum informations in file....

2014-11-24 Thread Suliman via Digitalmars-d-learn
I can't understand why foreach loop produce every line by line, while it's fuctional analog print lines on one string: foreach(f; file.byLine()) { writeln(f); } auto file = File(foo.txt,r); file .byLine() .writeln; file content: - first sring second string -

Re: Sum informations in file....

2014-11-24 Thread Suliman via Digitalmars-d-learn
Thanks! But is there any way to do it with std.algorithm? Can be skipOver used for it?

write multiple lines without \n with writeln

2014-11-20 Thread Suliman via Digitalmars-d-learn
In dco source code I have found: void ShowUsage() { writeln( dco build tool ~ strVersion ~ written by FrankLIKE. Usage: dco [switches...] files... for example: dco or: dco app.d build for dfl2: dco } I do not see here any \n. Why this code is output all one by line, and not in single

dco how to specify Jpath?

2014-11-20 Thread Suliman via Digitalmars-d-learn
I am playing with dco. And it's look very helpful for tiny projects. I can't understand is it's possible to add to dco.ini Jpath? I am talking about something like: dflags=-JD:\code\d\App1\source\ but when I am trying to compile code with dco it's can't find import. I looked at source code

Re: write multiple lines without \n with writeln

2014-11-20 Thread Suliman via Digitalmars-d-learn
I understand it. I expect what concatenation symbol will stay new line in new line and not append it's to current: writeln( first string second ~ string ); I expect: first string second string but not: first stringsecondstring

print yyyy-mm-dd

2014-11-20 Thread Suliman via Digitalmars-d-learn
I can't understand how to get date in format -MM-dd from Clock.currTime auto time = Clock.currTime; And what next? Could anybody give any examples?

Re: help

2014-11-19 Thread Suliman via Digitalmars-d-learn
You need to check if remote file exist of server and only after it download шею Also add scope or try catch block to your code.

dfl2 GUI Builder

2014-11-15 Thread Suliman via Digitalmars-d-learn
I have got few questions about DFL2. 1: What is dco and in which situation I should prefer it's to dub? 2: Old DFL had easy to use GUI Builder. Does dfl2 have such tool?

Re: DUB 0.9.22 released

2014-11-13 Thread Suliman via Digitalmars-d-announce
- Added general support for single-file compilation mode, as well as separate compile/link mode for GDC. I do not see any mentions about this key at docs. Can I add it to dub.json?

Re: Can't install dub on Debian

2014-11-13 Thread Suliman via Digitalmars-d-learn
You are right, after updating Debian to 7.7 dub was installed successfully

Re: What's blocking DDMD?

2014-11-12 Thread Suliman via Digitalmars-d
As of a few hours ago DDMD has gone green in the autotester on the main platforms. https://auto-tester.puremagic.com/?projectid=10 I do not see DDMD here. Is it was moved to another location?

Can't install dub on Debian

2014-11-12 Thread Suliman via Digitalmars-d-learn
I did 2 steps from http://d-apt.sourceforge.net/ $ sudo wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list $ sudo apt-get update sudo apt-get -y --allow-unauthenticated install --reinstall d-apt-keyring sudo apt-get update And now

Re: Can't install dub on Debian

2014-11-12 Thread Suliman via Digitalmars-d-learn
root@66898:~# apt-get install multiarch-support Reading package lists... Done Building dependency tree Reading state information... Done Package multiarch-support is not available, but is referred to by another packag e. This may mean that the package is missing, has been obsoleted, or is only

Re: Can't install dub on Debian

2014-11-12 Thread Suliman via Digitalmars-d-learn
If you haven't found the problem yet, please post: 1. what is the architecture of your machine? $ lscpu 2. what is the debian version? $ lsb_release -a root@66898:~# lscpu Architecture: x86_64 CPU op-mode(s):32-bit, 64-bit CPU(s):4 Vendor ID:

Re: Instructions for compilation from multiple source files

2014-11-10 Thread Suliman via Digitalmars-d-learn
dmd a.d b.d Otherwise you can also use ddmd and let it find the module dependencies by itself. Am I right understand that if I will put all needed files at src folder and name main file App.d dub will add all needed files to App.d ?

Re: is there any reason UFCS can't be used with 'new'?

2014-11-10 Thread Suliman via Digitalmars-d-learn
I can't understand how to use UFCS with instance of class: void main() { string name = Suliman; userName username = new userName(name); /// How to use UFCS here? userName.name.sayHello(); /// } class userName { string name; this(string name) { this.name = name; }

Re: is there any reason UFCS can't be used with 'new'?

2014-11-10 Thread Suliman via Digitalmars-d-learn
Thanks! Ali Çehreli, could you add this mention and possible the example to your book?

Live without debugger?

2014-11-09 Thread Suliman via Digitalmars-d-learn
I know that a lot of people are using for programming tools like Sublime. I am one of them. But if for very simple code it's ok, how to write hard code? Do you often need debugger when you are writing code? For which tasks debugger are more needed for you?

Re: scope exception do not rise

2014-11-06 Thread Suliman via Digitalmars-d-learn
We have to look at the documentation of the function. In this case the possibilities are FileException and UTFException. http://dlang.org/phobos/std_file.html#.readText However, judging by their names, they are both descendants of Exception, so what you are doing will catch either of them.

scope exception do not rise

2014-11-05 Thread Suliman via Digitalmars-d-learn
void openFile(string fname, string current_folder) { auto file = readText(current_folder ~ fname); scope(failure) { writeln(failure); } // writeln(file); } if file name do not exists, I want to rise scope exception. But it's do not rise,

Re: scope exception do not rise

2014-11-05 Thread Suliman via Digitalmars-d-learn
I can't understand what I am missing. Try-catch block also do not handle exception: void main() { string fname = app.d1; //file name with error string current_folder = (getcwd() ~\\); writeln(current_folder); openFile(fname, current_folder); } void

Re: scope exception do not rise

2014-11-05 Thread Suliman via Digitalmars-d-learn
Am I right understand that keyword Exception is handle universal type of exceptions? catch (Exception) { writeln(inner); } But in my example with try block can I change it's to something more informative?

Re: scope exception do not rise

2014-11-05 Thread Suliman via Digitalmars-d-learn
Replace that with something like writeln(caught) and you will see that it is indeed caught. :) Printing the exception mimicks the default behavior and you (and I) think that the exception is not caught. :) that's work, but I can not understand where I can to look at exception level. If I

Re: dfl2 is comming

2014-11-04 Thread Suliman via Digitalmars-d-announce
I found build tool named dco. Could you explain were it can be helpful?

Re: how to expand tuple?

2014-11-02 Thread Suliman via Digitalmars-d-learn
Thanks! In which cases tuples can be helpful?

how to expand tuple?

2014-11-01 Thread Suliman via Digitalmars-d-learn
Few questions. 1. In examples tuples are created with keyword auto. Can I create them with another keyword. Or auto mean structure of data, that have not standard type like (int or string)? 2. How ti expend tuple? I tried to do: auto imglist = tuple(aaa); imglist.expand[sss];

Re: Dart bindings for D?

2014-10-30 Thread Suliman via Digitalmars-d-learn
Is it's possible to create single language that cover desktop and web? Like D+Dart? I ask becouse I can't understand why it's need 2 language if they are very simmiler and it's can be 1 language instead 2.

Re: Dart bindings for D?

2014-10-30 Thread Suliman via Digitalmars-d-learn
I know that there is way to write all on JS. But I can't understand what the reason that there are no single language that can work on web and as native language.

Re: Dart bindings for D?

2014-10-30 Thread Suliman via Digitalmars-d-learn
It is possible, but you need to design the language within the constraints of javascript: 1. single threaded (or worker threads) 2. 53 bits integers, 26 bits for multiplies. 4. weird fixed size heaps (ArrayView) 5. if garbage collection then it has to be javascript style 6. no tricks:

Re: Dart bindings for D?

2014-10-30 Thread Suliman via Digitalmars-d-learn
No! I mean not translation to js. I mean theoretical ability of creation new programming language that can work every where!

Re: What IDE/EDITOR do you use for D?

2014-10-29 Thread Suliman via Digitalmars-d
What IDE/EDITOR do you use for D? What plugins if you use Vim? Sublime + DCD only!

Re: HTML Parsing lib

2014-10-26 Thread Suliman via Digitalmars-d-learn
Unfortunately that library has no dub package. But you can include it in your project. See info here http://code.dlang.org/package-format I can't understand how to set in dub that I need to to include in compilation process other files... Could you help me?

Compatibility with D regexp constructor

2014-10-25 Thread Suliman via Digitalmars-d-learn
Where I can find compatibility with D online regexp constructor?

HTML Parsing lib

2014-10-25 Thread Suliman via Digitalmars-d-learn
I found only https://github.com/Bystroushaak/DHTMLParser But I can't get it work: C:\Users\Dima\Downloads\DHTMLParser-master\DHTMLParser-masterdmd find_links.d OPTLINK (R) for Win32 Release 8.00.15 Copyright (C) Digital Mars 1989-2013 All rights reserved.

Re: HTML Parsing lib

2014-10-25 Thread Suliman via Digitalmars-d-learn
You need to pass a library to compiler as well (all its files or .lib/.a file) if it is compiled as static library You can try dmd find_links.d dhtmlparser.d quote_escaper.d C:\Users\Dima\Downloads\DHTMLParser-master\DHTMLParser-masterdmd find_links.d quote_escaper.d OPTLINK (R) for

Re: HTML Parsing lib

2014-10-25 Thread Suliman via Digitalmars-d-learn
On Saturday, 25 October 2014 at 19:51:48 UTC, Suliman wrote: You need to pass a library to compiler as well (all its files or .lib/.a file) if it is compiled as static library You can try dmd find_links.d dhtmlparser.d quote_escaper.d

Re: HTML Parsing lib

2014-10-25 Thread Suliman via Digitalmars-d-learn
How I can build such App with DUB?

Error: cannot implicitly convert expression

2014-10-23 Thread Suliman via Digitalmars-d-learn
import std.stdio; import std.conv; import std.string; import std.net.curl; void main() { string content = get(d-lang.appspot.com/testUrl2); } Error: cannot implicitly convert expression (get(d-lang.appsp ot.com/testUrl2, AutoProtocol())) of type char[] to string code from:

Re: Error: cannot implicitly convert expression

2014-10-23 Thread Suliman via Digitalmars-d-learn
Solution http://forum.dlang.org/thread/bgkklxwbhrqdhveth...@forum.dlang.org#post-l639dt:24vlj:241:40digitalmars.com Am I right understand that it's bug in doc?

D developing on ARM board

2014-10-19 Thread Suliman via Digitalmars-d-learn
I am planing to buy ARM-Board. I would use it for internet browsing and whant to know would it's possible to develop D apps on it? I had read that LDC have limited support of ARM. wiki said that it can compile hello-world apps. But it it not enough. What about DMD. Is there any progress of

Re: SDC-32bit

2014-10-18 Thread Suliman via Digitalmars-d-announce
I want output C or maybe even Cool ... What's benefits this would give?

Remove filename from path

2014-09-24 Thread Suliman via Digitalmars-d-learn
What is the best way to remove file name from full path? string path = thisExePath()

Re: Remove filename from path

2014-09-24 Thread Suliman via Digitalmars-d-learn
string path = thisExePath() Seems like dirName in std.path is a good candidate ;) http://dlang.org/phobos/std_path.html#.dirName You'll find many other path manipulation functions there. Thanks! But if I want to strip it, how I can cut it?

Re: Remove filename from path

2014-09-24 Thread Suliman via Digitalmars-d-learn
I can't understand how to use strip? For example I would like to cut just extension. path = path.stripRight(exe); Error: no overload matches for stripRight(C)(C[] str) if

Recursive function call

2014-09-24 Thread Suliman via Digitalmars-d-learn
string getFileName() { //чтобы было проще обрабатываемый файл будем хранить рядом с бинариком string filename = chomp(readln()); string path = getcwd(); writeln((path ~ \\ ~ filename)); if (exists(path ~ \\ ~ filename)) return (path ~ \\ ~

Re: DUB 0.9.22 released

2014-09-22 Thread Suliman via Digitalmars-d-announce
I thought that new version of DUB will bring SDL instead json ...

Re: DUB 0.9.22 released

2014-09-22 Thread Suliman via Digitalmars-d-announce
On Monday, 22 September 2014 at 10:34:29 UTC, Sönke Ludwig wrote: Am 22.09.2014 12:26, schrieb Suliman: I thought that new version of DUB will bring SDL instead json ... That's planned for 1.0.0 (or a possible intermediate release). The major reason for this release is to get the new version

Re: DUB 0.9.22 released

2014-09-22 Thread Suliman via Digitalmars-d-announce
Is it's proper name DUB analog of CMake and other build tools from C world?

can't understand why code do not working

2014-09-22 Thread Suliman via Digitalmars-d-learn
Already 1 hour I am looking at example from http://ddili.org/ders/d.en/concurrency.html and my modification of it, and can't understand what's difference? Why it's output only: 1 3 and then do not do nothing! import std.stdio; import std.concurrency; import core.thread; void main() {

<    3   4   5   6   7   8   9   >