public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* Re: RE : Re: What is the Development Environment of Choice for Kawa?
       [not found] <3go6arm3yvsi6iuungnfyd1o.1455824305674@email.android.com>
@ 2016-02-18 21:18 ` Per Bothner
  2016-02-18 21:22   ` mikel evins
  2016-02-18 22:24   ` RE : " Rafik
  0 siblings, 2 replies; 10+ messages in thread
From: Per Bothner @ 2016-02-18 21:18 UTC (permalink / raw)
  To: Rafik Naccache (TNTeam Rocks!), kawa



On 02/18/2016 11:38 AM, Rafik Naccache  (TNTeam Rocks!) wrote:
> Actually I managed to use swank/sLime with Kawa. But half of its functionality is broken.

I'm afraid Swank/Slime with Kawa isn't actively maintained.
Helmut Eller wrote/maintained it, but he is no longer involved.
I don't know the details - it maybe that the Swank model isn't
a great match for Kawa's more static binding mode - or for the JVM.

OTOH if you have experience with and were productive with Swank/Clojure,
perhaps we can get Swank/Kawa working, possibly by studying how Clojure does things.

> I am an emacs guy so this probably helps me, especially as I use smartparens  (a new paredit) ans rainbow delimiters.
>
> Maybe I shall write a Kawa.el mode on emacs  Like cider fir clojure, in which case I 'll need some hints on how completion works, etc...
>
> @ Per, When do you plan to release the code hot loading fixes in SVN?

I don't have anything usable at this point, and I'm back-logged on other
projects (DomTerm; Kawa arrays; Kawa new invocation model with patterns; more)
that I don't know when I'll be able to spend time on it.  It's moderately
high priority, but so is finishing up various half-finished projects!

Until then, you can try the --no-inline flag, and be prepared to re-load
everything after changes.  One of the big advantages of Kawa that its
fast compiler and loading makes re-starting ok.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: What is the Development Environment of Choice for Kawa?
  2016-02-18 21:18 ` RE : Re: What is the Development Environment of Choice for Kawa? Per Bothner
@ 2016-02-18 21:22   ` mikel evins
  2016-02-18 22:24   ` RE : " Rafik
  1 sibling, 0 replies; 10+ messages in thread
From: mikel evins @ 2016-02-18 21:22 UTC (permalink / raw)
  To: Per Bothner; +Cc: mikel evins, Rafik Naccache (TNTeam Rocks!), kawa


> On Feb 18, 2016, at 3:18 PM, Per Bothner <per@bothner.com> wrote:
> 
> Until then, you can try the --no-inline flag, and be prepared to re-load
> everything after changes.  One of the big advantages of Kawa that its
> fast compiler and loading makes re-starting ok.

Depends on what you mean by “ok.” It’s virtually instant, so if the time it takes is the main consideration, it’s better than “ok”.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: RE : Re: What is the Development Environment of Choice for Kawa?
  2016-02-18 21:18 ` RE : Re: What is the Development Environment of Choice for Kawa? Per Bothner
  2016-02-18 21:22   ` mikel evins
@ 2016-02-18 22:24   ` Rafik
  2016-02-18 22:38     ` Per Bothner
  1 sibling, 1 reply; 10+ messages in thread
From: Rafik @ 2016-02-18 22:24 UTC (permalink / raw)
  To: Per Bothner, kawa

Actually, scheme's kinda most accomplished tooling on emacs is Geiser : 
http://www.nongnu.org/geiser/

I shall maybe hack on it drawing inspiration from what has been 
implemented for guile, chicken and racket...



