-
Notifications
You must be signed in to change notification settings - Fork 5
I enjoyed reading your code #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@dataf3l thanks for caring to take a look, i'm flattered. as it follows, the code isn't exactly mine - it is due to a much taller Canadian bear, only he wrote it when his hair wasn't completely grey yet, and i was 8 years old. i'm short on time to figure out what "codebeautify" exactly is, but the result looks like a job of a fairly well-trained AI model. as it happens, those things still miss out on subtleties, and as it must be evident from your snippet still have a major difficulty maintaining consistent and confident style - which is the whole idea and the central point of this little piece of history. impressive, though. does it compile, if you know? |
sorry, i missed your point. you've said you've made minor modifications, which i interpret as modifications to the logic of this software, but i have no means of figuring out what you've done. please point me in the right direction. as for AI hiccups, the simplest example is would you care to try the same approach on a slightly more production-grade piece of software which is written in the same style? i'm really keen to learn what the results may be: |
another example of where the model successfully got the wind of what was going on, but completely obliterated the context, terminology and consistency of the original code is this:
as i am responsible for basic implementation of these two staple k adverbs in this toy code, i have the authority to say that their names are cast in stone as |
on a closing note:
on your local terminal, try:
(you'd hopefully agree that |
also, AI tends to use
|
i gave you honest and direct feedback, and i hope you'll find it useful. in return, i'd like to hear your honest opinion as to what degree the original code benefitted from your modifications. |
“does it compile, if you know?” => yes, it does build.
“you've said you've made minor modifications”
“pt(), which is not really "printTab()" ”
“would you care to try the same approach on a slightly more production-grade
“over and scan”
“…isUppercase() is a fatally misleading interpretation...”
“AI tends to use Element everywhere … this is just plain wrong … it would use
“in return, i'd like to hear your honest opinion as to what degree the original
|
oh. welcome to the club :)
this is by design. this is a sketch of an interpreter written in one sitting. i dare to assume that back in 1989 Arthur Whitney couldn't afford his own AT&T 3B1, which wasn't exactly a cheap machine.
so did i, but i opted to leave this piece of code undocumented, and there are good reasons for that. and it keeps on paying off.
usually we annotate this kind of code this way:
if you're available to take friendly advice - just don't. think for yourself and question "authority". |
this were the ideas by the AI: This program appears to be a minimalistic implementation of some operations common in array programming languages like J. It defines operations on arrays (referred to as K-structures in the code) and includes functions for arithmetic, reshaping, boxing, etc. Here's a proposed renaming of variables and functions to make the code more readable. The goal is to maintain brevity while improving clarity. The renaming is based on the context in which these entities are used and the typical naming conventions in array programming:
Please note that some functions, like The reason the code is inconsistent is because I didn't apply all the AI suggestions, just some of them. |
hats off, this part of the footwork the machine got almost flawlessly. only i'm not sure why anyone would want to make use of the middle column. it is superfluous.
yes, i know - at first, some such code looks like an "endless" soup of someone's exercise in obscurity and pretentiousness. but local variables are just i assume you discovered this repo via HN post. there's plenty of links there which point to resources which describe rationale and conventions of this particular style of c.
i learned something new today. thank you. |
which AI did you employ, and how did you state the prompt? |
@dataf3l fwiw, these are the next evolutions of j you can try and run: This comes with a paper from the APL90 conference. the only version i got, was a dos binary distributed at that time: The next version from roger where i could get the source is j4.1 or 4.2: |
I made some minor modifications, would you consider taking a look at them and providing feedback?
The text was updated successfully, but these errors were encountered: