qdbplang / qdbp

MIT License
50 stars 1 forks source link

Standard library design discussion #24

Open qdbplang opened 1 year ago

qdbplang commented 1 year ago

This issue will be used for discussion for the standard library. Questions include:

qdbplang commented 12 months ago

Perhaps use https://github.com/vurtun/nuklear for graphics?

qdbplang commented 12 months ago

abort should be a library function not a language primitive

dghosef commented 10 months ago

Concurrency with unbuffered csp

dghosef commented 10 months ago

Introduce a parallel map w/ the same type as List Map. Maybe also parallel reduce? Maybe the parallel reduce should also check to see that the function has a IsAssociative field.

dghosef commented 10 months ago

If we are doing CSP, gotta figure out syntax for channels. Maybe at the beginning of the program, declare all the channel names like: [channelname1, channelname2, ...] rest-of-program-here

dghosef commented 10 months ago

Need file I/O

dghosef commented 10 months ago

As far as standard library files are located, we could just have them such that they are located in ~/.qdbpstdlib or something. And when the user imports something, it first checks locally. If we don't find it, then we look at qdbpstdlib.

dghosef commented 10 months ago

Need some sort of list class with

dghosef commented 10 months ago

The stdlib should be the only place where external call is allowed

dghosef commented 10 months ago

Perhaps the stdlib should just be a bunch of predefined variables sorta like Haskell's prelude. And keep it minimal. Then we don't need two import directories, etc

dghosef commented 10 months ago

A way to run bash commands

dghosef commented 6 days ago

If we made linked lists instead have head be the whole front end of the list and tail be the last element, we could do:

(node! 1) + 2. + 3. + 4. + 5.

I like this. It would, however, depart from standard functional programming practice of having head be the first element and tail being the remainder of the list.

We could keep that syntax but reverse the list. Or we could pick a new syntax that is probably pretty clunky. Not quite sure yet

dghosef commented 6 days ago

zipper style functional datastrucures

dghosef commented 5 days ago

Finger tree for everything