Le 18/02/2016 21:18, Per Bothner a écrit :
>
>
> On 02/18/2016 11:38 AM, Rafik Naccache  (TNTeam Rocks!) wrote:
>> Actually I managed to use swank/sLime with Kawa. But half of its 
>> functionality is broken.
>
> I'm afraid Swank/Slime with Kawa isn't actively maintained.
> Helmut Eller wrote/maintained it, but he is no longer involved.
> I don't know the details - it maybe that the Swank model isn't
> a great match for Kawa's more static binding mode - or for the JVM.
>
> OTOH if you have experience with and were productive with Swank/Clojure,
> perhaps we can get Swank/Kawa working, possibly by studying how 
> Clojure does things.
>
>> I am an emacs guy so this probably helps me, especially as I use 
>> smartparens  (a new paredit) ans rainbow delimiters.
>>
>> Maybe I shall write a Kawa.el mode on emacs  Like cider fir clojure, 
>> in which case I 'll need some hints on how completion works, etc...
>>
>> @ Per, When do you plan to release the code hot loading fixes in SVN?
>
> I don't have anything usable at this point, and I'm back-logged on other
> projects (DomTerm; Kawa arrays; Kawa new invocation model with 
> patterns; more)
> that I don't know when I'll be able to spend time on it.  It's moderately
> high priority, but so is finishing up various half-finished projects!
>
> Until then, you can try the --no-inline flag, and be prepared to re-load
> everything after changes.  One of the big advantages of Kawa that its
> fast compiler and loading makes re-starting ok.

-- 
TNTeam rocks!
Rafik Naccache - BDFL

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: RE : Re: What is the Development Environment of Choice for Kawa?
  2016-02-18 22:24   ` RE : " Rafik
@ 2016-02-18 22:38     ` Per Bothner
  2016-02-19  0:09       ` Alex Shinn
  0 siblings, 1 reply; 10+ messages in thread
From: Per Bothner @ 2016-02-18 22:38 UTC (permalink / raw)
  To: Rafik



On 02/18/2016 02:24 PM, Rafik Naccache [TNTeam] wrote:
> Actually, scheme's kinda most accomplished tooling on emacs is Geiser : http://www.nongnu.org/geiser/

The following is promising:

     "In particular, Geiser expects [a REPL] to support namespaces in the form of a module system, and to provide
      a well-defined way to establish the REPL’s current namespace (or module), as well as the current file’s module (or namespace)."

It's good that Geiser is namespace/module-friendly.

There is a feature-request:
https://github.com/jaor/geiser/issues/55

A comment states:

   Very loosely, this won't work as expected, apparently:

     (eval '(...) my-module-environment)

Not sure what that refers to.  Kawa (as of 2.0) does support environment-specifiers
to the eval procedure, but perhaps not quite in the way Geiser wants.

> I shall maybe hack on it drawing inspiration from what has been implemented for guile, chicken and racket...

That would be great.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: RE : Re: What is the Development Environment of Choice for Kawa?
  2016-02-18 22:38     ` Per Bothner
@ 2016-02-19  0:09       ` Alex Shinn
  0 siblings, 0 replies; 10+ messages in thread
From: Alex Shinn @ 2016-02-19  0:09 UTC (permalink / raw)
  To: kawa

You can also try scheme-complete for intelligent tab-completion:

https://github.com/ashinn/scheme-complete

-- 
Alex

On Fri, Feb 19, 2016 at 7:38 AM, Per Bothner <per@bothner.com> wrote:
>
>
> On 02/18/2016 02:24 PM, Rafik Naccache [TNTeam] wrote:
>>
>> Actually, scheme's kinda most accomplished tooling on emacs is Geiser :
>> http://www.nongnu.org/geiser/
>
>
> The following is promising:
>
>     "In particular, Geiser expects [a REPL] to support namespaces in the
> form of a module system, and to provide
>      a well-defined way to establish the REPL’s current namespace (or
> module), as well as the current file’s module (or namespace)."
>
> It's good that Geiser is namespace/module-friendly.
>
> There is a feature-request:
> https://github.com/jaor/geiser/issues/55
>
> A comment states:
>
>   Very loosely, this won't work as expected, apparently:
>
>     (eval '(...) my-module-environment)
>
> Not sure what that refers to.  Kawa (as of 2.0) does support
> environment-specifiers
> to the eval procedure, but perhaps not quite in the way Geiser wants.
>
>> I shall maybe hack on it drawing inspiration from what has been
>> implemented for guile, chicken and racket...
>
>
> That would be great.
>
> --
>         --Per Bothner
> per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: What is the Development Environment of Choice for Kawa?
  2016-02-18 18:57 ` Per Bothner
  2016-02-18 19:39   ` mikel evins
@ 2016-02-18 19:59   ` Dominique Boucher
  1 sibling, 0 replies; 10+ messages in thread
