k-user AT lists.cs.illinois.edu
Subject: K-user mailing list
List archive
- From: Mike Stay <stay AT pyrofex.net>
- To: Derek Sorensen <derek AT pyrofex.net>
- Cc: k-user <k-user AT lists.cs.illinois.edu>
- Subject: Re: [[K-user] ] Strange syntax
- Date: Thu, 7 Jun 2018 17:06:04 -0600
- Authentication-results: illinois.edu; spf=pass smtp.mailfrom=stay AT pyrofex.net; dkim=pass header.d=pyrofex-net.20150623.gappssmtp.com header.s=20150623; dmarc=none
I'm guessing that it's escaping those characters because they have
other meanings in K itself.
On Mon, Jun 4, 2018 at 12:54 PM, Derek Sorensen
<derek AT pyrofex.net>
wrote:
> Hi all,
>
> I’m experiencing a bit of an odd phenomenon. I’m taking something in a
> k-cell and putting it in a cell of the form <out> … </out>. The rewrite rule
> is as follows:
>
> rule (<k> C:Chan!(P:HigherProcs) </k> => <out> C!(P) </out>)
>
> When this rewrite occurs, K introduces underscores, back ticks, commas and
> single quotes intermittently that makes it difficult to read. For example,
>
> @“chan”!(20)
>
> will rewrite as
>
> ‘@_(“chan”)!`(20`).
>
> K will even sometimes get so weird as to rewrite
>
> for(@ @10!(x) <- chan){ Nil }
>
> as
>
> {for( '@_( '@_(10)!`( #symId("local",, 1)`) ) <- @ {chan} ){
> Nil }}
>
> I’m trying to get an idea with what’s going on so I can keep the syntax
> clean and nice when it outputs. Any suggestions?
>
> Best,
> Derek Sorensen
--
Mike Stay
CTO, Pyrofex Corp.
- [[K-user] ] Strange syntax, Derek Sorensen, 06/04/2018
- Re: [[K-user] ] Strange syntax, Mike Stay, 06/07/2018
Archive powered by MHonArc 2.6.19.