Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interested in writing a package manager? #25

Closed
firefish111 opened this issue Aug 31, 2020 · 120 comments
Closed

Interested in writing a package manager? #25

firefish111 opened this issue Aug 31, 2020 · 120 comments

Comments

@firefish111
Copy link
Contributor

firefish111 commented Aug 31, 2020

I was thinking on calling it twilight or dusk, which do you think?
Also for the package manager should I go for a normal C program piggybacking on libcurl or a node.js script for getting data from the cdn?

@alexapostolu
Copy link
Owner

Hmm... I'm not really fond of changing the name. Also for the package manager, I've never really played around with one before, so I have no clue how it works. Could you explain more about what the package manager will do?

@firefish111
Copy link
Contributor Author

firefish111 commented Aug 31, 2020

Well, just take raw night source code from the CDN and plonk it into a folder that the compiler uses the import statement to know
which modules in the directory to import.
If you don't like a name change to something night-related then plop it in the binary? Would be hard to get http libraries in C++, would be better to have external thing written in go which is a language designed for http stuff, like node and npm, two separate binaries.

@alexapostolu
Copy link
Owner

huh?

@firefish111
Copy link
Contributor Author

Alright, you probably won't see this message because you just fell asleep and I just woke up. Érd.
Alright, I'm making the thing. It's 8am for me now, expect it to be almost done by the time you read this. (~4pm my time)
I'm calling it dusk, because it's before a night, and you need to install packages before you can do anything with them in your Night script. I can rename it, but it has to be short otherwise your "customer" for the lack of a better word, might just not use it because they don't want to type nightpkg over and over again, because it's too long (just an example). Like npm. short, easy to remember, easy to type a lot. npm i express are probably the first thing a newbie to node types, because express is the most common server library in existence. (I am aware this is a bit long, so I'll cut it short here... we can talk later)

@firefish111
Copy link
Contributor Author

Alright, it's very simple, BUT IT WORKS. check out https://github.com/johnstev111/dusk/

@alexapostolu
Copy link
Owner

okay but you still haven't told me what this package manager does

@firefish111
Copy link
Contributor Author

firefish111 commented Sep 1, 2020

Well, it just takes raw night source code from the CDN and plonk it into a folder that the compiler uses the import statement to know
which modules in the directory to import.

I have

@alexapostolu
Copy link
Owner

no clue what that means.... cdn? import statement?

@firefish111
Copy link
Contributor Author

firefish111 commented Sep 1, 2020

CDN means Content Delivery Network, like jsdelivr. Some server that hosts a bunch of code. The import statement. Like python, you see

import time
import flask
import tkinter

those are import statements. They are statements, that import.

@firefish111
Copy link
Contributor Author

So, it means that when you type, for example in night use lalala; (don't have to use that syntax, but there isn't one currently so I made one up) the compiler would say take the pre-processor and replace that use lalala; with the contents of ./dusk_modules/lalala.night. It's a bit complex, I know, but just bear with me.

@alexapostolu
Copy link
Owner

why would I need a package manager though?

@firefish111
Copy link
Contributor Author

you said you wanted some sort of a #include-like statement.... I was helping you.... like python doesn't have all those packages baked in one binary, they're stored on PyPI, the Python Package Index, which is basically a fancy CDN.

@alexapostolu
Copy link
Owner

OHHHHH is that why python has so packages? I was thinking of just putting everything into one binary, but I guess I could have different packages...

@alexapostolu
Copy link
Owner

so the dusk_modules folder, that's where I write all my packages?

@firefish111
Copy link
Contributor Author

Er... no, you plop them on the CDN. The dusk_modules directory is where the modules are installed locally. The cdn is hosted on repl.it, I'll invite you now (it's called duskcdn)

@AntimatterReactor
Copy link
Contributor

well, have just seen this, it's an interesting idea tbh

@AntimatterReactor
Copy link
Contributor

gotta help i guess

@AntimatterReactor
Copy link
Contributor

AntimatterReactor commented Sep 3, 2020

i have look at the code... i... i realize i don't know how to code in go-lang :/

@ghost
Copy link

ghost commented Sep 3, 2020

@AntimatterReactor @DynamicSquid @johnstev111
Can i help. I can create a command line tool for you like npmg.exe --install [package_name] BUT we need to make a repository for that using an index server for github releases.

i have created web installers (installers that download a script from the web to somewhere else on the disk)

@alexapostolu
Copy link
Owner

alexapostolu commented Sep 3, 2020

Uh sure I guess! I was talking with jonstev and we made a plan that we'd have two repositories, Night, and the External code, and use MinGW to compile them both, so they can be run fairly easily. I'm not really sure though, @johnstev111 has more information. I'm actually really clueless on this kind of stuff

@ghost
Copy link

ghost commented Sep 3, 2020

@DynamicSquid ok - i invited you to the repl

@firefish111
Copy link
Contributor Author

@DynamicSquid Squod, look. Lethdev can't compile python into ELF binaries that easily, and remember CROSS PLATFROM, and this needs to be a binary, so I woud've done node, that's why I chose Golang. As simple as that.
No scripting, and also, was literally half-way through adding to it, if you wanna help, I mean Golang only took 5 hours to learn

@ghost
Copy link

ghost commented Sep 3, 2020

@johnstev111 @DynamicSquid WELL NOW I CAN'T BECAUSE ALL THE CODE IS MAGICALLY MISSING.

@firefish111
Copy link
Contributor Author

well what happened, i can recover it

@alexapostolu
Copy link
Owner

uhhh no clue what's going on, but yeah sure I guess I'll go with johnstev

@alexapostolu
Copy link
Owner

lol I love that quote "magically missing"

@firefish111
Copy link
Contributor Author

@DynamicSquid lol it says pks not dusk_pkgs. does this imply you want to change?

@CodeLongAndProsper90
Copy link
Contributor

We should call the Debugger dawn

@firefish111
Copy link
Contributor Author

@DynamicSquid You know what I was gonna ORIGINALLY call dusk? day.

@CodeLongAndProsper90
Copy link
Contributor

Uh

@firefish111
Copy link
Contributor Author

firefish111 commented Oct 25, 2020

@CodeLongAndProsper90 boom. shattered. uh-oh he found us, take him to the barbecue!

@alexapostolu
Copy link
Owner

@firefish111 pkgs it is

@alexapostolu
Copy link
Owner

@firefish111, @CodeLongAndProsper90 do you guys know how to link a exe file with a HTML download button?

@firefish111
Copy link
Contributor Author

@DynamicSquid oki I will modify le dusk to suit

@firefish111
Copy link
Contributor Author

@DynamicSquid You do markdown image with onclick, dat how

@alexapostolu
Copy link
Owner

@firefish111 I need a link for dusk.exe

@firefish111
Copy link
Contributor Author

Ye, make an html server that does le download, or do you want le exe file? put le exe file in le release, then make le markdown image inside a link to le same link to le release exe. le oki?

@firefish111
Copy link
Contributor Author

@DynamicSquid also what is handeling, it's handling

@alexapostolu
Copy link
Owner

@firefish111 Wait what no I just need a link to the exe file.

@firefish111
Copy link
Contributor Author

@CodeLongAndProsper90 github better
image

@DynamicSquid for le link you need to OPLOAD LE EXE
image

@alexapostolu
Copy link
Owner

Damn, it crashed my pluggin lol

@alexapostolu
Copy link
Owner

Okay it worked!

@alexapostolu
Copy link
Owner

alexapostolu commented Oct 25, 2020

But it keeps telling me that it's a virus could you fix that? I don't think that's really good for the customer experience.

@firefish111
Copy link
Contributor Author

@DynamicSquid lol no, that's your problem, your browser says that "eXe fIlEs mUsT bE mAlIcIoUs" but not always true, I can report it being safe for you also do you use edge

@alexapostolu
Copy link
Owner

@firefish111 i use chrome

@alexapostolu
Copy link
Owner

@alexapostolu
Copy link
Owner

@firefish111 How do I combine dusk.exe and night.exe into one exe? Same for the Linux variants?

@firefish111
Copy link
Contributor Author

firefish111 commented Oct 25, 2020

@DynamicSquid WHAT NO PLOZ DELETE LE LINK, le réal link is le here

aha lol for dat i need to use a thing called CGo, can you reséarch please?

@firefish111
Copy link
Contributor Author

lol help me i slow sed -e 's/dusk_pkgs/pkgs/g' -i dusk.go

@firefish111
Copy link
Contributor Author

@DynamicSquid have i lost contact, I need you to read my previous massgaes

@alexapostolu
Copy link
Owner

alexapostolu commented Oct 25, 2020

@firefish111 Don't worry it's all working fine. I put the bins in the repl

@firefish111
Copy link
Contributor Author

@DynamicSquid not the right ones, gosh

@alexapostolu
Copy link
Owner

@firefish111 wait what

@alexapostolu
Copy link
Owner

@firefish111 well, Imma do that later. time to take a break

@firefish111
Copy link
Contributor Author

@DynamicSquid yes lol let's do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants