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
| // TestMacro.scala | |
| import scala.quoted.* | |
| object TestMacro { | |
| inline def name[E](e: E): String = ${ nameImpl[E]('e) } | |
| def nameImpl[E: Type](e: Expr[E])(using Quotes): Expr[String] = { | |
| import quotes.reflect.* |
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 logging | |
| import json | |
| import google.oauth2.credentials | |
| import time | |
| from google.assistant.library import Assistant | |
| from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QObject, QThread | |
| from google.assistant.library.event import EventType |
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
| ;; A nock interpreter | |
| (defun tar (a f) | |
| (labels ((fas (b a) | |
| (declare (integer b)) | |
| (cond | |
| ((= b 1) a) | |
| ((= b 2) (car a)) | |
| ((= b 3) (cdr a)) | |
| ((evenp b) (car (fas (/ b 2) a))) | |
| ((oddp b) (cdr (fas (/ (1- (the integer b)) 2) a)))))) |