Recent Posts

Pages: [1] 2 3 ... 10
1
General Project Discussion / Re: another lang draft
« Last post by Zero on Today at 09:35:33 pm »
I think 2+3 has more "energy" than 5, so to speak. Like a ball that's up in the air.

I'm slowly updating the second post of this thread.

Now, var( ) cannot be used wherever a variable can be used anymore (it was too noisy).

An anonymous function is characterized by its return type: in a variable, you can replace an anonymous function by another one, only if they have the same return type. That's what matters, because it's what dictates where you use the function.

I corrected a few typos (the pitbull def was wrong), and added a few types.

I think I'm giving up on type arithmetic. Types are values, yes, but that's it. Same goes for pointers: there will be references, but no arithmetic.
2
General Project Discussion / Re: another lang draft
« Last post by ivan.moony on Today at 09:08:46 pm »
Basic fusion principle: one two protons molecule weights more then two one proton molecules. Energy used to bring them together turns into mass.
3
General Project Discussion / Re: another lang draft
« Last post by ranch vermin on Today at 08:54:46 pm »
when you go 2+3,   in explicit form, its 5.

Either way of describing it,  your saying the same thing.  one in the form of the input (beginning, at the sensor),  one in the form of the output (explicit, when the motor turns).   

But I was wondering,  in this transformation of input to output,  is the output more than the sum of its parts in some way?

Its actually less in a way,  because it requires less bits to store,  But as the bits come together from the varying lot of pattern from the beginning, am I getting something that is more than the description of the beginning,  as in,  as its all combining into itself - its gaining extra combinations than what is in the input?

This post is rhetorical in a way, because im answering my own question once ive finished my work im doing at home, id just like to add to the thread, because all languages are doing the same thing.   they take input and then it "computes" into an output,  which is actually "the same thing" in a way. :) 

making it confusing.

So we are a reflection of the environment, and in a way, its the same thing as your arms moving. :)
4
General Project Discussion / Re: another lang draft
« Last post by ivan.moony on Today at 07:02:48 pm »
Quote
In my understanding, (a + b) is a type for (int << a, int << b)
Is it like saying "int a and int b, seen as (a + b)"?

This is the whole type: `((a + b) << (int << a, int << b)) << aplusb`. It reads from right to left: under expression `aplusb`, when you apply int a and int b, what is returned is the rest to the left, and that is `(a + b)`. That generally means that left sides are types of right sides.

I read somewhere that a type is a set of possible values. But here, it seems to be more than just that.

`2 + 3` denotes a set containing only one element, `5`. Some function might also return a set with more elements suitable for further type narrowing (see sum type - it is also denoted by the same `+` sign, but here I'm using only classical mathematical addition. Check out product type also - abstracting multiple types forms a product type). Also, if `a` or `b` are sets (represented as sum types), then the result of `(a + b)` (addition) is a set (represented as a sum type) of all combinations of added each `a` to each `b`.

As you see, all of this introduces a complication to a language, but I don't believe there is official simpler way today if you want to cover the complete typing materia. Just in case, keep one eye on your current personal notes, as something simpler might always pop up. :)
5
General Project Discussion / Re: another lang draft
« Last post by Zero on Today at 06:10:42 pm »
 ;D so modern...

Quote
In my understanding, (a + b) is a type for (int << a, int << b)
Is it like saying "int a and int b, seen as (a + b)"?

I read somewhere that a type is a set of possible values. But here, it seems to be more than just that.
6
General Project Discussion / Re: all universal joint robot
« Last post by LOCKSUIT on Today at 06:09:19 pm »
oh, robot guards, yes, you can have real robots like those pirate robots in Rayman 2 that are pre-programmed to move around left right etc even dodge and shoot at a target in 3D space sim-to-real world /face tracking, and able to adjust to unseen ground it walks on just like Atlas did in the forest. Or turrets on facility or on door.
7
General Project Discussion / Re: another lang draft
« Last post by korrelan on Today at 03:41:34 pm »
I
S
E
E
W
H
A
T
Y
O
U
A
R
E
T
R
Y
I
N
G
T
O
O
A
C
H
I
E
V
E
I
G
U
E
S
S
I
M
J
U
S
T
O
L
D
A
N
D
S
E
T
I
N
M
Y
W
A
Y
S
l
o
l

 :)
