Crazy idea for a programming editor in Squeak *for C*

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Crazy idea for a programming editor in Squeak *for C*

timrowledge
So thinking about things related to Subbu's questions it suddenly came to me that we might be able to make a much nicer C editor than most seem to be.

Caution - I use TextWrangler on my iMac when I have to mess with C. This may well bias my opinion.

Seems to me that most so called IDEs that let you handle C code are pretty pathetic. You load a file and scroll up and down it. If you're lucky it scans the file and makes sort of bookmark of function locations etc. You might get a half decent comparison tool to compare different versions.

Now, we have a useful but in need of improvement tool for reading source code files without actually loading them in the FileContentsBrowser. A variant of that could read C source, split it up, parse the bits and bobs and maybe provide a decent structured view of the code.

Yes, I remember ObjectWorks C++ and the debacle of C++ programmers not wanting anything more advanced than vi.

There's also a possible value for this in the Python world where they at least pretend to have a clue about objects.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Law of Logical Argument: Anything is possible if you don't know what you are talking about.




Reply | Threaded
Open this post in threaded view
|

Re: Crazy idea for a programming editor in Squeak *for C*

Tim Johnson-2
Hi Tim,

I would love to see this for C and/or Python.  I too think it would  
be possible and cool.

Maybe a new SHTextStyler subclass or two could come into play.  And  
Subprocess, down the line.

Erm, just had a flashback to what I know of the Smalltalk history of  
the Eclipse IDE.  ;)

Best,
Tim


On Mar 19, 2018, at 10:42 AM, tim Rowledge wrote:

> So thinking about things related to Subbu's questions it suddenly  
> came to me that we might be able to make a much nicer C editor than  
> most seem to be.
>
> Caution - I use TextWrangler on my iMac when I have to mess with C.  
> This may well bias my opinion.
>
> Seems to me that most so called IDEs that let you handle C code are  
> pretty pathetic. You load a file and scroll up and down it. If  
> you're lucky it scans the file and makes sort of bookmark of  
> function locations etc. You might get a half decent comparison tool  
> to compare different versions.
>
> Now, we have a useful but in need of improvement tool for reading  
> source code files without actually loading them in the  
> FileContentsBrowser. A variant of that could read C source, split  
> it up, parse the bits and bobs and maybe provide a decent  
> structured view of the code.
>
> Yes, I remember ObjectWorks C++ and the debacle of C++ programmers  
> not wanting anything more advanced than vi.
>
> There's also a possible value for this in the Python world where  
> they at least pretend to have a clue about objects.
>
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
> Law of Logical Argument: Anything is possible if you don't know  
> what you are talking about.
>
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Crazy idea for a programming editor in Squeak *for C*

Hannes Hirzel
Hello Tim and Tim

A very simple start could be a few lines of code which parse a
C-Program (or JavaScript program) and put all the functions into
methods. For each function a method.
And a 'weight pragma in the method in order to maintain the sort order later.

Then I can manipulate the methods containing the code strings in a
SystemBrowser and later on regenerate the C or JavaScript program.

Then with increased refactoring something more complex could be developed.

This makes sense when developing Smalltalk code which needs some
external C-functions as well.

It might as well be useful to have a generator for Makefiles. Some of
them are difficult to maintain.

Best wishes
Hannes

On 3/19/18, Tm Jhnsn <[hidden email]> wrote:

