<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rep.git/graph_macro/src/lib.rs, branch attempt1</title>
<subtitle>Parser generator for Emacs written in Rust
</subtitle>
<link rel='alternate' type='text/html' href='https://git.jsdurand.xyz/rep.git/'/>
<entry>
<title>new start</title>
<updated>2026-10-16T06:02:10+00:00</updated>
<author>
<name>JSDurand</name>
<email>mmemmew@gmail.com</email>
</author>
<published>2026-10-16T06:01:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.jsdurand.xyz/rep.git/commit/?id=fba9a90cfc6aca2a26cce72f55fb261789139781'/>
<id>fba9a90cfc6aca2a26cce72f55fb261789139781</id>
<content type='text'>
Now I tested and discussed with claude, and had a working version of
this project.  The rest is to port the claude version to my own
writings.  So this serves as the starting point before that attempt.

In the new attempt the design is better, and a number of bugs were
found and supposedly fixed, so let us see how this goes at the end.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now I tested and discussed with claude, and had a working version of
this project.  The rest is to port the claude version to my own
writings.  So this serves as the starting point before that attempt.

In the new attempt the design is better, and a number of bugs were
found and supposedly fixed, so let us see how this goes at the end.
</pre>
</div>
</content>
</entry>
<entry>
<title>a commit before the forst query</title>
<updated>2024-01-08T08:13:19+00:00</updated>
<author>
<name>JSDurand</name>
<email>mmemmew@gmail.com</email>
</author>
<published>2024-01-08T08:13:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.jsdurand.xyz/rep.git/commit/?id=3ae0cf9898485a2ec35df7d23cd274e7dea5796d'/>
<id>3ae0cf9898485a2ec35df7d23cd274e7dea5796d</id>
<content type='text'>
I think the main functionalities are already there, but the lack of
querying capabilities makes this not very useful at the moment.

This commit is right before an attempt to add this missing piece.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I think the main functionalities are already there, but the lack of
querying capabilities makes this not very useful at the moment.

This commit is right before an attempt to add this missing piece.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a bug of duplication from planting after sploing</title>
<updated>2023-06-02T07:00:48+00:00</updated>
<author>
<name>JSDurand</name>
<email>mmemmew@gmail.com</email>
</author>
<published>2023-06-02T07:00:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.jsdurand.xyz/rep.git/commit/?id=8486474f377faf2d800d79166a7abe6b975e3e50'/>
<id>8486474f377faf2d800d79166a7abe6b975e3e50</id>
<content type='text'>
I should have staged and committed these changes separately, but I am
too lazy to deal with that.

The main changes in this commit are that I added the derive macro that
automates the delegation of the Graph trait.  This saves a lot of
boiler-plate codes.

The second main change, perhaps the most important one, is that I
found and tried to fix a bug that caused duplication of nodes.  The
bug arises from splitting or cloning a node multiple times, and
immediately planting the same fragment under the new "sploned" node.
That is, when we try to splone the node again, we found that we need
to splone, because the node that was created by the same sploning
process now has a different label because of the planting of the
fragment.  Then after the sploning, we plant the fragment again.  This
makes the newly sploned node have the same label (except for the clone
index) and the same children as the node that was sploned and planted
in the previous rounds.

The fix is to check for the existence of a node that has the same set
of children as the about-to-be-sploned node, except for the last one,
which contains the about-to-be-planted fragment as a prefix.  If that
is the case, treat it as an already existing node, so that we do not
have to splone the node again.

This is consistent with the principle to not create what we do not
need.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I should have staged and committed these changes separately, but I am
too lazy to deal with that.

The main changes in this commit are that I added the derive macro that
automates the delegation of the Graph trait.  This saves a lot of
boiler-plate codes.

The second main change, perhaps the most important one, is that I
found and tried to fix a bug that caused duplication of nodes.  The
bug arises from splitting or cloning a node multiple times, and
immediately planting the same fragment under the new "sploned" node.
That is, when we try to splone the node again, we found that we need
to splone, because the node that was created by the same sploning
process now has a different label because of the planting of the
fragment.  Then after the sploning, we plant the fragment again.  This
makes the newly sploned node have the same label (except for the clone
index) and the same children as the node that was sploned and planted
in the previous rounds.

The fix is to check for the existence of a node that has the same set
of children as the about-to-be-sploned node, except for the last one,
which contains the about-to-be-planted fragment as a prefix.  If that
is the case, treat it as an already existing node, so that we do not
have to splone the node again.

This is consistent with the principle to not create what we do not
need.
</pre>
</div>
</content>
</entry>
<entry>
<title>Completed the procedural macro for deriving Graphs.</title>
<updated>2023-05-04T05:02:39+00:00</updated>
<author>
<name>JSDurand</name>
<email>mmemmew@gmail.com</email>
</author>
<published>2023-05-04T05:02:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.jsdurand.xyz/rep.git/commit/?id=662817e6367a865a2d86a99581172cc45f585807'/>
<id>662817e6367a865a2d86a99581172cc45f585807</id>
<content type='text'>
The macro `graph_derive` can automatically write the boiler-plate
codes for wrapper types one of whose sub-fields implements the `Graph`
trait.  The generated implementation will delegate the `Graph`
operations to the sub-field which implements the `Graph` trait.

I plan to add more macros, corresponding to various other
graph-related traits, so that no such boiler-plate codes are needed,
at least for my use-cases.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The macro `graph_derive` can automatically write the boiler-plate
codes for wrapper types one of whose sub-fields implements the `Graph`
trait.  The generated implementation will delegate the `Graph`
operations to the sub-field which implements the `Graph` trait.

I plan to add more macros, corresponding to various other
graph-related traits, so that no such boiler-plate codes are needed,
at least for my use-cases.
</pre>
</div>
</content>
</entry>
<entry>
<title>chain: a prototype is added.</title>
<updated>2023-01-20T05:48:26+00:00</updated>
<author>
<name>JSDurand</name>
<email>mmemmew@gmail.com</email>
</author>
<published>2023-01-20T05:48:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.jsdurand.xyz/rep.git/commit/?id=18d7955b7d84c00467ede38baae53f4ce1fb6908'/>
<id>18d7955b7d84c00467ede38baae53f4ce1fb6908</id>
<content type='text'>
I have an ostensibly working prototype now.

Further tests are needed to make sure that the algorithm meets the
time complexity requirement, though.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I have an ostensibly working prototype now.

Further tests are needed to make sure that the algorithm meets the
time complexity requirement, though.
</pre>
</div>
</content>
</entry>
<entry>
<title>macro: try to write a macro for inhereting graphs</title>
<updated>2023-01-13T06:25:40+00:00</updated>
<author>
<name>JSDurand</name>
<email>mmemmew@gmail.com</email>
</author>
<published>2023-01-13T06:25:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.jsdurand.xyz/rep.git/commit/?id=3c6511f69c7639abff60ac9999a08ce2daa24a7d'/>
<id>3c6511f69c7639abff60ac9999a08ce2daa24a7d</id>
<content type='text'>
An attempt to write a derive macro to automatically derive the various
graph traits.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An attempt to write a derive macro to automatically derive the various
graph traits.
</pre>
</div>
</content>
</entry>
</feed>
