2015-12-28T00:03:54Z personp quit (Quit: Page closed) 2015-12-28T00:09:35Z davexunit quit (Ping timeout: 255 seconds) 2015-12-28T00:10:09Z personp joined #scheme 2015-12-28T00:15:08Z personp: Hi everyone, I wonder if someone would be able to help me with a short program I wrote 2015-12-28T00:15:25Z personp: http://pastebin.com/hkE2Zhvc 2015-12-28T00:16:46Z personp: So it implements combinatory logic, however the 'combine' function isn't tail-recursive so if you type (S I I (S I I)) you get a stack overflow rather than just never halting 2015-12-28T00:17:14Z personp: I wonder if someone knows how I could change that? :) 2015-12-28T00:26:01Z teurastaja: pjb: i have reentrant longjmp 2015-12-28T00:27:25Z teurastaja: personp: try without syntax-rules 2015-12-28T00:28:33Z personp: teurastaja: You mean the curry macro? 2015-12-28T00:29:02Z teurastaja: personp: you have a lambda already 2015-12-28T00:30:06Z oldskirt quit (Ping timeout: 250 seconds) 2015-12-28T00:30:38Z personp: Combine assumes that the function given to it takes one argument and returns either a constant or another function which takes one argument 2015-12-28T00:30:56Z personp: I made curry a macro so I can define combinators without typing a bunch of lambdas 2015-12-28T00:34:53Z jao joined #scheme 2015-12-28T00:54:20Z personp: I will try again later to get it working, thank you for your suggestions 2015-12-28T00:54:33Z personp left #scheme 2015-12-28T00:57:44Z Regulator_ joined #scheme 2015-12-28T01:00:54Z Regulator9 quit (Ping timeout: 272 seconds) 2015-12-28T01:01:44Z emacsomancer joined #scheme 2015-12-28T01:02:35Z Riastradh joined #scheme 2015-12-28T01:05:09Z teurastaja: does this work?: 2015-12-28T01:06:46Z teurastaja: #define CONS(ls) ((CAR(ls)), (CDR(ls))) 2015-12-28T01:06:50Z physixer: I implemented a range function: (define (my-range n) (if (zero? n) empty (cons n (my-range (sub1 n))))) which produces a list from n down to 1, not (n-1) down to 0. 2015-12-28T01:06:58Z teurastaja: #define CAR(x, y) x 2015-12-28T01:07:11Z teurastaja: #define CDR(x, y) y 2015-12-28T01:07:40Z physixer: For 0 based list I'll have to do (sub1 n) twice, which is less elegant, for 0 up to (n-1) I'll have to "reverse" which is even less elegant. 2015-12-28T01:08:12Z physixer: That means producing a list of numbers "1-based" and "descinding order" is the most natural in lambda calculus. 2015-12-28T01:09:07Z teurastaja: does CONS(ls) expand the right way? 2015-12-28T01:09:43Z physixer: teurastaja: is that lambda calculus in C macros? 2015-12-28T01:10:19Z teurastaja: physixer: not quite but its inspired 2015-12-28T01:10:51Z teurastaja: im just wondering if everything gets expanded 2015-12-28T01:11:19Z teurastaja: you can add #define NULL ((void *)0) 2015-12-28T01:11:24Z physixer: teurastaja: I'm sorry I'm a noob here. 2015-12-28T01:12:21Z teurastaja: physixer: what is the task you want to implement? 2015-12-28T01:13:37Z teurastaja: a list of numbers from n to 1? 2015-12-28T01:16:04Z Riastradh: teurastaja: Not sure exactly what you're trying to accomplish, but neither the C preprocessor nor the C language works in a way that would make that make sense. 2015-12-28T01:16:39Z teurastaja: (define (funky-list n) (iota (- n 1) n -1)) 2015-12-28T01:16:53Z teurastaja: *physixer: (define (funky-list n) (iota (- n 1) n -1)) 2015-12-28T01:17:01Z physixer: teurastaja: I'm learning scheme through HtDP2e and in the 20th chapter the exercise asks me to create my own build-list function. I started out implemented my own range function. 2015-12-28T01:17:22Z teurastaja: from n to 1? 2015-12-28T01:17:47Z physixer: I'm just saying implementing n down to 1 was quick and instant, and that if I want to do 1 -- n, or 0 -- (n-1), I need to do more thinking and my code becomes less elegant. 2015-12-28T01:19:06Z teurastaja: physixer: not sure i understood your problem but i gave you the solution 2015-12-28T01:19:12Z physixer: obviously there is not right answer wrt to the interface. "Should" (range n) output (a) 0 -- (n-1) ... (b) 1 -- n ... (c) (n-1) -- 0 ... (d) n -- 1 .. ??? I don't think there is one right answer. 2015-12-28T01:19:40Z teurastaja: i dont understand your notation 2015-12-28T01:19:45Z physixer: I don't think I have learnt what iota is, yet. 2015-12-28T01:19:47Z teurastaja: what is --? 2015-12-28T01:19:54Z Regulator9 joined #scheme 2015-12-28T01:20:21Z teurastaja: physixer: srfi-1 2015-12-28T01:20:26Z physixer: 0 -- (n-1) means 0, 1, 2, ..., n-1 (it's just a sequence) 2015-12-28T01:20:53Z teurastaja: oh! 2015-12-28T01:21:00Z physixer: (a) (b) (c) (d) are not code, they're just multiple choice labels. 2015-12-28T01:21:48Z Regulator_ quit (Ping timeout: 272 seconds) 2015-12-28T01:22:01Z teurastaja: then: (define (funky n) (iota n)) 2015-12-28T01:22:22Z teurastaja: you could even do this: (define funky iota) 2015-12-28T01:22:23Z physixer: what is iota? 2015-12-28T01:22:29Z pierpa: why all this verbosity? (define funky iota) 2015-12-28T01:23:13Z Riastradh: teurastaja: You could also just walk to a restaurant and buy the pre-caught, pre-cooked fish, and not have to worry about learning to fish or light a fire! 2015-12-28T01:23:14Z pierpa: iota is the traditional name of your function my-range 2015-12-28T01:23:25Z teurastaja: http://srfi.schemers.org/srfi-1/srfi-1.html#iota 2015-12-28T01:23:32Z physixer: pierpa: in some sense verbosity is needed for me because the (goshdarn) BSL mode for DrRacket doesn't support func aliasing using (define funky iota). Can you believe it/ 2015-12-28T01:23:42Z jcowan joined #scheme 2015-12-28T01:23:50Z pierpa: aha! didn't knew 2015-12-28T01:23:59Z jcowan: ho hey 2015-12-28T01:24:05Z pierpa: hello 2015-12-28T01:24:14Z physixer: well then iota is kinda useless to me. I'm really implementing "my-iota" 2015-12-28T01:24:15Z teurastaja: Riastradh: he wanted the shortest answer: (define funky iota) 2015-12-28T01:24:55Z jcowan: physixer: What's the difference? 2015-12-28T01:25:15Z physixer: jcowan: I'm learning scheme. 2015-12-28T01:25:34Z jcowan: Right, but what is my-iota intended to do? 2015-12-28T01:25:52Z physixer: jcowan: so I can learn how I can implement my own iota 2015-12-28T01:26:10Z jcowan: AH. 2015-12-28T01:26:43Z physixer: I'm on 20th chapter of HtDP2e 2015-12-28T01:27:18Z jcowan nods 2015-12-28T01:32:05Z Pixel_Outlaw joined #scheme 2015-12-28T01:37:16Z Pixel_Outlaw quit (Quit: Leaving) 2015-12-28T01:37:59Z teurastaja: physixer: (define (funky n) (unfold zero? (lambda (x) x) (lambda (x) (- x 1)) (- n 1))) 2015-12-28T01:38:16Z Pixel_Outlaw joined #scheme 2015-12-28T01:40:27Z Pixel_Outlaw quit (Client Quit) 2015-12-28T01:43:20Z Riastradh quit (Ping timeout: 250 seconds) 2015-12-28T01:45:35Z physixer: teurastaja: zero? should be (zero? ? 2015-12-28T01:45:51Z pjb: nope, it's the stop predicate. 2015-12-28T01:46:06Z physixer: k 2015-12-28T01:46:10Z pjb: (unfold stop? generate step initial) 2015-12-28T01:46:30Z physixer: yeah I haven't learned unfold yet 2015-12-28T01:47:50Z pjb: Neither did I. (define (unfold stop? generate step initial) (let loop ((value initial) (result '())) (if (stop? value) (reverse result) (loop (step value) (cons (generate value) result))))) 2015-12-28T01:47:56Z physixer: I implemented the "0 -- (n-1)" my-range (my-iota) using my-reverse of my-range-2. Also my-reverse had an internal my-reverse-2, so four functions. 2015-12-28T01:48:18Z physixer: (define (my-range n) (my-reverse (my-range-2 n))) 2015-12-28T01:48:36Z physixer: (define (my-reverse L) (my-reverse-2 L empty)) 2015-12-28T01:48:45Z physixer: (define (my-reverse-2 L M) 2015-12-28T01:48:45Z physixer: (if (empty? L) 2015-12-28T01:48:45Z physixer: M 2015-12-28T01:48:45Z physixer: (my-reverse-2 (cdr L) (cons (car L) M)) 2015-12-28T01:48:46Z physixer: )) 2015-12-28T01:49:08Z pjb: We can do without reverse in my unfold… 2015-12-28T01:49:14Z Regulator_ joined #scheme 2015-12-28T01:50:03Z physixer: I guess I'll learn unfold in upcoming chapters. 2015-12-28T01:50:35Z pjb: physixer: (define (myreverse l) (unfold null? car cdr l)) with: (define (unfold stop? generate step initial) (let loop ((value initial) (result '())) (if (stop? value) result (loop (step value) (cons(generate value) result))))) 2015-12-28T01:50:50Z kiasaki joined #scheme 2015-12-28T01:52:07Z physixer: well it has loop, which would need my-loop 2015-12-28T01:52:12Z Regulator9 quit (Ping timeout: 272 seconds) 2015-12-28T01:52:39Z pjb: It's a named let. 2015-12-28T01:52:56Z physixer: But of course, we have to decide how primitive we're willing to be. 2015-12-28T02:10:47Z aap_ joined #scheme 2015-12-28T02:12:48Z teurastaja quit (Ping timeout: 250 seconds) 2015-12-28T02:14:35Z aap quit (Ping timeout: 264 seconds) 2015-12-28T02:15:52Z magine joined #scheme 2015-12-28T02:16:29Z teurastaja joined #scheme 2015-12-28T02:18:19Z githogori quit (Remote host closed the connection) 2015-12-28T02:18:25Z teurastaja: physixer: you familiar with do loops? 2015-12-28T02:26:01Z physixer: well I know do loops and I know loop is a construct that does that in scheme, but I also know loop is not primitive to lambda calculus. 2015-12-28T02:31:17Z cemerick joined #scheme 2015-12-28T02:31:33Z kiasaki quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2015-12-28T02:34:54Z dpk: physixer: that's strange, but (define (funky . args) (apply iota args)) should have the same effect 2015-12-28T02:35:13Z dpk: oh, you're learning-exercise-ing. never mind then 2015-12-28T02:35:44Z teurastaja: dpk: (define funky iota) 2015-12-28T02:36:04Z dpk: that's what i said it should have the same effect as 2015-12-28T02:36:14Z dpk: apparently physixer has found a Scheme dialect in which this does not work 2015-12-28T02:37:04Z jao quit (Ping timeout: 250 seconds) 2015-12-28T02:39:20Z teurastaja: dpk: one that is not lexically scoped? 2015-12-28T02:39:38Z teurastaja: common lisp perhaps 2015-12-28T02:45:49Z dpk: lexical scope should have no effect on that 2015-12-28T02:46:04Z dpk: it might have separate function and value namespaces, like CL 2015-12-28T02:46:15Z dpk: in which case (define (funky . args) (apply iota args)) is unlikely to work either 2015-12-28T02:46:46Z oleo__ joined #scheme 2015-12-28T02:47:39Z teurastaja: dpk: anyways what he uses is not a scheme 2015-12-28T02:49:23Z oleo_ quit (Ping timeout: 260 seconds) 2015-12-28T02:52:09Z dpk: who is to say what is and is not a Scheme? 2015-12-28T02:55:27Z teurastaja: r5rs, r7rs 2015-12-28T02:55:54Z teurastaja: for instance, racket is not scheme 2015-12-28T02:56:27Z dpk: that definition excludes hundreds, probably thousands of toy Scheme interpreters, not to mention the Scheme described in Sussman and Steele's original Lambda Papers 2015-12-28T02:56:57Z botter joined #scheme 2015-12-28T02:56:58Z dpk: plus implementations which are "nearly RnRs compatible" but omit some feature like full continuations … 2015-12-28T02:57:00Z spew joined #scheme 2015-12-28T02:57:31Z botter: Hi 2015-12-28T02:57:53Z botter: In this part of SICP: https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-11.html#%_sec_1.2.2 if you ctrl+f "we can easily translate this" 2015-12-28T02:58:02Z botter: the example that follows uses a cond statement with an or-else 2015-12-28T02:58:05Z botter: and one without an or-else 2015-12-28T02:58:14Z botter: that functions the same way... whats the difference between the two? 2015-12-28T02:59:30Z dpk: if a cond without an else clause runs out, the Scheme interpreter will set your house on fire 2015-12-28T02:59:50Z dpk: or some other unspecified behaviour 2015-12-28T03:00:25Z botter: what 2015-12-28T03:00:34Z botter: oh 2015-12-28T03:01:13Z dpk: if it is guaranteed that the cond will not run out of conditions, as in this code where it is impossible for first-denomination to be called with any value of kinds-of-coins other than 1, 2, 3, 4, or 5, you can just omit the else section/ 2015-12-28T03:01:29Z botter: What about the 'or'? 2015-12-28T03:01:39Z botter: Why is it needed? Isn't the or implicit? 2015-12-28T03:01:47Z dpk: implicit in what? 2015-12-28T03:02:02Z botter: Cond (first conditional) (second conditional) 2015-12-28T03:02:10Z dpk: oh, i see 2015-12-28T03:02:11Z botter: Cond (first conditional) or (second conditional) 2015-12-28T03:02:16Z botter: You don't need the or 2015-12-28T03:02:21Z physixer: botter: not relevant to your question but I'm learning scheme through HtDP2e, do you know any comparisons/contrasts b/w SICP and HtDP2e? 2015-12-28T03:02:21Z botter: its implicit even without it 2015-12-28T03:02:43Z dpk: yes, that code could be written as 2015-12-28T03:02:44Z dpk: ((< amount 0) 0) 2015-12-28T03:02:45Z dpk: ((= kinds-of-coins 0) 0) 2015-12-28T03:02:57Z dpk: but this way you save a line of code, and avoid repeating a constant 2015-12-28T03:03:19Z botter: physixer: I haven't gone through HtDP but its my understanding that Scheme has a steeper curve, which is why I chose it 2015-12-28T03:03:26Z botter: that SICP* has a steeper curve 2015-12-28T03:03:27Z botter: sorry 2015-12-28T03:04:08Z physixer: dpk: I'm using a "partially introduced" scheme in HtDP2e called BSL (beginner scheme language). It's a mode in DrRacket. 2015-12-28T03:04:34Z Regulator9 joined #scheme 2015-12-28T03:06:15Z botter: physixer: If you have no prior programming experience then sicp is a bit rough 2015-12-28T03:07:59Z botter: dpk: The method isn't tail recursive, right? Because of the + ? 2015-12-28T03:08:14Z botter: The + in the else statement 2015-12-28T03:08:18Z physixer: Apparently the powers that be at HtDP2e authorship headquarters that the 3-rule lambda calculus (variables, function definition, and function application) is so hard for mere mortals coming from imperative background with "easy" concepts like pointers, memory allocation, bit-manipulation, RISC, CISC, (to name a few) that they have neuter scheme at 3 or 4 layers and introduce them bit by bit. 2015-12-28T03:08:32Z dpk: no, it is not tail recursive 2015-12-28T03:08:50Z Regulator_ quit (Ping timeout: 272 seconds) 2015-12-28T03:09:41Z botter: Converting non tail recursive methods to tail recursive ones isn't as easy as it should be :( 2015-12-28T03:10:41Z physixer: botter: well I do have programming experience, and HtDP2e is the worst book if you have it. 2015-12-28T03:10:58Z botter: I do not :) 2015-12-28T03:11:50Z physixer: botter: so I guess if you're not having issues with SICP, fine, otherwise you can try HtDP2e first. Maybe I should drop HtDP2e and start SICP. 2015-12-28T03:18:40Z pierpa quit (Ping timeout: 250 seconds) 2015-12-28T03:18:43Z wildlander quit (Quit: Saliendo) 2015-12-28T03:26:34Z Regulator9 quit (Ping timeout: 272 seconds) 2015-12-28T03:28:56Z cemerick quit (Ping timeout: 256 seconds) 2015-12-28T03:29:16Z Regulator9 joined #scheme 2015-12-28T03:37:24Z ArneBab joined #scheme 2015-12-28T03:38:32Z spew quit (Read error: Connection reset by peer) 2015-12-28T03:40:26Z ArneBab_ quit (Ping timeout: 246 seconds) 2015-12-28T03:47:04Z teurastaja quit (Quit: ChatZilla 0.9.92 [SeaMonkey 2.33.1/20150321194901]) 2015-12-28T04:39:42Z jcowan quit (Quit: Leaving) 2015-12-28T04:45:08Z snits quit (Remote host closed the connection) 2015-12-28T04:53:20Z Regulator9 quit (Ping timeout: 272 seconds) 2015-12-28T04:54:48Z Regulator9 joined #scheme 2015-12-28T05:09:40Z Regulator_ joined #scheme 2015-12-28T05:12:20Z Regulator9 quit (Ping timeout: 272 seconds) 2015-12-28T05:19:48Z githogori joined #scheme 2015-12-28T05:37:35Z snits joined #scheme 2015-12-28T05:43:11Z Regulator9 joined #scheme 2015-12-28T05:45:16Z Regulator_ quit (Ping timeout: 272 seconds) 2015-12-28T05:49:26Z Regulator_ joined #scheme 2015-12-28T05:51:36Z Regulator9 quit (Ping timeout: 272 seconds) 2015-12-28T07:04:23Z cmatei quit (Ping timeout: 276 seconds) 2015-12-28T07:04:45Z cmatei joined #scheme 2015-12-28T07:08:03Z Regulator9 joined #scheme 2015-12-28T07:10:46Z Regulator_ quit (Ping timeout: 272 seconds) 2015-12-28T07:12:42Z mmc joined #scheme 2015-12-28T07:27:35Z daviid` quit (Ping timeout: 246 seconds) 2015-12-28T07:30:42Z emacsomancer quit (Read error: Connection reset by peer) 2015-12-28T07:36:51Z physixer quit (Ping timeout: 265 seconds) 2015-12-28T07:40:30Z jakk joined #scheme 2015-12-28T07:42:26Z GGMethos quit (Ping timeout: 240 seconds) 2015-12-28T07:43:24Z jyc quit (Ping timeout: 264 seconds) 2015-12-28T07:51:51Z nilg joined #scheme 2015-12-28T08:01:33Z jyc joined #scheme 2015-12-28T08:03:05Z GGMethos joined #scheme 2015-12-28T08:10:10Z Menche quit (Remote host closed the connection) 2015-12-28T08:11:53Z Menche joined #scheme 2015-12-28T08:20:53Z Regulator_ joined #scheme 2015-12-28T08:21:04Z Regulator9 quit (Ping timeout: 272 seconds) 2015-12-28T08:21:24Z aap_ is now known as aap 2015-12-28T08:22:02Z mumptai joined #scheme 2015-12-28T08:31:09Z mbuf joined #scheme 2015-12-28T08:45:34Z nilg quit (Read error: Connection reset by peer) 2015-12-28T08:55:27Z lambda-11235 quit (Quit: Bye) 2015-12-28T09:02:48Z nilg joined #scheme 2015-12-28T09:08:20Z ggole joined #scheme 2015-12-28T09:43:19Z agumonkey quit (Ping timeout: 260 seconds) 2015-12-28T09:57:51Z tmtwd joined #scheme 2015-12-28T10:18:23Z seg quit (Quit: kuwabara kuwabara) 2015-12-28T10:20:25Z seg joined #scheme 2015-12-28T10:23:57Z botter quit (Quit: Page closed) 2015-12-28T10:42:14Z tmtwd quit (Ping timeout: 245 seconds) 2015-12-28T11:10:29Z nilg quit (Remote host closed the connection) 2015-12-28T11:11:34Z seg quit (Quit: kuwabara kuwabara) 2015-12-28T11:16:07Z oleo__ quit (Quit: Verlassend) 2015-12-28T11:16:42Z seg joined #scheme 2015-12-28T11:29:16Z cemerick joined #scheme 2015-12-28T11:35:28Z micmus joined #scheme 2015-12-28T11:35:44Z oleo joined #scheme 2015-12-28T11:35:44Z oleo quit (Changing host) 2015-12-28T11:35:44Z oleo joined #scheme 2015-12-28T11:38:07Z Regulator9 joined #scheme 2015-12-28T11:40:34Z Regulator_ quit (Ping timeout: 272 seconds) 2015-12-28T11:46:34Z seg quit (Quit: kuwabara kuwabara) 2015-12-28T11:47:03Z seg joined #scheme 2015-12-28T11:47:33Z jakk quit (Ping timeout: 255 seconds) 2015-12-28T11:50:16Z jakk joined #scheme 2015-12-28T12:15:10Z magine quit (Remote host closed the connection) 2015-12-28T12:22:05Z hiroakip joined #scheme 2015-12-28T12:23:24Z Regulator_ joined #scheme 2015-12-28T12:26:25Z mbuf quit (Quit: Ex-Chat) 2015-12-28T12:26:28Z newbie|2 joined #scheme 2015-12-28T12:26:48Z Regulator9 quit (Ping timeout: 272 seconds) 2015-12-28T12:28:35Z cemerick quit (Ping timeout: 240 seconds) 2015-12-28T12:29:20Z Regulator_ quit (Ping timeout: 272 seconds) 2015-12-28T12:30:48Z sz0 joined #scheme 2015-12-28T12:45:18Z xwl joined #scheme 2015-12-28T12:49:29Z delicado joined #scheme 2015-12-28T12:54:18Z delicado: hello guys, can anyone translate this scheme function to any C'ish programming language please? http://codepad.org/ObxQKUJb. i looked at the Scheme documentation, but it seems i need to learn more about scheme, to understand what this function does, can anyone help me translate this to any C like programming language? 2015-12-28T12:54:49Z wasamasa: holy shit 2015-12-28T12:54:59Z wasamasa: this is not particularly functional 2015-12-28T12:56:00Z delicado: that function came from the app-inventor source. 2015-12-28T12:56:11Z wasamasa: well, the only screwy part about this to understand is the "do" construct 2015-12-28T12:56:29Z delicado: i have not a bit of idea how it does the "text-obsfucate" 2015-12-28T12:56:36Z wasamasa: the rest is easy 2015-12-28T12:57:13Z wasamasa: string-ref is foo[n], string-append is strstr, bitwise-and is &, ... 2015-12-28T12:57:54Z delicado: thanks, wasamasa, what about the return? does it return something? 2015-12-28T12:58:52Z wasamasa: it should return line 8, but better consult the r5rs pdf on "do" 2015-12-28T12:59:26Z wasamasa: http://www.schemers.org/Documents/Standards/R5RS/HTML/ 2015-12-28T13:00:31Z delicado: thanks, is 'do' not an operator in scheme? like do standard operation like a loop? 2015-12-28T13:00:46Z wasamasa: it is a rather unusual looping construct 2015-12-28T13:01:19Z wasamasa: the recommended way to do iteration is with tail recursion 2015-12-28T13:01:40Z wasamasa: but some people feel it isn't particularly readable for more complex code, so they use "do" instead 2015-12-28T13:02:22Z wasamasa: I'd recommend grabbing any scheme repl and testing out bits of the code to understand and verify how it works 2015-12-28T13:03:07Z delicado: i see, thank you. 2015-12-28T13:04:38Z wasamasa: also, strstr is wrong, it would be strcat (or + in other languages) 2015-12-28T13:05:35Z xwl quit (Remote host closed the connection) 2015-12-28T13:07:21Z delicado: hmm, what about this code (- len i) at line 10, what does it do? 2015-12-28T13:08:43Z wasamasa: that returns len - i 2015-12-28T13:08:44Z delicado: i also see (+ 1 i) at line 5, it's weird for me knowing only C like languages and lua 2015-12-28T13:08:54Z wasamasa: and that 1 + i 2015-12-28T13:09:20Z jackdaniel: delicado: lisps have prefix notation, when you see (symbol arg1 arg2...) it means symbol(arg1, arg2, ...) - more or less 2015-12-28T13:09:30Z delicado: ohh, so the operator starts first? i see now 2015-12-28T13:10:11Z wasamasa: yes, it spares you to look up operator precedence 2015-12-28T13:10:14Z jackdaniel: it's convenient, because basically you work on the AST trees (I'm afk) 2015-12-28T13:10:28Z wasamasa: also, + is just another function :> 2015-12-28T13:12:51Z delicado: i see thanks guys, can this code run in an interpreter? i mean does the code only uses standard scheme stuff? i want to test this out, put console output so i can see how the text is transformed etc 2015-12-28T13:14:13Z hiroakip quit (Ping timeout: 265 seconds) 2015-12-28T13:14:56Z wasamasa: this looks fairly ok 2015-12-28T13:15:43Z wasamasa: perhaps the bitwise operators 2015-12-28T13:16:11Z delicado: what's the boilerplate for a runnable scheme, like main() in C.. 2015-12-28T13:16:11Z wasamasa: they haven't been included in the standard, but pretty much any implementation defines them 2015-12-28T13:16:29Z ggole: + being a function is nice, but doesn't really have anything to do with syntax 2015-12-28T13:16:34Z wasamasa: CHICKEN for example doesn't have bitwise-arithmetic-shift-left/bitwise-arithmetic-shift-right 2015-12-28T13:18:39Z wasamasa: there is no such thing as main() 2015-12-28T13:18:54Z wasamasa: you can of course (define (main) ...) and later (main), but that's up to you 2015-12-28T13:20:52Z delicado quit (Quit: Page closed) 2015-12-28T13:27:27Z oldskirt joined #scheme 2015-12-28T13:55:29Z xwl joined #scheme 2015-12-28T13:57:50Z Riastradh joined #scheme 2015-12-28T14:00:45Z Regulator9 joined #scheme 2015-12-28T14:01:10Z newbie|2 quit (Ping timeout: 272 seconds) 2015-12-28T14:03:43Z cdidd_ quit (Ping timeout: 260 seconds) 2015-12-28T14:06:02Z magine joined #scheme 2015-12-28T14:09:13Z pierpa joined #scheme 2015-12-28T14:09:34Z cdidd joined #scheme 2015-12-28T14:10:15Z magine quit (Ping timeout: 240 seconds) 2015-12-28T14:11:49Z cmatei quit (Ping timeout: 245 seconds) 2015-12-28T14:12:14Z cmatei joined #scheme 2015-12-28T14:14:38Z wasamasa quit (Ping timeout: 246 seconds) 2015-12-28T14:16:38Z oldskirt quit (Ping timeout: 276 seconds) 2015-12-28T14:19:55Z wasamasa joined #scheme 2015-12-28T14:19:55Z wasamasa quit (Changing host) 2015-12-28T14:19:55Z wasamasa joined #scheme 2015-12-28T14:24:23Z magine joined #scheme 2015-12-28T14:24:37Z davexunit joined #scheme 2015-12-28T14:36:54Z badkins joined #scheme 2015-12-28T14:46:43Z daviid joined #scheme 2015-12-28T14:54:45Z mmc quit (Quit: Leaving.) 2015-12-28T15:34:56Z magine quit (Remote host closed the connection) 2015-12-28T15:44:35Z spew joined #scheme 2015-12-28T15:46:14Z magine joined #scheme 2015-12-28T15:47:41Z zeroish joined #scheme 2015-12-28T15:49:36Z jcowan joined #scheme 2015-12-28T15:54:00Z jcowan: hey ho 2015-12-28T15:54:27Z davexunit: let's go 2015-12-28T15:56:25Z Beluki joined #scheme 2015-12-28T15:57:58Z C-Keen: wasamasa: but arithmetic-shift with a directional argument 2015-12-28T15:59:57Z turbopape joined #scheme 2015-12-28T16:00:58Z wasamasa: there you go 2015-12-28T16:02:25Z developernotes joined #scheme 2015-12-28T16:06:50Z magine quit (Remote host closed the connection) 2015-12-28T16:22:03Z _sjs quit (Ping timeout: 255 seconds) 2015-12-28T16:26:43Z _sjs joined #scheme 2015-12-28T16:26:58Z kogan joined #scheme 2015-12-28T16:28:15Z Riastradh quit (Ping timeout: 240 seconds) 2015-12-28T16:30:36Z jcowan_ joined #scheme 2015-12-28T16:31:41Z oldskirt joined #scheme 2015-12-28T16:31:50Z _sjs quit (Ping timeout: 246 seconds) 2015-12-28T16:34:26Z jcowan quit (Ping timeout: 272 seconds) 2015-12-28T16:36:26Z oldskirt quit (Ping timeout: 250 seconds) 2015-12-28T16:37:46Z micmus quit (Ping timeout: 240 seconds) 2015-12-28T16:43:28Z physixer joined #scheme 2015-12-28T16:43:36Z kogan left #scheme 2015-12-28T16:44:20Z physixer: boxes (instead of parentheses) make so much sense (just for viewing purposes). Why aren't boxes popular? something to do with editors not capable enough? 2015-12-28T16:52:59Z badkins quit (Read error: Connection reset by peer) 2015-12-28T16:55:56Z turbopape quit (Quit: Quitte) 2015-12-28T16:58:08Z jcowan_ is now known as jcowan 2015-12-28T16:58:18Z jcowan: physixer: What kind of boxes? 2015-12-28T16:58:30Z wasamasa: physixer: I recall such a thing 2015-12-28T17:01:22Z C-Keen: [] ? 2015-12-28T17:01:30Z C-Keen: [fragile] 2015-12-28T17:02:03Z jcowan: Or do you mean the pairs of boxes used with arrows to represent pair objects? 2015-12-28T17:02:05Z physixer: no not a square-bracket box. A whole rectangle for every pair of parenthesis. 2015-12-28T17:02:29Z C-Keen: oh when printing pairs and such? 2015-12-28T17:02:32Z jcowan: Oh. Well, it takes up a lot of vertical screen real estate. 2015-12-28T17:02:49Z physixer: editor's fault 2015-12-28T17:02:50Z C-Keen: the dot notation is more tense I guess 2015-12-28T17:03:00Z C-Keen: and works on all terminals 2015-12-28T17:03:10Z jcowan: It's quite common for a procedure definition to wind up with )))))))))), which would imply 10 levels of nested boxes. 2015-12-28T17:03:28Z physixer: C-Keen: I haven't seen the dot notation 2015-12-28T17:03:53Z C-Keen: physixer: for pairs 2015-12-28T17:03:58Z C-Keen: physixer: ( a . b ) 2015-12-28T17:04:21Z physixer: jcowan: but for pair isn't (a b) already brief? 2015-12-28T17:04:34Z physixer: sorry for C-Keen 2015-12-28T17:04:49Z jcowan: (a b) is two pairs, not one 2015-12-28T17:04:56Z jcowan: (a . (b . ())) 2015-12-28T17:05:07Z jcowan: where () is a unique, non-pair object 2015-12-28T17:05:28Z physixer: jcowan: 10 boxes shouldn't be a problem. 2015-12-28T17:06:18Z jcowan: If you only want to look at one function on a page, no. But I don't see that it adds clarity. Lisp coders determine structure the same way anyone else does, by looking at indentation, not by counting parens. 2015-12-28T17:06:35Z jcowan: (There have been repeated attempts to make a paren-friendly lexical syntax, but they have never caught on.) 2015-12-28T17:06:51Z jcowan: s/paren-friendly/mostly paren-free 2015-12-28T17:06:53Z jcowan: brain fart 2015-12-28T17:07:03Z C-Keen: parent-friendly 2015-12-28T17:09:56Z physixer: if it helps to see where I'm coming from, I also have a proposal for C editors to show if-elseif-else as three boxes next to each other horizontally 2015-12-28T17:10:47Z physixer: like in a flowchart (more or less) 2015-12-28T17:11:08Z jcowan: That would work only if you had an easy way of horizontal scrolling, which most people don't 2015-12-28T17:11:31Z _sjs joined #scheme 2015-12-28T17:12:25Z Pixel_Outlaw joined #scheme 2015-12-28T17:12:32Z Pixel_Outlaw: in #scheme 2015-12-28T17:12:57Z C-Keen: #t 2015-12-28T17:13:44Z Pixel_Outlaw: Odd, I tried to join #scheme and my client posted that into the chat as me I think. Should have used erc in emacs. 2015-12-28T17:15:04Z jcowan: Probably the "/jo" fell off and the rest was posted, not being recognized as an IRC command. 2015-12-28T17:15:18Z C-Keen: the front fell off 2015-12-28T17:15:52Z Pixel_Outlaw: Oh! Hehe you're probably right. I've not had my coffee yet and am on autopilot at the keybort. 2015-12-28T17:20:08Z Pixel_Outlaw: Anyone doing anything interesting in scheme today? 2015-12-28T17:20:43Z jcowan stands on his head, and hopes that is sufficiently interesting 2015-12-28T17:21:00Z Pixel_Outlaw: Don't mash your wizard fez. 2015-12-28T17:21:17Z davexunit: Pixel_Outlaw: I'm playing around with games written in Scheme https://media.dthompson.us/u/davexunit/m/sly-bullet-hell-sneak-peek/ 2015-12-28T17:21:30Z Pixel_Outlaw: And that would be right up my alley. 2015-12-28T17:22:04Z davexunit: in particular trying to handle many moving objects on screen 2015-12-28T17:22:48Z Pixel_Outlaw: Scheme would probably be great for scripting games since you can store actual behavior more easily than many statically typed languages. 2015-12-28T17:23:16Z Pixel_Outlaw: You can store the functions and arguments themselves rather than resorting to polymorphism to trick a compiler into storing a list of unlike things. 2015-12-28T17:25:08Z Pixel_Outlaw: davexunit, have you considered describing shot patterns by interpolation from one burst to another over n frames? If you consider that each "burst" is n bullets created in a circle subdivided by smaller angles. 2015-12-28T17:26:03Z davexunit: Pixel_Outlaw: I use a more general approach 2015-12-28T17:27:35Z davexunit: bullet patterns are just functions 2015-12-28T17:27:49Z davexunit: that can run over the course of many frames 2015-12-28T17:28:13Z Pixel_Outlaw: ah so they are a bit like streams then where you keep trying to pull the next piece of daa? 2015-12-28T17:28:18Z Pixel_Outlaw: *data 2015-12-28T17:28:27Z davexunit: yeah, somewhat 2015-12-28T17:28:29Z Pixel_Outlaw: well, execute the next piece of data 2015-12-28T17:28:30Z davexunit: I use coroutines 2015-12-28T17:28:57Z davexunit: via delimited continuations 2015-12-28T17:28:58Z mmc joined #scheme 2015-12-28T17:29:20Z davexunit: a bullet emitter can "yield" bullets to the game world and pause itself until the next frame 2015-12-28T17:29:22Z Pixel_Outlaw: How does it "feel" making a shmup in scheme? I assume it feels more flexible than many of the popular gamedev languages. 2015-12-28T17:29:35Z davexunit: it feels good 2015-12-28T17:29:40Z davexunit: there's much work to do, though. 2015-12-28T17:29:40Z mbuf joined #scheme 2015-12-28T17:30:29Z mbuf_ joined #scheme 2015-12-28T17:30:29Z Pixel_Outlaw: Well I suppose the nice thing is that you can easily add functionality to your game later. 2015-12-28T17:30:50Z Pixel_Outlaw: You can have functions that simply load new patterns and levels in the language of the game itself. 2015-12-28T17:31:12Z davexunit: the REPL is by far the biggest win 2015-12-28T17:31:21Z davexunit: I develop games incremently, while they run. 2015-12-28T17:31:34Z Pixel_Outlaw: I can totally see that. 2015-12-28T17:32:04Z davexunit: here's an old blog post of mine that shows the live coding stuff: https://dthompson.us/functional-reactive-programming-in-scheme-with-guile-2d.html 2015-12-28T17:32:05Z rudybot: http://teensy.info/SmznLLBytH 2015-12-28T17:32:11Z Pixel_Outlaw: I've been using Python for games with Pygame because C++ just seems to fight dynamic programming which is what I got a taste for after Common Lisp and then Scheme. 2015-12-28T17:32:13Z mbuf_ quit (Client Quit) 2015-12-28T17:32:27Z Pixel_Outlaw: I'll have to take a look at Guile. 2015-12-28T17:32:31Z davexunit: I used to use pygame and pyglet and that was fun 2015-12-28T17:32:35Z mbuf quit (Client Quit) 2015-12-28T17:33:19Z davexunit: what I intend to improve on from those is to enable functional programming and eliminate callback hell. 2015-12-28T17:33:59Z lambda-11235 joined #scheme 2015-12-28T17:33:59Z Pixel_Outlaw: Are you using classes/structs? 2015-12-28T17:34:19Z davexunit: I don't use OOP, if that's what you mean. 2015-12-28T17:34:34Z davexunit: I use SRFI-9 record types a ton, though. 2015-12-28T17:34:39Z Pixel_Outlaw: I was just using closures when I needed such functionality in Scheme. 2015-12-28T17:35:04Z Pixel_Outlaw: It was kind of messy but got the job done OK. 2015-12-28T17:35:28Z jcowan: Closures are poor man's objects, but then again, objects are poor man's closures. 2015-12-28T17:35:55Z Pixel_Outlaw: Probably better if I wrote some sort of macro to generate closures. 2015-12-28T17:36:23Z Pixel_Outlaw: Probably a very verbose macro if I did that. 2015-12-28T17:37:13Z davexunit: you mean lambda? 2015-12-28T17:37:19Z jcowan: The good part about closures is that they respond to any protocol you want. The bad part is that they respond to any protocol your coworker wants. 2015-12-28T17:37:35Z badkins joined #scheme 2015-12-28T17:37:51Z Pixel_Outlaw: davexunit, the whole let/lambda thing yes. 2015-12-28T17:38:12Z davexunit: Pixel_Outlaw: Scheme has real data types, btw. you don't have to make everything from lambda and cons cells. 2015-12-28T17:38:42Z davexunit: SRFI-9 record types are the standard way of creating new compound data types in Scheme. 2015-12-28T17:39:43Z Pixel_Outlaw: Oh ok. I've only toyed around with the base language in r5rs. 2015-12-28T17:40:12Z davexunit: Guile even has a full OOP system resembling CLOS 2015-12-28T17:40:16Z jcowan: Procedures can't be inspected. 2015-12-28T17:40:36Z Pixel_Outlaw: I think I'd hesitate to learn an implementation specific standard. 2015-12-28T17:40:47Z jcowan: Which is theoretically advantageous but annoying for debugging. In principle some Schemes could provide inspectors for them, but I don't know of any. 2015-12-28T17:40:51Z jcowan: Pixel_Outlaw: There is no avoiding it. 2015-12-28T17:41:14Z davexunit: ah, the old Scheme confusion. 2015-12-28T17:41:24Z davexunit: Scheme is a family of closely related, but different, languages. 2015-12-28T17:41:29Z sethalves joined #scheme 2015-12-28T17:41:31Z jcowan: "Learning Scheme" is like learning "a Romance language": there are many things in common, but at some point you have to decide whether you are going to learn French or Portuguese. 2015-12-28T17:41:44Z davexunit: heh, that's a nice analogy. 2015-12-28T17:43:06Z jcowan: The standards express common factors and so do the SRFIs, and portable code is certainly possible with caution, but at present Scheme portability is mostly about portability *of* individual Scheme implementations, not portability *between* implementations. 2015-12-28T17:43:16Z Pixel_Outlaw: I'm aware. It is why I never really went beyond the r5rs spec. 2015-12-28T17:43:38Z Pixel_Outlaw: I just wanted to write code that would mostly work everywhere. 2015-12-28T17:43:49Z jcowan: I personally write, wherever possible, oto the R7RS spec, and provide backward compat shims as needed. 2015-12-28T17:46:43Z physixer: has anyone heard of 'generative recursion'? 2015-12-28T17:48:14Z jcowan: It sounds like a pretty vague term to me 2015-12-28T17:48:56Z jcowan: or rather, a vague distinction: is a subvector "part of" the vector it was created from, or not? 2015-12-28T17:49:32Z physixer: thanks for enforcing my guess that it's bs term invented by HtDP2e authors because apparently they're so smart they're supposed to invent their own programming concepts. 2015-12-28T17:49:58Z cojy: haha davexunit i remember when i suggested you use continuations 2015-12-28T17:51:25Z jcowan: Well, structural recursion is a sensible idea, because it can be shown to terminate (you can't rip compound structures into pieces without eventually reaching an atom), so you can think of generative recursion as an opaque term for "recursion that is not structural". 2015-12-28T17:51:48Z jcowan: Recursion on natural numbers is structural, recursion on rational numbers is not 2015-12-28T17:51:58Z physixer: so if I create a differnt kind of address record type, that has snapchat IDs as well: (define-struct contact [name address phone email facebook instagram snapchat]), apparently I should advertise it as a new programming language construct 2015-12-28T17:52:35Z davexunit: cojy: I do not recall this 2015-12-28T17:52:44Z davexunit: was this years ago? 2015-12-28T17:52:57Z cojy: yea 2015-12-28T17:53:07Z davexunit: I've been going down this path since late 2012 2015-12-28T17:53:08Z cojy: maybe like 3 or 4 2015-12-28T17:53:12Z davexunit: oh wow 2015-12-28T17:53:13Z davexunit: :) 2015-12-28T17:53:27Z cojy: when we wer eon rizon 2015-12-28T17:53:36Z davexunit: I don't remember going to rizon 2015-12-28T17:54:01Z davexunit: the only scheme related channel I was part of back then was #guile here on freenode 2015-12-28T17:54:32Z physixer: I'm working on a new programming paradigm: edgy-oriented-programming. Moto: Always strive for edgyness. 2015-12-28T17:55:57Z delicado joined #scheme 2015-12-28T17:57:45Z jcowan: Scheme is about as un-edgy as you can get 2015-12-28T17:57:55Z jcowan: 57 years old this year 2015-12-28T17:59:13Z spew quit (Quit: leaving) 2015-12-28T17:59:45Z physixer: sorry I'm not criticizing scheme per se. This is my continued frustration with exploring different ideas and finding out many of them are not more than mental masturbation. Biggest case in point is C++. 2015-12-28T18:01:24Z wasamasa: lol 2015-12-28T18:03:14Z delicado: hi guys, how do i specify a character within an string in hexadecimal? in C languages it's "\x0A\x0B\x0C" how to do it in scheme? 2015-12-28T18:03:44Z wasamasa: that works just fine here 2015-12-28T18:04:15Z delicado: wasama: was the answer for me? you mean the syntax is same as C? 2015-12-28T18:05:40Z wasamasa: yes 2015-12-28T18:05:43Z jcowan: delicado: Depends. Technically, all methods for doing so are implementation-dependent. 2015-12-28T18:06:43Z jcowan: In R6RS/R7RS you can use \xnnnn; to get a random Unicode character, but that's not defined in R5RS systems. 2015-12-28T18:06:55Z wasamasa: it works in chicken, racket, guile here 2015-12-28T18:07:18Z magine joined #scheme 2015-12-28T18:09:03Z xwl quit (Remote host closed the connection) 2015-12-28T18:09:24Z delicado: i see, thanks guys, i'm using ypsilon.. sorry i don't really know scheme, i just copy paste an string de-obfuscation code, hoping i can understand it so i could port the algorithm to C++.. right now i don't feel like i'm making a progress, but the algorithm works in scheme 2015-12-28T18:10:12Z cemerick joined #scheme 2015-12-28T18:10:40Z wasamasa: perhaps the closest thing to a standard way is reading in the bytes from a file and sending that to a string port 2015-12-28T18:11:55Z delicado: wasamasa: what's the function to read a binary file to string? 2015-12-28T18:12:26Z magine quit (Ping timeout: 240 seconds) 2015-12-28T18:20:07Z jcowan: Byte sequences aren't strings, so arbitrary bad things will happen to you if you try to treat them as interchangeable. 2015-12-28T18:22:21Z wasamasa: let's pretend nulls aren't a thing 2015-12-28T18:28:55Z Wojciech_K joined #scheme 2015-12-28T18:35:11Z jasom joined #scheme 2015-12-28T18:35:51Z jcowan: Even if we do that, there is the question of the internal encoding of Scheme strings, which you are exposing by doing this scam. 2015-12-28T18:36:25Z jasom: Is there a good book for learning scheme if one already knows common lisp? 2015-12-28T18:38:05Z C-Keen: jasom: if you already know lisp, then read the r7rs spec, it's tiny and readable 2015-12-28T18:38:22Z jasom: C-Keen: sounds good, I'll start there. 2015-12-28T18:38:31Z jcowan: Not that I know of. http://dept-info.labri.u-bordeaux.fr/~strandh/Teaching/Langages-Enchasses/Common/Strandh-Tutorial/diff-scheme.html is a handy page listing major issues. 2015-12-28T18:38:31Z rudybot: http://teensy.info/JIGvfUa3ZN 2015-12-28T18:38:34Z C-Keen: tiny compared to the CLHS 2015-12-28T18:38:37Z jcowan: It's meant to be used the other way round 2015-12-28T18:38:49Z jcowan: (the page, I mean, not R7RS-small) 2015-12-28T18:39:29Z jasom: C-Keen: I've read the entire non-library portion of the CLHS; I found it quite accessible 2015-12-28T18:40:47Z C-Keen: jasom: then you are well prepared 2015-12-28T18:48:12Z bb010g joined #scheme 2015-12-28T18:49:27Z delicado quit (Ping timeout: 252 seconds) 2015-12-28T18:59:58Z spew joined #scheme 2015-12-28T19:04:45Z jcowan: Sussman speaking at Google NYC Jan 7 on flexible systems 2015-12-28T19:05:22Z jcowan: specifically on generic operations 2015-12-28T19:05:24Z jcowan: I'm going 2015-12-28T19:05:26Z davexunit: ooh 2015-12-28T19:05:33Z davexunit: that will surely be great 2015-12-28T19:06:06Z davexunit: I met him in october 2015-12-28T19:06:40Z delicado joined #scheme 2015-12-28T19:06:49Z spew quit (Read error: Connection reset by peer) 2015-12-28T19:07:02Z davexunit: he was full of interesting things to say about AI and free software 2015-12-28T19:09:29Z tmtwd joined #scheme 2015-12-28T19:09:48Z jakk quit (Ping timeout: 264 seconds) 2015-12-28T19:13:36Z oldskirt joined #scheme 2015-12-28T19:14:11Z jakk joined #scheme 2015-12-28T19:14:18Z oldskirt quit (Client Quit) 2015-12-28T19:14:19Z cojy: wow nice davexunit 2015-12-28T19:27:26Z turtleman_ joined #scheme 2015-12-28T19:30:02Z xwl joined #scheme 2015-12-28T19:34:05Z kiasaki joined #scheme 2015-12-28T19:38:00Z kiasaki quit (Read error: Connection reset by peer) 2015-12-28T19:43:46Z Kryo quit (Ping timeout: 246 seconds) 2015-12-28T19:47:07Z taylan quit (Disconnected by services) 2015-12-28T19:47:21Z taylan joined #scheme 2015-12-28T19:50:28Z Kryo joined #scheme 2015-12-28T19:51:22Z taylan quit (Disconnected by services) 2015-12-28T19:51:41Z taylan joined #scheme 2015-12-28T19:53:16Z xwl quit (Read error: Connection reset by peer) 2015-12-28T19:54:21Z xwl joined #scheme 2015-12-28T19:57:37Z ggole quit 2015-12-28T20:10:02Z magine joined #scheme 2015-12-28T20:10:19Z delicado quit (Ping timeout: 252 seconds) 2015-12-28T20:13:02Z tmtwd quit (Ping timeout: 246 seconds) 2015-12-28T20:14:26Z magine quit (Ping timeout: 246 seconds) 2015-12-28T20:15:40Z xwl quit (Remote host closed the connection) 2015-12-28T20:16:27Z altphi joined #scheme 2015-12-28T20:19:02Z xwl joined #scheme 2015-12-28T20:23:40Z Wojciech_K quit (Read error: Connection reset by peer) 2015-12-28T20:44:12Z githogori quit (Read error: Connection reset by peer) 2015-12-28T20:46:11Z githogori joined #scheme 2015-12-28T20:47:37Z Beluki quit (Quit: Beluki) 2015-12-28T20:53:32Z micmus joined #scheme 2015-12-28T21:00:57Z physixer: racket is quite a piece of shit if you ask me. Not only they're influenced by the shitty HtDP2e philosophy, they actually have made it harder to do SICP by not making the installed SICP mode visible in 'Choose Language' in DrRacket. 2015-12-28T21:01:39Z physixer: That combined with the fact that it's maximal scheme and I'm a minimalist and for me, maximal means 'bloat' and 'garbage', I think I'm done with racket the bs. 2015-12-28T21:03:02Z physixer: There's an adage that if you're a crow, be proud of being a crow and don't try to mimick the ways of the swan. 2015-12-28T21:03:53Z physixer: But adding stupid syntax like square brackets, they're trying to mimick the imperative world and moving away from homoiconicity which is list/scheme's strong piont. 2015-12-28T21:04:41Z pierpa: nobody forces ytou to use square brackets 2015-12-28T21:06:14Z badkins quit (Read error: Connection reset by peer) 2015-12-28T21:06:39Z Pixel_Outlaw: Just be one of the cool kids and use Clojure. 2015-12-28T21:07:13Z Pixel_Outlaw: It meshes with Java so you can actually make programs while using an abortion of a Lisp. 2015-12-28T21:07:20Z Pixel_Outlaw: well JVM rather 2015-12-28T21:07:45Z jcowan: Square brackets have been an alternative to round brackets in the Lisp world since at least 1967 2015-12-28T21:07:56Z physixer: Clojure is Racket's little brother, nope. 2015-12-28T21:08:27Z jcowan: If you want truly minimal (and slow), go for TinyScheme. Otherwise, use Chibi. 2015-12-28T21:08:59Z physixer: At the moment I'm considering two options: Chibi (full R7RS-small implementation), and implementing my own R7RS-small in C. 2015-12-28T21:09:01Z jcowan: Anyway, Racket square brackets are purely lexical syntax, nothing to do with imperative vs. non-imperative. 2015-12-28T21:09:19Z Pixel_Outlaw: TinyScheme was OK in Gimp but the speed was awful. Also they offered no per pixel operations with any speed. That Ofnuts guy worships Python and they really only seem to care about Python in Gimp anymore. 2015-12-28T21:09:20Z developernotes quit (Quit: Textual IRC Client: www.textualapp.com) 2015-12-28T21:09:25Z oldskirt joined #scheme 2015-12-28T21:09:52Z jcowan: Well, if you want to do Scheme stuff in 2016, use Chibi; if you are okay waiting until 2017 or so, roll your own. 2015-12-28T21:10:27Z Pixel_Outlaw: I'd like to use it in my C++ games honestly. I'm just a bit spooked about communication between C++ and Lisp as C++ is a landmine of memory management. 2015-12-28T21:10:32Z nowhere_man quit (Remote host closed the connection) 2015-12-28T21:10:33Z physixer: jcowan: Yeah I'm warming up to Chibi. 2015-12-28T21:11:39Z jcowan: Pixel_Outlaw: Chibi has a good C story and could certainly use a C++ interface if you wanted to put one together (surely not hard) 2015-12-28T21:12:05Z tmtwd joined #scheme 2015-12-28T21:12:34Z nowhere_man joined #scheme 2015-12-28T21:13:05Z Pixel_Outlaw: jcowan, I don't know man. I'm only an average programmer. I've not really gone deeply into C++ beyond some basic game programs. It has turned into Template++ in an attempt to be more dynamic. Soon it will be just like Lisp only use < > instead of ( ). 2015-12-28T21:13:33Z jcowan: Then use it as a better C. Nothing wrong with that. 2015-12-28T21:14:17Z Pixel_Outlaw: I do have an urge to make my own little 2D can program in C that uses Lisp like AutoCAD did. 2015-12-28T21:14:22Z Pixel_Outlaw: User defined routines. 2015-12-28T21:14:25Z Pixel_Outlaw: *CAD 2015-12-28T21:15:15Z wingo: why not write the whole thing in scheme? 2015-12-28T21:15:38Z wingo: c/c++ is a huge distraction imo 2015-12-28T21:16:10Z physixer: Pixel_Outlaw: As an experienced C++ programmer, you can go ahead and learn the cryptic C++ syntax and features, but if you're like me (a minimalist) you'll return to the purity and simplicit of C. I've done OpenGL in C and it's great. 2015-12-28T21:19:09Z davexunit: I second wingo 2015-12-28T21:19:38Z davexunit: about 3 years ago I was playing around with game development using a C core application with an embedded Guile Scheme interpreter 2015-12-28T21:20:13Z davexunit: I came to learn that it was much better to turn the tables: write as much as possible in Scheme and use the FFI to talk to C libraries where necessary. 2015-12-28T21:20:28Z wingo: yeah 2015-12-28T21:20:38Z wingo: c leads to ossified programs 2015-12-28T21:21:33Z davexunit: for game development, I use FFI bindings to OpenGL and SDL and do everything else in pure Scheme. 2015-12-28T21:21:47Z wingo: at work we use luajit to implement software switches. it kills c in performance, not because the compilers are better (though luajit's jit is good) but because it lets you make better programs 2015-12-28T21:21:50Z physixer: davexunit: wingo: then both of you agree of the importance of C in principle. davexunit didn't eventually completely eliminate C. And what if you had to implement a "library-like" function that wasn't already available and your scheme function was slow as hell? 2015-12-28T21:22:19Z wingo: physixer: you are starting from the perspective that scheme is slow. this is not true. 2015-12-28T21:22:21Z wingo: but 2015-12-28T21:22:32Z physixer: I'm a big proponent of hybrid-programming (programming in two simple lanaguages simultaneously). And a minimal-scheme plus C is a killer combo. 2015-12-28T21:22:33Z wingo: if you needed speed, you wouldn't need c, but probably assembler 2015-12-28T21:22:48Z wingo: i have had much better luck in luajit popping in dynasm sequences as needed 2015-12-28T21:22:51Z wingo: that's been *great* 2015-12-28T21:23:17Z wingo: we can emit optimized binary search routines using branchless cmov sequences, optimized for the precise vector sizes we deal with 2015-12-28T21:23:30Z jcowan: It would certainly be a Good Thing if/when Chibi gets a JIT 2015-12-28T21:23:35Z davexunit: that's some really impressive stuff, wingo. 2015-12-28T21:23:37Z wingo: we can stream in multiple memory locations into cache from memory using avx2 etc etc 2015-12-28T21:23:53Z physixer: wingo: give me a break. I can prove to you in principle that lambda calculus on top of a turing machine can never be as fast as the turing machine itself. 2015-12-28T21:24:11Z wingo: it's the sort of thing you think your c compiler might do but then again it might not, and if it matters, you need to make sure you are getting the right code 2015-12-28T21:24:11Z micmus quit (Ping timeout: 264 seconds) 2015-12-28T21:24:23Z wingo: lol physixer. compilers are a thing :) 2015-12-28T21:24:42Z physixer: in practise, scheme implementers might go ahead and try hacks like tail-recursion elimination and then come forward and say "see it's fast". But it's a losing battle! 2015-12-28T21:24:49Z davexunit: physixer: putting aside performance, which I think wingo has covered, the more your applications lives in C, the less hackable it becomes. 2015-12-28T21:25:00Z physixer: tail recursion elimination does what C was doing all along to begin with. 2015-12-28T21:25:19Z davexunit: physixer: so are you saying that we should just write everything in C? 2015-12-28T21:25:43Z davexunit: you know, call-with-current-continutation, if you squint, is like setjmp, so we should just use that! 2015-12-28T21:26:00Z davexunit: why deal with all this abstraction! 2015-12-28T21:26:02Z physixer: davexunit: see my comment above, you already agreed with me when you said 'C libraries'. Why do you still felt the need to keep using C libraries? 2015-12-28T21:26:20Z physixer: davexunit: I'm a proponent of "hybrid programming" (2 language programming) 2015-12-28T21:26:33Z jcowan: Because almost everything has a C interface, whether actually written in C or not 2015-12-28T21:26:44Z davexunit: physixer: because I don't want to spend my time rewriting the things that libgl and libsdl already do. 2015-12-28T21:26:57Z davexunit: they are so low-level that it's not an important place to be spending my time. 2015-12-28T21:27:30Z physixer: davexunit: so you agree with hybrid-programming paradigm. 2015-12-28T21:28:06Z davexunit: sure, I like FFIs, but I also maximize the amount of my program that is written in Scheme. 2015-12-28T21:28:31Z davexunit: the stuff that lives in C isn't hackable nor extensible. 2015-12-28T21:28:41Z davexunit: it's a cold, dead world. 2015-12-28T21:28:54Z davexunit: I don't want to write C, I want to write Scheme. 2015-12-28T21:29:13Z wingo: and useless. there is not much use for c these days. you do not need it for performance. if your scheme is too slow, use a faster scheme. 2015-12-28T21:29:28Z physixer: davexunit: it depends on what you're programming. If your code solves a differential equation on a 3D domain, 90% of code would end up in C, and scheme would be the high level interface to it. 2015-12-28T21:29:39Z davexunit: but that's not true! 2015-12-28T21:29:44Z wingo: or write a bit of c or assembler. but scheme ain't slow :P 2015-12-28T21:31:51Z wingo: physixer: what you call the "hybrid programming" approach would not exist if you didn't think one language was slow and another fast. it could be true that one *implementation* is slow and the other fast. but that's rarely true in significant terms these days, and if it is, well switch implementations. 2015-12-28T21:32:34Z wingo: of course you want to use a significant piece of work written in another language, there's a place for ffi's. but one uses an ffi because of its value to you, not its speed, unless you're using LAPACK or these things. 2015-12-28T21:35:13Z physixer: I don't prefer to write in one language vs the other. Best language for the job. When I need array[n], I don't waste my time writing (if (or (> n (length l)) (< n 0)) 2015-12-28T21:35:30Z physixer: (define (nth n l) (if (eq? n 0) (car l) (nth (- n 1) (cdr l)))) 2015-12-28T21:35:42Z physixer: correction: ^^^ 2015-12-28T21:35:47Z davexunit: physixer: I don't waste my time writing that either, because a linked list is not a vector. 2015-12-28T21:35:54Z davexunit: and Scheme has vectors 2015-12-28T21:35:56Z davexunit: and bytevectors 2015-12-28T21:36:08Z micmus joined #scheme 2015-12-28T21:39:14Z physixer: davexunit: and when you did deep into vectors or bytevectors you find out they were implemented by either (a) the same recursive beating around the bush. OR. (b) made available as a C backend. 2015-12-28T21:39:15Z physixer: *dig deep 2015-12-28T21:39:28Z wingo: physixer: it sounds like you've never actually made any significant program in scheme. may i humbly suggest you go and write one :) 2015-12-28T21:39:34Z davexunit: +1 2015-12-28T21:39:51Z wingo: that sounds harsh but it's the thing, yo 2015-12-28T21:40:05Z Pixel_Outlaw: davexunit did your post have any details on your shmup in Guile? I'd probably read the details if it did. Lost it in the backlog while at the mall. 2015-12-28T21:40:14Z davexunit: Pixel_Outlaw: no. 2015-12-28T21:40:28Z wingo: people treat scheme like it's some mythical practice removed from the daily life of memory accesses, cache misses, and instructions retired 2015-12-28T21:40:30Z wingo: ain't so. 2015-12-28T21:41:01Z Pixel_Outlaw: I wrote a good Common Lisp program for work once. :) 2015-12-28T21:41:11Z Pixel_Outlaw: Scheme I've just toyed with though. 2015-12-28T21:41:17Z davexunit: Pixel_Outlaw: I will write something with details if I manage to complete a game for the upcoming Lisp Game Jam http://itch.io/jam/january-2016-lisp-game-jam 2015-12-28T21:41:18Z wingo: it's just a programming language. could be you used a v. simple implementation, physixer. could be you read an introductory text. there are more things out there though :) 2015-12-28T21:41:19Z Pixel_Outlaw: I like both quite a lot. 2015-12-28T21:42:39Z wingo: i want to emphasize that i don't mock what you're thinking though 2015-12-28T21:42:45Z wingo: i thought it too, once. 2015-12-28T21:42:56Z davexunit: Pixel_Outlaw: I'm shooting (heh) for a single level shmup with ~5 minutes of total gameplay. 2015-12-28T21:43:01Z wingo: but it turns out you can make a find scheme implementation that's as good as any other language implementation out there. 2015-12-28T21:43:20Z Necrosporus_ joined #scheme 2015-12-28T21:43:22Z wingo: and that many of the ideas you might have about what it means to translate any given expression into machine code are wrong 2015-12-28T21:43:55Z wingo: *fine scheme implementation 2015-12-28T21:44:05Z Pixel_Outlaw: davexunit, you can always do a bit of procedural generation. Enemy paths could be done in real time with n many splines, enemy patterns could be wise choices of randomized states interpolated between. You then let the game generate 5 enemy templates per level and spawn copies at fixed intervals. 2015-12-28T21:44:49Z davexunit: Pixel_Outlaw: that isn't in the spirit of shmups. :) 2015-12-28T21:44:52Z Pixel_Outlaw: Use the same seed for each level so you get the same enemy templates 2015-12-28T21:45:05Z davexunit: or at least not what I'm going for. 2015-12-28T21:45:10Z Pixel_Outlaw: oh ok 2015-12-28T21:45:15Z davexunit: shmup players *like* that the game is the same each time 2015-12-28T21:45:28Z davexunit: it's the memorization and learning your enemies attacks that is enjoyable 2015-12-28T21:45:36Z vectorman68 joined #scheme 2015-12-28T21:45:39Z davexunit: learning to overcome the punishing difficult 2015-12-28T21:45:40Z Pixel_Outlaw: Right, that is what I meant by force the seed to be the level # 2015-12-28T21:45:45Z davexunit: difficulty* 2015-12-28T21:46:12Z davexunit: each enemy and bullet pattern must be placed precisely. 2015-12-28T21:46:31Z davexunit: I imagine that most time will be spent on this. 2015-12-28T21:46:34Z Necrosporus quit (Ping timeout: 256 seconds) 2015-12-28T21:46:38Z Necrosporus_ is now known as Necrosporus 2015-12-28T21:47:03Z Pixel_Outlaw: I agree but there is the possibility that a heuristic could be used to come up with "good" placement and patterns. 2015-12-28T21:47:13Z davexunit: perhaps 2015-12-28T21:47:20Z davexunit: but I don't know of any such heuristic 2015-12-28T21:47:27Z davexunit: seems like over-engineering to me 2015-12-28T21:47:49Z Pixel_Outlaw may be over-engineering a shmup as we speak with dynamic enemy creation 2015-12-28T21:47:53Z Pixel_Outlaw: ;) 2015-12-28T21:48:17Z davexunit: the key to completing a game jam is to ruthlessly stomp out the urge to over-engineer 2015-12-28T21:48:29Z Pixel_Outlaw: No game should get too random, it is best to let the computer just make wise choices at a very granular level. 2015-12-28T21:49:12Z davexunit: good shmups are deterministic. same game every time. 2015-12-28T21:49:34Z jcowan: Pixel_Outlaw: Hunt the Wumpus should get random 2015-12-28T21:49:39Z davexunit: the replayability lies in trying to actually beat the game in a single credit and getting a better score 2015-12-28T21:49:51Z davexunit: but this is all extremely non-Scheme related 2015-12-28T21:49:56Z davexunit: so I'll leave it at that 2015-12-28T21:49:59Z badkins joined #scheme 2015-12-28T21:50:13Z vectorman68: Random level changes....sometimes there is a floor sometimes dont 2015-12-28T21:50:41Z davexunit: I'll mention it again when I have real Scheme source code to share so we can talk about delimited continuations and referential transparency and whatnot 2015-12-28T22:01:15Z Pixel_Outlaw: Is your game going to be Open Sores? 2015-12-28T22:01:16Z Pixel_Outlaw: :D 2015-12-28T22:02:20Z davexunit: Pixel_Outlaw: it will be Free Software, licensed under the GPLv3 or later. 2015-12-28T22:03:04Z Pixel_Outlaw: Cool 2015-12-28T22:03:13Z vectorman69 joined #scheme 2015-12-28T22:03:25Z Pixel_Outlaw: I'd probably try to make a game for the Lisp comp too if I didn't hate how annoying the new streamlined OpenGL is. 2015-12-28T22:03:46Z cemerick quit (Ping timeout: 240 seconds) 2015-12-28T22:03:50Z Pixel_Outlaw: It gives the programmer sawdust and tweezers so you can make a log cabin. 2015-12-28T22:04:17Z davexunit: but once you have that stuff built it's *way* better than the old fixed function pipeline 2015-12-28T22:04:29Z jcowan: I've heard Scheme programming described as engineering buildings entirely out of matchsticks 2015-12-28T22:04:30Z davexunit: but I'm totally with you on how overwhelming it was to learn 2015-12-28T22:04:44Z davexunit: isn't that C ;) 2015-12-28T22:04:56Z vectorman68 quit (Ping timeout: 255 seconds) 2015-12-28T22:06:44Z Pixel_Outlaw: I rather like having all the transformations and rotations done for me. I just want a triangle on screen. I don't want to have to give each pixel specific instructions. 2015-12-28T22:07:23Z davexunit: then you want to use something that has already built on top of OpenGL 2015-12-28T22:07:32Z davexunit: OpenGL is *very* low-level 2015-12-28T22:07:37Z Pixel_Outlaw: "We've made it more flexable than ever, by forcing you to rewrite what we did initially" 2015-12-28T22:07:37Z wingo: i never managed to make anything with the new pipeline 2015-12-28T22:08:09Z davexunit: it really does enable you to do more things, more efficiently, but yeah you have to build up everything first. 2015-12-28T22:08:47Z Pixel_Outlaw: They could have just provided sensible default operations. With the option to roll your own. 2015-12-28T22:08:50Z davexunit: what I really want for my game engine is an s-expression -> GLSL compiler 2015-12-28T22:09:00Z wingo: davexunit: or spir-v :) 2015-12-28T22:09:04Z davexunit: Pixel_Outlaw: you can still use the fixed function pipeline 2015-12-28T22:09:24Z davexunit: wingo: is that the new hotness now? 2015-12-28T22:09:33Z wingo: apparently 2015-12-28T22:09:45Z wingo: it's a bytecode specified in vulkan iirc 2015-12-28T22:10:07Z wingo: https://en.wikipedia.org/wiki/Standard_Portable_Intermediate_Representation 2015-12-28T22:10:08Z rudybot: http://teensy.info/Pptyy4yczO 2015-12-28T22:10:09Z davexunit: is vulkan the new OpenGL? 2015-12-28T22:10:23Z physixer: wingo: I'm not sure you're getting my point. The best way lambda-calculus based lanaguages can claim performance is by automating a imperative-is-faster-than-lambda-so-you-give-me-lambda-i-spit-imperative believer and calling it 'optimizing-compiler'. 2015-12-28T22:10:38Z micmus quit (Ping timeout: 246 seconds) 2015-12-28T22:11:14Z wingo: heh. 2015-12-28T22:11:24Z davexunit: physixer: I'm sorry, but you don't seem to understand the abstraction layer between the programmer (for whom the programming language is for) and the computer. 2015-12-28T22:11:26Z wingo: you are setting up a false dichotomy, physixer. 2015-12-28T22:12:00Z wingo: as a first paper to read i suggest "lambda: the ultimate goto" by steele. 2015-12-28T22:13:12Z daviid quit (Ping timeout: 256 seconds) 2015-12-28T22:13:22Z wingo: it's an oldie but a goodie. 2015-12-28T22:14:15Z wingo: there simply is no inherent speed to the lambda calculus (a mathematical formalism) 2015-12-28T22:15:20Z wingo: so it makes no sense to say that it is faster or slower than "imperative", whatever that is. 2015-12-28T22:15:58Z wingo: and finally -- all compilers these days use functional programming techniques in their core intermediate languages. 2015-12-28T22:16:23Z wingo: the SSA compiler representation is functional programming, no more and no less. 2015-12-28T22:17:27Z jcowan: In any case, Scheme is an imperative programming language, as I said the other day. 2015-12-28T22:17:36Z wingo: true enough! 2015-12-28T22:17:42Z jcowan: It has all the imperative features you might want. 2015-12-28T22:17:54Z wingo: and sadly enough :) 2015-12-28T22:18:00Z davexunit: hehe 2015-12-28T22:18:28Z davexunit: but fortunately, Scheme supports non-terrible paradigms as well. 2015-12-28T22:19:12Z wingo: i don't mind the paradigm, i just think it should be a library thing and not a language thing :) box-set! >> set! 2015-12-28T22:19:34Z Pixel_Outlaw: Clean the fitting with CLR then use the Teflon tape to make a good seal. 2015-12-28T22:19:44Z wingo: hehe 2015-12-28T22:19:50Z jcowan: I used to think so too, but the argument that set! is second-class and therefore the compiler is able to optimize it if it wants to is plausible. 2015-12-28T22:20:09Z jcowan: Pixel_Outlaw: Or just use IronScheme. 2015-12-28T22:20:23Z physixer: wingo: too bad. It's 23 pages so I haven't read all. But what I've read seems to support my POV. 2015-12-28T22:20:28Z Pixel_Outlaw: I keep nabbing the wrong window. D: 2015-12-28T22:20:50Z jcowan: (Granted that most Scheme systems deliberately promote set! to first-class, not all do) 2015-12-28T22:21:21Z physixer: tail-recursion-elimination is by defintion admission of 'lambda-is-slower-than-imperative' 2015-12-28T22:21:50Z wingo: physixer. that is a silly thing to say 2015-12-28T22:22:26Z physixer: and yes lambda does have an inherent speed despite begin a math formalism. You simply count the evaluations of the (normal or applicative) order, or something like that. 2015-12-28T22:22:41Z wingo: ok what is the speed of (+ 1 2) 2015-12-28T22:22:49Z wingo: is it one or four or 0 2015-12-28T22:23:10Z micmus joined #scheme 2015-12-28T22:23:50Z physixer: if it's 1, then (+ (+ 1 2) 3) is 2. If it's 4 then (+ (+ 1 2) 3) is either 7 or 8. It's relative. 2015-12-28T22:24:03Z wingo: it's zero, in all compilers i know of 2015-12-28T22:24:18Z davexunit: physixer: waaaaat 2015-12-28T22:24:26Z jcowan: wingo: What do you mean by "compilers" in this case? 2015-12-28T22:24:55Z physixer: correction: (+ 1 2) vs (+ (+ 1 2) 3) 2015-12-28T22:25:09Z jcowan: This conversation is mystifying 2015-12-28T22:25:57Z wingo: i mean that compilers compile. (+ 1 2) looks like a term but it vanishes into 3 at compile time. that's how these things work 2015-12-28T22:26:18Z davexunit quit (Quit: Later) 2015-12-28T22:26:44Z jcowan: Oh, you mean literally (+ 1 2). I thought that was just an example. Sure, any reasonable compiler will do constant expression folding in any language. 2015-12-28T22:26:46Z wingo: physixer seems to think that true schemes are interpreters :) 2015-12-28T22:27:09Z jcowan: It's the ability to compile away (some) lambdas that makes Scheme compilers awesome 2015-12-28T22:27:49Z physixer: wingo: what jcowan said. I was taking it as (+ x y) not literally (+ 1 2) 2015-12-28T22:28:10Z wingo: physixer: well what about ((lambda (x y) (+ x y)) 1 2) 2015-12-28T22:28:57Z wingo: you see. compilers reduce complexity. no one natters on about the speed of gcc -O0. same with scheme. you have to use a good implementation if you are going to consider the speed of a scheme. good implementations produce good code -- by definition! 2015-12-28T22:29:09Z wingo: how they do it is immaterial as long as the result is correct. 2015-12-28T22:30:18Z Pixel_Outlaw: I can't wait until we can do scheme instead of JavaScript. I think that is one goal of WebASM. Making scripting language agnostic. 2015-12-28T22:30:19Z wingo: scheme implementations are not, as you would seem to think, just about "tail recursion elimination". they do all the register allocating and loop optimizations and scalar replacements and etc etc etc that a good compiler for any language would do. 2015-12-28T22:33:06Z xwl quit (Remote host closed the connection) 2015-12-28T22:34:10Z wingo: there is nothing more real or less real than the lambda in ((lambda (x y) (+ x y)) 1 2) than any other lambda. it's just an abstraction. in this case its implementation cost is exactly zero. in other cases the abstraction has a run-time cost. the mapping from abstraction -- the programming language -- to implementation -- the hardware -- is the job of the implementation. benchmark larceny sometime and come back and tell us scheme is 2015-12-28T22:34:10Z wingo: essentially slow :) 2015-12-28T22:37:41Z jcowan: wingo: not that good = fast in every case 2015-12-28T22:37:57Z jcowan: there are reasons for using implementations other than Stalin 2015-12-28T22:38:13Z wingo: ack :) 2015-12-28T22:38:26Z wingo: and i use guile, which isn't the fastest either :) 2015-12-28T22:39:51Z wingo attracted by https://www.khronos.org/registry/spir-v/specs/1.0/SPIRV.html 2015-12-28T22:41:34Z jcowan: wingo: are the slides from your Scheme talk somewhere about? 2015-12-28T22:41:47Z wingo: the one in dc? /me digs 2015-12-28T22:42:08Z jcowan: Yes. 2015-12-28T22:42:13Z wingo: https://wingolog.org/pub/scheme-workshop-2014-slides.pdf 2015-12-28T22:42:20Z wingo: also an .ogg and a .mp3 there 2015-12-28T22:42:21Z jcowan: "Can be targeted by new front ends for novel high-level languages." <-- looks promising 2015-12-28T22:42:38Z jcowan: Thanks 2015-12-28T22:43:31Z synthmeat quit (Read error: Connection reset by peer) 2015-12-28T22:43:51Z wingo zzz; night! 2015-12-28T22:44:09Z jcowan: someone was distressed here because Scheme lacks first-class syntax keywords 2015-12-28T22:44:20Z synthmeat joined #scheme 2015-12-28T22:50:08Z Guest79065 is now known as micro` 2015-12-28T22:55:20Z niklasl4 quit (Read error: Connection reset by peer) 2015-12-28T22:55:57Z niklasl4 joined #scheme 2015-12-28T22:55:59Z altphi quit (Ping timeout: 264 seconds) 2015-12-28T23:02:53Z physixer: just great. Two of the fastest scheme compilers recommended to me as a "proof that scheme-only programming is better than hybrid scheme-C-programming": 2015-12-28T23:03:14Z physixer: larceny: 122 kloc scheme, 48 kloc C. 2015-12-28T23:03:48Z physixer: stalin: 88 kloc scheme, "468 kloc" C. 2015-12-28T23:05:19Z jcowan: We didn't say they were the smallest Scheme compilers 2015-12-28T23:07:03Z physixer: if anyone "believed in scheme" it would be peole who want to make scheme as fast as possible. 2015-12-28T23:07:10Z physixer: *people 2015-12-28T23:08:28Z jcowan: What's that got to do with the number of lines of C code generated? 2015-12-28T23:09:05Z physixer: lemme check. 2015-12-28T23:13:14Z physixer: so I guess stalin has a giant c file that is most likely generated. And the source directory is purely scheme. 2015-12-28T23:13:25Z physixer: still larceny. 2015-12-28T23:15:52Z physixer: and larceny's compile is faster than stalin's (I wonder why): http://mangler.sourceforge.net/larceny-rocks.html 2015-12-28T23:18:50Z jcowan: Everything is faster than Stalin at compile time, by definition. It is the ultimate AOT whole-program compiler. 2015-12-28T23:19:15Z jcowan: You use Stalin when Gambit or Chicken is not fast enough and your code is *fully* debugged, for you'll never debug it under Stalin. 2015-12-28T23:20:04Z micmus quit (Quit: Leaving) 2015-12-28T23:28:11Z magine joined #scheme 2015-12-28T23:31:15Z taylan quit (Remote host closed the connection) 2015-12-28T23:31:39Z taylan joined #scheme 2015-12-28T23:32:41Z magine quit (Ping timeout: 255 seconds) 2015-12-28T23:37:24Z physixer: there is a C garbage collector in stalin tarball with 23 kloc C, still figuring out what it's doing there but very likely it's used by stalin.c generated by stalin. So very likely it's 28 kloc scheme + 23 kloc C 2015-12-28T23:39:12Z jcowan: Oh, I see. No, you are looking at the bootstrap. Stalin is written in Stalin, but it's delivered in both Stalin and C, so you can install it without a Stalin compiler. 2015-12-28T23:40:03Z jcowan: And the whole standard R4RS library is precompiled with Stalin and prepended to your code. 2015-12-28T23:40:20Z jcowan: Even C-compiling Stalin takes real time, though typically not 24h. 2015-12-28T23:40:29Z jcowan: physixer: ^^ 2015-12-28T23:40:54Z jcowan quit (Quit: Leaving) 2015-12-28T23:46:40Z daviid joined #scheme 2015-12-28T23:58:15Z snits quit (Ping timeout: 240 seconds)