SlidePub
Home
Categories
Login
Register
Home
Technology
Boost your command line applications with potions!
Boost your command line applications with potions!
etorreborre
14 views
34 slides
Sep 24, 2024
Slide
1
of 34
Previous
Next
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
About This Presentation
This talk presents potions, a command-line parser library.
Size:
43.13 MB
Language:
en
Added:
Sep 24, 2024
Slides:
34 pages
Slide Content
Slide 1
Boost your command-line
applications with potions!
Eric Torreborre
Slide 2
Options, flags, arguments, oh my!
Slide 3
Options, flags, arguments, oh my!
Arg
Flag, option, argument, switch
Option
Parameter
Slide 4
Feature set
No: man page, - - arguments, deriving
Slide 5
Help!
Slide 6
Show me the money!
Slide 7
Show me the money!
Slide 8
Anatomy of an option
Slide 9
Anything of value
Slide 10
Bring your own
Mandatory
Combinators
Slide 11
Option parsers
Option Flag Argument
Slide 12
Mind the environment
SOURCE_FILE
SOURCE
COPY_SOURCE
Slide 13
Flag <-> Enum
Slide 14
Repeated options
Slide 15
Commands
Slide 16
Commands
Slide 17
Fixing mistaeks
Slide 18
To the best of my abilities
Slide 19
Option
Option ≠ Flag ≠ Argument
Flag Argument
Named Positioned
Active value
Default valueExample
Slide 20
Declare everything
Slide 21
Builder pattern with abilities
ValueDsl
NameDsl
PositionalDsl
HelpDsl
EnvDsl
FlagDsl
RepeatedDsl
DefaultValueDsl
Slide 22
Builder pattern with abilities
This might fail!
Slide 23
Two steps building
Slide 24
Making repeated options: a -> [a]
Re-interpret expressions
Decode a list
Handler
Display repetition
Slide 25
From Option a to ‘{Parser} a
Handle with other abilities
Inputs
Option/command
ResultEffects
Slide 26
Help!
Not trivial!
Slide 27
Help!
Slide 28
What’s up Doc?
Slide 29
Suggestions
Slide 30
Programming at scale
Slide 31
Programming at scale
full-text search?
navigating code
readability?
fzf + editing code
view / test results lost in
typecheck errors
Slide 32
Programming at scale
jumps arounderror-proneperformance
update required to test
no doc renderer
commits?refactoring records
Slide 33
Programming at scale
Tests
Panes
WatchesTypecheck errors
DocFind/Replace
Status adornments
Navigation
Actions
Please give me an IDE!
Slide 34
Thanks!
Tags
unison
command-line
functional programming
library
Categories
Technology
Download
Download Slideshow
Get the original presentation file
Quick Actions
Embed
Share
Save
Print
Full
Report
Statistics
Views
14
Slides
34
Age
434 days
Related Slideshows
11
8-top-ai-courses-for-customer-support-representatives-in-2025.pptx
JeroenErne2
46 views
10
7-essential-ai-courses-for-call-center-supervisors-in-2025.pptx
JeroenErne2
46 views
13
25-essential-ai-courses-for-user-support-specialists-in-2025.pptx
JeroenErne2
37 views
11
8-essential-ai-courses-for-insurance-customer-service-representatives-in-2025.pptx
JeroenErne2
34 views
21
Know for Certain
DaveSinNM
21 views
17
PPT OPD LES 3ertt4t4tqqqe23e3e3rq2qq232.pptx
novasedanayoga46
26 views
View More in This Category
Embed Slideshow
Dimensions
Width (px)
Height (px)
Start Page
Which slide to start from (1-34)
Options
Auto-play slides
Show controls
Embed Code
Copy Code
Share Slideshow
Share on Social Media
Share on Facebook
Share on Twitter
Share on LinkedIn
Share via Email
Or copy link
Copy
Report Content
Reason for reporting
*
Select a reason...
Inappropriate content
Copyright violation
Spam or misleading
Offensive or hateful
Privacy violation
Other
Slide number
Leave blank if it applies to the entire slideshow
Additional details
*
Help us understand the problem better