A keyboard controlled code editor, how difficult would that be?

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

Re: A keyboard controlled code editor, how difficult would that be?

Peter Uhnak
On Wed, Sep 23, 2015 at 4:21 AM, Alexandre Bergel
<[hidden email]> wrote:
> I have not tried, but can you compile methods?

Not yet.

Reply | Threaded
Open this post in threaded view
|

Re: A keyboard controlled code editor, how difficult would that be?

abergel
Looks like an important step in my opinion.
Keep pushing:-)

Cheers,
Alexandre


> On Sep 23, 2015, at 6:04 AM, Peter Uhnák <[hidden email]> wrote:
>
> On Wed, Sep 23, 2015 at 4:21 AM, Alexandre Bergel
> <[hidden email]> wrote:
>> I have not tried, but can you compile methods?
>
> Not yet.
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




Reply | Threaded
Open this post in threaded view
|

Re: A keyboard controlled code editor, how difficult would that be?

Stephan Eggermont-3
In reply to this post by Peter Uhnak
On 23-09-15 11:04, Peter Uhnák wrote:
> On Wed, Sep 23, 2015 at 4:21 AM, Alexandre Bergel
> <[hidden email]> wrote:
>> I have not tried, but can you compile methods?
>
> Not yet.

Would be great if someone would take a look.
I'm probably doing something silly.

Added support for mouse based column manipulation
When navigating, I opens a spotter on implementors
(not yet the right one) and adds a card (not yet in the right position)

Stephan


Screenshot from 2015-09-23 18:14:29.png (62K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: A keyboard controlled code editor, how difficult would that be?

Stephan Eggermont-3
In reply to this post by Peter Uhnak
On 23-09-15 03:21, Peter Uhnák wrote:

>          aMorph passenger do: [ :each |
>              each isClass ifTrue: [
>                  each methods do: [ :method |
>                     self addMorph: (CodeCard class: method methodClass
> selector: method selector)
>                 ]
>              ].
>              each isCompiledMethod ifTrue: [
>                  self addMorph: (CodeCard class: each methodClass
> selector: each selector)
>              ]
>          ]

Takes 14 seconds with Morph, and the result is not exactly usable.
For the method category, I suppose I can ask the TransferMorph for the
dragSource which I can ask for the currrent selection to find out which
class is meant.

Stephan


Reply | Threaded
Open this post in threaded view
|

Re: A keyboard controlled code editor, how difficult would that be?

Offray
In reply to this post by philippeback
I second Phil's argument on the main problem being the lack of consistency of shorcuts between platforms and contexts. Ctrl+c, Ctrl+v is the most felt one, particularly on apps that use GT toolkit. Seeing Stephan experiments' is inspiring.

Cheers,

Offray

On 21/09/15 15:29, [hidden email] wrote:


On Mon, Sep 21, 2015 at 9:32 PM, Peter Uhnák <[hidden email]> wrote:
On Mon, Sep 21, 2015 at 9:05 PM, Andrew Glynn <[hidden email]> wrote:
> I'm not sure that those developers will ever be happy with Smallltalk.
> Unless you can do everything in VI and compile on the command line, they
> feel there's something wrong.

Perhaps you need to widen your perspective.
Just because there are fundamentalists on one side doesn't mean that
you have to became fundamentalist on the other side to balance it
out...

Pharo is full of shortcuts, because they are very useful. (And if you
are not using them you are only hurting yourself.)
The point is not to take everything to extreme, but to see what's
valuable and explore.


The main issue is that the shortcuts aren't consistent across platforms (or sometimes just conflict or do not work).
Like in Pharo 5/Windows, some things are okay with Ctl-key, and not Alt-key (they were in the past). And some Alt-key works in specific contexts.
Or in Linux, some things are giving problems.

I like the new $r command | $r control | ... scheme. Much cleaner. What is not nice is that GTInspector isn't picking up the new combos as it displays the KM class and not the shortcut.

Back to keyboard, the TilingWindowManager (working back on that atm) has potential.
I am a vim and tmux user, and Ctl-W hjkl is really useful, as is Ctl-PgUp/PgDown, Or Ctl-z etc.
One of the features I am going to add is that Ctl-W hjkl window selection as it is too good to pass.

I am mousing a lot in Pharo (even if I know about the shortcuts). It is nice to be able to search around by point and click.

Now, we need to rationalize some wordings, especially "Users of X", "References to X". Confuses people.

With such keyboard movements, the desktop manager, a good TWM, and spotter, that's a great thing. Playground needs to be integrated closer with spotter. I want to launch a playground from there, using what I typed as a command (yes, I know there were discussions for/against that one. Still, I find myself retyping into Playground what  typed into Spotter. Frustrating.)

There is a lot of power in Pharo keybindings, we need to streamline this. What an awesome tool we have here!

Excited by Pharo more than ever.

Phil
 

Peter




Reply | Threaded
Open this post in threaded view
|

Re: A keyboard controlled code editor, how difficult would that be?

Offray
In reply to this post by Peter Uhnak
Peter, Could you share a link to a bigger screenshot of your workflow with code cards? Just curious about this feature.

Thanks,

Offray

On 21/09/15 19:21, Peter Uhnák wrote:
This is great, I'm really enjoying it!

Understanding behavior spread across several methods can now be done trivially at a glance instead of remembering everything, making paper notes, and slouching through billion browsers.
Also I can finally see long methods at once. :p



Couple notes:
1. The theme is not respected. (Also it's 2:15 AM here ;)
2. When method is reformatted, or code added the height doesn't change -- I would expect it to adapt automatically

And as I've mentioned originally, it would be great to further encourage exploration.
Currently when I want to add a new card from method I do "select code" -> "browse senders/implementors" -> "select what I want" -> "browse" -> "drag".
It would be great if I could drag directly from the Message Browser (or even add it via shortcut from Message Browser).

Thanks!!

Peter

On Mon, Sep 21, 2015 at 11:52 PM, Stephan Eggermont <[hidden email]> wrote:
On 21-09-15 21:25, Peter Uhnák wrote:
This is really cool. Because even on my 24" screen I can comfortably
have only couple (4) of system browser opened at once (and I am
interested only in the method).

The code card trick with expanded and compact view could easily be integrated in Nautilus.

It would be interesting to integrate it with MessageBrowser and
Spotter, so I could (with shift+enter or something) open your card
instead of Nautilus.
For example I have scoped view of my package and I ctrl+b+n on a
selector and it opens cards with the senders.

I'll need to think through the navigation one might want,i.e.
>From the navigation point of a card (esc  out of editing),
- create a new card
- replace the current card
- delete the current card

When creating or replacing
- use spotter
- new package, class, or method
- senders or implementers
- playground

etc.

Stephan





Reply | Threaded
Open this post in threaded view
|

Re: A keyboard controlled code editor, how difficult would that be?

Peter Uhnak
On Mon, Sep 28, 2015 at 4:25 PM, Offray Vladimir Luna Cárdenas <[hidden email]> wrote:
Peter, Could you share a link to a bigger screenshot of your workflow with code cards? Just curious about this feature.

Hmm, what email client are you using? Because the image was not resized.

but if you right-click and "open image in new tab" it is in original size,


And finally gmail shows the image also downscaled, but I can simply click on it to show it enlarged.

So if you see the image small, blame your mail client. :) (and click the link above)

Peter
Reply | Threaded
Open this post in threaded view
|

Re: A keyboard controlled code editor, how difficult would that be?

Offray
Thanks Peter, seems a problem related with thunderbird. I will see what's happening. Cheers,

Offray

On 28/09/15 09:55, Peter Uhnák wrote:
On Mon, Sep 28, 2015 at 4:25 PM, Offray Vladimir Luna Cárdenas <[hidden email]> wrote:
Peter, Could you share a link to a bigger screenshot of your workflow with code cards? Just curious about this feature.

Hmm, what email client are you using? Because the image was not resized.

but if you right-click and "open image in new tab" it is in original size,


And finally gmail shows the image also downscaled, but I can simply click on it to show it enlarged.

So if you see the image small, blame your mail client. :) (and click the link above)

