Re: What is PostgreSQL driver is most stable?

2017-03-19 Thread denizzzka via Digitalmars-d-learn
On Wednesday, 15 March 2017 at 08:54:59 UTC, Paolo Invernizzi 
wrote:


I'm curious: ddb does not support yet arbitrary precision 
numbers [1], does dpq support them?


Does Dlang supports them?


Re: .opAssign disabled without @disable

2016-04-17 Thread denizzzka via Digitalmars-d-learn
As Alex Parrill says, on problem was in const member. But this is 
one of the problems, and after fix here still was an error.


But alphaglosined found another problem! For some unknown reason 
here it is need to specify an empty postblit constructor.


Full patch:
https://github.com/denizzzka/r-tree/commit/ca9231df5a8a227aa9a8010b849e2e92a134f8a1

So, my problem is solved. But nevertheless maybe here is a 
problem in the compiler too.


Re: .opAssign disabled without @disable

2016-04-17 Thread denizzzka via Digitalmars-d-learn

On Sunday, 17 April 2016 at 06:42:39 UTC, denizzzka wrote:

Tried to build small test app - is not reproduced.


Also tried to reduce source:
https://github.com/denizzzka/r-tree/tree/314f7f1cc1b6387915dc56dcb2d3ccbc63e19275/source

In this source line 199 causes this error
(https://github.com/denizzzka/r-tree/blob/314f7f1cc1b6387915dc56dcb2d3ccbc63e19275/source/package.d#L199)

But if I am checkout to master and remove const from
debug private const bool isLeafNode = false;

It isn't fixes compiling.

Second branch:
I am removed const from file and add import insted of traits 
template function:


https://github.com/denizzzka/r-tree/blob/4457025efa72a6d8a97429e09c35a3f5520c37d5/source/package.d#L26

If place this import to top of the file @disabled error is gone! 
Why?


Re: .opAssign disabled without @disable

2016-04-17 Thread denizzzka via Digitalmars-d-learn

Tried to build small test app - is not reproduced.


Re: .opAssign disabled without @disable

2016-04-16 Thread denizzzka via Digitalmars-d-learn

On Saturday, 16 April 2016 at 15:15:18 UTC, Alex Parrill wrote:


Try removing the const from this line:

debug private const bool isLeafNode = false;

I suspect that D is disabling whole-structure assignment since 
allowing it would mean that the constant `isLeafNode` could be 
changed.


Tried - is no avail.


Re: .opAssign disabled without @disable

2016-04-16 Thread denizzzka via Digitalmars-d-learn

On Saturday, 16 April 2016 at 11:48:56 UTC, denizzzka wrote:

source/package.d(109,31): Error: function 
rtree.RAMNode!(Box!(int, 2), ubyte).RAMNode.opAssign is not 
callable because it is annotated with @disable
source/package.d(110,26): Error: function 
rtree.RAMNode!(Box!(int, 2), ubyte).RAMNode.opAssign is not 
callable because it is annotated with @disable
source/package.d(330,25): Error: template instance 
rtree.RTree!(RAMNode!(Box!(int, 2), ubyte), true) error 
instantiating


Perhaps I should explain that struct RAMNode placed in repository 
above. (And it isn't contains any @disable)




.opAssign disabled without @disable

2016-04-16 Thread denizzzka via Digitalmars-d-learn

Hi!

DMD and LDC2 complain about disabled opAssign, but I am not used 
@disable and depend package "gfm" also isn't uses @disable.


Steps to reproduce:

git clone https://github.com/denizzzka/r-tree.git
cd r-tree
git checkout 803eed22
dub test

Fetching gfm 6.0.0 (getting selected version)...
Placing gfm 6.0.0 to /home/denizzz/.dub/packages/...
Generating test runner configuration '__test__library__' for 
'library' (sourceLibrary).

Performing "unittest" build using dmd for x86_64.
gfm:math 6.0.0: building configuration "library"...
r-tree ~master: building configuration "__test__library__"...
source/package.d(109,31): Error: function 
rtree.RAMNode!(Box!(int, 2), ubyte).RAMNode.opAssign is not 
callable because it is annotated with @disable
source/package.d(110,26): Error: function 
rtree.RAMNode!(Box!(int, 2), ubyte).RAMNode.opAssign is not 
callable because it is annotated with @disable
source/package.d(330,25): Error: template instance 
rtree.RTree!(RAMNode!(Box!(int, 2), ubyte), true) error 
instantiating

dmd failed with exit code 1.

If I am try to add opAssign to struct RAMNode manually it is 
compiles. (But there is enough postblit constructor.)


Re: Can't Compile Global Semaphores?

2016-03-21 Thread denizzzka via Digitalmars-d-learn

On Monday, 27 July 2015 at 20:12:10 UTC, John Colvin wrote:


Yes, but then core.sync.semaphore doesn't support being shared, 
so...


I don't really understand how 
https://github.com/D-Programming-Language/druntime/blob/master/src/core/sync/semaphore.d#L356 is managing to avoid this


Since that time is something cleared up? Faced with the same 
problem


dub dustmite: Initial test fails

2016-02-23 Thread denizzzka via Digitalmars-d-learn

Hi!

I have a code with segfault. I decided to try to take advantage 
with dub dustmite:


$ dub dustmite ~/ssd/pgator_dustmite0 --program-status=139 -- 
--config=my_pgator.conf --debug=true
WARNING: A deprecated branch based version specification is used 
for the dependency vibe-d-postgresql. Please use numbered 
versions instead. Also note that you can still use the 
dub.selections.json file to override a certain dependency to use 
a branch instead.

Copy package 'pgator' to destination folder...
Copy package 'vibe-d-postgresql' to destination folder...
Copy package 'dpq2' to destination folder...
Copy package 'derelict-pq' to destination folder...
Copy package 'derelict-util' to destination folder...
Copy package 'vibe-d' to destination folder...
Copy package 'libasync' to destination folder...
Copy package 'memutils' to destination folder...
Copy package 'libev' to destination folder...
Copy package 'libevent' to destination folder...
Copy package 'openssl' to destination folder...
Executing dustmite...
None => No
object.Exception@DustMite/dustmite.d(243): Initial test fails

but if I try to run already compiled binary it is successfully 
core dumps:


$ ./pgator --config=my_pgator.conf --debug=true; echo $?
2016-02-23T18:07:00.748:package.d:_sharedStaticCtor6:9 DerelictPQ 
loading...
2016-02-23T18:07:00.748:package.d:_sharedStaticCtor6:16 
...DerelictPQ loading finished
2016-02-23T18:07:00.750:package.d:connectionFactory:50 creating 
new connection
2016-02-23T18:07:00.750:package.d:connectionFactory:54 new 
connection is started
2016-02-23T18:07:00.750:package.d:runStatementBlockingManner:126 
runStatementBlockingManner
2016-02-23T18:07:00.750:package.d:doQuery:66 get connection from 
a pool

2016-02-23T18:07:00.753:package.d:doQuery:90 doesQuery() call
2016-02-23T18:07:00.753:package.d:__lambda5:140 consumeInput()
2016-02-23T18:07:00.753:package.d:__lambda5:145 getResult()
2016-02-23T18:07:00.753:package.d:__lambda5:145 getResult()
2016-02-23T18:07:00.754:app.d:main:88 found method row: 
"echo"	"SELECT $1::text as echoed"	["value_for_echo"]	false	
2016-02-23T18:07:00.754:app.d:main:137 Method echo loaded. 
Content: Method("echo", "SELECT $1::text as echoed", 
["value_for_echo"], false)
2016-02-23T18:07:00.754:app.d:main:88 found method row: 
"echo2"	"SELECT $1::text"	["value_for_echo"]	NULL	
2016-02-23T18:07:00.754:app.d:main:132 Value of column 
one_row_flag is NULL, skipping reading of method echo2
2016-02-23T18:07:00.754:app.d:main:88 found method row: 
"wrong_sql_statement"	"wrong SQL statement"	[]	false	
2016-02-23T18:07:00.754:app.d:main:137 Method wrong_sql_statement 
loaded. Content: Method("wrong_sql_statement", "wrong SQL 
statement", [], false)
2016-02-23T18:07:00.754:app.d:main:141 Number of methods in the 
table "pgator_rpc": 3, failed to load: 1
2016-02-23T18:07:00.754:app.d:__foreachbody18:148 try to prepare 
method wrong_sql_statement
2016-02-23T18:07:00.754:package.d:runStatementBlockingManner:126 
runStatementBlockingManner
2016-02-23T18:07:00.754:package.d:doQuery:66 get connection from 
a pool

2016-02-23T18:07:00.754:package.d:doQuery:90 doesQuery() call
2016-02-23T18:07:00.754:package.d:__lambda5:140 consumeInput()
2016-02-23T18:07:00.754:package.d:__lambda5:145 getResult()
2016-02-23T18:07:00.754:package.d:__lambda5:145 getResult()
2016-02-23T18:07:00.755:app.d:__foreachbody18:160 ОШИБКА:  ошибка 
синтаксиса (примерное положение: "wrong")

LINE 1: wrong SQL statement
^
, skipping preparing of method wrong_sql_statement
2016-02-23T18:07:00.755:app.d:__foreachbody18:162 catched
2016-02-23T18:07:00.755:app.d:__foreachbody18:165 next
Ошибка сегментирования (core dumped)
139

How how to understand why dub dustmite doesn't work for me?