Skip to content

Instantly share code, notes, and snippets.

Avatar

Artyom Shalkhakov ashalkhakov

View GitHub Profile
@ashalkhakov
ashalkhakov / .gitlab-ci.yml
Last active Aug 18, 2021
Running .NET 3.5 CF builds under Docker for Windows
View .gitlab-ci.yml
# this is the GitLab-CI file for building the image
variables:
CURRENT_IMAGE_TAG: rfid-applied/netcf35_build_environment:dev
stages:
- dockerize
dockerize:
stage: dockerize
script:
@ashalkhakov
ashalkhakov / main.dats
Last active Aug 7, 2019
IO monad in ATS
View main.dats
(*
HX-2019-03-26-2:
The original code is available at
https://gist.github.com/ashalkhakov/c3577e97b20020fde31f84447fd1e056
I turned runCommand into a polymorphic function and
also made Command a linear datatype (i.e., dataviewtype)
AS-2019-03-26:
@ashalkhakov
ashalkhakov / gist:7526578
Last active Jul 10, 2019
Mapping DCIL to D4. Added more constraints. Well, only those that my ORM model needs, at the moment. Added support for clustered and sparse keys.
View gist:7526578
<?xml version="1.0" encoding="utf-8"?>
<!-- Author: Artyom Shalkhakov (artyom.shalkhakov@gmail.com)
License: BSD v3
I've used bits and pieces of other transforms bundled
with NORMA for reference, so I'm not the sole author
of this.
-->
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@ashalkhakov
ashalkhakov / msys2-build-ats2.sh
Last active Apr 3, 2019
Installing ATS2 on MSYS2
View msys2-build-ats2.sh
#!/usr/bin/env sh
######
#
# A shell script for
# installing ATS2 + ATS2-contrib
#
######
#
# Author: Artyom Shalkhakov
@ashalkhakov
ashalkhakov / flats.dats
Created Jan 31, 2019
Outputting HTML table in ATS
View flats.dats
#include
"share/atspre_staload.hats"
#define N 9
#define M 14
implement main0 () = let
fun loop1
{i:nat | i <= N}
(i: int i): void =
@ashalkhakov
ashalkhakov / pitch.md
Last active Apr 2, 2018
ATS sales pitch
View pitch.md

Time well spent when programming

Audience: C/C++ programmers.

Improving correctness means less maintenance and more fun!

  • everybody want more features
  • but more features usually mean more bugs and failures
  • stuck fixing bugs? not a good use of your time!
  • yet software devs spend most of their time hunting for and fixing bugs
@ashalkhakov
ashalkhakov / fc-phantom-types.dats
Created Dec 22, 2017
First-class phantom types in ATS
View fc-phantom-types.dats
(*
** Hello, world!
** run it here: http://www.ats-lang.org/SERVER/MYCODE/Patsoptaas_serve.php?mycode_fil=hello
*)
(* ****** ****** *)
//
#define
LIBATSCC2JS_targetloc
"$PATSHOME\
View gist:85902ec8992acef7eef3fbf0a1c41ddb
(*
** Hello, world!
*)
(* ****** ****** *)
//
#define
LIBATSCC2JS_targetloc
"$PATSHOME\
/contrib/libatscc2js/ATS2-0.3.2"
View gctest.dats
(*
* to compile:
*
* $ patscc -DATS_MEMALLOC_LIBC gctest.dats
*
* NOTE: no GC here
*)
#include
"share/atspre_staload.hats"
View monads-js.dats
(*
** Hello, monadic world!
**
** Author: Artyom Shalkhakov
** artyom DOT shalkhakov AT gmail DOT com
**
** Can be run using:
** http://www.ats-lang.org/SERVER/MYCODE/Patsoptaas_serve.php
*)