Skip to content

Instantly share code, notes, and snippets.

View achequisde's full-sized avatar
👊
Standing here, I realize...

Humberto Rondon achequisde

👊
Standing here, I realize...
  • Venezuela
  • 13:10 (UTC -04:00)
View GitHub Profile
@achequisde
achequisde / my-map.scm
Created June 4, 2024 23:24
Custom map implementation written in Scheme.
;; my/map
;; -- proc: A function
;; -- lss: All other arguments. They must be lists
;; This is a naive implementation of map, probably
;; It does a matrix transposition on lss first
;; e.g. given (4 6 7) and (2 1 1), we get ((4 2) (6 1) (7 1))
;; Then we use apply to... apply proc to each sublist
;; e.g. given + as proc, and using the list from the previous example,
;; we get ((+ 4 2) (+ 6 1) (+ 7 1)) => (6 7 8)
@achequisde
achequisde / dolaraldiaprivpol.md
Last active December 14, 2023 18:11
DólarAlDía privacy policy

DólarAlDía does not collect, store, use or share any information, personal or otherwise.

@achequisde
achequisde / main.c
Last active August 26, 2022 19:40
Simple shell in C that executes commands without macro expansion
// DONE: Check error when calling "ls -la --color=auto" or "cal -n 2" -- Changed `execv' with `execvp'
// TODO: Test with waitpid()
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@achequisde
achequisde / gist:17805bef55fdafb3d01c2a0b8ffe80cb
Last active August 26, 2022 19:41
Reverse polish notation calculator
# calc.awk -- Reverse polish calculator
# void -> string
function usage() {
return instructions "\n" example
}
# number -> void
function push(value) {
STACK[SP] = value
;; This is free and unencumbered software released into the public domain.
;; Anyone is free to copy, modify, publish, use, compile, sell, or
;; distribute this software, either in source code form or as a compiled
;; binary, for any purpose, commercial or non-commercial, and by any
;; means.
;; In jurisdictions that recognize copyright laws, the author or authors
;; of this software dedicate any and all copyright interest in the
;; software to the public domain. We make this dedication for the benefit
@achequisde
achequisde / guess_number.awk
Last active November 5, 2021 14:58
Guessing game written on AWK
# This is free and unencumbered software released into the public domain.
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit
@achequisde
achequisde / tac.c
Last active November 7, 2021 00:29
Simple implementation of tac (reverse cat)
/* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
* In jurisdictions that recognize copyright laws, the author or authors
* of this software dedicate any and all copyright interest in the
* software to the public domain. We make this dedication for the benefit