Home Events! Entrance Everyone Wiki Search Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
November 06, 2024 - @893.66 (what is this?)
Forum activity rating: Three Stars Posts: 34/1k.beats Unread Topics | Unread Replies | Own Posts | Own Topics | Random Topic | Recent Posts
News: :eyes: ~ Inconvenience is counterculture ~ :eyes:

+  MelonLand Forum
|-+  World Wild Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  What is an extremely messy way to write a hello world script?


« previous next »
Pages: [1] Print
Author Topic: What is an extremely messy way to write a hello world script?  (Read 2653 times)
Icey!
Sr. Member ⚓︎
****


Icey/Iceys

⛺︎ My Room

View Profile WWW

First 1000 Members!Pro Bug Finder!OG! Joined 2021!High Speed Ozwomp!
« on: December 29, 2021 @337.87 »

Hello world!
« Last Edit: December 29, 2021 @360.23 by Icelogist » Logged



:ozwomp: my beloved

cinni
Full Member ⚓︎
***


believe in your dreams <3

⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: cinni

View Profile WWW

First 1000 Members!OG! Joined 2021!
« Reply #1 on: December 29, 2021 @769.46 »

Code
using UnityEngine;
using System.Collections;

public class helloWorld : MonoBehaviour
{
   public GameObject world;

   private void OnTriggerEnter(Collider world){
   Debug.Log("Hello" +gameObject.name);
   }
}

^.^ or..

Code
<rss version="2.0">
<channel>
<item>
<title>hello world!</title>
<link></link>
<guid></guid>
<pubDate></pubDate>
<description>
hello world!
</description>
</item>
</channel>
</rss>

(i tried lol)
Logged

Melooon
Hero Member ⚓︎
*****


So many stars!

⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: melon
iMood: Melonking
Itch.io: My Games

View Profile WWW

Thanks for being rad!a puppy for your travelsAlways My PalFirst 1000 Members!spring 2023!Squirtle!!!!MIDI WarriorMIDI Warrior1234 Posts!OzspeckCool Dude AwardRising Star of the Web AwardMessage BuddyPocket Icelogist!OG! Joined 2021!...
« Reply #2 on: December 29, 2021 @791.62 »

Code
let v = "hello";
let roor = "" + "world"
let mrSpace = " "
let daWord = "";

for(let x = 11 ; x >= 0 ; x--) {
 if(x >= 5) {
   daWord = v.charAt(x - v.length) + daWord;
 }
 if(x == 5) {
   daWord += mrSpace
 }
 if(x <= 5) {
   daWord += roor.charAt(roor.length - x);
 }
}

alert(daWord);
Logged


everything lost will be recovered, when you drift into the arms of the undiscovered
m15o
Jr. Member ⚓︎
**


⛺︎ My Room
StatusCafe: m15o

View Profile WWW

First 1000 Members!OG! Joined 2021!
« Reply #3 on: December 30, 2021 @388.26 »

Code
( macros )

