00:17 (quit) tcoppi: Ping timeout: 272 seconds 00:20 (join) tcoppi 00:45 (quit) samth: Ping timeout: 265 seconds 01:00 Fare: eli: I've started implementing your scribble syntax in CL 01:00 Fare: but then, I backtracked and started writing a LL(\omega) parsing infrastructure. 01:00 Fare: hopefully, I won't backtrack into implementing monadic foo first. 01:01 (quit) Fare: Quit: Leaving 02:49 (quit) jonrafkind: Ping timeout: 240 seconds 03:55 (join) dzhus 04:36 (quit) rbarraud: Ping timeout: 264 seconds 04:38 (join) masm 05:34 (join) hanDerPeder 06:46 (join) spidermario 07:03 (join) MayDaniel 08:06 (quit) dzhus: Remote host closed the connection 08:38 (join) firatcan 08:47 (quit) jao: Ping timeout: 245 seconds 09:06 (join) mceier 09:32 (join) b-man_ 09:42 (join) anRch 09:48 (join) confounds 10:27 (quit) anRch: Quit: anRch 12:03 (quit) confounds: Remote host closed the connection 13:11 (join) jonrafkind 13:27 (join) alecbenzer 13:28 alecbenzer: is there a special vi mode for racket (ie more than just regular scheme highlighting) 13:28 jonrafkind: you mean in vim itself? 13:28 jonrafkind: there is not, as far as I know 13:28 jonrafkind: there are, however, vim bindings for drracket (made by me) so you could use the drracket ide and still use vim 13:29 alecbenzer: I meant a mode for vim, but not necessarily built in 13:29 jonrafkind: although my bindings aren't nearly as feature complete as the real vim 13:29 jonrafkind: there is 'set mode=lisp' 13:29 jonrafkind: which does some scheme/lispish stuff more than highlighting 13:30 jonrafkind: oops, its 'set lisp' 13:30 jonrafkind: you can make vim do lisp-style indentation by doing lisp-words+=define,foo,bar,... 13:31 alecbenzer: right now I have it set up to treat racket files with its scheme mode, which works pretty well. there are just minor things that bug me a bit. things like "#:mutable" for a struct are highlighted as if they were errors 13:31 jonrafkind: whats scheme mode? 13:33 alecbenzer: hm? if you do :set filetype=scheme it should treat the buffer your editing as a scheme file, with appropriate highlighting, indenting, etc 13:34 alecbenzer: i just have "au BufNewFile,BufRead *.rkt set filetype=scheme" in my .vimrc 13:34 jonrafkind: oh ok, i just use filetype plugin on or whatever 13:34 jonrafkind: which sets the filetype automatically 13:34 jonrafkind: err, you're right i have that au *.rkt thing too 14:19 (quit) masm: Quit: Leaving. 14:37 (quit) alecbenzer: Quit: Ex-Chat 16:31 (join) tommc 16:55 (quit) tommc: Quit: Page closed 17:13 (quit) spidermario: Remote host closed the connection 17:51 (join) jeeve 18:20 (quit) jeeve: Quit: Page closed 18:39 (join) justaguy 18:39 justaguy: hello 18:39 justaguy: anyone here? 18:40 justaguy: I just have a quick question 18:41 (quit) justaguy: Client Quit 18:42 (join) justaguy 18:43 (join) writer 18:44 (quit) justaguy: Client Quit 18:44 (join) Idonteven 18:55 Idonteven: anyone? 18:55 (quit) Idonteven: Quit: Page closed 18:58 (join) rbarraud 19:06 (quit) b-man_: Ping timeout: 240 seconds 19:11 (join) neilv 19:12 (quit) MayDaniel: Read error: Connection reset by peer 19:53 (join) newbie_ 19:53 newbie_: hi 19:54 newbie_: i am new to scheme, looking for a comprenhensive list of difference betwen scheme R6RS and racket macro system 19:56 (join) hi 19:56 (nick) hi -> Guest93886 20:00 newbie_: hi 20:37 (quit) mceier: Quit: leaving 20:44 (quit) Guest93886: Quit: Page closed 20:45 (quit) firatcan: Quit: firatcan 21:13 offby1: hi 21:14 jonrafkind: hi 21:15 jonrafkind: newbie_, i dont know of such a thing 21:15 jonrafkind: you can read various papers about racket's macro system I suppose 21:18 jonrafkind: newbie_, http://www.cs.utah.edu/plt/publications/macromod.pdf you can start there 21:18 jonrafkind: although to be honest, i dont know a whole lot about the r6rs macro system 21:49 (quit) newbie_: Ping timeout: 265 seconds 21:53 (quit) hanDerPeder: Quit: hanDerPeder 21:54 (join) hanDerPeder 21:54 (quit) hanDerPeder: Client Quit 22:44 (join) lightbulb 22:44 lightbulb: need help with understand racket 22:44 lightbulb: anyone available 22:45 offby1: ^-^ 22:45 lightbulb: offby1 22:45 offby1: lightbulb: 22:45 lightbulb: can you help me with something 22:45 offby1: depends. 22:45 offby1: you gotta ask first :) 22:46 lightbulb: k well its a lab i must complete and i am having answering the qustion 22:46 lightbulb: question* 22:46 lightbulb: well understanding it 22:46 lightbulb: the question is: 22:46 lightbulb: Scientific notation is a way of writing very large or very small numbers using a few digits (known as the significant digits) and a power of ten. For example 1.475 x 109 is equivalent to 1 475 000 000. The number of digits included before the exponent are known as the significant digits. In the previous example there are four significant digits. Write a function called sn->num that consumes a string representing the scientific nota 22:47 offby1: that got cut off. 22:47 offby1: maybe paste the assignment to (for example) gist.github.com 22:47 lightbulb: OK 22:47 lightbulb: ok* 22:47 lightbulb: give me a second 22:47 lightbulb: thanks offby1 22:48 offby1: rudybot: eval (read (open-input-string "2.23e20")) 22:48 rudybot: *offby1: ; Value: 2.23e+20 22:48 offby1: there, you're done. 22:49 lightbulb: i posted it 22:49 lightbulb: on the website 22:49 lightbulb: the question wasn't finished 22:50 offby1: ? 22:50 lightbulb: offby1, have you taken a look at the question 22:50 offby1: no, I have no idea what website you pasted it on 22:51 lightbulb: ok, i'm just going to paste the full question into IRC 22:51 lightbulb: Scientific notation is a way of writing very large or very small numbers using a few digits (known as the significant digits) and a power of ten. For example 1.475 x 109 is equivalent to 1 475 000 000. The number of digits included before the exponent are known as the significant digits. In the previous example there are four significant digits. Write a function called sn->num that consumes a string representing the scientific nota 22:51 offby1: but you see that doesn't work. 22:51 offby1: There's a 500-character limit. 22:51 offby1: so I only get to see the first bit of it. 22:51 lightbulb: produces the equivalent numeric value. You may assume that all numbers written in scientific notation will include a single digit before a decimal point, at least one digit following the decimal point, the characters "x10^" (meaning "times 10 to the power of"), and the exponent that may be any integer. 22:51 offby1: aahh 22:52 lightbulb: For example (sn->num "1.457x10^9" 4) will produce 1457000000 and (sn->num "1.23456x10^-4" 6) will produce 0.000123456. The built‐in function expt will allow you to calculate an exponent. The built‐in function string- >number will produce the numerical equivalent of a consumed string that contains a valid number. For example (string->number "1.23") produces 1.23 and (string->number "-5") produces -5. 22:52 lightbulb: there 22:52 lightbulb: 3 bits 22:52 lightbulb: i'm not sure how to do this question 22:53 offby1: rudybot: eval (read (open-input-string (regexp-replace "x10\\^" "123x10^9" "e"))) 22:53 rudybot: *offby1: ; Value: 123000000000.0 22:53 offby1: there ya go 22:53 offby1: done 22:54 offby1: just replace the "x10^" with the letter "e", then call 'read' on the result. 22:54 lightbulb: uhm...(kinda speechless) 22:54 lightbulb: no idea what you did and how you did it 22:54 lightbulb: i forgot to mention 22:54 lightbulb: oh 22:55 offby1: I described what I did: I replaced the "x10^" with the letter "e", then called 'read' on the result. 22:55 lightbulb: that the following must be used: ;; Assignment 1, Question 3 (define (sn->num sn-string sig-digits) ...) 22:55 offby1: something tells me your prof won't like that answer, but _I_ like it very much. 22:55 lightbulb: def. won;'t 22:55 lightbulb: because we havent used the string commands you did 22:55 offby1: pity :) 22:55 lightbulb: we only used string-->number and substrng 22:55 lightbulb: and thats what needs to be used 22:56 lightbulb: is there any way you can describe it using that 22:56 offby1: it sounds like a pain in the ass. 22:56 neilv: you also need "string-length" 22:56 offby1: It's like three or more problems glued together. 22:56 lightbulb: haha 22:56 neilv: well, you *could* do it without "string-length", but it would be even more inefficient 22:56 lightbulb: indeed 22:56 offby1: First you'd read the digits before the decimal point, and accumulate them into the integer part ... 22:57 offby1: then read the digits up to, but not including, the "x"; there's your fraction. 22:57 offby1: then discard the x10^ 22:57 offby1: then read the remaining digits, and there's your exponent. 22:57 offby1: The final result is (* (+ int fraction) (expt 10 exponent)) 22:58 lightbulb: i agree with what your saying but i'm still having trouble interpreting this 22:58 lightbulb: i know this is a pain 22:58 lightbulb: and i apologize 22:58 lightbulb: but i'm new to racket 22:58 lightbulb: and the programming language world 23:00 lightbulb: when your saying discard 23:00 lightbulb: we can use substrings correct? 23:04 lightbulb: ? 23:06 jonrafkind: you should write two functions `mantissa' which gets the '1.42' part from '1.42x10^5' and another function 'magnitude' which gets the '10^5' part 23:06 jonrafkind: then just split apart the magnitude into '10' and '5', and call the power routine on it 23:09 lightbulb: what command is used to split 23:09 offby1: sure sure 23:10 offby1: you could write it yourself. 23:10 lightbulb: substring? 23:10 offby1: yep 23:10 offby1: the x10^ is always four characters long, so ... 23:11 lightbulb: this is really hard to understand 23:11 jonrafkind: MATH IS HARD LETS GO SHOPPING! 23:12 jonrafkind: lightbulb, how much programming experience do you have? 23:12 lightbulb: none 23:12 jonrafkind: and this is your first assignment???? 23:12 lightbulb: yes sir 23:12 jonrafkind: is your teacher insane? 23:12 lightbulb: i guess so 23:12 lightbulb: like 23:12 lightbulb: this is what we're given 23:13 jonrafkind: well its unfortunate, but you're going to have to do a lot of self-learning I guess, you should read through htdp 23:13 jonrafkind: www.htdp.org 23:13 lightbulb: (define (sn->num sn-string sig-digits) 23:13 jonrafkind: and follow those exercise 23:13 lightbulb: thats what we're given to get us started 23:14 lightbulb: and how the hell do i answer this question with that information 23:14 lightbulb: !! 23:15 lightbulb: jondrafkind, can you help me through this question 23:48 (quit) lightbulb: Quit: Page closed 23:55 jonrafkind: whowhatnow 23:56 jonrafkind: another satisfied customer!