View mode: basic / threaded / horizontal-split · Log in · Help
October 11, 2009
Re: dmd support for IDEs
On Sun, 11 Oct 2009 14:58:06 -0700, Walter Bright wrote:

> Moritz Warning wrote:
>> I wrote a JSON parser that is Public Domain and also very fast. It may
>> be helpful.
>> http://dsource.org/projects/tango/ticket/1491
> 
> 
> You need to get this added to the list at http://json.org/

It would need to write a replacement for the un-/escape routines from 
Tango first.
But so far it sounds like a good idea.
October 11, 2009
Re: dmd support for IDEs
Walter Bright, el 11 de octubre a las 14:13 me escribiste:
> Leandro Lucarella wrote:
> >Walter Bright, el 11 de octubre a las 02:38 me escribiste:
> >>Lutger wrote:
> >>>What about file/line/column of the symbol? Is this much work /
> >>>hard work to add?
> >>file/line of course, but I don't see a point to column.
> >
> >See Clang error messages:
> >http://clang.llvm.org/diagnostics.html
> >
> >That's *nice* =)
> >
> 
> I agree, it looks good on paper.
> 
> In fact, I implemented it in the C and C++ compiler from the
> beginning (1982 or so). It's still in dmc, try it - it'll print out
> the error message, followed by the source text of the offending
> line, followed by a ^ under where things went wrong.
> 
> Nobody cared.
> 
> Nobody has ever commented on it - and there have been hundreds of
> thousands of users of it. No magazine review ever mentioned it. When
> I mention it to people as "cool, look at this" they never respond.
> When the conversation is about the quality of error messages, that
> feature never comes up.
> 
> So I dropped it for dmd.
> 
> Nobody noticed.
> 
> Nobody asked why it was done for dmc, and not for dmd. Nobody asked
> for it. Nothing. (Until now.)
> 
> So I am hard pressed to believe this is a worthwhile feature. There
> is a cost to it in memory consumption and compiler execution time,
> so it's not quite free.

Well, I don't know the reasons for that. Maybe bad timing? I don't know
why people didn't like it in the past. I just know it's a damn good
feature.

-- 
Leandro Lucarella (AKA luca)                      http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
So you run and you run to catch up with the sun but it's sinking.
Racing around to come up behind you again.
The sun is the same in a relative way but you're older,
Shorter of breath and one day closer to death.
October 11, 2009
Re: dmd support for IDEs
Jeremie Pelletier wrote:
> Walter Bright wrote:
>> But if you want to contribute, how about a JSON parser for phobos? 
>> You'll need one anyway for your IDE.
>>
>> BTW, JSON parsing comes for free with javascript. Why not incorporate 
>> dmdscript into your IDE as its extension language?
> 
> The official JSON website has tons of bindings, here's the C one:
> 
> http://fara.cs.uni-potsdam.de/~jsg/json_parser/
> 
> I'm gonna try and get it converted to D over the weekend.

After some digging into the C sources, I decided I didn't like the way 
they did it. I wanted the simplicity and elegance of JSON I use with 
jQuery ($.toJSON and $.parseJSON). I looked again at the simple graphs 
on json.org and decided it was simple enough to write a D parser from 
scratch, here's what I have after a few hours of work, both methods 
works, although I didn't thoroughly tested them yet.

http://pastebin.com/f25b67726

Let me know what you think and feel free to add it to phobos if you like 
it :)

Jeremie
October 12, 2009
Re: dmd support for IDEs
Lutger wrote:
> Jacob Carlborg wrote:
> ...
>> As far as I know neither Qt(d) or gtkD uses native controls on platforms
>> other than linux, which to me is unacceptable. The look especially on mac.
> 
> Qt used to try and look like native controls, but now it uses them directly. 
> 

