2017-06-16T00:04:34Z jaziz joined #scheme 2017-06-16T00:05:41Z cemerick quit (Ping timeout: 246 seconds) 2017-06-16T00:13:44Z Riastradh quit (Ping timeout: 246 seconds) 2017-06-16T00:30:10Z mekeor quit (Ping timeout: 240 seconds) 2017-06-16T00:34:29Z MrBusiness joined #scheme 2017-06-16T00:42:17Z jaziz quit (Quit: Leaving) 2017-06-16T00:43:51Z lambda-11235 joined #scheme 2017-06-16T00:52:37Z daviid joined #scheme 2017-06-16T00:56:06Z cemerick joined #scheme 2017-06-16T00:57:29Z mejja joined #scheme 2017-06-16T00:59:15Z rain1: http://rosettacode.org/wiki/Hofstadter_Q_sequence#Scheme 2017-06-16T01:01:29Z DGASAU quit (Read error: Connection reset by peer) 2017-06-16T01:02:13Z cromachina joined #scheme 2017-06-16T01:05:15Z shdeng joined #scheme 2017-06-16T01:13:16Z badkins quit (Remote host closed the connection) 2017-06-16T01:19:46Z mejja: who wrote thar piece of crap? 2017-06-16T01:24:19Z rain1: Ledrug 2017-06-16T01:28:18Z beekill95 joined #scheme 2017-06-16T01:33:41Z gwatt: who is Ledrug? 2017-06-16T01:38:05Z marvin2 joined #scheme 2017-06-16T01:42:05Z cemerick quit (Ping timeout: 240 seconds) 2017-06-16T01:43:04Z cemerick joined #scheme 2017-06-16T02:01:31Z paroneayea quit (Remote host closed the connection) 2017-06-16T02:20:59Z jonaslund quit (Ping timeout: 255 seconds) 2017-06-16T02:23:12Z p9s quit (Remote host closed the connection) 2017-06-16T02:23:22Z p9s joined #scheme 2017-06-16T02:31:32Z p9s quit (Remote host closed the connection) 2017-06-16T02:32:01Z p9s joined #scheme 2017-06-16T02:36:25Z p9s quit (Ping timeout: 255 seconds) 2017-06-16T02:49:12Z Menche quit (Quit: Leaving) 2017-06-16T02:51:19Z DGASAU joined #scheme 2017-06-16T02:51:47Z muelleme_ joined #scheme 2017-06-16T02:53:04Z daviid quit (Ping timeout: 255 seconds) 2017-06-16T02:55:36Z Menche joined #scheme 2017-06-16T02:56:37Z muelleme_ quit (Ping timeout: 258 seconds) 2017-06-16T02:56:55Z ArneBab joined #scheme 2017-06-16T02:59:03Z takitus: Sounds like an orc 2017-06-16T03:00:03Z Menche quit (Remote host closed the connection) 2017-06-16T03:00:25Z Menche joined #scheme 2017-06-16T03:01:07Z ArneBab_ quit (Ping timeout: 240 seconds) 2017-06-16T03:07:27Z emma__ quit (Remote host closed the connection) 2017-06-16T03:12:48Z Menche quit (Quit: Leaving) 2017-06-16T03:15:09Z beekill95 quit (Remote host closed the connection) 2017-06-16T03:17:42Z Menche joined #scheme 2017-06-16T03:25:07Z jao quit (Ping timeout: 240 seconds) 2017-06-16T03:31:22Z mejja quit (Quit: \ No newline at end of file) 2017-06-16T03:38:47Z Menche quit (Quit: Leaving) 2017-06-16T03:47:25Z pjb joined #scheme 2017-06-16T04:01:51Z davexunit quit (Quit: ZNC 1.6.2 - http://znc.in) 2017-06-16T04:18:20Z jonaslund joined #scheme 2017-06-16T04:31:05Z brendyn quit (Ping timeout: 240 seconds) 2017-06-16T05:08:29Z jmd joined #scheme 2017-06-16T05:33:33Z pilne quit (Quit: Quitting!) 2017-06-16T05:46:48Z jmd quit (Remote host closed the connection) 2017-06-16T06:27:35Z ertes quit (Ping timeout: 240 seconds) 2017-06-16T06:30:19Z muelleme_ joined #scheme 2017-06-16T06:32:22Z lambda-11235 quit (Quit: WeeChat 1.8) 2017-06-16T06:37:09Z Steverman joined #scheme 2017-06-16T06:44:30Z muelleme_ quit (Ping timeout: 240 seconds) 2017-06-16T06:50:11Z civodul joined #scheme 2017-06-16T07:00:23Z ventonegro joined #scheme 2017-06-16T07:03:20Z muelleme_ joined #scheme 2017-06-16T07:11:47Z noethics quit (Remote host closed the connection) 2017-06-16T07:12:08Z noethics joined #scheme 2017-06-16T07:16:30Z ventonegro_ joined #scheme 2017-06-16T07:18:33Z ventonegro quit (Quit: rcirc on GNU Emacs 25.1.1) 2017-06-16T07:18:33Z ventonegro_ is now known as ventonegro 2017-06-16T07:23:48Z muelleme_ quit (Ping timeout: 260 seconds) 2017-06-16T07:28:29Z acarrico quit (Remote host closed the connection) 2017-06-16T07:52:15Z jaziz joined #scheme 2017-06-16T08:04:05Z Steverman quit (Ping timeout: 240 seconds) 2017-06-16T08:04:16Z takitus quit (Ping timeout: 260 seconds) 2017-06-16T08:06:29Z lritter joined #scheme 2017-06-16T08:22:30Z mekeor joined #scheme 2017-06-16T08:31:01Z X-Scale quit (Quit: HydraIRC -> http://www.hydrairc.com <- Now with extra fish!) 2017-06-16T08:51:38Z greatscottttt joined #scheme 2017-06-16T09:00:07Z Steverman joined #scheme 2017-06-16T09:04:47Z daviid joined #scheme 2017-06-16T09:15:21Z chat_ quit (Read error: Connection reset by peer) 2017-06-16T09:16:14Z chat_ joined #scheme 2017-06-16T09:52:36Z jaziz quit (Quit: Leaving) 2017-06-16T10:15:23Z shdeng quit (Ping timeout: 246 seconds) 2017-06-16T10:21:58Z brendyn joined #scheme 2017-06-16T10:28:28Z daviid quit (Ping timeout: 255 seconds) 2017-06-16T10:47:19Z Steverman quit (Ping timeout: 255 seconds) 2017-06-16T11:04:46Z Steverman joined #scheme 2017-06-16T11:07:11Z jao joined #scheme 2017-06-16T11:12:53Z notbarton joined #scheme 2017-06-16T11:27:16Z Steverman quit (Ping timeout: 260 seconds) 2017-06-16T11:41:24Z alezost joined #scheme 2017-06-16T11:42:44Z Steverman joined #scheme 2017-06-16T12:01:20Z jao quit (Ping timeout: 260 seconds) 2017-06-16T12:01:55Z muelleme_ joined #scheme 2017-06-16T12:30:08Z muelleme_ quit (Ping timeout: 240 seconds) 2017-06-16T12:41:29Z Menche joined #scheme 2017-06-16T12:50:18Z dmiles quit (Ping timeout: 268 seconds) 2017-06-16T12:56:24Z Steverman quit (Ping timeout: 260 seconds) 2017-06-16T12:59:30Z dmiles joined #scheme 2017-06-16T13:15:54Z p9s joined #scheme 2017-06-16T13:16:24Z p9s quit (Remote host closed the connection) 2017-06-16T13:17:10Z marvin2 quit (Ping timeout: 255 seconds) 2017-06-16T13:17:31Z jcowan joined #scheme 2017-06-16T13:17:37Z davexunit joined #scheme 2017-06-16T13:19:36Z cemerick quit (Ping timeout: 240 seconds) 2017-06-16T13:27:01Z wigust quit (Remote host closed the connection) 2017-06-16T13:27:18Z Steverman joined #scheme 2017-06-16T13:28:03Z jcowan quit (Read error: Connection reset by peer) 2017-06-16T13:30:28Z jcowan joined #scheme 2017-06-16T13:36:58Z alezost quit (Quit: I live in GuixSD and Emacs ) 2017-06-16T13:41:55Z Steverman quit (Ping timeout: 255 seconds) 2017-06-16T13:55:09Z cromachina quit (Read error: Connection reset by peer) 2017-06-16T13:58:01Z jcowan quit (Read error: Connection reset by peer) 2017-06-16T14:00:24Z jcowan joined #scheme 2017-06-16T14:11:32Z notbarton quit (Ping timeout: 260 seconds) 2017-06-16T14:18:17Z cemerick joined #scheme 2017-06-16T14:21:14Z gravicappa joined #scheme 2017-06-16T14:24:41Z qu1j0t3: haha 2017-06-16T14:26:59Z Steverman joined #scheme 2017-06-16T14:31:44Z mekeor quit (Quit: digital revolution = cryptoanarchism + cybercommunism) 2017-06-16T14:33:16Z Steverman quit (Ping timeout: 255 seconds) 2017-06-16T14:47:02Z greatscottttt quit (Quit: WeeChat 1.5) 2017-06-16T14:57:05Z brendyn quit (Ping timeout: 240 seconds) 2017-06-16T15:01:47Z gko quit (Quit: ZNC - http://znc.in) 2017-06-16T15:04:56Z X-Scale joined #scheme 2017-06-16T15:14:22Z civodul quit (Quit: ERC (IRC client for Emacs 25.2.1)) 2017-06-16T15:17:16Z Steverman joined #scheme 2017-06-16T15:18:00Z sz0 joined #scheme 2017-06-16T15:19:39Z alezost joined #scheme 2017-06-16T15:21:49Z Steverman quit (Ping timeout: 255 seconds) 2017-06-16T15:23:46Z lukeoftheaura joined #scheme 2017-06-16T15:24:49Z gko joined #scheme 2017-06-16T15:32:55Z lukeoftheaura quit (Quit: Leaving) 2017-06-16T15:33:58Z marvin2 joined #scheme 2017-06-16T15:48:25Z sondr3 quit (Ping timeout: 255 seconds) 2017-06-16T15:51:26Z jao joined #scheme 2017-06-16T16:00:20Z p9s joined #scheme 2017-06-16T16:02:21Z p9s quit (Read error: Connection reset by peer) 2017-06-16T16:02:28Z p9s joined #scheme 2017-06-16T16:06:40Z notbarton joined #scheme 2017-06-16T16:10:52Z p9s quit (Read error: Connection reset by peer) 2017-06-16T16:11:10Z badkins joined #scheme 2017-06-16T16:11:26Z p9s joined #scheme 2017-06-16T16:17:12Z lukeoftheaura joined #scheme 2017-06-16T16:30:49Z jmd joined #scheme 2017-06-16T16:35:43Z lukeoftheaura quit (Quit: Leaving) 2017-06-16T16:38:39Z Riastradh joined #scheme 2017-06-16T16:44:58Z muelleme_ joined #scheme 2017-06-16T16:45:30Z p9s quit (Ping timeout: 240 seconds) 2017-06-16T16:46:43Z nckx quit (Quit: restarting my GuixSD server) 2017-06-16T16:47:14Z sondr3 joined #scheme 2017-06-16T16:47:27Z notbarton quit (Ping timeout: 240 seconds) 2017-06-16T16:49:07Z nckx joined #scheme 2017-06-16T16:52:10Z muelleme_ quit (Ping timeout: 240 seconds) 2017-06-16T17:00:08Z Riastradh quit (Ping timeout: 260 seconds) 2017-06-16T17:02:47Z nisstyre quit (Ping timeout: 246 seconds) 2017-06-16T17:03:14Z nisstyre joined #scheme 2017-06-16T17:03:29Z happy_gnu quit (Ping timeout: 246 seconds) 2017-06-16T17:03:45Z JoshS quit (Ping timeout: 268 seconds) 2017-06-16T17:05:42Z happy_gnu joined #scheme 2017-06-16T17:06:35Z notbarton joined #scheme 2017-06-16T17:11:12Z Riastradh joined #scheme 2017-06-16T17:16:57Z MrBusiness quit (Read error: Connection reset by peer) 2017-06-16T17:26:12Z pilne joined #scheme 2017-06-16T17:27:59Z sleffy joined #scheme 2017-06-16T17:41:32Z lukeoftheaura joined #scheme 2017-06-16T17:44:55Z p9s joined #scheme 2017-06-16T17:50:53Z notbarton quit (Ping timeout: 260 seconds) 2017-06-16T17:53:55Z lukeoftheaura: so, I can't really understand the little schemer book 2017-06-16T17:54:22Z wasamasa: you need to actually do the exercises, not just eating peanut butter jelly sandwiches 2017-06-16T17:54:36Z lukeoftheaura: I am 2017-06-16T17:55:00Z ijp: to my great shame, I did not eat the sandwiches 2017-06-16T17:55:15Z ijp: in part because I refuse to honour the american use of 'jelly' 2017-06-16T17:55:18Z wasamasa: lukeoftheaura: are you done with them yet? 2017-06-16T17:55:40Z lukeoftheaura: I'm reading the chapter "cons the magnificent" 2017-06-16T17:56:10Z lukeoftheaura: and I think in part why I can't follow is just parenthesis, parenthesis everywhere 2017-06-16T17:56:14Z lukeoftheaura: in the example code 2017-06-16T17:56:24Z lukeoftheaura: )))))))))))))) 2017-06-16T17:56:34Z Riastradh: ijp: You could have a peanut butter and marmite sandwich instead. 2017-06-16T17:56:37Z wasamasa: so you aren't doing the exercises :P 2017-06-16T17:56:45Z Riastradh: lukeoftheaura: Don't read all the closing parens. 2017-06-16T17:56:47Z jmd: lukeoftheaura: Like wasamasa says, when learning a language, you have to read the tutorial AND do (at least some of) the recommended exercises. 2017-06-16T17:56:58Z wasamasa: do them instead of getting hung up on syntax 2017-06-16T17:57:04Z ecraven: lukeoftheaura: don't read any of the parentheses, look at the indentation ;) 2017-06-16T17:57:06Z Riastradh: lukeoftheaura: Let the indentation guide you. 2017-06-16T17:57:20Z wasamasa: you'll eventually get used to it, maybe even get fits of rage when looking at scala code 2017-06-16T17:57:29Z ecraven: you can think of the parentheses as purely help for your editor to correctly indent code 2017-06-16T17:57:45Z jmd: ... and they do say that LISP stands for Lots of Irritating Superfluous Parentheses 2017-06-16T17:58:14Z gwatt: or Lost In Superfluous Parentheses 2017-06-16T17:59:54Z lukeoftheaura: Lots of irritating single parenthesis 2017-06-16T18:00:10Z lukeoftheaura: s/parenthesis/parentheses 2017-06-16T18:01:12Z ijp: better than Lack (of) Imaginative Syntactical Perjoratives 2017-06-16T18:03:00Z lukeoftheaura: trying to follow along with implementing `rember` 2017-06-16T18:03:19Z lukeoftheaura: already too many parenthesis to keep track of even with indenting 2017-06-16T18:03:33Z lukeoftheaura: and all I've checked is if lat is null 2017-06-16T18:03:39Z wasamasa: your editor sucks then 2017-06-16T18:03:55Z wasamasa: in emacs, it's a matter of hitting the tab key to reindent the line 2017-06-16T18:04:33Z lukeoftheaura: I'm using micro 2017-06-16T18:06:01Z lukeoftheaura: there's no way I'm using emacs 2017-06-16T18:06:53Z wasamasa: every editor that doesn't completely suck at indenting lisp ends up reimplementing emacs in this aspect 2017-06-16T18:07:11Z lukeoftheaura: I don't think micro is any good at indenting lisp 2017-06-16T18:07:36Z jmd: How do vi people cope with lisp? 2017-06-16T18:07:47Z lukeoftheaura: although I'd rather have the ability to actually read my code rather than having to rely on an editor to sort it out for me, 2017-06-16T18:07:53Z wasamasa: jmd: you should ask jcowan 2017-06-16T18:07:53Z gwatt: jmd: :set lisp 2017-06-16T18:08:04Z wasamasa: jmd: everyone else just upgrades to vim 2017-06-16T18:08:06Z lukeoftheaura: although I do like scheme as a language the parenthesis annoy me 2017-06-16T18:08:11Z gwatt: (assuming vim, and not bill joy's original vi) 2017-06-16T18:08:30Z jmd: I use nvi 2017-06-16T18:08:53Z gwatt: jmd: there's also https://github.com/akeep/vim-patches 2017-06-16T18:09:04Z wasamasa: lukeoftheaura: what is micro even, if not an emacs imitation 2017-06-16T18:09:24Z lukeoftheaura: https://micro-editor.github.io/ 2017-06-16T18:09:26Z jmd: wasamasa: It's like pico but larger. 2017-06-16T18:09:45Z wasamasa: even nano has auto-indent and syntax highlighting 2017-06-16T18:10:21Z wasamasa: if your modern editor sucks harder than nano, well, then I don't want modern 2017-06-16T18:10:56Z jcowan: I edit lisp code mostly in ex mode, dropping to vi mode only to check parens with %. 2017-06-16T18:11:48Z lukeoftheaura: well, it has auto indent and syntax highlighting 2017-06-16T18:11:51Z jcowan: Alas, nvi does not have lisp mode from original vi 2017-06-16T18:12:02Z wasamasa: lukeoftheaura: sucky autoindent then 2017-06-16T18:12:08Z lukeoftheaura: maybe 2017-06-16T18:12:12Z jcowan: I don't think auto indent saves me much, and as for colored code, I detest it; it half blinds me. 2017-06-16T18:12:20Z lukeoftheaura: like I said, it very certainly wasn't made for lisps 2017-06-16T18:12:45Z jcowan: Real historic Lisp editors were structure editors; your input was *always* well-formed. 2017-06-16T18:12:55Z jcowan: Emacs is a compromise. 2017-06-16T18:13:05Z Riastradh: Heh. 2017-06-16T18:13:10Z wasamasa: hint: if it just puts the same indentation into the line as the last one, it's junk 2017-06-16T18:13:17Z jmd: A bit like the Sinclair Basic - impossible to make a syntax error., 2017-06-16T18:13:41Z Riastradh: *True* Scotsmen write only... 2017-06-16T18:14:21Z Riastradh: (I seem to recall Emacs predated Interlisp S-Edit and the Kludgey Binford Editor, but my memory is fuzzy -- I could be wrong.) 2017-06-16T18:15:10Z jmd left #scheme 2017-06-16T18:15:20Z gwatt: wasamasa: funny, I think that's actually the best "stupid" behavior for an editor; just keep the same leading whitespace as the previous line 2017-06-16T18:16:41Z lukeoftheaura quit (Quit: Leaving) 2017-06-16T18:23:08Z p9s quit (Ping timeout: 240 seconds) 2017-06-16T18:25:27Z Riastradh: Hmm. 2017-06-16T18:26:32Z Riastradh: 2.5yr since the last paredit release. Time for a new one, or should I use exponentially increasing gaps and wait 3yr since the last gap was 1.5yr? 2017-06-16T18:27:13Z wasamasa: reminds me that someone gave me a paredit snippet for emacshorrors 2017-06-16T18:27:34Z Riastradh: Mmm? 2017-06-16T18:28:01Z wasamasa: I've removed it from my TODO.org for some reason 2017-06-16T18:28:17Z wasamasa: ;;; Please do not try to understand this code unless you have a VERY good reason to do so. I gave up trying to figure it out well enough to explain it, long ago. 2017-06-16T18:28:42Z Riastradh: Heh. 2017-06-16T18:29:00Z wasamasa: looks like the standard hack to me where you try to work around the edge case of eobp 2017-06-16T18:29:52Z wasamasa: the only thing that's out of place here is the warning 2017-06-16T18:31:11Z Riastradh: Dunno what that standard hack is. Nor do I have any idea how that part of the code works any more. But at least it seems to work! 2017-06-16T18:32:03Z wasamasa: um, you have a piece of code that works normally unless it crosses the end of the buffer, so you enhance it with a hack that does something to make it not error out 2017-06-16T18:32:05Z jyc quit (Quit: ZNC - http://znc.in) 2017-06-16T18:33:02Z Riastradh: Glad it's obvious to a smart person like you. Be sure to let everyone around know how much smarter you are. 2017-06-16T18:33:24Z wasamasa: this is present in like every non-trivial emacs package 2017-06-16T18:34:35Z Riastradh: Guess I'm just an illiterate country bumpkin who is too busy tripping over myself to read nontrivial Emacs packages. 2017-06-16T18:36:16Z torbo joined #scheme 2017-06-16T18:36:38Z torbo left #scheme 2017-06-16T18:38:31Z jcloud is now known as jyc 2017-06-16T18:46:06Z daviid joined #scheme 2017-06-16T18:47:57Z jcowan: wasamasa, Riastradh: Birds in their little nests agree, or else. 2017-06-16T18:58:23Z muelleme_ joined #scheme 2017-06-16T18:59:33Z M-krsiehl quit (Ping timeout: 255 seconds) 2017-06-16T18:59:33Z Kooda quit (Ping timeout: 255 seconds) 2017-06-16T18:59:46Z DeeEff quit (Ping timeout: 264 seconds) 2017-06-16T19:00:19Z ArthurAGleckler[ quit (Ping timeout: 258 seconds) 2017-06-16T19:04:27Z rain1: paredit rocks 2017-06-16T19:04:32Z rain1: it got a lot better recentyl too 2017-06-16T19:04:54Z rain1: i forgot exactly what it was that kept happening that i had trouble with but it doesn't happen anymore 2017-06-16T19:06:00Z jcowan: The best kinds of bugs 2017-06-16T19:06:07Z jcowan: those we forget quickly when fixed 2017-06-16T19:12:25Z aeth_ joined #scheme 2017-06-16T19:13:08Z aeth quit (Ping timeout: 260 seconds) 2017-06-16T19:13:38Z aeth_ is now known as aeth 2017-06-16T19:13:50Z happy_gnu quit (Ping timeout: 240 seconds) 2017-06-16T19:16:38Z sz0 quit (Quit: Connection closed for inactivity) 2017-06-16T19:22:14Z p9s joined #scheme 2017-06-16T19:24:01Z nckx quit (Quit: restarting my GuixSD server) 2017-06-16T19:24:52Z alezost quit (Quit: I live in GuixSD and Emacs ) 2017-06-16T19:25:12Z ecraven: I'd love some sort of gamified tutorial, to actually train myself to use all the bindings that paredit has, not just the five or so I use currently :-/ 2017-06-16T19:25:18Z nckx joined #scheme 2017-06-16T19:25:46Z ecraven: just recently started using M-S (paredit-split-sexp) 2017-06-16T19:26:21Z Riastradh: rain1: I fixed a bug in paredit-raise-sexp reindentation a couple months ago. 2017-06-16T19:26:22Z ecraven: something like vim-golf, but for paredit with s-expressions 2017-06-16T19:27:09Z p9s quit (Ping timeout: 258 seconds) 2017-06-16T19:27:39Z p9s joined #scheme 2017-06-16T19:28:48Z happy_gnu joined #scheme 2017-06-16T19:29:50Z Riastradh: ecraven: Want to make a draft or proof of concept? 2017-06-16T19:30:01Z Riastradh: You might seed it with examples you can find in the automatic tests. 2017-06-16T19:34:18Z aeth: ecraven: That's really the way to learn, though. Just learn the basics and then over years slowly add one or two over time. 2017-06-16T19:41:00Z cemerick quit (Ping timeout: 268 seconds) 2017-06-16T19:41:17Z Riastradh: Someone did make a screencast a while back... 2017-06-16T19:41:19Z Riastradh: I forget who. 2017-06-16T19:41:32Z ober2 joined #scheme 2017-06-16T19:44:26Z ober2 left #scheme 2017-06-16T19:47:44Z sophiag joined #scheme 2017-06-16T19:51:49Z ec is now known as purr 2017-06-16T19:51:56Z purr is now known as elliottcable 2017-06-16T20:00:58Z sophiag: anyone in here? i'm trying to wrap my head around call/cc and could use some help with some examples 2017-06-16T20:01:31Z rain1: sure 2017-06-16T20:01:37Z sophiag: ah, hi! 2017-06-16T20:01:42Z rain1: whats up? 2017-06-16T20:02:02Z Riastradh: (define (find satisfactory? list) (call-with-current-continuation (lambda (exit) (for-each (lambda (element) (if (satisfactory? element) (exit element))) list) #f))) 2017-06-16T20:02:44Z sophiag: so here's an example: http://lpaste.net/356291 2017-06-16T20:03:02Z sophiag: i have a polynomial defined as a regular scheme procedure 2017-06-16T20:03:05Z sleffy quit (Ping timeout: 240 seconds) 2017-06-16T20:03:23Z sophiag: and i'm trying to play with refplacing instances of the parameter with continuations using set! 2017-06-16T20:03:36Z sophiag: but guile is telling me they're unbound 2017-06-16T20:03:52Z rain1: well x1 doesn't exist 2017-06-16T20:04:03Z sophiag: oh, should i use begin? 2017-06-16T20:04:11Z rain1: there is no variable called x1 2017-06-16T20:04:16Z rain1: theres x and y and k 2017-06-16T20:04:32Z rain1: it needs to be bound before you can use set! on it 2017-06-16T20:04:57Z sophiag: oh, so if i want to be able to access it globally i need to define it first? 2017-06-16T20:05:04Z Riastradh: sophiag: There are basically three main uses: early exit, coroutines, and mind-bending puzzles. It appears you are trying to focus on the last category. 2017-06-16T20:05:05Z rain1: yeah you could just do (define x1 #f) 2017-06-16T20:05:25Z sophiag: Riastradh: ha. yeah. i understand the other ones. not this so much 2017-06-16T20:05:27Z rain1: i think there's still something wrong here 2017-06-16T20:05:37Z Riastradh: sophiag: I gave you an example of the first use -- early exit from procedures that don't otherwise have a way to allow early exit. 2017-06-16T20:05:38Z rain1: you're doing (* 2 x ) 2017-06-16T20:05:48Z rain1: but k isn't a number 2017-06-16T20:06:00Z rain1: did you mean to return y from that? 2017-06-16T20:06:20Z sophiag: well, that's the other thing...i'm wondering how to call it? 2017-06-16T20:06:36Z rain1: since k is going to be a function 2017-06-16T20:06:36Z sophiag: so that i can pass both x and y and the continuation 2017-06-16T20:06:39Z rain1: you cant use * on a function 2017-06-16T20:07:21Z sophiag: so do i actually not want a lambda there? 2017-06-16T20:07:31Z rain1: line 11 2017-06-16T20:07:43Z rain1: that k there is a function, shouldn't it be a number? 2017-06-16T20:08:37Z sophiag: to give an overview...what i want to build up to is replacing every occurrence of each parameter in the body with a continuation bound to a variable. so like x1 x2 y1 y2. and then after that, if possible, write a macro that does that for any function 2017-06-16T20:09:16Z rain1: why dont you change line 11 from k))) to 12))) 2017-06-16T20:09:55Z muelleme_ quit (Ping timeout: 246 seconds) 2017-06-16T20:10:33Z sophiag: right, but then can i still change that value? 2017-06-16T20:11:56Z JoshS joined #scheme 2017-06-16T20:12:19Z rain1: well.. no, because the continuation code is not correct 2017-06-16T20:12:24Z rain1: but we have to fix one thing at a time 2017-06-16T20:12:36Z rain1: trying to multiply a number with a function is a big problem 2017-06-16T20:12:41Z sophiag: ok, well i have a number in place of where the bound variable was 2017-06-16T20:13:06Z Riastradh: rain1: I don't see the problem -- there's a natural interpretation of pointwise multiplication! 2017-06-16T20:13:50Z Riastradh: Heh. In this case, that would mean that any arithmetic operation is actually the identity on any single continuation procedure. 2017-06-16T20:14:11Z Riastradh: Ha. Furthermore, it serves as an unspecified choice operator on any set of continuation procedures. 2017-06-16T20:14:22Z Riastradh: (Don't mind me, I'm just playing semantic Scheme jokes to myself in my head.) 2017-06-16T20:15:30Z sophiag: that's actually sort of how i thought it worked tbh 2017-06-16T20:15:52Z Riastradh: Scheme does not automatically extend arithmetic on functions to be the pointwise interpretation. 2017-06-16T20:16:01Z Riastradh: So (+ 1 (lambda (x) x)) is not the same as (lambda (x) (+ 1 x)) -- instead, it is an error. 2017-06-16T20:16:06Z sophiag: like if i used the identity function inside the continuation and set the bound variable to a global then i could just replace it like a hole in the function 2017-06-16T20:16:07Z nilg joined #scheme 2017-06-16T20:16:17Z ijp: speaking of mind-bending puzzles, I never did come up with an explanation of the ying-yang puzzle that I was happy with 2017-06-16T20:18:44Z sophiag: i don't think i'm ready for the ying-yang puzzle :p 2017-06-16T20:21:34Z sophiag: so...where do i go from here? 2017-06-16T20:25:43Z sophiag: like if i have (call/cc (lambda (k) (set! foo k) 1)) then calling (set! foo 2) obviously doesn't change the value of 1... 2017-06-16T20:26:05Z sophiag: should it be something like (call/cc (lambda (k) (set! foo k) (k 1)))? 2017-06-16T20:26:15Z sophiag: that's still applying a procedure 2017-06-16T20:29:22Z ijp: those two sexps are equivalent 2017-06-16T20:30:02Z sophiag: right 2017-06-16T20:30:30Z sophiag: what i'm getting at obviously is how do i actually make this a continuation i can use by updating the value i set! it to? 2017-06-16T20:32:49Z ijp: I don't understand the question 2017-06-16T20:32:53Z rain1: what i would say is dont use call/cc but reset and shift instead 2017-06-16T20:32:57Z rain1: they are much easier to understand 2017-06-16T20:33:38Z sophiag: ha. that was actually going to be where i was going next 2017-06-16T20:33:54Z sophiag: i just figured using call/cc with set! was an easier way to start 2017-06-16T20:34:25Z sophiag: but as long as you understand the idea of what i'm trying to do, i might as well use shift and reset. i'm just not sure how to implement it iether way 2017-06-16T20:34:48Z rain1: as for what you're actually trying to do 2017-06-16T20:34:56Z rain1: cant you just do it with lambda? and no continuations 2017-06-16T20:35:16Z rain1: (define (make-polynomial a b c d) (lambda (x y) (+ (* a x) ...))) something like that 2017-06-16T20:36:35Z sophiag: but then i can't manipulate the bound variable outside of the function call 2017-06-16T20:37:02Z rain1: ah 2017-06-16T20:37:15Z sophiag: the idea eventually is to write a macro that adds these hooks so i can manipulate the parameters 2017-06-16T20:37:47Z sophiag: (although i went straight to clojure after finishing sicp so the two parts of scheme i'm unfamiliar with are macros and continuations...) 2017-06-16T20:38:02Z sophiag: clojure macros are quite different. a lot of quasiquoting 2017-06-16T20:40:05Z rain1: well 2017-06-16T20:40:19Z rain1: the best advice i can give for designing this is start with the API 2017-06-16T20:40:34Z rain1: make up the syntax of how you'd like the macro to look 2017-06-16T20:40:47Z ecraven: Riastradh: I'll give it a try, probably the best way to learn it anyway, to explain it ;) 2017-06-16T20:40:48Z rain1: and how would you use to define a function then manipulate its parameters later 2017-06-16T20:41:03Z rain1: once you've got those blueprints you can start to figure out the details 2017-06-16T20:41:13Z sophiag: i'd like to understand the continuations part first 2017-06-16T20:41:15Z rain1: the details being whether you want to use lambda or continuations or some other way to implement it 2017-06-16T20:41:22Z sophiag: otherwise it's hard for me to think of the rest 2017-06-16T20:42:33Z sophiag: so like i'm starting by trying to add continuations for each instance of the parameters in this simple function. then i know how i'd write the macro in clojure so it's really just about understanding scheme macros 2017-06-16T20:42:37Z ertes joined #scheme 2017-06-16T20:42:47Z jaziz joined #scheme 2017-06-16T20:54:11Z torbo joined #scheme 2017-06-16T20:54:40Z pierpa joined #scheme 2017-06-16T20:56:14Z sophiag: rain1: i get that i can just replace whatever parameters in the body i want with a global and then update that, but i'd like to instead make a hole in that parameter and capture it so i can access it globally. does that make sense? one is sort of pre hoc whereas i'd like to be able to do it post hoc 2017-06-16T20:56:42Z rain1: what about straight up just 2017-06-16T20:56:45Z rain1: (define param-1 32) 2017-06-16T20:56:48Z rain1: (define param-2 55) 2017-06-16T20:56:59Z sophiag: yeah that's what i'm doing now 2017-06-16T20:57:01Z rain1: (define (function x y) (do stuf with param-1 param-2)) 2017-06-16T20:57:09Z rain1: ah! in what way is this lacking? 2017-06-16T20:58:52Z sophiag: it's lacking in that i can't really use it to transform an existing function. or at least not in a nice way. because then i'd need to create all the global definitions first. and i'd be fine with them not even being definitions, just parameters i can work with remotely that describe their context 2017-06-16T20:59:29Z sophiag: the idea is if i create a hole in the function i can perturb it to understand things about its context even if i didn't write the function myself 2017-06-16T20:59:35Z sssilver quit (Quit: My MacBook has gone to sleep. ZZZzzz…) 2017-06-16T20:59:47Z sophiag: that's why continuations seemed appealing 2017-06-16T21:01:53Z torbo left #scheme 2017-06-16T21:03:16Z Fox2 joined #scheme 2017-06-16T21:03:56Z sophiag: i've seen call/cc used this way with a lambda inside it and a set! inside that representing a procedure call. so then it's just like a way to turn the capture into a procedure representing what's outside of the call/cc. but i've only seen that done when there aren't any actual parameters to the function 2017-06-16T21:04:40Z sophiag: like (+ (call/cc (lambda (k) (set! *k* k) (k 1) 5))) 2017-06-16T21:04:57Z gravicappa quit (Ping timeout: 240 seconds) 2017-06-16T21:10:45Z pierpa quit (Ping timeout: 260 seconds) 2017-06-16T21:13:27Z nilg quit (Remote host closed the connection) 2017-06-16T21:13:54Z brendyn joined #scheme 2017-06-16T21:16:28Z sophiag: rain1: oh, i just had to fiddle with it a bit :p 2017-06-16T21:16:59Z rain1: oh great you got it? :) 2017-06-16T21:17:15Z sophiag: yeah, one sec and i'll paste a gist with what i was thinking 2017-06-16T21:22:25Z mekeor joined #scheme 2017-06-16T21:23:11Z sophiag left #scheme 2017-06-16T21:23:27Z sophiag joined #scheme 2017-06-16T21:29:03Z Fox2: rain1 is a good man 2017-06-16T21:29:32Z Fox2: his wiki rocks 2017-06-16T21:30:40Z DeeEff joined #scheme 2017-06-16T21:33:56Z sophiag: ah, ok. i got confused a sec. the issue is i can't actually use call/cc with multiple instances of the same parameter like this 2017-06-16T21:34:37Z sophiag: rain1: this is what i have: http://lpaste.net/356291 2017-06-16T21:34:56Z sophiag: x1 and y1 work great... 2017-06-16T21:37:30Z Riastradh quit (Ping timeout: 240 seconds) 2017-06-16T21:37:46Z lritter quit (Ping timeout: 246 seconds) 2017-06-16T21:38:41Z sophiag: i'm clearly missing something fundamental here. both instance of call/cc that aren't in the first expression get ignored 2017-06-16T21:39:39Z sophiag: i think it's just not possible to cps a function like this. unless i can do it with shift/reset? 2017-06-16T21:44:00Z p9s quit (Ping timeout: 258 seconds) 2017-06-16T21:44:24Z Kooda joined #scheme 2017-06-16T21:44:24Z ArthurAGleckler[ joined #scheme 2017-06-16T21:44:31Z M-krsiehl joined #scheme 2017-06-16T22:08:32Z jonaslund quit (Ping timeout: 255 seconds) 2017-06-16T22:13:13Z sophiag: so if i give the functions a definition to begin with then i can call them individually: http://lpaste.net/356291 2017-06-16T22:13:54Z p9s joined #scheme 2017-06-16T22:13:57Z sophiag: i suppose this is something i could implement with a macro. i'd like to see how to do the same thing with shift and reset though 2017-06-16T22:15:02Z rain1: i annotated your past 2017-06-16T22:15:12Z rain1: so if you reload you can see it 2017-06-16T22:15:30Z rain1: nthis way you can change them to any function 2017-06-16T22:15:37Z rain1: they dont have to just be constants 2017-06-16T22:17:50Z sophiag: :p 2017-06-16T22:17:55Z sophiag: thanks 2017-06-16T22:19:01Z p9s quit (Ping timeout: 255 seconds) 2017-06-16T22:19:18Z sophiag: now this is something i should be able to recreate with an arbitrary function using a macro 2017-06-16T22:19:33Z sophiag: although it still bothers me that those lambdas are global :/ 2017-06-16T22:21:54Z rain1: well you could create a record type 2017-06-16T22:22:20Z sophiag: how would that solve this? 2017-06-16T22:22:28Z rain1: to make it not global i mean, it'd be like an object 2017-06-16T22:22:52Z sophiag: oh, you mean have a record that includes both the function and all the corresponding lambdas as separate fields? 2017-06-16T22:22:58Z sophiag: yeah, that's smart actually 2017-06-16T22:29:54Z cemerick joined #scheme 2017-06-16T22:40:03Z muelleme_ joined #scheme 2017-06-16T22:41:04Z cemerick quit (Ping timeout: 268 seconds) 2017-06-16T22:46:00Z muelleme_ quit (Ping timeout: 268 seconds) 2017-06-16T22:46:20Z jcowan quit (Ping timeout: 255 seconds) 2017-06-16T22:58:53Z cemerick joined #scheme 2017-06-16T23:04:55Z jaziz quit (Ping timeout: 246 seconds) 2017-06-16T23:14:44Z p9s joined #scheme