mirror of
https://github.com/izumariu/puberty.git
synced 2025-06-18 13:35:36 -04:00
INIT
This commit is contained in:
commit
da1768a57f
69
concept.txt
Normal file
69
concept.txt
Normal file
@ -0,0 +1,69 @@
|
||||
PUBERTY
|
||||
|
||||
|
||||
PURPOSE.
|
||||
This language's code is supposed to resemble a pubertal masturbation procedure.
|
||||
It is not intended to find use in public business.
|
||||
The language was written to explore a new way of programming.
|
||||
|
||||
|
||||
FUNCTIONAL PRINCIPLE.
|
||||
The program begins by stating the date and the time, then the person is introduced,
|
||||
and the kinks are listed, arousement level strongest to weakest. After that short
|
||||
intro, the real code follows.
|
||||
There are 6 byte-sized registers(A,B,C,D,E,F), all starting with value 0, which are used to manipulate data,
|
||||
and a register pointer(called REGPTR), which is initialized with 0.
|
||||
After an instruction is executed, the following code is executed: `REGPTR%=6 ; REGISTERS[REGPTR]%=256`.
|
||||
|
||||
|
||||
INTRO.
|
||||
First comes the date sentence. American date notation is used; the time zone is GMT.
|
||||
Example:
|
||||
|
||||
It is August 15, 2018, 04:32:06 PM.
|
||||
|
||||
This initializes $D to 1534350732(the Unix timestamp of the date)%256.
|
||||
|
||||
Second sentence uses the pattern `<CHARACTER> is in his bed, bored.`
|
||||
Example:
|
||||
|
||||
Izu is in his bed, bored.
|
||||
|
||||
This initializes $C to 3, the character count of the character's name.
|
||||
|
||||
Third sentence uses the pattern `(His|Her|Their) secret (kink is|kinks are) <kink1>(, <kinks>).`
|
||||
Example:
|
||||
|
||||
His secret kinks are fatfurs, inflation, growth and kitsunes.
|
||||
|
||||
Now the word "fatfur" = 5, "inflation" = 4, "growth" = 3 and "kitsunes" = 2.
|
||||
This'll come in handy soon.
|
||||
|
||||
Fourth sentence(optional) uses the pattern `(Suddenly|Then) ((he|she) spots|they spot) <kink>.`
|
||||
!The matching personal pronoun from sentence 3 MUST be used here!
|
||||
Example:
|
||||
|
||||
Suddenly he spots fatfurs.
|
||||
|
||||
This initializes $A to 2^<kink>; so in this case $A=2^5=32.
|
||||
If this sentence is left out, $A=0.
|
||||
|
||||
Fifth sentence is "(Suddenly|Then|Soon) the following sounds become audible."
|
||||
!This sentence needs to conclude the introduction!
|
||||
After that, the program code follows.
|
||||
ALL KEYWORDS EXCEPT FOR `OMG MOM GET OUTTA HERE` ARE CASE-INSENSTIVIE
|
||||
|
||||
|
||||
KEYWORDS.
|
||||
fap - increments the register pointed to by REGPTR by 1
|
||||
ugh - zeroes the value of the current register
|
||||
<kink>,fuck - increments the register pointed to by REGPTR by the value of <kink> | IF USED ONCE, IT HAS A COOLDOWN OF 2^<KINK-2> FAPS
|
||||
<kink>,hnng - increments the register pointed to by REGPTR by 2^<kink> | IF USED ONCE, IT HAS A COOLDOWN OF 2^<KINK-1> FAPS
|
||||
yeah - increments REGPTR by 1
|
||||
yes - print the ASCII value of the current register
|
||||
oh - input an ASCII char into the current register
|
||||
OMGMOMGETOUTTAHERE - immediately halts the program | MUST BE ALL UPPERCASE
|
||||
sigh - immediately halts the program
|
||||
squirt - equivalent to `yes yeah yes yeah yes yeah yes yeah yes yeah yes yeah`
|
||||
ngh <comment> hhh - comment, will not be evaluated
|
||||
hrg <loop> mmf - loop until current register is zero
|
2
examples/cat.fap
Normal file
2
examples/cat.fap
Normal file
@ -0,0 +1,2 @@
|
||||
It is January 1st, 1970, 12:00:10 AM. Ganymede is in his bed, bored. His secret kinks are vore, fatfurs, inflation and growth. Soon the following sounds become audible.
|
||||
fap hrg yeah oh yes ugh yeah yeah yes yeah yeah yeah mmf
|
47
examples/helloworld.fap
Normal file
47
examples/helloworld.fap
Normal file
@ -0,0 +1,47 @@
|
||||
It is June 12, 2018, 03:02:04 PM. Izu is in his bed, bored.
|
||||
His secret kinks are vore, fatfurs, inflation, growth and kitsunes. Then he spots
|
||||
fatfurs. Soon the following sounds become audible.
|
||||
|
||||
fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap
|
||||
fap fap fap fap fap fap fap fap fap
|
||||
fap fap fap fap fap fap fap fap fap fap fap fap yes ngh Print 'H' hhh
|
||||
|
||||
fap fap fap fap fap fap fap fap fap
|
||||
fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap yes ngh Print 'e' hhh
|
||||
|
||||
yeah yeah yeah yes yes ngh Go to register D, which has the ASCII value of 'l' stored(due to date&time), and print it twice. hhh
|
||||
fap fap fap yes ngh Increment $D three times, which results in 'o', and print it. hhh
|
||||
yEAH YeaH fAtfURs,hNNg yEAH ngh Zero $F, then set it to 32 and go to $A. (also demonstration of case-insensitive commands here!) hhh
|
||||
fap fap inflation,hnng ngh Increment $A by 1+1+16=18, so it becomes 'w' hhh
|
||||
|
||||
yeah fap fap fap fap fap fap fap fap fap fap fap
|
||||
fap fap fap fap fap fap fap fap vore,hnng
|
||||
fap fap fap fap fap fap fap fap fap fap fap
|
||||
fap fap fap fap fap fap fap fap fap fap
|
||||
fap fap fap fap fap fap fap ngh This paragraph adds 47 faps and a "vore,hnng"(64), so $B=111(='o') hhh
|
||||
|
||||
yeah fap fap fap fap fap fap fap fap fap fap fap
|
||||
fap fap fap fap fap fap fap fap vore,hnng
|
||||
fap fap fap fap fap fap fap fap fap fap fap
|
||||
fap fap fap fap fap fap fap fap fap fap
|
||||
fap fap fap fap fap fap fap ngh Using the previous paragraph again, but because $C was initialized with 3, it is now 114(='r') hhh
|
||||
|
||||
yeah ugh fap fap fap fap fap fap fap
|
||||
fap fap fap fap fap fap fap fap fap fap fap
|
||||
fap fap fap fap fap fap fap fap
|
||||
fap fap fap fap fap fap fap fap fap fap
|
||||
fap fap fap fap fap fap fap fap fap fap fap fap
|
||||
fap fap fap fap fap fap fap fap fap fap fap
|
||||
fap fap fap fap fap fap fap fap fap fap fap fap fap fap
|
||||
fap fap fap fatfurs,hnng yeah ngh $D is set to 'l' again hhh
|
||||
|
||||
fap fap fap fap fap fap fap fap
|
||||
fap fap fap fap fap fap fap fap fap fap fap
|
||||
fap fap fap fap fap fap fap fap fap
|
||||
fap fap fap fap fap fap fap fap vore,hnng ngh Increment $E by 36+64; $E is now 100(='d') hhh
|
||||
|
||||
yeah squirt ngh Goes to $F and prints $F+$A+$B+$C+$D+$E = " world" hhh
|
||||
|
||||
ugh growth,hnng kitsunes,fuck yes ngh Print a newline hhh
|
||||
|
||||
sigh ngh Actually not needed; just to conclude this program nicely hhh
|
2
examples/helloworld_nocomments.fap
Normal file
2
examples/helloworld_nocomments.fap
Normal file
@ -0,0 +1,2 @@
|
||||
It is August 15, 2018, 04:32:12 PM. Izu is in his bed, bored. His secret kinks are vore, fatfurs, inflation, growth and kitsunes. Then he spots fatfurs. Soon the following sounds become audible.
|
||||
fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap yes fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap yes yeah yeah yeah yes yes fap fap fap yes yEAH YeaH fAtfURs,hNNg yEAH fap fap inflation,hnng yeah fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap vore,hnng fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap yeah fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap vore,hnng fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap fap yeah fatfurs,hnng fap fap fap fap vore,hnng squirt
|
120
interpreter.rb
Normal file
120
interpreter.rb
Normal file
@ -0,0 +1,120 @@
|
||||
FNAME = ARGV[0] ; ARGV.clear
|
||||
BNAME = FNAME.match(/(.+)\.[^.]+$/)[1]
|
||||
$CONTENT = open(FNAME,?r).read.strip.split(?.)
|
||||
$REGS = [0, 0, 0, 0, 0, 0]
|
||||
$REGPTR = 0
|
||||
$IPTR = 0
|
||||
PRONOUNS={
|
||||
m:{personal:"[Hh]e", possessive:"[Hh]is", relative:"[Hh]im", verb_suffix:"s"},
|
||||
f:{personal:"[Ss]he", possessive:"[Hh]er", relative:"[Hh]er", verb_suffix:"s"},
|
||||
a:{personal:"[Tt]hey", possessive:"[Tt]heir", relative:"[Tt]hem", verb_suffix:"" }
|
||||
}
|
||||
|
||||
->{
|
||||
_months = %w(January February March April May June July August September October November December)
|
||||
_phrase = $CONTENT.shift.strip
|
||||
_rxp=Regexp.new("^It\\s+is\\s+(#{_months.join(?|)})\\s+(\\d{,2})(st|nd|th)?,\\s+(\\d{4}),\\s+(\\d{,2}):(\\d{,2}):(\\d{,2})\\s+([AP]M)$", Regexp::MULTILINE)
|
||||
_m = _phrase.match _rxp
|
||||
_m||abort("OOPS WRONG SYNTAX IN FIRST INTRO SENTENCE")
|
||||
$REGS[3] = Time.new(
|
||||
_m[4].to_i,
|
||||
_months.index(_m[1])+1,
|
||||
_m[2].to_i,
|
||||
( _m[8]=="AM" ? (_m[5]=="12" ? 0 : _m[5].to_i) : (_m[5]=="12" ? 12 : (12+_m[5].to_i)) ),
|
||||
_m[6].to_i,
|
||||
_m[7].to_i,
|
||||
0
|
||||
).to_i%256
|
||||
}.call
|
||||
|
||||
->{
|
||||
_phrase = $CONTENT.shift.strip
|
||||
_rxp=Regexp.new("^(.+)\\s+is\\s+in\\s+(his|her|their)\\s+bed,\\s+bored$", Regexp::MULTILINE)
|
||||
_m = _phrase.match _rxp
|
||||
_m||abort("OOPS WRONG SYNTAX IN SECOND INTRO SENTENCE")
|
||||
$REGS[2] = _m[1].length
|
||||
GENDER=(case _m[2];when "his";:m;when "her";:f;when "their";:a;end)
|
||||
}.call
|
||||
|
||||
->{
|
||||
_phrase = $CONTENT.shift.strip
|
||||
_rxp=Regexp.new("#{PRONOUNS[GENDER][:possessive]}\\s+secret\\s+kinks?\\s+(is|are)\\s+(.+)$", Regexp::MULTILINE)
|
||||
_m = _phrase.match _rxp
|
||||
_m||abort("OOPS WRONG SYNTAX IN THIRD INTRO SENTENCE")
|
||||
_plural=(_m[1]=="are")
|
||||
_kinks = _m[2].split(/\s*,\s*|\s*and\s*/)
|
||||
_plural ? (_kinks.length>1 ? (KINKS=_kinks.reverse.map(&:downcase)) : abort("OOPS WRONG SYNTAX IN THIRD INTRO SENTENCE")) : (_kinks.length==1 ? (KINKS=_kinks.map(&:downcase)) : abort("OOPS WRONG SYNTAX IN THIRD INTRO SENTENCE"))
|
||||
$COOLDOWNS = Hash.new
|
||||
KINKS.each_with_index{|k,i|$COOLDOWNS.store(k,0)}
|
||||
}.call
|
||||
|
||||
->{
|
||||
_phrase = $CONTENT.shift.strip
|
||||
if _phrase.match /^(Then|Suddenly)/
|
||||
_rxp=Regexp.new("^(Then|Suddenly)\\s+#{PRONOUNS[GENDER][:personal]}\\s+spot#{PRONOUNS[GENDER][:verb_suffix]}\\s+(.+)$", Regexp::MULTILINE)
|
||||
_m = _phrase.match _rxp
|
||||
_m||abort("OOPS WRONG SYNTAX IN FOURTH INTRO SENTENCE")
|
||||
$REGS[0] = 2**(KINKS.index(_m[2].downcase)+2)
|
||||
else
|
||||
$CONTENT.unshift _phrase
|
||||
end
|
||||
}.call
|
||||
|
||||
->{
|
||||
_phrase = $CONTENT.shift.strip
|
||||
_rxp=Regexp.new("^(Soon|Then|Suddenly)\\s+the\\s+following\\s+sounds\\s+become\\s+audible$", Regexp::MULTILINE)
|
||||
_m = _phrase.match _rxp
|
||||
_m||abort("OOPS WRONG SYNTAX IN #{$REGS[0]==0 ? "FOURTH" : "FIFTH"} INTRO SENTENCE")
|
||||
}.call
|
||||
|
||||
$CONTENT = $CONTENT.join(".").gsub(/ngh.+hhh/,"").gsub(/\s+/," ").strip.split
|
||||
$RETSTACK= []
|
||||
|
||||
unless $CONTENT.select{|i|i.match(/^hrg$/i)}.length == $CONTENT.select{|i|i.match(/^mmf$/i)}.length
|
||||
abort("ERROR: MISMATCHED LOOP MARKERS")
|
||||
end
|
||||
|
||||
#p $REGS
|
||||
|
||||
until $IPTR == $CONTENT.length
|
||||
case $CONTENT[$IPTR]
|
||||
when /^fap$/i
|
||||
$REGS[$REGPTR] += 1
|
||||
$COOLDOWNS = $COOLDOWNS.to_a.map{|i|i[1]-=1;i[1]<0&&i[1]=0;i}.to_h
|
||||
when /^ugh$/i
|
||||
$REGS[$REGPTR] = 0
|
||||
when Regexp.new("^(#{KINKS.join(?|)}),fuck$",Regexp::IGNORECASE)
|
||||
if $COOLDOWNS[$1.downcase] == 0
|
||||
$REGS[$REGPTR] += KINKS.index($1.downcase)+2
|
||||
$COOLDOWNS[$1.downcase] = 2**KINKS.index($1.downcase)
|
||||
else
|
||||
abort("ERROR: COOLDOWN DIDN'T EXPIRE ON #{$1.upcase.inspect}(WAS #{$COOLDOWNS[$1.downcase]} WHEN CALL OCCURRED)")
|
||||
end
|
||||
when Regexp.new("^(#{KINKS.join(?|)}),hnng$",Regexp::IGNORECASE)
|
||||
if $COOLDOWNS[$1.downcase] == 0
|
||||
$REGS[$REGPTR] += 2**(KINKS.index($1.downcase)+2)
|
||||
$COOLDOWNS[$1.downcase] = 2**(KINKS.index($1.downcase)+1)
|
||||
else
|
||||
abort("ERROR: COOLDOWN DIDN'T EXPIRE ON #{$1.upcase.inspect}(WAS #{$COOLDOWNS[$1.downcase]} WHEN CALL OCCURRED)")
|
||||
end
|
||||
when /^yeah$/i
|
||||
$REGPTR += 1
|
||||
when /^yes$/i
|
||||
putc $REGS[$REGPTR]
|
||||
when /^oh$/i
|
||||
$REGS[$REGPTR] = gets.chomp[0]
|
||||
when /^hrg$/i
|
||||
$RETSTACK << $IPTR
|
||||
when /^mmf$/i
|
||||
$REGS[$REGPTR] == 0 ? $RETSTACK.pop : $IPTR=$RETSTACK[-1]
|
||||
when /^squirt$/i
|
||||
6.times{putc($REGS[$REGPTR]);$REGPTR+=1;$REGPTR%=$REGS.length}
|
||||
when /^OMGMOMGETOUTTAHERE$/, /^sigh$/i
|
||||
exit
|
||||
else
|
||||
abort "UNKNOWN COMMAND #{$CONTENT[$IPTR].inspect}"
|
||||
end
|
||||
$REGPTR %= $REGS.length
|
||||
$REGS[$REGPTR] %= 256
|
||||
$IPTR += 1
|
||||
end
|
19
license.txt
Normal file
19
license.txt
Normal file
@ -0,0 +1,19 @@
|
||||
Copyright (c) 2018 Izu
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
Loading…
Reference in New Issue
Block a user