> Hi Tim,
>
> I would love to see this for C and/or Python.  I too think it would
> be possible and cool.
>
> Maybe a new SHTextStyler subclass or two could come into play.  And
> Subprocess, down the line.
>
> Erm, just had a flashback to what I know of the Smalltalk history of
> the Eclipse IDE.  ;)
>
> Best,
> Tim
>
>
> On Mar 19, 2018, at 10:42 AM, tim Rowledge wrote:
>
>> So thinking about things related to Subbu's questions it suddenly
>> came to me that we might be able to make a much nicer C editor than
>> most seem to be.
>>
>> Caution - I use TextWrangler on my iMac when I have to mess with C.
>> This may well bias my opinion.
>>
>> Seems to me that most so called IDEs that let you handle C code are
>> pretty pathetic. You load a file and scroll up and down it. If
>> you're lucky it scans the file and makes sort of bookmark of
>> function locations etc. You might get a half decent comparison tool
>> to compare different versions.
>>
>> Now, we have a useful but in need of improvement tool for reading
>> source code files without actually loading them in the
>> FileContentsBrowser. A variant of that could read C source, split
>> it up, parse the bits and bobs and maybe provide a decent
>> structured view of the code.
>>
>> Yes, I remember ObjectWorks C++ and the debacle of C++ programmers
>> not wanting anything more advanced than vi.
>>
>> There's also a possible value for this in the Python world where
>> they at least pretend to have a clue about objects.
>>
>>
>> tim
>> --
>> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
>> Law of Logical Argument: Anything is possible if you don't know
>> what you are talking about.
>>
>>
>>
>>
>>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Crazy idea for a programming editor in Squeak *for C*

Hannes Hirzel
Probably a better idea for a start

     EToyHierarchicalTextGizmo example



On 3/19/18, H. Hirzel <[hidden email]> wrote:

> Hello Tim and Tim
>
> A very simple start could be a few lines of code which parse a
> C-Program (or JavaScript program) and put all the functions into
> methods. For each function a method.
> And a 'weight pragma in the method in order to maintain the sort order
> later.
>
> Then I can manipulate the methods containing the code strings in a
> SystemBrowser and later on regenerate the C or JavaScript program.
>
> Then with increased refactoring something more complex could be developed.
>
> This makes sense when developing Smalltalk code which needs some
> external C-functions as well.
>
> It might as well be useful to have a generator for Makefiles. Some of
> them are difficult to maintain.
>
> Best wishes
> Hannes
>
> On 3/19/18, Tm Jhnsn <[hidden email]> wrote:
>> Hi Tim,
>>
>> I would love to see this for C and/or Python.  I too think it would
>> be possible and cool.
>>
>> Maybe a new SHTextStyler subclass or two could come into play.  And
>> Subprocess, down the line.
>>
>> Erm, just had a flashback to what I know of the Smalltalk history of
>> the Eclipse IDE.  ;)
>>
>> Best,
>> Tim
>>
>>
>> On Mar 19, 2018, at 10:42 AM, tim Rowledge wrote:
>>
>>> So thinking about things related to Subbu's questions it suddenly
>>> came to me that we might be able to make a much nicer C editor than
>>> most seem to be.
>>>
>>> Caution - I use TextWrangler on my iMac when I have to mess with C.
>>> This may well bias my opinion.
>>>
>>> Seems to me that most so called IDEs that let you handle C code are
>>> pretty pathetic. You load a file and scroll up and down it. If
>>> you're lucky it scans the file and makes sort of bookmark of
>>> function locations etc. You might get a half decent comparison tool
>>> to compare different versions.
>>>
>>> Now, we have a useful but in need of improvement tool for reading
>>> source code files without actually loading them in the
>>> FileContentsBrowser. A variant of that could read C source, split
>>> it up, parse the bits and bobs and maybe provide a decent
>>> structured view of the code.
>>>
>>> Yes, I remember ObjectWorks C++ and the debacle of C++ programmers
>>> not wanting anything more advanced than vi.
>>>
>>> There's also a possible value for this in the Python world where
>>> they at least pretend to have a clue about objects.
>>>
>>>
>>> tim
>>> --
>>> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
>>> Law of Logical Argument: Anything is possible if you don't know
>>> what you are talking about.
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>