Peter

Reply | Threaded
Open this post in threaded view
|

Re: A keyboard controlled code editor, how difficult would that be?

Peter Uhnak
As for changing/updating the code in the  cards...

maybe we can look at MessageBrowser because it should have all the necessary behavior.

Peter

On Mon, Sep 28, 2015 at 4:58 PM, Offray Vladimir Luna Cárdenas <[hidden email]> wrote:
Thanks Peter, seems a problem related with thunderbird. I will see what's happening. Cheers,

Offray


On 28/09/15 09:55, Peter Uhnák wrote:
On Mon, Sep 28, 2015 at 4:25 PM, Offray Vladimir Luna Cárdenas <[hidden email][hidden email]> wrote:
Peter, Could you share a link to a bigger screenshot of your workflow with code cards? Just curious about this feature.

Hmm, what email client are you using? Because the image was not resized.

but if you right-click and "open image in new tab" it is in original size,


And finally gmail shows the image also downscaled, but I can simply click on it to show it enlarged.

So if you see the image small, blame your mail client. :) (and click the link above)

Peter


Reply | Threaded
Open this post in threaded view
|

Re: A keyboard controlled code editor, how difficult would that be?

Stephan Eggermont-3
On 29-09-15 01:28, Peter Uhnák wrote:
> As for changing/updating the code in the  cards...
>
> maybe we can look at MessageBrowser because it should have all the
> necessary behavior.

That is difficult. MessageBrowser uses Spec, so there are some
abstractions in the way. Do you know if RubMethodEditingExample
ever worked to commit? It does not now.

Stephan



Reply | Threaded
Open this post in threaded view
|

Re: A keyboard controlled code editor, how difficult would that be?

Peter Uhnak
> MessageBrowser uses Spec, so there are some abstractions in the way. Do you know if RubMethodEditingExample ever worked to commit?
I have no idea (and very limited Rubric/Morphic knowledge).

But if it worked before it should be reported as bug to the tracker?

Is there a reason why this is not in the catalog browser? Do you feel it's not production-ready (missing editing)? Because I am very happy consumer even in this state. :)

Peter

On Tue, Sep 29, 2015 at 9:33 PM, Stephan Eggermont <[hidden email]> wrote:
On 29-09-15 01:28, Peter Uhnák wrote:
As for changing/updating the code in the  cards...

maybe we can look at MessageBrowser because it should have all the
necessary behavior.

That is difficult. MessageBrowser uses Spec, so there are some abstractions in the way. Do you know if RubMethodEditingExample
ever worked to commit? It does not now.

Stephan




Reply | Threaded
Open this post in threaded view
|

Re: A keyboard controlled code editor, how difficult would that be?

Stephan Eggermont-3
On 05-10-15 21:11, Peter Uhnák wrote:
> Is there a reason why this is not in the catalog browser? Do you feel it's
> not production-ready (missing editing)? Because I am very happy consumer
> even in this state. :)

I'll add a configuration as soon as editing works and the spotter
improvements make it to Pharo 5. It is just very much a prototype. Some
parts I like, others not so much, and a lot has not gotten much thought.

Stephan





12