This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (require 2htdp/image) | |
| (require 2htdp/universe) | |
| (require lang/posn) | |
| (struct world (ufo tank)) | |
| (define width 500) | |
| (define height 500) | |
| (define mtsn (empty-scene width height)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE NamedFieldPuns #-} | |
| module Lib where | |
| import Control.Concurrent.STM | |
| import Control.Monad | |
| import Control.Monad.State | |
| import Control.Concurrent.STM.TChan | |
| import Control.Concurrent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type SimpleState = State [Int] | |
| push :: Int -> SimpleState () | |
| push x = do | |
| modify (x:) | |
| return () | |
| pop :: SimpleState Int | |
| pop = do | |
| c <- get |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <gdnative_api_struct.gen.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <ecl/ecl.h> | |
| /*************/ | |
| /* Setup ecl */ | |
| /*************/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;; init.el -- Config | |
| ;;; Commentary: | |
| ;;; custom Emacs config | |
| ;;; Code: | |
| (let ((bootstrap-file (concat user-emacs-directory "straight/repos/straight.el/bootstrap.el")) | |
| (bootstrap-version 3)) | |
| (unless (file-exists-p bootstrap-file) | |
| (with-current-buffer | |
| (url-retrieve-synchronously |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang racket | |
| (struct student (roll name marks)) | |
| (define (get-input!) | |
| (read-line (current-input-port))) | |
| (define (get-number!) (string->number (get-input!))) | |
| (displayln "Enter the number of students") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (import :std/foreign) | |
| (export #t) | |
| (begin-ffi (first-c | |
| malloc-integer-list) | |
| (define-c-lambda first-c | |
| ((pointer (pointer int))) | |
| (pointer int) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (import :std/foreign) | |
| (import (for-syntax :play/stxutil)) | |
| (export #t) | |
| (begin-ffi () | |
| (c-declare "#include<string.h>")) | |
| (defsyntax (access stx) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <title>three.js webgl - lights - hemisphere light</title> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> | |
| <link type="text/css" rel="stylesheet" href="main.css"> | |
| <style> | |
| body { | |
| color: #444; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (define data (list 0.0 -0.5 1.0 0.0 0.0 | |
| 0.5 0.5 0.0 1.0 0.0 | |
| -0.5 0.5 0.0 0.0 1.0)) | |
| (define buffer-data (let (v (make-u8vector (* 15 4))) | |
| (let lp ((rest data) (i 0)) | |
| (match rest | |
| ([x . rest] | |
| (displayln "i:" i "x:" x) |