Re: DerelictCocoa

2015-08-14 Thread ponce via Digitalmars-d-announce

On Thursday, 30 July 2015 at 18:21:00 UTC, Jacob Carlborg wrote:


I had a quick look at the implementation. You're not using the 
objc_msgSend_* family of functions correctly. That's one of the 
main reasons why extern(Objective-C) was implemented. I 
strongly recommend you adapting extern(Objective-C) instead. At 
least read the commit message [1] for the commit which 
implements extern(Objective-C). It explains how objc_msgSend_* 
works.


I can provide more detail if necessary.


Hi Jacob,

I'd be interested by an email or IRC conversation about this. How 
best to contact you?


I managed to create a NSView subclass classes at runtime and 
override methods (that involved instance variables for the this 
pointer).


However a painful thing is for those function returning NSPoint. 
Some guidance would be welcome!





Re: DerelictCocoa

2015-08-14 Thread Jacob Carlborg via Digitalmars-d-announce

On 2015-08-14 14:39, ponce wrote:


I see. I've indeed started to cast but only to get the right return
type, and left the vararg list. That may be the problem.


The signature of the objc_msgSend function is mostly irrelevant. The 
function needs to be casted because it will jump to the implementation 
of the method so the arguments to the objc_msgSend call needs to be 
setup as the implementation of the method expects.


--
/Jacob Carlborg


Re: mood : simple vibe.d based blog implementation

2015-08-14 Thread David Nadlinger via Digitalmars-d-announce

On Friday, 14 August 2015 at 18:51:33 UTC, Dicebot wrote:

- HTTPS-only


By the way, Firefox on Mac does not recognize your TLS 
certificate as valid.


 – David


Re: mood : simple vibe.d based blog implementation

2015-08-14 Thread Adam D. Ruppe via Digitalmars-d-announce

On Friday, 14 August 2015 at 18:51:33 UTC, Dicebot wrote:
A bit more details - 
https://blog.dicebot.lv/posts/2015/08/In_the_mood_for_some_releasing


huh, this doesn't look awful. I've been thinking about starting a 
fancier blog but I hate all blog software too. So I just write 
html files but that's a moderate pain so I was going to write my 
own and just haven't gotten around to it.


Anyway, I might try this. (and i might not, NIH and all. :D )


mood : simple vibe.d based blog implementation

2015-08-14 Thread Dicebot via Digitalmars-d-announce
A bit more details - 
https://blog.dicebot.lv/posts/2015/08/In_the_mood_for_some_releasing


Project repo - https://github.com/Dicebot/mood
Branch which powers actual blog.dicebot.lv - 
https://github.com/Dicebot/mood/tree/blog.dicebot.lv


Copy of feature list for quick overview:

- stand-alone binary with minimal external dependencies
- simple deployment under dedicated posix user
- straightforward code, minimal to none configurability - fork 
instead
- basic features include publishing posts, tags and RESTful API 
for data model
- with -version=MoodWithPygmentize does out of the box code 
highlighting if `pygmentize` is on $PATH

- no JavaScript
- HTTPS-only
- no database needed, articles can be edited as simple Markdown 
files


Feedback is always welcome but I must warn you that it can easily 
take months before I address it ;)


Re: mood : simple vibe.d based blog implementation

2015-08-14 Thread Dicebot via Digitalmars-d-announce

On Friday, 14 August 2015 at 18:55:19 UTC, David Nadlinger wrote:

On Friday, 14 August 2015 at 18:51:33 UTC, Dicebot wrote:

- HTTPS-only


By the way, Firefox on Mac does not recognize your TLS 
certificate as valid.


 – David


Yeah, I am aware of that issue, need to embed signature chains of 
my CA (from other CA) into certificate as it is not that commonly 
installed by default. Will address ASAP.


Re: DerelictCocoa

2015-08-14 Thread ponce via Digitalmars-d-announce

On Friday, 14 August 2015 at 14:44:13 UTC, Jacob Carlborg wrote:

