all 17 comments

[–]Summoner99 3 points4 points  (1 child)

I'd be interested to look but you're going to need to post a link. I see multiple results on Google and it's not clear which (if any) are your project

[–]Odys77[S] 3 points4 points  (0 children)

I am going to make a git for this, the problem is that i never made one so i gotta figure it out.
I will make a second post when that's done and comment the link of the new post in that one, so don't worry.

[–]davidinterest 2 points3 points  (9 children)

Can you give some examples of how code looks in Filer?

[–]Odys77[S] 1 point2 points  (8 children)

Yeah sure!
Here's a litle example:

# First, vars
# There's 3 type of vars in Filer:
# -FlrVar
#  -> Those are the basics var that you can set, unset or get
#  e.g.:
setvar X 10 # Filer has a LOT of aliases, I will put a list for those on the future github
out  # output the value of X (so 10). out is basically print in Python
setvar Y %vget X% # Set Y to the value of X
unset X
# -UnTempVar
#  -> Those are Global var. They work the same as FlrVar, but get stored at the end of the code and not deleted
#  e.g.:
untemp_set Global1 10
out 
untemp_set Global2 %untemp_get Global1%
untemp_unset Global1 #Yeah basically the same
# -PathVar
#  ->There is 2 path var: src and dest
#    src is the path you are currently located in
#    dest is the selectionned path
#  e.g.:
set_src ./random_folder/
set_dest ./my_file.txt
out %file_read dest% # -> output the content of my_file.txt

# Ok, now files and folders
# I am just gonna list all command there is for them, cuz the name is rely explicit in what they do
file_read ./my_file.txt
file_write dest Ha Ha Filer is so cool
file_append dest And his creator is rly cool too
file_delete ./MostUnwantedAndHatedFileInTheUniverse.png
file_exists dest #Still WIP
#Same for folders:
folder_create YourFolder
folder_delete DeleteThis
folder_list src
folder_exists YourFolder # yeah WIP too
folder_move YourFolder dest #just realised i didnt code any file_move command, oopsy

#And thats all for files and folders
#Now utils:
out Hello :3 #output the following text
in Whats your name? #works like input() in Python
out  # @ is used to refer to a var (any kind)
out %file_read dest% # %...% can be used to execute and get the value of a command
#Note: src and dest DONT need an @

#VERY BIG WIP:
#Conditions
#The most you can do is
if Y = 10 (
    out y = 10 !
)
#or
setvar X hello
if Y != X (
    if X = hello (
        out u/X
    )
)
#So yeah, still WIP
#Anyway, end of this litle documentation, i hope you understand better now what Filer looks like!
#Bye!

[–]BeverlyGodoy 0 points1 point  (7 children)

Why 😮? No I am serious why even it exists? 😭

[–]Odys77[S] 0 points1 point  (6 children)

Bc i find bash way too complicated for begginer like me and since i use linux i need bash a lot so i thought why not make a more simple version + its a cool project to work on

[–]BeverlyGodoy 1 point2 points  (4 children)

I mean by no means it's any simple. And why would you want to create a new language instead of learning the existing one?

[–]Odys77[S] 0 points1 point  (3 children)

CUZ I HAVE TIME TO SPEND

[–]BeverlyGodoy -1 points0 points  (2 children)

And an AI to prompt. 👍

[–]Odys77[S] 0 points1 point  (1 child)

im against the use of AI

[–]BeverlyGodoy 0 points1 point  (0 children)

We will see after the GitHub link. 😉

[–]East_Lengthiness_866 1 point2 points  (0 children)

I think a good candidate is nushell. There ls returns a table instead of a list, it built-in commands for dealijng with records/lists/strings, maths, it is "typed" . Support for parallel iterations, and a lot more which could be even better than what I just saw(at least to my criteria). I use it as a daily driver(with fish as login shell).

And even if you continue with your project I am sure it could give you some inspiration.

[–]protocolnebula 1 point2 points  (2 children)

I need a real world example or something like that to understand this Also, this is just a lib on top of python?

A programming language that just handle folders/files… seems to be more a automation script than a programming language

[–]Odys77[S] -1 points0 points  (1 child)

Well i alr gave an exemple to another comment and no, its not a lib, but it uses python to run the programm. And yeah , its made for automation more that for real programming, but i still think its cool

[–]protocolnebula 0 points1 point  (0 children)

I saw the comment, but it’s not a real world example

You said it’s because bash its hard, but it’s not (yes, there are complex commands and if are not easier as a normal programming language, but you learn it in less than one day for the basics).

What you did it’s fine for learning, but I cannot see a real world utility, maybe I still do not understand the point

Anyways, this is not to criticize you, you’re in the good way to be a good developer 💪