I think this is common to people new to Haskell, but you need equality (i.e. the ==
operator) less often than you might think.
in this sort of case:
rotN :: (Enum a, Bounded a) => CryptoProc -> Int -> a -> a
import bisect | |
import os | |
import sys | |
C_PAD = b"\0" | |
KEY_SIZES = [16, 24, 32] | |
def normalize_key(key: bytes) -> bytes: |
data EnvData = EnvData | |
data GetEnv :: Effect where | |
DoFoo :: GetEnv m EnvData | |
doFoo :: (GetEnv :> es) => Eff es EnvData | |
doFoo = send DoFoo | |
type instance DispatchOf GetEnv = 'Dynamic |
In general the code seems really well written, especially given that I think you're pretty new to this coding thing? I'd say the code is a good balance between being overly wordy, and being too terse to easily understand.
I haven't commented much on the Flask- and database-specific choices you've made, because I'm not familiar enough with Flask and SQLAlchemy to give great feedback, and also I imagine this is less useful than more general Python- and programming-relevant suggestions.
I've no substantial feedback on the javascript and CSS, because I've less experience with good practice here. But it all looks fine as far as I can tell.
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
*$py.class | |
# C extensions | |
*.so | |
# Distribution / packaging | |
.Python |
import sys | |
SLOW_THRESHOLD = 20 | |
def parse_line(line): | |
time_str, content = line.strip().split(' ', 1) | |
return int(time_str), content | |
[books] | |
- René Descartes: Discourse on Method and the Meditations | |
- Terry Pratchett: Feet of Clay | |
- Alexander Pope: Selected Poetry | |
- Voltaire: Candide, or Optimism | |
- Donald E. Knuth: Computers and Typesetting Volume A: The TeXBook | |
- Donald E. Knuth: Computers and Typesetting Volume B: TeX the Program | |
[people] | |
- pretend_person.com/my_book_list |