Re: DerelictCocoa

2015-07-31 Thread ponce via Digitalmars-d-announce

On Friday, 31 July 2015 at 19:10:05 UTC, Jacob Carlborg wrote:

On 31/07/15 01:21, ponce wrote:


Unfortunately I'm stuck because OS X shared libraries are not
implemented in DMD so it may be quite a long time before I can 
use a
2.068 front-end for all this. My target is the currently 
available

2.066/2.067.


I see, you're using LDC? Then I recommend you have a look at 
the Objective-C bridge [1] I created. It has not been updated 
in a very long time but I think you can use it as a base. 
Perhaps just update it for D2.


It looks very interesting indeed. Another gem from the D1 days 
(Cocoa in 2008?).

That said, I don't promise anything because of time scarcity.



Re: DerelictCocoa

2015-07-31 Thread Jacob Carlborg via Digitalmars-d-announce

On 31/07/15 01:05, ponce wrote:


I guess it's because I based DerelictCocoa on the old DerelictSDL code
you wrote, which was using dynamic binding. It never occurred to me it
could also work statically.


Oh, you looked at _that_ code. I thought you found my Objective-C bridge 
[1].


[1] http://dsource.org/projects/dstep

--
/Jacob Carlborg


Re: DerelictCocoa

2015-07-31 Thread Jacob Carlborg via Digitalmars-d-announce

On 31/07/15 01:21, ponce wrote:


Unfortunately I'm stuck because OS X shared libraries are not
implemented in DMD so it may be quite a long time before I can use a
2.068 front-end for all this. My target is the currently available
2.066/2.067.


I see, you're using LDC? Then I recommend you have a look at the 
Objective-C bridge [1] I created. It has not been updated in a very long 
time but I think you can use it as a base. Perhaps just update it for D2.



Actually I've skimmed it before and failed to understand if it allows to
subclass ObjC objects. If it doesn't then calling the runtime might
still be necessary.


The implementation that is currently in DMD head is a very limited 
implementation that only supports calling instance methods. So no, 
currently it's not possible to subclass Objective-C classes.



Not really a problem since class functions do not seem tricky like
objc_msgSend_*.


Class methods work the same as instance methods. In Objective-C classes 
are objects themselves.



I was also unsure if extern(Objective-C) helps with the runtime
functions themselves, or rather only dispatch to the right runtime
function obj_msgSend_*. Or both.


It will call a method in the same way as the Objective-C compiler would 
do. That means calling obj_msgSend_*.


[1] http://dsource.org/projects/dstep

--
/Jacob Carlborg


Re: Beta D 2.068.0-b2

2015-07-31 Thread Kelet via Digitalmars-d-announce

On Friday, 31 July 2015 at 17:56:23 UTC, Kelet wrote:

On Friday, 31 July 2015 at 15:58:24 UTC, Gerald Jansen wrote:

[...]


Hi Gerald,

MonoTime is the replacement for TickDuration and it's 
initialized from the runtime initialization function (rt_init). 
This is because the GC and others may need time functionality.


[...]


To expand on this, while MonoTime was in 2.067.1, it was not 
initialized in rt_init at the time.


Regards,
Kelet


Re: Beta D 2.068.0-b2

2015-07-31 Thread Kelet via Digitalmars-d-announce

On Friday, 31 July 2015 at 15:58:24 UTC, Gerald Jansen wrote:
I'm not sure if this is the right place to report issues. I 
downloaded dmd.2.068.0-b2.linux.zip, unzipped it and added the 
bin64 directory to my path. The standard hello.d compiles fine 
but segfaults immediately. Details follow. Also rdmd segfaults 
with the same message. (The same process with the 2.067.1 zip 
works fine on the same box.)


Details:
gjansen@gamma:~$ uname -a
Linux gamma 2.6.32-279.14.1.el6.x86_64 #1 SMP Mon Oct 15 
13:44:51 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux

gjansen@gamma:~$ dmd --version
DMD64 D Compiler v2.068.0-b2
Copyright (c) 1999-2015 by Digital Mars written by Walter Bright
gjansen@gamma:~$ dmd hello.d
gjansen@gamma:~$ ./hello
Segmentation fault (core dumped)
gjansen@gamma:~$ gdb hello

(gdb) run
Starting program: /ricerca/gjansen/hello
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x004418e1 in _d_initMonoTime ()
Missing separate debuginfos, use: debuginfo-install 
glibc-2.12-1.80.el6_3.6.x86_64


Hi Gerald,

MonoTime is the replacement for TickDuration and it's initialized 
from the runtime initialization function (rt_init). This is 
because the GC and others may need time functionality.


Unfortunately, it looks like MonoTime does not currently support 
your kernel version. It needs at least Linux 2.6.39. The reason 
being is that it has the CLOCK_BOOTTIME clock which was 
implemented in Linux 2.6.39. Without this clock, the minimum 
version would be Linux 2.6.32.


If I had to hazard a guess, I'd say the offending segfault is 
coming from calling clock_getres(clockArg, &ts) (where clockArg 
is essentially CLOCK_BOOTTIME) in _d_initMonoTime(). It seems to 
call this for all supported Clocks for your platform.


Hopefully some code can be added to only allow CLOCK_BOOTTIME on 
kernels that support it. 2.6.32 is still supported as a longterm 
kernel release.


Regards,
Kelet


Re: Beta D 2.068.0-b2

2015-07-31 Thread Gerald Jansen via Digitalmars-d-announce
I'm not sure if this is the right place to report issues. I 
downloaded dmd.2.068.0-b2.linux.zip, unzipped it and added the 
bin64 directory to my path. The standard hello.d compiles fine 
but segfaults immediately. Details follow. Also rdmd segfaults 
with the same message. (The same process with the 2.067.1 zip 
works fine on the same box.)


Details:
gjansen@gamma:~$ uname -a
Linux gamma 2.6.32-279.14.1.el6.x86_64 #1 SMP Mon Oct 15 13:44:51 
EDT 2012 x86_64 x86_64 x86_64 GNU/Linux

gjansen@gamma:~$ dmd --version
DMD64 D Compiler v2.068.0-b2
Copyright (c) 1999-2015 by Digital Mars written by Walter Bright
gjansen@gamma:~$ dmd hello.d
gjansen@gamma:~$ ./hello
Segmentation fault (core dumped)
gjansen@gamma:~$ gdb hello

(gdb) run
Starting program: /ricerca/gjansen/hello
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x004418e1 in _d_initMonoTime ()
Missing separate debuginfos, use: debuginfo-install 
glibc-2.12-1.80.el6_3.6.x86_64




SDLang-D v0.9.2

2015-07-31 Thread Nick Sabalausky via Digitalmars-d-announce
SDLang-D: A library to parse/generate SDL (Simple Data Language) files. 
Offers both DOM and StAX/Pull APIs.


SDL is like XML/JSON/YAML, but is low-verbosity, simpler than YAML, and 
supports comments and basic datatypes. It looks like this:



// An example of SDL:
folder "myFiles" color="yellow" protection=on {
folder "my images" {
file "myHouse.jpg" color=true date=2005/11/05
file "myCar.jpg" color=false date=2002/01/05
}
// Another folder
folder "my documents" {
document "resume.pdf"
}
}


SDLang-D Homepage:
https://github.com/Abscissa/SDLang-D

Changes for v0.9.2:
---
Full Changelog:
https://github.com/Abscissa/SDLang-D/blob/master/CHANGELOG.md

- New: Uses travis-ci.org for continuous integration testing.

- Change: Updated package.json to newer dub.json name.

- Fixed: #16: Now fixed for DUB users, too: Access Violation when using 
the pull parser.


- Fixed: #21: Remove unneeded "buildOptions" from DUB package config 
(fixes a DUB warning) (@schuetzm)


- Fixed: #28/#29: Wrong line count for Windows style line breaks. 
(@s-ludwig)


- Fixed: Fixed running unittests via DUB. (Part of #29) (@s-ludwig)

- Fixed: Trailing line comments incorrectly treated as line continuation 
instead of newline (Related: #20, plus libsdl-d's e565f30 and c6dc722) 
(@Dicebot)


- Improved: #22/#23: Internal improvements (@schuetzm)


Re: Beta D 2.068.0-b2

2015-07-31 Thread Kagamin via Digitalmars-d-announce

On Thursday, 30 July 2015 at 18:54:03 UTC, Rainer Schuetze wrote:

That was fast. Thanks!


README in github repo still has some outdated links to dsource. 
Also bugzilla address is https://issues.dlang.org/