From: Dominique Boucher @ 2016-02-18 19:59 UTC (permalink / raw)
  To: Per Bothner; +Cc: Rafik Naccache [TNTeam], kawa

Hello,

I'm the author of SchemeScript. Per is right. It's not actively maintained, although it's still occasionally used here at Nu Echo. The embedded Kawa is a pretty old version (7 years old!). If there is enough interest, I 
could try to upgrade it. But I'm sure there will be some syntactic/lexical elements of Kawa that will not be supported. And I can't commit to fixing those in the very short term. 

Dominique Boucher 

----- Original Message -----
From: "Per Bothner" <per@bothner.com>
To: "Rafik Naccache [TNTeam]" <rafik@tnteam.rocks>, kawa@sourceware.org
Sent: Thursday, February 18, 2016 1:57:39 PM
Subject: Re: What is the Development Environment of Choice for Kawa?

On 02/18/2016 08:18 AM, Rafik Naccache [TNTeam] wrote: 
> Hi, 
> 
> Coming from Clojure Land, I am experimenting with various scheme implementations, guile, chicken, racket,... 
> 
> As I am experimenting Kawa, I was surprised to see how this scheme can actually beat Clojure in terms of speed and elegance, and want to use it in a serious hobby project in which I have to interact with a great share of imperative Java, a setup that would make Clojure suffer... 
> 
> But then, I can't find what tool is commonly used by the community to develop Kawa: is it emacs with comint? is it slime with the little swank glue-code? maybe something else? 

Tooling is Kawa's weak spot - though its compile-time warnings and errors 
are better than most "dynamic languages" IMO. 

I'm pretty old-school, so I mostly use Emacs (mainly just editing), the REPL, 
and print statements. (Very rarely I might use jdb to track down an infinite loop.) 
OTOH I write more Java (and lately JavaScript) than I write Scheme ... 

A related weakness is connected to Kawa's strength: Kawa does a fair amount of 
compile-time optimization and inlining. This causes problems in interactive 
development: you load a function or module, and then edit it and reload it. 
Other functions that depend on the change code may no longer work. A partial 
work-around is to use the --no-inline command-line option. I do have plans 
to improve the situation, though a combination of extra indirection and 
automatic re-compilation of dependencies. 

There are various Emacs packages and/or IDE plugins that can be used. 
There is this plugin for Eclipse: https://github.com/schemeway/SchemeScript 
However, I don't think it's actively maintained, though the git repo has 
seen a few semi-recent updates. I haven't tried it recently - a status report 
would be interesting. 

There are also various Emacs packages that can be used, though I don't have 
much experience with them. 

