This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
{- stack | |
script | |
--resolver lts-18.28 | |
--package sqlite-simple | |
--package async | |
--package text | |
-} | |
{- | |
-- | the purpose of this code is : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker system prune --volumes | |
docker system prune --all | |
_/build-dars | |
dc up -d --build | |
find . -name "*.dar" | |
#### output of the find command: ### | |
➜ eleox git:(js-kayvan-EID-17-packageId) ✗ find . -name "*.dar" | |
./daml/.daml/dist/eleox-do-not-use-0.0.1.dar | |
./daml/.packages/eleox-triggers/.daml/dist/eleox-triggers-0.0.1.dar | |
./daml/.packages/eleox/.daml/dist/eleox-0.0.1.dar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is my workflow: | |
$ nix-shell | |
$ emacs& | |
from emacs 27.02 (getenv "PATH") | |
/run/wrapper/bin:/home/kayvan/.nix-profile/bin:/etc/profiles/per-user/kayvan/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin | |
-------------------------- from zsh echo $PATH --------- | |
echo $PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
{- | |
stack | |
--resolver lts-17.13 runghc | |
--package http-conduit | |
--package async | |
-} | |
-- | |
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
{- | |
stack | |
--resolver lts-17.13 runghc | |
--package HTTP | |
--package http-conduit | |
-} | |
-- | |
-- chapter-10, Parallel-concurrent-programming in haskell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
{- | |
stack | |
--resolver lts-17.13 runghc | |
-} | |
-- | |
-- chapter-9, Parallel-concurrent-programming in haskell | |
-- chmod 755 ./unboundedChannel.hs && ./unboundedChannel.hs | |
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
{- | |
stack | |
--resolver lts-17.13 runghc | |
--package HTTP | |
--package http-conduit | |
-} | |
-- | |
-- chapter-9, Parallel-concurrent-programming in haskell | |
-- chmod 755 ./cancellation.hs && ./cancellation.hs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
{- | |
stack | |
--resolver lts-17.13 runghc | |
-} | |
-- | |
-- chapter-7, Parallel-concurrent-programming in haskell | |
-- chmod 755 ./channel.hs && ./channel.hs | |
-- | |
{-# LANGUAGE OverloadedStrings #-} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
{- | |
stack | |
--resolver lts-17.13 runghc | |
--package HTTP | |
--package http-conduit | |
-} | |
-- | |
-- chapter-8, Parallel-concurrent-programming in haskell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////////////////////////////////////////////////////////// | |
/// may seem more complicated thatn it realy is for: | |
/// 1- concat behaves diff in haskell from Scala, so I need to modify it a bit | |
/// 2- There is no concatMap in Scala Collection API, there is one in Scala Cats, but didnt want to use cats for this assignment | |
////////////////////////////////////////////////////////////// | |
/// About the solution: | |
/// The general notion is to extend the `inserts` function to the entire collection where `inserts` inserts all the way an elelemt may be inserted in a colletion | |
//////////////////////////////////////////////////////////// | |
object Perms { |