#🍐 Jonk Stuff

1 messages · Page 2 of 1

agile steppe
dreamy sphinx
#

💥 💥

agile steppe
#

uuuh

#

i dont know how to handle bmp data

#

oh no

#

hmmm

#

yep

#

i dont know how to handle bpm files

#

bmp*

#

oh mb

dreamy sphinx
#

can it become transparent

agile steppe
#

yeah

#

thanks guy from stack overflow using python code

dreamy sphinx
#

why does it sometimes have off colors lol

agile steppe
#

errors reading image data

agile steppe
#

thats a big step

#

now i need to the same function but with matrix and color transforms

#

😭

agile steppe
#

yaaaay

#

now i need to add color transform

#

so i can create a basic flixel type game engine with that

#

the last thing ill work on will be creating texts. there are no bindings for FreeType, i think. I have two options: make some bindings or create my own system to read TTFs files.

#

aah, i dont wanna work in the sound system

#

#1133094294144684163 goat btw

agile steppe
#

7000 lines of code

#

well

#

3000 lines really

#

hxglad have 4000 lines of code

#

fromBytes works perfectly

#

using a image from a website

#

https://static.wikia.nocookie.net/ficcion-sin-limites/images/d/d9/Tenna.webp/revision/latest?cb=20250710195132&path-prefix=es

agile steppe
#

i dont fuckink know why bitmapdata is so fucking slow loading images

#

0.0681834 SECONDS CREATING A TRANSPARENT TEXTURE

#

WTF

#

i give up

#

im asking chatgpt

#

ok, so the chatgpt solution

#

is useless

#

porlaputamadreestoyaunpasodetirarmedeundecimopisoporladudadeporqueestaputamierdaestanpuutamadrelenta

#

screwyouchatgpt

#

72 ms

#

i giveup

agile steppe
#

i wasnt my fault.

#

7ms reading a image from bytes

#

thats fine

agile steppe
#

ok, so windows detects the program as a virus

#

but it works in other pcs

agile steppe
#

just made a quick game using the engine

agile steppe
#

XD

agile steppe
#

idk why but i just got a rhythm game idea

#

idk if it will work

#

i dont know how to draw a tenis racket

#

screw it, ill use cat paws (thanks youTube)

#

ill be using this shitty sprites

#

can someone pls tell me why blue is the best color

ashen urchin
#

Because it's the color of water and the sky

#

It's a calming color

agile steppe
#

peak color

agile steppe
ashen urchin
#

What's subscript?

agile steppe
ashen urchin
#

Could you show me the full package so I can experiment with it?

#

Thanks

ashen urchin
#

Why is there no var

agile steppe
#

i was thinking about syntax for that language and the only difference with JavaScript is that variables are created like in python

#

i want the for to be as simple as in haxe

#

and functions are declared with fn

agile steppe
#

interpreter implemented

#

strings implemented

#

basic operations implemented

#

variables implemented

#

yaaay

ashen urchin
#

Nice

agile steppe
#

adding function calling

ashen urchin
#

Interesting

#

I'll send you my hscript clone once I get back home

#

I'm near a firestone building with my dad who's meeting two radio guys

agile steppe
#

uhlala

#

omg im a idiot

#

i just writed the function declaration node

#

instead the function callid

#

bruhh

#

i works i guess

#

yipieee

#

yaaay

#

ill be making a quick terminal

agile steppe
#

making function declaration

dreamy sphinx
#

where do you learn all of this-

agile steppe
#

reading hscript code?

#

this is my second time making a programming language

agile steppe
#

IM SO FUCKING HAPPY OMG

ashen urchin
#

Jesus christ I just can't believe it

#

That's fucking insane

agile steppe
#

kny trailer just dropped lets goo

#

ah, classes works

agile steppe
#

now you can set the variables on a class

#

omg the canadian keyboard is so weird

#

making some loops

agile steppe
#

yipiie
for works

#

i wanna test this with flixel

agile steppe
#

it works (cpp target)

#

and i gotta keep working on the ogl engine

ashen urchin
#

How are you getting all this 0.0166666?

#

Vsync?

agile steppe
#

idk

#

i just created a normal flixel projec

ashen urchin
#

Is that elapsed even a real delta time

agile steppe
#

idk

agile steppe
#

sooo subscript has

variables
functions
while loops
for loops
arrays
class instances

#

ifs someone wanna check the code

agile steppe
#

when i have to name something, i like to name it after fruits :3

agile steppe
#

59mg of ram usage

ashen urchin
#

That's fine

agile steppe
#

breeh

#

if someone can test is this works

#

here is a example

agile steppe
#

:o

#

haxelib run pear test works

#

yipiie

#

trying to compile using mingw

#

linux maybe?

#

im not in linux

#

im an idiot

agile steppe
#

going 3d

agile steppe
#

should i stop using bindings and start using lime opengl context ? thonk

#

like, i hate using cpp bindings

#

and i love lime

#

and making my own matrix4x4 class

#

and vector4 class

#

and all of that math stuff

#

like

#

its killing me

#

not liying

#

🥲

#

and i can use webgl

#

so html5 is supported

#

so testing will be a lot easier

#

and i dont need to handle pointer stuff

#

so no more memory handling shit

#

like

#

come on

#

im switching to lime

#

i hate this

#

i hate using cpp

#

i hate pointer

#

i hate bindings

#

i hate using haxe build.hxml

#

i hate .hxml format

#

i wanna use .xml again

#

like

#

developing in cpp and hashlink

#

💀

agile steppe
#

hashlink yaay

agile steppe
#

i was bored

small vigil
#

?

#

se ve bueno

#

y recomendaria llamar "elseif" para hacerlo algo mas verboose

agile steppe
#

y esta escrito en haxe

small vigil
agile steppe
#

asi que deberia ser compatible con la mayoria de targets

#

aunque no e probrado

#

probado*

agile steppe
#

someone wanna test it?

agile steppe
#

aah shit, here we go again

small vigil
#

Pon un.modelo 3D de sans

#

El de Undertale si fuese realista

dreamy sphinx
small vigil
dreamy sphinx
#

..?

small vigil
#

I mean bebos

#

por que TE llamas bebos en primer lugar @agile steppe ?

agile steppe
agile steppe
agile steppe
#

que se lee huevos

#

porque me gusta el arroz con huevo

agile steppe
small vigil
agile steppe
#

👍

agile steppe
#

making a quick lua interpreter in haxe

#

i wanna sleep

#

byebye

small vigil
small vigil
#

bueno ra bien

#

Descanse bebos

agile steppe
#

testing targets are: hl and js

agile steppe
agile steppe
#

if statements and returns

agile steppe
small vigil
#

a que pendeja que eres bebod

agile steppe
#

haxe puro

small vigil
#

Andas usando bindings?

small vigil
agile steppe
#

quiero usarlo en js

small vigil
#

O como hsceiot

agile steppe
#

hscript, me da flojera hacer bytecode

small vigil
#

Si me dieran una moneda por cada vez que escribí mal hscriot sería millonaria

agile steppe
#

dioos

#

xd

small vigil
#

Nunca lo escribo bien

agile steppe
small vigil
agile steppe
agile steppe
#

maybe

#

MAYBER

#

maybe*

#

i will make a rulescript parser for lua

#

i wanna use lua with the bytecode interp

#

or maybe not

#

idk

small vigil
agile steppe
#

k

agile steppe
small vigil
agile steppe
#

dead chat until new advise

small vigil
agile steppe
small vigil
agile steppe
#

its possible

#

oh wait

#

its semi impossible

#

lol

small vigil
#

Only if the microwave has os

small vigil
agile steppe
#

like

#

port haxe to a new architechture

#

nah

small vigil
agile steppe
small vigil
agile steppe
small vigil
#

Si no lo haces tú

#

Lo haré yo

agile steppe
#

Yah

#

buena suerte abriendo tu microondas para extraer el microprocesador y ver como funciona :3

small vigil
agile steppe
agile steppe
#

rulescript is broken

#

trying to learn how to make a bytecode interpreter yaay

#

sooo

#

the expressions becomes a stack of commands

ashen urchin
#

Do you plan to make it faster than rulescript's bytecode interpreter?

agile steppe
#

im frustrated because i cant complete my js parser in rulescript because of rulescript issues

#

i was so close

#

this is getting a bit complex

#

oh

#

this is getting really complex

#

this reminds me that time when i tried to learn assembly

#

biggest error of my life

agile steppe
#

nvm

#

i will learn how to make bytecodes later

agile steppe
#

wworking on my js interpreter from zero

#

yaaay

agile steppe
#

working first on a functionar parser

#

i will test it with a normal interpreter

#

then i will work on a bytecode interpreter

ashen urchin
agile steppe
#

i think it worths it

#