I have been working recently on improving the Kawa repl, both using DomTerm 
and using jline2/jline3. I have some not-quite-working code - and plenty of ideas :-) 
-- 
--Per Bothner 
per@bothner.com http://per.bothner.com/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: What is the Development Environment of Choice for Kawa?
  2016-02-18 18:57 ` Per Bothner
@ 2016-02-18 19:39   ` mikel evins
  2016-02-18 19:59   ` Dominique Boucher
  1 sibling, 0 replies; 10+ messages in thread
From: mikel evins @ 2016-02-18 19:39 UTC (permalink / raw)
  To: Per Bothner; +Cc: mikel evins, Rafik Naccache [TNTeam], kawa


> On Feb 18, 2016, at 12:57 PM, Per Bothner <per@bothner.com> wrote:
> 
> 
> 
> On 02/18/2016 08:18 AM, Rafik Naccache [TNTeam] wrote:
>> Hi,
>> 
>> Coming from Clojure Land, I am experimenting with various scheme implementations, guile, chicken, racket,...
>> 
>> As I am experimenting Kawa, I was surprised to see how this scheme can actually beat Clojure in terms of speed and elegance, and want to use it in a serious hobby project in which I have to interact with a great share of imperative Java, a setup that would make Clojure suffer...
>> 
>> But then, I can't find what tool is commonly used by the community to develop Kawa: is it emacs with comint? is it slime with the little swank glue-code? maybe something else?
> 
> Tooling is Kawa's weak spot - though its compile-time warnings and errors
> are better than most "dynamic languages" IMO.
> 
> I'm pretty old-school, so I mostly use Emacs (mainly just editing), the REPL,
> and print statements. (Very rarely I might use jdb to track down an infinite loop.)
> OTOH I write more Java (and lately JavaScript) than I write Scheme …

I write more Scheme than Java, but my solution is the same as Per’s: Emacs and the repl. I got pretty far that way— far enough to write a 3D multiplayer network game that Per presented at the 2015 JavaOne conference—but there are disadvantages, as Per said.

I generally use Emacs with scheme mode and Kawa running in an inferior quack process in a buffer. My emacs setup includes an interactive command to run Kawa with a classpath suitable to my project. Whenever I reload definitions or anything else happens that makes me doubt the integrity of the Kawa runtime, I kill the inferior process and restart it with a few keystrokes. It takes less than a second.

Of course, it blows away the runtime state and I have to rebuild everything from scratch, but I’ve generally solved that by writing loader files that bring my runtime back up to snuff in less than a second. It’s not as good as real Lisp- or Smalltalk-style interactive development, but if you’re coming from the Clojure world then you’re probably not looking for that anyway, and are unlikely to miss it.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: What is the Development Environment of Choice for Kawa?
  2016-02-18 16:18 Rafik
@ 2016-02-18 18:57 ` Per Bothner
  2016-02-18 19:39   ` mikel evins
  2016-02-18 19:59   ` Dominique Boucher
  0 siblings, 2 replies; 10+ messages in thread
From: Per Bothner @ 2016-02-18 18:57 UTC (permalink / raw)
  To: Rafik



On 02/18/2016 08:18 AM, Rafik Naccache [TNTeam] wrote:
> Hi,
>
> Coming from Clojure Land, I am experimenting with various scheme implementations, guile, chicken, racket,...
>
> As I am experimenting Kawa, I was surprised to see how this scheme can actually beat Clojure in terms of speed and elegance, and want to use it in a serious hobby project in which I have to interact with a great share of imperative Java, a setup that would make Clojure suffer...
>
> But then, I can't find what tool is commonly used by the community to develop Kawa: is it emacs with comint? is it slime with the little swank glue-code? maybe something else?

Tooling is Kawa's weak spot - though its compile-time warnings and errors
are better than most "dynamic languages" IMO.

I'm pretty old-school, so I mostly use Emacs (mainly just editing), the REPL,
and print statements. (Very rarely I might use jdb to track down an infinite loop.)
OTOH I write more Java (and lately JavaScript) than I write Scheme ...

A related weakness is connected to Kawa's strength: Kawa does a fair amount of
compile-time optimization and inlining.  This causes problems in interactive
development: you load a function or module, and then edit it and reload it.
Other functions that depend on the change code may no longer work.  A partial
work-around is to use the --no-inline command-line option.  I do have plans
to improve the situation, though a combination of extra indirection and
automatic re-compilation of dependencies.

There are various Emacs packages and/or IDE plugins that can be used.
There is this plugin for Eclipse: https://github.com/schemeway/SchemeScript
However, I don't think it's actively maintained, though the git repo has
seen a few semi-recent updates.  I haven't tried it recently - a status report
would be interesting.

There are also various Emacs packages that can be used, though I don't have
much experience with them.

I have been working recently on improving the Kawa repl, both using DomTerm
and using jline2/jline3.  I have some not-quite-working code - and plenty of ideas :-)
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: What is the Development Environment of Choice for Kawa?
@ 2016-02-18 18:53 F. Rafael Leon
  0 siblings, 0 replies; 10+ messages in thread
From: F. Rafael Leon @ 2016-02-18 18:53 UTC (permalink / raw)
  To: kawa