It has pros and cons, Firefox too has the native look and feel without 
using the native controls, so it saves on the overhead of tons of GDI 
handles and can render the entire GUI in cairo.
October 12, 2009
Re: dmd support for IDEs
Jeremie Pelletier wrote:
> Jeremie Pelletier wrote:
>> Walter Bright wrote:
>>> But if you want to contribute, how about a JSON parser for phobos? 
>>> You'll need one anyway for your IDE.
>>>
>>> BTW, JSON parsing comes for free with javascript. Why not incorporate 
>>> dmdscript into your IDE as its extension language?
>>
>> The official JSON website has tons of bindings, here's the C one:
>>
>> http://fara.cs.uni-potsdam.de/~jsg/json_parser/
>>
>> I'm gonna try and get it converted to D over the weekend.
> 
> After some digging into the C sources, I decided I didn't like the way 
> they did it. I wanted the simplicity and elegance of JSON I use with 
> jQuery ($.toJSON and $.parseJSON). I looked again at the simple graphs 
> on json.org and decided it was simple enough to write a D parser from 
> scratch, here's what I have after a few hours of work, both methods 
> works, although I didn't thoroughly tested them yet.
> 
> http://pastebin.com/f25b67726
> 
> Let me know what you think and feel free to add it to phobos if you like 
> it :)
> 
> Jeremie

Looks nice! But it needs to be ported to Phobos, and needs unit tests!
October 12, 2009
Re: dmd support for IDEs
Jeremie Pelletier wrote:
> Lutger wrote:
>> Jacob Carlborg wrote:
>> ...
>>> As far as I know neither Qt(d) or gtkD uses native controls on platforms
>>> other than linux, which to me is unacceptable. The look especially on
>>> mac.
>>
>> Qt used to try and look like native controls, but now it uses them
>> directly.
> 
> It has pros and cons, Firefox too has the native look and feel without
> using the native controls, so it saves on the overhead of tons of GDI
> handles and can render the entire GUI in cairo.

I actually rather dislike GTK from a user standpoint.  It doesn't mesh
well at all on my KDE linux setup.  The file dialog is also a frequent
source of annoyance, as it is different then everything else and seems
to want to fight with me.  Qt is much better at these things.

Too bad we can't just make programs switch between GUI backends at will ;)
October 12, 2009
Re: dmd support for IDEs
Chad J wrote:
> Jeremie Pelletier wrote:
>> Lutger wrote:
>>> Jacob Carlborg wrote:
>>> ...
>>>> As far as I know neither Qt(d) or gtkD uses native controls on platforms
>>>> other than linux, which to me is unacceptable. The look especially on
>>>> mac.
>>> Qt used to try and look like native controls, but now it uses them
>>> directly.
>> It has pros and cons, Firefox too has the native look and feel without
>> using the native controls, so it saves on the overhead of tons of GDI
>> handles and can render the entire GUI in cairo.
> 
> I actually rather dislike GTK from a user standpoint.  It doesn't mesh
> well at all on my KDE linux setup.  The file dialog is also a frequent
> source of annoyance, as it is different then everything else and seems
> to want to fight with me.  Qt is much better at these things.
> 
> Too bad we can't just make programs switch between GUI backends at will ;)

I use gnome myself on Ubuntu, I don't really like KDE :)

We can make programs that switch between GUI backends, most just don't 
go in that direction. Its as easy as graphics engines having GL and DX 
backends for their render system.

I agree however that GTK being in C is rather annoying, C is a great 
language but GUIs is one area where OOP really shines.
October 12, 2009
Re: dmd support for IDEs
Walter Bright wrote:
> Jeremie Pelletier wrote:
>> Jeremie Pelletier wrote:
>>> Walter Bright wrote:
>>>> But if you want to contribute, how about a JSON parser for phobos? 
>>>> You'll need one anyway for your IDE.
>>>>
>>>> BTW, JSON parsing comes for free with javascript. Why not 
>>>> incorporate dmdscript into your IDE as its extension language?
>>>
>>> The official JSON website has tons of bindings, here's the C one:
>>>
>>> http://fara.cs.uni-potsdam.de/~jsg/json_parser/
>>>
>>> I'm gonna try and get it converted to D over the weekend.
>>
>> After some digging into the C sources, I decided I didn't like the way 
>> they did it. I wanted the simplicity and elegance of JSON I use with 
>> jQuery ($.toJSON and $.parseJSON). I looked again at the simple graphs 
>> on json.org and decided it was simple enough to write a D parser from 
>> scratch, here's what I have after a few hours of work, both methods 
>> works, although I didn't thoroughly tested them yet.
>>
>> http://pastebin.com/f25b67726
>>
>> Let me know what you think and feel free to add it to phobos if you 
>> like it :)
>>
>> Jeremie
> 
> Looks nice! But it needs to be ported to Phobos, and needs unit tests!

Here you go: http://pastebin.com/f64b75abb

Compiled on dmd 2.033 against phobos with a unittest and it works great :)

I also needed to port my unicode character handling module to phobos 
because the one currently used doesn't have a isUniControl() method:

http://pastebin.com/fe47f274

Jeremie
October 12, 2009
OT: GUI Libraries
Jeremie Pelletier wrote:
> Chad J wrote:
>>
>> I actually rather dislike GTK from a user standpoint.  It doesn't mesh
>> well at all on my KDE linux setup.  The file dialog is also a frequent
>> source of annoyance, as it is different then everything else and seems
>> to want to fight with me.  Qt is much better at these things.
>>
>> Too bad we can't just make programs switch between GUI backends at
>> will ;)
> 
> I use gnome myself on Ubuntu, I don't really like KDE :)
> 

Right.  Personal preferences make it unlikely for people to realize the
shortcomings of a library on systems that aren't their own.  Thus my
purpose isn't to start a silly Desktop Environment debate, but to point
out hidden deficiencies in software.

If Qt has deficiencies on Gnome or Windows or Mac OS or some other
system I don't use regularly, it'd be swell to have that in the open so
I know what to look for when developing my GUI apps.

I'm actually curious about some of the less prominent ones like
wxWidgets and FLTK in this regard.

> We can make programs that switch between GUI backends, most just don't
> go in that direction. Its as easy as graphics engines having GL and DX
> backends for their render system.
> 

It was sort-of a joke.  A cross platform gui library is, in principle,
supposed to be the final abstraction.  Once you target a gui lib, that
should be it, you are done and it works on every system in an intuitive
way.  Too bad life isn't perfect.  So now we talk of things like a
cross-gui-library  gui library.  An abstraction of abstractions.  That
such a thing is potentially useful is, in and of itself, quite
unfortunate and slightly comical :(

> I agree however that GTK being in C is rather annoying, C is a great
> language but GUIs is one area where OOP really shines.

True words.

(dunno about immediate mode though... but that's another discussion)

C makes for easier bindings at least ;)
October 12, 2009
Re: dmd support for IDEs
Jeremie Pelletier" <jeremiep@gmail.com> wrote in message 
news:hats2b$as0$1@digitalmars.com...
> Lutger wrote:
>> Jacob Carlborg wrote:
>> ...
>>> As far as I know neither Qt(d) or gtkD uses native controls on platforms
>>> other than linux, which to me is unacceptable. The look especially on 
>>> mac.
>>
>> Qt used to try and look like native controls, but now it uses them 
>> directly.
>
> It has pros and cons, Firefox too has the native look and feel without 
> using the native controls, so it saves on the overhead of tons of GDI 
> handles and can render the entire GUI in cairo.

I use FF a lot and umm...no it doesn't. Not remotely. It's always stood out 
as every bit of a blatant GTK app as GAIM, GIMP, or Thunderbird. As soon as 
I can find a browser with equivilents too all my essential hacks (*cough* 
extensions) and *real* controls (which rules out IE and Opera. And 
Chrome/Safari... AH HA HA HA!), then I'm ditching this garbage.
6 7 8 9 10 11 12 13 14
Top | Discussion index | About this forum | D home