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

Second version of the Leios simulator #6

Merged
43 commits merged into from
Jul 17, 2024
Merged

Second version of the Leios simulator #6

43 commits merged into from
Jul 17, 2024

Conversation

dnadales
Copy link
Contributor

This PR is a work in progress and is intended to gather feedback.

@dnadales dnadales requested a review from a user June 24, 2024 15:23
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This goes in the right direction, although I would personally have taken some shortcuts for the sake of simplifying the whole model, as it's going to be thrown away. Also, I would have tried to minimise the monadic code, as we don't really care about efficiency and concurrency: Just modeling a single pipeline for a single node is enough right now.

I would like to see the "code in action", eg. running in a terminal or connected to the front-end, to make sure it's demonstrating what we care about.

leios-sim/src/Leios/Model.hs Outdated Show resolved Hide resolved
leios-sim/src/Leios/Model.hs Outdated Show resolved Hide resolved
leios-sim/src/Leios/Model.hs Outdated Show resolved Hide resolved
leios-sim/src/Leios/Model.hs Show resolved Hide resolved
leios-sim/src/Leios/Model.hs Outdated Show resolved Hide resolved
leios-sim/src/Leios/Model.hs Outdated Show resolved Hide resolved
leios-sim/src/Leios/Model.hs Outdated Show resolved Hide resolved
leios-sim/src/Leios/Model.hs Show resolved Hide resolved
@ghost
Copy link

ghost commented Jun 24, 2024

Also, I would suggest to clean up existing code that's no more relevant

@ghost
Copy link

ghost commented Jun 25, 2024

I have tried to write a small test for slice function in order to clarify its behaviour:

module Leios.ModelSpec where

import Leios.Model (slice)
import Test.Hspec (Spec, describe, it, shouldBe)

spec :: Spec
spec =
  describe "slice" $ do
    it "returns 1 given len = 5 start = 18 #slice = 2" $
      slice 5 18 2 `shouldBe` 1

This is a direct translation of the comment for slice but it does not compile as Slice is not a Num :(

@dnadales
Copy link
Contributor Author

I would like to see the "code in action", eg. running in a terminal or connected to the front-end, to make sure it's demonstrating what we care about.

Feel free to check c592284 I still need to update the queue, but now the logic got more complex since that information is not in the EBs anymore.

@dnadales
Copy link
Contributor Author

I have tried to write a small test for slice function in order to clarify its behaviour:

module Leios.ModelSpec where

import Leios.Model (slice)
import Test.Hspec (Spec, describe, it, shouldBe)

spec :: Spec
spec =
  describe "slice" $ do
    it "returns 1 given len = 5 start = 18 #slice = 2" $
      slice 5 18 2 `shouldBe` 1

This is a direct translation of the comment for slice but it does not compile as Slice is not a Num :(

Thanks! I'll incorporate this!

@ghost ghost force-pushed the dnadales/leios-simulation branch 2 times, most recently from 6b605eb to fd33469 Compare July 11, 2024 16:28
@ghost ghost marked this pull request as ready for review July 16, 2024 20:31
abailly and others added 23 commits July 16, 2024 22:31
This commit also:

- Changes the order of the parameters. `L` appears before λ since the
latter is defined in terms of the former.
…s field

- Blocks might arrive not in slot order, therefore a scatter plot is
more suitable.
- `_L` is now being used consistently to access the `L` value.
- Function 'nextSlot' would return slot 0 even if the tick function
was paused (waiting on a TVar).
- I did not use the set size for IBs, which was part of the parameters. I was using `gIBSize`.
Gave up after a while as there are too many moving parts, and setting up
networking and permissions correctly is a major PITA
* added tooltip character
* link CSS
* consistent ids for inputs
@ghost ghost force-pushed the dnadales/leios-simulation branch from 2fd1f88 to ad37549 Compare July 16, 2024 20:31
@ghost ghost merged commit e658bdd into main Jul 17, 2024
4 checks passed
@ghost ghost deleted the dnadales/leios-simulation branch July 17, 2024 04:28
This pull request was closed.
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

Successfully merging this pull request may close these issues.

2 participants