On Thu, Feb 18, 2016 at 11:18 AM, Rafik Naccache [TNTeam]
<rafik@tnteam.rocks> wrote:
> I really would love to take community's pulse on what tool is used by
> Kawa-ians

Rafik,

The correct answer to this is "whatever makes you most comfortable."

In order to vividly illuminate what this means in practice, I will
explain MY own strange workflow so that you can feel comfortable
adopting YOUR own strange workflow:

It starts with emacs.

To emacs, I add the "evil" package which provides vim bindings.
"evil" can be found in the melpa or marmalade repositories.
The standard emacs control-meta-alt-shift s-x-w-y simultaneous chords
give me horrible finger cramps, so I prefer vim. For editing code I
really like the buffer system of emacs.
So, I use emacs with vim bindings.

Theoretically, if I were a better person, I would use paredit instead of evil.

In a separate terminal, NOT in an emacs buffer, I run "rlwrap java
kawa.repl" with an appropriate CLASSPATH for my project.

In emacs, I write some code and save it in "project.scm"

In the rlwrap kawa console, I type (load "project.scm").

I then edit project.scm in emacs and then type the up arrow into the
rlwrap kawa console to repeat the load command and then I hit Enter.

I repeat this process around 1000 times a day.

When doing this for Android, the workflow is identical, except instead
of "rlwrap kawa" I run "rlwrap telnet x.x.x.x 4444" to connect to a
telnet REPL running on the Android device. Also, after each edit and
save in emacs I run "adb push project.scm /sdcard" and then in the
telnet terminal: (load "/sdcard/project.scm").

That's basically it.  I should do a YouTube.

I DON'T run kawa in an emacs buffer because often I like to (display
... ) or (write ... ) lists and look at them.

This dumps thousands of lines of stupidity that I don't want to look
at ever again after I solve the immediate problem.  I don't want
thousands of lines of REPL output saved in an emacs buffer.  As I jump
between emacs buffers, I don't want to glance at a big wasteland of
failed algorithms. It makes me feel like emacs is watching me and
laughing.

If I never made any mistakes and never was unsure about any algorithm,
then a REPL in a buffer would be totally awesome because I could
record and save all my brilliance for all eternity.
Instead, every time I put a REPL in a buffer I just feel embarrassed
when I scroll through it.

      -Rafael

^ permalink raw reply	[flat|nested] 10+ messages in thread

* What is the Development Environment of Choice for Kawa?
@ 2016-02-18 16:18 Rafik
  2016-02-18 18:57 ` Per Bothner
  0 siblings, 1 reply; 10+ messages in thread
From: Rafik @ 2016-02-18 16:18 UTC (permalink / raw)
  To: kawa

Hi,

Coming from Clojure Land, I am experimenting with various scheme 
implementations, guile, chicken, racket,...

As I am experimenting Kawa, I was surprised to see how this scheme can 
actually beat Clojure in terms of speed and elegance, and want to use it 
in a serious hobby project in which I have to interact with a great 
share of imperative Java, a setup that would make Clojure suffer...

But then, I can't find what tool is commonly used by the community to 
develop Kawa: is it emacs with comint? is it slime with the little swank 
glue-code? maybe something else?

Many thanks for your help, I really would love to take community's pulse 
on what tool is used by Kawa-ians,

Cheers

-- 
TNTeam rocks!
Rafik Naccache - BDFL

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-02-19  0:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3go6arm3yvsi6iuungnfyd1o.1455824305674@email.android.com>
2016-02-18 21:18 ` RE : Re: What is the Development Environment of Choice for Kawa? Per Bothner
2016-02-18 21:22   ` mikel evins
2016-02-18 22:24   ` RE : " Rafik
2016-02-18 22:38     ` Per Bothner
2016-02-19  0:09       ` Alex Shinn
2016-02-18 18:53 F. Rafael Leon
  -- strict thread matches above, loose matches on Subject: below --
2016-02-18 16:18 Rafik
2016-02-18 18:57 ` Per Bothner
2016-02-18 19:39   ` mikel evins
2016-02-18 19:59   ` Dominique Boucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).