www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - lib dev code golf

reply monkyyy <crazymonkyyy gmail.com> writes:
I recently played "the farmer was replaced", unlike most coding 
sims the "levels" overlapped so I made a "map" function and made 
fairly short solution for all its puzzles. So your solving 
several problems at once and you probably reuse some code 
(however the game doesnt have a low line count leaderboard, and 
it python, and its poorly balanced etc)

So its been on my mind that you can make coding challenges that 
reuse code. so basic framework for making such a thing:

1. have 18 puzzles, probably on the easier side of code golf
2. the statement "import mylib" is free, and the score of mylib 
is heavily discounted
3. ban "import std.algorthims" so people write their own generic 
libs
4. ???
5. d's community lib dev, gooder
Jun 22
next sibling parent reply Kapendev <alexandroskapretsos gmail.com> writes:
On Saturday, 22 June 2024 at 15:56:38 UTC, monkyyy wrote:
 I recently played "the farmer was replaced", unlike most coding 
 sims the "levels" overlapped so I made a "map" function and 
 made fairly short solution for all its puzzles. So your solving 
 several problems at once and you probably reuse some code 
 (however the game doesnt have a low line count leaderboard, and 
 it python, and its poorly balanced etc)

 So its been on my mind that you can make coding challenges that 
 reuse code. so basic framework for making such a thing:

 1. have 18 puzzles, probably on the easier side of code golf
 2. the statement "import mylib" is free, and the score of mylib 
 is heavily discounted
 3. ban "import std.algorthims" so people write their own 
 generic libs
 4. ???
 5. d's community lib dev, gooder
You will need to ship a compiler with your game if you want to run D inside the game. Can be done, but not my kind of project.
Jun 23
parent monkyyy <crazymonkyyy gmail.com> writes:
On Monday, 24 June 2024 at 06:07:02 UTC, Kapendev wrote:
 On Saturday, 22 June 2024 at 15:56:38 UTC, monkyyy wrote:
 I recently played "the farmer was replaced", unlike most 
 coding sims the "levels" overlapped so I made a "map" function 
 and made fairly short solution for all its puzzles. So your 
 solving several problems at once and you probably reuse some 
 code (however the game doesnt have a low line count 
 leaderboard, and it python, and its poorly balanced etc)

 So its been on my mind that you can make coding challenges 
 that reuse code. so basic framework for making such a thing:

 1. have 18 puzzles, probably on the easier side of code golf
 2. the statement "import mylib" is free, and the score of 
 mylib is heavily discounted
 3. ban "import std.algorthims" so people write their own 
 generic libs
 4. ???
 5. d's community lib dev, gooder
You will need to ship a compiler with your game if you want to run D inside the game. Can be done, but not my kind of project.
if you ship on steam, not if its a github thing or even a website that uses whatever open source compiler running services
Jun 24
prev sibling parent reply monkyyy <crazymonkyyy gmail.com> writes:
On Saturday, 22 June 2024 at 15:56:38 UTC, monkyyy wrote:
 
my current list ``` css colors foobarfizzbuzz prime factoration emojify morse decoding --- rule 110 3n+1 bottles of beer token counter small clock 1 billion line changle(to 10k lines?) --- excited cat nice number match ()'s coin change 3 sum ``` I'm looking for canonical good solutions and bad solutions for testing and scoring reasons and 3 more puzzles and a scoring system (tokens rather then char's, maybe some edge cases to prevent lookup tables) if anyone's interested I'll take any help
Jun 25
parent monkyyy <crazymonkyyy gmail.com> writes:
On Tuesday, 25 June 2024 at 19:47:34 UTC, monkyyy wrote:
 
repo: https://github.com/crazymonkyyy/monkyyy-code-golf-course- I probably wont be on beerconf again if theres been any more attempts
Jun 30