Re: Loading of widgets from DML markup and DML Editor in DlangUI

2015-04-14 Thread Vadim Lopatin via Digitalmars-d-announce

On Friday, 10 April 2015 at 19:26:28 UTC, Jonas Drewsen wrote:

Cool!

I am not really that much into qml... but isn't much of the 
power of qml coming from using javascript to do logic and 
bindings?


Can you do D code stuff in the DML markup to handle that part 
e.g. by mixin of the DML?


Keep up the good work.

/Jonas


So far, I'm going to implement

* automatic mapping of loaded widgets to member variables (based 
on matching of widget id and variable names, or, possible mixin 
adding of member variables for all of widgets with ids)


* automatic mapping of loaded widget signals to handlers

Mixing in handlers written in D from DML is possible, in some of 
future implementations. So far, I'm not sure that it's better 
than just having external signal handlers automatically mapped, 
e.g. by name.


sample DML:
{
HorizontalLayout {
TextWidget { text: Enter file name: }
EditLine {
id: edFileName

}
Button {
id: btnOpen
text: Open
click = onBtnOpenClick
}
}
}

...
// class members
EditLine _edFileName;
bool onBtnOpenClick(Widget src) {
window.showMessageBox(Opend, File name:d ~ 
_edFileName.text);

return true;
}

Member variable `EditLine _edFileName;` could be added 
automatically by mixin, or at least it's value can be initialized 
on load
Signal handler may be assigned either if explicitly defined in 
DML (`click = onBtnOpenClick` means widget click signal should be 
connected to member function onBtnOpenClick) or just found based 
on widget Id and signal name (e.g. if there is widget with 
id=btnOpen and class method onBtnOpenClick - loader mixin could 
automatically decide to assign this method as signal handler of 
widget (like it's dont in VB).


I'm not sure if alternative definition is better

Button {
id: btnOpen
text: Open
click = { window.showMessageBox(Opend, File 
name:d ~ edFileName.text); }

}



Re: cdb reader and creator

2015-04-14 Thread Baz via Digitalmars-d-announce

On Monday, 13 April 2015 at 21:34:36 UTC, ketmar wrote:

here is Cdb[1] reader and creator, in two small modules.

reader: [2]
creator: [3]
sample: [4]

it's totally untested, but i believe that is works. at least 
for the

given sample.

Public Domain, based on tinycdb[5].

[1] http://cr.yp.to/cdb.html
[2] http://repo.or.cz/w/iv.d.git/blob_plain/HEAD:/tinycdb.d
[3] http://repo.or.cz/w/iv.d.git/blob_plain/HEAD:/tinycdbmk.d
[4] 
http://repo.or.cz/w/iv.d.git/blob_plain/HEAD:/tinycdb_test/cdbtest.d

[5] http://www.corpit.ru/mjt/tinycdb.html


Hi, i'd have a technical question about cdb, maybe a bit 
off-topic...


Why it was designed to use 256 hashtables ?
Why not single bigger 252 * 256 hashtable ?

Is it only to save space or there are some other reason ?


Re: DlangUI

2015-04-14 Thread Vadim Lopatin via Digitalmars-d-announce

On Tuesday, 20 May 2014 at 18:13:36 UTC, Vadim Lopatin wrote:

Hello!

I would like to announce my project, DlangUI library - 
cross-platform GUI for D.

https://github.com/buggins/dlangui
License: Boost License 1.0


I've added first DlangUI tutorial on DlangUI Wiki:

https://github.com/buggins/dlangui/wiki/Getting-Started

It covers creation of simple DlangUI helloworld project, and then 
illustrates layouts, standard controls, DML, and signals.


Source code for all examples is available on GitHub

https://github.com/buggins/dlangui-examples

I'm looking forward for ideas for next tutorials.


Re: Implementing cent/ucent...

2015-04-14 Thread Dominikus Dittes Scherkl via Digitalmars-d-announce

On Monday, 13 April 2015 at 20:06:11 UTC, Kai Nacke wrote:
On Monday, 13 April 2015 at 09:00:30 UTC, Dominikus Dittes 
Scherkl wrote:

I once had added cent/ucent to std/traits.d


TypeInfo for cent/ucent is now in druntime. std.traits has 
cent/ucent support.

Wow, cool.

I need to address some comments in std.format before it can be 
merged. Other modules (e.g. std.conv) still miss support.

Hmm.
By the way: are also cent/ucent literals defined?
And if yes, what's the postfix for that? Was it T?

cent.max   = 170_141_183_460_469_231_731_637_303_715_884_105_727T
ucent.max  = 340_282_366_920_938_463_463_374_607_431_768_211_455UT


Re: Implementing cent/ucent...

2015-04-14 Thread Kai Nacke via Digitalmars-d-announce
On Tuesday, 14 April 2015 at 10:42:31 UTC, Dominikus Dittes 
Scherkl wrote:

By the way: are also cent/ucent literals defined?
And if yes, what's the postfix for that? Was it T?


There is no postfix defined. If the value of an literal does not 
fit in long/ulong then the type is cent/ucent. I simply followed 
the rules of int/long.


Regards,
Kai


Re: cdb reader and creator

2015-04-14 Thread ketmar via Digitalmars-d-announce
On Tue, 14 Apr 2015 11:50:24 +, Baz wrote:

 Hi, i'd have a technical question about cdb, maybe a bit off-topic...
 
 Why it was designed to use 256 hashtables ?
 Why not single bigger 252 * 256 hashtable ?
 
 Is it only to save space or there are some other reason ?

i honestly don't know. but i bet DJB knows. ;-)

my goal was to simply create cdb-compatible code, so i can work with cdb 
databases without resorting to C library.

signature.asc
Description: PGP signature


EMSI is hiring a D developer

2015-04-14 Thread Justin Whear via Digitalmars-d-announce
EMSI is hiring for an Engineer II to work on D codebases: https://
emsi.bamboohr.com/jobs/view.php?id=30


Re: This week in D #13: =void tip, ddmd, if(arr) warn, dconf registration

2015-04-14 Thread albatroz via Digitalmars-d-announce
Can I suggest to have a summary/list of the last added projects 
to code.dlang.org.


On Monday, 13 April 2015 at 03:37:17 UTC, Adam D. Ruppe wrote:

http://arsdnet.net/this-week-in-d/apr-12.html

http://www.reddit.com/r/d_language/comments/32ek17/this_week_in_d_13_void_tip_ddmd_ifarr_warn_dconf/

https://twitter.com/adamdruppe/status/587459000729473024




Re: EMSI is hiring a D developer

2015-04-14 Thread Rikki Cattermole via Digitalmars-d-announce

On 15/04/2015 4:17 a.m., Justin Whear wrote:

EMSI is hiring for an Engineer II to work on D codebases: https://
emsi.bamboohr.com/jobs/view.php?id=30


Hum, I think I'll try and see if they don't mind remote workers ;)



Re: 2D game engine written in D is in progress

2015-04-14 Thread ZILtoid1991 via Digitalmars-d-announce

https://github.com/ZILtoid1991/VDP-engine

0.9.0 version due to the difference in usability. Needs a lot of 
debugging and testing, but now it can render hundreds of sprites 
without an issue.