EToyHierarchicalTextGizmo_2018-03-19.png (19K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Crazy idea for a programming editor in Squeak *for C*

Stephan Eggermont-3
In reply to this post by timrowledge
tim Rowledge <[hidden email]> wrote:
> A variant of that could read C source, split it up, parse the bits and
> bobs and maybe provide a decent structured view of the code.

AFAIK the main problem with that is the major impact macros have on this
structure.

Stephan


Reply | Threaded
Open this post in threaded view
|

Re: Crazy idea for a programming editor in Squeak *for C*

Hannes Hirzel
A lower hanging fruit could be to document, provide general examples
and extend Slang

http://wiki.squeak.org/squeak/2267
Slang is a small language with a Smalltalk syntax. It can be easily
translated to C source code. Slang is used to store the Squeak VM code
inside of Squeak. See the methods in classes such as Interpreter for
examples of Slang code.

HH

On 3/20/18, Stephan Eggermont <[hidden email]> wrote:

> tim Rowledge <[hidden email]> wrote:
>> A variant of that could read C source, split it up, parse the bits and
>> bobs and maybe provide a decent structured view of the code.
>
> AFAIK the main problem with that is the major impact macros have on this
> structure.
>
> Stephan
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Crazy idea for a programming editor in Squeak *for C*

monty-3
In reply to this post by timrowledge
The Moose platform could serve as a nice foundation, but I don't know if it still supports Squeak. CAnalyzer might help too.

But I think you're underestimating the capabilities of modern C-supporting IDEs, like CLion, VisualStudio, and Code::Blocks.

> Sent: Monday, March 19, 2018 at 1:42 PM
> From: "tim Rowledge" <[hidden email]>
> To: "The general-purpose Squeak developers list" <[hidden email]>
> Subject: [squeak-dev] Crazy idea for a programming editor in Squeak *for C*
>
> So thinking about things related to Subbu's questions it suddenly came to me that we might be able to make a much nicer C editor than most seem to be.
>
> Caution - I use TextWrangler on my iMac when I have to mess with C. This may well bias my opinion.
>
> Seems to me that most so called IDEs that let you handle C code are pretty pathetic. You load a file and scroll up and down it. If you're lucky it scans the file and makes sort of bookmark of function locations etc. You might get a half decent comparison tool to compare different versions.
>
> Now, we have a useful but in need of improvement tool for reading source code files without actually loading them in the FileContentsBrowser. A variant of that could read C source, split it up, parse the bits and bobs and maybe provide a decent structured view of the code.
>
> Yes, I remember ObjectWorks C++ and the debacle of C++ programmers not wanting anything more advanced than vi.
>
> There's also a possible value for this in the Python world where they at least pretend to have a clue about objects.
>
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
> Law of Logical Argument: Anything is possible if you don't know what you are talking about.
>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Crazy idea for a programming editor in Squeak *for C*

Hannes Hirzel
I see two different issues

1. Analyse  existing C-sources and manipulating them ,
2. Generating C-sources from a more abstract description (e.g. Slang)



On 3/20/18, monty <[hidden email]> wrote:

> The Moose platform could serve as a nice foundation, but I don't know if it
> still supports Squeak. CAnalyzer might help too.
>
> But I think you're underestimating the capabilities of modern C-supporting
> IDEs, like CLion, VisualStudio, and Code::Blocks.
>
>> Sent: Monday, March 19, 2018 at 1:42 PM
>> From: "tim Rowledge" <[hidden email]>
>> To: "The general-purpose Squeak developers list"
>> <[hidden email]>
>> Subject: [squeak-dev] Crazy idea for a programming editor in Squeak *for
>> C*
>>
>> So thinking about things related to Subbu's questions it suddenly came to
>> me that we might be able to make a much nicer C editor than most seem to
>> be.
>>
>> Caution - I use TextWrangler on my iMac when I have to mess with C. This
>> may well bias my opinion.
>>
>> Seems to me that most so called IDEs that let you handle C code are pretty
>> pathetic. You load a file and scroll up and down it. If you're lucky it
>> scans the file and makes sort of bookmark of function locations etc. You
>> might get a half decent comparison tool to compare different versions.
>>
>> Now, we have a useful but in need of improvement tool for reading source
>> code files without actually loading them in the FileContentsBrowser. A
>> variant of that could read C source, split it up, parse the bits and bobs
>> and maybe provide a decent structured view of the code.
>>
>> Yes, I remember ObjectWorks C++ and the debacle of C++ programmers not
>> wanting anything more advanced than vi.
>>
>> There's also a possible value for this in the Python world where they at
>> least pretend to have a clue about objects.
>>
>>
>> tim
>> --
>> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
>> Law of Logical Argument: Anything is possible if you don't know what you
>> are talking about.
>>
>>
>>
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Crazy idea for a programming editor in Squeak *for C*

fniephaus
In reply to this post by Tim Johnson-2
Hi all,

On Mon, Mar 19, 2018 at 7:46 PM Tm Jhnsn <[hidden email]> wrote:
Hi Tim,

I would love to see this for C and/or Python.  I too think it would
be possible and cool.

We've recently worked on adapting Squeak tools for Python and Ruby. [1] shows for example a Squeak debugger for Python and we also have this somewhat working for Ruby. A journal paper with more details and use cases will be presented and published next month (see [2]). Unfortunately, the tool adaptations are still experimental and currently undocumented which is why we haven't released them yet. However, we are continuing this line of work and will of course keep you updated on our progress.

 

Maybe a new SHTextStyler subclass or two could come into play.  And
Subprocess, down the line.

Fun fact: we've actually been able to use Pygments [3] as a SHTextStyler in our prototype. :)

Best,
Fabio

 

Erm, just had a flashback to what I know of the Smalltalk history of
the Eclipse IDE.  ;)

