Re: Reflection on the book D web development.

2020-11-28 Thread Alaindevos via Digitalmars-d-learn
& Golang has Martini which is quite easy to use, https://www.youtube.com/watch?v=tUFzdUIjVRg

Re: Reflection on the book D web development.

2020-11-25 Thread Alaindevos via Digitalmars-d-learn
hunt-http has no documentation and does not looks usable to me. What looks usable is kemal & the crystal language, https://kemalcr.com/guide/

Re: Reflection on the book D web development.

2020-11-21 Thread Alaindevos via Digitalmars-d-learn
It's not my related to a lack of knowledge of the d-language but the complexity of the vibe.d framework itself. What I understand are : 1: jade/diet .dt templates, inheritance,includes,markdown. 2: A simple form with POST method. Then it stops. What I find too complex: - Sessions, session data ,

Reflection on the book D web development.

2020-11-20 Thread Alaindevos via Digitalmars-d-learn
I bought the book "D Web Development". I understand only 20% of the book,the other 80% is way above my head. Compare, I own a book on flask development, and I understand 100% of it. Which means I can use dlang for anything except QT and serious web development ...

Re: How to use bootstrap with vibe.d.

2020-11-05 Thread Alaindevos via Digitalmars-d-learn
It know it gives you nice buttons. I suppose to use it you add the bootstrap .js and .css file links to the diet templates.

How to use bootstrap with vibe.d.

2020-11-04 Thread Alaindevos via Digitalmars-d-learn
(title). In flask it is "from flask_bootstrap import Bootstrap". But what do you have to do with vibe.d ?

GtkD CRUD Application

2020-10-17 Thread Alaindevos via Digitalmars-d-learn
I've written the beginning but dont know how to end. What is the way to add functionality for the add,edit,delete button ? //== import gtk.Button; import gtk.Box; import gtk.Label; import gtk.Entry; import gtk.Grid; import gtk.Main; import gtk.MainWindow; import

Re: vibe.d / experience / feedback

2020-10-14 Thread Alaindevos via Digitalmars-d-learn
Is there an example just more functional then skeleton http server ? Sending data to the server and back .

Re: vibe.d / experience / feedback

2020-10-14 Thread Alaindevos via Digitalmars-d-learn
forms.

Re: vibe.d / experience / feedback

2020-10-14 Thread Alaindevos via Digitalmars-d-learn
One concept at a time. This is one of the simplest examples in vibe.d. I look for the code for the same functionality but without authentication/login. https://github.com/vibe-d/vibe.d/blob/master/examples/web/source/app.d Where are the @ lines explained ?

Re: vibe.d / experience / feedback

2020-10-13 Thread Alaindevos via Digitalmars-d-learn
What is weird is that rails is THE ruby application , that flask is the python application, and that dlang can't have something like that in their standard library. An opportunity missed. On the other hand I don't understand the interest in Java/swing when there is a good working gtkd which is

Re: Why does sum not work in static arrays?

2020-10-11 Thread Alaindevos via Digitalmars-d-learn
Sidenote, sort also not works with static arrays.

Re: vibe.d / experience / feedback

2020-10-10 Thread Alaindevos via Digitalmars-d-learn
For a framework to be successful you need at least a minimum of sample code in public domain. For vibe it is none existent. I could not even find demo code doing a redirect which is the most basic stuff. The number of books on a framework is also an indication of the success after a few years.

Re: How to spawn a thread within a GtkD button event handler

2020-10-08 Thread Alaindevos via Digitalmars-d-learn
With idle (not the editor :)) , it works perfect. Thanks for your help.

Re: How to spawn a thread within a GtkD button event handler

2020-10-08 Thread Alaindevos via Digitalmars-d-learn
I'll try your example. Thanks.

Re: How to spawn a thread within a GtkD button event handler

2020-10-08 Thread Alaindevos via Digitalmars-d-learn
I did not used glib.idle. Probably this is essential.

Re: How to spawn a thread within a GtkD button event handler

2020-10-08 Thread Alaindevos via Digitalmars-d-learn
No use geany. The error occurs also when no editor is open. I think the gtk libraries are not meant to be used in multithreaded way, where gtk is not knowing what is happening. A process in background doing file things is no problem. It is when a process in background tries to update a lot of