%RTN { JMP2r }
%/2 { #01 SFT2 }
%RECT-W { .Screen/width DEI2 #00a0 SUB2 }
%RECT-H { .Screen/height DEI2 #00c0 SUB2 }
%RECT-MARGIN { #0050 }
%MOUSE { .mouse/x LDZ2 .mouse/y LDZ2 }
%-- { #0001 SUB2 }
%++ { #0001 ADD2 }

( devices )

|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &wheel $1 ]
|80 @Controller [ &vector $2 &button $1 &key $1 ]

( zero page )

|0000
	@canvas	 [ &x $2 &y $2 &w $2 &h $2 ]

( program )

|0100
	;text1 .canvas/x LDZ2 #0035 ;draw-text JSR2
BRK

@draw-letters ( letters length* x* y* color -- )
	(
		assign parameters to local variables
	)
	,&color STR  ( ws: letters length x y )
	.Screen/y DEO2 ( ws letters length x )
	,&x STR2    ( ws: letters length )
	,&length STR2 ( ws: letters )
	(
		reverse loop over each letter to draw them		
	)
	&loop ( ws: letters )
		,&length LDR2 ( ws: letters length )
		#0001 SUB2   ( ws: letters length )
		#0008 MUL2   ( ws: letters xoffset )
		,&x LDR2 ADD2
		.Screen/x DEO2 ( ws: letters )
		;draw-letter JSR2
		(
			decrease length, loop if > 0
		)
		,&length LDR2 #0001 SUB2
		DUP2 ,&length STR2
		#0000 GTH2 ,&loop JCN
	RTN
	BRK
BRK
( local )
&color $1
&x	$2
&y	$2
&length $2

@draw-letter ( letter -- )
    (
	  	the letter 'a' starts at offset #61 of the ascii table.
    )
    #61 SUB ( ws: char )
    (
		to get the offset, multiply char by 8.
		first, pad with 00 to get a short.
    )
	#00 SWP
	#0008 MUL2
	(
		add the font addr to offset and draw letter.
	)
	;font ADD2 .Screen/addr DEO2
	#05 .Screen/sprite DEO
	&draw-space
	RTN
BRK

(
	push all letters into the ws.
)
@draw-text ( addr* x* y* -- a... )
	(
		load length, add length and count to rs
	)
	STH2 STH2
	LDAk ( ws: addr* len / rs: )
	#00 ( ws: addr* len 00 / rs: )
	&loop
		STH2  ( ws: addr* / rs: len counter )
		DUP2  ( ws: addr* addr* / rs: len counter )
		INC2
		#00   ( ws: addr* addr* 00 / rs: len counter )
		STHrk 	( ws: addr* addr* 00 counter / rs: len counter )
		ADD2 LDA
		ROT ROT ( ws: c addr* / rs: len counter )
		STH2r  ( ws: c addr* len counter / rs: )
		INC
		DUP2
		NEQ ,&loop JCN
	POP2
	LDA #00 SWP
	STH2r STH2r
	#01 ;draw-letters JSR2
	RTN
BRK
&addr

@text1 20 "hello 20 "world

@font
	007e 0202 7e42 427e
	0040 4040 7e42 427e
	007e 4040 4040 407e
	0070 4844 4444 4870
	007c 4040 7040 407c
	007c 4040 7040 4040
	007c 4040 4e42 427e
	0042 4242 7e42 4242
	0000 1010 1010 1010
	003c 0808 0808 0870
	0044 4850 6050 4844
	0040 4040 4040 407c
	006c 5242 4242 4242
	0078 4444 4444 4444
	0038 4444 4444 4438
	007c 4444 7c40 4040
	0038 4444 4454 4834
	007c 4444 7c50 4844
	003c 4040 3804 0478
	007c 1010 1010 1010
	0044 4444 4444 4438
	0044 4444 4444 2810
	0044 4444 4444 5428
	0042 4224 1824 4242
	0044 4444 3c04 047c
	007c 0408 1020 407c
	0000 0000 0000 0000


 :happy:
Logged

TAS_1K
Casual Poster
*


⛺︎ My Room

View Profile

First 1000 Members!Joined 2022!
« Reply #4 on: January 26, 2022 @739.05 »

Code
( macros )

%RTN { JMP2r }
%/2 { #01 SFT2 }
%RECT-W { .Screen/width DEI2 #00a0 SUB2 }
%RECT-H { .Screen/height DEI2 #00c0 SUB2 }
%RECT-MARGIN { #0050 }
%MOUSE { .mouse/x LDZ2 .mouse/y LDZ2 }
%-- { #0001 SUB2 }
%++ { #0001 ADD2 }

( devices )

|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &wheel $1 ]
|80 @Controller [ &vector $2 &button $1 &key $1 ]

( zero page )

|0000
	@canvas	 [ &x $2 &y $2 &w $2 &h $2 ]

( program )

|0100
	;text1 .canvas/x LDZ2 #0035 ;draw-text JSR2
BRK

@draw-letters ( letters length* x* y* color -- )
	(
		assign parameters to local variables
	)
	,&color STR  ( ws: letters length x y )
	.Screen/y DEO2 ( ws letters length x )
	,&x STR2    ( ws: letters length )
	,&length STR2 ( ws: letters )
	(
		reverse loop over each letter to draw them		
	)
	&loop ( ws: letters )
		,&length LDR2 ( ws: letters length )
		#0001 SUB2   ( ws: letters length )
		#0008 MUL2   ( ws: letters xoffset )
		,&x LDR2 ADD2
		.Screen/x DEO2 ( ws: letters )
		;draw-letter JSR2
		(
			decrease length, loop if > 0
		)
		,&length LDR2 #0001 SUB2
		DUP2 ,&length STR2
		#0000 GTH2 ,&loop JCN
	RTN
	BRK
BRK
( local )
&color $1
&x	$2
&y	$2
&length $2

@draw-letter ( letter -- )
    (
	  	the letter 'a' starts at offset #61 of the ascii table.
    )
    #61 SUB ( ws: char )
    (
		to get the offset, multiply char by 8.
		first, pad with 00 to get a short.
    )
	#00 SWP
	#0008 MUL2
	(
		add the font addr to offset and draw letter.
	)
	;font ADD2 .Screen/addr DEO2
	#05 .Screen/sprite DEO
	&draw-space
	RTN
BRK

(
	push all letters into the ws.
)
@draw-text ( addr* x* y* -- a... )
	(
		load length, add length and count to rs
	)
	STH2 STH2
	LDAk ( ws: addr* len / rs: )
	#00 ( ws: addr* len 00 / rs: )
	&loop
		STH2  ( ws: addr* / rs: len counter )
		DUP2  ( ws: addr* addr* / rs: len counter )
		INC2
		#00   ( ws: addr* addr* 00 / rs: len counter )
		STHrk 	( ws: addr* addr* 00 counter / rs: len counter )
		ADD2 LDA
		ROT ROT ( ws: c addr* / rs: len counter )
		STH2r  ( ws: c addr* len counter / rs: )
		INC
		DUP2
		NEQ ,&loop JCN
	POP2
	LDA #00 SWP
	STH2r STH2r
	#01 ;draw-letters JSR2
	RTN
BRK
&addr

@text1 20 "hello 20 "world

@font
	007e 0202 7e42 427e
	0040 4040 7e42 427e
	007e 4040 4040 407e
	0070 4844 4444 4870
	007c 4040 7040 407c
	007c 4040 7040 4040
	007c 4040 4e42 427e
	0042 4242 7e42 4242
	0000 1010 1010 1010
	003c 0808 0808 0870
	0044 4850 6050 4844
	0040 4040 4040 407c
	006c 5242 4242 4242
	0078 4444 4444 4444
	0038 4444 4444 4438
	007c 4444 7c40 4040
	0038 4444 4454 4834
	007c 4444 7c50 4844
	003c 4040 3804 0478
	007c 1010 1010 1010
	0044 4444 4444 4438
	0044 4444 4444 2810
	0044 4444 4444 5428
	0042 4224 1824 4242
	0044 4444 3c04 047c
	007c 0408 1020 407c
	0000 0000 0000 0000


 :happy:

Good lord. I don't think anyone's going to top this. Is this Assembly?
Logged
Darmodej
Jr. Member
**


⛺︎ My Room

View Profile

First 1000 Members!Joined 2022!
« Reply #5 on: February 03, 2022 @848.96 »

Code
(=<`#9]~6ZY327Uv4-QsqpMn&+Ij"'E%e{Ab~w=_:]Kw%o44Uqp0/Q?xNvL:`H%c#DD2^WV>gY;dts76qKJImZkj
this is how you write it in the esolang malbolge, named after the eighth circle of hell in dante's inferno
in fact, the first program in this language wasn't even written by a human but rather found through a beam search
Logged

ano, ja jsem on
TAS_1K
Casual Poster
*


⛺︎ My Room

View Profile

First 1000 Members!Joined 2022!
« Reply #6 on: February 08, 2022 @707.77 »

in fact, the first program in this language wasn't even written by a human but rather found through a beam search

That sounds very interesting, can you expand on that? I'm reading up on what a beam search is but kinda lost.
Logged
Darmodej
Jr. Member
**


⛺︎ My Room

View Profile

First 1000 Members!Joined 2022!
« Reply #7 on: February 09, 2022 @4.25 »

in fact, the first program in this language wasn't even written by a human but rather found through a beam search

That sounds very interesting, can you expand on that? I'm reading up on what a beam search is but kinda lost.
i actually havent quite gotten it either
there's breadth-first search (imagine reading a page and then opening every link in new tab), depth-first (clicking the first link), best-first (links are ordered by some parameter into a queue)
from what i understand from the wiki article this is like the last one but with more memory optimization (the queue is limited in number?)
Logged

ano, ja jsem on
Icey!
Sr. Member ⚓︎
****


Icey/Iceys

⛺︎ My Room

View Profile WWW

First 1000 Members!Pro Bug Finder!OG! Joined 2021!High Speed Ozwomp!
« Reply #8 on: February 09, 2022 @345.29 »

Code
(=<`#9]~6ZY327Uv4-QsqpMn&+Ij"'E%e{Ab~w=_:]Kw%o44Uqp0/Q?xNvL:`H%c#DD2^WV>gY;dts76qKJImZkj
this is how you write it in the esolang malbolge, named after the eighth circle of hell in dante's inferno
in fact, the first program in this language wasn't even written by a human but rather found through a beam search

Someone managed to actually make a messy script with just one line of code, now Imagine all the work required to figure out how to make the script in the first place.

This is actually quite interesting to see this, a nice challenge for the programmer to try and figure out, kinda like a puzzle but with code (although code is kinda already a puzzle).
Logged



:ozwomp: my beloved

Kallistero
Full Member ⚓︎
***


SOON.

⛺︎ My Room

View Profile WWW

First 1000 Members!Joined 2023!
« Reply #9 on: September 03, 2023 @739.02 »

This is one of my favorite programmer injokes, to create an "enterprise edition" for simple programs like FizzBuzz and Hello World. Here's a "Hello World Enterprise Edition" from a few years back:

https://github.com/Hello-World-EE/Java-Hello-World-Enterprise-Edition/tree/master/src/com/example

Now, if they only made it a fullstack project, using Amazon RDBMS to get the string characters, authenticated through Cognito, run through a Hibernate ORM backend, using a full microservice architecture feeding into a central MVC trunk, before being fed to front end running on React Redux with TypeScript, displayed through a ThreeJS frame, all with 100% test automation coverage, self-logging, and auto-generated status reports.

There also needs to be fully functional login & registration pages, for added security.  :chef:
« Last Edit: September 03, 2023 @749.35 by Kallistero » Logged

I miss the pomegranate :trash:
Pages: [1] Print 
« previous next »
 

Vaguely similar topics! (3)

GUIDE: Melon's Simple X3D World Tutorial

Started by MelooonBoard ♺ ∙ Web Crafting Materials

Replies: 5
Views: 4713
Last post February 17, 2022 @637.75
by demonologi
Virtual worlds: where the heck do I start?

Started by MemoryBoard ☔︎ ∙ I need Help!

Replies: 5
Views: 2509
Last post June 08, 2023 @27.16
by Melooon
poetry thread: stuff you write, stuff you like

Started by DarmodejBoard ✑ ∙ Writing & Stationery

Replies: 12
Views: 2676
Last post July 26, 2024 @639.64
by spiralstaircase

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies Forum Guide | Rules | RSS | WAP2


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi