Coder Social home page Coder Social logo

percyqaz.shell's Introduction

๐Ÿ‘‹ Hello, I'm Percyqaz and I enjoy most things code

Most of my projects are personal tools or solutions I've created for myself
I like to release them to the public for the two-way benefits of feedback and bug reports for me while you get useful free software

I currently work professionally in C#, and I use mostly F# outside of work
I generally recommend using different stacks, IDEs, color schemes in and out of work to protect your sanity - I often pull 20-30 hours a week on hobby projects on top of my job

Currently solidifying my foundations to ensure I can have a long-lasting successful career in software

โœจ Take a look at some cool things I maintain

๐Ÿ”ฅ Some of my hot takes

  • Rust is the best programming language hands down, IF
    • You have no time limit
    • You're OK doing half of your project from absolute scratch bare metal
  • OOP actively obstructs you from modelling simple problems in their simplest form. I dread "modelling the real world" in Java or C#
  • F# is my current language of choice - I dislike much of the syntax but it sure is lightyears ahead of its peers when it comes to utility
  • If you want to learn programming, I recommend Scala first because it's awesome and has a bit of everything

๐Ÿ’ก An unfinished project is just a project you haven't finished yet

percyqaz.shell's People

Contributors

percyqaz avatar

Stargazers

 avatar

Watchers

 avatar

percyqaz.shell's Issues

Future of this project

We have come to a fork in the road

I've been working with @zkldi on pretty details plans for shell capabilities, but have now discovered nushell which basically does all of our design decisions/philosophies in a nearly identical manner, and is much further in development

This project still stands along as useful to me, as I still need shelling capabilities in my .NET applications, but zkldi's goals for the project are now different as this would have acted as a prototype for a rust implementation of a shell (nushell is written in rust, so there is no longer a need)

I will ruminate on this further, but it is likely I'll transfer some discussion content from our top secret repo to here and continue working on this myself

Lambdas and first class functions

First class functions is the concept where functions can be data/stored in variables and treated the exact same was as data

We have problems:

Commands are fundamentally different from variables
Commands that take 0 arguments (arity 0) are still actions that can have side effects when run
With first class functions, a variable should behave like a 0-arity function

By design function calls do not have brackets/tupling of arguments

Hence
command is a command call with no arguments
$command refers to a variable called command, no action taken
the $ is needed to make the distinction

If a variable stores a lambda we cannot use the same syntax because
$command is ambiguous - Do we want to execute it? or just refer to the action itself

Modules

Loose idea I have

Modules would have syntax like

module NAME
{
    let ...
    let ...
    
    fn ...
    etc
}

Can then be loaded from files/maybe interop sources

Can call functions and variables via MODULENAME::$variable and MODULENAME::function ..args

Useful for having importable namespaces of shell features
Useful for creating a standard library to drive the shell as a general purpose utility

Rewrite

Keep it simple:

  • Data (json structures and tagged cases)
  • Types, host-defined (runtime mapping to/from .NET, can throw during conversion)
  • Piping

Scripts and script execution

Ability to feed a whole "script" into contexts to be evaluated

Something goes wrong halfway through, then the context reverts entirely

A script is a text file of line separated commands

Multi-word command syntax

I want multi word commands command sub

But I also want quoteless string arguments command arg

How can I make these two things unambiguous

The real answer is to use brackets: command(arg) and command sub(arg)
But I want to maintain the shell style

also maybe modules should be capitalised and commands be lower case
Then Module.object.prop arg is acceptable syntax

What about some awful hack like an object can be executed as a command if it defines _c as a property

Then multi word commands are command.sub arg with command arg still executable

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.