My first contact with programming was at age 6, with Gamemaker and Unity. I took it up again at age 11 and then started programming again in 2025. In all those years, I could say that this was the year in which I learned the most. im very happy with that

ashen urchin
#
import haxe.Rest;

enum Command {
  var BASIC_BYTE_MODE_ON; // turns interpreter mode on or off to use
  var BASIC_BYTE_MODE_OFF;
  var CONT; // continue
  var BRK; // break
  var RET; // return
  var VAR; // var
  var FUN; //(f:String, n:String, args:haxe.Rest, type:String); // function name(arg1, arg2, arg3):
  var PUBLIC; // public
  var PRIVATE; // private
  var STATIC; // static
  var FINAL; // final
  var GET; // v
  var SET; // v = val
  var ADD1; // v + 1
  var ADD2; // v += 1
  var SUB1; // v - 1
  var SUB2; // v -= 1
  var MUL1; // v * 3
  var MUL2; // v * 3
  var DIV1; // v / 3
  var DIV2; // v / 3
  var EQ; // v == b
  var NEQ; // v != b
  var OR1; // b1 || b2
  var OR2; // b1 ||= b2
  var NOR1; // v1 | v2
  var NOR2; // v1 |= v2
  var LSH1; // v << 2
  var LSH2: // v <<= 2
  var RSH1; // v >> 2
  var RSH2; // v >>= 2
  var URSH1; // v >>> 2
  var URSH2; // v >>>= 2
  var AND1; // b1 && b2
  var AND2; // b1 &&= b2
  var NAND1; // v & 3
  var NAND2; // v &= 3
  var MOD1; // v % 3
  var MOD2; //(v:String, q:Float); // v %= 3
  var XOR1; //(v:String, q:Int); // v ^ 6
  var XOR2; // v ^= 6

  @:to public function toString() {
    return '$this';
  }
}

Well you can use my new command class

agile steppe
#

i want to start from scratch, making small commands and gradually increasing their complexity

#

When I finish this I will learn how to make game servers

agile steppe
#

ill be using constant pools

agile steppe
#

commands are working

src/Main.hx:17: [1,0,1,0,2]

#

1 = PUSH

#

0 = pool position of the constant "aea"

#

2 = ADD

#

basic operators are working yaaay

#
src/Main.hx:23: Time: 0.0452995300292969 ms
src/Main.hx:33: Bytecode VM result: 6
src/Main.hx:34: Time: 0.0271797180175781 ms```
#

uhlala

#

i can access to variables now yaaay

#

i can access to fields yaay

#

i can call functions yaay

#

i can now access and make arrays

#

i can now create some objects

#

so chat gpt is teliing that i should never use shift to handle the bytecodes

#

hmm no

#

the stack in runtime

agile steppe
#

i can set functions now

#

yaaaay

small vigil
agile steppe
#

ando con sueño ptmr

#

ni siquiera añadi la logica para añadir las funciones al entorno

#

listo

ashen urchin
#

Wow, you're writing js bytecode!?

agile steppe
#

i learned a lot today

agile steppe
#

thiking on how i can compile javascript expressions to instructions more faster

ashen urchin
#

Could you please publish your source so I can look at it at a later tjme

agile steppe
#

ok

#

one minute

#

:3

ashen urchin
#

T

#

Ty

agile steppe
#

0.04 ms saved! :3

#

:o

#

omg

#

i JUST SAVED 0.04MS IN READING THIS

1
#

nvm

#

im so fucking happy with this

#

im making a string to bytecode parser

#

instead of a expression to bytecode parser

#

and it is really faster

#

im publishing the code :3

#

@ashen urchin

#

sorry if some error logs are in spanish, bytecode interp is really incomplete

#

all the progress that i did yesterday is gone

ashen urchin
agile steppe
#

objects

#

arrays

#

functions

#

array access

ashen urchin
#

How?

agile steppe
#

like, it still exists in the interp

#

but i need to create the bytecode compilation again

#

and i cant use expressions now

ashen urchin
#

You could just copy from the chatgpt you generated again

ashen urchin
#

The code you generated with chatgpt?

agile steppe
#

but its too slow

#

fuckit im reusing my lua parser

agile steppe
#

i love the performace

#

but

#

this is painfull

#

basic operators are working

agile steppe
#

nah

#

im done with this

#

compiling strings directly to bytecode is fast but unsustainable for the future, i will look for ways to convert expressions to bytecode quickly

agile steppe
#

ok

#

sooo

#

i was using .concat

#

that is slow asfuck

#

(ignore the bytecode)

agile steppe
#

yep

#

its faster

#

(function (a, b) {
a + b
})(3, 5)

#

adding all the operators

agile steppe
#

adding basic loops

#

(while, for, for of, for in)

#

im going to sleep >3

agile steppe
agile steppe
#

so, i learned the fundamentals of making a bytecode interp

#

im taking a small break (maybe not) to think what i can do

#

im out of ideas

ashen urchin
#

Do the for loops

#

Please

agile steppe
#

im doing homework rn

#

i will do it later

#

and constants arent working in the bytecode interp

#

and normal interpreter to

#

xd

#

i just removed the scope class

#

im using stringmap like hscript

agile steppe
#

done

#

making a quick bytecode to file program

#

yaay

ashen urchin
#

I...think you could optimize that down to just 4 bytes

#

For each call

agile steppe
#

testing with uint8array

#

first one is using the normal interpreter

#

the second one is using bytecode interp compiling the expressions from the parser

#

the third one is reading a jsc file

#

using bytes on the compiler is slower

#

than using a array int and using a for loop to make it bytes

ashen urchin
#

It usually takes the longest to compile anything really

#

What you'd worry about the most is how fast part of the compiled code goes

agile steppe
#

yep

#

thats all ive been worrying

#

the fastest way that i could find is compiling string to bytecode

#

thats so painfull

ashen urchin
#

But it's worth the time

#

If you do it properly then you'll get it

agile steppe
#

tbh, its not worth the headaches for a small project

ashen urchin
#

Why though

#

It would be a prefect haxe bytecode interpreter and parser

#

Something I would actualy make use of

#

Just start small with a chatgpt prompt

agile steppe
#

im doing the same

#

try parsing a string into bytecode. it seems easy, but ordering the operators so the computer can read it is very complicated

#

well, complicated is an understatement, its a pain in the ass

ashen urchin
#

I recommend a lexer

agile steppe
#

i tried using gpt and it gave me the crappiest code ive ever seen. none of the 30 prompts i made worked

ashen urchin
#

I would just split strings to check for any (, ), {, and }s

ashen urchin
ashen urchin
#

The parenthesis is for function arguments (if it's in a valid scenario) and the brackets are gonna be another level down in the bytecode

agile steppe
#

b r o

#

t h a t s t h e m o s t b a s i c t h i n g y o u n e e d t o k n o w t o m a k e a p a r s e r

ashen urchin
#

But I wanna do it all fancy and shit

#

like

#

Splitting strings into their own branch of bytecode

agile steppe
#

m y p r o b l e m i s n o t w i t h t h e p a r s e r, p a r s i n g t o b y t e c o d e i s n o t a s e a s y a s p a r s i n g t o e x p r e s s i o n s, i n f a c t, t h e l o g i c u s e d is t o t a l l y d i f f e r e n t

#

i will optimize for loops, while loops and functions later

ashen urchin
#

You already implemented that for your bytecode impl???

#

I got claude to write a simple haxe bytecode implementation for me

I made this file at random with just the file contents I've tested via this (final version) copy-pasted onto this file:

#

I can't believe I had used Claude Opus 4.1 twice to write me 1500+ lines of haxe code

#

Like that's insane

#

That was impossible for an ai back then

#

It should've bee

#

Been

#

Alr I'ma actually go to bed now bye

#

Have fun with this or whatever

#

Ooooooh spooky time

ashen urchin
#

I didn't finish it but that ai did for me

agile steppe
#

wth

#

no operator precedence?

#

and wth, 1500 lines of code

#

thats parser, bytecode interp, interpreter and compiler together in my workspace

agile steppe
#

i cant sleep

#

ive been 1 hour thinking on how i can fix the op precedence in the bytecodeparser

#

and its done

#

nvm

#

omfg

#

finally

agile steppe
#

still slow as fuck

ashen urchin
#

Ok I'll add that via claude

#

Which it's already doing just today

agile steppe
#

its the most basic of mathematics

ashen urchin
#

Sorry I didn't know

#

But I got claude to do it

agile steppe
ashen urchin
#

How the fuck does haxe smoke meth like that

agile steppe
#

any ideas on how ican optimize the file and for loops?

#

main.hx:1925: 💀

#

uhhh

#

im deleting compiler.hx

ashen urchin
#

Send it to me and I can investigate

agile steppe
#

recursive shit is slow asf

#

im adding a GOTO operator

ashen urchin
#

Turns out grok said the operator keyword as reserved

agile steppe
ashen urchin
#

Yeah

#

For some fucking rason it is

#

My new code for my haxe interpreter was crashing at first and I thought it was from the vm call code

#

But now it's wroking

agile steppe
agile steppe
ashen urchin
#

All of the code for my ai generated haxe interpreter

#

I got grok to help me in the end

#

Because of multiplies of errors

#

They were only compiler errors in the end

agile steppe
#

why parseresult

#

why instruction

#

like

#

a bytecode is literally that

#

bytes

agile steppe
#

hmmm

#

so my bytecode is dogshit

#

removing all what i did

#

😃

agile steppe
#

te la toco de primera, vos si queres la agarras 🗣️ 🔥

agile steppe
#

thinking on how i can make a scope system...

small vigil
#

@agile steppe ocupas ayuda?

agile steppe
small vigil
#

puedo ayudarte

#

ando aprendiendo bytecode

#

e hice

#

un scripting básico en godot

#

c++

#

Me arrepentí mucho

agile steppe
#

en godot???

#

mis condolencias

#

prefiero morir que hacer un codigo que no sea para un juego en godot

small vigil
#

Hice un plugin

#

En c++ ya que gdscript

#

pues bueno

agile steppe
#

ayayay, no se que es peor, programar en godot o intentar manejar la fokin ram de cpp

small vigil
#

y pues

#

quería eliminar el paso de gdscript

agile steppe
#

ohno

small vigil
#

osea

agile steppe
small vigil
agile steppe
#

pero odio los lenguajes estilo python

small vigil
agile steppe
#

para hacer cosas como el gameplay gdscript es increible

small vigil
agile steppe
#

pero para hacer el backend, mejor muerto

agile steppe
#

si existiese una manera sencilla de usar haxe en godot

small vigil
small vigil
#

Complicada

#

Pero la tengo

agile steppe
small vigil
#

Que tal si hacemos

#

Un compilador

#

osea digo hacemos a yo hacer

#

que haga haxe a godot de manera semi-nativa

#

Usando reflaxe

#

haciendo lo mismo

#

Pero en gdscript es más lento que c++

#

entonces c++ con haxe sería más rápido

#

creo

agile steppe
#

acaso estas insinuando usar reflaxe / cpp?

small vigil
#

Godot cpp

#

un intérprete

#

pero no sé si sea así de baboso

agile steppe
#

nunca intente programar en cpp usando godot, reflaxe cpp vuelve haxe a codigo cpp clean

small vigil
# agile steppe

Voy a revisar si srd no hizo algo así antes y directamente intento hacerlo yo

agile steppe
agile steppe
#

im not fucking doing by hand all the assign instructions

#

how can i make more "readable" this

#

uhlala

agile steppe
#

what if im getting bored of doing this

ashen urchin
#

Yeah fuck this I'm not doing a haxe bytecode interpreter with claude ai anymore

#

It's too fucking hard

agile steppe
#

you should take a look on how rulescript bytecode interp works

#

but dont ctrl + c ctrl + v the code

#

😠

agile steppe
#

tomorrow i will make a quick game with raw opengl + lime :3

agile steppe
#

stack based interpreters are so fucking slow

agile steppe
#

so....

#

lua

small vigil
#

lua?

#

@agile steppe acabaste el lua?

#

Me interesa

#

no me fije

#

Perdón no soy bebos fan de verdad

agile steppe
agile steppe
small vigil
agile steppe
small vigil
agile steppe
small vigil
small vigil
agile steppe
# small vigil

hice ragequit cuando las clases de rulescript dejaron de funcionar

small vigil
#

@agile steppe así mero?

agile steppe
#

real

agile steppe
agile steppe
#

the last thing i will add will be the complex js functions

agile steppe
#

i cant believe ive spend the half of the day on making javascript primitives on haxe D:

agile steppe
#

XD

#

e intentar replicarlo

tall patio
#

ill be talking from this account from now on

#

:v

small vigil
#

ah

#

Webos eres tu?

tall patio
small vigil
tall patio
tall patio
small vigil
#

Puedes editar el correo

tall patio
small vigil
tall patio
#

quefokinwebayamehiceestacuenta

tall patio
tall patio
#

should i stay with line - column

#

or i should change it to the literal position

#

instead of error at line 2, column 5 to error at pos 15

small vigil
tall patio
#

aunque file se remplazaria por scriptname

small vigil
# tall patio

Y also diría que pongas como "TypeError : (type) is not a (other type)"

#

También recuerda poner el strict mode

small vigil
#

Sigue siendo un archivo

#

Vlaro

#

Si tiene una función

#

Clase*

tall patio
tall patio
#

creo

small vigil
#

Pon

file:line (class:function)

small vigil
#

Si tiene

#

vavoso

#

Lo que no tiene es ser estructo

#

y hacer

let a = 133

a = "0"

#

estricto*

#

que se soluciona

#

poniendo

#

"use strict"

#

Al principio

tall patio
#

el use strict si lo añadire, las clases ni cagando, no quiero hacer un rulescript 2.0, cuando acabe con todo quizas, y con todo me refiero a que lo ultimo que hare sera un jit para lua y javascript, y saber en que funcion se esta haciendo, no gracias, la manera en la que lo estoy haciendo actualmente creo que no lo podra soportar (hscript type shit)

#

sera un interprete con caracterisitcas de es5 (2009) y unas cuantas de es2015

#

quizas cuando inicien mis vacaciones haga las clases

small vigil
#

Pero el uso de tipado de errores es mejor dejarlo universal

#

Typp

tall patio
small vigil
#

Y poner como dije

#

así normalmente lo veo yo en JavaScript

tall patio
#

lo voy a dejar como esta

#

el siguiente sabado sera

#

o mañana quizas

#

nose

small vigil
small vigil
#

haré mi propio sistema de scripting en haxe

#

y Godot

tall patio
#

ya?

small vigil
#

Que recomiendas que tenga

#

undefined != null // true

Y

Object.isObject(undefined) // true

#

lo pongo?

#

Así bien gracioso

#

pinche JavaScript

#

pendejo

tall patio
#

pon

#

[] + [] = 1

#

asi bien 🤡

small vigil
#

que

#

ponemos variable global

#

meow

#

que solo diga

#

miau

#

🔥

tall patio
#

que diga guau

small vigil
#

Futuro de scripting

tall patio
#

hazteunoconunasintaxisbasadasenpalabrascringefurry

small vigil
#

Quiero hacer dos tipado

#

Sintaxis básica de indentacion (segun caht gepete se llama así) tipo gdscript y python y sintaxis de scripting

#

bueno una con y sin {}

tall patio
#

asi un lenguaje bien pythowo

small vigil
#

Cómo hiciste lo del bytecode

#

Me interesa robarlo COF verlo y hacer uno propio

tall patio
#

es un poco mas lento que un register based

#

pero para iniciar esta bien

#

el register based es como hacer instrucciones de un procesador antiguo

#

me aburrio

#

aunque hay casos en los que bytecode puede ser mas lento si no la haces bien

small vigil
#

Oriéntame

tall patio
# small vigil cómo es stack based

digamos, tienes este codigo:

6 (si es un numero literal)

te recomendaria volverlo a expresiones primero, es mas lento pero mas facil de desarrollar a largo plazo, las expresiones las vuelves a bytecode (ints), que para ese caso solo tendras la instruccion PUSH (es igual a 0x00)

para poder usar constantes tienes que guardarlas en un constantpool, con eso ya puedes armar tu primera instruccion

PUSH (instruccion)
0 (posicion en el constantpool al constante)

en tu interprete lees el comando push y obtienes la constante en el indice indicado, lo empujas al stack (un array simple) y al terminar el interprete devuelves el tope (no me acuerdo) del stack

#

para un operador basico seria algo como
PUSH 1
PUSH 0
ADD_OPERATOR

donde ADD_OPERATOR obtiene los 2 ultimos valores del stack y los suma

#

simple no?

#

tmr tengo que hace tarea

#

xd

small vigil
tall patio
#

parece complicado

#

pero cuando sabes que haces es realmente simple

#

si quieres rapidez extrema (por lo que lei) puedes combinar jit y register based (basicamente lua), aunque es mucho mas complejo

tall patio
tall patio
#

smallest bytecode interpreter ive ever made (lua)

tall patio
#

c o m p i l a t i o n

ashen urchin
#

The "execution" tiem usually results from compiling ot

tall patio
ashen urchin
#

Could you show me the code so I can investigate? please?

tall patio
#

obviously the fastest way to do the bytecode is to convert the string to bytecode directly, skipping the conversion to ast, which is not sustainable even for basic operations

tall patio
#

wait, i already have if and functions

#

while loops done

tall patio
#

im bored so im making a fnf engine

small vigil
#

Termina el scripting

#

ocupo usar un sistema de scripting que no sea hscript

#

:,v

#

No quiero hacer el mío

tall patio
small vigil
#

O al menos enséñame we

#

no entendí nada

#

perdón

tall patio
#

esa es la base

small vigil
tall patio
#

es como, bueno su nombre lo dice, abstract syntax tree

#

es como un arbol

#

que cada raiz es una expresion

#

por la puta madre voy media hora intetnado corregir un bug

small vigil
#

leeré el scripting de hscript

tall patio
small vigil
#

aver que sale

tall patio
small vigil
#

Todo para no hacer FlxUndertaoe

tall patio
#

los videos que use para aprender a hacer interpretes son estos
https://www.youtube.com/watch?v=8VB5TY1sIRo&list=PL_2VhOvlMk4UHGqYCLWc6GO8FaPl8fQTh

This is the first part in a multipart ongoing series for building a minimal programming language in JavaScript. Today's video cover lexing and how to produce tokens needed for the parser stage.

Source code: https://github.com/tlaceby/guide-to-interpreters-series

If you want to follow along then please have a modern version of Deno installed a...

▶ Play video
#

usa typescript pero es facil implementarlo a haxe

#

cambiando la estructura tipo json de typescript por los enum de haxe

#

son 11 videos pero cada uno realmente hace muy bien el trabajo de enseñarte como funciona un interprete

small vigil
#

Buenorp

#

Con los videos, el source code hscript y chatgpt, creo que si lo armo para el próximo año

tall patio
#

oh tambien puedes ver el codigo de hscript y ver como se hace un scripting engine compatible para usar en el codigo fuente 😈

tall patio
small vigil
tall patio
#

ppt

small vigil
#

pues si y no

#

Le dije como hacerle

#

y me dió 14 vueltas

tall patio
#

oh no

#

yo le pedi los conceptos

small vigil
#

y me explico todo menos eso

tall patio
small vigil
#

Conceptos

#

y me decía que si que ocupaba una Lib extra

#

y yo como

#

girl

#

necesito entenderle

tall patio
#

pasado de chat bodriot

small vigil
#

no inventar otro

small vigil
#

Cuando ví "Instala-"

#

Me fui

#

Ragequitee

tall patio
#

para que lenguaje le estabas pidiendo, python y typescript tienen librerias para hacer el proceso de crear el ast mas facil

#

lo que si deberias aprender por tu cuenta es el parser

#

ahi si el don ppt te da mil vueltas (lo aprendi a mis 11 añitos)

small vigil
small vigil
#

Pero son de que

#

muy estrictos

#

porque

#

son hardcodeados

tall patio
#

oh no

small vigil
#

Oh si

tall patio
#

la base de un parser es usar la recursion, pero asi en un punto bien insano

#

si lo haces bien funcionara perfectamente

#

de manera casi automatica

#

por eso estoy tan enganchado con hacer lenguajes

small vigil
#

hmm es que

#

Se me ocurría hacer bloques

#

y

#

osea no se pe

#

ando pensando

#

que hacer bloques

#

y eso, contenga instrucciones

#

y luego, se vaya ejecutando dependiendo de condiciones

#

pongamos

#

func something

end

#

sería un bloque

#

pero

if something

end

#

también otro bloque

#

pero en condicional

#

Osea digo pensé pe

#

aún no hago nada sldk

tall patio
#

pues asi se hace w

small vigil
#

e velda

tall patio
#

aunque cada bloque es una expresion, usar una expresion como eblock en mi opinion me complica las cosas, simplemente uso arrays de expresiones

#

tipo

#

para tu expresion de funcion sera EFUNction(name, args, body)

#

para tu if seria un
EIf(cond, elseExpr)

#

y para parsearlo seria tan facil como (alera de pseudocodigo)

while true:
  if (maybe TId(End)) // si lee una palabra que es end termina el bloque
  body.push(parseExpression())
small vigil
#

pues yo quería hacerlo que se ejecute dependiendo de cómo este de animo la computadora como la ves

small vigil
#

Sldks

#

pero sí

#

Debo aprender

#

ya we

#

A chambearle

#

también, uso mapas para variables o uso otro sistema de iteración?

#

osea ya he hecho propios

tall patio
#

aunque si, hacer un sistema de scopes es un dolor de cola

small vigil
tall patio
#

me dio weba terminar el bytecode de lua porque todo mi sistema de scopes esta mal hecho

small vigil
small vigil
#

Pero mejor me limitare a que pueda interaccionar

#

si no

tall patio
#

que usando un keyword global creas una variable que se comunique con otros scripts?

#

se me ocurre una idea de como se haria

small vigil
#

Yo complicandome el trabajo:

tall patio
#

al chile si w, mejor idea seria crear un mapa global como lo hace lua

#

tipo

_G["state"] = 0
small vigil
#

e que

#

osea si

#

que tal como

#
# Agrega al contexto o modifica al contexto global
algo = 0
}


global.algo
#

Ah

#

aunque no uso brackets ahora que lo pienso

#

mejor limitemos a global.algo

#

alv

#

Me complico mucho

tall patio
#

hazlo como python que usa brackets para los maps

#

o bueno diccionarios como lo llaman el resto de lenguajes zzzzzzz

small vigil
#

En mi perra vida he llamado a un mapa diccionario o mapa

#

los llamo objetos

#

porque

#

mi mente dice

#

pos

#

son objetos

#

desde niña llevo esa mala costumbre de llamarle cosas como no se debe

tall patio
#

solia llamarlos asi cuando programaba en typescript deidad

#

ahora mi problema es que no putas termino de escribir las palabras en el teclado

small vigil
#

más que diferencias de ser estrictos en código

#

y que no es fácil hacer globales

#

y que te ponen a chambear lo doble

#

Para mí JS y TS es lo mismo

tall patio
#

pero typescript viene con cosas bonitas como autocorrecion en strings cuando usas keywords ocmo type

small vigil
#

hm

tall patio
#

oh los enums

small vigil
#

no sé esque yo siempre trato de escribir bien alsks

tall patio
#

y typescript me daba la razon

small vigil
#

Yo tengo proyectos en typescript

#

que son

#

librerías

#

La de anybot y mdcapi

#

que son

#

apis

#

pero funcionales

#

que hacen request

#

pero las hacen lindas

#

no veas el sourcecide

tall patio
#

nuncasupequeesunapi

#

4añosprogramandoalamierda

small vigil
#

digamos

#

e

#

tu -> código -> cosa
cosa -> respuesta de código -> tu

#

En caso

#

tu -> request del http -> MDC api

#

A QUE ME SALIO A LA PRIMERA

#

https://api.mdcdev.me/v2/discord/users/1097288058027647066/avatar

tall patio
small vigil
#

Lo escribí de memoria

tall patio
tall patio
small vigil
small vigil
tall patio
small vigil
#

no es un concepto difícil

tall patio
#

la vrd si, cuanto no tenia vida me dedicaba a hacer cosas mas dificiles

small vigil
#

Me siento como adulta irresponsable aprendiendo cosas que debí aprender hace tiempo

#

no sabía como programar en rust (aún no se)

tall patio
#

algun dia

tall patio
small vigil
small vigil
small vigil
#

y debería porque agilizaria algunos procesos

#

o debería dejar de usar JavaScript para todo

tall patio
#

bueno agilizaria quedaria corto

small vigil
small vigil
#

de que

#

genera atlas

#

corta imágenes

#

mueve cosas

#

renombra cosas (el mismo código de mover)

#

y es una app distinta de terminal

tall patio
#

whattheheell

small vigil
#

La flojera en todo su esplendor

#

de hecho hice una IA también

#

He hecho muchas cosas

#

que están ocultas

#

osea es lenta la IA

#

no tiene beneficios

tall patio
#

paraquechuchanecesitasunaiaenunfangamedeundertale

#

osea esta genial la idea de tener una ia

#

pero XD

small vigil
#

XD

#

Es que

#

El código es un desastre

#

hay un vergo de Lua

#

Que no se usa

#

XD

tall patio
#

ya no entendi, esta hecho en haxe, javascript o lua

#

.v

small vigil
#

haxe

#

C++

#

Lua

#

JavaScript

#

Typescript

#

c

#

y xml si lo tomamos distinton

tall patio
#

QUUEMIERDA

#

para que c y c++

small vigil
#

Buena pregunta

tall patio
#

meimaginoesecodigo

#

no mejor ya no

small vigil
tall patio
#

preloading shit in html5 is breaking my brain

#

aaaah

#

what the fuck is a future

#

the new titlestate

#

yaaaay

#

finally

tall patio
#

i have alphabet done

tall patio
#

making some transitions

small vigil
tall patio
small vigil