Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Ugliness test

Name: Anonymous 2012-11-30 12:31

I'm making a new language. I think I have already fixed most of design flaws, but I need to check it first before writing a real interpreter.
Post your code snippets, I will translate them to my lang and we will decide whether they are beautiful enough.

Name: Anonymous 2012-11-30 13:44

obligatory fibs, factorial, higher-order functions, extensible numeric tower including rationals, complex, gaussian integers, etc.

Name: Anonymous 2012-11-30 13:59

Translate this!

gui D = M:[0 0] = C:\point = Exit:ø = FI:<E=ø> = FP:[0 0] = LI:<E=ø> = LCT:0
                = Pop:ø = G:gfx 1 1 = R:o
 render:<= R:D'render = {F:R.proxy = {G'w≤≥R'w |v G'h≤≥R'h = !G: gfx R'w R'h}
                                   = F 0 0 G = !R:G
                        ;√ = !R:R'copy}
         = C,cursor,<C:y = P:M-C'hs = R.blit @P C
           = {FG:Pop |a Pop'render = R.blit @(P-[0 FG'h]) FG}
           >
         = {Exit=ø;R}>
 itemAt:<M P W = {F:W.items = F,c | fnd:[R I] inRect R M
                            | <[[X Y @_] I] = itemAt M-[X Y] P+[X Y] I; _=[P W]>
                 ;√ = [P W]}>
 exit:<R=!Exit:[R]>
 input:<Es = SGUI:GUI = !GUI:Me = T:time,c,flt = Ts:Timers = !Timers:ø
           = !Ts | filter:[I N F] {T≤N=[I N F]; F,c=[I time,c,flt+I F]} = [@Ts @!Timers]
           = [NP NW]: itemAt M [0 0] D = NI:{NW.input;<E=ø>} = !Pop:{F:NW.popup=F,c}
           = !C: {F:NW.cursor=F,c} |v \point
           = Es | e <[N S]
             = {N,<\mice_move = !M:S = NI [N S S-NP] = √> |a n (ptrEq LI NI)
                  //= pp [NW {F:NW.items=F,c}]
                  = LI [\mice_over ø M] = !LI:NI = LI [\mice_over √ M]
               ;N,<\mice_left;\mice_right> |a S
                = {ptrEq FI NI =
                  ;√ = FI [\focus ø M-FP] = !FI:NI = !FP:NP
                     = FI [\focus √ M-FP]}
                = {T-LCT≤1/4 = FI [“double_$(d 5 N)” √ M-FP]} = !LCT:T}
             = FI [N S M-FP]>
           = !GUI:SGUI = Me>
 = sdl (R.input ? |h render) = Exit,0

Name: Anonymous 2012-11-30 14:11

import scala.math

class Complex (real: Double, imaginary: Double) {
    def x    = real
    def y    = imaginary
    def conj = new Complex(real, 0 - imaginary)
    def mod  = math.sqrt(this.x * this.x + this.y * this.y)
    def arg  = math.atan2(this.x, this.y)
    override def toString() = "" + x + (if (y < 0) "" else "+") + y + "i"
}

object Main {
    def main(args: Array[String])
    {
        val z = new Complex(1.2, 3.4)
        printf("z = %s, z* = %s, |z| = %f, arg z = %f", z.toString(),
                    z.conj.toString(), z.mod, z.arg);
    }
}

Name: Anonymous 2012-11-30 14:25

echo "content" > file

Name: Anonymous 2012-11-30 14:37

>>4
Symta:

complex Real Imaginary = X:Real = Y:Imaginary = o conj:<= complex Real 0 - Imaginary>
  mod:<= sqrt X^2 + Y^2> arg:<= atan2 X Y> _prn:<=“$X${Y≤0;“+”}$(Y)i”>
= Z: complex 1.2 3.4 = p “Z = $Z, Z* = $(Z'conj), |Z| = $(Z'mod), arg Z = $(Z'arg)”


Scala:

import scala.math
class Complex (real: Double, imaginary: Double) {
    def x    = real
    def y    = imaginary
    def conj = new Complex(real, 0 - imaginary)
    def mod  = math.sqrt(this.x * this.x + this.y * this.y)
    def arg  = math.atan2(this.x, this.y)
    override def toString() = "" + x + (if (y < 0) "" else "+") + y + "i"
}

object Main {
    def main(args: Array[String])
    {
        val z = new Complex(1.2, 3.4)
        printf("z = %s, z* = %s, |z| = %f, arg z = %f", z.toString(),
                    z.conj.toString(), z.mod, z.arg);
    }
}

Name: Anonymous 2012-11-30 14:38

>>5
Symta:

set File Content


Bash:

echo "content" > file

Name: Anonymous 2012-11-30 16:38

Damn it, Ahmed.

Name: Anonymous 2012-11-30 16:54

Name: Anonymous 2012-11-30 19:34

ANUS anus = new ANUS(ANUS anus)

Name: Anonymous 2012-11-30 20:27

PROTIP: beauty is subjective without proper metrics.

Name: Anonymous 2012-11-30 20:32

(let* ((yin
         ((lambda (cc) (display #\@) cc) (call-with-current-continuation (lambda (c) c))))
       (yang
         ((lambda (cc) (display #\*) cc) (call-with-current-continuation (lambda (c) c)))) )
    (yin yang))

Name: Anonymous 2012-11-30 20:39

>>9
That was ENTERPRISE quality?

*grows an ENTERPRISE suit from his anus*

Name: Anonymous 2012-11-30 22:52





        >LLLEEEEEEEEEEEEEEEEEEEEEEEEEEEELLLLLLLLLLLLLLLLLLLLLLLLL
        >LE
        >EGWINGOINGOIN' GROSKI
        >LEL

Name: Anonymous 2012-12-01 2:54

>>2

## tail-recursive fibs and fact with default/optional args
fib[n, {a, 0}, {b, 1}] :- {
  n => {
    0 : a,
    n, {#when : n > 0} : fib[n - 1, #a : b, #b : b + a]
  }
},

factorial[n, {acc, 1}] :- {
  n => {
    0 : acc,
    n, {#when : n > 0} : factorial[n - 1, #acc : n * acc]
  }
},
## postfix factorial operator
(!) :: {
  {{n} {} factorial[n]}
},
10 ! ## will be transformed into "factorial[10]"

>>4
Complex numbers are part of the language:

z :- 1.2i3.4,
display[#format : "z = ~s, z* = ~s, |z| = ~f, arg z = ~f",
  z, conjugate[z], abs[z], argument[z]]

Name: Anonymous 2012-12-01 2:54

>>3
Translate line-noise with no proper documentation? No, thanks.

Name: Anonymous 2012-12-01 2:59

>>5
It would possibly look like `system["echo 'content' > file"]`. I didn't think about file operations yet.
>>10
If ANUS is a class then
anus :- ANUS[]
>>12
CALL/CC CONSIDERED HARMFUL

Name: Anonymous 2012-12-01 3:15

>>3
Thanks for the laugh.

Name: Anonymous 2012-12-01 3:44

>>15
Your language is the unholy love child of Awk and Prolog. I hope you're proud of yourself.

Name: Anonymous 2012-12-01 3:45

translate this

print 'Hello, world'

Name: Anonymous 2012-12-01 3:52

>>19
Lolwut? Awk and Prolog?! But it is LISP!
>>20
Too simple.
display["Hello, world"]

Name: Anonymous 2012-12-01 4:08

I shat a little in my anus.

Name: Anonymous 2012-12-01 4:24

>>15
What kind of sick fuck will actually use this depraved shit?

Name: Anonymous 2012-12-01 9:04

>>23
what kind of sick fuck will actually use FIOC/weak-typed/line-noise shit? everyone does, lel.

Name: Anonymous 2012-12-01 10:49

I puked a little in my anus.

Name: Anonymous 2012-12-01 10:54

>>15
I don't think you needed this test to discern the ugliness of your language.

Name: Anonymous 2012-12-01 11:16

>>25
Why?
>>26
I don't see obvious ugliness yet. Factorial and fibs in other languages are not much better or worse.
I need more complex test.

Name: Anonymous 2012-12-01 11:31

>>27

=>
::
{{n} {} factorial[n]}
display[#format : "z = ~s, z* = ~s, |z| = ~f, arg z = ~f",

1,2| What?
3| Empty {}? Beautiful as fuck!
4| Overcomplicated printf sounds good!

Name: Anonymous 2012-12-01 12:31

>>28
1,2:
If you see unknown operator, you call it ugly? Great!
"=>" is a `match` operator.
"::" is a `define-operator` operator.
3:
In case you see "(lambda () ...)" do you complain about empty parens?
4:
You can use display without formatting string. What's the problem?

Name: Anonymous 2012-12-01 13:26

>>27
The notation is just ugly. Contrast to definitions of such things in mathematics.

Name: Anonymous 2012-12-01 13:52

>>29
Lisp doesn't have those.

Therefore, you don't need those.

Name: Anonymous 2012-12-01 14:23

>>29
What if I want to format the string, retard? I'd have to use your ugly formatter.

Are you fucking braindead?

Name: Anonymous 2012-12-01 15:04

>>31
But Lisphaseverything!

Name: Anonymous 2012-12-01 16:41

>LE LELLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
>LE MEME FACE WHEN
>LE MEME FACE WHEN
>LEEEEEEEEEEEEEEEEEEEEEEEEEEELLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
>EGIN!
>EGINGIN!!!!
>EGINGINGWIM!!!!!!!!!!!!!!!!!!!!!!!!
>MY LEL FACE WHEN LE /G/RO IS FUQIN EGIN

Name: Anonymous 2012-12-01 20:05

>>24
static typing is great if your goal is carpal tunnel

Name: Anonymous 2012-12-01 20:21

>>35
Static typing is a premature optimization.

Name: Anonymous 2012-12-01 21:20

>>35
I don't see how int is more carpal tunnel inducing than M-x C-a M-C-M-C-x ``faggot''-mode

Name: Anonymous 2012-12-01 21:43

>>37
Try these next:
glVertex3f
unsigned long long
std::unordered_map<TKey,std::shared_ptr<TObject>>

Name: Anonymous 2012-12-01 22:00

>>38
or haskell...

Name: Anonymous 2012-12-01 22:06

>>38
sepples is shit, and I use vim's macros. unsigned long longs are for faggots.

Name: Anonymous 2012-12-01 22:15

>>40
Of course, sorry, I forgot you prefer u8.

Name: Anonymous 2012-12-01 22:25

>>41
Yes, I do prefer u8.

Name: Anonymous 2012-12-01 22:39

>>36
explicit static typing is documentation
static type checking in general provides some error checking at compile time.
if variables have specific types it will be easier for the compiler to generate efficient code

Name: Anonymous 2012-12-01 23:13

Python, Mathematica, MATLAB, Perl, and Ruby are a good languages if you have to get stuff done. If you just want to masturbate about code, then go ahead and use timelifesink languages.

Name: Anonymous 2012-12-02 2:51

>>9
Copyright Miroslav Pokorny
his surname translates from slavic as "cattle"

Name: Anonymous 2012-12-02 7:15

>>45
goy = cattle = pokorny

JEWS!

Name: Anonymous 2012-12-02 7:36

>>46
jej
je ejin jews jro

Name: Anonymous 2012-12-02 9:38

>>44
Mathematica:
Shit@#/[Ass[{!%,Piss[Shit%#]}]]
Terrible!

Name: Anonymous 2012-12-02 11:50

>>46
only cattle codes Java.

Name: Anonymous 2012-12-02 16:12

>>45
"Pokorny" means humble you fagshit kike.

Name: Anonymous 2012-12-02 16:15

>>50
(shut up SLAV!)>  ᕦ(ò_óˇ)ᕤ

Name: Anonymous 2012-12-02 16:41

>>50
i.e. a cattle/slave to God (Yahweh) and his priests (Jews)

Name: Anonymous 2012-12-02 17:57

i don't know a language named 'slavic'

Name: Anonymous 2012-12-02 18:04

Name: Anonymous 2012-12-03 11:06

>>51
Death to juice!

Name: Anonymous 2012-12-03 11:49

Static typing is premature ejaculation

Name: Anonymous 2012-12-03 13:49

++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.

Name: Anonymous 2012-12-03 16:18

>>57
please translate to java to improve readability

Name: Anonymous 2012-12-03 16:35

>>58
You cannot be serious. This is the uglyness test. Not the carpel tunnel thread.

Name: Anonymous 2012-12-03 19:16

>>57
Brainfuck optimisation is NP-complete.

Name: Anonymous 2012-12-03 21:11

My dick is NP-hard for Touhous.

Don't change these.
Name: Email:
Entire Thread Thread List