8
General Project Discussion / Re: another lang draft
« Last post by ivan.moony on Today at 03:34:48 pm »
Beware of abstraction/application original distinction by relative braces positioning. It works when we abstract from and apply to a label, but which is which in `(...) (...)`? I used explicit `<<` and `>>` to tell it apart.

In my understanding, (a + b) is a type for (int << a, int << b), and altogether, it's a type for aplusb. Hence, ((a + b) << (int << a, int << b)) << aplusb

But, of course, any working setup is acceptable. Good luck :)
9
General Project Discussion / Re: another lang draft
« Last post by Zero on Today at 03:15:36 pm »
That's a real good piece of thought.  O0

((a + b) ((int) a, (int) b)) aplusb

Don't you think (a+b) is the value? I do think so. It could be on the right side, but we shouldn't have to use colons here. It's just a non-constant (dependent) value, like

((int) a, (int) b) aplusb (a + b)

Quote
Colons should be used for code concatenation, compression.
We don't even need a statement separator here, because
- everything is prefix notation,
- things that don"t use parentheses have constant arity.

Here is my version of the Split function, as compressed as I reasonnably can.

func(long) split(str s x *arr(str) a)(

    int ee(0) s: .. s x int d(1)
    loop(
        str i(mid(s d 1))
        ife = i x do( ee: + ee 1 *a(ee): trim(w) w: "" ) w: .. w i
        if = d: + 1 d len(s) exit
    )

Vertical spread is more readable IMO.

Ed: btw arrays will be heretically 1-indexed.  :sing:  I am an antichrist, I am an anarchist, Don't know what I want, But I know how to get it...

Thank you for your valuable inputs.
10
General Project Discussion / Re: another lang draft
« Last post by ivan.moony on Today at 02:29:09 pm »
I knew it's something there creeping in my mind, I just remembered what!  :D

I saw a genial idea in Martin Löf Type Theory paper some twenty years ago, and I never saw it again, but I liked it very much. They even changed the notation in later papers, like the idea is meant to be hidden. Nevertheless, my work on defining a language took some other path, but maybe you could dig out something out of that idea.

An empty identifier is defined as a plain label:
var

If we want to assign a type to identifier, we have to abstract it from identifier, and we do it by left brace notation:
(int) var

To apply a value to previously typed var, we use right brace notation:
var (48)

We can also abstract multiple types, like:
((int) width, (int) height) box

We apply values in this case in the following way:
box (width (2), height (4))

I think that Löf used a colon for defining first and higher order constructs:
((int) a, (int) b)) aplusb : a + b

And we call the function in a following way:
aplusb (a (2), b (3))        // inserts 5

But in a meanwhile I didn't like this colon, so I imagined an alternative notation for abstraction:
((a + b) << (int << a, int << b)) << aplusb

With applying this way:
aplusb >> (a >> 2, b >> 3)

And now it's real little math, abstracting to the left, and applying to the right. Now I like it.

Don't keep me by every word, it was a long time ago, but the general idea was between these lines, with additional defining some set belonging relations, which I think now they overcomplicated. At the end, they were able to prove theorems and construct algorithms from specifications, so overall experience was very good.

I just thought the idea is worth of mentioning, as I never saw any specific implementation. I'm sorry if I spoiled a fun for you. Anyway, you can always seek for alternative notations if you are up to having fun in discovering things. ::)
Pages: [1] 2 3 ... 10

another lang draft
by Zero (General Project Discussion)
Today at 09:35:33 pm
all universal joint robot
by LOCKSUIT (General Project Discussion)
Today at 06:09:19 pm
XKCD Comic : Update Notes
by Tyler (XKCD Comic)
Today at 12:00:02 pm
first.go: a lil' esolang
by Zero (General Project Discussion)
June 22, 2018, 10:55:28 pm
Can you guess the lyrics of this song?
by LOCKSUIT (General Chat)
June 22, 2018, 06:55:53 pm
Need help
by Don Patrick (General Chat)
June 22, 2018, 05:48:11 pm
I have a question
by LOCKSUIT (General Project Discussion)
June 22, 2018, 05:33:32 pm
TAU
by Art (AI in Film and Literature.)
June 21, 2018, 09:50:34 pm

Users Online

37 Guests, 2 Users
Users active in past 15 minutes:
Kooxpi, infurl
[Roomba]
[Trusty Member]

Most Online Today: 52. Most Online Ever: 208 (August 27, 2008, 09:36:30 am)

Articles