Re: Why does enumerate over range return dchar, when ranging without returns char?

2018-05-03 Thread rikki cattermole via Digitalmars-d-learn
On 03/05/2018 5:44 PM, James Blachly wrote: I am puzzled why enumerating in a foreach returns a dchar (which forces me to cast), whereas without the enumerate the range returns a char as expected. Example: ``` import std.stdio; import std.range : enumerate; void main() { char[] s =

Re: C++ / Wrong function signature generated for reference parameter

2018-05-03 Thread Robert M. Münch via Digitalmars-d-learn
On 2018-05-03 02:23:27 +, Rubn said: If "Image" is a class then all classes are based as pointers to their respective object. Hi, ok. Didn't remember that this is always the case. So passing a ref to a class is kind of redundant. Yes, that's why I was confused. You want to use a

Re: Derelict on Ubuntu with CODE::BLOCKS

2018-05-03 Thread Mike Parker via Digitalmars-d-learn
On Thursday, 3 May 2018 at 03:18:02 UTC, RegeleIONESCU wrote: The only problem I have with DUB is that all added dependencies are "old". For example added dependency "derelict-sdl2" is version="~>2.1.4" while on DUB site the last version is 3.1.0-alpha.3. I tried the --upgrade plus

Re: C++ / Wrong function signature generated for reference parameter

2018-05-03 Thread Robert M. Münch via Digitalmars-d-learn
On 2018-05-03 02:23:27 +, Rubn said: You want to use a struct which isn't passed by pointer, but by value. Which will then give you the signature you want. In addition to my other post, using struct won't give the correct signature. That's the signature I need: public: unsigned int

Re: Derelict on Ubuntu with CODE::BLOCKS

2018-05-03 Thread RegeleIONESCU via Digitalmars-d-learn
On Thursday, 3 May 2018 at 06:33:53 UTC, Mike Parker wrote: On Thursday, 3 May 2018 at 03:18:02 UTC, RegeleIONESCU wrote: The only problem I have with DUB is that all added dependencies are "old". For example added dependency "derelict-sdl2" is version="~>2.1.4" while on DUB site the last

Re: Is HibernateD dead?

2018-05-03 Thread singingbush via Digitalmars-d-learn
On Thursday, 3 May 2018 at 10:27:47 UTC, Pasqui23 wrote: Last commit on https://github.com/buggins/hibernated was almost a year ago So what is the status of HibernateD?Should I use it if I need an ORM? Or would I risk unpatched security risks? Both hibernated and ddbc have had open pull

Re: Is HibernateD dead?

2018-05-03 Thread Matthias Klumpp via Digitalmars-d-learn
On Thursday, 3 May 2018 at 10:27:47 UTC, Pasqui23 wrote: Last commit on https://github.com/buggins/hibernated was almost a year ago So what is the status of HibernateD?Should I use it if I need an ORM? Or would I risk unpatched security risks? Hah! I was just browsing the forums thinking

Re: Ambiguous template parameter names

2018-05-03 Thread bauss via Digitalmars-d-learn
On Thursday, 3 May 2018 at 02:51:18 UTC, Meta wrote: If you want that, you might be able to do `int val = val` on the inner function, though I'm not sure that'll work. It does not work and will do nothing.

Re: Finding the last executed line by checking dmd core

2018-05-03 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, May 03, 2018 19:45:54 kerdemdemir via Digitalmars-d-learn wrote: > After a big refactor my code crushes I have no idea where. > > I am only getting : > > Program exited with code -11 > > And a core file. > > I used to use gdb for c++ coredumps. With what program I > can check dmd

Re: Derelict on Ubuntu with CODE::BLOCKS

2018-05-03 Thread Mike Parker via Digitalmars-d-learn
On Thursday, 3 May 2018 at 18:36:04 UTC, RegeleIONESCU wrote: And here is the error I get when I execute dub run: christian@Christians:~/D_Projects$ dub run Performing "debug" build using /usr/bin/dmd for x86_64. derelict-util 2.0.6: target for configuration "library" is up to date.

Re: Finding the last executed line by checking dmd core

2018-05-03 Thread drug via Digitalmars-d-learn
On 03.05.2018 22:45, kerdemdemir wrote: After a big refactor my code crushes I have no idea where. I am only getting : Program exited with code -11 And a core file. I used to use gdb for c++ coredumps. With what program I can check dmd core file? Erdemdem The same programs and options

Finding the last executed line by checking dmd core

2018-05-03 Thread kerdemdemir via Digitalmars-d-learn
After a big refactor my code crushes I have no idea where. I am only getting : Program exited with code -11 And a core file. I used to use gdb for c++ coredumps. With what program I can check dmd core file? Erdemdem

Re: Is HibernateD dead?

2018-05-03 Thread Matthias Klumpp via Digitalmars-d-learn
On Thursday, 3 May 2018 at 18:52:34 UTC, singingbush wrote: On Thursday, 3 May 2018 at 10:27:47 UTC, Pasqui23 wrote: Last commit on https://github.com/buggins/hibernated was almost a year ago So what is the status of HibernateD?Should I use it if I need an ORM? Or would I risk unpatched

Re: Is HibernateD dead?

2018-05-03 Thread bauss via Digitalmars-d-learn
On Thursday, 3 May 2018 at 18:01:07 UTC, Matthias Klumpp wrote: DiamondMVC looks nice, but I would need PostgreSQL support for sure. Therefore, I think there are three options: 1) Extend the DiamondMVC ORM to support missing features that Hibernated has (maybe make it use ddbc as backend?)

Re: Is HibernateD dead?

2018-05-03 Thread Matthias Klumpp via Digitalmars-d-learn
On Thursday, 3 May 2018 at 21:28:18 UTC, bauss wrote: On Thursday, 3 May 2018 at 18:01:07 UTC, Matthias Klumpp wrote: DiamondMVC looks nice, but I would need PostgreSQL support for sure. Therefore, I think there are three options: 1) Extend the DiamondMVC ORM to support missing features that

How do you connect Python with D via socket, I'm still getting connection refused error

2018-05-03 Thread Enjoys Math via Digitalmars-d-learn
Error - builtins.ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it Python Side --- from PyQt5.QtWidgets import QApplication, QMainWindow import sys import socket import settings if __name__ == "__main__": app

LDC phobos2-ldc.lib(json.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86'

2018-05-03 Thread IntegratedDimensions via Digitalmars-d-learn
trying to compile a simple program in x86. Compiles fine in dmd and ldcx64. Seems like ldc is using the wrong lib for some reason? phobos2-ldc.lib(json.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86' Error: C:\Program Files (x86)\Microsoft

cannot find -lcurl in Linux

2018-05-03 Thread Vino via Digitalmars-d-learn
Hi All, Request your help , while compiling a d program in SUSE Linux i am getting the below error, the executable curl is present under the path /usr/bin/ ask:/DScript # dmd -m64 -O -release -inline test.d /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot

Re: cannot find -lcurl in Linux

2018-05-03 Thread Vino via Digitalmars-d-learn
On Thursday, 3 May 2018 at 10:19:55 UTC, Jonathan M Davis wrote: On Thursday, May 03, 2018 10:10:05 Vino via Digitalmars-d-learn wrote: Hi All, Request your help , while compiling a d program in SUSE Linux i am getting the below error, the executable curl is present under the path

Re: C++ / Wrong function signature generated for reference parameter

2018-05-03 Thread Robert M. Münch via Digitalmars-d-learn
On 2018-05-03 09:34:56 +, kinke said: That's why there's `extern(C++, class) struct Image`, see https://dlang.org/spec/cpp_interface.html#classes. Hi, thanks. I didn't understand the docs as without any code examples for all the different cases, it's hard to derive the syntax and how to

Re: Why does enumerate over range return dchar, when ranging without returns char?

2018-05-03 Thread rikki cattermole via Digitalmars-d-learn
On 03/05/2018 9:50 PM, ag0aep6g wrote: On 05/03/2018 07:56 AM, rikki cattermole wrote: ``` import std.stdio; import std.range : enumerate; void main() {  char[] s = ['a','b','c']; char[3] x; auto i = 0; foreach(c; s) { x[i] = c; i++; }

Re: C++ / Wrong function signature generated for reference parameter

2018-05-03 Thread kinke via Digitalmars-d-learn
On Thursday, 3 May 2018 at 07:00:03 UTC, Robert M. Münch wrote: using struct won't give the correct signature That's why there's `extern(C++, class) struct Image`, see https://dlang.org/spec/cpp_interface.html#classes. Not sure about the const part too, if this is correct on the D side...

Re: Why does enumerate over range return dchar, when ranging without returns char?

2018-05-03 Thread ag0aep6g via Digitalmars-d-learn
On 05/03/2018 07:56 AM, rikki cattermole wrote: ``` import std.stdio; import std.range : enumerate; void main() {  char[] s = ['a','b','c']; char[3] x; auto i = 0; foreach(c; s) { x[i] = c; i++; } writeln(x); } ``` Above works without cast. '''

Re: cannot find -lcurl in Linux

2018-05-03 Thread Vino via Digitalmars-d-learn
On Thursday, 3 May 2018 at 10:22:43 UTC, Vino wrote: On Thursday, 3 May 2018 at 10:19:55 UTC, Jonathan M Davis wrote: [...] Hi Jonathan, The below packages are already installed [...] Hi Jonathan, Installed the package libcurl-devel, that resolved the issue. Thank you very much.

Re: Why does enumerate over range return dchar, when ranging without returns char?

2018-05-03 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, May 03, 2018 22:00:04 rikki cattermole via Digitalmars-d-learn wrote: > On 03/05/2018 9:50 PM, ag0aep6g wrote: > > On 05/03/2018 07:56 AM, rikki cattermole wrote: > >>> ``` > >>> import std.stdio; > >>> import std.range : enumerate; > >>> > >>> void main() > >>> { > >>> char[] s

Re: cannot find -lcurl in Linux

2018-05-03 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, May 03, 2018 10:10:05 Vino via Digitalmars-d-learn wrote: > Hi All, > > Request your help , while compiling a d program in SUSE Linux i > am getting the below error, the executable curl is present under > the path /usr/bin/ > > ask:/DScript # dmd -m64 -O -release -inline test.d >

Is HibernateD dead?

2018-05-03 Thread Pasqui23 via Digitalmars-d-learn
Last commit on https://github.com/buggins/hibernated was almost a year ago So what is the status of HibernateD?Should I use it if I need an ORM? Or would I risk unpatched security risks?

Re: Is HibernateD dead?

2018-05-03 Thread bauss via Digitalmars-d-learn
On Thursday, 3 May 2018 at 10:27:47 UTC, Pasqui23 wrote: Last commit on https://github.com/buggins/hibernated was almost a year ago So what is the status of HibernateD?Should I use it if I need an ORM? Or would I risk unpatched security risks? Although currently only mysql/mariadb support,

Re: Is HibernateD dead?

2018-05-03 Thread bauss via Digitalmars-d-learn
On Thursday, 3 May 2018 at 11:00:36 UTC, bauss wrote: On Thursday, 3 May 2018 at 10:27:47 UTC, Pasqui23 wrote: That is if you want to use something that isn't "dead"

Windows to Linux Porting

2018-05-03 Thread Vino via Digitalmars-d-learn
Hi All, Request you help on the below code, the below code always state the file does not exist even if the file do exist. Code: import core.stdc.stdlib: exit; import std.stdio; import std.file; import std.path; auto osSwitch () { string ConfigFile; version (Windows) { ConfigFile =