Skip to content

Commit

Permalink
added first puzzle for 0pdd bot
Browse files Browse the repository at this point in the history
  • Loading branch information
eimfach committed Oct 28, 2019
1 parent 678c28f commit 4a4bd3a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/elm/Parsers.elm
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ parseInt =
]


{-| Used to Parse a float in a chain of other parsers. Supporting `,` _and_ `.` decimal separators.
@todo Parsing Float Strings with additional thousands separators is not supported. The parsing will fail in this scenario.
Consider using `Parser.loop` and `Parser.oneOf`. Also I think it should test if the created number is supported by the js runtime.
There is an elm lib to do this. Maybe it is easy to implement it by yourself, and the lib is not needed. Also, should mixed separator 'types' be possible ?
or could it cause a performance issue ? Right now it supports mixed decimal separators unsing `Parser.oneOf`
-}
parseChainFloat : Parser.Parser ( String, String, String )
parseChainFloat =
Parser.succeed (\a b c -> ( a, b, c ))
Expand All @@ -104,6 +110,8 @@ parseChainFloat =
|= Parser.getChompedString (Parser.chompWhile Char.isDigit)


{-| Parses Float Strings supporting `,` _and_ `.` decimal separators.
-}
parseFloat : Parser.Parser Float
parseFloat =
Parser.succeed identity
Expand Down
4 changes: 4 additions & 0 deletions src/elm/Table.elm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ import Parser exposing ((|.), (|=))
import Parsers exposing (..)



-- TYPES


type alias Cell =
String

Expand Down

1 comment on commit 4a4bd3a

@0pdd
Copy link

@0pdd 0pdd commented on 4a4bd3a Oct 28, 2019

Choose a reason for hiding this comment

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

I wasn't able to retrieve PDD puzzles from the code base and submit them to GitHub. If you think that it's a bug on our side, please submit it to yegor256/0pdd:

set -x && set -e && set -o pipefail && cd /tmp/0pdd20191028-11-em6web/eimfach/elm-csv-batch-tagger-app && pdd -v -f /tmp/20191028-7096-afuu6r [1]: + set -e + set -o pipefail + cd /tmp/0pdd20191028-11-em6web/eimfach/elm-csv-batch-tagger-app + pdd -v -f /tmp/20191028-7096-afuu6r My version is...

Please, copy and paste this stack trace to GitHub:

UserError
set -x && set -e && set -o pipefail && cd /tmp/0pdd20191028-11-em6web/eimfach/elm-csv-batch-tagger-app && pdd -v -f /tmp/20191028-7096-afuu6r [1]:
+ set -e
+ set -o pipefail
+ cd /tmp/0pdd20191028-11-em6web/eimfach/elm-csv-batch-tagger-app
+ pdd -v -f /tmp/20191028-7096-afuu6r

My version is 0.20.5
Ruby version is 2.6.0 at x86_64-linux
Reading /tmp/0pdd20191028-11-em6web/eimfach/elm-csv-batch-tagger-app
27 file(s) found, 58 excluded
/tmp/0pdd20191028-11-em6web/eimfach/elm-csv-batch-tagger-app/src/favicon.ico is a binary file (1150 bytes)
/tmp/0pdd20191028-11-em6web/eimfach/elm-csv-batch-tagger-app/src/static/img/elm.jpg is a binary file (70888 bytes)
Reading .gitignore...
Reading _posts/2018/2018-08-29-project-atlantic.markdown...
Reading _posts/2018/2018-08-30-project-atlantic.markdown...
Reading _posts/2019-09-05-project-atlantic.markdown...
Reading webpack.config.js...
Reading package-lock.json...
Reading README.md...
Reading elm.json...
Reading src/elm/Helpers.elm...
Reading src/elm/Table.elm...
Reading src/elm/Input.elm...
Reading src/elm/Ports/FileReader.elm...
Reading src/elm/Button.elm...
Reading src/elm/Modal.elm...
Reading src/elm/Main.elm...
Reading src/elm/Parsers.elm...
ERROR: src/elm/Parsers.elm; puzzle at line #93; @todo found, but puzzle can't be parsed, most probably because @todo is not followed by a puzzle marker, as this page explains: https://github.com/yegor256/pdd#how-to-format
If you can't understand the cause of this issue or you don't know how to fix it, please submit a GitHub issue, we will try to help you: https://github.com/yegor256/pdd/issues. This tool is still in its beta version and we will appreciate your feedback. Here is where you can find more documentation: https://github.com/yegor256/pdd/blob/master/README.md.
Exit code is 1

/app/objects/git_repo.rb:66:in `rescue in block in xml'
/app/objects/git_repo.rb:63:in `block in xml'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/tempfile.rb:295:in `open'
/app/objects/git_repo.rb:62:in `xml'
/app/objects/puzzles.rb:36:in `deploy'
/app/objects/job.rb:38:in `proceed'
/app/objects/job_starred.rb:33:in `proceed'
/app/objects/job_recorded.rb:32:in `proceed'
/app/objects/job_emailed.rb:35:in `proceed'
/app/objects/job_commiterrors.rb:36:in `proceed'
/app/objects/job_detached.rb:48:in `exclusive'
/app/objects/job_detached.rb:36:in `block in proceed'
/app/objects/job_detached.rb:36:in `fork'
/app/objects/job_detached.rb:36:in `proceed'
/app/0pdd.rb:358:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1635:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1635:in `block in compile!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:992:in `block (3 levels) in route!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1011:in `route_eval'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:992:in `block (2 levels) in route!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1040:in `block in process_route'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1038:in `catch'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1038:in `process_route'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:990:in `block in route!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:989:in `each'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:989:in `route!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1097:in `block in dispatch!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1076:in `block in invoke'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1076:in `catch'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1076:in `invoke'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1094:in `dispatch!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:924:in `block in call!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1076:in `block in invoke'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1076:in `catch'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1076:in `invoke'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:924:in `call!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:913:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.0.4/lib/rack/protection/xss_header.rb:18:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.0.4/lib/rack/protection/path_traversal.rb:16:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.0.4/lib/rack/protection/json_csrf.rb:26:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.0.4/lib/rack/protection/base.rb:50:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.0.4/lib/rack/protection/base.rb:50:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.0.4/lib/rack/protection/frame_options.rb:31:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/logger.rb:15:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/common_logger.rb:33:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:231:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:224:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/head.rb:12:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/method_override.rb:22:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:194:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1957:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1502:in `block in call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1729:in `synchronize'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.0.4/lib/sinatra/base.rb:1502:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.6/lib/rack/handler/webrick.rb:86:in `service'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/webrick/httpserver.rb:140:in `service'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/webrick/httpserver.rb:96:in `run'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/webrick/server.rb:307:in `block in start_thread'

Please sign in to comment.