Re: Why use while if only iterating once ?

2018-11-03 Thread Venkat via Digitalmars-d-learn
Thankyou. As the great Gump's mother said, stupid is as stupid does.

Why use while if only iterating once ?

2018-11-03 Thread Venkat via Digitalmars-d-learn
while (1) { FLAGS f; switch (*p) { case 'U': case 'u': f = FLAGS.unsigned; goto L1; case 'l': f = FLAGS.long_; error("lower case integer suffix

Re: Dub dependency conflict resolution

2018-10-06 Thread Venkat via Digitalmars-d-learn
On Sunday, 7 October 2018 at 05:24:37 UTC, Bauss wrote: On Saturday, 6 October 2018 at 17:50:57 UTC, Venkat wrote: I couldn't find any documentation on how dub resolves dependency conflicts. Here is my situation. Package A has a dependency on package B-1.0.0 which has a dependency on

Dub dependency conflict resolution

2018-10-06 Thread Venkat via Digitalmars-d-learn
I couldn't find any documentation on how dub resolves dependency conflicts. Here is my situation. Package A has a dependency on package B-1.0.0 which has a dependency on package C-1.0.0. Package A declares a dependency on package C-1.0.1 How does dub behave in this situation. From what

Re: What does std.traits.hasAliasing do

2018-08-05 Thread Venkat via Digitalmars-d-learn
Thankyou.

Re: What does std.traits.hasAliasing do

2018-07-28 Thread Venkat via Digitalmars-d-learn
On Sunday, 29 July 2018 at 01:05:19 UTC, Venkat wrote: struct SomeStruct { string p; string q; string[] pq; } Session session = req.session; session.get!SomeStruct("registerBody"); /home/venkat/.dub/packages/vibe-d-0.8.4/vibe-d/http/vibe/http/session.d(83,3): Error:

What does std.traits.hasAliasing do

2018-07-28 Thread Venkat via Digitalmars-d-learn
struct SomeStruct { string p; string q; string[] pq; } ErrorMessage[] pq; session.set("registerBody", pq); /home/venkat/.dub/packages/vibe-d-0.8.4/vibe-d/http/vibe/http/session.d(83,3): Error: static assert: "Type SomeStruct contains references, which is not supported

Re: Request scoped information in Vibe.d

2018-07-22 Thread Venkat via Digitalmars-d-learn
On Sunday, 22 July 2018 at 08:43:23 UTC, Johannes Loher wrote: On Sunday, 22 July 2018 at 06:21:40 UTC, Venkat wrote: How do I make variables available to diet templates ? Java has request.setAttribute. Vibe.d's HTTPServerRequest has params and queryString. But by the looks of it, neither one

Request scoped information in Vibe.d

2018-07-22 Thread Venkat via Digitalmars-d-learn
How do I make variables available to diet templates ? Java has request.setAttribute. Vibe.d's HTTPServerRequest has params and queryString. But by the looks of it, neither one of them is created for the purpose of temporary storage in the request. Where do I store request scoped information ?

Re: Is there any tool that will auto publish my changes.

2018-07-16 Thread Venkat via Digitalmars-d-learn
Thankyou Ali. Timoses. I did try DiamondMVC for a bit, but I found that there is more help out there for Vibe.d. So I reverted back to using that. And the Dependency Injection in Diamond MVC brings all the obscurity that spring has which makes debugging more of a guessing game than a

Re: Is there any tool that will auto publish my changes.

2018-07-15 Thread Venkat via Digitalmars-d-learn
An extension to the question. Is something like auto publish that even possible ? Or the dumb guy from java world don't know what he talkin' 'bout ?

Is there any tool that will auto publish my changes.

2018-07-14 Thread Venkat via Digitalmars-d-learn
I am writing a simple vibe.d app. The following is what I do right now. - I make changes. - build - Restart the server. Is there any tool that will auto publish my changes as I save them ? I am using Visual Studio Code. Thanks Venkat

Re: How to enable verbose logging during application run

2018-03-17 Thread Venkat via Digitalmars-d-learn
Thankyou.

Re: How to enable verbose logging during application run

2018-03-17 Thread Venkat via Digitalmars-d-learn
Sorry posted the above message by accident. I am running a vibed app using `dub` command. But it produces no logging what so ever when requests are made. The server returns http error codes but it doesn't log anything to the console. How do I make it show me a lot more detail than it is doing

How to enable verbose logging during application run

2018-03-17 Thread Venkat via Digitalmars-d-learn
I am running a vibed app using `dub` command. But it produces no logging what so ever when re

Re: SegFault with HibernateD

2018-01-14 Thread Venkat via Digitalmars-d-learn
On Saturday, 13 January 2018 at 06:18:43 UTC, Ali Çehreli wrote: On 01/12/2018 06:50 PM, Venkat wrote: > Sorry about all these posts. Wish there were an edit button. That's ok. :) These are actually newsgroups (see NNTP protocol). Newsgroups don't have any edit functionality. The "forum" is

Re: SegFault with HibernateD

2018-01-12 Thread Venkat via Digitalmars-d-learn
Sorry about all these posts. Wish there were an edit button. I meant PreparedStatement in mysqlddbc driver, not HibernateD.

Re: SegFault with HibernateD

2018-01-12 Thread Venkat via Digitalmars-d-learn
I think there is a bug with PreparedStatement class in HibernateD. ddbc fails when I use a PreparedStatement. The code below shows that. I will create an issue with HibernateD. int main(string[] args) { string url = "mysql://localhost:3306/webmarx?user=webmarx_dev,password=webm@rx";

Re: SegFault with HibernateD

2018-01-12 Thread Venkat via Digitalmars-d-learn
On Friday, 12 January 2018 at 08:55:13 UTC, Rene Zwanenburg wrote: Hard to guess what the issue is, I'd attach a debugger to see where it crashes. It fails at the sql() method in Command struct in mysql-native-1.1.4/mysql-native/source/mysql/commands.d. This is what gdb says when I do a disp

Re: SegFault with HibernateD

2018-01-12 Thread Venkat via Digitalmars-d-learn
On Friday, 12 January 2018 at 12:41:34 UTC, Mike Parker wrote: I see now. I glossed right over that execution output. On Windows, I don't recall ever seeing a dub exception from dub from a segfault. Just checked by accessing a null pointer and there's nothing thrown from dub. Is that a Linux

SegFault with HibernateD

2018-01-11 Thread Venkat via Digitalmars-d-learn
I get a SegFault with the main method below which uses HibernateD . The second main method which uses ddbc just works fine. What is wrong with the first main method ? I have attached the error at the bottom although I don't think it says much. This method uses HibernateD int main() {

Re: -L--demangle=dlang doesn't work

2018-01-07 Thread Venkat via Digitalmars-d-learn
Yes, thanks Mike. I have 2.24 installed. Now I have to figure out how I can upgrade binutils without a distro upgrade. :)

-L--demangle=dlang doesn't work

2018-01-05 Thread Venkat via Digitalmars-d-learn
Why does gcc say "unknown demangling style `dlang'" ? Do I need GDC for demangling to work ? 85198AB7DE24894B5F742FBD5/libvibe-d_data.a

Re: A DUB Case Study: Compiling DMD as a Library

2017-12-20 Thread Venkat via Digitalmars-d-learn
I did a fresh clone of dmd and added that as a dependency. That fixed it. Should've thought of it !! Thankyou.

Re: A DUB Case Study: Compiling DMD as a Library

2017-12-19 Thread Venkat via Digitalmars-d-learn
This is regarding the latest D blog post. Jacob Carlborg is here, so I figured I'd post it. https://dlang.org/blog/2017/08/01/a-dub-case-study-compiling-dmd-as-a-library/#comment-2922 Simply changing the targetType from library to dynamicLibrary breaks the code. What is going on with it ?

Re: Dub generates a library file that is larger in size than the one built on command line.

2017-12-16 Thread Venkat via Digitalmars-d-learn
TY Mike, that explains it. Thanks Ivan.

Re: Dub generates a library file that is larger in size than the one built on command line.

2017-12-16 Thread Venkat via Digitalmars-d-learn
dub build --vverbose That is the command I used. Would it be right to assume that -g is being added because --vverbose ? The reason I ask is the file size is about the same when I run the below command. dub build

Dub generates a library file that is larger in size than the one built on command line.

2017-12-16 Thread Venkat via Digitalmars-d-learn
The following is the command output by dub with --vverbose switch. It generates a file which is 6094400 bytes in size dmd -lib -of.dub/build/library-debug-linux.posix-x86_64-dmd_2077-7BB682AB55F152616E128DD715E887DF/libdjni.a -debug -g -w -version=Have_djni -Isource/ source/app.d

Dub generate import files

2017-12-16 Thread Venkat via Digitalmars-d-learn
dmd has the -H and -Hd switches. Does dub have any setting to make it generate D interface files ?

Re: Code Review

2017-12-09 Thread Venkat via Digitalmars-d-learn
On Sunday, 10 December 2017 at 07:03:30 UTC, Venkat wrote: Can anybody take a look at this checkin ? The import files are a noise, please ignore them and take a look at the *.d files. Changes I made. - Tried to remove __va_argsave as it doesn't compile with it. - Tried to replace no arg

Code Review

2017-12-09 Thread Venkat via Digitalmars-d-learn
Can anybody take a look at this checkin ? The import files are a noise, please ignore them and take a look at the *.d files. Changes I made. - Tried to remove __va_argsave as it doesn't compile with it. - Tried to replace no arg opCall() with a factory function.

Re: std.conv.to!string refuses to convert a char* to string.

2017-12-09 Thread Venkat via Digitalmars-d-learn
Thank you, core.runtime.Runtime.initialize() fixed the issue. I am now able to use to!string as well. I found your posts and Ali Çehreli's posts on this subject. I think I have some understanding now.

Re: std.conv.to!string refuses to convert a char* to string.

2017-12-08 Thread Venkat via Digitalmars-d-learn
Thanks for the quick response. std.string.fromStringz did the trick. I am not sure what was the deal with to!string.

std.conv.to!string refuses to convert a char* to string.

2017-12-08 Thread Venkat via Digitalmars-d-learn
I am trying out the DJni library (https://github.com/Monnoroch/DJni). For some reason std.conv.to!string doesn't want to convert a char* to a string.The lines below are taken from the log. I see that the last frame is at gc_qalloc. I am not sure why it failed there. Can anybody elaborate on