Re: How to spawn a thread within a GtkD button event handler

2020-10-08 Thread Alaindevos via Digitalmars-d-learn
The idea looked good but gtk was unhave when 1000 labels where updated by another thread.

Re: How to spawn a thread within a GtkD button event handler

2020-10-08 Thread Alaindevos via Digitalmars-d-learn
I created blindly a thread and this allowed to do stuff in background. But when i passed the mainwindow as argument and did some stuff it resulted in, [xcb] Unknown sequence number while processing queue [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called

Re: How to spawn a thread within a GtkD button event handler

2020-10-08 Thread Alaindevos via Digitalmars-d-learn
One thing I want to do is in an eventhandler of a button released event which takes minutes in duration to change the state of the statusbar indicating something is going on. But the statusbar is not redrawn before the evenhandler finishes. Better would be to start a new thread but

How to spawn a thread within a GtkD button event handler

2020-10-08 Thread Alaindevos via Digitalmars-d-learn
Because when the eventhandler takes to much time the application is no longer responsive. And even a simple redraw request is not performed before ending of the thread. A small and short demo app would nice. Or guideline and direction.

Re: Efficient sort function allowing own test and swap function as parameter

2020-10-08 Thread Alaindevos via Digitalmars-d-learn
On Wednesday, 7 October 2020 at 11:05:39 UTC, WebFreak001 wrote: On Tuesday, 6 October 2020 at 22:18:39 UTC, Alaindevos wrote: I have a large table consisting of two columns.One with words.Another with frequencies. I want to sort them efficiently according to the names or frequency. For this I

Re: question on dub and postgresql

2020-10-08 Thread Alaindevos via Digitalmars-d-learn
I found dub.json has very important info, To name three : importPaths , libs , dependencies. When these are right you have started for 80%. Without nagging, when you begin you are however lost in the woods and it makes the impression to lose interest completely. For ease there is : targetName,

Efficient sort function allowing own test and swap function as parameter

2020-10-06 Thread Alaindevos via Digitalmars-d-learn
I have a large table consisting of two columns.One with words.Another with frequencies. I want to sort them efficiently according to the names or frequency. For this I need an efficient sort function where I can plugin my proper test of order, and proper swap. Currently I do it using an own

Re: It is possible to substract 5 from 3 unsigned integer

2020-10-06 Thread Alaindevos via Digitalmars-d-learn
There are two subtractions possible. A machine-one which can be architecture dependent, does not have the same results on all computers, and behaves like a modulus in mathematics. A logical one. For the last one higher classes might be needed.

Re: It is possible to substract 5 from 3 unsigned integer

2020-10-06 Thread Alaindevos via Digitalmars-d-learn
On Tuesday, 6 October 2020 at 12:24:56 UTC, Alaindevos wrote: Is that the expected behavior of the programmer? Opinions can differ. Feel free to elaborate. E.g. length of a string unsigned long.

It is possible to substract 5 from 3 unsigned integer

2020-10-06 Thread Alaindevos via Digitalmars-d-learn
Is that the expected behavior of the programmer? Opinions can differ. Feel free to elaborate.

Re: question on dub and postgresql

2020-10-05 Thread Alaindevos via Digitalmars-d-learn
Use "rangify" template to get forward range from answer Thanks, this answers the question on programmatic level. Yet I guess something is special with the answer datatype which makes foreach to fail.

Re: question on dub and postgresql

2020-10-05 Thread Alaindevos via Digitalmars-d-learn
On Monday, 5 October 2020 at 14:57:53 UTC, Alaindevos wrote: answer[0][0].as!PGtext contains good data I found an answer. foreach(rownumber; answer.length.iota){ auto arow=answer[rownumber]; writeln(arow); } Yet it would be nice to know why i can't iterate directly over answer using

Re: question on dub and postgresql

2020-10-05 Thread Alaindevos via Digitalmars-d-learn
answer[0][0].as!PGtext contains good data

Re: question on dub and postgresql

2020-10-05 Thread Alaindevos via Digitalmars-d-learn
Just Connection worked. But how do I loop over results of a select statement. string sql=format(" SELECT * from %s ;",tablepredata); auto answer = conn.exec(sql); foreach(arow; answer){ writeln(arow); } Fails with, dub ~master: building configuration "application"... source/app.d(36,3):

Re: question on dub and postgresql

2020-10-05 Thread Alaindevos via Digitalmars-d-learn
On Monday, 5 October 2020 at 13:30:22 UTC, Alaindevos wrote: On Monday, 5 October 2020 at 11:35:43 UTC, Imperatorn wrote: On Monday, 5 October 2020 at 08:47:45 UTC, Alaindevos wrote: On Monday, 5 October 2020 at 08:34:37 UTC, Imperatorn wrote: On Monday, 5 October 2020 at 08:24:26 UTC,

Re: question on dub and postgresql

2020-10-05 Thread Alaindevos via Digitalmars-d-learn
On Monday, 5 October 2020 at 11:35:43 UTC, Imperatorn wrote: On Monday, 5 October 2020 at 08:47:45 UTC, Alaindevos wrote: On Monday, 5 October 2020 at 08:34:37 UTC, Imperatorn wrote: On Monday, 5 October 2020 at 08:24:26 UTC, Alaindevos wrote: [...] Take a look at:

Re: question on dub and postgresql

2020-10-05 Thread Alaindevos via Digitalmars-d-learn
On Monday, 5 October 2020 at 09:24:33 UTC, Mike Parker wrote: On Monday, 5 October 2020 at 09:05:16 UTC, Alaindevos wrote: [...] You don't need to install dpq2 if you are using dub to build your project. Add it as a dependency to your dub.json (or dub.sdl if you prefer that format). When

Re: question on dub and postgresql

2020-10-05 Thread Alaindevos via Digitalmars-d-learn
On Monday, 5 October 2020 at 08:54:39 UTC, Daniel Kozak wrote: On Mon, Oct 5, 2020 at 10:25 AM Alaindevos via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: Can I say python has pip, ruby has bundle and D has dub. Meaning they perform the same function ? Or am I wrong?

Re: question on dub and postgresql

2020-10-05 Thread Alaindevos via Digitalmars-d-learn
On Monday, 5 October 2020 at 08:50:53 UTC, Alaindevos wrote: On Monday, 5 October 2020 at 08:47:45 UTC, Alaindevos wrote: On Monday, 5 October 2020 at 08:34:37 UTC, Imperatorn wrote: On Monday, 5 October 2020 at 08:24:26 UTC, Alaindevos wrote: [...] Take a look at:

Re: question on dub and postgresql

2020-10-05 Thread Alaindevos via Digitalmars-d-learn
On Monday, 5 October 2020 at 08:47:45 UTC, Alaindevos wrote: On Monday, 5 October 2020 at 08:34:37 UTC, Imperatorn wrote: On Monday, 5 October 2020 at 08:24:26 UTC, Alaindevos wrote: [...] Take a look at: https://code.dlang.org/packages/dpq2 https://code.dlang.org/packages/ddbc Say I want

Re: question on dub and postgresql

2020-10-05 Thread Alaindevos via Digitalmars-d-learn
On Monday, 5 October 2020 at 08:34:37 UTC, Imperatorn wrote: On Monday, 5 October 2020 at 08:24:26 UTC, Alaindevos wrote: [...] Take a look at: https://code.dlang.org/packages/dpq2 https://code.dlang.org/packages/ddbc Say I want to use dpq2. Do I need to clone the git repository with "git

Re: question on dub and postgresql

2020-10-05 Thread Alaindevos via Digitalmars-d-learn
On Monday, 5 October 2020 at 08:24:26 UTC, Alaindevos wrote: Can I say python has pip, ruby has bundle and D has dub. Meaning they perform the same function ? Or am I wrong? As I use unix the parameters for include and library are a real pain. I have totally no idea how to connect to a

question on dub and postgresql

2020-10-05 Thread Alaindevos via Digitalmars-d-learn
Can I say python has pip, ruby has bundle and D has dub. Meaning they perform the same function ? Or am I wrong? As I use unix the parameters for include and library are a real pain. I have totally no idea how to connect to a postgresql database. Where and how do I start to connect to a