Introducing K-lang

K-lang is a JIT compiled, math efficient language.
~ Comments start with a tilde.~ Variables.a := 0. ~ Variable names must be 1 character, can be any UTF-8 character except the ones used in the language ~ The assignment operator can be either := or UTF-8 ≔, because I can't type ≔ on my keyboard.b := 3/4. ~ There are no floating point numbers; only fractions. The language has very fast fraction operations.c := (1, 2, 3, 4) ~ Simple tuples.d := (x: x ∈ N). ~ Set-like tuples. Lazy evaluated.e := (x: x € N). ~ Can also use euro sign.f := d_1. ~ Accesses the first element of the tuple.g := [1,2,3; 4,5,6]. ~ Simple matrices.h := g_1_1 ~ Matrice indexing.~ Basic mathematical operations.~ Addition:4 + 4.~ Subtraction:4 - 4.~ Multiplication:8 · 4.8 × 4.~ Fractions:3/4.~ Powers:2².2³.2^n.~ Roots:√2. ~ Square root of 2.3√2. ~ cube root of 3.n√m. ~ n root of m~ Logical operators.1. ~ equivalent of true0. ~ equivalent of false1 ∧ 1. ~ returns 11 ∧ 0. ~ returns 01 ∨ 1. ~ returns 11 ∨ 0. ~ returns 11 = 1. ~ returns 11 /= 1. ~ returns 01 ≠ 1. ~ returns 0~ Conditional1 ∧ 0 → 1. ~ [CONDITION] → [STATEMENT]~ Functions.~ Basic function syntax:fun(a, b, c, d) := { a · b · c · d. }. ~ The last evaluated value is returned.~ Fibonacci.fib(n) := { n ≤ 2 → n. n > 2 → fib(n - 1) + fib(n - 2). }.~ Lucas numbers.lucas(n) := { n = 0 → 2. n = 1 → 1. n > 1 → lucas(n - 1) + lucas(n - 2). }.~ Factorial. Built into the language, i.e. „5!”.fact(n) := { n ≤ 0 → 1. n > 0 → n · fact(n - 1). }.~ Fizzbuzz.fzbz(n) := { ¬(n mod 3) ∧ n mod 5 → "Fizz". ¬(n mod 5) ∧ n mod 3 → "Buzz". ¬(n mod 15) → "FizzBuzz". n mod 3 ∨ n mod 5 → n. }.

At last, a non-meme language for $CURRENT_YEAR.
If you're not doing maths with your computer, you're using it wrong anyway.
Computers are made for calculations and scientific purposes, nothing more. Anything else is degenerate and most probably buttnut.

Oh, another shitty meme from the IRC kiddies.
Does your retarded language do anything more than merely represent real numbers if the only number data format is rational?

Why would you need anything else?

LARPer detected, harmless CantDoShit CantPostShit Anonymous.

Daily reminder that [k00l]shamoanjac got hacked through his bash IRC bot.
Daily reminder that [k00l]shamoanjac LARPs as an embedded engineer but admitted he was 20 years old on IRC (public logs available).
Daily reminder that [k00l]zduchac is underage and it shows.
Daily reminder to filter [k00l] names.
Daily reminder to hide [k00l] threads.
Daily reminder to not reply to [k00l] posts.

KANGZ

I was gonna politely sage for off-topic but instead I'm gonna upvote bump for maximum butthurt.

>>>/clang/

ABC (or maybe some other Python ancestor at the CWI) did this. It turned out to be a bad idea. Size in memory and computation time grow rapidly as you manipulate numbers, too much to justify the gain in accuracy in most cases. You also have to start doing very arbitrary things when you get irrationals, like from your square roots. Use floating point numbers for most things, make fractions available as an alternative type. Or go big and properly store arbitrary (computable) reals, rational or not. There are libraries that manage it.

Unicode is cancer.

we wuz k-langz and shiet

Why?

why do you enjoy wasting your time?

Unlike you, m712, I can actually write an effective JIT compiler, while you jerk off to Django 20-times-slower-than-PHP software.

I'll just stick to fortran for my heavy mathematical computation.

It would be useful if my keyboard had keys for conjunction/disjunction etc, and if FORTRAN/Octave didn't exist

Fortan,Octave,NumPy,SciPy,Julia
Bullshit characters is part of the reason APL is rarely used anymore.

k.

These are degenerate uses, kiddo.

Googled this, and the top hit is pic related. A Lesbian Canadian singer that no one listens to. OP did you just invent this for the post? The links below the dyke were for Julia, seems like K-Lang doesn't even exist.

Daily reminder that you don't own nothing goyim!
Mathematica is a godsend, so good that even as a committed NatSoc I'd hide Stephen in my attic.

...

Hardly a Mathematica clone. Don't bother suggesting Sage either, that's garbage.

Mathematica is crap. Aside from muh single license per device rubbish it is also sluggish, bloated has shit syntax and causes cancer if one is exposed to it for prolonged periods of time. Not to mention their fucking download servers are so slow when you need to download 4.5GB of botnet software. It also crashed on me when doing elementary tasks such as finding derivatives (in the middle of lab assignment, so I had to rewrite everything - no recovery feature). For analytical computation maxima works great, for numerical there is octave, for plotting gnuplot, for everything else fortran or c. There is no reason to use this botnet.

It's functional programming style, hardly shit syntax.
For X I can use a, for Y I can use b, .... you're missing the fact that one of mathematica's strengths is that it's all blended into one system with well documented components which interface well to each other.

FriCAS is not clone of Mathematica, it is free software and competing computer algebra system.

That's what he said.

I don't need "nice" monolithic system, I use UNIX-like system which means programs follow following rules:
Write programs that do one thing and do it well.
Write programs to work together.
Write programs to handle text streams, because that is a universal interface.
So basically I have same capabilities as Mathematica with additional ability to swap components for alternatives and access to lots of other powerful tools.
Only reason why I have Mathematica is that uni forces us to use it. You can't pass class if you don't have required lab work.

Sorry, I am not native English speaker.
To me it seemed like he assumed that it is drop in replacement for Mathematica, like Octave is for MATLAB.

A reasonable answer, I guess I prefer the monolithic approach as it provides some organization over these overlapping domains.

It mostly comes down to what you prefer. I see why they teach Mathematica at uni, though. Most of the students aren't interested in learning about different tools and just want to get things done (or aren't interested in anything at all). If works for you then there is no need to change (unless your license expires :-)).

Part of the problem with different tools interfacing with text streams is that mathematics is full of inherent ambiguities in syntax. Even definitions within the same field can vary from author to author, let alone the lax syntax physicists use! For example, I'm looking at two Mathematical Analysis texts, and they can't even agree on what a Limit Point defines. Ideally, we need an open standard on mathematical syntax and terminology. More fancifully, I wish we had a standard body of mathematical proofs and I want a pony.

An open standard exchange format for mathematics is absolutely possible, which does not necessarily mean that it will ever happen.
But the Unix Philosophy™ claims that the best way to exchange things is plain text, which is not going to work for this. Ignore the unix philosophy. It's mediocre at best and harmful here.

Same here, I can't find anything on this. Why make a shitty thread for a language that doesn't exist and then shill it in the first post? Fucking tripfags.

So passing binary blobs around is better? I don't know what kind of advanced symbol wrangling do mathematicians do on computers but for engineering passing data around as numbers in plain text works well. There is always TeX which is plain text and people use it to write papers. So maybe if you need to pass symbols around you could do it with TeX? There is also eqn and XML based bloat such as MathML. I would like to see some examples of what data you would pass between programs? Proofs? Definitions?

It doesn't have to be binary blobs. JSON and XML are neither plain text nor binary blobs. I don't think TeX is usually considered plain text either. But you need more structure than you get with the unix way of doing things. Unix tools are designed so they can all talk to each other, but when you're passing mathematical data around it's so specific that both the input and the output should talk the same (at least somewhat) specialized language.
I don't have experience with MathML, but I think TeX and MathML are both unsuitable because they focus on presentation, not meaning.
And yeah, passing definitions or just mathematical objects in general around is what I think you'd want. I have very little experience, but I don't think TeX would be a good way to let Sympy talk to Mathematica.

We were thinking of using a special editor for K-lang, that perhaps used some format of LaTeX for storage.

For example, if you write \mat(2,3) the editor will make you a 2x3 matrix with editable fields. Very handy if you ask me.