Skip to content

Commit

Permalink
now starting to compile with guix
Browse files Browse the repository at this point in the history
  • Loading branch information
mike dupont committed May 30, 2024
1 parent 1beddad commit ea40ea5
Show file tree
Hide file tree
Showing 15 changed files with 265 additions and 0 deletions.
Binary file added .stack-work/stack.sqlite3
Binary file not shown.
Empty file.
Binary file added Community.dyn_hi
Binary file not shown.
Binary file added Community.dyn_o
Binary file not shown.
Binary file added Community.hi
Binary file not shown.
48 changes: 48 additions & 0 deletions Community.hs~
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
--;; Define community engagement and collaboration
community_engagement=
-- Define community engagement strategies
(define (project_dependencies)

(define (consider_some_system_packages)
(define (consider_documentation))
(define (consider_license))
(define (consider_transitive_dependencies)
(define (consider_license)

(define (consider_dicotomy_of_permissions)
(define (filter_out_non_open_licenses)
-- we will have to make an exception for nvidia, but we can consider that to be a captured node.
-- captured node are not free nodes.

)

)
(define (consider_popularity))
(define (consider_code)

(define (consider_language_scheme))
(define (consider_language_nix))
(define (consider_language_rust))
(define (consider_language_ocaml))
(define (consider_language_erlang))
(define (consider_language_elixir))
(define (consider_language_mojo))

(define (consider_language_generically language)

(define (find_system_packages_for package))

(define (consider_some_system_packages package)

-- first recursion,
-- get the package for the language and consider that
(consider_some_system_packages(find_system_packages_for package))
)
)
)
(define (consider_guix_packages))
(define (consider_nix_packages))
(define (consider_docker_packages))
(define (consider_helm_packages))
)
)))
Binary file added Community.o
Binary file not shown.
Binary file added Define.dyn_hi
Binary file not shown.
Binary file added Define.dyn_o
Binary file not shown.
Binary file added Define.hi
Binary file not shown.
24 changes: 24 additions & 0 deletions Define.hs~
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import Data.IORef

type Name = String
type Value = String

data Scope = Scope {
parent :: Maybe Scope,
bindings :: IORef [(Name, Value)]
}

newScope :: Maybe Scope -> IO Scope
newScope parent = Scope parent <$> newIORef []

define :: Name -> Value -> Scope -> IO ()
define name value scope = modifyIORef' (bindings scope) ((name, value):)

lookup2 :: Name -> Scope -> IO (Maybe Value)
lookup2 name scope = do
bindings' <- readIORef (bindings scope)
case lookup2 name bindings' of
Just value -> return (Just value)
Nothing -> case parent scope of
Just parent' -> lookup2 name parent'
Nothing -> return Nothing
Binary file added Define.o
Binary file not shown.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
world:
guix package --install-from-file=./plan.scm

haskel:
ghc-8.8.4 plan.hs
2 changes: 2 additions & 0 deletions Makefile~
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
world:
guix package --install-from-file=./plan.scm --verbose --debug
186 changes: 186 additions & 0 deletions plan.hs~
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
(use-modules (guix)
(gnu)
(gnu system)
(gnu system activation)
(gnu services))

(define (ooda-loop)
;; Implement the OODA loop for consensus building
(define (observe)
;; Observe changes and inputs from the environment
(extract-details)
#;... )

(define (orient)
;; Orient the system based on observations and inputs
#;... )

(define (decide)
;; Decide on a course of action based on observations and orientation
#;... )

(define (act)
;; Act on the decision made, updating the system accordingly
#;... )

;; Execute the OODA loop
(define (execute-ooda-loop)
(observe)
(orient)
(decide)
(act))

;; Return the OODA loop execution procedure
execute-ooda-loop)


;; Define the system configuration
(define guixie
(operating-system
;; Define system services
(services
(append
;; Guix Bootstrap service
(list (service guix-bootstrap-service-type
(guix-bootstrap-configuration
(os "gnu")
(channels '("guix" "nixpkgs"))
(parallel-builds 4)
(substitute-url "https://ci.guix.gnu.org")
(substitute-channels '("guix" "nixpkgs"))))
;; Self-hosted P2P Git service
(service git-service-type
(git-configuration
(repos '("/srv/git"))
(protocol 'p2p)))
;; Continuous Integration service
(service cuirass-service-type
(cuirass-configuration
(inherit (guix-bootstrap-service-type))
(source-mirrors '("https://git.example.org")))
(git-checkout "/srv/git/cuirass")))
%base-services)))) ;; Include base system services

;; Define smart contract-driven implementation driver
(define (implementation-driver)
;; Define smart contract logic here
#;... )

;; Define configuration management with derivations
(define (configuration-management)
;; Define derivations for system configuration
#;... )

;; Define testing and deployment logic
(define (testing-and-deployment)
;; Define testing and deployment procedures
#;... )

;; Define community engagement and collaboration
(define (community-engagement)
;; Define community engagement strategies
(define (project-dependencies)

(define (consider-some-system-packages)
(define (consider-documentation))
(define (consider-license))
(define (consider-transitive-dependencies)
(define (consider-license)

(define (consider-dicotomy-of-permissions)
(define (filter-out-non-open-licenses)
;; we will have to make an exception for nvidia, but we can consider that to be a captured node.
;; captured node are not free nodes.

)

)
(define (consider-popularity))
(define (consider-code)

(define (consider-language-scheme))
(define (consider-language-nix))
(define (consider-language-rust))
(define (consider-language-ocaml))
(define (consider-language-erlang))
(define (consider-language-elixir))
(define (consider-language-mojo))

(define (consider-language-generically language)

(define (find-system-packages-for package))

(define (consider-some-system-packages package)

;; first recursion,
;; get the package for the language and consider that
(consider-some-system-packages(find-system-packages-for package))
)
)
)
(define (consider-guix-packages))
(define (consider-nix-packages))
(define (consider-docker-packages))
(define (consider-helm-packages))
)

#;... )

;; Define the plan to execute
(define (execute-plan)
(operating-system
;; Include system services and extensions
(services
(append
(list (implementation-driver)
(configuration-management)
(testing-and-deployment)
(community-engagement)
(ooda-loop);; Include the OODA loop
)
%base-services)))) ;; Include base system services

;; Define a procedure to extract details from the code
(define (extract-details)
;; Extract details about the operating system configuration
(display "Operating System Configuration:")
(newline)
(let ((system-services (operating-system-services guixie)))
(for-each (lambda (service)
(display " - ")
(display (service-kind service))
(newline))
system-services))

;; Extract details about the procedures for implementation
(display "Procedures for Implementation:")
(newline)
(let ((procedures '(implementation-driver
configuration-management
testing-and-deployment
community-engagement
ooda-loop)))
(for-each (lambda (procedure)
(display " - ")
(display (symbol->string procedure))
(newline))
procedures))

;; Extract details about the OODA loop integration
(display "OODA Loop Integration:")
(newline)
(let ((ooda-steps '(observe orient decide act)))
(for-each (lambda (step)
(display " - ")
(display (symbol->string step))
(newline))
ooda-steps)))

;; Execute the extract-details function


;; Execute the plan
(execute-plan)



0 comments on commit ea40ea5

Please sign in to comment.