April 05, 2011
Am 05.04.2011 03:25, schrieb Michel Fortin:
> On 2011-04-04 19:55:44 -0400, Adam Ruppe <destructionator@gmail.com> said:
>
>> Michel Fortin wrote:
>>> On the other hand, one thing that is missing right now, in D and in
>>> most languages, is a standard way to display graphics.
>>
>> Actually, I wrote something to do that last year, but I thought
>> it was too trivial to share.
>>
>> What you do is just draw some RGB stuff to a big memory buffer. Then
>> you can save as bmp, png, or create a window to display it.
>>
>> There was no interaction with the window, except closing it. You'd
>> pop up the window so the user can review the picture, then he closes
>> it and your program continues where it left off.
>>
>> Changing it to allow some updating and interaction shouldn't be
>> too hard.
>>
>> It worked for both win32 and x11, no libraries required.
>
> Reminds me of David Simcha's plot2kill, which also has such a layer on
> top of which it implements plot drawing.
> <http://www.dsource.org/projects/plot2kill>
>
>
>> The reason I wrote it was that I really miss the simplicity of DOS
>> programming, where with just a few lines of inline asm, you have
>> a dead-simple video buffer to play with.
>
> Indeed. Today you generally have to pile up a lot of GUI code just to be
> able to draw a square; all the simplicity is lost and portability is hard.
>
> I think such a module would be a great addition to Phobos.
>

@Michael
Your right. That's what I've tried to say in my other thread. Just a _standard_ way to display graphics. This could be a base for other works.

@Adam
Have you some code around, which we can push further?


°Matthias
April 05, 2011
On 2011-04-05 04:39, Adam D. Ruppe wrote:
> Michel Fortin:
>> Reminds me of David Simcha's plot2kill, which also has such a layer
>> on top of which it implements plot drawing.
>
> Aye, he and I have shared some code in the past.
>
>> I think such a module would be a great addition to Phobos.
>
> If I can find a weekend, I'll see about quickly whipping it together
> for a proposal. I don't know anything about Mac OSX though, so unless
> the X11 will work there, I won't be able to provide any access to
> that.

X11 will work but I think it's not worth it if it isn't native. But maybe someone else could contribute with a Mac OS X version.

-- 
/Jacob Carlborg
April 05, 2011
Am 05.04.2011 04:39, schrieb Adam D. Ruppe:
> Michel Fortin:
>> Reminds me of David Simcha's plot2kill, which also has such a layer
>> on top of which it implements plot drawing.
>
> Aye, he and I have shared some code in the past.
>
>> I think such a module would be a great addition to Phobos.
>
> If I can find a weekend, I'll see about quickly whipping it together
> for a proposal. I don't know anything about Mac OSX though, so unless
> the X11 will work there, I won't be able to provide any access to
> that.

Yeah, would be cool if you could do that. I would like to write such a proposal myself, but since english is not my native language, it's better somone else do it. :)

°Matthias
April 05, 2011
On 2011-04-05 05:23, Nick Sabalausky wrote:
> "Adam D. Ruppe"<destructionator@gmail.com>  wrote in message
> news:ine114$14ar$1@digitalmars.com...
>> Nick Sabalausky wrote:
>>> Looking at the pages that are there for QtD, and the source
>>> browser, I'm honestly not sure how to even get started with it.
>>
>> Somewhere, there was a binary distribution with the needed .libs..
>> I don't remember where, but I think I still have a copy on my
>> other laptop (not available right now though).
>>
>> Note that the duic for Qt Designer files apparently is behind
>> some changes - it won't work right. Gotta write straight D yourself.
>>
>> But, you install it however, the process on the site I think works
>> but it takes a little while.
>>
>> Anyway, here's a hello world I just whipped up with some comments
>> to keep in mind - stuff that took me hours to figure out...
>>
>
> Thanks.
>
>
>> The compile line looks like this on Linux:
>> dmd
>> hello.d -I/usr/local/include/d -L-L/usr/local/lib -L-lqtdgui -L-lqtdcore
>> -L-lcpp_core -L-lcpp_gui -L-lQtGui -L-lQtCore
>>
>
> Hmm, I really wish DMD had a cmdline param to specify a library to be passed
> to the linker rather than needing to use "-L". Makes it impossible to write
> a cross-platform DMD command for anything that requires linking to a lib.
>
> Should "pragma(lib, nameoflib);" work, or was that just a special thing in
> bu(il)d?

pragma(lib) works but I don't think it's cross-platform. You have to specify the extension. DSSS/rebuild and bu(il)d supports pragma(link, "link") which lets you specify any options to the linker.

>> Note it takes a few seconds to compile. Pretty slow for D.
>>
>
> Psshh. Compiling DDMD takes a minute or two. I can live with a few seconds
> :)
>
>
>> It's similar on Windows, but since I don't have my win laptop
>> available right now I don't quite remember what it was exactly.
>>
>> Anyway, the program:
>>
> [...snip...]
>
> Thanks. That should help. It does seem that QtD could *really* use some
> D-ification, though. Like arrays of delegates instead of signals/slots. And
> properties instead of the get*/set* functions that trigger my flashbacks of
> Java.
>
>
>


-- 
/Jacob Carlborg
April 05, 2011
On 2011-04-05 05:42, Andrej Mitrovic wrote:
> On 4/5/11, Nick Sabalausky<a@a.a>  wrote:
>> Hmm, I really wish DMD had a cmdline param to specify a library to be passed
>> to the linker rather than needing to use "-L". Makes it impossible to write
>> a cross-platform DMD command for anything that requires linking to a lib.
>
> But you can pass .lib files directly to DMD, I don't understand why
> people use -L.

It's handy if you have a common directory with lib files.

-- 
/Jacob Carlborg
April 05, 2011
On 2011-04-05 09:08, Nick Sabalausky wrote:
> "Andrej Mitrovic"<andrej.mitrovich@gmail.com>  wrote in message
> news:mailman.3178.1301970383.4748.digitalmars-d@puremagic.com...
>> On 4/5/11, Nick Sabalausky<a@a.a>  wrote:
>>> After all, I
>>> *really* want to get around to making my own web browser (based off
>>> either
>>> Mozilla or Chromium) - I'm getting really fed up with the current state
>>> of
>>> available web browsers. Well, and the web as a whole (god I fucking hate
>>> the
>>> web), but one step at a time, I guess).
>>
>> I'll be the first to install it.
>>
>> Btw, there's a full web browser example in the QtD sources. But it has
>> to be ported to D2. And then you have to deal with any eventual bugs
>> along the way. :]
>
> Ha! I may not need to do much after all: I was just looking through
> Wikipedia's giant list of browsers, found a few that looked potentially
> promising, tried them all and...well, was mostly disappointed. But the
> *last* one I had left to try I've been really impressed with so far:
>
> Arora (Qt/WebKit)
> http://code.google.com/p/arora/
>
> I've only tried it breifly, but the UI is *actually nice*! Only modern
> browser out there with a UI that isn't absolutely horrid. I didn't even see
> *one* instance of invisible-text on my light-on-dark system, which is
> unbeleivavly rare among all software these days.
>
> And it has a lot of essential stuff built in, like ad blocking, disableable
> JS, and a "ClickToFlash" which I haven't tried out yet. There's still a few
> things it seems like it might be missing, like equivalents to NoScript,
> BetterPrivacy and maybe DownloadHelper and DownThemAll, but most of those
> are less important to me, and even as it is right now it's a damn good
> start. Maybe I could add some of that remaining stuff, or heck, maybe even
> port the whole thing to D ;)

I think it looks quite similar to Firefox, at least the Mac OS X version.

