2014-10-03T00:00:15Z karswell` joined #scheme 2014-10-03T00:02:46Z SrPx quit (Ping timeout: 246 seconds) 2014-10-03T00:04:05Z bjz quit (Ping timeout: 244 seconds) 2014-10-03T00:06:06Z hiyosi joined #scheme 2014-10-03T00:10:57Z tcsc quit (Quit: computer sleeping) 2014-10-03T00:12:55Z tcsc joined #scheme 2014-10-03T00:13:25Z jeapostrophe joined #scheme 2014-10-03T00:17:44Z kvda joined #scheme 2014-10-03T00:33:15Z BossKonaSegwaY quit (Ping timeout: 258 seconds) 2014-10-03T00:44:44Z leo2007 quit (Remote host closed the connection) 2014-10-03T00:45:03Z leo2007 joined #scheme 2014-10-03T00:52:45Z tadni` joined #scheme 2014-10-03T00:53:01Z araujo quit (Ping timeout: 260 seconds) 2014-10-03T00:53:39Z araujo joined #scheme 2014-10-03T00:53:57Z tadni quit (Ping timeout: 245 seconds) 2014-10-03T00:55:15Z BossKonaSegwaY joined #scheme 2014-10-03T01:02:41Z aloysius21 joined #scheme 2014-10-03T01:06:03Z aloysius21 quit (Remote host closed the connection) 2014-10-03T01:11:20Z jcowan_ joined #scheme 2014-10-03T01:12:17Z jcowan quit (Ping timeout: 244 seconds) 2014-10-03T01:15:48Z jcowan_ quit (Client Quit) 2014-10-03T01:22:17Z davexunit joined #scheme 2014-10-03T01:23:01Z kobain joined #scheme 2014-10-03T01:23:41Z kobain quit (Max SendQ exceeded) 2014-10-03T01:24:00Z kobain joined #scheme 2014-10-03T01:24:55Z kobain quit (Max SendQ exceeded) 2014-10-03T01:25:12Z kobain joined #scheme 2014-10-03T01:42:17Z tobik quit (Ping timeout: 245 seconds) 2014-10-03T01:43:03Z tobik joined #scheme 2014-10-03T01:43:49Z tadni` quit (Quit: Bedtime.) 2014-10-03T01:54:13Z BossKonaSegwaY quit (Ping timeout: 272 seconds) 2014-10-03T02:09:00Z ovidnis joined #scheme 2014-10-03T02:12:51Z BossKonaSegwaY joined #scheme 2014-10-03T02:31:52Z jeapostrophe quit (Ping timeout: 245 seconds) 2014-10-03T02:32:51Z Rodya_ joined #scheme 2014-10-03T02:53:57Z stepnem quit (Ping timeout: 245 seconds) 2014-10-03T03:01:22Z ovidnis quit (Quit: Lost terminal) 2014-10-03T03:11:51Z davexunit quit (Quit: Later) 2014-10-03T03:23:43Z Alestan joined #scheme 2014-10-03T03:24:28Z Alestan: So I've heard references to implementing domain specific languages in scheme, but now when I go looking I can't find much on how to do it... Anyone got some advice for a newbie? 2014-10-03T03:40:47Z alexei___ joined #scheme 2014-10-03T03:44:22Z hiyosi quit (Ping timeout: 245 seconds) 2014-10-03T03:44:22Z alexei_ quit (Ping timeout: 245 seconds) 2014-10-03T03:51:22Z Alestan quit (Ping timeout: 240 seconds) 2014-10-03T03:52:14Z Alestan joined #scheme 2014-10-03T03:54:02Z joneshf-laptop joined #scheme 2014-10-03T04:08:27Z jusss joined #scheme 2014-10-03T04:10:48Z hiyosi joined #scheme 2014-10-03T04:14:48Z sheilong quit (Quit: Konversation terminated!) 2014-10-03T04:15:35Z hiyosi quit (Ping timeout: 258 seconds) 2014-10-03T04:16:08Z kobain quit (Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/) 2014-10-03T04:47:01Z MichaelRaskin joined #scheme 2014-10-03T04:47:16Z lrs joined #scheme 2014-10-03T04:50:39Z Riastradh quit (Ping timeout: 264 seconds) 2014-10-03T05:01:41Z alexei___ quit (Ping timeout: 272 seconds) 2014-10-03T05:05:15Z tcsc quit (Quit: computer sleeping) 2014-10-03T05:08:39Z aoh quit (Changing host) 2014-10-03T05:08:39Z aoh joined #scheme 2014-10-03T05:11:38Z hiyosi joined #scheme 2014-10-03T05:12:48Z alexei___ joined #scheme 2014-10-03T05:16:07Z hiyosi quit (Ping timeout: 245 seconds) 2014-10-03T05:26:32Z masm joined #scheme 2014-10-03T05:28:20Z jusss quit (Ping timeout: 260 seconds) 2014-10-03T05:44:49Z kazimir42 quit (Remote host closed the connection) 2014-10-03T05:48:57Z alexei___ quit (Ping timeout: 245 seconds) 2014-10-03T05:56:48Z joneshf-laptop quit (Ping timeout: 260 seconds) 2014-10-03T05:58:14Z kobain joined #scheme 2014-10-03T06:12:27Z hiyosi joined #scheme 2014-10-03T06:14:19Z germ13 joined #scheme 2014-10-03T06:17:20Z hiyosi quit (Ping timeout: 260 seconds) 2014-10-03T06:18:36Z Rodya_ quit (Quit: Ex-Chat) 2014-10-03T06:21:48Z kongtomorrow joined #scheme 2014-10-03T06:29:13Z ecraven: Alestan: one way is by extending the language to include whatever your dsl needs 2014-10-03T06:29:33Z ecraven: so if you want a DSL for describing picture manipulations, you do what SICP (or some other textbooks) do 2014-10-03T06:32:58Z mrowe is now known as mrowe_away 2014-10-03T06:45:54Z c107 quit (Read error: Connection reset by peer) 2014-10-03T06:52:25Z lrs quit (Ping timeout: 260 seconds) 2014-10-03T06:55:51Z Perkol joined #scheme 2014-10-03T07:10:23Z ventonegro joined #scheme 2014-10-03T07:11:53Z rtra joined #scheme 2014-10-03T07:13:11Z hiyosi joined #scheme 2014-10-03T07:18:00Z hiyosi quit (Ping timeout: 260 seconds) 2014-10-03T07:18:52Z CaptainRant joined #scheme 2014-10-03T07:26:53Z CaptainRant quit (Quit: WeeChat 0.4.3) 2014-10-03T07:41:31Z civodul joined #scheme 2014-10-03T07:46:24Z vukcrni quit (Remote host closed the connection) 2014-10-03T07:48:39Z vukcrni joined #scheme 2014-10-03T07:53:31Z fridim__ joined #scheme 2014-10-03T08:00:47Z frkout_ joined #scheme 2014-10-03T08:04:58Z frkout quit (Ping timeout: 272 seconds) 2014-10-03T08:11:37Z kongtomorrow quit 2014-10-03T08:11:38Z drdanmaku quit (Quit: Connection closed for inactivity) 2014-10-03T08:14:12Z hiyosi joined #scheme 2014-10-03T08:15:24Z Perkol quit (Remote host closed the connection) 2014-10-03T08:19:09Z hiyosi quit (Ping timeout: 260 seconds) 2014-10-03T08:28:47Z kobain quit (Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/) 2014-10-03T08:38:07Z lrs joined #scheme 2014-10-03T08:40:32Z yacks quit (Read error: Connection reset by peer) 2014-10-03T08:48:28Z germ13 quit (Quit: Leaving) 2014-10-03T08:54:07Z BossKonaSegwaY quit (Ping timeout: 272 seconds) 2014-10-03T08:56:27Z stepnem joined #scheme 2014-10-03T09:09:49Z BossKonaSegwaY joined #scheme 2014-10-03T09:09:58Z kvda quit (Quit: z____z) 2014-10-03T09:13:16Z CaptainRant joined #scheme 2014-10-03T09:14:35Z CaptainRant: Has string-copy any use other than it may be distinct from its input ? 2014-10-03T09:14:46Z CaptainRant: *the output string 2014-10-03T09:14:54Z hiyosi joined #scheme 2014-10-03T09:14:56Z taylanub: Alestan: you just use macros. you can make EDLSs (embedded DSLs) in other languages too; it's just that you'll be limited by the fact that you have to do everything via function-calls. sometimes function calls aren't adequate to fully abstract something, which is where macros come in play 2014-10-03T09:15:20Z yacks joined #scheme 2014-10-03T09:15:30Z taylanub: CaptainRant: since strings are mutable, that's indeed its only purpose. if strings were immutable, there would be no string-copy 2014-10-03T09:16:20Z CaptainRant: So if i avoid mutations, i don't need to worry ? 2014-10-03T09:17:03Z taylanub: if you don't make use of any operations that mutate strings, you won't ever need string-copy 2014-10-03T09:17:31Z taylanub: (that includes any APIs which might mutate strings implicitly...) 2014-10-03T09:19:22Z hiyosi quit (Ping timeout: 240 seconds) 2014-10-03T09:22:51Z robot-beethoven quit (Quit: ERC Version 5.3 (IRC client for Emacs)) 2014-10-03T09:29:12Z yacks quit (Remote host closed the connection) 2014-10-03T09:34:34Z CaptainRant quit (Quit: WeeChat 0.4.3) 2014-10-03T09:35:40Z ilammy joined #scheme 2014-10-03T09:43:45Z vanila joined #scheme 2014-10-03T09:48:52Z dmiles_afk quit (Read error: Connection reset by peer) 2014-10-03T09:52:32Z pnkfelix joined #scheme 2014-10-03T09:53:28Z dmiles_afk joined #scheme 2014-10-03T10:00:13Z lrs quit (Ping timeout: 272 seconds) 2014-10-03T10:03:01Z pjdelport quit (Quit: Connection closed for inactivity) 2014-10-03T10:07:09Z gravicappa joined #scheme 2014-10-03T10:07:44Z tadni joined #scheme 2014-10-03T10:09:49Z Alestan quit (Ping timeout: 260 seconds) 2014-10-03T10:11:45Z yacks joined #scheme 2014-10-03T10:15:49Z hiyosi joined #scheme 2014-10-03T10:18:03Z BitPuffin joined #scheme 2014-10-03T10:20:14Z hiyosi quit (Ping timeout: 250 seconds) 2014-10-03T10:23:48Z kvda joined #scheme 2014-10-03T10:29:01Z bjz joined #scheme 2014-10-03T10:32:02Z kvda quit (Quit: z____z) 2014-10-03T10:41:25Z bjz quit (Read error: Connection reset by peer) 2014-10-03T10:41:28Z bjz_ joined #scheme 2014-10-03T10:49:37Z oleo is now known as Guest82020 2014-10-03T10:51:13Z oleo__ joined #scheme 2014-10-03T10:52:43Z Guest82020 quit (Ping timeout: 258 seconds) 2014-10-03T10:53:47Z jusss joined #scheme 2014-10-03T10:57:19Z civodul quit (Quit: ERC Version 5.3 (IRC client for Emacs)) 2014-10-03T11:13:31Z pnkfelix quit (Quit: rcirc on GNU Emacs 24.3.92.1) 2014-10-03T11:13:46Z vanila quit (Quit: Leaving) 2014-10-03T11:13:47Z pnkfelix joined #scheme 2014-10-03T11:16:30Z hiyosi joined #scheme 2014-10-03T11:18:55Z vanila joined #scheme 2014-10-03T11:20:17Z kbtr_ joined #scheme 2014-10-03T11:20:17Z kbtr_ quit (Client Quit) 2014-10-03T11:21:02Z hiyosi quit (Ping timeout: 245 seconds) 2014-10-03T11:35:02Z lrs joined #scheme 2014-10-03T11:45:06Z oldskirt joined #scheme 2014-10-03T12:03:24Z leppie quit (Ping timeout: 246 seconds) 2014-10-03T12:05:02Z leppie joined #scheme 2014-10-03T12:06:22Z bjz_ quit (Quit: Textual IRC Client: www.textualapp.com) 2014-10-03T12:06:40Z bjz joined #scheme 2014-10-03T12:12:07Z MichaelRaskin quit (Quit: MichaelRaskin) 2014-10-03T12:14:50Z CaptainRant joined #scheme 2014-10-03T12:17:22Z hiyosi joined #scheme 2014-10-03T12:21:57Z hiyosi quit (Ping timeout: 246 seconds) 2014-10-03T12:22:32Z BitPuffin quit (Quit: See you on the dark side of the moon!) 2014-10-03T12:33:32Z jusss quit (Remote host closed the connection) 2014-10-03T12:38:32Z drdanmaku joined #scheme 2014-10-03T12:43:32Z jusss joined #scheme 2014-10-03T12:45:51Z Blkt quit (Remote host closed the connection) 2014-10-03T12:45:59Z Blkt joined #scheme 2014-10-03T12:47:52Z developernotes joined #scheme 2014-10-03T12:51:57Z eli quit (Ping timeout: 245 seconds) 2014-10-03T12:52:21Z jeapostrophe joined #scheme 2014-10-03T12:52:32Z jeapostrophe quit (Changing host) 2014-10-03T12:52:33Z jeapostrophe joined #scheme 2014-10-03T12:59:51Z gravicappa quit (Ping timeout: 272 seconds) 2014-10-03T13:06:35Z jusss quit (Remote host closed the connection) 2014-10-03T13:10:14Z joneshf-laptop joined #scheme 2014-10-03T13:12:46Z eli joined #scheme 2014-10-03T13:17:47Z pjdelport joined #scheme 2014-10-03T13:18:10Z hiyosi joined #scheme 2014-10-03T13:22:34Z jusss joined #scheme 2014-10-03T13:34:14Z gravicappa joined #scheme 2014-10-03T13:40:05Z c107 joined #scheme 2014-10-03T13:41:34Z taylanub quit (Disconnected by services) 2014-10-03T13:42:09Z taylanub joined #scheme 2014-10-03T13:52:35Z yuv- joined #scheme 2014-10-03T14:12:25Z aranhoide joined #scheme 2014-10-03T14:14:23Z jusss quit (Quit: ERC Version 5.2 (IRC client for Emacs)) 2014-10-03T14:17:25Z davexunit joined #scheme 2014-10-03T14:26:44Z iterrogo joined #scheme 2014-10-03T14:45:24Z oleo__ is now known as oleo 2014-10-03T14:47:07Z Nizumzen joined #scheme 2014-10-03T14:54:05Z BossKonaSegwaY quit (Ping timeout: 272 seconds) 2014-10-03T15:08:00Z BossKonaSegwaY joined #scheme 2014-10-03T15:22:35Z theseb joined #scheme 2014-10-03T15:26:09Z c107 quit (Remote host closed the connection) 2014-10-03T15:30:47Z oleo quit (Quit: Verlassend) 2014-10-03T15:30:58Z b4283 joined #scheme 2014-10-03T15:33:07Z BossKonaSegwaY quit (Ping timeout: 272 seconds) 2014-10-03T15:33:08Z oleo joined #scheme 2014-10-03T15:36:55Z leo2007 quit (Quit: rcirc on GNU Emacs 25.0.50.4) 2014-10-03T15:46:30Z CaptainRant: To which point the syntax can be extended ? It feels like the semantics are extended rather than the syntax 2014-10-03T15:46:55Z taylanub: CaptainRant: ? 2014-10-03T15:47:37Z CaptainRant: Using syntax-rules and all this features. Are they really able to extend the syntax, or just influence their semantics ? 2014-10-03T15:48:47Z taylanub: depends on how you define syntax and semantics respectively I guess. but given that macros are always implemented in terms of other constructs existing in the language, you could say they add no semantics. indeed they're mostly seen as "syntax extensions" 2014-10-03T15:48:49Z BossKonaSegwaY joined #scheme 2014-10-03T15:53:50Z vanila: syntax rules lets you define new macros 2014-10-03T15:56:45Z developernotes quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) 2014-10-03T15:56:58Z developernotes joined #scheme 2014-10-03T15:57:43Z leo2007 joined #scheme 2014-10-03T16:00:04Z civodul joined #scheme 2014-10-03T16:00:15Z ilammy: CaptainRant, Lisp-like languages have two layers of syntax 2014-10-03T16:00:59Z ilammy: the one is so-called 'extenal representation' which codifies all those rules like 'lists are written in parenthesis' 2014-10-03T16:01:42Z ilammy: and the other one is the syntax of forms, which is codified by special forms, procedure calls, and macros 2014-10-03T16:02:29Z ilammy: You cannot extend semantics of forms via macros. There are only special forms and procedures calls in the end. This cannot be changed in any way. 2014-10-03T16:03:19Z ilammy: But of course any macro and expression has its own implied semantics which is obtained by combining the semantics of its parts. 2014-10-03T16:05:49Z ilammy: Well, this is mostly terminological question... to treat abstractions as having their own semantics or not. 2014-10-03T16:06:31Z ilammy: I'd rather say that macros are 'syntactical abstractions' rather than extension. 2014-10-03T16:06:35Z theseb: SAY!!! i read that R6RS will introduce unhygenic macros to scheme?!?!? 2014-10-03T16:06:37Z theseb: is that right? 2014-10-03T16:06:55Z CaptainRant: Isn't R7RS what the cool kids use nowadays ? 2014-10-03T16:07:01Z theseb: old skool macros are coming back??? 2014-10-03T16:07:01Z ilammy: Just like records, lists, vectors are data abstraction, and procedures are behavioral abstractions. 2014-10-03T16:07:02Z theseb: why? 2014-10-03T16:07:24Z vanila: syntactic-closures are good 2014-10-03T16:07:33Z civodul quit (Remote host closed the connection) 2014-10-03T16:08:51Z ilammy: theseb, I thought 'old skool' macros are stuff like define-macro from CL and rusty fexprs 2014-10-03T16:09:21Z ilammy: And unhygiene to be introduced will be controlled unhygiene. 2014-10-03T16:10:13Z ilammy: CaptainRant, I doubt. R6RS has more batteries. 2014-10-03T16:12:30Z joneshf-laptop quit (Remote host closed the connection) 2014-10-03T16:12:33Z atomx joined #scheme 2014-10-03T16:12:44Z developernotes quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) 2014-10-03T16:13:27Z kongtomorrow joined #scheme 2014-10-03T16:14:37Z ilammy: But yeah, I'm using R7RS for fun... 2014-10-03T16:14:41Z developernotes joined #scheme 2014-10-03T16:17:22Z daviid joined #scheme 2014-10-03T16:17:44Z kongtomorrow quit (Ping timeout: 250 seconds) 2014-10-03T16:20:04Z taylanub: theseb: can you please stop abusing exclamation/question marks? R6RS, and most credible implementations, have syntax-case. it's hygienic by default, and can break hygiene deliberately. 2014-10-03T16:20:46Z LeoNerd idly wonders what a scheme function whose name was foo??? might mean 2014-10-03T16:21:10Z theseb: taylanub: wait...so by unhygenic they mean you'll still use syntax-case?.....it doesn't mean defmacro is coming back? 2014-10-03T16:21:10Z taylanub: it returns, like, a very boolean value? 2014-10-03T16:21:12Z LeoNerd: Presumably it's a predicate test function that returns true iff it's given the foo?? predicate test 2014-10-03T16:21:17Z LeoNerd: (foo??? foo??) => #t 2014-10-03T16:21:27Z theseb: taylanub: that bites 2014-10-03T16:21:34Z developernotes quit (Quit: Textual IRC Client: www.textualapp.com) 2014-10-03T16:21:37Z taylanub: theseb: I don't think defmacro is ever coming back to Scheme. and R6RS has been out since ages... 2014-10-03T16:22:29Z taylanub hands theseb a joint ... just .. chill 2014-10-03T16:24:05Z pnkfelix quit (Ping timeout: 260 seconds) 2014-10-03T16:26:52Z theseb: taylanub: but i loooove defmacro quick and dirty macros....they were sooo easy 2014-10-03T16:27:06Z theseb: and no thanks..i don't touch the stuff :) 2014-10-03T16:27:06Z taylanub: they're harmful. it's best to not ever use them. 2014-10-03T16:27:14Z vanila: they're bad 2014-10-03T16:27:24Z theseb: nothing a little gensym action can't fix 2014-10-03T16:27:33Z vanila: gensym only fixes one issue of hygiene 2014-10-03T16:27:38Z vanila: and you have to do it manually 2014-10-03T16:27:55Z MichaelRaskin joined #scheme 2014-10-03T16:28:12Z theseb: iirc....old skool gensym macros only had issues when folks do insane stuff like redefine lambda, car,cdr or other monkey biz 2014-10-03T16:28:23Z theseb: right? 2014-10-03T16:28:28Z vanila: yes 2014-10-03T16:28:38Z vanila: or any other name 2014-10-03T16:28:43Z Guest_____ joined #scheme 2014-10-03T16:29:02Z Guest_____: How would I convert normal time to Naval time in scheme? 2014-10-03T16:29:06Z taylanub: (define (copy-pair pair) (let ((car (car pair)) (cdr (cdr pair))) (cons car cdr))) 2014-10-03T16:29:31Z taylanub: theseb: ^ maybe it's a contrived example, but you get the idea 2014-10-03T16:29:40Z taylanub: "it happens" 2014-10-03T16:30:03Z taylanub: Guest_____: what's naval time? 2014-10-03T16:30:13Z Guest_____: With (define (ToNavyTime hour ampm) and cond 2014-10-03T16:30:29Z taylanub: anyway, I don't think any Scheme standard defines procedures to deal with timezones 2014-10-03T16:30:39Z Guest_____: Normal time: 12 pm would be Naval TIme: 12 2014-10-03T16:30:50Z taylanub: oh, homework? 2014-10-03T16:30:54Z Guest_____: Normal TIme: 12 am would be Naval Time: 0 2014-10-03T16:31:04Z Guest_____: taylanub yes homeowrk 2014-10-03T16:31:11Z Guest_____: * homework 2014-10-03T16:32:17Z Guest_____: Here I got this far: http://prntscr.com/4sp127 2014-10-03T16:32:36Z taylanub: copypaste code into a pastebin like paste.lisp.org please, no screenshot 2014-10-03T16:33:14Z taylanub: what values does ampm have? 0 for am, 1 for pm, or what? 2014-10-03T16:33:51Z Guest_____: My bad. http://paste.lisp.org/display/143927 2014-10-03T16:34:07Z Guest_____: am is 0 pm is 1 2014-10-03T16:34:18Z taylanub: (by the way, in lisp/scheme, we prefer names like foo-bar-baz instead of FooBarBaz) 2014-10-03T16:34:40Z taylanub: Guest_____: re-read how exactly cond works 2014-10-03T16:34:41Z Guest_____: Function names and variable names given by teacher 2014-10-03T16:34:43Z Guest_____: I gtg 2014-10-03T16:34:47Z Guest_____: Ill come back later 2014-10-03T16:34:59Z taylanub: might want to pick a proper nick too, BTW 2014-10-03T16:35:00Z taylanub: laters 2014-10-03T16:35:03Z Guest_____: My compsci period is over 2014-10-03T16:35:08Z Guest_____ quit (Quit: Page closed) 2014-10-03T16:36:08Z lrs quit (Ping timeout: 260 seconds) 2014-10-03T16:50:21Z Beluki joined #scheme 2014-10-03T16:55:06Z ilammy: LeoNerd, (set! foo 1) (set!!! foo 1) (set!!!!!111111one foo 1) 2014-10-03T16:59:23Z Uber-Ich joined #scheme 2014-10-03T16:59:59Z Uber-Ich quit (Client Quit) 2014-10-03T17:04:08Z jkraemer quit (Ping timeout: 260 seconds) 2014-10-03T17:05:36Z Beluki quit (Quit: Beluki) 2014-10-03T17:16:44Z alexei___ joined #scheme 2014-10-03T17:16:48Z jkraemer joined #scheme 2014-10-03T17:16:57Z InfusoElAmbulant joined #scheme 2014-10-03T17:22:56Z joneshf-laptop joined #scheme 2014-10-03T17:33:34Z Nizumzen quit (Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/) 2014-10-03T17:35:55Z lrs joined #scheme 2014-10-03T17:49:25Z b4283 quit (Quit: Konversation terminated!) 2014-10-03T17:55:28Z ventonegro quit (Remote host closed the connection) 2014-10-03T18:00:12Z Nizumzen joined #scheme 2014-10-03T18:07:19Z c107 joined #scheme 2014-10-03T18:12:22Z alexei___ quit (Ping timeout: 240 seconds) 2014-10-03T18:12:44Z haroldwu quit (Ping timeout: 260 seconds) 2014-10-03T18:17:38Z theseb left #scheme 2014-10-03T18:22:32Z Nizumzen quit (Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/) 2014-10-03T18:23:30Z hiroakip joined #scheme 2014-10-03T18:33:37Z hiroakip quit (Remote host closed the connection) 2014-10-03T18:34:15Z hiroakip joined #scheme 2014-10-03T18:35:13Z Gyps joined #scheme 2014-10-03T18:36:22Z gravicappa quit (Ping timeout: 240 seconds) 2014-10-03T18:36:41Z jewel quit (Remote host closed the connection) 2014-10-03T18:37:07Z hiroakip quit (Remote host closed the connection) 2014-10-03T18:37:34Z hiroakip joined #scheme 2014-10-03T18:38:54Z hiroakip quit (Remote host closed the connection) 2014-10-03T18:39:22Z hiroakip joined #scheme 2014-10-03T18:47:03Z MouldyOldBones quit (Ping timeout: 264 seconds) 2014-10-03T18:53:45Z MouldyOldBones joined #scheme 2014-10-03T19:04:52Z alexei___ joined #scheme 2014-10-03T19:08:39Z kobain joined #scheme 2014-10-03T19:17:44Z atomx_ joined #scheme 2014-10-03T19:18:22Z Gyps quit (Ping timeout: 240 seconds) 2014-10-03T19:20:10Z Alestan joined #scheme 2014-10-03T19:20:34Z Gyps joined #scheme 2014-10-03T19:30:03Z Gyps quit (Read error: Connection reset by peer) 2014-10-03T19:34:39Z Gyps joined #scheme 2014-10-03T19:39:31Z Gyps quit (Client Quit) 2014-10-03T19:43:11Z Gyps joined #scheme 2014-10-03T19:46:19Z Riastradh joined #scheme 2014-10-03T19:46:27Z hiroakip quit (Ping timeout: 272 seconds) 2014-10-03T19:57:57Z pnpuff joined #scheme 2014-10-03T19:58:00Z tadni` joined #scheme 2014-10-03T19:59:45Z tadni quit (Ping timeout: 272 seconds) 2014-10-03T20:02:19Z pnpuff quit (Client Quit) 2014-10-03T20:04:06Z pnpuff joined #scheme 2014-10-03T20:05:51Z joneshf-laptop quit (Remote host closed the connection) 2014-10-03T20:06:22Z hiyosi quit (Ping timeout: 244 seconds) 2014-10-03T20:07:12Z InfusoElAmbulant quit (Read error: Connection reset by peer) 2014-10-03T20:07:32Z ngz joined #scheme 2014-10-03T20:13:32Z hiroakip joined #scheme 2014-10-03T20:25:16Z Alestan left #scheme 2014-10-03T20:31:48Z Nizumzen joined #scheme 2014-10-03T20:32:15Z Gyps quit (Quit: Gyps) 2014-10-03T20:32:59Z pnpuff: ok, now reading about how internal definitions extend an environment is more clear the rule of letrec 2014-10-03T20:33:47Z sheilong joined #scheme 2014-10-03T20:45:59Z alexei___ quit (Ping timeout: 272 seconds) 2014-10-03T20:46:32Z Fare joined #scheme 2014-10-03T20:49:49Z alexei___ joined #scheme 2014-10-03T20:54:13Z acarrico quit (Ping timeout: 260 seconds) 2014-10-03T20:54:17Z developernotes joined #scheme 2014-10-03T20:55:36Z acarrico joined #scheme 2014-10-03T21:02:51Z hiyosi joined #scheme 2014-10-03T21:07:45Z hiyosi quit (Ping timeout: 272 seconds) 2014-10-03T21:10:56Z hjolt quit (Remote host closed the connection) 2014-10-03T21:14:42Z ngz quit (Read error: No route to host) 2014-10-03T21:15:05Z hiroakip quit (Ping timeout: 244 seconds) 2014-10-03T21:15:06Z ngz joined #scheme 2014-10-03T21:16:52Z jeapostrophe quit (Ping timeout: 240 seconds) 2014-10-03T21:17:09Z fridim__ quit (Ping timeout: 244 seconds) 2014-10-03T21:17:56Z theseb joined #scheme 2014-10-03T21:21:38Z drdanmaku quit (Quit: Connection closed for inactivity) 2014-10-03T21:33:15Z sheilong quit (Quit: Konversation terminated!) 2014-10-03T21:36:50Z theseb quit (Quit: Leaving) 2014-10-03T21:41:50Z tcsc joined #scheme 2014-10-03T21:50:49Z ngz quit (Ping timeout: 272 seconds) 2014-10-03T21:53:54Z jeapostrophe joined #scheme 2014-10-03T21:55:03Z developernotes quit (Quit: Textual IRC Client: www.textualapp.com) 2014-10-03T21:59:29Z CaptainRant quit (Quit: WeeChat 0.4.3) 2014-10-03T22:03:35Z hiyosi joined #scheme 2014-10-03T22:03:48Z masm quit (Quit: Leaving.) 2014-10-03T22:06:12Z pnpuff quit (Ping timeout: 256 seconds) 2014-10-03T22:08:32Z hiyosi quit (Ping timeout: 258 seconds) 2014-10-03T22:11:37Z iterrogo quit (Quit: ERC Version 5.3 (IRC client for Emacs)) 2014-10-03T22:14:48Z MrSavage joined #scheme 2014-10-03T22:15:20Z MrSavage: I'm using DrRacket, how can I see if a procedure is tail-recursive? I remember hearing you can print out the functino calls or something like that? 2014-10-03T22:17:25Z MrSavage: nevermind it was trace 2014-10-03T22:18:52Z lrs quit (Ping timeout: 240 seconds) 2014-10-03T22:21:57Z BossKonaSegwaY quit (Ping timeout: 258 seconds) 2014-10-03T22:27:48Z Nizumzen quit (Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/) 2014-10-03T22:34:32Z pygospa quit (Read error: Connection reset by peer) 2014-10-03T22:35:33Z BossKonaSegwaY joined #scheme 2014-10-03T22:39:41Z drdanmaku joined #scheme 2014-10-03T22:46:55Z pjdelport: MrSavage: Generally, you can see it from inspection. 2014-10-03T22:47:24Z MrSavage: pjdelport: i'm new to scheme and i'm trying to understand how to implement an iteration of a complicated function 2014-10-03T22:47:31Z MrSavage: any tips? 2014-10-03T22:47:32Z pjdelport: Just check that the recursive calls are in tail position (where "tail position" roughly means: the very last thing that the function does) 2014-10-03T22:47:58Z pjdelport: MrSavage: I'm on my way to bed, but i can have a go if it's quick. :) 2014-10-03T22:48:01Z MrSavage: pjdelport: I mean to say I'm trying to implement an iterative version of a complicated function 2014-10-03T22:48:17Z vanila: MrSavage, you can use tail recursion to loop 2014-10-03T22:48:29Z MrSavage: A function f is defined by the rule that f(n) = n if n<4 and f(n) = f(n - 1) + 2f(n - 2) + 3f(n - 3) + 4f(n - 4) if n>= 4 2014-10-03T22:48:42Z vanila: f(n) = f(n - 1) + 2f(n - 2) + 3f(n - 3) + 4f(n - 4) is a linear recurrence 2014-10-03T22:48:56Z MrSavage: i don't understand 2014-10-03T22:49:04Z vanila: it's just a name for that kind of thing 2014-10-03T22:49:12Z vanila: here's a much simpler one: 2014-10-03T22:49:18Z vanila: f(n) = n if n<2 2014-10-03T22:49:27Z vanila: f(n) = f(n-1) + f(n-2) 2014-10-03T22:49:30Z pjdelport: MrSavage: Cool; that's not a function that's trivial to translate, but the pattern of it does allow stating it as a loop. 2014-10-03T22:49:44Z vanila: finding out how to do an iterative version of this will give you the tools you need to do an iterative version of your function 2014-10-03T22:49:58Z pjdelport: MrSavage: Are you familiar with making a loop / tail-recursive version of the Fibonacci function? 2014-10-03T22:50:16Z MrSavage: I see an example and barely understand it 2014-10-03T22:50:58Z MrSavage: I assume to make a procedure iterative, you have to start from the primitive allowed values and iterate a # of times with the operations 2014-10-03T22:51:06Z pjdelport: You might recognize the similarity with the function above: fib(n) = n if n < 2 else fib(n - 1) + fib(n - 2) 2014-10-03T22:51:15Z MrSavage: I have no idea really how it was thought up or the mentality behind creating it 2014-10-03T22:51:26Z MrSavage: I do notice it 2014-10-03T22:51:54Z pjdelport: Have you seen the looping version of fib? 2014-10-03T22:52:03Z pjdelport: (Or can you see how to implement it?) 2014-10-03T22:52:06Z MrSavage: the iterative, yes i'm looking at it from the sicp 2014-10-03T22:52:24Z pjdelport: Cool. 2014-10-03T22:52:47Z MrSavage: I'm still trying to understand how it can apply to this function that i have 2014-10-03T22:52:56Z pjdelport: Yeah; i'm using the term "looping" more or less synonymously with "iterative", in SICP's sense. 2014-10-03T22:53:16Z ilammy: Tail-recursive fib is just a loop: the way one sums up 1 + 1 + 2 + 3 + 5... 2014-10-03T22:53:30Z MrSavage: with that function I wrote, it can never go into the negatives right? 2014-10-03T22:53:33Z vanila: yeah but you have to hold a vector of 2 values 2014-10-03T22:53:42Z ilammy: It's not like with factorial where recursive is almost the same as tail-recursive 2014-10-03T22:53:43Z pjdelport: Well, to make the iterative version of fib, we take advantage of the fact that each recursive call in the above statement only references the two *immediately preceding* values of fib. 2014-10-03T22:55:25Z pjdelport: That means that instead of recursing "backwards" from fib(n) to compute the values of fib(n - 1) and fib(n - 2), we can instead do the computation "forwards": if we know fib(n), and fib(n + 1), we can use them to compute fib(n + 2) 2014-10-03T22:58:47Z tadni`` joined #scheme 2014-10-03T22:59:44Z tadni``` joined #scheme 2014-10-03T22:59:45Z pjdelport: This lets us express the fib function as a single iterative tail-recursive loop that only needs to keep track of the two current values of fib(n) and fib(n + 1), starting from the base cases of 0 and 1, 2014-10-03T23:00:17Z tadni` quit (Ping timeout: 260 seconds) 2014-10-03T23:00:50Z pjdelport: MrSavage: For the function above, you'll need to do essentially the same thing, but instead of keeping track of 2 adjacent values, your loop will have to keep track of 4. 2014-10-03T23:01:39Z pjdelport: And for each iterative step, it will shift this "window" of 4 values forward, by calculating the next value following the current four. 2014-10-03T23:01:55Z pjdelport: Does that make sense/ 2014-10-03T23:01:56Z pjdelport: ? 2014-10-03T23:03:28Z tadni`` quit (Ping timeout: 260 seconds) 2014-10-03T23:04:03Z tadni``` is now known as tadni_ 2014-10-03T23:04:28Z hiyosi joined #scheme 2014-10-03T23:08:30Z MrSavage: pjdelport: that's what I thought 2014-10-03T23:08:37Z MrSavage: pjdelport: yes 2014-10-03T23:09:32Z hiyosi quit (Ping timeout: 260 seconds) 2014-10-03T23:14:12Z oleo is now known as Guest56953 2014-10-03T23:15:49Z oleo__ joined #scheme 2014-10-03T23:17:59Z Guest56953 quit (Ping timeout: 272 seconds) 2014-10-03T23:20:52Z bjz quit (Quit: Textual IRC Client: www.textualapp.com) 2014-10-03T23:21:14Z bjz joined #scheme 2014-10-03T23:31:31Z ilammy quit (Ping timeout: 246 seconds) 2014-10-03T23:35:41Z theseb joined #scheme 2014-10-03T23:39:09Z sbwhitecap joined #scheme 2014-10-03T23:41:13Z davexunit quit (Quit: Later) 2014-10-03T23:56:01Z MrSavage: I finally got it, woohoo1 2014-10-03T23:56:02Z MrSavage: !