petertseng
Repos
66
Followers
137
Following
2

Events

issue comment
Adds concept Booleans

A pull request contains any commits that are added to the designated branch. The designated branch for this PR is the main branch on pwadsworth/haskell.

Therefore:

Create a branch, put the desired commits on it, and open a pull request, with that branch as the designated branch.

Created at 16 hours ago
issue comment
Adds concept Booleans

You should put the documentation changes into their own PR. I won't refuse to review it but it makes no sense to delay one based on the other.

Created at 18 hours ago
issue comment
Adds concept Booleans

Indentation was removed from the concepts lists. I have no records of us deciding that it should be removed. Indentation should be restored.

Created at 18 hours ago
issue comment
Reference directory structure does not match current use.

We have no choice but to change the documentation. We cannot move the exemplar out of .meta because we do not want to serve it to the students.

Created at 1 day ago
closed issue
test for https://exercism.org/tracks/rust/exercises/gigasecond is wrong

The assert_eq (expected answer) should be 'dt(2011, 4, 25, 0, 0, 1)'. Same problem for the rest of the another_test ` fn dt(year: i32, month: u8, day: u8, hour: u8, minute: u8, second: u8) -> DateTime {

use time::{Date, Time};

    

      


    

      

DateTime::new(

    

      

    Date::from_calendar_date(year, month.try_into().unwrap(), day).unwrap(),

    

      

    Time::from_hms(hour, minute, second).unwrap(),

    

      

)

    

      

}

#[test]

fn test_date() {

let start_date = dt(2011, 4, 25, 0, 0, 0);

    

      


    

      

assert_eq!(gigasecond::after(start_date), dt(2043, 1, 1, 1, 46, 40));

    

      

}`

Created at 3 days ago
closed issue
test for https://exercism.org/tracks/rust/exercises/gigasecond is wrong

The assert_eq (expected answer) should be 'dt(2011, 4, 25, 0, 0, 1)'. Same problem for the rest of the another_test ` fn dt(year: i32, month: u8, day: u8, hour: u8, minute: u8, second: u8) -> DateTime {

use time::{Date, Time};

    

      


    

      

DateTime::new(

    

      

    Date::from_calendar_date(year, month.try_into().unwrap(), day).unwrap(),

    

      

    Time::from_hms(hour, minute, second).unwrap(),

    

      

)

    

      

}

#[test]

fn test_date() {

let start_date = dt(2011, 4, 25, 0, 0, 0);

    

      


    

      

assert_eq!(gigasecond::after(start_date), dt(2043, 1, 1, 1, 46, 40));

    

      

}`

Created at 3 days ago
issue comment
test for https://exercism.org/tracks/rust/exercises/gigasecond is wrong

But 2011-04-25 00:00:01 is only one second after 2011-04-25 00:00:00, not one gigasecond. I don't see how dt(2011, 4, 25, 0, 0, 1) could possibly be the correct answer. Can you explain

Created at 3 days ago
[scale-generator] Fix output description

Whatever we do, the description in https://github.com/exercism/problem-specifications/blob/main/exercises/scale-generator/description.md should match the tests in https://github.com/exercism/problem-specifications/blob/main/exercises/scale-generator/canonical-data.json, and the tests have one more note than interval. If a specific track makes a conscious decision to test differently, it can make a conscious decision to modify the description appropriately for their track specifically as well.

So, if the correct decision is "Require only N notes, and make explicit mention that the Nth interval can be ignored", then both the description and the https://github.com/exercism/problem-specifications/blob/main/exercises/scale-generator/canonical-data.json should be modified.

Created at 4 days ago
[scale-generator] Fix output description

EBWODP: I realise that my wording implies that I prefer a particular solution over the others, and I apologise for that. I found it difficult to be impartial toward the other solutions. I have no excuse for my behaviour, only an explanation.

Created at 4 days ago
issue comment
Update config.json for files.solution to include package.yaml. Resolves #1003, resolves #1076

The Haskell track is very grateful that you were willing to take the time and effort to contribute this change to improve the track for all. Thank you!

