& Golang has Martini which is quite easy to use,
https://www.youtube.com/watch?v=tUFzdUIjVRg
hunt-http has no documentation and does not looks usable to me.
What looks usable is kemal & the crystal language,
https://kemalcr.com/guide/
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 ,
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 ...
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.
(title).
In flask it is "from flask_bootstrap import Bootstrap".
But what do you have to do with vibe.d ?
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
Is there an example just more functional then skeleton http
server ?
Sending data to the server and back .
forms.
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 ?
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
Sidenote, sort also not works with static arrays.
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.
With idle (not the editor :)) , it works perfect. Thanks for your
help.
I'll try your example. Thanks.
I did not used glib.idle. Probably this is essential.
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
The idea looked good but gtk was unhave when 1000 labels where
updated by another thread.
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
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
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.
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
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,
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
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.
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.
Is that the expected behavior of the programmer?
Opinions can differ. Feel free to elaborate.
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.
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
answer[0][0].as!PGtext contains good data
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):
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,
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:
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
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?
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:
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
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
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
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
40 matches
Mail list logo