From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Perry Smith Newsgroups: gmane.emacs.devel Subject: Re: ruby-ts-mode.el -- first draft Date: Sun, 11 Dec 2022 10:42:01 -0600 Message-ID: <51E008B5-891B-4A85-A6FD-7D018FD5D908@easesoftware.com> References: <065A1DE9-B9BA-4AA3-9D59-D0F5547B8824@easesoftware.com> <87v8mixscb.fsf@thornhill.no> <8340D08F-A596-4551-B7B1-B1E63E098E73@easesoftware.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.200.110.1.12\)) Content-Type: multipart/signed; boundary="Apple-Mail=_028375F9-D68A-4E18-9568-4F109409AD5C"; protocol="application/pgp-signature"; micalg=pgp-sha256 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24314"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, bozhidar@batsov.dev To: Theodor Thornhill Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 11 17:43:07 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p4PPu-00065c-Ep for ged-emacs-devel@m.gmane-mx.org; Sun, 11 Dec 2022 17:43:06 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4PPA-0002J0-58; Sun, 11 Dec 2022 11:42:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4PP8-0002IZ-MU for emacs-devel@gnu.org; Sun, 11 Dec 2022 11:42:18 -0500 Original-Received: from bird.elm.relay.mailchannels.net ([23.83.212.17]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4PP6-0007Sn-E2 for emacs-devel@gnu.org; Sun, 11 Dec 2022 11:42:18 -0500 X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 00CBE3417AA; Sun, 11 Dec 2022 16:42:14 +0000 (UTC) Original-Received: from mi3-ss4.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id 37D1E340EF9; Sun, 11 Dec 2022 16:42:13 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1670776933; a=rsa-sha256; cv=none; b=Opc6gTE2//C4FgUa8IN7vrvidtEMvev0B0I7I/frlcGx/29Hz9kuzTTwlEjGkF8fqzt12D U05nlzF/gE8eN6Y8E0Cvo+edqmMR6lqdQF3ZjuJJCPRvI41HR6NK7SqE6BJNBsfSKgdNH4 Gm1JD2mrMFPKrAkrz8kTZlu0pVXcYQHzuwfMRFSW0bMreREvnVXWUTUGIy8waFb40j9tVp xHFmm2DeFOV1I56Emrb9gW55gh8jW4uEXjvtvOcpSla8iQxeXRVY5gjsGpBAegBHJ7GZAy FcfVkteVmv5KNPNMs01CRR6zIWE8yGDHUmxxCdfxOyKt0ICjmuKpplHnHwTizQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1670776933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=yiPDYKuTo5ix4PkuEDSC8cuZ3Tc63nwD1+J7ijdA924=; b=JWwxgV1voJBXVCGle0f5BFUDn/lUvgsG5EBcOtbfRl3a81dJ7xqn+Dz+WMxBtCkTtG4LA0 pki9A3GBAygh0juG3U5mEmzvX/vj5p5oiuEqsqBkkVAO39RCkvR9FgO6tn/Y+4rN+C7g0O hqbDBbYURD5p8LCgMZgGCzjD7kW/j7+tWzagyRD3o0lSgf0stZj0PzJE+zC3Mlbe7L+ccs ig5cFII+gOGWDOxHaDw6rG3L2LDv7mkW3pY7W0ouopZs7zSmBxpYMu4XgygVMAIiFHgFno DDHPlROujZ/1/zl+Fpb6OiJuEAKRk8WWYa+5rK2VmZwE+pbKgmA56UDVbKWGog== ARC-Authentication-Results: i=1; rspamd-d48c5ddb-bpqtx; auth=pass smtp.auth=a2hosting smtp.mailfrom=pedz@easesoftware.com X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MailChannels-Auth-Id: a2hosting X-Ruddy-Illustrious: 69872d1d1f19c20d_1670776933723_3299508740 X-MC-Loop-Signature: 1670776933723:1990906760 X-MC-Ingress-Time: 1670776933723 Original-Received: from mi3-ss4.a2hosting.com (mi3-ss4.a2hosting.com [68.66.200.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.109.138.16 (trex/6.7.1); Sun, 11 Dec 2022 16:42:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=easesoftware.com; s=default; h=References:To:Cc:In-Reply-To:Date:Subject: Mime-Version:Content-Type:Message-Id:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=yiPDYKuTo5ix4PkuEDSC8cuZ3Tc63nwD1+J7ijdA924=; b=AbjUyVnopBZPrimUhMrUFxOC03 C6NYPfvAc4mZhhdZC0Iu8ZBvWR9kbCZoUjN2nKy/USKY3p9oOc36oFumqJMR8RaE1hfTUx/VJoyHJ Xqg66iGjKQ63cfeFxeghVP6VhcusvCLWfd/knJLxkO3m6yjB4w4KTITQbUAQkoMD2Zi0rtOHbI1Ve ct1FlSTFz3OCyQkTvi8NJWYFZ2b5vgjS2rto5W7v8S0bJX8bzh00Ilci61TXgSTa8jrz9TBsB9sN9 N5QpUkk/DynKjUl3dR4CHVPIKkE3zrqkarPfKgHbrPYjIsZCMtNYGer+x9E4quOskHBIoefnvQBwP ig7Ql3hQ==; Original-Received: from cpe-70-94-128-193.satx.res.rr.com ([70.94.128.193]:62157 helo=smtpclient.apple) by mi3-ss4.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1p4PP2-0032Cj-62; Sun, 11 Dec 2022 11:42:12 -0500 In-Reply-To: X-Mailer: Apple Mail (2.3731.200.110.1.12) X-AuthUser: pedz+easesoftware.com@mi3-ss4.a2hosting.com Received-SPF: pass client-ip=23.83.212.17; envelope-from=pedz@easesoftware.com; helo=bird.elm.relay.mailchannels.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:301155 Archived-At: --Apple-Mail=_028375F9-D68A-4E18-9568-4F109409AD5C Content-Type: multipart/alternative; boundary="Apple-Mail=_C90433F3-7C87-43F3-88BA-D1182FDDE597" --Apple-Mail=_C90433F3-7C87-43F3-88BA-D1182FDDE597 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Dec 11, 2022, at 10:26, Theodor Thornhill = wrote: >=20 >> The =E2=80=9Clint=E2=80=9D in the Ruby community is called Rubocop = and it is rather strongly opinionated out of the box but you can adjust = it to your liking. I predict someone will write a set of rules that = 100% recreates Rubocop=E2=80=99s out of the box settings. I think a lot = of users would like to have an easy way to enable those =E2=80=9Crules=E2=80= =9D which I consider rather strict. And, at the same time, I think = there will be a lot of users would like a more relax set of rules. So I = am expecting two sets of rules to be developed. >>=20 >=20 > Why not create the two sets now, rather than later? I think we should = try to make as good modes as possible so the need for external packages = vanishes. If we are not good enough people will just create the modes. = Maybe rubocop could be plugged into the Emacs tree-sitter = integration?Luckily rubocops author loves Emacs, so they might offer = some useful feedback (added Bozhidar Batsov to cc). This is why I called it a first draft. I=E2=80=99m hoping others start = to play with it and provide feedback. And I plan to fire up Rubocop (or = perhaps contact its author as well) and try to implement the Rubocop = mode. >> Another option would be to put the various sets of rules in separate = variables and then the final set the user could cherry pick the desired = set of rules. >>=20 >> The system is incredibly beautiful and versatile and I haven=E2=80=99t = seen all the discussions on how to manage and use the versatility that = Emacs now has. I view myself at being rather bad when faced with these = types of decisions and choices. >=20 > I say bring forward something so we have something to discuss :-) I was just about to do this. I want to play around with treesit coupled with align. Wouldn=E2=80=99t = it be super slick if new_hash =3D { long_ugly_name: 9, frog: 12, daft: 92, egg: 99 } was automagically formatted as: new_hash =3D { long_ugly_name: 9, frog: 12, daft: 92, egg: 99 } Well=E2=80=A6 I am sure some will say =E2=80=9CYea!!!=E2=80=9D while = others will say =E2=80=9COMG! NO!!!=E2=80=9D. And, clearly how = something like that is styled has a lot of alternatives and choices. But I=E2=80=99m not even sure it is even possible in the practical = sense. I wanted to play with it and see how hard it is as well as ask = the list for advice / hints on how to approach this. Perry --Apple-Mail=_C90433F3-7C87-43F3-88BA-D1182FDDE597 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
On Dec 11, = 2022, at 10:26, Theodor Thornhill <theo@thornhill.no> = wrote:

