00:04:27 -!- phax [~phax@unaffiliated/phax] has quit [Quit: Leaving] 00:08:19 -!- poindontcare [~user@cloudbovina.bovinasancta.com] has quit [Ping timeout: 250 seconds] 00:08:46 -!- masm [~masm@bl18-58-181.dsl.telepac.pt] has quit [Quit: Leaving.] 00:10:07 phao [phao@177.26.82.245] has joined #scheme 00:11:18 poindontcare [~user@cloudbovina.bovinasancta.com] has joined #scheme 00:18:15 -!- Dalek_Baldwin [~Adium@71-84-33-22.dhcp.mtpk.ca.charter.com] has quit [Quit: Leaving.] 00:28:54 -!- cmake is now known as help2man 00:34:12 Dalek_Baldwin [~Adium@108-225-26-178.lightspeed.irvnca.sbcglobal.net] has joined #scheme 00:43:18 -!- jonrafkind [~jon@racket/jonrafkind] has quit [Ping timeout: 264 seconds] 00:50:31 replore_ [~replore@FL1-125-198-84-190.kng.mesh.ad.jp] has joined #scheme 00:54:51 -!- poindontcare [~user@cloudbovina.bovinasancta.com] has quit [Ping timeout: 272 seconds] 00:57:59 poindontcare [~user@cloudbovina.bovinasancta.com] has joined #scheme 01:00:58 -!- dzhus [~dzhus@95-28-55-172.broadband.corbina.ru] has quit [Read error: Operation timed out] 01:06:51 MrFahrenheit [~RageOfTho@cable-77-221-31-226.dynamic.vinet.ba] has joined #scheme 01:10:59 peterhil [~peterhil@91-157-48-51.elisa-laajakaista.fi] has joined #scheme 01:16:28 -!- dan64 [dan64@2600:3c03::f03c:91ff:fedf:7dc0] has quit [Excess Flood] 01:33:25 -!- annodomini [~lambda@wikipedia/lambda] has quit [Quit: annodomini] 01:35:28 -!- replore_ [~replore@FL1-125-198-84-190.kng.mesh.ad.jp] has quit [Read error: Connection reset by peer] 01:38:08 -!- poindontcare [~user@cloudbovina.bovinasancta.com] has quit [Ping timeout: 252 seconds] 01:43:53 -!- ozzloy [~ozzloy@ozzloy.lifeafterking.org] has quit [Changing host] 01:43:53 ozzloy [~ozzloy@unaffiliated/ozzloy] has joined #scheme 01:54:34 poindontcare [~user@cloudbovina.bovinasancta.com] has joined #scheme 01:55:10 dan64- [dan64@2600:3c03::f03c:91ff:fedf:7dc0] has joined #scheme 01:55:10 -!- dan64- [dan64@2600:3c03::f03c:91ff:fedf:7dc0] has quit [Excess Flood] 02:03:48 -!- MrFahrenheit [~RageOfTho@cable-77-221-31-226.dynamic.vinet.ba] has quit [Ping timeout: 252 seconds] 02:04:16 annodomini [~lambda@erlang.Kiewit.dartmouth.edu] has joined #scheme 02:04:16 -!- annodomini [~lambda@erlang.Kiewit.dartmouth.edu] has quit [Client Quit] 02:09:25 dan64- [dan64@2600:3c03::f03c:91ff:fedf:7dc0] has joined #scheme 02:16:51 rbarraud [~rbarraud@222-155-139-54.jetstream.xtra.co.nz] has joined #scheme 02:26:56 realitygrill [~realitygr@ool-18ba5e85.dyn.optonline.net] has joined #scheme 02:31:24 -!- realitygrill [~realitygr@ool-18ba5e85.dyn.optonline.net] has quit [Ping timeout: 246 seconds] 02:32:03 realitygrill [~realitygr@ool-18ba55c0.dyn.optonline.net] has joined #scheme 02:35:07 leo2007 [~leo@222.130.140.155] has joined #scheme 02:37:00 -!- dsmith [~dsmith@cpe-184-56-129-232.neo.res.rr.com] has quit [Ping timeout: 246 seconds] 02:37:17 dsmith [~dsmith@cpe-184-56-129-232.neo.res.rr.com] has joined #scheme 02:37:48 arbn [~arbn@pool-74-98-200-128.pitbpa.fios.verizon.net] has joined #scheme 02:38:43 -!- poindontcare [~user@cloudbovina.bovinasancta.com] has quit [Ping timeout: 272 seconds] 02:49:07 poindontcare [~user@cloudbovina.bovinasancta.com] has joined #scheme 02:56:09 jonrafkind [~jon@racket/jonrafkind] has joined #scheme 02:57:34 -!- leo2007 [~leo@222.130.140.155] has quit [Remote host closed the connection] 03:29:12 -!- phao [phao@177.26.82.245] has left #scheme 03:32:38 -!- hash_table [~quassel@70-138-242-181.lightspeed.hstntx.sbcglobal.net] has quit [Ping timeout: 246 seconds] 03:34:27 -!- poindontcare [~user@cloudbovina.bovinasancta.com] has quit [Ping timeout: 272 seconds] 03:35:32 tejaswidp [~tejaswidp@117.202.20.146] has joined #scheme 03:36:10 lcc [~user@unaffiliated/lcc] has joined #scheme 03:41:11 poindontcare [~user@cloudbovina.bovinasancta.com] has joined #scheme 03:43:21 tertl4 [~tertl3@108-85-16-151.lightspeed.gnvlsc.sbcglobal.net] has joined #scheme 03:48:06 teurastaja [~chatzilla@modemcable034.55-37-24.static.videotron.ca] has joined #scheme 04:00:47 toastp [~toastp@c-76-104-189-93.hsd1.wa.comcast.net] has joined #scheme 04:08:07 fantazo [~fantazo@91-119-221-59.dynamic.xdsl-line.inode.at] has joined #scheme 04:18:07 ThePawnBreak [Cristi@94.177.108.25] has joined #scheme 04:23:47 -!- amliby [~amliby@unaffiliated/amsl] has quit [Read error: Operation timed out] 04:26:17 -!- Dalek_Baldwin [~Adium@108-225-26-178.lightspeed.irvnca.sbcglobal.net] has quit [Quit: Leaving.] 04:26:24 -!- poindontcare [~user@cloudbovina.bovinasancta.com] has quit [Ping timeout: 240 seconds] 04:31:24 -!- realitygrill [~realitygr@ool-18ba55c0.dyn.optonline.net] has quit [Ping timeout: 240 seconds] 04:38:44 -!- teurastaja [~chatzilla@modemcable034.55-37-24.static.videotron.ca] has quit [Ping timeout: 240 seconds] 04:41:20 Dalek_Baldwin [~Adium@71-84-33-22.dhcp.mtpk.ca.charter.com] has joined #scheme 04:44:37 poindontcare [~user@cloudbovina.bovinasancta.com] has joined #scheme 04:47:51 chu [~chu@unaffiliated/chu] has joined #scheme 04:58:31 -!- bfig [~b_fin_g@r186-52-135-139.dialup.adsl.anteldata.net.uy] has quit [Ping timeout: 255 seconds] 05:11:44 bfig [~b_fin_g@r186-52-162-124.dialup.adsl.anteldata.net.uy] has joined #scheme 05:16:24 tejaswi [~tejaswidp@117.202.17.83] has joined #scheme 05:18:57 -!- tejaswidp [~tejaswidp@117.202.20.146] has quit [Ping timeout: 272 seconds] 05:23:43 amliby [~amliby@unaffiliated/amsl] has joined #scheme 05:27:11 -!- fold [~fold@71-8-117-85.dhcp.ftwo.tx.charter.com] has quit [Ping timeout: 272 seconds] 05:30:54 -!- poindontcare [~user@cloudbovina.bovinasancta.com] has quit [Ping timeout: 244 seconds] 05:35:33 -!- jonrafkind [~jon@racket/jonrafkind] has quit [Ping timeout: 244 seconds] 05:37:03 adu [~ajr@pool-108-45-79-219.washdc.fios.verizon.net] has joined #scheme 05:39:58 phao [phao@177.26.82.245] has joined #scheme 05:44:17 -!- ThePawnBreak [Cristi@94.177.108.25] has quit [Ping timeout: 272 seconds] 05:50:07 poindontcare [~user@cloudbovina.bovinasancta.com] has joined #scheme 05:51:42 gravicappa [~gravicapp@ppp91-77-160-166.pppoe.mtu-net.ru] has joined #scheme 06:10:19 ThePawnBreak [Cristi@94.177.108.25] has joined #scheme 06:10:53 -!- tejaswi [~tejaswidp@117.202.17.83] has quit [Ping timeout: 272 seconds] 06:21:02 -!- fantazo [~fantazo@91-119-221-59.dynamic.xdsl-line.inode.at] has quit [Remote host closed the connection] 06:27:00 tejaswidp [~tejaswidp@117.202.17.83] has joined #scheme 06:34:18 -!- poindontcare [~user@cloudbovina.bovinasancta.com] has quit [Ping timeout: 264 seconds] 06:37:38 disciple [~krishna@117.207.102.29] has joined #scheme 06:42:20 -!- dan64- [dan64@2600:3c03::f03c:91ff:fedf:7dc0] has quit [Excess Flood] 06:49:15 -!- disciple [~krishna@117.207.102.29] has quit [Quit: zzzZZZ] 06:54:39 poindontcare [~user@cloudbovina.bovinasancta.com] has joined #scheme 06:56:31 -!- lcc [~user@unaffiliated/lcc] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 06:58:58 lcc [~user@unaffiliated/lcc] has joined #scheme 07:01:41 dan64 [dan64@2600:3c03::f03c:91ff:fedf:7dc0] has joined #scheme 07:01:41 -!- dan64 [dan64@2600:3c03::f03c:91ff:fedf:7dc0] has quit [Excess Flood] 07:14:10 -!- toastp [~toastp@c-76-104-189-93.hsd1.wa.comcast.net] has quit [Quit: Bye] 07:27:25 dan64 [dan64@2600:3c03::f03c:91ff:fedf:7dc0] has joined #scheme 07:27:25 -!- dan64 [dan64@2600:3c03::f03c:91ff:fedf:7dc0] has quit [Excess Flood] 07:31:12 kudkudyak [~user@94.72.136.103] has joined #scheme 07:31:20 pd 07:31:21 pwd 07:31:40 /irc/freenode/#scheme 07:36:06 disciple [~krishna@117.207.102.29] has joined #scheme 07:42:23 -!- poindontcare [~user@cloudbovina.bovinasancta.com] has quit [Ping timeout: 255 seconds] 07:48:08 -!- disciple [~krishna@117.207.102.29] has quit [Quit: zzzZZZ] 07:56:19 -!- lcc [~user@unaffiliated/lcc] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 07:56:45 lcc [~lcc-pi@unaffiliated/lcc] has joined #scheme 07:56:49 -!- lcc [~lcc-pi@unaffiliated/lcc] has quit [Client Quit] 07:57:25 dan64 [dan64@2600:3c03::f03c:91ff:fedf:7dc0] has joined #scheme 07:58:32 lcc [~lcc-pi@unaffiliated/lcc] has joined #scheme 08:00:04 -!- lcc [~lcc-pi@unaffiliated/lcc] has quit [Client Quit] 08:00:41 lcc [~user@unaffiliated/lcc] has joined #scheme 08:15:12 dnolen [~user@cpe-98-14-92-234.nyc.res.rr.com] has joined #scheme 08:16:24 -!- amliby [~amliby@unaffiliated/amsl] has quit [Read error: Operation timed out] 08:18:23 -!- tejaswidp [~tejaswidp@117.202.17.83] has quit [Ping timeout: 240 seconds] 08:19:31 poindontcare [~user@cloudbovina.bovinasancta.com] has joined #scheme 08:30:41 -!- ThePawnBreak [Cristi@94.177.108.25] has quit [Read error: Connection reset by peer] 08:35:25 -!- dnolen [~user@cpe-98-14-92-234.nyc.res.rr.com] has quit [Remote host closed the connection] 08:40:59 -!- adiii [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has quit [Ping timeout: 272 seconds] 08:54:40 ijp: you mean: irc://irc.freenode.org#scheme 09:00:50 tejaswidp [~tejaswidp@117.192.149.103] has joined #scheme 09:06:19 -!- poindontcare [~user@cloudbovina.bovinasancta.com] has quit [Ping timeout: 272 seconds] 09:07:48 masm [~masm@bl18-58-181.dsl.telepac.pt] has joined #scheme 09:10:37 disciple [~krishna@117.207.102.29] has joined #scheme 09:16:12 -!- kudkudyak [~user@94.72.136.103] has quit [Read error: Connection reset by peer] 09:16:43 -!- wbooze [~wbooze@xdsl-78-35-155-2.netcologne.de] has quit [Ping timeout: 240 seconds] 09:16:51 kudkudyak [~user@94.72.136.103] has joined #scheme 09:25:46 answer_42 [~answer_42@gateway/tor-sasl/answer42/x-66983568] has joined #scheme 09:33:17 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 09:36:58 -!- answer_42 [~answer_42@gateway/tor-sasl/answer42/x-66983568] has quit [Remote host closed the connection] 09:37:59 -!- disciple [~krishna@117.207.102.29] has quit [Quit: zzzZZZ] 10:02:54 tejaswi [~tejaswidp@117.192.152.95] has joined #scheme 10:05:03 -!- tejaswidp [~tejaswidp@117.192.149.103] has quit [Ping timeout: 240 seconds] 10:13:54 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 264 seconds] 10:29:37 norton- [~norton@nl118-171-95.student.uu.se] has joined #scheme 10:32:49 Hi, I have a more general question about parsing, but since I am writing a scheme interpreter I'll try to ask here. What is normally the output from a parser? Does it just return the tokens as strings and let the interpreter handle the rest, or, does it also look at the tokens and convert for example numbers in the code to actual numeric data? 10:47:59 I guess it depends 10:48:14 the whole use, afaik, of a parser is to get text into some internal representation 10:48:37 if it's better to leave the number as string of characters, then leave it that way 10:48:50 but I think the actual number would be a better internal representation in most cases 10:49:06 and, depending on the language, you need some more information too 10:49:53 maybe it's a number, but it's a decimal number, so it may be even useful to tag the number with some more information 10:50:06 norton-: the scanner takes a string (or a file), and produce a sequence of tokens. 10:50:21 norton-: the parser takes a sequence of tokens, and produce a syntactic tree. 10:50:32 norton-: the syntactic tree, can be a sexp, which is convenient in lisp. 10:51:24 Here is my next interview problem I have to solve (seems a bit easier than the binary gap one ;p) 10:51:26 Equalization Steps 10:51:26 A non-empty array A containing N integers is given. It can be transformed as follows: each element of the array is increased or decreased by 1. 10:51:26 Write a function that given an array A returns the minimum number of transformations steps to make all the array elements equal. 10:51:26 Return -1 if this is not possible. 10:51:53 So for a scheme interpreter, you'd start with "(if (= a b) (display \"fizz\"))" --(scanner)--> (left-paren if left-paren = a b right-paren left-paren display "fizz" right-paren right-paren) --(parser) (if (= a b) (display "fizz")) 10:52:29 norton-: but your token can be more sophisticated than mere scheme atoms, you can have structures recording source positions and other attributes, so that you may give better error messages and other debugging information. 10:52:41 chturne [~chturne@host86-148-233-236.range86-148.btcentralplus.com] has joined #scheme 10:53:12 leppie, I think this has to do with the diffence of the largest element to the least element 10:53:17 leppie: it's never impossible. 10:53:32 phao: that is correct (from what I can see) 10:53:39 phao: no, since you want to use the minimum number of +1 or -1. 10:53:48 pjb: that are cases where it is not possible eg [1,2,3] 10:54:01 +1 0 -1 10:54:13 0? 10:54:20 pjb: you MUST do -1 or +1 10:54:25 cant skip ;p 10:54:35 Imagine (1 1 1 1 1 10) If you go to the average, you're increasing 5 times 4 +1 and 5 -1, but if you go to 1, you're just using 9 -1. 10:54:45 +1 (+1 -1) -1 10:55:04 also (min + max) mod 2 must equal 0 10:55:06 as I see, you can't do that either 10:55:24 so if you have this constraint of at least one +1 or -1, go to 2 +1 +1 +1 +1 (-1 -1 -1 -1 -1 -1 -1 -1). 10:55:25 yeah leppie I thought of that.. 10:55:34 pjb: which would be the same as saying (+1 0) (+1 -1) (-1 0), which _still_ has 0s 10:56:00 Also if: ((max - target) mod 2) => balance then (x mod 2) == balance where x is any element in the array 10:56:17 Ok so you cannot increment or decrement the elements individually. 10:56:29 that's some of the constraints I have determined so far 10:57:01 no pjb every element must be transformed 10:57:43 disciple [~krishna@117.207.102.29] has joined #scheme 10:57:58 And target is (min + max) div 2 10:58:21 minimum steps seems to be (max - target) 10:58:59 hi all 10:59:35 I think that should be enough to determine a result (if possible) 10:59:52 so, am studying scheme with TSPL4 and I find that using square brackets for let bindings is not working on my preferred scheme (chibi). Is this a R?RS difference? 10:59:53 So it's impossible if the sum of the elements of the vector is odd. 11:00:11 pjb [5,5,5] is valid 11:00:11 Not exactly 11:00:13 leppie, if the number of steps is odd, then can't do? 11:00:26 -!- adu [~ajr@pool-108-45-79-219.washdc.fios.verizon.net] has quit [Quit: adu] 11:00:36 [1,3,3] is 1 step to [2,2,2] 11:00:50 ahh 11:01:01 always good to do a few simple examples manaually :) 11:01:59 It's easy to write an algorithm that's O(n) to find an equalization, but it may not give the minimum number of transformation. 11:02:14 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 11:02:58 leppie, seems to have to do with the fact that 11:02:58 (max - ((min + max) div 2)) should be minimum steps from what I can see 11:03:07 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 11:03:08 after stepping max-target 11:03:20 some other value becomes least (obviously) ehehe 11:03:52 You can sort the elements, since that doesn't change the result of the question. 11:04:08 phao: but that should always be more steps from I can see [5,5,5] => [6,6,6] is good, but pointless ;p 11:04:11 hmm 11:04:16 you can take least and largest 11:04:19 check the end result 11:04:31 and go through the array and check if with N steps, you can get the current value 11:04:33 to the end results 11:04:35 result* 11:04:42 if true for all, then return steps; otherwise, -1 11:04:59 pjb: I dont think that is neccesary, you only have to validate that each (element mod 2) == balance (as defined above) 11:05:10 for example, with 1,3,3, you can find out that steps=1 and end result is 2 11:05:12 Now if you sort and compute the differences e[i+1]-e[i], if any of them is odd there's no solution. 11:05:32 all you need is to go through the array and see if with 1 steps you can get from arr[current] to 2 11:05:32 pjb: that sounds like extra work :) 11:05:37 sounds easy... 11:05:37 Perhaps. 11:06:00 I am going to code this now :) 11:06:16 1,2,3... steps=2, end=2 11:06:23 can with 1 step go from 2 to 2? 11:06:28 no... but how to test for that? 11:06:36 steps=1 ** 11:06:47 [1,2,3] => target = 2, balance = 1, thus (2 mod 2) != balance 11:06:52 invalid 11:07:05 mod? 11:07:19 rudybot: (mod 2 2) 11:07:20 leppie: your sandbox is ready 11:07:20 leppie: error: reference to an identifier before its definition: mod in module: 'program 11:07:28 why mod? 11:07:30 ok mod in the R6RS sense ;p 11:07:47 become the balance is either 0 or 1 11:07:54 if you have mixed odd and even numbers, then it should never be possible, I think 11:07:55 s/become/because/ 11:08:05 hmm 11:08:08 that makes sense ijp 11:08:25 leppie, sorry... what is balance again? hehehe 11:08:41 Definitions: 11:08:42 - (min + max) div 2 => target 11:08:42 - ((max - target) mod 2) => balance 11:08:42 - (max - target) => steps 11:08:58 hmm 11:09:15 and what does balance represents? 11:09:35 ahh... 11:09:38 =D 11:09:38 it is used in the constraints :) 11:09:44 COnstraints: 11:09:44 - (min + max) mod 2 == 0 11:09:44 - (x mod 2) == balance 11:09:58 where x is any element in the array 11:10:16 it tells if the number of steps is odd or even.. 11:10:23 yeah =D 11:10:31 well... seems like problem solved =D 11:10:58 antithesis [~antithesi@s51476e07.adsl.wanadoo.nl] has joined #scheme 11:11:05 is this for job interview leppie ? 11:11:48 yip, now to code and verify for N [1..20000] and x [-20000000..20000000] 11:11:58 phao: yes 11:12:52 it was the second question given, but seeing I could not finish the first one in 2 hours, he said I can do it at home and send him the solution 11:13:03 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 11:13:37 leppie: all in all, this seems much simpler than the other one you were on about 11:13:57 or maybe that's just because I hate bit twiddling 11:14:11 ijp: I agree, not quite 'easy' but much simpler 11:14:20 I hate bit twiddling too 11:14:37 bit-banding is so much nice on embedded devices 11:14:48 s/nice/nicer/ 11:15:19 I am wondering why this assignment is given to you in a job interview 11:16:03 phao: the questions were picked randomly from a bunch they have 11:16:30 incidentally the ones given, they did not have solutions for, so that plays in my favour :) 11:16:38 all of "programming challenge" like questions? 11:17:08 yes, but it was suppose to come from the 'easy' category (doable in 30 minutes or less) 11:17:34 but the binary period one was definitely not 'easy' 11:18:12 binary period? 11:18:40 some electrical engineer gave me an optimal solution for that, and that asked he math professor friend if that is obvious for math experts as he had to think about it for a while too ;p 11:19:23 hmm 11:19:31 what is the question? 11:19:36 Given a number N larger than 0 (range was given, but does not matter), find the minimum period of repeating bit sequences or -1 if none is found. 11:20:37 it comes down to checking the correlation of increasing periods 11:20:41 like 3 in a number with this bit patter 100100100 ? 11:20:51 phao, yes 11:20:55 Must the repeating bit sequences repeat for all the bits? 11:21:06 but 1001001 is also valid 11:21:12 101100100011 --> 3 ? 11:21:43 or even 10010110011 --> 3 ? 11:21:53 nope, i dont see any repeats on a period of 3 there 11:22:01 100 is repeated twice in each. 11:22:27 pjb: for all, but trailing bits can be a subsequence 11:22:58 hmm 11:23:13 10101010101 => 2 11:23:14 111011011101101110 => 7 11:23:14 111111111111111110 => -1 11:23:35 wingo [~wingo@193.144.61.240] has joined #scheme 11:23:40 On the other hand 1(0|1)*1 --> w-1 11:24:00 and 0(0|1)*0 --> w-1 too. 11:24:39 can't you brute force it? 11:24:56 Sure. But the problem is to find an optimal algorithm 11:25:15 yes, that is the approach I took, but an optimal solution is using correlation 11:25:35 FFT would probably the most optimal solution 11:25:48 what is the range leppie ? 11:25:59 I see, thanks for the input, phao and pjb 11:26:02 N > 0 11:26:14 In bit fiddling you can use the natural parallelism of bit processing. 11:26:21 -!- antithesis [~antithesi@s51476e07.adsl.wanadoo.nl] has left #scheme 11:26:21 the problem stated N up to 1 billion, but it does not matter 11:26:44 I hate irrelevant info ;p 11:27:31 You can see more info/examples here: http://www.codeproject.com/Messages/4322225/Interview-follow-up.aspx 11:28:04 I don't like much... these "programming challenges" things 11:28:06 ski: did note it is probably more correct to return 0 instead of -1 if no such period is found 11:28:24 phao: me neither, always makes me think there is some trick involved 11:28:57 I don't like because of the "context" associated 11:29:06 like in "you have 5 hours to solve 10 problems" 11:29:35 true, I like thinking about the problem in detail, the coding should not take long though 11:29:39 I am actually surprised that people are using "solve such problem in 2 hours" to get a job.. Idk if it's a good method or not 11:29:49 but I don't like it 11:30:08 at least the interviewer attempted it at the same time, and got stuck too ;p 11:30:16 hehe 11:38:09 ok I made a mistake some where 11:38:32 leppie, with the steps program? 11:38:49 yip, my constraint is failing :( 11:39:20 leppie: did you check that they were all even/ all odd? 11:40:19 I am using 'balance' wrong somehow 11:40:26 or calculating it wrong 11:40:47 leppie, the test I thought is like this. steps-abs(current_value - end_value) should be even 11:41:00 leppie: shouldn't it be x div 2 not x mod 2? 11:41:31 maybe I've misread it 11:42:18 phao: I think that is the problem :) let me check again ;p 11:42:47 are you using that same test? 11:43:10 rudybot: can you help leppie? 11:43:11 ijp: ok thank you 11:43:19 dont want help ;p 11:43:49 good, he doesn't seem to be offering any :) 11:44:20 aha 11:44:22 haha 11:46:56 The constraint is abs(x - target) mod 2 == balance (where balance == (max - target) mod 2) (I think) 11:50:53 yip that works, thanks phao for the abs pointer ;p 11:51:17 =) 11:51:18 annodomini [~lambda@c-76-23-156-75.hsd1.ma.comcast.net] has joined #scheme 11:51:18 -!- annodomini [~lambda@c-76-23-156-75.hsd1.ma.comcast.net] has quit [Changing host] 11:51:18 annodomini [~lambda@wikipedia/lambda] has joined #scheme 11:51:39 although depending on the definition if mod, it might not be needed, but R7RS got like 40 different version of that already ;p 11:51:47 btw 11:51:47 http://graphics.stanford.edu/~seander/bithacks.html 11:52:05 maybe there is a solution in there for your 1st problem 11:52:07 leppie: shouldn't r6rs mod always return a positive value? 11:52:08 phao: that will invoke a headache instantly ;p 11:52:23 hehe 11:52:46 ijp: dunno, let me see :) yes, that is the case 11:53:21 -!- wingo [~wingo@193.144.61.240] has quit [Read error: Operation timed out] 11:53:23 yes, just checked 11.7.3.1 11:53:44 but % in .NET does not... 11:53:57 leppie: ah, I thought you were doing your answers in scheme 11:53:57 in C# rather 11:54:18 yeah, just thought it would quickly test with C# then write in scheme ;p 11:54:28 wrong way round! :P 11:54:43 -!- norton- [~norton@nl118-171-95.student.uu.se] has quit [Ping timeout: 240 seconds] 11:54:54 afaik, % in C may return negative values 11:55:06 -!- annodomini [~lambda@wikipedia/lambda] has quit [Client Quit] 11:55:31 yes, modulo and division are some of the least standard constructs across programming languages 11:55:36 chturne: the lack of decent debugger for IronScheme hinders test while coding approach (tired of printf's) 11:55:59 quotient, remainder, et al 11:56:03 -!- gravicappa [~gravicapp@ppp91-77-160-166.pppoe.mtu-net.ru] has quit [Ping timeout: 272 seconds] 11:56:08 leppie: use another scheme for debugging? granted that won't work when you use .net libs though 11:56:47 ijp: nope, just using standard R6RS scheme 11:57:51 but these problems seem more suited for C like languages 11:58:47 *ijp* sticks fingers in ears 11:58:53 lalalala I can't hear you :P 11:58:56 like the max element of an array (apply max (vector->list a)) :*( 11:59:30 leppie: (loop ((for v (in-vector a)) (for res (maximising v))) => res) 11:59:34 I do have some nice libraries in IronScheme to deal with that though ;p 11:59:58 er, maximizing 12:00:25 *ijp* tips hat in riastradh's direction 12:01:17 one of these days, I'm just going to add aliases for these American spellings so I don't get confused 12:04:15 MrFahrenheit [~RageOfTho@cable-77-221-31-226.dynamic.vinet.ba] has joined #scheme 12:08:17 Scheme solution using IronScheme libs http://eval.ironscheme.net/?id=60 12:09:16 gravicappa [~gravicapp@ppp91-77-160-166.pppoe.mtu-net.ru] has joined #scheme 12:15:04 b4283 [~b4283@114-47-2-102.dynamic.hinet.net] has joined #scheme 12:18:00 omer [~Omer@41.209.69.227] has joined #scheme 12:18:08 Hello 12:20:02 -!- omer [~Omer@41.209.69.227] has left #scheme 12:20:26 I wonder if his surname is impson ? ;p 12:23:31 norton- [~norton@nl118-171-95.student.uu.se] has joined #scheme 12:23:31 -!- norton- [~norton@nl118-171-95.student.uu.se] has quit [Client Quit] 12:44:30 -!- leppie [~lolcow@196-210-165-161.dynamic.isadsl.co.za] has quit [Ping timeout: 264 seconds] 12:48:35 leppie [~lolcow@196-210-165-161.dynamic.isadsl.co.za] has joined #scheme 12:48:59 samth [~samth@174-124-27-49.dyn.centurytel.net] has joined #scheme 12:48:59 -!- samth [~samth@174-124-27-49.dyn.centurytel.net] has quit [Changing host] 12:48:59 samth [~samth@racket/samth] has joined #scheme 13:03:36 hash_table [~quassel@70-138-242-181.lightspeed.hstntx.sbcglobal.net] has joined #scheme 13:12:52 -!- rbarraud [~rbarraud@222-155-139-54.jetstream.xtra.co.nz] has quit [Ping timeout: 246 seconds] 13:20:05 -!- confab [~confab@086.112-30-64.ftth.swbr.surewest.net] has quit [Quit: Lost terminal] 13:20:09 fold [~fold@71-8-117-85.dhcp.ftwo.tx.charter.com] has joined #scheme 13:21:40 -!- disciple [~krishna@117.207.102.29] has quit [Quit: zzzZZZ] 13:22:43 confab [~win7@086.112-30-64.ftth.swbr.surewest.net] has joined #scheme 13:22:56 -!- phao [phao@177.26.82.245] has quit [Read error: Connection reset by peer] 13:28:30 disciple [~krishna@117.207.102.29] has joined #scheme 13:36:19 -!- FurnaceBoy [~qu1j0t3@kvm5.telegraphics.com.au] has quit [Ping timeout: 246 seconds] 13:37:20 wingo [~wingo@193.144.61.240] has joined #scheme 13:38:41 phao [phao@187.91.120.70] has joined #scheme 13:42:59 qu1j0t3 [~qu1j0t3@vm4.telegraphics.com.au] has joined #scheme 13:43:14 -!- cdidd [~cdidd@95-27-197-239.broadband.corbina.ru] has quit [Remote host closed the connection] 13:44:19 -!- disciple [~krishna@117.207.102.29] has quit [Quit: zzzZZZ] 13:58:18 -!- samth [~samth@racket/samth] has quit [Ping timeout: 264 seconds] 14:02:27 FurnaceBoy [~qu1j0t3@kvm5.telegraphics.com.au] has joined #scheme 14:05:01 jewel_ [~jewel@196-215-88-214.dynamic.isadsl.co.za] has joined #scheme 14:14:37 kk` [~kk@217.155.42.31] has joined #scheme 14:14:38 -!- kk` [~kk@217.155.42.31] has quit [Changing host] 14:14:38 kk` [~kk@unaffiliated/kk/x-5380134] has joined #scheme 14:16:17 -!- wingo [~wingo@193.144.61.240] has quit [Ping timeout: 250 seconds] 14:19:48 disciple [~krishna@117.207.102.29] has joined #scheme 14:21:20 -!- Dalek_Baldwin [~Adium@71-84-33-22.dhcp.mtpk.ca.charter.com] has quit [Quit: Leaving.] 14:24:57 wbooze [~wbooze@xdsl-78-35-150-240.netcologne.de] has joined #scheme 14:37:43 wingo [~wingo@193.144.61.240] has joined #scheme 14:46:54 -!- Quadrescence [~quad@unaffiliated/quadrescence] has quit [Ping timeout: 264 seconds] 14:57:31 -!- masm [~masm@bl18-58-181.dsl.telepac.pt] has quit [Quit: Leaving.] 14:58:13 Quadrescence [~quad@unaffiliated/quadrescence] has joined #scheme 15:12:46 -!- Euthy [~euthy@unaffiliated/euthydemus] has quit [Quit: leaving] 15:13:01 -!- wingo [~wingo@193.144.61.240] has quit [Quit: Leaving] 15:13:42 disciple : yes, i think being able to use non-round brackets is a Racket (only ?) thing. just use round brackets is the others doesn't work 15:16:21 ski: R6RS thing 15:16:38 mucker [~mucker@183.83.240.198] has joined #scheme 15:16:53 hm, and chibi supports that ? 15:17:25 (/me forgot about it being in r6rs. ty) 15:19:08 I don't know, you could ask foof. I imagine it doesn't because it's mainly R7RS. 15:25:36 -!- disciple [~krishna@117.207.102.29] has quit [Quit: zzzZZZ] 15:26:00 -!- wbooze [~wbooze@xdsl-78-35-150-240.netcologne.de] has quit [Quit: Client Quit] 15:28:53 disciple [~krishna@117.207.102.29] has joined #scheme 15:31:25 adu [~ajr@pool-108-45-79-219.washdc.fios.verizon.net] has joined #scheme 15:38:13 ski: chibi complains :) 15:38:44 coz it aims for R7RS by default 15:39:47 -!- kudkudyak [~user@94.72.136.103] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 15:39:52 brackets are nicer. 15:40:51 rounds brackets are nicer, yes 15:41:11 tupi [~david@177.30.22.179] has joined #scheme 15:41:52 ski: it's been a contentious issue now for at least twenty years... 15:42:44 yeah, i know -- that was meant jokingly 15:44:08 (personally i prefer round brackets, but i don't have a problem with the preferences of other people being different) 15:46:51 -!- jrslepak [~jrslepak@c-71-233-149-127.hsd1.ma.comcast.net] has quit [Read error: Connection reset by peer] 15:47:54 realitygrill [realitygri@nat/hackerschool.com/x-zaexbsuyhxrydegc] has joined #scheme 15:48:10 -!- adu [~ajr@pool-108-45-79-219.washdc.fios.verizon.net] has quit [Quit: adu] 15:50:06 -!- tejaswi [~tejaswidp@117.192.152.95] has quit [Remote host closed the connection] 15:50:07 jrslepak [~jrslepak@c-71-233-149-127.hsd1.ma.comcast.net] has joined #scheme 15:51:59 -!- disciple [~krishna@117.207.102.29] has quit [Quit: zzzZZZ] 15:56:24 different styles of brackets and parenthesis makes it much easier for an editor to point out problems #my2cents 15:57:15 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 16:05:16 cdidd [~cdidd@95-28-79-87.broadband.corbina.ru] has joined #scheme 16:08:15 -!- huangjs [~huangjs@190.8.100.83] has quit [Read error: Connection reset by peer] 16:08:19 disciple [~krishna@117.207.102.29] has joined #scheme 16:09:42 -!- nowhere_man [~pierre@AStrasbourg-551-1-59-201.w83-194.abo.wanadoo.fr] has quit [Ping timeout: 252 seconds] 16:14:04 leppie: I don't think that adds anything (but editing difficulties) more than automatic indentation does. 16:19:36 ski: My best example for their utility is (let loop ([x 1] [y 2]) ...) -- when the expressions become more involved and when there's more than two of them you have to switch to newlines between each binding if you're using only ()s, whereas []s can keep it readable without them (until the line is too long, of course). 16:20:54 ski: probably the place I'm most likely to use it is let-values, otherwise you get a mess like (let-values (((foo bar baz)(quux zot))(((frob xyyzy) veeblefetzer) )) ...) 16:21:14 Yeah, that too, though it's a little more technical. 16:22:01 eli : yes, but why not `(let loop [(x 1) (y 2)] ...)' ? 16:22:10 Specifically, when you're within the confines of a single line, []s can help to avoid breaking them; with ()s you have to break them at some point since otherwise you're resortig to paren-counting, which is universally detested. 16:22:31 (if you had started with that, i would have asked : why not the other one ?) 16:22:36 ski: Note that this way you're losing visual distinguishness. 16:23:04 So ([...] [...]) restores more of that lost information. 16:23:24 vu3rdd [~vu3rdd@122.167.245.174] has joined #scheme 16:23:24 -!- vu3rdd [~vu3rdd@122.167.245.174] has quit [Changing host] 16:23:24 vu3rdd [~vu3rdd@fsf/member/vu3rdd] has joined #scheme 16:24:25 so, you're saying the idea is to use them when you have a list of items, which are not normal expressions/declarations/pattern/&c. but which have a meaning only in the context of the surrounding syntax ? 16:24:47 (such as the binding pairs for `let' above) 16:25:29 -!- leppie [~lolcow@196-210-165-161.dynamic.isadsl.co.za] has quit [Ping timeout: 255 seconds] 16:25:54 -!- phao [phao@187.91.120.70] has quit [Ping timeout: 264 seconds] 16:31:59 leppie [~lolcow@196-210-165-161.dynamic.isadsl.co.za] has joined #scheme 16:34:19 (personally, i'm not fond of the `-values' variants -- it seems bad to multiply syntax in this way -- better would be a way to mix multiple-value-capture with ordinary single-value in a single `let'/`let*'/`letrec'/`letrec*' (or say in replacements for those, for backwards compatibility)) 16:36:05 ski: well there is srfi 71, but that doesn't fix the readability issue :) 16:36:46 well, it does slightly 16:39:16 (really, i'd prefer if those latter basic local binders could be merged as well, so that one'd have a basic shape `(let ...)' with `' of possible shape `(and ...)' (corresponds to current `let'), `(begin ...)' (`let*'), `(rec ...)' (`letrec*'), `(let )', `(define )' (corresponds to the current binding pairs)) 16:40:14 Sorella [~quildreen@oftn/member/Sorella] has joined #scheme 16:43:22 .. but these would be pretty large changes/additions, and i'm not sure how nice it would work out in practice 16:47:29 ski: re the `*-values' forms, there's not much that you can do about it... But []s help in a similar way in `cond's and other cases where there are clauses -- 16:48:07 and note that these are things that Lisp critics don't like, and what they don't like about it is the use of parens as a syntactical tool for grouping things. 16:48:08 the r6rs rationale has a list of recommendations for places where [] are acceptable 16:48:58 Ie, things that in other languages use different syntactical decorations, and things that in some lisps (like clojure and arc) people have addressed with various attempts at simplifying the syntax. 16:49:15 (Where "simplifying" = "reduce the number of parens needed".) 16:49:30 *eli* disappears 16:49:41 -!- disciple [~krishna@117.207.102.29] has quit [Quit: zzzZZZ] 16:49:59 the other day i heard a lisp critic saying they didn't like that macro applications looked the same as procedure applications. i suggested that one could use (e.g.) square brackets for macro applications, and they said they'd be ok with that 16:50:25 (and i suppose one could then also use square brackets for every list which is not used as a procedure application) 16:50:54 *leppie* convurs with eli's statement 16:50:57 (but that wouldn't solve the "visual distinguishness") 16:50:58 concurs 16:51:06 also syntax-case/rules 16:51:09 *eli* reappears temporarily 16:51:37 ski: Yeah, there are some schemers that have expressed similar sentiments in the past -- but that's a different issue. 16:52:04 They want a syntactical way to distinguish mascros from function application -- which IMO points at a fundamental mistrust of the whole macro idea. 16:52:05 (i have to say i don't like the Clojure way of removing the grouping brackets in e.g. `let') 16:52:13 interesting though that #[ ... ] is not valid vector syntax in R6RS 16:52:47 To put this differently, I *like* the feature (IMO) that the two syntaxes are interchangable based on what some binding is defined as (macro or function). 16:52:59 eli : "a fundamental mistrust of the whole macro idea" -- i'm not sure of that 16:53:17 And Racket certainly uses it -- for example, by the fact that contracted functions are really provided as macros that expand to the underlying function call. 16:53:23 (of course primitive syntax like `if'/`cond',`lambda',`define', would then also use square brackets) 16:54:08 Re the mistrust -- it's a sentiment that is expressed by people who are always justifying that by "macros can really do whatever, so they should not look like function calls", which IMO goes against the fundamental premise of macros and sexprs. 16:54:23 leppie: well, we don't need a new vector syntax, but I'd have loved a literal hash syntax 16:54:36 er, hashmap 16:54:44 But either way, that is all orthogonal to the use of parens (= sexprs) for pure grouping as in `let', `cond', etc. 16:54:55 ijp: nothing prevent you from making a macro for that :) 16:55:01 *eli* disappears into the steaming evening, yet again 16:55:16 wbooze [~wbooze@xdsl-78-35-150-240.netcologne.de] has joined #scheme 16:55:39 leppie: yeah, but it doesn't solve the printing issue 16:55:42 eli : well, there is a point to "know what things you have in scope (macros and non-macros)" -- however i think that being easily able to see whether a combination is a procedure application or a macro form isn't that unreasonable either 16:56:47 ijp: why an issue? nothing prevents you from printing a hashtable in any you like, and to be more correct, you should be printing invalid syntax that cant be read 16:56:58 bfgun [~b_fin_g@r186-52-161-80.dialup.adsl.anteldata.net.uy] has joined #scheme 16:57:04 s/any/any way/ 16:57:23 leppie: having to wrap each call to create/print hashmaps is a chore at the repl 16:57:42 implementation detail 16:58:13 ski: I was reading the R1RS the other day and the report mentions how the fact that macros and function application are the same was mostly by accident rather than by design. 16:58:18 One that I'm glad for though. 16:58:35 blame mccarthy 16:58:40 in IronScheme you can extending the printing of all non-syntax eleements like hashtables and records 16:58:49 and enum-set's 16:58:56 iow, i don't think user-defined macros should be treated any different from primitive syntax like `lambda' and `define' -- however, i don't see why syntax (primitive or defined) would not use a different combination syntax than procedure application (and i don't see why it would use the same, either) 16:59:15 leppie: speaking of enum-sets, how much of that library have you actually used? 16:59:28 asumu : ok. maybe you'd like to elaborate on why you're glad for that ? 16:59:31 leppie: my uses of it have all been rather basic; seems like way overkill 16:59:46 -!- wbooze [~wbooze@xdsl-78-35-150-240.netcologne.de] has quit [Remote host closed the connection] 16:59:53 cant say I have, but the usage is rather niche, but interesting never the less 17:00:26 you should think of it rather as 'flags' 17:00:42 -!- bfig [~b_fin_g@r186-52-162-124.dialup.adsl.anteldata.net.uy] has quit [Ping timeout: 264 seconds] 17:00:43 instead of Java or C or C++ or C# enums 17:00:44 yah 17:01:26 It works nice as a type safe way to define an options parameter for procedures 17:01:43 like they have in the IO parts 17:02:21 ski: I prefer having a uniform language. Not having to think of what is a procedure or syntactic form is convenient. 17:02:28 Especially since some things can be implemented as either. 17:03:14 And though the [] macro syntax doesn't sound too intrusive, most languages that have a special macro invocation marker are using them to make macros more second-class. 17:03:27 (as eli said, because of a distrust of macros) 17:03:28 macros _are_ second-class 17:03:42 asumu : well, as soon as you're pondering passing a procedure as an argument, you need to know the difference anyway (if not sooner) 17:03:46 I don't mean second-class in the sense that they're not fexprs. 17:03:59 with (+ 1 2 3), '+' can be implemented as a macro or proc, but in that case the compiler can make the choice (and should evaluate it at compile time) 17:04:32 -!- b4283 [~b4283@114-47-2-102.dynamic.hinet.net] has quit [Remote host closed the connection] 17:04:37 asumu : i don't see the "because of a distrust of macros" 17:05:03 if possible, one should always prefer a proc over a macro 17:05:06 (i mean, certainly there is mistrust of macros. i just mean i don't see why having special macro invocation would have to be an indication of that) 17:05:28 wbooze [~wbooze@xdsl-78-35-150-240.netcologne.de] has joined #scheme 17:06:18 *leppie* trusts macros completely (except for an odd case whre psyntax has a scoping issue with let-syntax) 17:07:00 leppie : hm, with `(+ 1 2 3)', you seem to be talking about compiler-done optimizations^Wimprovements and program specialization, not macros afaics 17:07:48 -!- wbooze [~wbooze@xdsl-78-35-150-240.netcologne.de] has quit [Remote host closed the connection] 17:07:52 ski: exaclty why you should prefer a proc. Macro is overkill with no benefit, and constant folding is easy in most cases for a compiler 17:08:32 ok. i suppose what i said might have been your point 17:08:33 Riastradh [~riastradh@fsf/member/riastradh] has joined #scheme 17:08:54 embrace the compiler, dont fight it :) 17:09:03 *ski* nods 17:09:44 (but having hard rules for when you can depend on a specific improvement in a language or implementation is very useful, too) 17:09:46 -!- Nisstyre [~yours@oftn/member/Nisstyre] has quit [Quit: Leaving] 17:10:34 (proper tail recursion being the most well-known example of that) 17:10:50 yeah, we ratification of the Macro Writers Bill of Rights 17:10:56 *we need 17:11:24 writing a macro that can evaluate (+ 1 2 3) at compile time in R5RS is non-trivial (syntax-case makes it trivial though) 17:11:55 it might be trivial to some though ;p 17:12:00 leppie: does oleg's syntax-rules compiler do that? 17:12:08 *leppie* excludes himself from that ;p 17:13:08 ijp: have no idea, but syntax-rules shoulds just be syntax-rules, cant see it working any different 17:15:33 -!- vu3rdd [~vu3rdd@fsf/member/vu3rdd] has quit [Remote host closed the connection] 17:15:39 http://haskell.spreadshirt.com/oleg-already-did-it-A6499531 <- I should really buy one of these 17:16:11 How about 'oleg killed call/cc' :p 17:17:31 I can think of some nice ones like: "OOPS, I ACCIDENTALLY A MONAD" 17:25:18 -!- hash_table [~quassel@70-138-242-181.lightspeed.hstntx.sbcglobal.net] has quit [Ping timeout: 264 seconds] 17:27:24 -!- dsmith [~dsmith@cpe-184-56-129-232.neo.res.rr.com] has quit [Remote host closed the connection] 17:32:24 -!- Riastradh [~riastradh@fsf/member/riastradh] has quit [Ping timeout: 276 seconds] 17:33:48 lolcow [~lolcow@197.64.63.140] has joined #scheme 17:35:42 -!- leppie [~lolcow@196-210-165-161.dynamic.isadsl.co.za] has quit [Ping timeout: 256 seconds] 17:36:14 -!- antoszka [~antoszka@unaffiliated/antoszka] has quit [Ping timeout: 260 seconds] 17:37:26 leppie [~lolcow@196-210-165-161.dynamic.isadsl.co.za] has joined #scheme 17:40:10 attila_lendvai [~attila_le@37.99.60.86] has joined #scheme 17:40:11 -!- attila_lendvai [~attila_le@37.99.60.86] has quit [Changing host] 17:40:11 attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has joined #scheme 17:40:39 -!- lolcow [~lolcow@197.64.63.140] has quit [Ping timeout: 255 seconds] 17:43:28 antoszka [~antoszka@unaffiliated/antoszka] has joined #scheme 17:50:10 ThePawnBreak [Cristi@94.177.108.25] has joined #scheme 17:55:23 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 240 seconds] 17:56:43 -!- chu [~chu@unaffiliated/chu] has quit [Quit: leaving] 18:01:50 -!- attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has quit [Quit: Leaving.] 18:03:48 -!- mucker [~mucker@183.83.240.198] has quit [Quit: leaving] 18:11:15 -!- ThePawnBreak [Cristi@94.177.108.25] has quit [Read error: Connection reset by peer] 18:13:56 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 18:18:56 -!- tupi [~david@177.30.22.179] has quit [Quit: Leaving] 18:19:27 huangjs [~huangjs@190.8.100.83] has joined #scheme 18:20:18 disciple [~krishna@117.207.102.29] has joined #scheme 18:29:13 wbooze [~wbooze@xdsl-78-35-150-240.netcologne.de] has joined #scheme 18:31:32 -!- wbooze [~wbooze@xdsl-78-35-150-240.netcologne.de] has quit [Client Quit] 18:34:56 wbooze [~wbooze@xdsl-78-35-150-240.netcologne.de] has joined #scheme 18:40:43 leppie: ehehe 18:56:09 -!- antoszka [~antoszka@unaffiliated/antoszka] has quit [Ping timeout: 260 seconds] 19:13:17 -!- ASau [~user@95-28-115-21.broadband.corbina.ru] has quit [Ping timeout: 252 seconds] 19:14:57 -!- realitygrill [realitygri@nat/hackerschool.com/x-zaexbsuyhxrydegc] has quit [Quit: Computer has gone to sleep] 19:17:49 antoszka [~antoszka@unaffiliated/antoszka] has joined #scheme 19:19:44 realitygrill [realitygri@nat/hackerschool.com/x-gcltyjmishgmehib] has joined #scheme 19:28:14 -!- antoszka [~antoszka@unaffiliated/antoszka] has quit [Ping timeout: 260 seconds] 19:28:53 -!- MrFahrenheit [~RageOfTho@cable-77-221-31-226.dynamic.vinet.ba] has quit [Ping timeout: 272 seconds] 19:29:40 adiii [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has joined #scheme 19:35:37 antoszka [~antoszka@unaffiliated/antoszka] has joined #scheme 19:39:01 -!- lcc [~user@unaffiliated/lcc] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 19:39:27 lcc [~lcc-pi@unaffiliated/lcc] has joined #scheme 19:40:55 ssbr [~ssbr@python/site-packages/ssbr] has joined #scheme 19:41:40 -!- huangjs [~huangjs@190.8.100.83] has quit [Ping timeout: 246 seconds] 19:41:59 -!- antoszka [~antoszka@unaffiliated/antoszka] has quit [Ping timeout: 248 seconds] 19:45:17 jonrafkind [~jon@racket/jonrafkind] has joined #scheme 19:48:59 huangjs [~huangjs@190.8.100.83] has joined #scheme 19:54:10 -!- disciple [~krishna@117.207.102.29] has quit [Quit: zzzZZZ] 19:55:04 antoszka [~antoszka@unaffiliated/antoszka] has joined #scheme 20:01:31 barryfm [~barryfm@fl-71-52-218-185.dhcp.embarqhsd.net] has joined #scheme 20:12:11 -!- lcc [~lcc-pi@unaffiliated/lcc] has quit [Quit: leaving] 20:13:58 amliby [~amliby@unaffiliated/amsl] has joined #scheme 20:16:11 Assuming a Scheme doesn't consider a missing else branch in an IF conditional a syntactical error, out of and #f, which do you think is more reasonable and why? 20:17:18 I tend to swing toward #f, because it's quite useful to do a bunch of tests and only explicitly return a value when they're all successfully, defaulting to false if one of them isn't 20:17:38 isn't this stuff in a standard somewhere? 20:17:54 I think it is unspecified, but I'm probably wrong 20:18:46 if you don't want an else branch you can use (WHEN ...) 20:18:51 disciple [~krishna@117.207.102.29] has joined #scheme 20:19:27 FurnaceBoy, yes, but I'm asking what people think is a more reasonable default for the IF case. 20:19:42 It's unspecified. http://www.r6rs.org/final/html/r6rs/r6rs-Z-H-14.html#node_idx_368 20:19:45 It is unspecified in the R6Rs standard 20:19:47 ... 20:19:48 beat me 20:19:49 :) 20:20:28 fantazo [~fantazo@91-119-221-59.dynamic.xdsl-line.inode.at] has joined #scheme 20:21:08 the reasonable default is to refuse to delete the program and make the person start over 20:21:14 s/refuse to// 20:21:28 <.< 20:21:36 (this is what happens when you change your mind half way through a sentence) 20:23:19 anyway, I agree with racket: a missing else clause is a bug 20:23:25 Personally I think it's more reasonable to return void. Intentionally using a one-armed if's consequent to return a value is bad style (since it's return is unspecified and nonportable). The return value of a #f in my view implies an expected value. A (void) on the other hand implies an unexpected value. 20:26:25 If you have one-armed if statements nested within a begin it makes sense to have them return void and the value being tossed. Throwing a bug is reasonable but a little excessive as it mostly invalidates any use of a one-armed if except for code where you 'want' an error to be thrown. 20:27:47 this is why 'when' and 'unless' exist 20:28:43 amliby, thanks for the perspective. 20:28:48 when and unless are just syntactic sugar 20:29:13 chturne: No problem. I really enjoyed reading your reasoning for why you prefer #f over (void) 20:30:15 amliby: sure, that's how they are implemented, but it's the equivalent of having a big flashing sign saying "here be imperative code" 20:32:31 -!- ijp [~user@host86-177-154-236.range86-177.btcentralplus.com] has quit [Quit: The garbage collector got me] 20:33:41 and let that be a warning never to use the words 'imperative code' in vain 20:33:51 rudybot: it's dangerous! 20:33:52 FurnaceBoy: It's not, it's very dangerous 20:50:09 hash_table [~quassel@70-138-242-181.lightspeed.hstntx.sbcglobal.net] has joined #scheme 20:57:28 -!- gravicappa [~gravicapp@ppp91-77-160-166.pppoe.mtu-net.ru] has quit [Remote host closed the connection] 20:58:18 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 264 seconds] 20:59:09 ASau [~user@89-178-164-66.broadband.corbina.ru] has joined #scheme 21:08:02 *rudybot* sneaks Sally through the alley 21:09:08 lcc [~lcc-pi@unaffiliated/lcc] has joined #scheme 21:09:16 *wbooze* winks! 21:10:02 -!- pothos [~pothos@114-36-240-137.dynamic.hinet.net] has quit [Read error: Connection reset by peer] 21:12:01 masm [~masm@bl18-58-181.dsl.telepac.pt] has joined #scheme 21:12:16 -!- barryfm [~barryfm@fl-71-52-218-185.dhcp.embarqhsd.net] has left #scheme 21:13:20 pothos [~pothos@114-36-232-69.dynamic.hinet.net] has joined #scheme 21:21:03 -!- fantazo [~fantazo@91-119-221-59.dynamic.xdsl-line.inode.at] has quit [Ping timeout: 244 seconds] 21:32:46 fantazo [~fantazo@user-108-237.vpn.univie.ac.at] has joined #scheme 21:43:49 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 21:45:45 -!- qu1j0t3 [~qu1j0t3@vm4.telegraphics.com.au] has quit [Quit: WeeChat 0.2.6] 21:50:23 -!- disciple [~krishna@117.207.102.29] has quit [Quit: zzzZZZ] 21:51:44 -!- masm [~masm@bl18-58-181.dsl.telepac.pt] has quit [Quit: Leaving.] 21:52:06 Sorella_ [~quildreen@201-58-235-155.user.veloxzone.com.br] has joined #scheme 21:52:08 Has anyone ever seen NOOP written as noöp, on analogy with coöperate; &c.? 21:53:36 Oh, well; fuck it: hapax legomenon! 21:53:55 -!- adiii [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has quit [Ping timeout: 272 seconds] 21:54:58 Now I have. 21:55:45 offby1: Thank the Olympians there's a few relevant neologisms left in the world. 21:55:49 -!- Sorella [~quildreen@oftn/member/Sorella] has quit [Ping timeout: 272 seconds] 21:56:20 Nöpe, I haven't seen that 21:56:50 bipt [~bpt@cpe-071-070-253-241.nc.res.rr.com] has joined #scheme 21:56:56 Heh 21:58:57 kudkudyak [~user@94.72.136.103] has joined #scheme 22:01:10 Nisstyre [~yours@oftn/member/Nisstyre] has joined #scheme 22:01:41 -!- arbn [~arbn@pool-74-98-200-128.pitbpa.fios.verizon.net] has quit [Read error: Operation timed out] 22:06:07 arbn [~arbn@pool-74-98-200-128.pitbpa.fios.verizon.net] has joined #scheme 22:15:57 -!- jonrafkind [~jon@racket/jonrafkind] has quit [Ping timeout: 250 seconds] 22:16:03 RomyRomy [~stickycak@207.239.107.3] has joined #scheme 22:28:18 adiii [~adityavit@c-24-0-148-151.hsd1.nj.comcast.net] has joined #scheme 22:28:29 MrFahrenheit [~RageOfTho@cable-77-221-31-226.dynamic.vinet.ba] has joined #scheme 22:28:57 -!- kudkudyak [~user@94.72.136.103] has quit [Ping timeout: 246 seconds] 22:37:41 -!- lcc [~lcc-pi@unaffiliated/lcc] has quit [Quit: leaving] 22:37:44 mejja [~Freenode@c-80bfe555.023-82-73746f38.cust.bredbandsbolaget.se] has joined #scheme 22:38:45 -!- mejja [~Freenode@c-80bfe555.023-82-73746f38.cust.bredbandsbolaget.se] has quit [Client Quit] 22:48:26 klutometis: no, never saw that, but no-op is frequent orthography. 22:48:31 common* 22:59:36 FurnaceBoy: True; I have seen that before. Some people even resort to NoOp, but that's camel-ugly. (Camugly?) 23:02:02 CamUgly* 23:07:11 ski: There are two big problems with something like requiring []s for macros, 23:07:28 -!- realitygrill [realitygri@nat/hackerschool.com/x-gcltyjmishgmehib] has quit [Quit: Computer has gone to sleep] 23:07:51 the first is that you just cannot refactor from/to macros to/from functions, since that will now affect client code, 23:08:31 the second is that when you're dealing with code (= when you're writing macros) you lose the uniform language and now you need two separate cases for macros and for functions 23:09:02 Obviously you get a benefit from that too -- that you can now write macros that can tell when some expression in their bodies is a macro or not, 23:09:16 jonrafkind [~jon@racket/jonrafkind] has joined #scheme 23:10:25 but IMO it's not worth it -- and I base that mostly on experience with camlp4 which takes this to an extreme with a ton of different expression kinds (and a ton of pattern kinds and type kinds), so you have much more information, but the net result is that even a simple macro becomes an exercise in trying not to drown in details. 23:11:05 (But again, all of that is orthogonal to the question of using []s as an additional visual clue.) 23:12:27 -!- adiii [~adityavit@c-24-0-148-151.hsd1.nj.comcast.net] has quit [Ping timeout: 272 seconds] 23:15:37 -!- peterhil [~peterhil@91-157-48-51.elisa-laajakaista.fi] has quit [Ping timeout: 272 seconds] 23:29:03 -!- wbooze [~wbooze@xdsl-78-35-150-240.netcologne.de] has quit [Quit: Client Quit] 23:30:05 wbooze [~wbooze@xdsl-78-35-150-240.netcologne.de] has joined #scheme 23:33:46 tejaswidp [~tejaswidp@117.192.134.175] has joined #scheme 23:54:26 xwl [~user@123.108.223.31] has joined #scheme 23:54:42 -!- wbooze [~wbooze@xdsl-78-35-150-240.netcologne.de] has quit [Ping timeout: 264 seconds] 23:55:11 Dalek_Baldwin [~Adium@71-84-33-22.dhcp.mtpk.ca.charter.com] has joined #scheme