38 karma · joined May 13, 2013
import Text.ParserCombinators.ReadP -- or the parser lib of your choice
import Data.Char
...
macP = count 16 (satisfy isHexDigit)
$ grep -r -n --color "foo*bar" src
If I want to validate input data with the machine I just use a parser.
And can you please point me to the talk?
imap jf <ESC>
ghc -e 'interact ((++"\n") . show . length . lines)' < file
EDIT:
I know that it's the same like "wc -l" but using that approach I can solve also problems that may not be well suited for awk/sed. Or maybe I just have to see some convincing one-liners.
$ man xorg.conf
and search for "nobody"
;)
imap jf <ESC>
was very nice as I find it much more ergonomic. And to use it in Bash I have
set editing-mode vi set keymap vi
$if mode=vi set keymap vi-insert "jf": vi-movement-mode $endif
set show-all-if-ambiguous on
So things should just work and if you are able to build a software that is easy to install, start and configure the user has no demand for support.
I do it that way and I have seen many people who do it the same. However I agree, that pages are bullshit in a web context.
FPL research: Ok, we have this cool way to describe our computation. But how can we efficiently map this to the HW? In essence build a nice language and find an implementation.
Imperative PL research: Ok, we have this HW, how can we build an expressive PL on top of it? In essence build an implementation (the HW) and find a language.
I would appreciate something like a small beamer a lot more where you can project a UI on a suitable surface (holograms seem to take longer ;) and control it either by a pointing device or gesture control.
There is just no need for a car here. If I want to get further away I can use an excellent (although, admittedly rather expensive) public transport system.
for interact:
#!/bin/bash ghc -e "interact ($1)"
line processing:
#!/bin/bash ghc -e "interact (unlines . map ($1) . lines)"
This is also an argument against doing a PhD where you are expected to focus on a very narrow field. The problem is that we want to measure academic progress by numbers in form of papers so scientists need to publish a lot otherwise they run out of funding. But if there is always this pressure to publish there is less time to step back to see the big picture.
E.g. if you press a key, hold it and then release it, it is possible that this event gets missed as it was too short and the key press method did not check the memory region at the right point of time. For me their implementation enforces this bogus "I am in total control of everything that happens feeling" which often leads to bad design as it ignores the messy real world. I would have appreciated something more sophisticated and generic there which would work for different kinds of HW. Maybe I am missing some simple bus-system one might say ...
Nevertheless it is a wonderful book and I had lots of fun with it! :)