Skip to content

Instantly share code, notes, and snippets.

View haskellcamargo's full-sized avatar
🪲
Everything is terrible

Marcelo Camargo haskellcamargo

🪲
Everything is terrible
View GitHub Profile
@haskellcamargo
haskellcamargo / checkls-1.0.ls
Created February 25, 2015 19:12
checkls-1.0.ls
window.add-event-listener(\load, (!->
container = document.create-element \div
container.id = \check-results-container
ul = document.create-element \ul
ul.id = \check-results
container.append-child ul
container |> document.body.append-child ), false)
check-assert = (value, desc) !->
container = document.get-element-by-id \check-results
@haskellcamargo
haskellcamargo / testing.hs
Created February 25, 2015 21:39
Tests with Rawr Lang
module Data where
with (~Closure, ~Countable, ~Exception, ~ReflectionClass) do
("../Data.Types.php" :: File).requireOnce!
class ClassHolder(className :: Str)
with contract Countable
my publicMethods :: Int <- 0
my methods :: [~ReflectionMethod] <- [||]
@haskellcamargo
haskellcamargo / rawrLang.md
Created February 25, 2015 22:26
RawrLang

You appear to be advocating a new:

  • functional
  • imperative
  • object-oriented
  • procedural
  • stack-based
  • "multi-paradigm"
  • lazy
  • eager
  • statically-typed
@haskellcamargo
haskellcamargo / enterprise.pas
Created February 25, 2015 22:33
Trabalho da faculdade
program Enterprise;
{*
@date : 11/19/2014
@authors : Marcelo Camargo,
Eduardo Tell.
@compiler: Free Pascal.
*}
/** Consider the interface
interface Mappable<A> {
map: (A → B) → Mappable<B>
}
*/
function Identity(value) {
@haskellcamargo
haskellcamargo / ParseWhile.hs
Created February 26, 2015 02:21
A While parser for Haskell with Parsec
module ParseWhile where
-- Import necessary libraries
import System.IO
import Control.Monad
import Text.ParserCombinators.Parsec
import Text.ParserCombinators.Parsec.Expr
import Text.ParserCombinators.Parsec.Language
import qualified Text.ParserCombinators.Parsec.Token as Token
{*
The MIT License (MIT)
Copyright (c) 2015, Marcelo Camargo <marcelocamargo@linuxmail.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@haskellcamargo
haskellcamargo / Prelude.hb
Last active August 29, 2015 14:16
Harbour Prelude
/**
* This file is responsible by the preprocessor definitions and macros for
* work on syntax.
* @lastmod: 2015-03-13
* @author : Marcelo Haskell Camargo
*/
// Range syntax: @{ nStart .. nEnd }
#xtranslate @{ <nStart> .. <nEnd> } => Z_Range( <nStart>, <nEnd> );
// Range syntax with step: @{ nStart, nNext .. nEnd }
@haskellcamargo
haskellcamargo / IO.php
Last active August 29, 2015 14:17
xBase Docgen
<?php
# Copyleft (C) Marcelo Camargo.
try {
# First we verify if we already have a directory to store our docs.
if (!is_dir("functions"))
mkdir("functions");
# Samples sources are stored inside functions folder
if (!is_dir("functions/samples"))
mkdir("functions/samples");
{
"cmd": ["java", "-jar", "C:\/TOTVS\/command_line_tools\/tdscli.jar", "-help"],
"encoding": "cp1252",
"variants": [
{
"cmd": ["java", "-jar", "C:\/TOTVS\/command_line_tools\/tdscli.jar", "compile",
"program=$file", "includes=C:\/ambientes_protheus\/M118_SQA_VALID2\/include",
"server=localhost", "port=25006", "environment=M118_SQA_VALID2", "serverType=Advpl",
"user=admin", "psw=",