-- 
/Jacob Carlborg
April 05, 2011
On 2011-04-05 12:28, Nick Sabalausky wrote:
> "Jacob Carlborg"<doob@me.com>  wrote in message
> news:inen8g$2cec$1@digitalmars.com...
>> On 2011-04-05 03:36, Nick Sabalausky wrote:
>>> "Daniel Gibson"<metalcaedes@gmail.com>   wrote in message
>>> news:inddni$kmi$3@digitalmars.com...
>>>>
>>>> I don't know if wee need yet another GUI library.
>>>> Are you sure Qt and DWT aren't good enough?
>>>>
>>>
>>> AIUI:
>>>
>>> DWT doesn't support D2 (neither does wxD).
>>
>> The Windows port now works with D2. Working on the Linux port.
>>
>
> Yea, I just saw another post mentioning that. That's awesome :)
>
>>> QtD requires a patched DMD, MinGW (which is fucking god-awful), and cmake
>>> (I
>>> have to let some variant of "make" touch my computer? Why can't we just
>>> let
>>> make die?). And it requires running your code through a preprocessor.
>>>
>>> And none of those have actual API documentation, they just refer to the
>>> C/C++ docs. I use D because I never want to look at another line of C++
>>> as
>>> long as I live.
>>
>> SWT is written in Java :)
>>
>
> Oh yea, that's right :)
>
>
>

Except for the bindings to the native functions which is written in C with JNI but there's no reason to look at those.

-- 
/Jacob Carlborg
April 05, 2011
On 2011-04-05 13:08, Matthias Pleh wrote:
> Am 05.04.2011 10:43, schrieb Jacob Carlborg:
>>
>> Why is C++/Qt good enough but not D/Qt ?
>
> As I mentioned before, I could live with such a solution.
> When we decided our strategy one year ago, QtD was far away from ready
> but gtkD was already usable and stable. I was the one how recommend the
> use of D/gtkD. But there exist developers and manager, who _don't_ want
> an ecosystem with different languages. (That's not my opinion, but the
> meaning of our lead developer and our managers)
> So this means:
> - D solution:
> gtkD -> D
> gtk+ -> c
> phobos -> D
> perhabs other libraries needed?
> - C++ solution:
> Qt -> C++
> STL -> C++
> optional:
> Boost -> C++
>
>
> This is also the reason why so many developers like VisualStudio and
> .Net! You install it and you have everything needed from one hand.
> - IDE
> - .Net with networking, GUI , Filesystem, ... -> all coded in C# (except
> the winapi which is a system library)
>
> Ok, I know, these peoples also are the one who don't know the power of a
> really good OS like linux.
> In Ubuntu I just type:
> $ sudo apt-get install qtcreator
> and I have also everything installed I need for development.
> But this is not the case on windows. Windows user thinks different.
>
> So this discussion is really the same as Windows vs. linux.
> There is always someone who persist on windows, regarless how good other
> systems are!
>
> So I think for short or middle term such solution like gtkD, QtD, DWT
> are good, but for the long term the D community needs a D GUI library
> completly written in D.
>
> Just my thoughts
> °Matthias
>

Ok, I see.

-- 
/Jacob Carlborg
April 05, 2011
On 2011-04-05 13:08, Matthias Pleh wrote:
> So I think for short or middle term such solution like gtkD, QtD, DWT
> are good, but for the long term the D community needs a D GUI library
> completly written in D.
>
> Just my thoughts
> °Matthias
>

You do know that DWT is completely written in D? Don't you think we can create an environment for creating D GUI applications using DWT?

-- 
/Jacob Carlborg
April 05, 2011
Am 05.04.2011 15:06, schrieb Jacob Carlborg:
> On 2011-04-05 13:08, Matthias Pleh wrote:
>> So I think for short or middle term such solution like gtkD, QtD, DWT
>> are good, but for the long term the D community needs a D GUI library
>> completly written in D.
>>
>> Just my thoughts
>> °Matthias
>>
>
> You do know that DWT is completely written in D? Don't you think we can
> create an environment for creating D GUI applications using DWT?
>

Yes, that would be an option. I have thought several times about that.
But I think, to get really acceptet by a wide range of developers, the library must be adjusted, to suit better the D coding style. This way we could get the whole power of D. But this also means that you get more and more away from the java path and sometime you are not able any more to merge changes in the java path to D.
So this means, this would really be a fork, not just a port.
(I hope, I have explained it correctly in my broken english, and I hope it sound not rude :|


°Matthias