00:08 (quit) jeapostrophe: Ping timeout: 260 seconds 00:34 (quit) jao: Ping timeout: 240 seconds 01:08 offby1: Long time no chatter. 01:13 (quit) karswell: Ping timeout: 240 seconds 01:19 (join) neilv 01:19 (quit) neilv: Changing host 01:19 (join) neilv 01:21 jonrafkind: http://www.4clojure.com/problems 01:21 jonrafkind: wow this is really brilliant.. racket needs it 01:28 (join) RackN00b 01:30 RackN00b: Heyo! Is there a way to create a module that will simply provide a fixed value...? We're just starting to get our toes wet with modules and one question asks to write a module that will evaluate the sum of the integers from 1 to 10 inclusive. It is also mentioned that just by requiring this particular racket file, the interactions window should show 55 right off the bat, with no user input.. I know how to provide 01:30 RackN00b: function (provide foo) but how do I provide just a value so that (require "something.rkt") immediately produces this value..? 01:31 jonrafkind: #lang racket; 45 01:31 jonrafkind: ok ; was unfortunate there, i just meant a newline 01:34 RackN00b: Hi 01:35 jonrafkind: anyohashimika 01:35 RackN00b: So say I have the module called mod.rkt and the client called client.rkt. Within the client, the first line is (require "mod.rkt"). Will putting just 55 in mod.rkt give me that? 01:36 jonrafkind: well put #lang racket as the first line 01:36 jonrafkind: if you just put 55 then 55 will be printed when ytou require it 01:36 (quit) neilv: Quit: Leaving 01:36 jonrafkind: you can't get a value directly from a module, the only way to communicate values from a module is with provide 01:36 jonrafkind: provide works for any definitions, which includes variables 01:37 jonrafkind: (define x 5) and (define (x) 5), the first is just the variable x bound to 5, the second is a function 01:37 jonrafkind: (define (x) 5) is short for (define x (lambda () 5)) so you can see how its similar to (define x 5) 01:39 RackN00b: ahhh 01:45 RackN00b: But in either case, whether I define a variable or a function, I still need to call it in the client to get the value don't I ? 01:49 jonrafkind: well you need to refer to it.. 01:49 jonrafkind: if its a variable you can just type 'x' 01:49 jonrafkind: if its a function then you need to invoke it, (x) 01:53 RackN00b: That's the weird think... I'm told that just saying (require "mod.rkt") should produce 55 01:53 (quit) Demosthenes: Ping timeout: 260 seconds 01:56 jonrafkind: produce where 01:56 jonrafkind: if you put 55 in mod.rkt then when you require it, 55 will be printed on the command line 01:56 jonrafkind: or in the interactions pane, whatever 01:57 RackN00b: But how do I provide the value 55? (provide 55) doesn't work... 01:57 jonrafkind: why do you think you need to provide it 01:58 RackN00b: Cause I was under the impression that in order for anything to be available outside the module, you needed to specify that it will be provided? 01:59 jonrafkind: ok what do you want to happen *exactly* 02:00 (join) jeapostrophe 02:00 RackN00b: Ok, I have a module, mod.rkt and a client.rkt. I want the client file to simply have (require "mod.rkt") and have 55 appear in the interactions window without having to invoke a variable or a function anywhere... Just saw what you meant... 02:00 jonrafkind: if you put 55 in mod.rkt then when you require it, 55 will be printed on the command line 02:00 RackN00b: I just have 55 in the definitions window of the module and when the module is required, it immediately produced 5 in the interactions windo of the client... 02:00 RackN00b: Weird.. I thought I had to provide it. 02:03 RackN00b: Cool. Well that's a night for me - thanks a lot jonrafkind! 02:03 jonrafkind: word 02:08 (quit) RackN00b: Quit: RackN00b 02:09 (quit) realitygrill: Quit: realitygrill 02:21 (join) Guest32177 02:31 (quit) jonrafkind: Ping timeout: 240 seconds 02:43 (quit) jeapostrophe: Ping timeout: 252 seconds 03:49 (quit) Shviller: Ping timeout: 252 seconds 03:50 (join) Shviller 04:07 (join) ahinki 04:09 (join) sindoc 04:49 (quit) Guest32177: Quit: 离开 05:05 (join) gciolli 06:11 (join) Blkt 06:12 Blkt: good day everyone 06:14 (join) realitygrill 06:39 (join) veer 06:50 (join) sixpoint8 07:11 (quit) realitygrill: Remote host closed the connection 07:18 (part) sixpoint8 07:28 (quit) ahinki: Ping timeout: 252 seconds 07:39 (join) ahinki 08:00 (join) alois 08:35 (join) metadave 08:48 veer: how do I use quote " in string-append , I want to prefix a string with " 08:49 gciolli: (string-append "\"" your-string) 08:50 veer: thanks gciolli 08:51 gciolli: veer: it's ok :) 08:54 (part) metadave: "Leaving" 09:15 (quit) zerokarmaleft: Ping timeout: 268 seconds 09:20 (join) zerokarmaleft 09:42 (join) jeapostrophe 10:01 (quit) jeapostrophe: Ping timeout: 240 seconds 10:15 (join) masm 10:19 (quit) alois: Quit: Ex-Chat 10:23 (quit) veer: Quit: Leaving 10:40 Qworkescence: in r5rs mode, can one load, e.g., srfi-1? 10:41 Qworkescence: or will such non-standard procedures be kept away? 10:53 (quit) ahinki: Quit: ChatZilla 0.9.88 [Firefox 10.0/20111228055358] 10:53 (join) freakazoid 11:00 (quit) masm: Quit: Leaving. 11:16 (join) masm 11:18 (join) jeapostrophe 11:31 (join) karswell 11:33 (join) Blkt` 11:34 (quit) Blkt: Ping timeout: 240 seconds 11:43 (join) Blkt`` 11:46 (quit) Blkt`: Ping timeout: 244 seconds 11:48 (quit) jeapostrophe: Ping timeout: 248 seconds 11:52 (quit) freakazoid: Quit: Computer has gone to sleep. 12:01 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/6BkLvw 12:01 RacketCommitBot: [racket/master] improve the red highlighting in drracket so that it picks - Robby Findler 12:02 (quit) masm: Quit: Leaving. 12:02 (join) masm 12:04 (join) jeapostrophe 12:24 (nick) Blkt`` -> Blkt 12:53 (join) jonrafkind 12:56 (join) metadave 13:02 (join) realitygrill 13:07 (part) metadave: "Leaving" 13:12 (quit) gciolli: Quit: Leaving. 13:18 (join) MayDaniel 13:25 (join) freakazoid 13:31 (quit) freakazoid: Quit: Computer has gone to sleep. 13:44 (join) Daminvar 13:51 (join) dudedeli 13:51 dudedeli: hello 13:51 dudedeli: i wanted to download Racket for my Mac and don't know which version i have to choose 13:52 dudedeli: meaning i386, x86_64, ppc 13:52 dudedeli: can someone explain a bit pls? 13:52 jonrafkind: what kind of mac do you have 13:53 jonrafkind: I think its most likely i386 13:54 jonrafkind: read this page 13:54 jonrafkind: http://support.apple.com/kb/ht3696 13:54 jonrafkind: if you have a 32 bit processor then get i386, if its 64bit then get x86_64 13:54 dudedeli: thanks a lot 13:57 (quit) dudedeli: Quit: Page closed 14:23 (quit) eli: Ping timeout: 268 seconds 14:37 (join) stamourv 14:41 (part) sindoc 14:49 stamourv: Qworkescence: Use `#%require'. 14:49 stamourv: It's not portable, but it works. 15:00 (quit) Shviller: Quit: bye 15:01 (join) Shviller 15:21 (quit) MayDaniel: Read error: Connection reset by peer 15:24 (nick) chaozzbubi -> ChaozZBubi 15:25 (join) kudkudyak 15:34 (join) eli 15:40 (join) bfulgham 15:49 (join) jrslepak 15:53 (quit) Saimazanus: Ping timeout: 252 seconds 15:57 (join) gciolli 15:57 (part) gciolli 15:58 (join) gciolli 16:02 (join) snearch 16:06 (quit) masm: Quit: Leaving. 16:06 (quit) Daminvar: Quit: leaving 16:09 (quit) snearch: Quit: Verlassend 16:09 (join) snearch 16:10 (quit) snearch: Read error: Connection reset by peer 16:11 (join) snearch 16:28 (join) dnolen 16:33 (quit) AlbireoX: Ping timeout: 276 seconds 16:45 (quit) jrslepak: Quit: Leaving 17:36 (quit) dnolen: Ping timeout: 240 seconds 17:56 (nick) Nanakhiel -> IslaamulIslaam 18:00 (quit) Blkt: Quit: ERC Version 5.3 (IRC client for Emacs) 18:13 (join) AlbireoX 18:18 (nick) ChaozZBubi -> chaozzbubi 18:23 (quit) jeapostrophe: Ping timeout: 252 seconds 18:57 (join) dnolen 19:06 (quit) gciolli: Quit: Leaving. 19:11 (quit) dnolen: Ping timeout: 240 seconds 19:22 (quit) snearch: Quit: Verlassend 19:35 (quit) Qworkescence: Quit: Leaving 19:37 (join) dnolen 19:39 (join) masm 19:50 (quit) realitygrill: Quit: realitygrill 19:52 (quit) dnolen: Ping timeout: 240 seconds 19:56 (join) RackN00b 19:57 RackN00b: Hello again! Interesting problem I'm having. Trying to come up with a nice, concise non-recursive way of determining if, in (listof (list X Y)), there are any duplicate Xs.... 19:58 RackN00b: Well, let's even simplify it further and say that I'm just looking for a simple way of finding duplicates... 19:59 jonrafkind: what do you want the function to return if there are duplicate? 19:59 RackN00b: Just boolean 19:59 RackN00b: #t or #f 20:00 jonrafkind: http://docs.racket-lang.org/unstable/list.html?q=duplicate#(def._((lib._unstable/list..rkt)._check-duplicate)) 20:00 jonrafkind: is this a real problem or homework 20:00 RackN00b: I'm playing about with abstract list functions and seeing if there's a way to supply a .... FACEPALM! Bonus question... I have the recursive method done which is what they're asking for... just wanted to see if I could write something more elegant? 20:01 jonrafkind: well the only way to achieve looping behavior in racket is with recursion at some level.. 20:01 jonrafkind: so its not really clear whats being asked 20:02 RackN00b: I meant without explicit recursion... Sorry, should have specified 20:03 RackN00b: The docs are great but I'm trying to do it at Full language so I don't have access to check-duplicated. I had done this previously with member? but that's not around either :( 20:04 jonrafkind: im thinking something like map the list to get all the X's, then sort it 20:04 jonrafkind: and then you can use foldl to check if pairs of elements are the same 20:04 RackN00b: II've done the first part... why sort it? 20:04 RackN00b: Ahhh... good call. 20:04 jonrafkind: its a pretty goofy solutino though.. sort of artificial 20:05 RackN00b: Hmmm... 20:05 jonrafkind: probably its easier to use a bloom filter or a straight up hashmap 20:05 jonrafkind: just go through the list, put each item into the map, and if theres already an item there then its a duplicate 20:06 RackN00b: yikes! That's above my head - I'm gonna go grab some dinner and read the docs... Thanks :) 20:10 (join) freakazoid 20:11 (quit) jonrafkind: Ping timeout: 240 seconds 20:18 (quit) AlbireoX: Quit: Leaving 20:27 bremner: eli: I noticed a minor bug with the handin server/DrRacket integration. If you retrieve a handed in assignment, you get #lang racket added by DrRacket, and thus 2 #lang lines. Is that just me? this is with Racket 5.2 everywhere. 20:40 (join) jeapostrophe 21:00 (quit) karswell: Excess Flood 21:01 (join) karswell 21:01 (join) jonrafkind 21:20 RackN00b: Is there no equivalent to member? in the full racket language? 21:22 bremner: what does docs.racket-lang.org say? 21:23 RackN00b: I don't know... I'm looking and I see member? but I can't see which language level it's specific too. 21:23 bremner: rudybot: init racket 21:23 rudybot: bremner: your sandbox is ready 21:24 bremner: rudybot: (member 2 (list 1 2 3 4)) 21:24 rudybot: bremner: ; Value: (2 3 4) 21:24 bremner: oh, member? I didn't parse correctly. 21:25 RackN00b: Yeah... I tired working with member but from what I can tell it just returns the rest of a list past a certain element... 21:25 bremner: and you can't use that everywhere you could use member? 21:25 bremner: rudybot: (if 21:25 rudybot: bremner: I activate emacs ECB like this here: http://paste.pocoo.org/show/174342/ If I load an cpp file, it opens the info page and I get the error File mode specification error: (error "Buffer *info* is not a CC Mode buffer (c-set-style)") Howtopprevent this? 21:26 bremner: rudybot: (if '(1 2 3) #t #f) 21:26 rudybot: bremner: ; Value: #t 21:26 RackN00b: Can I? memeber? returns a boolean value what I'm looking for is an element of that list...? 21:27 (quit) freakazoid: Quit: Computer has gone to sleep. 21:28 RackN00b: Hmm... I don't know what (if '(1 2 3) #t #f) is doing... 21:28 bremner: rudybot: (if (member 2 (list 1 2 3 4)) "yes" "no") 21:28 rudybot: bremner: ; Value: "yes" 21:28 jamessan: RackN00b: anything other than #f is treated as true, is the point bremner's trying to make 21:29 jamessan: so you should be able to use member in place of member? (without knowing what you're actually doing) 21:30 RackN00b: Ok.. I see that it works, just tried it out, but what does (if (member 2 '(1 2 3 4)) #t #f) mean? What condition does the if pertain to... that's what I;m not seeing... 21:31 RackN00b: Oh wait.. (member 'x '(1 2 3 4)) would return #f.... 21:31 jamessan: right 21:32 jamessan: and any other return (like '(2 3 4)) is treated as a true value 21:32 RackN00b: I see.... Now I just have to recurse through the list to check every element. Gotcha! 21:43 RackN00b: I think I am missing something pretty fundamental. There must be an easier way to test for duplicates - it just seems very convoluted. 21:43 (quit) jonrafkind: Ping timeout: 276 seconds 21:44 bremner: sorting is really a pretty good way to test for duplicates, from a theoretical point of view 21:45 RackN00b: Well this seems hack-ish but I'm comparing the length of the original list with one where I've done remove-duplicates lst) 21:47 bremner: it depends what your goals are, I guess. 21:48 RackN00b: I'm just trying to come up with a nice way to check if a consumed argument is a (listof (list Any Any)) 21:50 bremner: and why do duplicate elements matter? 21:55 RacketCommitBot: [racket] plt pushed 5 new commits to master: http://git.io/Ess_cg 21:55 RacketCommitBot: [racket/master] New GC code - Jay McCarthy 21:55 RacketCommitBot: [racket/master] Converting mutators - Jay McCarthy 21:55 RacketCommitBot: [racket/master] Initial pass on adding manual closure management - Jay McCarthy 21:59 RackN00b: Well I'm trying to ensure that what I have is an association list as I have it defined where each key value pair has a unique key... 22:00 (quit) masm: Quit: Leaving. 22:00 RackN00b: I have three conditions... that either it's an empty list or there are no duplicate keys or that the length of each element in the list is 2. 22:01 jamessan: do you actually need to enforce it at that level or can you let the code that uses the data fail when the data doesn't live up to the expectation? 22:03 RackN00b: Can't let it fail... it's a predicate used to test that the argument is of the proper type. 22:10 (quit) jeapostrophe: Ping timeout: 252 seconds 22:16 (join) realitygrill 22:30 (join) freakazoid 22:45 offby1: RackN00b: you can write a function, call it say "distinct?", and use that as part of your contract. It'd be an ordinary function. Of course, it'd be slow, in the sense that it'd take order(N) time where N is the number of items in the list. 22:45 offby1: let's see if I can do this live 22:46 offby1: rudybot: eval (define (distinct? seq) #t) 22:46 rudybot: *offby1: your sandbox is ready 22:46 rudybot: *offby1: Done. 22:46 offby1: that's a stub, by the way. 22:46 offby1: rudybot: eval (define/contract (whatever seq) (-> distinct? any/c) seq) 22:46 rudybot: *offby1: Done. 22:46 offby1: rudybot: (whatever (list 1 2 3)) 22:46 rudybot: *offby1: ; Value: (1 2 3) 22:47 offby1: ok, now let's say "distinct?" returns false 22:47 RackN00b: o.k... 22:48 offby1: rudybot: eval (define (distinct? seq) (odd?(length seq))) 22:48 rudybot: *offby1: Done. 22:48 offby1: rudybot: (whatever (list 1 2 3)) 22:48 rudybot: *offby1: ; Value: (1 2 3) 22:48 offby1: rudybot: (whatever (list 1 2 3 4)) 22:48 rudybot: *offby1: ; Value: (1 2 3 4) 22:48 offby1: oops 22:48 offby1: hmm 22:48 offby1: dunno why that didn't barf 22:48 offby1: rudybot: eval (define/contract (whatever seq) (-> distinct? any/c) seq) 22:48 rudybot: *offby1: Done. 22:49 offby1: rudybot: (whatever (list 1 2 3 4)) 22:49 rudybot: *offby1: error: whatever: contract violation, expected: distinct?, given: '(1 2 3 4) contract from: (function whatever), blaming: program contract: (-> distinct? any/c) at: #:1.18 22:49 offby1: yay 22:49 offby1: rudybot: (whatever (list 1 2 3)) 22:49 rudybot: *offby1: ; Value: (1 2 3) 22:49 offby1: "The top level is hopeless" 22:49 offby1: RackN00b: so, with a suitable definition of "distinct?", you can get the sort of checking that I assume you want. 22:49 offby1: (I haven't read the scrollback, so I'm assuming you're writing a contract.) 22:50 RackN00b: I see.... this is where I was heading: http://pastebin.com/kX8KPkz0 and I was going to qrite the predicated unique-keys? and length-ok? as local functions... 22:50 offby1: rudybot: eval (define (distinct? seq) (cond ((null? seq) #t) ((null? (cdr seq)) #t) ((equal?(car seq) (cadr seq)) #f) (else (distinct (cdr seq))))) 22:50 rudybot: *offby1: Done. 22:50 offby1: rudybot: eval (distinct?(list 1 2 3)) 22:50 rudybot: *offby1: error: reference to an identifier before its definition: distinct in module: 'program 22:50 offby1: oops 22:51 offby1: rudybot: eval (define (distinct? seq) (cond ((null? seq) #t) ((null? (cdr seq)) #t) ((equal?(car seq) (cadr seq)) #f) (else (distinct? (cdr seq))))) 22:51 rudybot: *offby1: Done. 22:51 offby1: rudybot: eval (distinct?(list 1 2 3)) 22:51 rudybot: *offby1: ; Value: #t 22:51 offby1: rudybot: eval (distinct?(list 1 2 3 2)) 22:51 rudybot: *offby1: ; Value: #t 22:51 offby1: crap 22:51 offby1: oh well 22:51 RackN00b: haha... 22:52 offby1: that paste is fine, once you write unique-keys? :-) 22:52 (join) jeapostrophe 22:52 RackN00b: as we speak... :P 22:52 offby1: rudybot: eval (make-hash '( (1 . one) (2 . two) ( 3 . three))) 22:52 rudybot: *offby1: ; Value: #hash((1 . one) (2 . two) (3 . three)) 22:54 RackN00b: I've gotta learn about hash tables... The docs don't quite do it for me though... 22:54 RackN00b: Have to play around with them a bit. 22:56 offby1: rudybot: eval (define (dups? seq)(memf (curryr > 1)) 22:56 rudybot: *offby1: error: #:1:0: read: expected a `)' to close `(' 22:56 offby1: (map cdr 22:56 offby1: err 22:56 offby1: rudybot: eval (define (dups? seq) (memf (curryr > 1) (map cdr (dict->list (for/fold ([h (make-immutable-hash)]) ([key (map car seq)]) (hash-update h key add1 0)))))) 22:56 rudybot: *offby1: error: current-directory: `exists' access denied for /usr/local/src/rudybot/ 22:56 offby1 stares blankly 22:56 offby1: rudybot: eval 0 22:56 rudybot: *offby1: ; Value: 0 22:57 offby1: rudybot: eval (define (dups? seq) (memf (curryr > 1) (map cdr (dict->list (for/fold ([h (make-immutable-hash)]) ([key (map car seq)]) (hash-update h key add1 0)))))) 22:57 rudybot: *offby1: error: current-directory: `exists' access denied for /usr/local/src/rudybot/ 22:57 offby1: rudybot: init 22:57 rudybot: *offby1: your sandbox is ready 22:57 offby1: rudybot: eval (define (dups? seq) (memf (curryr > 1) (map cdr (dict->list (for/fold ([h (make-immutable-hash)]) ([key (map car seq)]) (hash-update h key add1 0)))))) 22:57 rudybot: *offby1: error: current-directory: `exists' access denied for /usr/local/src/rudybot/ 22:57 offby1: crazy. 22:57 offby1: no idea what's going on there. 22:57 offby1: ANyway, that's my overly-complex take on "dups?" 22:58 RackN00b: haha... well thanks for the help :D 22:58 offby1: seems there ought to be a simpler way 22:58 RackN00b: I would have thought so... 22:58 jamessan: rudybot: eval (map car '(1 2 3)) 22:58 rudybot: jamessan: your sandbox is ready 22:58 rudybot: jamessan: error: car: expects argument of type ; given 1 22:58 offby1: that's correct 22:59 offby1: rudybot: (define (dups? seq) (memf (curryr > 1) (map cdr (dict->list (for/fold ([h (make-immutable-hash)]) ([key (map car seq)]) (hash-update h key add1 0)))))) 22:59 rudybot: *offby1: error: current-directory: `exists' access denied for /usr/local/src/rudybot/ 22:59 offby1: grr 22:59 jamessan: for/fold makes (map car seq) not wrong? 22:59 offby1: jamessan: no, passing an alias as seq makes (map car seq) not wrong. 22:59 offby1: rudybot: (map car ' ((1 . one) (2 . two))) 22:59 rudybot: *offby1: ; Value: (1 2) 23:00 offby1: rudybot: (map car ' ((1 . one) (2 . two) (3 . three) (2 . two-again))) 23:00 rudybot: *offby1: ; Value: (1 2 3 2) 23:01 offby1: rudybot: (for/fold ([h (make-immutable-hash)]) ([key (map car ' ((1 . one) (2 . two) (3 . three) (2 . two-again)))]) (hash-update h key add1 0)) 23:01 rudybot: *offby1: ; Value: #hash((1 . 1) (2 . 2) (3 . 1)) 23:01 offby1: rudybot: (map crr (for/fold ([h (make-immutable-hash)]) ([key (map car ' ((1 . one) (2 . two) (3 . three) (2 . two-again)))]) (hash-update h key add1 0))) 23:01 rudybot: *offby1: error: reference to an identifier before its definition: crr in module: 'program 23:01 offby1: rudybot: (map cdr (for/fold ([h (make-immutable-hash)]) ([key (map car ' ((1 . one) (2 . two) (3 . three) (2 . two-again)))]) (hash-update h key add1 0))) 23:01 rudybot: *offby1: error: map: expects type as 2nd argument, given: '#hash((1 . 1) (2 . 2) (3 . 1)); other arguments were: # 23:01 offby1: rudybot: (map cdr (dict->list (for/fold ([h (make-immutable-hash)]) ([key (map car ' ((1 . one) (2 . two) (3 . three) (2 . two-again)))]) (hash-update h key add1 0)))) 23:01 rudybot: *offby1: error: current-directory: `exists' access denied for /usr/local/src/rudybot/ 23:01 offby1: huh 23:01 offby1: rudybot: eval dict->list 23:01 rudybot: *offby1: error: current-directory: `exists' access denied for /usr/local/src/rudybot/ 23:02 offby1: rudybot: eval dict? 23:02 rudybot: *offby1: error: current-directory: `exists' access denied for /usr/local/src/rudybot/ 23:02 offby1: weeeeiiiiirrrrd 23:02 offby1: what is he thinking?! 23:03 offby1: rudybot: what the hell are you thinking, boy?! 23:03 rudybot: *offby1: It's a hell of a sport. 23:03 offby1: rudybot: just dial it down a notch. 23:03 rudybot: *offby1: 288000 sounds like a dial up modem speed. 23:04 offby1: rudybot: eval (require racket/dict) 23:04 rudybot: *offby1: Done. 23:04 offby1: rudybot: dict? 23:04 rudybot: *offby1: ,dict depenified 23:04 offby1: rudybot: eval dict? 23:04 rudybot: *offby1: error: current-directory: `exists' access denied for /usr/local/src/rudybot/ 23:05 offby1: *sigh* 23:06 offby1: rudybot: eval hash-table->list 23:06 rudybot: *offby1: error: reference to an identifier before its definition: hash-table->list in module: 'program 23:06 (quit) jeapostrophe: Ping timeout: 255 seconds 23:06 offby1: rudybot: (hash-map (for/fold ([h (make-immutable-hash)]) ([key (map car ' ((1 . one) 23:06 rudybot: *offby1: probably its easier to use a bloom filter or a straight up hashmap 23:06 offby1: *sigh* 23:07 offby1: rudybot: (hash-map (for/fold ([h (make-immutable-hash)]) ([key (map car ' ((1 . one) (2 . two) (3 . three) (2 . two-again)))]) (hash-update h key add1 0)) (lambda (k v) v)) 23:07 rudybot: *offby1: ; Value: (1 2 1) 23:07 offby1: yay 23:07 offby1: rudybot: (memf (curryr > 1) (hash-map (for/fold ([h (make-immutable-hash)]) ([key (map car ' ((1 . one) (2 . two) (3 . three) (2 . two-again)))]) (hash-update h key add1 0)) (lambda (k v) v))) 23:07 rudybot: *offby1: ; Value: (2 1) 23:07 offby1: rudybot: (define (dups? seq) (memf (curryr > 1) (hash-map (for/fold ([h (make-immutable-hash)]) ([key (map car seq)]) (hash-update h key add1 0)) (lambda (k v) v)))) 23:07 rudybot: *offby1: Done. 23:07 offby1: actually it should be "alist", not "seq" 23:08 (join) AlbireoX 23:16 (quit) freakazoid: Quit: Computer has gone to sleep. 23:22 (part) RackN00b 23:45 (join) veer 23:57 (join) elliottcable