Skip to content

Instantly share code, notes, and snippets.

View mihaimaruseac's full-sized avatar

Mihai Maruseac mihaimaruseac

View GitHub Profile
[mm] λ stack unpack haddock-library-1.4.5
Cabal file info not found for haddock-library-1.4.5, updating
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
Downloading root
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
Downloading timestamp
Downloading snapshot
Downloading mirrors
Cannot update index (no local copy)
Downloading index
@mihaimaruseac
mihaimaruseac / test.c
Created April 6, 2018 13:34
Was asked to solve the problem on https://www.facebook.com/ProgrammersCreateLife/photos/a.241809332534619.55240.241806149201604/1662976313751240/?type=3 Could be improved even more, but that's for when I'll have my own blog.
#include <stdio.h>
#include <stdlib.h>
int main()
{
const int sz = 10;
for (int i = 0; i < sz; i++) {
for (int j = 0; j < sz; j++) {
if (i == 0 || i == sz - 1)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; GLOBAL AUXILIARY FUNCS, before working on real project code ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; first, convert to Haskel-ish notations
(require srfi/1)
(define (oldtake l n) (take l n))
(define (olddrop l n) (drop l n))
; Haskell-ish take and drop
@mihaimaruseac
mihaimaruseac / gist:1102942
Created July 24, 2011 18:57
Aptitude and APT easter eggs
mihai@keldon:~$ apt-get moo
(__)
(oo)
/------\/
/ | ||
* /\---/\
~~ ~~
...."Have you mooed today?"...
mihai@keldon:~$ aptitude -v moo
There really are no Easter Eggs in this program.