#RedditLang ( PHL )

1 messages · Page 2 of 1

solemn dove
#

because you are a segfault

hot verge
#

You don’t have rust STD installed

unreal obsidian
#

How do I install it?

#

I tried cargo install core

hot verge
#

I’ll send the command when I get home in like five minutes

hot verge
#

@unreal obsidian run rustup toolchain list

#

and rustup component list --installed

#

then send output

unreal obsidian
hot verge
#

oh ur on windows

unreal obsidian
#

Yep

#

Unfortunately

#

Or otherwise

hot verge
#

run cargo clean in the project dir

unreal obsidian
#

Then?

hot verge
#

try cargo b again

unreal obsidian
#

Same

hot verge
#

hmm

unreal obsidian
#

Exact same thing

#

Ah, I'll go to school to take exams first, I'll solve it when I get back

hot verge
#

ill do some intense googling

solemn dove
#

I will make a nightmare of a fork in honor of this denial

unreal obsidian
#

@hot verge I uninstalled rust and reinstalled the entire toolchain, but it returned a compilation error

    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
     Running `target\debug\redditlang.exe`

  --> 38:29
   |
38 |     callmeonmycellphone cooK(x) {
   |                             ^
   |
   = expected FunctionArgs
#

Oh

#

Wait

#

That's the actual program running?

hot verge
#

Yes

#

I made a typo @unreal obsidian

#

Remove the x

#

Inside of ( and )

unreal obsidian
#

Ok

hot verge
#

Ill push the llvm version soon

#

On dev branch

unreal obsidian
#

Created pr, do I pr to main or dev?

hot verge
hot verge
#

( the answer is dev )

unreal obsidian
#

Too late i pred to main

#

I'll close it then create a new one

#

Hmm i can't find dev

hot verge
#

im making it

#

and going through git hell

#

ok done @unreal obsidian

unreal obsidian
#

git kekw

hot verge
#

llvm-dev now exists

unreal obsidian
#

I want to die

hot verge
#

ok merging if i can login to gh

unreal obsidian
#

creating pr
sees 'dev'
i should pr to dev
prs to main automatically anyways

#

I now have 1 more pr under my belt

blissful nymph
#

its trivial to change target branch

hot verge
#

this is awesome

#

i dont even have to find my 2fa

blissful nymph
#

how

hot verge
#

gh cli

unreal obsidian
hot verge
#

yes

unreal obsidian
#

It didn't give me the option

hot verge
#

when you make pr accross forks

unreal obsidian
#

So i closed and new

hot verge
unreal obsidian
#

Yes, i know

#

But by the time i realised i clicked main instead of dev, i already opened it

#

You can't really change it once it's been opened, right?

hot verge
#

yeah

#

you unfucked the stress test but you fucked the pr

unreal obsidian
#

Laugh

#

Twice in a row, too

hot verge
#

double kill

unreal obsidian
#

I can help you write the docs

#

I'm good at clerical work kekw

hot verge
#

My spec writing was terrible

#

I just pushed more LLVM

#

use RedditLang today

hot verge
#

redditlang hello world works

#

Compiles to llvm then use gcc to link the standard library

#

And boom redditlang is .9% functional

blissful nymph
hot verge
#

Yes the hell

#

Redditlang -> lexer -> parser -> inkwell -> LLVM IR -> object file ( llc with inkwell ) -> gcc+libstd.so -> executable

hot verge
blissful nymph
#

but also gcc

hot verge
#

oh yeah

#

llvm compiles to .o in inkwell

#

then I gcc the o with my so libstd

blissful nymph
#

does llvm not link

hot verge
#

no

#

it just returns object

hot verge
#

calls are done for llvm-dev branch

#

will merge to dev and delete llvm-dev tomorrow

#

then I'll merge to main

obtuse turtle
obtuse turtle
#

I haven't been following so like what's the current state of the lang?

#

Also @blissful nymph go to sleep I have never seen you offline

blissful nymph
#

cuz im too lazy to close the tab

obtuse turtle
#

You are also always awake

#

WAIT YOURE OFFLINE

unreal obsidian
obtuse turtle
#

Maybe

blissful nymph
#

discord crashed

hot verge
#

it can compile to an executable

#

( with gcc )

#

and im working on the walter cli

unreal obsidian
#

Rewriting the specifications?

hot verge
#

yes

unreal obsidian
#

Damn

hot verge
#

read the grammar.pest file

unreal obsidian
#

I'll start tomorrow afternoon (school)

hot verge
#

write the spec from the code

#

because its outdated

unreal obsidian
#

Huh?

hot verge
#

but most of it is the same

unreal obsidian
#

Are you sure the current code is not outdated?

hot verge
#

like i removed typedefs

#

the code is the latest

unreal obsidian
#

Ok

hot verge
#

grammar.pest is the actual language syntax

unreal obsidian
#

Oh

#

Will there be a stl?

#

Kekw

hot verge
#

yes

#

read the bottom of the spec

unreal obsidian
#

I think it'd be fun to write some things in a language you created

hot verge
#

that is 100% up to date

unreal obsidian
hot verge
#

very bottom

#

Standard library

#

it says that

#

Standard library

The standard library is imported by default. No need to add it manually. If you for some reason want too, weneed "std/[module]"

Standard Library Modules

  • io
  • time
  • sys

IO Functions

  • coitusinterruptus
    standard print function
    Signature coitusinterruptus(text damn String)
  • pulloutnt
    standard readline function
    Signature String pulloutnt()
    Reads a line from stdin and returns it with no newline at the end

Sys functions

  • exit
    standard exit function
    Signature: (code damn Number)

Time Functions

  • zzz standard sleep function Signature call zzz(timeMs damn Number) Stops the current thread for timeMs seconds
#

i just pasted it

unreal obsidian
hot verge
#

yes

#

so the code modules are "subreddits"

unreal obsidian
#

Or just a c copy and paste?

hot verge
#

subreddit r/name

#

standard library is r/StandardLibrary

unreal obsidian
#

Yes, but

#

Do you import things or is it a copy and paste?

hot verge
#

you just use them

unreal obsidian
#

So it's a copy and paste?

hot verge
#

for other things you weneed "path/to/file.rl" or weneed "ModuleName"

#

all files besides main.rl must have subreddit r/name

unreal obsidian
#

Oh

#

Right, what's with the operators?

#

Wtf?

hot verge
#

lmao

#

the operators havent changed

unreal obsidian
#

I feel worse for you, since you need to write the stl

#

And that'll probably require using the operatrs

hot verge
#
subreddit r/ProgammerHumor

# These statements have identical meanings
weneed "ProgrammerHumor"
bringme "memes.rl"

repeatdatshid {

}

sthu

debug bar callmeonmycellphone split damn String[](x damn String, splitter damn String,) {
   
}

call coitusinterruptus("Hello, World",)
 
test {} wall {}

shoot dang 

bar meth value damn Number ∑ wat

value ∑ 70
value ∑ value - 1

is value ⅀ 69 {

} but value ⅀ 70 {

} isnt {

}

school Lab {
    bar meth prop damn Number ∑ wat

    callmeonmycellphone cooK() {
        # Constructor
    }

    callmeonmycellphone snoRt() {
        # Destructor
    }
}

spez 80085

bar meth name damn a ∑ a[1]

#*
Multiline also works
*#
unreal obsidian
#

Does damn mean like a type?

hot verge
#

i made it so abstract that you could change the grammar.pest and everything still works

#

yes

#

in like ts its the :

unreal obsidian
#

Oh

hot verge
#

variable_name damn type

unreal obsidian
#

That's so strange

#

Usually it's type var_name for me

hot verge
#

c 🤮

unreal obsidian
hot verge
#

think of it like this
variable is a type

#

yeah

#

just stop using c use redditlang

unreal obsidian
#

?

#

I just realised advanced role unlocks a channel

#

What have us intermediates and newbies been missing out on?

hot verge
#

lmao i have had that ever since i joined

#

its nothing special

unreal obsidian
#

I was being arrogant and picked intermediate when i joined

#

Is that where you disappear off to when the server's seemingly dead?

#

A problem has appeared!

#

What language did you write the .pest file in?

#

It looks like a more programming languagey version of regex

#

Nevermind, it's pest

#

Need to learn a new dsl again

hot verge
#

but pest flavor

hot verge
#

example project structure

unreal obsidian
#

@hot verge Are loops statements or expressions?

#

@hot verge Do * s represent that it's optional?

hot verge
#

@unreal obsidian loops are statements

unreal obsidian
#

OK

hot verge
#

see pest.grammar it is inside of Statement = { ... }

unreal obsidian
#

But I can just call them keywords, right?

#

Oh

hot verge
#

repeatdatshid is a keyword

unreal obsidian
#

OK, I was asking for the keyword

hot verge
#

oh in the grammar

unreal obsidian
#

Does the * here mean that it's an optional thing?

hot verge
#

oh there, yeah

#

but in that case i changed the grammar

#

is this calls or functions @unreal obsidian

unreal obsidian
hot verge
#

about what?

#

i forgot what i wrote

unreal obsidian
#
  • DECLARATION
    <IDENT> damn <TYPE>, or
    <IDENT> (Without type annotations)
    Where type is <IDENT>(<IDENT*>)? where the paranthesised <IDENT> is a generic parameter. Everything in parantheses are optional and the list is separated and terminated by commas.
    Example:
hot verge
#

oh declarations

unreal obsidian
#

I noticed a trend in other parts of the docs, where things are optional

hot verge
#

ohh types

#

ok yeah

#

MainType(Generic,Generic2...)

#

and the parenthises are optional

#

? means 1 or 0

#

* in this case should be a + ( 1 or infinite )

unreal obsidian
hot verge
#

yeah

#

i was in the regex-writing mode

#

bc i wrote the spec as i wrote the grammar

unreal obsidian
#

Also, is it an error where commas are required even when there's no further arguments?

hot verge
#

no

#

commas must be at end

unreal obsidian
#

Also, can you explain what modifiers are?

hot verge
#

bar is pub

unreal obsidian
#

Like, debug prints all variables when they are mutated

#

But what other things are there?

hot verge
#

bar

#

its public

#

like accessibility

unreal obsidian
#

Oh

hot verge
#

only works in classes and top-level of non-main modules

unreal obsidian
#

So *s just represent ...s?

hot verge
#

yes

unreal obsidian
hot verge
hot verge
#

like in this example its the ( and ) and its content

#

<IDENT>? means OPTIONAL ident

#

(<IDENT>...)? means list of <IDENT> inside of optional parentheses

unreal obsidian
#

Oh

#

Right, why are brackets optional in declarations?

hot verge
#

?

unreal obsidian
#

Constructors?

hot verge
#

wdym

unreal obsidian
#

Why would they be optional?

#

My c-brain can't understand this

hot verge
#

brackets are not optional?

unreal obsidian
#

In what situation?

#

Variable declaration?

#

Class construction?

hot verge
#

variables dont have brackets

#

classes do

#

brackets are only used in Block, see grammar.pest

unreal obsidian
hot verge
#

( and ) are parenthases

#

[ and ] are brackets

#

which one

hot verge
unreal obsidian
#

Oh

unreal obsidian
hot verge
#

call is an expression or a statement

hot verge
#

calls cooK

unreal obsidian
#

OK

hot verge
#

call as an expression is the return value

#

call as a statement calls and doesnt use return value

unreal obsidian
#

@hot verge Call is used to call a function, while callmeonmycellphone is used to define an argument, right?

#

Because the stress test feels like it's giving me mixed signals

#

Nevermind

hot verge
unreal obsidian
hot verge
#

yes

#

but its test-wall

unreal obsidian
#

Syntactically, too, right?

hot verge
#

test {} wall {}

unreal obsidian
#

I'll add a standard form to it, then

#

It's

test {
} wall ( <whatever exception> ) {
}
``` right?
#

How do you tell it what exception to catch, otherwise?

#

@hot verge

hot verge
#

yes

#

oh

hot verge
#

exceptions are anything

#

strings, variables, numbers, null

unreal obsidian
#

Yea, so how do you access the exception in case it's shot?

#

Do you just

#

Know that an exception occured?

hot verge
#

big L if you have to

#

i never thought about this

#

hmm

unreal obsidian
#

So, it's just there to tell you something screwed up?

hot verge
#

wait let me add that

unreal obsidian
#

...

#

I'll leave the error part to be done later

hot verge
#

@unreal obsidian Catch = { "wall" ~ Ident? ~ Block }

#

this is catch now

#

wall optional_ident {}

#

so

wall hi {}   and
wall    {}

are both valid

#

ima add it to the parser

unreal obsidian
#

Wait

unreal obsidian
#

You can't use an identifier, I think

#

You need to check by type instead

#

And you'll need to provide the ability to chain multiple catches

hot verge
#

@unreal obsidian

test {} wall this_error {} wall that_error {}
#

added multiple

#
- Statement > TryCatch
  - Try > Block: "{}"
  - Catch
    - Ident: "this_error"
    - Block: "{}"
  - Catch
    - Ident: "that_error"
    - Block: "{}"
- EOI: ""

AST is this

unreal obsidian
#

So it just catches it by value?

hot verge
#

yes

unreal obsidian
#

What if it throws classes?

#

Do you initialise with the exact values?

hot verge
#

yed

#

*yes

#

you can't throw a class

#

also why did I do chains?

#

you only get one

#

remove chains I need to aswell

#

@unreal obsidian

unreal obsidian
#

OK

#

@hot verge Is this right?

hot verge
#

change values to expressions

#

- There shall only be one wall statement i would write - A try-catch is composed of one test and one wall

#

change standard test-wall form to Example:

#

otherwise its good

#

wait

#

the <EXPR> in the last code block should be <IDENT>

unreal obsidian
#

It's there to show the syntax, and not to provide an example code

hot verge
#

oh

unreal obsidian
#

These would be examples

#

This sort of things, I'll call standard forms

#

I guess?

#

What's the difference between weneed and bringme?

#

@hot verge

hot verge
#

nothing

#

@unreal obsidian

unreal obsidian
#

Oh

#

THen why?

hot verge
#

for the memes

hollow sigil
hot verge
#

Holy RL++

#

PHL--

hollow sigil
#

Oh wait…we need to make a debloated fork named PHL—

hot verge
#

lmao on mobile

#

-- turns into —

hollow sigil
#

And with debloated I mean: remove all features like “and” and print. You want to print or do anything normal? Code it yourself in redditlang dumbass

hollow sigil
#

The truncate function doesn’t even exist 😭

hot verge
hollow sigil
#

Anyways @hot verge this needs to happen

hot verge
#

what did i just enter into

hollow sigil
hot verge
#

what war has been happening

hollow sigil
#

Idk

hot verge
#

2/3 hates windows, windows sucks

hot verge
hollow sigil
blissful nymph
hot verge
#

ok i implemented the new try/catch @unreal obsidian

#

test {} wall optional_ident {}

#

where optional_ident is the value of the bullet

hollow sigil
#

Walter do this shit

hot verge
#

Walter is done

#

...almost

#

but its on gh so get it nowwwww

#

also it can only compile calls rn

#

and thats only half done

unreal obsidian
hot verge
#

lmao

#

especially on 9 year old forums

unreal obsidian
#

Initialising variables are not required, right @hot verge

hot verge
#

? @unreal obsidian

unreal obsidian
hot verge
#

you have to @unreal obsidian

unreal obsidian
#

meth <var> is also allowed?

#

Huh

hot verge
#

you put wat

#

meth <var> ∑ wat

#

wat is null

unreal obsidian
hot verge
#

can be should be must

unreal obsidian
#

Oh

hot verge
#

and remove the first one

#

and say "Uninitialized variables can use wat"

#

or something like that

fluid moth
#

suggestion: use crack to declare constants, which also increments or decrements a random variable

unreal obsidian
fluid moth
#

suggestion: if a variable is uninitialized, it uses the same memory location as a random other variable

unreal obsidian
#

@hot verge possible solution: instead of break, use goto statements

hot verge
#

oh

#

I could just remove the loop

unreal obsidian
hot verge
fluid moth
#

it's guaranteed to be an existing variable, you just don't know which one

unreal obsidian
hot verge
#

proposal: elevator is goto

#

you add a number that specifies # of statements to move up to

#

it can be negative for down

#

or I could do labels

#

anyways just pushed loops to gh

#

also I have decided that walter and RedditLang are separate parts but same project ( walter is build tool RedditLang is compiler )

#

this has 0 effect on end users or developers, nothing should be changed

#

@unreal obsidian keep loop and break in the docs, I'll implement it somehow

unreal obsidian
hot verge
#

keyword vote for proposal:labels reply to this with ideas, start your message with proposal:labels to make this easily searchable

unreal obsidian
#

proposal:labels venue

cyan gale
#

The point of this is for the language to be horrible right? Elevator seems much worse than labels

unreal obsidian
cyan gale
#

Or, between files altogether

hot verge
cyan gale
#

Oh well if it's meant to be usable then elevator is a terrible idea

hot verge
#

it should be able to transpile to C

#

and I have that half working

#

I have no idea how to implement elevator

#

It would have to like devide all positions referenced by elevator into thier own basic blocks

#

which in return will cause alot of subdivisions

cyan gale
#

If the number it moves is constant then the compiler could just replace it with the correct goto and labels
If it's adjustable at run time thennnnnn

hot verge
#

it should be at compile time

#

but hard 2 implement

cyan gale
#

Edit execution memory jump statements

hot verge
#

jump statements don't work without basic block in llvm

#

the blocks would have to span the entire file

#

wait goto needs this too

#

elevator would need the entire AST to be passed to every parse function @cyan gale

#

and every compiler function

verbal patio
#

proposal:labels
sitdown

unreal obsidian
#

@hot verge this part is the typedef thing that you're removing, right?

hot verge
#

yes @unreal obsidian

#

just ignore it

unreal obsidian
#

So I'll just ignore this part and continue with the other primitives

#

@hot verge Numbers can store any value means it can only store ints, right?

hot verge
#

no

#

signed float 64

unreal obsidian
#

Then what's the difference between it and decimal?

hot verge
#

number = Int | Decimal

unreal obsidian
#

Oh

hot verge
#

decimal must have fraction part

#

int is sign then numbers

#

decimal = Int ~ "." ~ UInt

#

Int = UnaryOperator? ~ UInt

#

uint is just ASCII_NUMBER

unreal obsidian
#

Oh

unreal obsidian
hot verge
#

no

unreal obsidian
#

So I'll just remove it?

hot verge
#

just say number and uint

unreal obsidian
#

OR do I add it to confuse people?

hot verge
#

array indexes can also be String

#

ie. props

hot verge
unreal obsidian
#

Oh

#

Integers and floats are not types, right?

#

The only type is number?

#

@hot verge You can not use both ints and floats as types, right?

hot verge
#

you can only use uint and number

#

don't document unumber

unreal obsidian
#

Oh

hollow sigil
#

Gooodmorning

unreal obsidian
hot verge
#

yes

hollow sigil
#

I managed to get my OG account back. I’m very happy. This will be a great day

hot verge
#

welcome back to rl

hollow sigil
#

@exotic token @exotic token

#

@hot verge when will I be able to use RL?

#

And when will I be able to use RL++?

hollow sigil
#

May I get installer?

hot verge
#

only loops and calls work atm

hollow sigil
#

Installer.bin?

hot verge
hollow sigil
hot verge
#

and run cargo r -r -- help

#

you'll get a complete working cli

#

only thing that needs work is compiler

hollow sigil
#

And I don’t know rust so I can’t help 🙂

hot verge
#

@hollow sigil cd to examples/project-structure

#

and run cargo r -r -- cook

hollow sigil
#

What I can do though is write an installer in python that may also be a Russian roulette in disguise. Why else would I need admin privileges? Windows I’m looking at you….

hot verge
#

add -r to cook for release build

hollow sigil
hot verge
#

it goes in build/{debug or release}/projectname

hollow sigil
#

@hot verge do you run iOS or android

hot verge
#

ios

hollow sigil
#

Same

hot verge
#

17b3

hollow sigil
#

Damn

#

Developer beta?

hot verge
#

yes

hollow sigil
#

Was thinking about installing it

hot verge
#

it's cool

hollow sigil
#

But I’m afraid that my banking apps won’t be functional

#

And I can’t bother to downgrade since I dunno how to do it 🙂

hot verge
hollow sigil
#

Oh

hot verge
hollow sigil
#

Then I just reboot my phone?

hot verge
#

it should show 16 to downgrade

hollow sigil
#

Oh ok

hot verge
#

just update to it

hollow sigil
#

I’ll put mine on update then

hot verge
#

ok

hollow sigil
#

Will be interesting to see if my banking apps gets fucked up

hot verge
#

gl

hollow sigil
#

See you in about 30 mins

#

Byeeee

hot verge
#

alr bye

unreal obsidian
hot verge
#

?

#

what ninja Syntax did I mention where

unreal obsidian
hot verge
#

ohh remove that

#

that was old stuff

#

also change walter cook <target> to just walter cook

#

remove default build target

#

and add "walter clean" to be remove build dir

#

also specify that walter.yml is

name: name
version: 0.69.320
#

they are both strings

hot verge
#

also if you can, describe the project structure ( examples/project-structure on GH )

hot verge
#

it's on GH

unreal obsidian
#

So that I just have to explain walter.yml and that source code goes in the src folder

hot verge
#

I am adding it

#

it's walter new

hot verge
#

I'll move the example to its own repo

#

so I can clone then rm.git then git init for a new project

unreal obsidian
#

Are quotation marks required?

hot verge
#

yes and they must be double

#

look at grammar.pest for official syntactic definition

unreal obsidian
#

It's not at grammar.pest

unreal obsidian
hot verge
#

yes

unreal obsidian
#

If you have more than 1 src file, they are just compiled along, right?

#

grammar.pest doesn't have anything to do with the project itself, only the code syntax

hot verge
unreal obsidian
#

OK

#

Then I'll just leave it for now

hot verge
#

ol

#

ok

unreal obsidian
#

@hot verge What's the version?

hot verge
#

2023.0.2.7

#

I think

#

one sec

#

2023.0.1.7

#

it's this

unreal obsidian
hot verge
#

woo!

unreal obsidian
#

PR is out

hot verge
#

thank you!

unreal obsidian
#

Err, you might want to look through it to see if anything's missing

#

Wait no fuck

#

Contents page

hot verge
#

I moved it to the RedditLang Spec.md file

hot verge
unreal obsidian
#

Added another one

#

PRed again kekw

hot verge
#

ok

unreal obsidian
#

I set it as specs2 so that you can simply delete the specs then rename it later once you confirm the specs are good enough

hot verge
#

merging to main

unreal obsidian
#

ok

unreal obsidian
hot verge
#

merged

#

changed this

#

they can start with _ now

unreal obsidian
#

It's valid now?

#

Oh

hot verge
#

it has been I forgot to change it in spec

unreal obsidian
#

My grammar.pest must be outdated

hot verge
#

Ident = @{ (ASCII_ALPHA | "_") ~ (ASCII_ALPHANUMERIC | "_")* }

#

yeah it is

unreal obsidian
#

Pulled

#

Finally up to date kekw

solemn dove
#

just updated my fork

solemn dove
#

Whoever wrote the spec can't spell.
"initialise"? really?

#

Also, why are code examples written in R? Don't you mean redditlang?

hot verge
#

oh back

#

um

#

r has good comments

#

and half/good highlighting

solemn dove
#

THAT'S YOUR FAULT!

hot verge
#

wait wait wait

#

can i use the extension to add it to md blocks?

solemn dove
#

yes, it works fine in my vscode

hot verge
#

nope doesnt work

solemn dove
#

actually... I don't think that your extension does that

#

sorry

hot verge
#

how do you add md support?

#

ohhh you cant

solemn dove
#

wait really?

hot verge
#

md has a spec for it

#

theres an official list

solemn dove
#

time to make a pull request to markdown?

hot verge
#

lmao

verbal patio
solemn dove
#

cspell says no

verbal patio
#

realise

#

your spellchecker is wrong

solemn dove
#

imagine using english a version behind main

verbal patio
#

embrace tradition

hot verge
hot verge
#

@pallid ridge we have recently had an update to the spec, you have written the GenZ spec, I am informing you that it is outdated, action is not required immediately

unreal obsidian
#

@hot verge I extracted the size information for numeric types into an annex at the bottom of the file

#

Is this good, or should I just revert this change?

hot verge
#

we dont have multiple sizes...

#

All numbers are f64 ( double )

unreal obsidian
#

Has the expanding size been removed?

#

This was what I meant

unreal obsidian
#

Did this change before I wrote the specs?

hot verge
#

oh yeah it did

#

the spec was partially outdated as i said

unreal obsidian
hot verge
#

but keep the table and comment it

unreal obsidian
hot verge
#

i might add that back

unreal obsidian
hot verge
#

yes

#

also i was changing how numbers worked because rust's str.parse::<f64> doesnt support the crazy sign symbols that redditlang has

#

so it now has a sign as seperate token information

unreal obsidian
#

uints are u64?

unreal obsidian
hot verge
#

uints are u64

#

im also changing how indexes work

#
IndexExpr       =  { Term ~ "[" ~ Index ~ "]" }
Index = { BinaryExpr | UInt | String | Ident | "(" ~ Index ~ ")" }```
#

wait not uint

#

Number

#

i forgor about fractional indexes

#

*forgot

unreal obsidian
#

Number?

#

Fractional indexes?

#

What the fuck?

hot verge
#

i added those 5 minutes ago

#

it just rounds

unreal obsidian
#

Oh

unreal obsidian
hot verge
#

oh

#

UNumber

#

wait syntax doesnt ever use UInt

#

im removing it

#

Number and UNumber

#

are the new ones

#

but they are both f64's

#

just error where they are used incorrectly

unreal obsidian
hot verge
#

yes

unreal obsidian
# hot verge yes

At this point, create a new floating point number that doesn't have a sign bit

#

You now have 1 more bit to put in the mantissa or exponent

hot verge
#

syntax error if it is constant, compile if it is a constant variable, and runtime if it is a normal variable

hot verge
#

how does that even work

#

thats not a rust type

#

llvm has it though

#

but cant do it because parser cant hold a uf64 in a Number variant

#

@unreal obsidian

Number  = ${ UnaryOperator? ~ UNumber }
UNumber = ${ (ASCII_DIGIT+ ~ ".")? ~ ASCII_DIGIT+ }
#

$ is atomic ( no whitespace ) but shows children nodes instead of just string

#

adding UUNumber, dont add it to the spec

#

@unreal obsidian

#

because UNumber can have an optional ( useless ) positive sign

#

UUNumber is just (ASCII_DIGIT+ ~ ".")? ~ ASCII_DIGIT+

unreal obsidian
#

Because type annotations are optional

hot verge
#

but that makes it strict?

unreal obsidian
#

Can you elaborate?

hot verge
#
UUNumber = @{ (ASCII_DIGIT+ ~ ".")? ~ ASCII_DIGIT+ }
Number   = ${ UnaryOperator? ~ UUNumber }
UNumber  = ${ Add? ~ UUNumber }
hot verge
unreal obsidian
hot verge
#

pretend + is the weird Add symbol

#

and that a Number can only be make a UNumber from that +

#

therefore you need type annotations to specify a type

#

also types are just comments that should be static-checked

unreal obsidian
#

Oh

hot verge
#
 - Expr > Number
    - UnaryOperator > Subtract: "–"
    - UUNumber: "2.3"```
unreal obsidian
#

But only uunumbers can be used in array indexes?

hot verge
#

[+2.3] is fine

unreal obsidian
#

Wait

#

Uunumbers and unumbers are different?

hot verge
#

yes

#

UUNumber is internal

#

it CANNOT have a sign no matter what

hot verge
unreal obsidian
#

So unumber can have a + sign, uunumber is just the magnitude

hot verge
#

UNumber can ONLY have a positive sign

unreal obsidian
#

Ok

unreal obsidian
hot verge
#

i did

#

just now

unreal obsidian
#

No like

#

The name itself

hot verge
#
Magnitude = @{ (ASCII_DIGIT+ ~ ".")? ~ ASCII_DIGIT+ }
Number    = ${ UnaryOperator? ~ Magnitude }
UNumber   = ${ Add? ~ Magnitude }
unreal obsidian
#

Nice

#

Hmm, but how are we supposed to tell if something is a unumber or a number

#

Is it just using the compiler?

unreal obsidian
hot verge
#

types are static analysis remember

unreal obsidian
#

Runtime may need them to be a number, but at compile time, it may not be clear

hot verge
#

variables can only have 1 type?

unreal obsidian
#

What?

unreal obsidian
#

It depends when you declare a unumber

#

But if you declare a unumber because the initialiser is positive

hot verge
#

Unumber sign always gets removed

#

its just 'there'

#

doesnt affect anything

unreal obsidian
#

Let's say there's this pseudo code

#

X = 1 // a uint is declared because 1 is positive
X = input() // insert some negative int here

#

Then it throws an error

hot verge
#

no its a number not unumber

#

unumber is only for syntax errors

unreal obsidian
unreal obsidian
hot verge
#
-2      # Number
7       # Number
3.1415  # Number
a[3.3]  # UNumber
a[-3]   # UNumber
unreal obsidian
#

That feels cursed, seeing -3 being called unsigned

#

So only when it's in subscript is it a unumber?

hot verge
#

oh wait

#

why did i do that

#
-2      # Number
7       # Number
3.1415  # Number
a[3.3]  # UNumber
a[3]   # UNumber
#

this is correct now

hot verge
unreal obsidian
#

So question

#

How do you declare a unumber?

#

Do you have to use explicit type annotation?

hot verge
hot verge
unreal obsidian
hot verge
#

it is a syntax error

unreal obsidian
#

Do you only take the magnitude?

hot verge
#

and at compile time it checks for constants

#

at runtime it throws

unreal obsidian
#

Do they have to check if it's >0?

#

Or catch something?

hot verge
#

they can do both

#

also not at compile time

#

ima pull a JS on this one so only at runtime @unreal obsidian

#

UNumber is only syntax

#

it gets converted to Term::Number in the AST

unreal obsidian
#

Sigh

hot verge
#

i made my own number parser

#
Rule::Number => {
                let mut inner = pair.into_inner();
                let has_sign = inner.len() == 2;
                let sign = if has_sign { inner.next() } else { None };
                let is_negative = sign
                    .map(|x| match x.as_rule() {
                        Rule::Add => false,
                        Rule::Subtract => true,
                        _ => panic!(
                            "{}. Additional Information: INVALID_SIGN({:?})",
                            ERR_BUG,
                            x.as_rule()
                        ),
                    })
                    .unwrap();

                let magnitude: Number = inner.next().unwrap().as_str().parse().unwrap();
                let value = if is_negative { -magnitude } else { magnitude };
                Some(Self::Number(value))
            }
#

now supports the irregular ops

unreal obsidian
#

@hot verge why do we have bitwise operators when we don't have ints?

#

Also, doubles lose precision as the magnitude increases

#

Rounding can also be problematic at large enough values because at some point, the difference between 2 adjacent numbers is >1

solemn dove
hot verge
hot verge
#

therefore we can do everything js does

unreal obsidian
#

What

hot verge
#

yes

unreal obsidian
#

That's

#

Sorry arson

#

Regarded

hot verge
#

try 69.420 ^ Math.PI it works

unreal obsidian
hot verge
#

yes lmao

#

it just truncates it

unreal obsidian
#

The reason why the difference is so small I think is because they are of roughly equal magnitudes, thus the exponent is just slightly different

blissful nymph
rocky mirage
#

Add native support for using jpegs as variable names

lyric vale
#

😭

lyric vale
#

hjg,ltfgggggg=[]

#

==

unreal obsidian
#

?

lyric vale
#

My cat walked across my keyboard

hot verge
#

everyone cargo install walter-redditlang. Command is walter when installed.

#

gonna add walter new soon

solemn dove
#

can we have a list type that's more like a stack? (similar to python iterators)
once you use a value it disappears, etc, etc.

solemn dove
hot verge
#

show me

#

i put a thing on the repo if you got an llvm error

#

but this might be different @solemn dove

solemn dove
hot verge
#

oh yeah that

#

is the installed llvm 15.x?

solemn dove
#

no, how do I get a newer version?

hot verge
#

the newest is 16.x

solemn dove
#

but apt gives me 14.x

hot verge
#

but inkwell doesnt support it yet so you need 15

hot verge
#

one sec

#

more specifically bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"

#

@solemn dove

solemn dove
#

I see, it's the nightly that I needed

#

thank you

hot verge
#

yw

solemn dove
#

ok

hot verge
#

but i could add that

#

Iterationering(A) maybe

#

it would be a "primitive"

#

should change that to built-in

solemn dove
# hot verge more specifically `bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"`

This does not work.

W: GPG error: https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1E9377A2BA9EF27F
E: The repository 'https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
hot verge
#

what version of ubuntu do you have

#

jammy?

#

@solemn dove

solemn dove
#

cinnamon mint

hot verge
#

oh

#

it thinks its ubuntu

#

thats why

solemn dove
#

it is ubuntu

hot verge
#

ohhh

#

i have never used mint

#

so it is based on jammy

#
deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main
deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main
#

run this

solemn dove
#

deb is not a command

hot verge
#

oh wait

#

add this to apt sources

#
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" | sudo tee -a /etc/apt/sources.list

@solemn dove

solemn dove
#

that broke permissions on apt, lol

hot verge
#

?

solemn dove
#
$ apt-get update
Reading package lists... Done
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
hot verge
#

sudo apt update?

#

bc you put $ not #

solemn dove
#

🤦

hot verge
#

lmao

solemn dove
#

still no signiture

hot verge
#

?

solemn dove
#
W: GPG error: https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1E9377A2BA9EF27F
E: The repository 'https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
hot verge
#

aaaaaaaa

#

ok 1 sec

#

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1E9377A2BA9EF27F

#

try this

#

then update again

solemn dove
hot verge
#

ima try something brb

solemn dove
#

ok

hot verge
#

do you have a GUI in mint for managing apt sources?

#

@solemn dove

solemn dove
#

um

#

yes

hot verge
#

wait run this sudo apt install llvm-15

#

llvm might just point to 14

solemn dove
hot verge
#

go to additional repositories

solemn dove
hot verge
#

remove the llvm ones

#

click on it and click remove at bottom

solemn dove
#

doen

hot verge
#

sudo apt install llvm-15 try this

solemn dove
#
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 26656 (synaWaiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 26656 (synaptic)  
#

I'm sorry, I have to go

hot verge
#

snap is always annoying

hot verge
solemn dove
hot verge
#

@solemn dove restart and run this when you come back

wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -

sudo apt install libllvm-15-ocaml-dev libllvm15 llvm-15 llvm-15-dev llvm-15-doc llvm-15-examples llvm-15-runtime clang-15 clang-tools-15 clang-15-doc libclang-common-15-dev libclang-15-dev libclang1-15 clang-format-15 python3-clang-15 clangd-15 clang-tidy-15 libclang-rt-15-dev libpolly-15-dev libfuzzer-15-dev lldb-15 lld-15 libc++-15-dev libc++abi-15-dev libomp-15-dev libclc-15-dev libunwind-15-dev libmlir-15-dev mlir-15-tools libbolt-15-dev bolt-15 flang-15 libclang-rt-15-dev-wasm32 libclang-rt-15-dev-wasm64 libc++-15-dev-wasm32 libc++abi-15-dev-wasm32 libclang-rt-15-dev-wasm32 libclang-rt-15-dev-wasm64
#

it installs all the packages manually

hot verge
#

walter 0.1.9 published

#

adds walter new

solemn dove
hot verge
#

yw

unreal obsidian
#

Laugh

hot verge
#

add a b to the 9 and it's fine

#

0.1.9b means doesn't work

pallid ridge
#

wait

#

is this a thing now?

hot verge
#

yes

#

@pallid ridge

#

new logos

blissful nymph
hot verge
#

its lightmode

#

they should be used on dark backgrounds

#

@blissful nymph

blissful nymph
hot verge
#

screenshot from figma

#

heres fake-transparent though

blissful nymph
#

eww

#

even worss

hot verge
#

fine

#

they ARE true transparent

hot verge
#

updated icons

hollow sigil
#

@hot verge put them in the repo

#

If you haven’t already

#

@hot verge has anyone created the vscode/code-oss extension yet?

#

Like intellisense?

hot verge
#

how?

hollow sigil
#

There are hundreds of community made extensions

#

That are intelkisense

#

I’ll try to make one I guess

#

And if I fail I’ll just get someone else to do it

#

@hot verge

hot verge
#

ok

#

I'll look into it

hollow sigil
#

I’ll also install redditlang so I have something to work with

hot verge
hollow sigil
hot verge
#

walter is the command it makes

#

run walter to get help

hollow sigil
#

cant find the repo btw

hot verge
#

wdym

hollow sigil
hot verge
#

wha?

hollow sigil
#

foudn it on your profile

hot verge
#

show me

hot verge
hollow sigil
#

werid nwo it shows

#

gotta make some breakfast, will start working after that

hot verge
#

ok

#

if it needs regex or stuff look at the vscode ext repo

#

I painstakingly wrote the regex for RedditLang

pallid ridge
#

make an lsp

hot verge
#

whats a lsp @pallid ridge

#

anyways im making a new file

#

sane_grammar.pest

#

it makes the code look normal

#

and no more copy-pasting operators

#

example sane code

#
if 2 - 2 {
    call coitusinterruptus("1!",)
} else if 2 + 2 {
    call coitusinterruptus("2!",)
}
#

SHOULD ONLY BE USED IN DEV, PRODUCTION WILL USE THE UNSANE VERSION

blissful nymph
#

write a transpiler

hot verge
#

no

obtuse turtle
#

Make your own os in redditlang

unreal obsidian
#

Make redditlang in redditlang

hot verge
#

redditlang will not be bootstrapped @unreal obsidian

hot verge
hollow sigil
hot verge
#

not really

#

it can just compile to bare metal

lyric vale
#

make redditlang bootstrapped for redditlang

hollow sigil
unreal obsidian
#

Hmm

#

Not saying I'l l do it

hot verge
hollow sigil
#

@hot verge port redditlang to #1127693751041675335

hot verge
#

it supports msdos executables

#

but not the ABI

pallid ridge
hot verge
#

ooooooooohhhhhhhh

pallid ridge
#

basically a standarized intellisense/extension

hot verge
#

i thought it was a language

pallid ridge
#

so you can use in any lsp compliant ide

hot verge
#

wait no thats lisp

pallid ridge
#

such as vim, neovim, emacs, sublime text, etc...

#

and as an emacs user

#

i need this amazing language

hot verge
#

like this?

verbal patio
#

no

hot verge
#

? @verbal patio

verbal patio
verbal patio
hot verge
verbal patio
hot verge
#

and since vscode is best you will not have problem