* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: Having some fun, you can join too  (Read 1888 times)

0 Members and 1 Guest are viewing this topic.

Offline Hayleia

  • Full User
  • Join Date: Nov 2014
  • Location:
  • Posts: 324
  • Post Rating Ratio: +12/-0
Having some fun, you can join too
« on: March 25, 2017, 10:57:31 pm »
I had that idea when one too many person said that Axe was intrinsically unreadable (even though nope, a "noob's" Axe is as readable as a "noob's" Basic, and an "expert's" Axe is as unreadable as an "expert's" Basic, it's just that many more Axe programmers were into optimization, thus making more unreadable Axe programs than unreadable Basic programs).

Anyway, here's the source for a Hello World.
Code: [Select]
.AA
/()/()+(+())*()+()*()+(+())+(/())+(+(+())+())+(/())+(+())+(+())+(/())->{/()/()+()+(+())*()+(+())*()+(+())}^^r/()/()+()*()+(+())+(/())*()+(+())+(+()+())+(/())+(+(+())+())->{/()/()+(+())*()+()*(*())+(+())+(/())+()}^^r/()/()+(+())*()+()*()+(+())+(/())+(+(+())+())+(/())+(+())+(+())->{/()/()+(+())*(*())+()*()+(+())+(/())+()+()}^^r/()/()+()+(+(+())+())*()+(/())+()+(+())+(+()+())+(/())+(+())+(/())->{/()/()+(+())*()+()*(*())+(/())+()+(+())}^^r/()/()+()*()*()*(*())+(/())+(/())+(/())+(+(+()+())+())->{/()/()+(+()+())*()+()*()+()+(+(+())+())}^^r/()/()+()+(+()+())*()+()+(/())+()+(/())+()+()+()+()+(/())+()+()+()->{/()/()+(+()+())*()+()*()+(+(+())+())+(/())+()}^^r(/()/()+()+(+())*()+(+())*()+(+()))()
/()/()+(+())*(*())+(/())+(/())*()+(+())+(/())+(+(+())+())->{/()/()+(+())*()+()*(*())+(+())+(/())+()}^^r/()/()+(+())*(*())+(/())+(/())*()+(+())+(/())+(+(+())+())->{/()/()+(+())*()+()*(*())+(/())+()+(+())}^^r/()/()+()+(+())*()+(+())*()+(+())
()(/()/()+()+(+())*()*()+(+()+())+(/())+(/())+()+())
()(/()/()+()*()*()*()+(/())+()+()+(+())+(+())+(+()))
()(/()/()+()+(+())*()+(/())+()+()+()+()+(/())+()+(+(+())+())+(/()))
()(/()/()+(+()+())*()+(+())+(/())+(+()+())+(+()+())+(+()+())+(/())+(+()))
()(/()/()+()*()*()*()+(/())+()+(+())+(+())+(/())+()+(+()))
(+(/()+()+()))(/()/()+()*()*()+()+(+()+())*())


The challenge is to produce the same output but with a smaller program... and obviously without using any other character than the ones already in use (not counting ".AA") :P
Note, -> is the sto arrow, and ^^r is the superscript r.

For those who would like the 8xp directly for the source, you can download it here.



Offline Snektron

  • Lvl 69 Russian Snake
  • CodeWalrus Staff
  • Super User
  • Topic Management
  • Join Date: Dec 2014
  • Location: Netherlands
  • Posts: 3165
  • Post Rating Ratio: +32/-0
  • SSSssssss.....
    • RobinDeWalvis
    • Kzyrox
    • RobinDeWalvis
    • quantuminfinity
  • Gender: Male
Re: Having some fun, you can join too
« Reply #1 on: March 26, 2017, 12:31:32 am »
I'm having vietnam flashbacks to that one javascript program that did the same.
Is that all on the same line btw?
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Offline c4ooo

  • Super User
  • CW Contest II Winner
  • *
  • Join Date: Aug 2015
  • Location: 127.0.0.1
  • Posts: 995
  • Post Rating Ratio: +12/-4
  • Advanced forumer
  • Gender: Male
Re: Having some fun, you can join too
« Reply #2 on: March 26, 2017, 12:47:00 am »
Huh, how does this even work, i don't even see a "disp" >_>

Online Juju

  • aka Yuki Kagayaki aka J̵̭͕͇ù̞̭̝̯̦j̴̭̙̗͖͡ù͏͓̲̕
  • CodeWalrus Staff
  • Super User
  • Server Maintenance
  • Moderator
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Inside a walrus
  • Posts: 3017
  • Post Rating Ratio: +28/-2
  • Couch potato
    • jul.savard
    • juju2143
    • @juju2143
    • juju2143
    • @julosoft
    • juju-kun
    • /u/juju2143
    • juju2143
    • @juju2143
    • Juju's shed
  • Gender: Female
  • WalriiPoints: 99999
Re: Having some fun, you can join too
« Reply #3 on: March 26, 2017, 01:02:52 am »
Reminds me of how JSf*** works. So it works too in Axe or it's something else?
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
  • Consoles, mobile devices and vintage computers owned: A lot
On hiatus until when the sun goes dark in plain day. Won't have internet on Aug 22-23, so try to not kill each other during that time. SO POST LIKE CRAZY WHILE I'M NOT HERE THANKS
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

if you wanna throw money at me and/or CodeWalrus monthly it's here

Offline Streetwalrus

  • Professional slacker
  • Super User
  • Original 5
  • Join Date: Nov 2014
  • Location: Israel
  • Posts: 2903
  • Post Rating Ratio: +20/-0
  • ƎW∀⅁ ƎH⊥
  • Gender: Male
Re: Having some fun, you can join too
« Reply #4 on: March 26, 2017, 01:14:38 am »
Nice one. Reminds me of this.
  • Calculators owned: TI-80, HP 40G, TI-84 Plus rev G (yay 128k RAM), TI-83 Plus Silver Edition (broken LCD), TI-82 Stats.fr (black), TI-Nspire CX rev C (yay Nlaunchy), TI-83+ SE ViewScreen



Offline Ranman

  • Full User
  • Safe-haven access
  • Join Date: Feb 2017
  • Location:
  • Posts: 49
  • Post Rating Ratio: +2/-0
  • Gender: Male
Re: Having some fun, you can join too
« Reply #5 on: March 26, 2017, 01:40:30 am »
Break out the punch cards. :w00t:
  • Calculators owned: TI-89 HW1, TI-92+, Casio 9860G Slim, Casio fx6300, Tandy PC7
Ranman
Bringing Randy Glover's Jumpman to the TI-89 calculator.

Offline Hayleia

  • Full User
  • Join Date: Nov 2014
  • Location:
  • Posts: 324
  • Post Rating Ratio: +12/-0
Re: Having some fun, you can join too
« Reply #6 on: March 26, 2017, 07:00:55 am »
I'm having vietnam flashbacks to that one javascript program that did the same.
Is that all on the same line btw?
No, it's 9 lines. And actually, putting them on the same line makes the program crash :P

Huh, how does this even work, i don't even see a "disp" >_>
HAxe

Reminds me of how JSf*** works. So it works too in Axe or it's something else?
Of course here I'm not playing with arrays and types since Axe has neither of both :P
But it's kind of the same idea yeah.

Nice one. Reminds me of this.
Not impressed. I still see print and chr :trollface:

Break out the punch cards. :w00t:
Sorry about that but I have no idea what you mean. Might be because I'm French and you're using some idiom we don't learn in schools.

Offline JWinslow23

  • Pi is the coolest number in the history of math. :\
  • Super User
  • CW 4x3 challenge - 2nd place
  • *
  • Join Date: May 2015
  • Location: Somewhere between 13 and Graham's Number
  • Posts: 749
  • Post Rating Ratio: +10/-1
  • Use pi! Pi is the absolute greatest! :(
    • @UCu_9qD95nADzc-W6RN-3Z8A
    • 113/11328
  • Gender: Male
Re: Having some fun, you can join too
« Reply #7 on: March 26, 2017, 09:12:49 am »
Hayleia, punch cards used to be (as the name implies) cards you punch holes in, used in the old (no, older than that) days of computers for data input, data output, data storage, and (most esoterically) programming.

Also lol at your Axe source. What the heck is going on there?

Offline p2

  • CodeWalrus Staff
  • Super User
  • Moderator
  • CodeWalrus Supporter
  • *
  • Join Date: Aug 2016
  • Location: Germany
  • Posts: 2266
  • Post Rating Ratio: +8/-0
  • *Wubba lubba dub dub*
    • KaliPhobos
  • Gender: Male
Re: Having some fun, you can join too
« Reply #8 on: March 26, 2017, 10:17:23 am »
Yeah I remember the good old punchcards had to carry a hundred of them around for the most simple programs, and if you dropped them and messed up their order, you were basically screwed.
My father used to learn programming with them ^^

@Hayleia: those thick paper cards with holes in them, I'm sure you know them :)

Also wow, have fun debugging such a code x.x
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

Offline WholeWheatBagels

  • Full User
  • Join Date: May 2016
  • Location: "yes"
  • Posts: 139
  • Post Rating Ratio: +2/-0
  • call me Bagels
    • detjensrobert
    • @@detjensrobert
    • WholeWheatBagels
  • Gender: Male
Re: Having some fun, you can join too
« Reply #9 on: March 26, 2017, 06:25:43 pm »


Programming scantrons. Ew.
Living in another world to you.



Also in case you were wondering Frankie did go to Hollywood

Offline c4ooo

  • Super User
  • CW Contest II Winner
  • *
  • Join Date: Aug 2015
  • Location: 127.0.0.1
  • Posts: 995
  • Post Rating Ratio: +12/-4
  • Advanced forumer
  • Gender: Male
Re: Having some fun, you can join too
« Reply #10 on: March 26, 2017, 06:56:45 pm »
() basically returns the previous value of HL, so you can do something like /() which would be HL/HL and thus one.
(foo)() also calls the address of foo.
« Last Edit: March 26, 2017, 06:58:24 pm by c4ooo »

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18622
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: Having some fun, you can join too
« Reply #11 on: March 26, 2017, 07:01:04 pm »
What kind of wizardry is that, @Hayleia ? O.O
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline Hayleia

  • Full User
  • Join Date: Nov 2014
  • Location:
  • Posts: 324
  • Post Rating Ratio: +12/-0
Re: Having some fun, you can join too
« Reply #12 on: March 27, 2017, 04:47:22 am »
@Ranman @p2 @JWinslow23 Ok about the punch cards, but I still have no idea about "Break out" :P

Also wow, have fun debugging such a code x.x
No need to debug it when it works at first try.
(lol)

() basically returns the previous value of HL, so you can do something like /() which would be HL/HL and thus one.
(foo)() also calls the address of foo.
Ah, finally a challenger :D
You're right about routine calling. And you're half right about your first sentence :P
/() is often one, but not always. Though it does not always matter, depending on what's next.

Offline p2

  • CodeWalrus Staff
  • Super User
  • Moderator
  • CodeWalrus Supporter
  • *
  • Join Date: Aug 2016
  • Location: Germany
  • Posts: 2266
  • Post Rating Ratio: +8/-0
  • *Wubba lubba dub dub*
    • KaliPhobos
  • Gender: Male
Re: Having some fun, you can join too
« Reply #13 on: March 27, 2017, 07:35:06 am »
then I have one last question @Hayleia:
Why?
Why on earth would you ever want to write a code like that???
writing such terribly ugly code should be considered a crime against humanity :ninja:
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

Offline Hayleia

  • Full User
  • Join Date: Nov 2014
  • Location:
  • Posts: 324
  • Post Rating Ratio: +12/-0
Re: Having some fun, you can join too
« Reply #14 on: March 27, 2017, 08:29:37 am »
then I have one last question @Hayleia:
Why?
Why on earth would you ever want to write a code like that???
For several reasons, more or less important.
  • I was bored. Now my Wii U is back so I "released" this without working too much on it so I am really 100% sure it can be improved drastically
  • I wanted to code something in C++ and to get my TI-dev environment on my "new" linux partition. Yeah, of course that code is generated, did you really think I wrote that all by hand? :P
  • and the last one is a longer reason, and it's actually what I wrote in the first post. Axe isn't less readable than Basic. On the contrary, it's a language that supports indentation, functions and custom names for variables (instead of just A-Z) so it's intrinsically more readable than Basic...
    Except that some people take my Axe, matref's Axe and Runer112's Axe as an example for what all Axe programs look like. But nope, that's not what all Axe programs look like. If you want readable Axe, you can get it. Have a look at SSBO's source, you'll understand everything except the main menu. And have a look at Weregoose's Basic. You don't understand one line of his one liners.
    What this means is that Axe and Basic can become unreadable when the dev doesn't care about readability. Like when they try to optimize for speed/memory, or when they do it on purpose like what I just did. And it doesn't mean these languages are intrinsically unreadable. On the contrary, more Axe devs got their Axe programs to be optimized because thanks to indentation, functions and custom variables, they were still more understandable than an optimized Basic program's seq/cumSum/linearReg(ax+b) unindented lines using one-character variables only.

    And another invalid argument is like Axe vs Lua or Axe vs C++ or Axe vs Java or whatever. Because Lua, C++ and Java don't run on 6MHz z80s. So you don't need to optimize anything and you can keep your code readable. If you had to run Java on a z80, you'd end up writing bytecode, so it would be less readable than any Axe code and still slower.

    So yeah, that was kind of my rant and action about that :P

writing such terribly ugly code should be considered a crime against humanity :ninja:
Not as long as I do it on purpose. If a company used Axe as their language for a product (lol) and I wrote such ugly code, yeah, I'd understand I'd get fired.

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games