The =E2=80=9Clint=E2=80=9D in the Ruby community = is called Rubocop and it is rather strongly opinionated out of the box = but you can adjust it to your liking.  I predict someone will write = a set of rules that 100% recreates Rubocop=E2=80=99s out of the box = settings.  I think a lot of users would like to have an easy way to = enable those =E2=80=9Crules=E2=80=9D which I consider rather strict. =  And, at the same time, I think there will be a lot of users would = like a more relax set of rules.  So I am expecting two sets of = rules to be developed.


Why not = create the two sets now, rather than later? I think we should try to = make as good modes as possible so the need for external packages = vanishes. If we are not good enough people will just create the modes. = Maybe rubocop could be plugged into the Emacs tree-sitter = integration?Luckily rubocops author loves Emacs, so they might offer = some useful feedback (added Bozhidar Batsov to cc).

This is why I called it a = first draft.  I=E2=80=99m hoping others start to play with it and = provide feedback.  And I plan to fire up Rubocop (or perhaps = contact its author as well) and try to implement the Rubocop = mode.

Another option would be to = put the various sets of rules in separate variables and then the final = set the user could cherry pick the desired set of rules.

The = system is incredibly beautiful and versatile and I haven=E2=80=99t seen = all the discussions on how to manage and use the versatility that Emacs = now has.  I view myself at being rather bad when faced with these = types of decisions and choices.

I say bring forward = something so we have something to discuss = :-)

I was just about to do = this.

I want to play around with treesit = coupled with align.  Wouldn=E2=80=99t it be super slick = if

new_hash =3D = {
  long_ugly_name: = 9,
  frog: = 12,
  daft: = 92,
  egg: = 99
}

was = automagically formatted as:

new_hash =3D {
  = long_ugly_name:  9,
  frog: =           = 12,
  daft:         =   92,
  egg:     =        99
}

Well=E2= =80=A6 I am sure some will say =E2=80=9CYea!!!=E2=80=9D while others = will say =E2=80=9COMG! NO!!!=E2=80=9D.  And, clearly how something = like that is styled has a lot of alternatives and = choices.

But I=E2=80=99m not even sure it is = even possible in the practical sense.  I wanted to play with it and = see how hard it is as well as ask the list for advice / hints on how to = approach = this.

Perry

= --Apple-Mail=_C90433F3-7C87-43F3-88BA-D1182FDDE597-- --Apple-Mail=_028375F9-D68A-4E18-9568-4F109409AD5C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE5yOa/gCtQpb3oCpljxzk9yzE+MAFAmOWCFkACgkQjxzk9yzE +MDL3g//XCpYs79xwvZAaXELYLk3A5kT8DKiukr44gKgjFoQngc/yoHSkkrSzn0A /yyI26vdxe8Rqf9fL2epAQ7QRaLMhjW4ZY7G+ZudfLwulkC92Rs2m7MC2l5s4IA/ iF8mUl8KXmMo3/O/qQju5RuQ9chlhi17ghiNRHk4JgH9HTBU9tBVxgjBfL+RlN3q xw+dev69FpB6omI0vL82J07HNaxjf8SvFYZFe+lE612c6oYasFUvXdXlsShzMdYc wqT7kh098V6RMRKd036nr0EcDGds/JtXznl04/8domexwoiq8gpRX5PVbKkUqIp5 8AJ3rpGiHV62VsatkQYv4Ds+iHWWDkTpp2KMESBlA46ykQ/o55WxBAz33wOPtKgb Rh1NcF24iGsbpEg81pjMme+FGt7Y6hpb5vx2jzTrtUqmPMMLAockey5JHGI/MZrb kw8xx1F1HPHOdAd4QH51m1LcpKnMk4BbyF69+mHl1ZsGVCvQuzGPy9WMpN7KQ5XJ bX7O11tD50wJvinQH8Hmno2sjNNVRtbrkb72NGHjfi3P1k170ktmtDTJEmZy2d+B YMVY1gga67z/wasbucTMagPMNlBDkGFfc93n6EVHt4bm3S0WzrjZJCaR+zmMRt03 wkYkex0bYM7vG2rj6gs9a8XW9Bsv+mtS8YrT1fJCjDjQ+kmRiv0= =gunQ -----END PGP SIGNATURE----- --Apple-Mail=_028375F9-D68A-4E18-9568-4F109409AD5C--