### Author Topic: [CHALLENGE]Logic and Optimization  (Read 12456 times)

0 Members and 1 Guest are viewing this topic.

#### Xeda112358

• they/them
• Moderator
• LV12 Extreme Poster (Next: 5000)
• Posts: 4646
• Rating: +717/-6
• Calc-u-lator, do doo doo do do do.
##### Re: [CHALLENGE]Logic and Optimization
« Reply #15 on: November 20, 2010, 12:54:21 pm »
Where do you find this code ?

#### matthias1992

• LV6 Super Member (Next: 500)
• Posts: 408
• Rating: +33/-5
##### Re: [CHALLENGE]Logic and Optimization
« Reply #16 on: November 20, 2010, 12:57:55 pm »
Code: [Select]
:Prompt E,N:If E=2 and N=1:Disp "NRML:If E != 2 or N!=1:Then:If E=2 or N=1:Then:Disp "ALMST NRML:Else:Disp "WEIRD80bytes, for the first challenge

This is missing two end statements plus it could be optimized to this:
Code: [Select]
Prompt E,NIf N(E=2Disp "NRMLIf E=2 or N=1Disp "ALMST NRMLIf ((N!=1)E!=2Disp "WEIRD
MASM xxxxxxxxxx aborted | SADce ====:::::: 40% -Halted until further notice| XAOS =====::::: 50% -Units done| SKYBOX2D engine ========== 100% -Pre-alpha done. Need to  document it and extend |

~Those who dream by day are cognizant of much more than those who dream by night only. -Sir Edgar Allen Poe-

#### kindermoumoute

• Posts: 836
• Rating: +54/-3
##### Re: [CHALLENGE]Logic and Optimization
« Reply #17 on: November 20, 2010, 01:03:17 pm »
Where do you find this code ?

Ok, sorry, there is some difference with my code :
Code: [Select]
:Input "Number :",Str1:Input "From Base :",C:Input "to Base :",D:"123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ→Str2:length(Str1→A:0:For(Ɵ,1,A:Ans+C^(A-Ɵ)inString(Str2,sub(Str1,Ɵ,1:End:Ans→B:"0"+Str2→Str2:While B:int(B/D→C:sub(Str2,B-DC+1,1)+Str1→Str1:C→B:Endsub(Str1,1,length(Str1)-A
200 bytes, 36 bases.
Projects :

Worms armageddon z80 :
- smoothscrolling Pixelmapping : 100%
- Map editor : 80%
- Game System : 0%

Tutoriel français sur l'Axe Parser
- 1ère partie : en ligne.
- 2ème partie : en ligne.
- 3ème partie : en ligne.
- 4ème partie : 10%
- Annexe : 100%

#### yunhua98

• You won't this read sentence right.
• LV11 Super Veteran (Next: 3000)
• Posts: 2718
• Rating: +214/-12
• Go take a dive in the River Lethe.
##### Re: [CHALLENGE]Logic and Optimization
« Reply #18 on: November 20, 2010, 01:08:57 pm »
New challenge!
make the smallest program possible with the final "e" rule for english.  (I had to make this yesterday, shows how you can use calcs in english too, )
I have 331 bytes with an 8 letter title

bascically, it lets you enter the root word, and the suffix, and combines it for you.
« Last Edit: November 20, 2010, 01:09:20 pm by yunhua98 »

 Spoiler For =====My Projects=====: Minor setback due to code messing up.  On hold for Contest.
On hold for Contest. Spoiler For ===Staff Memberships===:
Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>

#### MRide

• Posts: 711
• Rating: +14/-0
• You can't see this.
##### Re: [CHALLENGE]Logic and Optimization
« Reply #19 on: November 20, 2010, 01:09:50 pm »
What do you mean? I don't understand.

#### Munchor

• LV13 Extreme Addict (Next: 9001)
• Posts: 6199
• Rating: +295/-121
• Code Recycler
##### Re: [CHALLENGE]Logic and Optimization
« Reply #20 on: November 20, 2010, 01:11:15 pm »
New challenge!
make the smallest program possible with the final "e" rule for english.  (I had to make this yesterday, shows how you can use calcs in english too, )
I have 331 bytes with an 8 letter title

bascically, it lets you enter the root word, and the suffix, and combines it for you.

I'm not getting it either 'e-rule'?

#### yunhua98

• You won't this read sentence right.
• LV11 Super Veteran (Next: 3000)
• Posts: 2718
• Rating: +214/-12
• Go take a dive in the River Lethe.
##### Re: [CHALLENGE]Logic and Optimization
« Reply #21 on: November 20, 2010, 01:11:59 pm »
the rule:  A word ending in "e" plus a suffix starting with a consonent, the final "e" isn't dropped, if the suffix starts with a vowel, it is dropped, unless the root word's "e" is precede by a "c" or a "g" and the suffix starts with an "a" or "o"

 Spoiler For =====My Projects=====: Minor setback due to code messing up.  On hold for Contest.
On hold for Contest. Spoiler For ===Staff Memberships===:
Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>

#### Munchor

• LV13 Extreme Addict (Next: 9001)
• Posts: 6199
• Rating: +295/-121
• Code Recycler
##### Re: [CHALLENGE]Logic and Optimization
« Reply #22 on: November 20, 2010, 01:13:41 pm »
the rule:  A word ending in "e" plus a suffix starting with a consonent, the final "e" isn't dropped, if the suffix starts with a vowel, it is dropped, unless the root word's "e" is precede by a "c" or a "g" and the suffix starts with an "a" or "o"

Example?

Mode ---> Modable?
Name ---> Namable?

#### yunhua98

• You won't this read sentence right.
• LV11 Super Veteran (Next: 3000)
• Posts: 2718
• Rating: +214/-12
• Go take a dive in the River Lethe.
##### Re: [CHALLENGE]Logic and Optimization
« Reply #23 on: November 20, 2010, 01:14:52 pm »
kinda, Lone + ly = Lonely
Notice + able = noticeable
Bride + al = Bridal

but the final words gotta make sense, obviously.

 Spoiler For =====My Projects=====: Minor setback due to code messing up.  On hold for Contest.
On hold for Contest. Spoiler For ===Staff Memberships===:
Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>

#### Xeda112358

• they/them
• Moderator
• LV12 Extreme Poster (Next: 5000)
• Posts: 4646
• Rating: +717/-6
• Calc-u-lator, do doo doo do do do.
##### Re: [CHALLENGE]Logic and Optimization
« Reply #24 on: November 20, 2010, 01:15:59 pm »
Code: [Select]
:Prompt E,N:If E=2 and N=1:Disp "NRML:If E != 2 or N!=1:Then:If E=2 or N=1:Then:Disp "ALMST NRML:Else:Disp "WEIRD80bytes, for the first challenge

This is missing two end statements plus it could be optimized to this:
Code: [Select]
Prompt E,NIf N(E=2Disp "NRMLIf E=2 or N=1Disp "ALMST NRMLIf ((N!=1)E!=2Disp "WEIRD

Yours uses 6 bytes more, and mine is not missing two end statements. It is the end of a program so it does not need them.

#### Munchor

• LV13 Extreme Addict (Next: 9001)
• Posts: 6199
• Rating: +295/-121
• Code Recycler
##### Re: [CHALLENGE]Logic and Optimization
« Reply #25 on: November 20, 2010, 01:33:04 pm »
Code: [Select]
Prompt E,NIf N(E=2Disp "NRMLIf E=2 or N=1Disp "ALMST NRMLIf ((N!=1)E!=2Disp "WEIRD
I had no idea of this tricks though

#### Xeda112358

• they/them
• Moderator
• LV12 Extreme Poster (Next: 5000)
• Posts: 4646
• Rating: +717/-6
• Calc-u-lator, do doo doo do do do.
##### Re: [CHALLENGE]Logic and Optimization
« Reply #26 on: November 20, 2010, 01:34:51 pm »
Code: [Select]
Prompt E,NIf N(E=2Disp "NRMLIf E=2 or N=1Disp "ALMST NRMLIf ((N!=1)E!=2Disp "WEIRD
I had no idea of this tricks though
Ah, well, it didn't work for me... It just displayed all three phrases.

#### Munchor

• LV13 Extreme Addict (Next: 9001)
• Posts: 6199
• Rating: +295/-121
• Code Recycler
##### Re: [CHALLENGE]Logic and Optimization
« Reply #27 on: November 20, 2010, 01:35:56 pm »
Code: [Select]
Prompt E,NIf N(E=2Disp "NRMLIf E=2 or N=1Disp "ALMST NRMLIf ((N!=1)E!=2Disp "WEIRD
I had no idea of this tricks though
Ah, well, it didn't work for me... It just displayed all three phrases.

How stupid of me, trust you!

Hhaha, just kidding, but the code makes sense even without trying it LOL

#### Xeda112358

• they/them
• Moderator
• LV12 Extreme Poster (Next: 5000)
• Posts: 4646
• Rating: +717/-6
• Calc-u-lator, do doo doo do do do.
##### Re: [CHALLENGE]Logic and Optimization
« Reply #28 on: November 20, 2010, 01:37:36 pm »
What? It wasn't MY code!

#### Munchor

• LV13 Extreme Addict (Next: 9001)
• Posts: 6199
• Rating: +295/-121
• Code Recycler
##### Re: [CHALLENGE]Logic and Optimization
« Reply #29 on: November 20, 2010, 01:38:47 pm »
What? It wasn't MY code!

:O!!! Sorry!

Now I see, it was mathias code, SORRY!