On 2015-08-14 14:39, ponce wrote:

I see. I've indeed started to cast but only to get the right 
return

type, and left the vararg list. That may be the problem.


The signature of the objc_msgSend function is mostly 
irrelevant. The function needs to be casted because it will 
jump to the implementation of the method so the arguments to 
the objc_msgSend call needs to be setup as the implementation 
of the method expects.


Thanks. I've solved my problem which was about D callbacks 
signatures instead of objc_msgSend trampolines. Oddly enough, 
variadic calls seem to work for now.


Re: mood : simple vibe.d based blog implementation

2015-08-14 Thread Dicebot via Digitalmars-d-announce

On Friday, 14 August 2015 at 20:50:16 UTC, Nick Sabalausky wrote:

On 08/14/2015 02:51 PM, Dicebot wrote:

A bit more details -
https://blog.dicebot.lv/posts/2015/08/In_the_mood_for_some_releasing



Nice.

One thing: can i haz rss/atom plz?


https://blog.dicebot.lv/posts.rss
https://github.com/Dicebot/mood/blob/master/source/mood/rendering/rss.d

But I don't think it actually works yet - haven't even tested it 
with any RSS client. Just quick proof of concept.


Re: mood : simple vibe.d based blog implementation

2015-08-14 Thread Nick Sabalausky via Digitalmars-d-announce

On 08/14/2015 02:51 PM, Dicebot wrote:

A bit more details -
https://blog.dicebot.lv/posts/2015/08/In_the_mood_for_some_releasing



Nice.

One thing: can i haz rss/atom plz?


Re: mood : simple vibe.d based blog implementation

2015-08-14 Thread ChangLong via Digitalmars-d-announce

On Friday, 14 August 2015 at 20:57:22 UTC, Dicebot wrote:
On Friday, 14 August 2015 at 20:50:16 UTC, Nick Sabalausky 
wrote:

On 08/14/2015 02:51 PM, Dicebot wrote:

A bit more details -
https://blog.dicebot.lv/posts/2015/08/In_the_mood_for_some_releasing



Nice.

One thing: can i haz rss/atom plz?


https://blog.dicebot.lv/posts.rss
https://github.com/Dicebot/mood/blob/master/source/mood/rendering/rss.d

But I don't think it actually works yet - haven't even tested 
it with any RSS client. Just quick proof of concept.


With third party Javascript comments system and image upload will 
be perfect.


Re: DerelictCocoa

2015-08-14 Thread ponce via Digitalmars-d-announce

On Friday, 14 August 2015 at 12:31:15 UTC, Jacob Carlborg wrote:

On 2015-08-14 13:19, ponce wrote:

How best
to contact you?


I guess it depends on the time zones, I'm living in UTC+2.


I'm in the UTC+1 zone.

Yeah, here comes the tricky part. All methods returning a 
struct must use the objc_msgSend_stret, EXCEPT if the struct is 
so small it will fit in registers, then it must use the regular 
objc_msgSend function.


Also, you always need to cast the objc_msgSend_* function to 
the correct signature, the signature of the target method.


I see. I've indeed started to cast but only to get the right 
return type, and left the vararg list. That may be the problem.





Re: DerelictCocoa

2015-08-14 Thread Jacob Carlborg via Digitalmars-d-announce

On 2015-08-14 13:19, ponce wrote:


Hi Jacob,

I'd be interested by an email or IRC conversation about this. How best
to contact you?


I guess it depends on the time zones, I'm living in UTC+2.


I managed to create a NSView subclass classes at runtime and override
methods (that involved instance variables for the this pointer).

However a painful thing is for those function returning NSPoint. Some
guidance would be welcome!


Yeah, here comes the tricky part. All methods returning a struct must 
use the objc_msgSend_stret, EXCEPT if the struct is so small it will fit 
in registers, then it must use the regular objc_msgSend function.


Also, you always need to cast the objc_msgSend_* function to the correct 
signature, the signature of the target method.


--
/Jacob Carlborg