Better HN
topnewbestaskshowjobs
Log inSign up

prmichaelsen

6 karma · joined Apr 24, 2016 (10y ago) · 9 submissions

Patrick Michaelsen is a student and tutor at Arizona State University. He is currently preparing for a 2016 Summer Internship at American Express.

For more information, please visit http://patrickmichaelsen.com !

Submissions

comment 9mo ago · link · parent

Problem: Agents lose context between sessions, reusing AGENT.mds across projects is manual and can result in out of sync AGENT.mds across different projects as AGENT.mds are improved, project specific or generic reusable patterns are difficult to manager, there's no way to quickly install patterns from remote repositories.

I have been experimenting with ways to solve this problem and I ended up designing something I am calling the Agent Context Protocol, or MCP, which defines an AGENT.md and specifications for a specialized agent directory tree which includes templates for: commands, designs, milestones, and tasks.

Commands can be invoked by sending messages like `@acp.init` or `@acp.commit` for core ACP commands, or `@my-project.deploy` for project specific commands. Extension packages can be installed with a simple `@acp.package-install` ACP command.

Please consider checking out the README.md for a more advanced explanation of how ACP works, what problems it solves, and why it was created.

2.

ACP – An extensible documentation-first development methodology(github.com ↗)

1 points · by prmichaelsen · 9mo ago · 1 comment

comment 9y ago · link · parent

Unfortunately such articles don't get the same number of clicks

comment 10y ago · link · parent

Thanks for putting the abs() part to rest. I included it for the sake of having the final code be a little more readable. But yes, indeed, it is possible once more to use bit-wise manipulation to achieve elegant solutions! Thanks for reading! And of course, thanks for posting this blog post, nkurz!

comment 10y ago · link · parent

Interesting! It never ceases to amaze me what tricks one can pull off with bit manipulation!

Thanks for reading!

comment 10y ago · link · parent

That's true. However, when coming up with creative solutions to problems, I think every unused bit is fair game! Thanks for reading!

comment 10y ago · link · parent

I agree that it is cute! Unfortunately, it does not seem to have much of a practical use. If you're very curious, a professor at my school suggests testing out "how much memory is saved for compiler optimizations (like -O2 or -O3) for normal sorts vs this sort." You might be able to answer your question this way.

Thank you again, for reading! Cheers!

comment 10y ago · link · parent

Interesting, I had never heard of External Merge Sort before. You are correct in that it does not work on unsigned ints and is unnecessarily slow.

An interesting alternative came to my attention in the form of "gnome sort". Gnome sort is also affectionately know as "stupid sort". It behaves similarly to bubble sort. Bubble sort "sinks" large elements which allows small elements to "bubble" up. Gnome sort, however, sinks large elements towards the end of the array AND sinks small elements towards the front of the array.

More on gnome sort: https://en.wikipedia.org/wiki/Gnome_sort

Once again, thanks for reading!

comment 10y ago · link · parent

Thanks for letting me know! What device are you using to view the content?