2015-10-23T00:00:27Z sethalves quit (Quit: Leaving.) 2015-10-23T00:16:23Z jao joined #scheme 2015-10-23T00:27:59Z tmtwd joined #scheme 2015-10-23T00:28:27Z daviid joined #scheme 2015-10-23T00:34:30Z jao quit (Ping timeout: 240 seconds) 2015-10-23T00:41:15Z ziocroc2 quit (Quit: ziocroc2) 2015-10-23T00:53:46Z hzjd quit (Quit: Leaving.) 2015-10-23T00:54:38Z daviid quit (Read error: No route to host) 2015-10-23T00:54:56Z lritter joined #scheme 2015-10-23T01:02:59Z bungoman quit (Ping timeout: 240 seconds) 2015-10-23T01:05:00Z araujo_ joined #scheme 2015-10-23T01:05:38Z araujo quit (Ping timeout: 252 seconds) 2015-10-23T01:07:09Z tmtwd quit (Ping timeout: 255 seconds) 2015-10-23T01:12:03Z mrowe is now known as mrowe_away 2015-10-23T01:28:11Z dTal_ joined #scheme 2015-10-23T01:29:50Z dTal quit (Ping timeout: 240 seconds) 2015-10-23T01:31:55Z Riastradh joined #scheme 2015-10-23T01:32:36Z davexunit joined #scheme 2015-10-23T01:43:14Z zacts joined #scheme 2015-10-23T01:50:10Z __uu__ joined #scheme 2015-10-23T01:57:23Z aap quit (Read error: Connection reset by peer) 2015-10-23T01:58:06Z yrdz quit (Remote host closed the connection) 2015-10-23T01:58:24Z yrdz joined #scheme 2015-10-23T01:58:24Z aap joined #scheme 2015-10-23T02:07:35Z bungoman_ joined #scheme 2015-10-23T02:09:54Z __uu__ quit (Read error: Connection reset by peer) 2015-10-23T02:09:56Z hzjd joined #scheme 2015-10-23T02:10:00Z __uu___ joined #scheme 2015-10-23T02:11:14Z sethalves joined #scheme 2015-10-23T02:12:41Z BossKonaSegwaY joined #scheme 2015-10-23T02:15:32Z mrowe_away is now known as mrowe 2015-10-23T02:15:43Z hzjd quit (Quit: Leaving.) 2015-10-23T02:21:04Z isaac_rks joined #scheme 2015-10-23T02:26:15Z ArneBab joined #scheme 2015-10-23T02:29:20Z ArneBab_ quit (Ping timeout: 246 seconds) 2015-10-23T02:36:32Z mrowe is now known as mrowe_away 2015-10-23T02:40:39Z mrowe_away is now known as mrowe 2015-10-23T02:41:26Z davexunit quit (Quit: Later) 2015-10-23T02:44:14Z mrowe is now known as mrowe_away 2015-10-23T02:52:37Z badkins quit 2015-10-23T03:03:40Z mrowe_away is now known as mrowe 2015-10-23T03:11:59Z Riastradh quit (Ping timeout: 268 seconds) 2015-10-23T03:14:08Z mrowe is now known as mrowe_away 2015-10-23T03:14:12Z tmtwd joined #scheme 2015-10-23T03:19:49Z grublet joined #scheme 2015-10-23T03:32:58Z buzzykins joined #scheme 2015-10-23T03:40:05Z Shadox quit (Quit: Leaving) 2015-10-23T03:42:49Z mrowe_away is now known as mrowe 2015-10-23T03:59:59Z __uu__ joined #scheme 2015-10-23T04:03:47Z __uu___ quit (Ping timeout: 264 seconds) 2015-10-23T04:04:58Z hzjd joined #scheme 2015-10-23T04:13:44Z pierpa` quit (Ping timeout: 252 seconds) 2015-10-23T04:24:30Z aretecode quit (Quit: Toodaloo) 2015-10-23T04:25:23Z cdidd quit (Ping timeout: 264 seconds) 2015-10-23T04:26:57Z hzjd quit (Quit: Leaving.) 2015-10-23T04:28:11Z bungoman_ quit 2015-10-23T04:29:41Z tmtwd quit (Ping timeout: 244 seconds) 2015-10-23T04:33:28Z araujo_ quit (Quit: Leaving) 2015-10-23T04:34:53Z araujo joined #scheme 2015-10-23T04:34:53Z araujo quit (Changing host) 2015-10-23T04:34:53Z araujo joined #scheme 2015-10-23T04:40:37Z hzjd joined #scheme 2015-10-23T04:46:20Z mbuf joined #scheme 2015-10-23T04:51:18Z excelsior joined #scheme 2015-10-23T04:55:49Z tmtwd joined #scheme 2015-10-23T04:57:25Z xyh joined #scheme 2015-10-23T05:06:16Z oleo quit (Quit: Verlassend) 2015-10-23T05:07:28Z samssammerz joined #scheme 2015-10-23T05:08:10Z niklasl2 quit (Read error: Connection reset by peer) 2015-10-23T05:15:08Z hzjd quit (Quit: Leaving.) 2015-10-23T05:20:48Z xyh quit (Remote host closed the connection) 2015-10-23T05:21:46Z hzjd joined #scheme 2015-10-23T05:27:05Z nilg joined #scheme 2015-10-23T05:27:37Z daviid joined #scheme 2015-10-23T05:28:15Z tmtwd quit (Ping timeout: 260 seconds) 2015-10-23T05:53:13Z hzjd quit (Quit: Leaving.) 2015-10-23T05:54:20Z hzjd joined #scheme 2015-10-23T06:18:10Z hzjd quit (Quit: Leaving.) 2015-10-23T06:32:14Z ogamita joined #scheme 2015-10-23T06:41:26Z lritter quit (Quit: Leaving) 2015-10-23T06:51:17Z psy_ joined #scheme 2015-10-23T07:06:09Z nilg quit (Ping timeout: 265 seconds) 2015-10-23T07:07:30Z renopt quit (Changing host) 2015-10-23T07:07:30Z renopt joined #scheme 2015-10-23T07:07:51Z nee` joined #scheme 2015-10-23T07:12:09Z micmus joined #scheme 2015-10-23T07:20:40Z hzjd joined #scheme 2015-10-23T07:27:48Z niklasl joined #scheme 2015-10-23T07:30:19Z daviid quit (Ping timeout: 265 seconds) 2015-10-23T07:41:42Z _sjs quit (Ping timeout: 260 seconds) 2015-10-23T07:44:55Z _sjs joined #scheme 2015-10-23T07:56:12Z rszeno quit (Quit: Leaving.) 2015-10-23T07:57:08Z dytrivedi joined #scheme 2015-10-23T08:10:48Z hzjd quit (Quit: Leaving.) 2015-10-23T08:15:46Z ineiros quit (Ping timeout: 260 seconds) 2015-10-23T08:17:26Z dytrivedi quit (Quit: dytrivedi) 2015-10-23T08:23:58Z ASau quit (Ping timeout: 265 seconds) 2015-10-23T08:28:33Z cemerick joined #scheme 2015-10-23T08:48:25Z hzjd joined #scheme 2015-10-23T08:55:45Z jackdaniel joined #scheme 2015-10-23T08:56:22Z lisp174 joined #scheme 2015-10-23T08:57:25Z lisp174: Hello 2015-10-23T08:59:05Z lisp174 is now known as commonlisp174 2015-10-23T09:03:20Z commonlisp174: Let xyz be a macro defined using "define-syntax". Let "(xyz)" appear just after that definition, in the same file. 2015-10-23T09:03:55Z commonlisp174: Question: if xyz calls foo, a function defined in that same file, does foo run at runtime, or at compile time? 2015-10-23T09:04:11Z commonlisp174: Here is a working example: https://github.com/arclanguage/anarki/blob/official/ac.scm 2015-10-23T09:05:02Z taylan: commonlisp174: depends on how xyz "calls" foo. does it actually call it, or contain a code template that calls it i.e. merely expand to code that will later call it? 2015-10-23T09:05:30Z taylan: commonlisp174: if you use 'syntax-rules', you cannot call any functions at compile-time. it's pure pattern/template. 2015-10-23T09:06:11Z taylan: the template in the case of 'xdef' in that file is (let ((nm ...)) ...) which is all code that will be executed at run-time. 2015-10-23T09:07:51Z commonlisp174: Here is a complete, short example: https://gist.github.com/anonymous/47ac015425377d0ed5af 2015-10-23T09:08:11Z commonlisp174: Ah 2015-10-23T09:08:20Z commonlisp174: taylan: That was exactly the answer I was seeking. Thank you. 2015-10-23T09:08:37Z commonlisp174: My only other question would be: Is it possible to write a macro that calls arbitrary functions at compile time, in scheme? 2015-10-23T09:08:55Z hzjd quit (Quit: Leaving.) 2015-10-23T09:09:17Z commonlisp174: i.e. Is it possible to write a .scm file that forces anyone who compiles it to execute code of the author's choosing? 2015-10-23T09:10:05Z taylan: commonlisp174: R6RS Scheme standardized a mechanism where you can (define-syntax foo (lambda (syntax-object) ...)) and work with fully free code on 'syntax-object', though typically the 'syntax-case' form is used to work with these objects conveniently. 2015-10-23T09:10:20Z taylan: commonlisp174: this might also not work in some implementations, like Chicken Scheme IIRC 2015-10-23T09:10:26Z commonlisp174: How 'bout Racket? 2015-10-23T09:10:37Z taylan: Racket also has syntax-case, and more 2015-10-23T09:11:09Z commonlisp174: What I mean is, would it be possible to write a .scm file that runs arbitrary code when compiled via racket? 2015-10-23T09:12:00Z taylan: yeah, when the 'foo' macro above in my example is used, that (lambda (syntax-object) ...) will be executed at compile-time 2015-10-23T09:12:21Z commonlisp174: Aha. 2015-10-23T09:13:33Z commonlisp174: The final question would be: Is there any way for a program to compile user-provided .scm files, while somehow protecting itself from malicious users? 2015-10-23T09:13:53Z commonlisp174: For example, a web server that exposes a Scheme repl 2015-10-23T09:14:19Z commonlisp174: or a game engine that runs mods that are created by the community, and wishes to prevent modders from acting maliciously. 2015-10-23T09:15:01Z taylan: commonlisp174: that'll need some sandboxing. IIRC Racket supports it. 2015-10-23T09:15:03Z hzjd joined #scheme 2015-10-23T09:15:12Z taylan: rudybot: eval (let loop () (loop)) 2015-10-23T09:15:16Z commonlisp174: taylan: Indeed, but it would require "compile-time sandboxing" 2015-10-23T09:15:21Z rudybot: taylan: your sandbox is ready 2015-10-23T09:15:31Z rudybot: taylan: error: with-limit: out of time 2015-10-23T09:15:35Z commonlisp174: Bingo 2015-10-23T09:15:39Z taylan: commonlisp174: compile-time and run-time would both be sandboxed 2015-10-23T09:15:40Z commonlisp174: I wonder how it implemented that? 2015-10-23T09:15:49Z commonlisp174: Is rudybot's source available anywhere? 2015-10-23T09:16:06Z taylan: pretty sure it is, but I dunno where or how to ask it 2015-10-23T09:16:10Z taylan: rudybot: where's your source code? 2015-10-23T09:16:10Z rudybot: taylan: your was seen in #emacs forty-seven weeks ago, saying "quit", and then your was seen in #emacs forty-seven weeks ago, saying "bye" 2015-10-23T09:16:16Z taylan: :D 2015-10-23T09:16:18Z commonlisp174: no problem. You've already been extraordinarily helpful! 2015-10-23T09:16:24Z commonlisp174: Hehe. 2015-10-23T09:16:44Z commonlisp174: your of yore. 2015-10-23T09:16:50Z commonlisp174: the legend. 2015-10-23T09:16:58Z commonlisp174: Anyway, thank you for your time, and your insight. I appreciate it!