greybrunix
Re:Why Functional Programming Should Be the Future of Software Develop...
on Monday February 12, 2024 @09:27AM (#39345110)
I can't help but agree with this post. In fact, my university makes it a standard
to teach Functional Programming via Haskell, it makes sense.
The trend in programming language design seems to be running away from mathematics and complex problems, however the moment you remove these aspects from a language the more error prone or resource heavy they become.
In fact, I'd like to add that, despite believing that side effects and global state is essential for programming, we cannot simply ignore functional programming, instead we should look to solve these problems and write error free code from a mathematical viewpoint, thinking functional and then imperatively or object oriented or whatever.
Re:Ask HN: What are your favorite vim/nvim customizations/shortcuts?
on Monday February 12, 2024 @09:17AM (#39344996)
One thing I cannot live without: The Emacs-like Scratch buffer.
it's quite simple to do in vimscript:
function Newscratch()
execute 'tabnew '
setlocal buftype=nofile
setlocal bufhidden=hide
setlocal noswapfile
endfunction
com! Ns call Newscratch()
Re:Two File Descriptors for Sockets
on Monday January 22, 2024 @05:11AM (#39087990)
I think the point is that a socket is doing both reading and writing using the same file descriptor, which is counterintuitive.