Created at 1 week ago

all exercises: Add package.yaml to files.solution in config.json (#1080)

This will make the file editable in the web editor.

Resolves #1003, resolves #1076

Created at 1 week ago
closed issue
Allow editing of package.yaml in web editor by adding it to files.solution

To allow students to edit the package.yaml, for each exercise's .meta/config.json, add package.yaml files.solution, such as:

  "files": {
    "solution": [
      "src/Accumulate.hs",
      "package.yaml"
    ],    
    "test": [
      "test/Tests.hs"
    ],    
    "example": [
      ".meta/examples/success-standard/src/Accumulate.hs"
    ]     
  }, 

This applies to all exercises under exercises/concept and exercises/practice.

You should also add package.yaml to files.solution in https://github.com/exercism/haskell/blob/main/config.json, which can be of use when creating new exercises.

In your commit message please use a word from https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue to say that the commit closes these two issues

  • https://github.com/exercism/haskell/issues/1003
  • https://github.com/exercism/haskell/issues/1076 (this issue)
Created at 1 week ago
closed issue
Data.Set failing to import in solution

When trying to use Data.Set in my solution to Pangram, using the online editor, I get the following compilation error

[1 of 2] Compiling Pangram

/mnt/exercism-iteration/src/Pangram.hs:9:1: error:
    Could not load module ‘Data.Set’
    It is a member of the hidden package ‘containers-0.6.2.1’.
    Perhaps you need to add ‘containers’ to the build-depends in your .cabal file.
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
  |
9 | import qualified Data.Set as S
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

--  While building package pangram-2.0.0.12 (scroll up to its section to see the error) using:
      /opt/test-runner/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.4 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0 build lib:pangram test:test --ghc-options ""
    Process exited with code: ExitFailure 1

In the mentor notes for Pangram, it suggests a solution using Data.Set so I tried implementing it myself. It seems like it used to work but no longer does.

Created at 1 week ago
pull request closed
Update config.json for files.solution to include package.yaml. Resolves #1003, resolves #1076

Update config.json for files.solution to include package.yaml. Resolves #1003, resolves #1076.

This change will allow users to edit the package.yaml file for each exercise in the online editor. This will allow importing libraries such as Data.Set in the online editor.

Please let me know if there is anything I can improve in future PRs.

Thanks!

Created at 1 week ago
issue comment
lucians-luscious-lasagna: Tests pass despite function never returning

Here, use mine. https://exercism.org/tracks/rust/exercises/lucians-luscious-lasagna/solutions/petertseng

I used this as my function:

pub fn remaining_minutes_in_oven(actual_minutes_in_oven: i32) -> i32 {
    loop {
        println!("aaaa");
    }
    0
}

Note that I would get a test timeout with only three "a" in the string.

Also note that it says five tests passed. We have six tests.

Created at 2 weeks ago
issue comment
poker: fix broken source url

highly advised to make the same change to https://github.com/exercism/problem-specifications/blob/main/exercises/poker/metadata.toml, lest the Rust track lose this change on a sync, or the incorrect link persist in other tracks

Created at 2 weeks ago
issue comment
word-count: Less ambiguous punctuation rule

From all of us at the Haskell track, thank you for being willing to submit improvements to the track!

Created at 2 weeks ago

word-count: Less ambiguous punctuation rule (#1068)

With "ignored", it's unclear if punctuation separates the words or is just removed (relevant for the test case "handles cramped lists"). Replace with "regarded as spaces".

https://github.com/exercism/problem-specifications/pull/2067

Created at 2 weeks ago
pull request closed
word-count: Less ambiguous punctuation rule

With "ignored", it's unclear if punctuation separates the words or is just removed (relevant for the test case handles cramped lists).

Created at 2 weeks ago

word-count: Less ambiguous punctuation rule (#2067)

"regarded as spaces" rather than "ignored"

Created at 2 weeks ago
pull request closed
word-count: Less ambiguous punctuation rule

With "ignored", it's unclear if punctuation separates the words or is just removed (relevant for the test case handles cramped lists).

Created at 2 weeks ago