Best,
Tim


On Mar 19, 2018, at 10:42 AM, tim Rowledge wrote:

> So thinking about things related to Subbu's questions it suddenly
> came to me that we might be able to make a much nicer C editor than
> most seem to be.
>
> Caution - I use TextWrangler on my iMac when I have to mess with C.
> This may well bias my opinion.
>
> Seems to me that most so called IDEs that let you handle C code are
> pretty pathetic. You load a file and scroll up and down it. If
> you're lucky it scans the file and makes sort of bookmark of
> function locations etc. You might get a half decent comparison tool
> to compare different versions.
>
> Now, we have a useful but in need of improvement tool for reading
> source code files without actually loading them in the
> FileContentsBrowser. A variant of that could read C source, split
> it up, parse the bits and bobs and maybe provide a decent
> structured view of the code.
>
> Yes, I remember ObjectWorks C++ and the debacle of C++ programmers
> not wanting anything more advanced than vi.
>
> There's also a possible value for this in the Python world where
> they at least pretend to have a clue about objects.
>
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
> Law of Logical Argument: Anything is possible if you don't know
> what you are talking about.
>
>
>
>
>




Reply | Threaded
Open this post in threaded view
|

Re: Crazy idea for a programming editor in Squeak *for C*

Sean P. DeNigris
Administrator
fniephaus wrote
> We've recently worked on adapting Squeak tools for Python and Ruby. [1]
> shows…

Cool! [1] is behind a paywall*. Do you have a link that is freely
accessible? Thanks!

* I'll spare us all the rant about ACM and other mostly obsolete
institutions hoarding scientific knowledge ha ha



-----
Cheers,
Sean
--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html

Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Crazy idea for a programming editor in Squeak *for C*

Robert Hirschfeld
The paper is also available from here:

https://www.hpi.uni-potsdam.de/swa/publications/

Best,
Robert

> On 22 Mar 2018, at 18:46, Sean P. DeNigris <[hidden email]> wrote:
>
> fniephaus wrote
>> We've recently worked on adapting Squeak tools for Python and Ruby. [1]
>> shows…
>
> Cool! [1] is behind a paywall*. Do you have a link that is freely
> accessible? Thanks!
>
> * I'll spare us all the rant about ACM and other mostly obsolete
> institutions hoarding scientific knowledge ha ha
>
>
>
> -----
> Cheers,
> Sean
> --
> Sent from: http://forum.world.st/Squeak-Dev-f45488.html
>



--
Robert Hirschfeld
[hidden email]
www.hirschfeld.org


Reply | Threaded
Open this post in threaded view
|

Re: Crazy idea for a programming editor in Squeak *for C*

Sean P. DeNigris
Administrator
Robert Hirschfeld wrote
> The paper is also available from here…

Thanks!!



-----
Cheers,
Sean
--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html

Cheers,
Sean