00:04:57 -!- Bicyclidine has quit (Ping timeout: 255 seconds). 00:10:23 -!- zzo38 has joined. 00:10:46 -!- Lymia has joined. 00:10:49 nya~ 00:11:52 hi 00:27:05 -!- Bicyclidine has joined. 00:38:28 -!- copumpkin has joined. 00:44:33 -!- Phantom_Hoover has quit (Read error: Connection reset by peer). 00:51:35 -!- drdanmaku has quit (Quit: Connection closed for inactivity). 00:55:39 -!- Melvar` has joined. 00:56:57 -!- Melvar has quit (Ping timeout: 245 seconds). 00:57:06 -!- idris-bot has quit (Ping timeout: 272 seconds). 00:58:13 -!- idris-bot has joined. 01:00:49 -!- G33kDude has joined. 01:01:13 Anyone here that can help me with piet? I'm having a very hard time understanding the roll command 01:13:42 ? 01:13:55 i can't. 01:13:59 where is roll documented? 01:17:37 near the bottom of this page http://www.dangermouse.net/esoteric/piet.html 01:18:29 -!- Melvar` has changed nick to Melvar. 01:20:30 seems clear. eg. roll on stack a b c d e 4 2 results in a d e b c 01:21:28 roll on stack a b c d e 4 1 results in a e b c d 01:22:32 With left on top, 2 4 5 4 3 2 1 is returning 3 2 5 4 1 01:22:46 i have top on right 01:23:15 taking the first 2 items, and putting the bottom of the items into what will be the 4th stack spot. But then what does 'negative roll' do? 01:23:22 Experimentation leaves me confused 01:24:27 roll on stack a b c d e 4 -1 results in a c d e b 01:24:38 same as roll on stack a b c d e 4 3 01:25:30 oh 01:25:40 I've been thinking about this completely in the wrong way 01:28:07 I'm not too familiar with stack manipulations 01:28:11 hence my confusion 01:28:29 roll is standard among all stack based languages 01:29:07 of which none I am familiar with 01:29:49 it literally moves stack elements around 01:30:12 -!- Bicyclidine has quit (Ping timeout: 246 seconds). 01:30:12 in a circular motion 01:30:25 I understand now 01:30:34 I did not understand roughly 6 minutes ago 01:43:55 -!- scounder has quit (Ping timeout: 260 seconds). 01:43:57 -!- Bicyclidine has joined. 01:50:20 -!- scounder has joined. 02:04:22 -!- Bicyclidine has quit (Ping timeout: 245 seconds). 02:44:40 !bfjoust ping < 02:48:54 tromp_: Thank you for your help 02:49:07 My piet interpreter works now :) 02:59:05 gratz, G33kDude! 03:17:18 tromp_: My test program was http://www.dangermouse.net/esoteric/piet/pietquest.png 03:17:32 It's a text adventure; very fun. 03:19:24 hmm, is this handwritten in piet or compiled to piet? 03:34:12 -!- polytone_ has joined. 03:35:59 -!- jix_ has joined. 03:37:18 -!- yorick_ has joined. 03:40:32 -!- not^v has quit (*.net *.split). 03:40:33 -!- jix has quit (*.net *.split). 03:40:33 -!- yorick has quit (*.net *.split). 03:40:33 -!- polytone has quit (*.net *.split). 03:41:23 -!- G33kDude has changed nick to GeekDude. 03:45:51 -!- 16WAAD3I5 has joined. 03:50:02 -!- paul2520 has joined. 03:58:12 -!- not^v has joined. 04:01:24 -!- 16WAAD3I5 has quit (Ping timeout: 272 seconds). 04:04:12 -!- FireFly has quit (Ping timeout: 240 seconds). 04:04:12 tromp_: that was compiled 04:06:52 -!- esowiki has joined. 04:06:56 -!- esowiki has joined. 04:06:57 -!- esowiki has joined. 04:07:32 -!- esowiki has joined. 04:07:37 -!- esowiki has joined. 04:07:37 -!- esowiki has joined. 04:07:47 -!- glogbot has joined. 04:08:05 -!- Gregor has joined. 04:09:03 -!- FireFly has joined. 04:20:20 tromp_: 04:20:24 I'll be back tomorrow 04:20:25 -!- GeekDude has quit (Quit: {{{}}{{{}}{{}}}{{}}} (www.adiirc.com)). 04:22:13 -!- scounder has quit (Ping timeout: 260 seconds). 04:35:34 -!- scounder has joined. 04:40:33 -!- clog has quit (Ping timeout: 268 seconds). 05:00:02 -!- not^v has changed nick to v^Bot. 05:00:52 -!- v^Bot has quit (Quit: http://i.imgur.com/Akc6r.gif). 06:18:04 Integers with multpilication form a group, right? 06:18:17 No. 06:18:54 I suspected so. 06:19:19 Is it because you can't define an inverse? 06:19:57 yea 06:20:35 naturals mod a prime (or more? eh) should be alright though. 06:25:22 oh wait. overloading doesn't work with java generics 06:25:30 screw this. Who made this crappy language? 06:27:19 Bike: at least mod a prime 06:27:24 since you can define an inverse for everything then 06:27:52 I'm not sure if there are non primes that have an inverse for everything 06:32:16 mroman_: Backwards compatibility, y'see. 06:32:33 Overloading is overrated, anyway. 06:39:38 -!- clog has joined. 06:45:08 Hrm. The London subway map is not terribly intelligible in grayscale. 06:49:45 It'd be tricky anyway 06:49:51 for example class Foo 06:50:02 Foo(T t) { ..} Foo(U u) {..} 06:50:09 since that would require a constraint T != U 06:50:15 and I don't think Java supports that 06:52:43 You'd presumably do that with private Foo(T t, U u) {..} public static Foo fromT(T t) { return new Foo(t, null); } public static Foo fromU(U u) { return new Foo(null, u); } 06:52:55 yep 06:53:47 it would be sorta cool because you probably then could extract an element by type 06:53:53 i.e U get(); T get(); 06:54:22 Well, you can't overload based on only return type in the first place, anyway. 06:54:24 rather than U getU(); T getT(); 06:54:40 not in Java, yes @return type only 06:54:54 since U and T are both erased to Object 06:54:59 anyway 06:55:17 Well, even without that. The language won't let you write an int get() and a double get(). 06:56:45 I know. 06:57:21 mroman_: integers are a group if you drop 0 06:57:37 coppro: ? 06:58:03 02:18:04 < mroman_> Integers with multpilication form a group, right? 06:58:06 So which integer is the multiplicative inverse of 2? 06:58:18 oh... integers 06:58:18 nvm 06:58:22 somehow I read rationals 07:02:29 hm 07:02:35 there's now T.getClass() either 07:02:38 *no 07:04:04 In quite a lot of cases, you just ask clients to pass a Class object if you need a "type token" inside the code. 07:04:22 http://codepad.org/nSxBZMFi 07:04:27 ^- this isn't working as well 07:05:04 technically I'd expect (U)t; to fail on the Integer 07:05:16 but it doesn't. 07:05:30 probably because it's (Object)t anyway 07:06:11 mroman_: public U get(Class clazz) { return clazz.cast(whatever); } 07:06:47 but that's uncool 07:06:48 objs.get(Integer.class); will then properly barf out at cast-time with a ClassCastException. 07:07:08 Incidentally, the fromT/fromU I wrote above needs to be (sigh) public static Tmp fromT(R t) { return new Tmp<>(t, null); } and then you have to call it as Tmp.fromT(foo); 07:07:29 it works though of course 07:08:29 it would be much more usefull if Java could provide U.getClass 07:08:37 which is technically possible 07:08:42 probably 07:08:56 ah no 07:09:08 the compiler knows U 07:09:11 but the runtime doesn't 07:09:24 Yes, and the compiler can only generate the one method, since it's not templates or anything. 07:09:25 but maybe the compiler could inject some boiler-plate code 07:09:48 A hidden type token parameter injected at each call site? 07:09:51 the compiler *could* create multiple methods 07:09:53 like C++-style 07:10:01 but yeah. 07:10:06 that ain't gonna happen soon 07:10:17 (I suppose Java 8 nor Java 9 will have such features?) 07:10:31 Java 8 has been out for quite a while, and it doesn't do that. 07:10:39 The streams are nice, though. 07:11:42 It's anonymous inner classes all the way down, of course, but with lots of syntactic sugar. 07:12:09 actually 07:12:20 Tmp.<> shouldn't be necessary in Java 8? 07:12:43 That's possible, I think I heard something vague about improving the type inference. 07:13:02 I don't have a Java 8 thing on this thing. 07:14:01 List names = students.stream().map(Student::getName).filter(name->name.startsWith("A")) 07:14:04 .collect(Collectors.toList()); 07:14:05 Oh, I must've messed something earlier, it does work in Java 7 without that too. 07:14:18 interesting @streams 07:19:52 The method references are fancy. If class Bar has a method Foo fooify(); then passing Bar::fooify to a method taking an interface Foolator { Foo arbitraryName(Bar b); } is close to passing new Foolator() { Foo arbitraryName(Bar b) { return b.fooify(); } } 07:21:02 [wiki] [[Talk:AutoMouse]] http://esolangs.org/w/index.php?diff=40425&oldid=8333 * Rdebath * (+5701) Bit of digging. 07:21:07 what's the type of lambda expressions actually? 07:21:15 All those fancy example pages never list that 07:21:28 [wiki] [[AutoMouse]] http://esolangs.org/w/index.php?diff=40426&oldid=37444 * Rdebath * (-8) Source code says 1998 07:21:43 looks like it infers it 07:21:52 i.e n -> Boolean is Predicate 07:24:08 http://java.dzone.com/articles/introduction-functional-1 07:25:17 (that sounds like any "functional interface" works, but doesn't say anything about inference) 07:30:30 Yes, you're supposed to be able to stick a lambda wherever a "functional interface" is expected. 07:53:06 -!- AnotherTest has joined. 08:12:23 -!- ^v has quit (Ping timeout: 240 seconds). 08:22:40 automouse sounds great, except this microsoft windows thingie 08:25:40 -!- Patashu has joined. 08:27:45 -!- ^v has joined. 08:34:26 [wiki] [[Special:Log/newusers]] create * CRS-ECHO51 * New user account 08:34:28 [wiki] [[Talk:Alphuck]] http://esolangs.org/w/index.php?diff=40427&oldid=40416 * Rdebath * (+242) /* The least you can do is make it mnemonic */ 08:41:21 -!- KingOfKarlsruhe has quit (Ping timeout: 264 seconds). 08:45:38 -!- shikhin has joined. 08:53:40 -!- KingOfKarlsruhe has joined. 08:56:08 i should make numfuck with 1 to 8 as instructions, just because i can! 09:02:48 -!- oerjan has joined. 09:06:38 -!- yorick_ has changed nick to yorick. 09:09:10 ok 09:09:16 if you do that I'lll create XMLFuck 09:09:59 . 09:10:08 something ugly like thatt 09:10:12 how can that possibly not have been done already. 09:10:31 wait 09:10:33 there's an XMLfuck 09:10:51 @messages- 09:10:51 boily said 10h 13m 14s ago: on a wiki-editing frenzy again? 09:10:57 mroman_: thought so 09:11:27 well... 09:11:31 HTMLfuck is probably still open 09:11:37 @tell boily I am reading the wiki recent changes in very large batches recently 09:11:37 Consider it noted. 09:11:46 mroman_: wouldn't bet on it. 09:12:17 mroman_: type=increment? 09:12:32 mroman_: besides that: go for it 09:14:23 I will! 09:17:10 I think that a program in register forwarding format should have only one kind of terminator for each block, which consists of a register number inside of the current block, and a set of zero or more (values,block,arguments) triples. If it matches a value in the list, the next block is the specified one with the specified arguments (each argument is a register number from the current block). If none match, undefined behaviour is caused. 09:17:43 (Note that pseudo-blocks such as RETURN are also possible.) 09:19:17 http://mroman.ch/bfhtml.html <- there you go 09:19:37 (The block can also be any block within the current function, or the initial block of any other function in the program.) 09:20:07
..
shall be treated as a loop . 09:20:13 the rest is usual brainfuck style 09:20:18 except that < > are < > of course 09:20:45 it also provides neat indentation . 09:21:45 however, most browsers refuse to copy the [ and ] in the webpage 09:22:44 which makes it kinda pythony 09:22:50 instead of [] you have to use indentation . 09:23:04 aka Braynfuck 09:24:22 so you remove one character from the Brainfuck-Alphabet without loosing anything 09:24:31 the perfect brainfuck minimalization 09:25:19 You minimalize nothing. Instead of [ and ] you now need spaces and line breaks. 09:25:36 Still two characters each. 09:25:56 three if you have windows 09:26:27 I didn't expect people to find out that soon that it's bogus 09:27:12 I don't know if you expected anyone else to, but I did. 09:30:39 How about Huffman encoded BF? 09:31:18 Or noe encoded bf 09:31:24 noe oughta be really well with brainfuck 09:32:43 since you can define an inverse for everything then <-- everything that isn't divisible by the prime, you mean. 09:33:14 I'm not sure if there are non primes that have an inverse for everything <-- then you change it to "everything that is relatively prime to your modulus" 09:33:31 noe can compress helloworld bf by 30% 09:33:55 at least 09:34:25 what's noe 09:34:45 some stupid compression algorithm I had the idea to 09:34:46 00 = + / 01 = - / 10 = < / 110 = > / 11100 = [ / 11101 = ] / 11110 = . / 11111 = , 09:35:02 3.625 bits per average instruction instead of 3. 09:36:22 i have a hunch you're not referring to https://github.com/noe/encoding 09:36:55 what 09:36:59 *not*? 09:37:07 I'm referring to that 09:37:09 oh. 09:37:19 i didn't think you were spanish 09:37:28 oh 09:37:29 wait 09:37:29 no 09:37:44 https://github.com/FMNSSun/noe/ 09:37:47 ^- im refering to that 09:37:51 sry. I read your url wrong 09:39:19 It can compress http://www.iwriteiam.nl/Ha_bf_inter.html by 46% 09:39:47 the simple version of noe 09:39:53 the real version oughta do much better 09:40:29 good, good 09:44:48 hm. or not. 09:46:14 gotta tune the params. 09:47:55 47% 09:47:59 not really that much better 09:48:30 however, you can combine it with huffman 09:48:41 i.e. by not encoding a char with 8bits you obviously get even more 09:49:04 technically you'd need 3 bits max for a bf instruction 09:49:46 shannon will get you anyhow. 09:50:06 yeah it's 47% for the selfinterpreter 09:53:50 55% with simple if you use 3 bits 09:53:54 which sounds odd 09:53:57 > 8.0/3.0 09:53:59 2.6666666666666665 09:54:11 > 1/2.666 09:54:12 0.37509377344336087 09:54:23 > 1-(1/2.666) 09:54:24 0.6249062265566392 09:54:32 just using 3bits should already give you 62% 09:55:21 wait 09:55:27 my ratio calculation looks terribly wrong 09:57:12 > 3/8 09:57:13 0.375 10:05:35 yeah. 10:05:46 it can't compress anything if a symbol only has three bits 10:08:47 noe works differently 10:12:35 -!- boily has joined. 10:13:29 it's usually able to compress single english sentences by 25% - 35% 10:22:23 so I thought 10:22:42 a more reasonable benchmark says around 8% :( 10:24:43 but yeah. It's a sucky compression algorithm except in a few edgecases 10:29:55 other sucky compression algorithms in my head are using permutations 10:29:56 i.e. 10:30:06 if you have 5 symbols, you need 3 bits for one symbol 10:30:25 which means to encode a string of 5 symbols you need 15bits 10:30:33 however, there are only 120 permutations of 5 symbols 10:30:47 i.e. you could encode which permutation of 5 symbols it is in 7bits 10:30:53 saving 8 bits 10:32:21 also 10:32:24 you can create a tape 10:32:34 i.e "ABCDE" if you have 5 symbols 10:32:47 and the pointer is at A 10:32:59 1 means left, 0 means right 10:33:35 if the you want to compress BACDEAB you'd write 0100000 10:34:32 (also 7 bits instead of 15) 10:35:08 But what if I want to encode "Qzyzzalroum"? 10:35:16 you lost me there. isn't “0100000” ambiguous? 10:35:58 You lost me earlier about the permutation thing, if your alphabet is "ABCDE", which permutation numbers you write down for the string "AAAAABBBBB". 10:36:19 boily: maybe i made a mistake there 10:36:22 let me check that 10:36:47 true 10:37:02 I forgot the stop sign 10:37:04 :) 10:37:06 Oh I actually brought this word up here before. Interesting :) 10:37:33 `? qzyzzalroum 10:37:34 qzyzzalroum? ¯\(°​_o)/¯ 10:37:45 int-e: then define it ^^ 10:37:56 fizzie: It's not a general purpose compression ;) 10:38:50 `define qzyzzalroum You should start the crossword over. 10:38:51 Failed to connect to socket 2. \ \ Looking up 127.0.0.1:3128 \ Making HTTP connection to 127.0.0.1:3128 \ Sending HTTP request. \ HTTP request sent; waiting for response. \ Alert!: Unexpected network read error; connection aborted. \ Can't Access `http://google.com/search?q=define:%71%7a%79%7a%7a%61%6c%72%6f%75%6d%20%59%6f%75%20%73%68%6f%75%6c%64% 10:39:13 obviously the tape thingy is only working if you have lots of sorted substrings 10:39:23 `learn qzyzzalroum You should start the crossword over. 10:39:27 I knew that. 10:39:37 so what's `define? 10:39:43 I don't know. 10:39:52 You can tell from the URL. 10:39:59 It used to be "ask google for a definition of a word". 10:40:09 Now it's "break down". 10:40:10 mroman_: well, you can achieve that with that banana matrix from bzip2 I guess. 10:40:25 fizzie: oh I missed the readable part in all the gibberish 10:40:29 (how is it called again? I only have the wikipédia example in my head...) 10:40:59 ah! burrows-wheeler. but I still prefer “banana matrix”. 10:41:00 > map (chr.fst.head.reads.tail) $ iterate (drop 3) "%71%7a%79%7a%7a%61%6c%72%6f%75%6d%20%59%6f%75%20%73%68%6f%75%6c%64%" :: String 10:41:01 "G\aO\a\a=\ACKH\ACKK\ACK\DC4;\ACKK\DC4ID\ACKK\ACK@*Exception: Prelude.head: ... 10:41:31 > map (chr.fst.head.reads.("0x"++).tail) $ iterate (drop 3) "%71%7a%79%7a%7a%61%6c%72%6f%75%6d%20%59%6f%75%20%73%68%6f%75%6c%64%" :: String 10:41:32 "qzyzzalroum You should\NUL*Exception: Prelude.tail: empty list 10:43:16 > read "0x" :: Int 10:43:17 *Exception: Prelude.read: no parse 10:43:48 > reads "0x" :: [(Int, String)] 10:43:49 [(0,"x")] 10:44:01 Sure. 10:44:14 > reads "0x1" :: [(Int, String)] 10:44:15 [(1,"")] 10:45:25 `` perl -e 'use URI::Escape;print uri_unescape("%71%7a%79%7a%7a%61%6c%72%6f%75%6d%20%59%6f%75%20%73%68%6f%75%6c%64%")' 10:45:25 Can't locate URI/Escape.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at -e line 1. \ BEGIN failed--compilation aborted at -e line 1. 10:45:30 of course. 10:47:51 `` python -c 'import urllib; print urllib.unquote("%71%7a%79%7a%7a%61%6c%72%6f%75%6d%20%59%6f%75%20%73%68%6f%75%6c%64%")' 10:47:52 qzyzzalroum You should% 10:51:51 `run perl -e 'print pack("C*", map {hex} ("%71%7a%79%7a%7a%61%6c%72%6f%75%6d%20%59%6f%75%20%73%68%6f%75%6c%64%" =~ /%(..)/g));' 10:51:52 qzyzzalroum You should 11:00:31 -!- GeekDude has joined. 11:00:34 hello tromp_ 11:00:38 and everyone else 11:02:31 GeekDood morning! 11:07:33 -!- boily has quit (Quit: QZYZZALROUMISCH CHICKEN). 11:26:01 `? qzyzzalroum 11:26:01 qzyzzalroum You should start the crossword over. 11:26:41 @tell boily I think the pdf maintainer should know how `learn actually works twh 11:26:42 Consider it noted. 11:27:15 `run echo "You should start the crossword over." >wisdom/qzyzzalroum 11:27:18 No output. 11:27:22 `? qzyzzalroum 11:27:23 You should start the crossword over. 11:45:13 `cat bin/learn 11:45:14 ​#!/bin/bash \ topic=$(echo "$1" | lowercase | sed 's/^\(an\?\|the\) //;s/s\? .*//') \ echo "$1" >"wisdom/$topic" \ echo "I knew that." 11:46:52 `? I 11:46:53 i love monoids 11:47:47 -!- idris-bot has quit (Ping timeout: 276 seconds). 11:48:12 -!- Melvar has quit (Ping timeout: 245 seconds). 12:01:22 -!- AnotherTest has quit (*.net *.split). 12:01:59 -!- Sgeo has quit (Read error: Connection reset by peer). 12:05:14 -!- Melvar has joined. 12:05:16 My hobby: Make people scared by trying to login to their computer and watch them see the "There has been one failed attempt" message . 12:05:36 That was even in an xkcd I guess? 12:05:50 -!- AnotherTest has joined. 12:16:07 -!- Lymia has quit (Ping timeout: 245 seconds). 12:16:49 -!- idris-bot has joined. 12:17:16 @hoogle ldapClose 12:17:18 No results found 12:17:20 @hoogle ldapOpen 12:17:20 No results found 12:17:29 LDAP has ldapOpen 12:17:33 but does it have ldapClose o_O 12:20:42 -!- tromp has quit (Ping timeout: 255 seconds). 12:27:34 -!- Patashu has quit (Disconnected by services). 12:27:35 -!- Patashu_ has joined. 12:47:47 (("objectCategory" `ldapEqu` "person") `ldapAnd` ("objectCategory" `ldapEqu` "contact")) `ldapAnd` (("sn" `ldapEqu` "Smith") `ldapOr` ("sn" `ldapEqu` "Johnson")) 12:47:50 (&(&(objectCategory=person)(objectCategory=contact))(|(sn=Smith)(sn=Johnson))) 12:48:17 ^- Somebody should do this 12:48:21 but more serious 12:49:17 What’s it called again where you stick the module name in everything? ;_; 12:49:34 -!- tromp has joined. 12:49:57 this is going to be painful to implement 12:51:48 *Main> "fooAttrib" `ldapEqu` "(.*)" 12:51:48 (fooAttrib=\28.\2a\29) 12:52:07 but that's as much functionality as my quick hacking gives 12:52:49 -!- oerjan has quit (Quit: ldapGlassHalfFull). 12:54:09 -!- polytone_ has changed nick to monotone. 12:56:44 -!- AnotherTest has quit (Ping timeout: 252 seconds). 12:58:17 -!- AnotherTest has joined. 13:02:20 Melvar: "in everything"? 13:02:28 You mean re-export it? 13:02:35 or qualified import? 13:04:17 mroman_: No, I mean having “ldap” in “ldapEqu”, “ldapAnd”, “ldapOr”, etc. 13:04:54 it's called "avoid collisions with other operators from other modules" 13:05:07 @hoogle or 13:05:09 Prelude or :: [Bool] -> Bool 13:05:09 Data.List or :: [Bool] -> Bool 13:05:09 Data.Foldable or :: Foldable t => t Bool -> Bool 13:05:14 ^- see 13:05:17 or is already taken :) 13:05:24 You let the *user* decide that. 13:05:27 foldable? 13:05:30 interesting 13:05:32 They can import your module qualified if they like. 13:05:34 @info Foldable 13:05:34 Foldable 13:05:39 -.- 13:05:55 oh 13:06:08 it's that secret-black-magic * -> * stuff 13:07:29 Any examples using Foldable Maybe? 13:07:33 I can't figure one out 13:09:31 > fold (\a b -> a + b) [Just 5, Just 6] 13:09:33 No instance for (GHC.Show.Show a0) 13:09:33 arising from a use of ‘M114505817426468540712624.show_M1145058174264685407... 13:09:33 The type variable ‘a0’ is ambiguous 13:09:33 Note: there are several potential instances: 13:09:33 instance [safe] GHC.Show.Show (b GHC.Types.Int) => 13:09:52 > (fold (\a b -> a + b) [Just 5, Just 6]) :: Maybe Int 13:09:54 Couldn't match type ‘[Data.Maybe.Maybe a0]’ 13:09:54 with ‘Data.Maybe.Maybe GHC.Types.Int’ 13:09:54 Expected type: [Data.Maybe.Maybe a0] 13:09:54 -> [Data.Maybe.Maybe a0] -> [Data.Maybe.Maybe a0] 13:09:54 Actual type: [Data.Maybe.Maybe a0] 13:09:58 @type fold 13:09:59 (Monoid m, Foldable t) => t m -> m 13:10:35 > fold (Just 5) 13:10:36 No instance for (GHC.Show.Show a0) 13:10:36 arising from a use of ‘M712488520844229804512663.show_M7124885208442298045... 13:10:36 The type variable ‘a0’ is ambiguous 13:10:36 Note: there are several potential instances: 13:10:36 instance [safe] GHC.Show.Show (b GHC.Types.Int) => 13:10:44 Maybe is a foldable 13:10:48 What do you want the monoid to be? 13:10:54 I have no idea 13:11:19 but Maybe is also a Monoid 13:11:31 > fold (Just (Just 5)) 13:11:33 No instance for (GHC.Show.Show a0) 13:11:33 arising from a use of ‘M514486933773938025012685.show_M5144869337739380250... 13:11:33 The type variable ‘a0’ is ambiguous 13:11:33 Note: there are several potential instances: 13:11:33 instance [safe] GHC.Show.Show (b GHC.Types.Int) => 13:11:34 Only for Monoid element type. 13:11:36 :( 13:11:45 > fold (Just (succ)) 13:11:47 No instance for (Data.Typeable.Internal.Typeable a0) 13:11:47 arising from a use of ‘M163181566624904154912697.show_M1631815666249041549... 13:11:47 The type variable ‘a0’ is ambiguous 13:11:47 Note: there are several potential instances: 13:11:47 instance Data.Typeable.Internal.Typeable Data.Dynamic.Dynamic 13:12:01 @type fold 13:12:03 (Monoid m, Foldable t) => t m -> m 13:12:10 it want's a Foldable that contains a Monoid 13:12:16 and returns the Monoid 13:12:19 *wants 13:12:22 Yes. 13:12:25 so 13:12:30 Maybe is Foldable 13:12:43 and also a Monoid 13:12:51 then Just Nothing should be t m? 13:12:51 Only for monoid element type. 13:13:05 @type Just Nothing 13:13:06 Maybe (Maybe a) 13:13:17 oh 13:13:48 fold (Just "foo") 13:13:53 > fold (Just "foo") 13:13:54 "foo" 13:14:00 Maybe isn't a Monoid 13:14:11 > fold (Nothing :: Maybe String) 13:14:13 "" 13:14:45 hu 13:14:50 String is a monoid? 13:15:04 [a] is one at least, I see 13:15:19 > fold (Sum 8) 13:15:21 Could not deduce (Data.Foldable.Foldable Data.Monoid.Sum) 13:15:21 arising from a use of ‘Data.Foldable.fold’ 13:15:21 from the context (Data.Monoid.Monoid m, GHC.Num.Num m) 13:15:21 bound by the inferred type of 13:15:21 it :: (Data.Monoid.Monoid m, GHC.Num.Num m) => m 13:15:37 > fold (Just (Sum 8)) 13:15:39 Sum {getSum = 8} 13:16:01 “instance Monoid a => Monoid (Maybe a)” 13:16:24 > fold (Nothing :: Maybe (Sum Integer)) 13:16:25 Sum {getSum = 0} 13:16:30 > fold [Sum 8] 13:16:31 Sum {getSum = 8} 13:16:35 > fold [Sum 8, Sum 9] 13:16:37 Sum {getSum = 17} 13:16:50 > fold [Just 8, Just 9] 13:16:51 No instance for (GHC.Show.Show a0) 13:16:51 arising from a use of ‘M62230355020165895612855.show_M62230355020165895612... 13:16:51 The type variable ‘a0’ is ambiguous 13:16:51 Note: there are several potential instances: 13:16:51 instance [safe] GHC.Show.Show (b GHC.Types.Int) => 13:17:11 > (fold [Just 8, Just 9]) :: Maybe Int 13:17:12 No instance for (Data.Monoid.Monoid GHC.Types.Int) 13:17:13 arising from a use of ‘Data.Foldable.fold’ 13:17:16 ok 13:17:17 I see 13:17:23 I understand now 13:17:26 For Maybe, fold = maybe mempty id . 13:17:32 > fold [All False, All True] 13:17:34 All {getAll = False} 13:17:58 but... 13:18:04 > mconcat [All False, All True] 13:18:06 All {getAll = False} 13:18:11 where's the difference? 13:18:18 For List, fold = mconcat . 13:18:51 > fold $ Just (Any False) 13:18:52 fold works on all Foldables, mconcat only on lists. 13:18:52 Any {getAny = False} 13:19:03 @type fold 13:19:03 (Monoid m, Foldable t) => t m -> m 13:19:05 @type mconcat 13:19:06 Monoid a => [a] -> a 13:19:16 ic. 13:19:30 What are usually usecases for fold where fold /= mconcat? 13:20:17 You get to be generic in your container type. 13:20:18 Foldable ((,) a) wtf 13:20:27 (,) is a function? 13:20:30 @type (,) 13:20:31 a -> b -> (a, b) 13:20:42 you can make instances of functions? 13:20:52 @kind (,) 13:20:53 * -> * -> * 13:20:59 It’s that one. 13:21:41 @kind (,) Integer 13:21:42 * -> * 13:22:14 @kind id 13:22:15 Not in scope: type variable ‘id’ 13:22:21 @kind Just 13:22:22 k -> Maybe k 13:22:28 k 13:22:33 Oh, datakinds. 13:23:00 > let foo = Just :: (k -> Maybe k) 13:23:02 not an expression: ‘let foo = Just :: (k -> Maybe k)’ 13:23:06 > let foo = Just :: (k -> Maybe k) in undefined 13:23:08 *Exception: Prelude.undefined 13:23:31 mroman_: Kinds are the types of types. 13:24:10 and super kinds are the type of kinds? 13:24:12 ;P 13:24:34 @type [] 13:24:35 [t] 13:24:38 @kind [] 13:24:39 * -> * 13:25:01 @data Foo a b c = Foo a b c 13:25:01 Unknown command, try @list 13:25:08 @define Foo a b c = Foo a b c 13:25:09 .L.hs:181:1: Not in scope: data constructor ‘Foo’ 13:25:09 13:25:09 .L.hs:181:13: Not in scope: data constructor ‘Foo’ 13:25:09 13:25:09 .L.hs:181:17: 13:25:10 I think those are usually called sorts, but haskell doesn’t do anything at that level I think. 13:25:30 @kind Maybe 13:25:31 * -> * 13:25:39 hm 13:25:39 ok 13:25:49 Also 13:25:56 @let data Foo a b c = Foo a b c 13:25:59 Defined. 13:26:44 Now you have one Foo at the type level and one Foo at the data level. 13:26:55 @kind Foo 13:26:56 * -> * -> * -> * 13:27:01 This is the former. 13:27:04 @type Foo 13:27:05 a -> b -> c -> Foo a b c 13:27:09 This is the latter. 13:28:05 Similarly with (,) . 13:28:09 http://codepad.org/Vv2ggd5x 13:28:30 Fancy stuff 13:29:08 Probably needs an extension of some kind if you want to state the kind explicitly. It can infer it though. 13:29:20 -XKindSignatures is at least required 13:30:31 ( :t Maybe 13:30:31 Prelude.Maybe.Maybe : Type -> Type 13:30:50 ( :t Just 13:30:52 Prelude.Maybe.Just : a -> Maybe a 13:31:18 ( Just Maybe 13:31:18 Just Maybe : Maybe (Type -> Type) 13:32:26 hm 13:32:55 can't have multiple kinds? 13:33:06 class Foo (t :: * -> * -> *, u :: * -> *) 13:33:27 “class Foo (t :: * -> * -> *) (u :: * -> *)”? 13:33:38 ah 13:33:41 Multiparamtypeclasses 13:33:44 yay 13:34:30 @type traverse_ 13:34:31 Not in scope: ‘traverse_’ 13:34:31 Perhaps you meant one of these: 13:34:31 ‘F.traverse_’ (imported from Data.Foldable), 13:34:49 @type F.traverse_ 13:34:50 (Foldable t, Applicative f) => (a -> f b) -> t a -> f () 13:35:41 @type F.traverse_ print (Just "foo") 13:35:42 IO () 13:36:24 http://codepad.org/pMAn78K6 <- I think I understand it now 13:36:25 That’s another thing to do with a Foldable Maybe. 13:36:29 I just don't know anything useful to do with it 13:38:39 http://codepad.org/FLi0rKHf <- that's the most useful thing I can imagine 13:39:39 That still doesn’t require the kind signatures. 13:40:07 not? 13:40:19 (t :: * -> *) at least is illegal without -XKindSignatures 13:40:30 The kinds can be inferred. 13:41:12 class Convert t u isn't working though 13:41:43 What’s it saying? 13:43:26 More precisely: WFM. 13:43:36 ‘Convert’ is applied to too many type arguments In the instance declaration for ‘Convert (Maybe) ([])’ 13:43:46 ah 13:43:48 damn reload 13:44:33 it works, yes 13:44:38 “class Functor f where fmap :: (a -> b) -> f a -> f b” doesn’t require an explicit signature either. 13:45:38 I believe you need the kind signatures if you want a polymorphic kind, but I don’t have any particular idea that would require those. 13:48:17 -!- Sprocklem has quit (Ping timeout: 260 seconds). 13:49:07 ( :t sequence 13:49:07 Prelude.Traversable.sequence : Traversable t => Applicative f => t (f a) -> f (t a) 13:49:09 -!- ais523 has joined. 13:49:34 with Vect sequence [[1,2,3],[4,5,6]] 13:49:37 ( with Vect sequence [[1,2,3],[4,5,6]] 13:49:37 [[1, 4], [2, 5], [3, 6]] : Vect 3 (Vect 2 Integer) 13:51:45 what does "with" do? 13:53:11 @hoogle u (t a) -> u a 13:53:12 Control.Monad.List ListT :: m [a] -> ListT a 13:53:12 Language.Haskell.TH.Syntax Q :: (forall m. Quasi m => m a) -> Q a 13:53:12 Data.Maybe catMaybes :: [Maybe a] -> [a] 14:11:59 > catMaybes $ map Just [99,99] 14:12:01 [99,99] 14:12:28 ( id 4 14:12:28 4 : Integer 14:12:43 ( :t id 14:12:44 Prelude.Basics.id : a -> a 14:12:44 Control.Category.id : Category cat => cat a a 14:12:51 ( :t (+) 14:12:53 Prelude.Classes.(+) : Num a => a -> a -> a 14:12:53 Prelude.Fin.(+) : Fin n -> Fin m -> Fin (n + m) 14:13:05 ( :t Fin.(+) 14:13:05 Prelude.Fin.(+) : Fin n -> Fin m -> Fin (n + m) 14:13:12 ( Fin 9 14:13:12 Fin 9 : Type 14:13:27 ( :t (Fin 9) Fin.(+) (Fin 1) 14:13:28 (input):1:12:When elaborating an application of constructor __infer: 14:13:28 Fin (fromInteger 9) does not have a function type (Type) 14:13:37 ( :t (Fin 9) `Fin.(+)` (Fin 1) 14:13:37 (input):1:22:When elaborating an application of function Prelude.Fin.+: 14:13:37 Can't unify 14:13:37 Type 14:13:37 with 14:13:37 Fin m↵… 14:13:47 ( :t (Fin 9) + (Fin 1) 14:13:47 Can't resolve type class Num Type 14:13:51 boo! 14:21:03 [wiki] [[Bitoven]] N http://esolangs.org/w/index.php?oldid=40428 * Imaginer1 * (+3057) Created page with "'''Bitoven''' is a WIP programming language by [[User:Imaginer1]] in early September 2014, with the goal of making a musical programming language focusing more on free express..." 14:23:26 WIP? 14:23:36 TIOBE-Sprachen-Index: C++ und Java auf Allzeit-Tief <- suck it C++ and Java 14:26:07 Everything that matches /trivial brainfuck substitution/ or the like should be treated as spam :( 14:26:27 unless it's funny 14:26:38 which most of those "joke" languages aren't really funny I'm afraid 14:33:53 -!- shikhin has quit (Ping timeout: 240 seconds). 14:35:26 -!- Phantom_Hoover has joined. 14:38:47 ais523: It says to prefer that namespace if it can’t disambiguate something otherwise. 14:39:06 Melvar: right, I was guessing it was something like that 14:39:31 mroman_: Fin 9 is a type. You can’t add types together. 14:40:20 Melvar: I add together types all the time :-( 14:40:26 (seriously, that's one of the things I do in my research) 14:41:08 Oh sure, I mean there is no function named (+) that does it in the Idris stdlib. 14:41:47 yes, that makes more sense 14:42:05 hmm, is linear typing expressable in Idris? 14:42:15 ( the (Fin 9) 3 + the (Fin 2) 1 14:42:16 fS (fS (fS (fS fZ))) : Fin 11 14:43:22 ais523: Not directly. You can write an EDSL that has linear types, I expect, but it’ll be a pain. 14:43:35 -!- Sprocklem has joined. 14:43:45 because you'd need some sort of wrapper to prevent you copying data 14:44:02 indeed, linear types are a pain in languages not designed for them 14:44:15 -!- AnotherTest has quit (Ping timeout: 255 seconds). 14:44:17 The latest versions do have UniqueType, a universe of uniqueness types IIUC, but those are unique, not linear. 14:44:28 and aren't really a good fit for languages like Idris where statements don't stop being true just because you used them to prove something 14:46:27 -!- shikhin has joined. 14:47:43 There is also an idiom using Effects where you have a resource, and you can use operations that destroy the resource, and thereafter use no operations that require the resource. 14:52:19 ( the (Fin 9) 3 + the (Fin 2) 1 14:52:20 fS (fS (fS (fS fZ))) : Fin 11 14:52:23 mroman_: ↑ 14:54:56 too complicated ;) 14:56:36 -!- ais523 has quit (Read error: Connection reset by peer). 14:56:48 -!- ais523 has joined. 14:56:54 Not sure how it’s complicated. 15:02:32 Like a Bird on a moving vehicle chased by the police aiming their guns at it while driving off a cliff. 15:04:22 ( the (Fin 9) 3 15:04:22 fS (fS (fS fZ)) : Fin 9 15:04:27 ( the (Fin 2) 1 15:04:28 fS fZ : Fin 2 15:07:15 ( :t Fin.(+) 15:07:16 Prelude.Fin.(+) : Fin n -> Fin m -> Fin (n + m) 15:07:40 ( :t Fin.(+) {n=9} {m=2} 15:07:40 (+) : Fin (fromInteger 9) -> Fin (fromInteger 2) -> Fin (fromInteger 9 + fromInteger 2) 15:07:48 ( Fin.(+) {n=9} {m=2} 15:07:48 (+) : Fin 9 -> Fin 2 -> Fin 11 15:14:04 More spam that assumes previous contact with spammers: http://sprunge.us/IPPE 15:22:36 -!- mihow has joined. 15:26:27 -!- shikhin has quit (Ping timeout: 245 seconds). 15:34:50 -!- not^v has joined. 15:37:57 -!- not^v has quit (Client Quit). 15:43:39 Heh. Fun: https://github.com/vsedach/Vacietis 15:51:52 -!- Patashu_ has quit (Ping timeout: 240 seconds). 15:53:48 -!- AnotherTest has joined. 15:54:09 -!- adu has joined. 15:56:33 -!- Schoening has joined. 15:57:09 Is there a programming language that uses morse code? 15:58:44 Schoening: well, apparently GRUB has an option to use morse code for its interface 15:58:51 presumably so that you can hear error messages if you don't have a working screen 15:59:00 lol 16:00:05 well that settles that hehe 16:02:22 -!- Sprocklem has quit (Ping timeout: 245 seconds). 16:03:46 ais: hear? I thought it would use morse to blink the keyboard leds. 16:04:00 b_jonas: it used the speaker 16:04:05 ok 16:04:39 -!- Schoening has left. 16:06:32 -!- sivteck has joined. 16:10:25 [wiki] [[SMITH]] http://esolangs.org/w/index.php?diff=40429&oldid=33720 * Nthern * (-3) Fixed the long-dead geocities link to my perl implementation 16:26:52 -!- conehead has joined. 16:27:16 -!- adu has quit (Quit: adu). 16:38:49 -!- MoALTz has joined. 16:39:05 https://news.ycombinator.com/item?id=8287700 16:42:22 -!- TieSoul has joined. 16:46:16 -!- conehead has quit (Quit: Computer has gone to sleep). 17:03:41 -!- shikhout has joined. 17:26:29 anyone else watching apple event in safari? 17:47:24 -!- Phantom_Hoover has quit (Ping timeout: 255 seconds). 17:58:23 -!- sebbu has quit (Read error: Connection reset by peer). 17:58:53 -!- sebbu has joined. 17:59:41 -!- conehead has joined. 17:59:50 -!- sebbu has quit (Changing host). 17:59:50 -!- sebbu has joined. 17:59:50 -!- conehead has quit (Signing in (conehead)). 17:59:50 -!- conehead has joined. 18:24:45 -!- ^v has changed nick to datAutoJoinijz. 18:24:52 -!- datAutoJoinijz has changed nick to ^8. 18:27:41 -!- drdanmaku has joined. 18:34:57 -!- prooftechnique has joined. 18:37:11 -!- erdic has quit (Remote host closed the connection). 18:37:51 -!- erdic has joined. 19:14:32 -!- Phantom_Hoover has joined. 19:21:02 -!- sebbu has quit (Ping timeout: 245 seconds). 19:28:00 -!- Sprocklem has joined. 19:32:52 -!- oerjan has joined. 19:42:29 -!- AnotherTest has quit (Ping timeout: 260 seconds). 19:54:59 -!- Bicyclidine has joined. 19:56:35 -!- sebbu has joined. 19:57:11 -!- sebbu has quit (Changing host). 19:57:12 -!- sebbu has joined. 20:02:03 -!- mihow has quit (Quit: mihow). 20:07:33 -!- Phantom__Hoover has joined. 20:10:57 -!- Phantom_Hoover has quit (Ping timeout: 255 seconds). 20:12:53 -!- sivteck has quit (Quit: Good Night\Day :-). 20:19:10 :t (&~) 20:19:11 s -> State s a -> s 20:19:28 oh hm 20:19:42 @type execState 20:19:42 State s a -> s -> s 20:19:44 :t (%~) 20:19:45 Profunctor p => Setting p s t a b -> p a b -> s -> t 20:20:17 (just checking whether I remembered the roles of run/exec/eval correctly) 20:20:38 i just realized that it would have been more logical for %~ to have been called &~ once & exists 20:20:58 run is for everything, eval is for the value, exec is for the effect 20:21:22 execute evil effects 20:21:49 ( :t run 20:21:49 Effects.run : Applicative m => {tacimp env : Env m xs} -> Eff a xs xs' -> m a 20:22:15 alternatively, & should have been called %, except that's taken by Data.Ration iirc 20:22:22 That's a suspicious function. 20:22:22 *-n 20:22:50 oerjan: & used to be called % 20:22:58 oh 20:23:11 It was renamed due to data rationing. 20:23:20 ( :t runEnv 20:23:20 Effects.runEnv : Applicative m => Env m xs -> Eff a xs xs' -> m (x ** Env m (xs' x)) 20:23:24 ic. i'm not sure that was a good enough reason... 20:24:13 :t ($~) 20:24:13 well it's actually Data.Ratio but i was going along with your thing 20:24:14 Not in scope: ‘$~’ 20:24:14 Perhaps you meant one of these: 20:24:14 ‘$!’ (imported from Prelude), ‘$’ (imported from Data.Function), 20:24:30 Should’ve used ÷ for Ratio. 20:24:53 Melvar: they're not big on unicode operators in the standard. 20:24:57 That isn't ASCII though. 20:25:02 Yeah I know. 20:25:21 ASCII forms should always be made available even if there are non-ASCII alternatives. 20:25:22 oerjan: of code points above 127, anyway 20:29:22 -!- sivteck has joined. 20:31:11 -!- ais523 has quit. 20:31:19 Some Haskell libraries use only non-ASCII operators and I want to have ASCII equivalents (including of constructors, and Haskell does not allow you to make up a new name for existing constructors). 20:33:54 oh, there *are* negative width unicode characters. charming... 20:34:16 I really think that such a thing should be dependent on the font. 20:35:51 Complex scripts, spacing, character width and height, line breaking, ligatures, kerning, etc should all be specified as part of the font metrics (which use whatever character set the font is for, which could be Unicode or anything else). 20:37:50 hmm, or perhaps the author is wrong. I'd say http://www.fileformat.info/info/unicode/char/0300/index.htm is a zero-width character that overlaps with the previous one. 20:38:25 (though the precise placement should depend on the previous character) 20:53:10 zzo38, are you there? 20:53:27 Vorpal: Am I where? 20:53:39 zzo38, Out of interest, what gopher server do you use? 20:54:25 Vorpal: I wrote the software myself 20:54:46 Is it the best one available? Do you have a link to it? 20:54:46 Is the software you wrote available? 20:55:06 Vorpal: I don't know if it is best one available 20:55:29 What alternatives are there? And do you have links to any of them? 20:56:19 I wrote it in BASIC, but probably one written in C may be better 20:56:31 I do not have links; you will have to look yourself 20:57:02 Right, so your doesn't run on Linux then= 20:58:06 It is FreeBASIC, so probably it will run on Linux. 20:58:20 zzo38: Fonts do need to implement these things; the Unicode standard specifies a way to tell the fonts what you want, to a degree. 20:58:25 I have actually written a similar gopher server in C on Linux too, but I don't have it available. 20:59:54 Melvar: I am saying it should not be specific to Unicode, nor should a program use hardcoded tables to decide how to typeset characters. 21:00:41 Unicode is kinda the only thing like itself though. 21:07:44 Unicode is kinda really stupid though. 21:14:03 -!- KingOfKarlsruhe has quit (Quit: ZNC - http://znc.in). 21:18:59 -!- J_Arcane has quit (Quit: Nettalk6 - www.ntalk.de). 21:20:14 -!- ^v has joined. 21:21:38 -!- J_Arcane has joined. 21:23:33 Hello from the land of London. 21:23:47 hello 21:24:10 From cloud cuckoo land 21:24:22 -!- Sprocklem has quit (Ping timeout: 245 seconds). 21:24:38 query: is a lisp that is bad at recursion essentially missing the bloody point? 21:25:44 what does being bad at recursion entail 21:26:10 Bicyclidine: i get it 21:26:36 that wasn't a joke 21:26:45 i mean, intentionally. i guess if you laughed anyway that's cool 21:27:25 Bicyclidine: poor performance, no TCO, poor exception handling, inability to gracefully break loops ... 21:27:45 what do any of those have to with recursion except the second i guess 21:27:50 you can just say it's bad 21:28:45 -!- prooftechnique has quit (Quit: return ()). 21:28:49 * J_Arcane is mostly just passive aggressively griping about Clojure because a simple list eater just forced a complete system reboot to end a rogue process ... 21:29:14 common lisp doesn't guarantee tail recursion 21:30:42 back in my day, when a lisp 1.5 program froze i had to replace the vacuum tubes myself! kids these days 21:30:52 elliott: my understanding was that the standard doesn't necessarily require it but that most of the popular implementations are pretty efficient and even have TCO. 21:31:07 J_Arcane: yeah, but it's not really considered that idiomatic. 21:31:10 afaik. 21:31:16 yeah. 21:31:22 it's nice to be able to turn it off though. for debugging. 21:31:58 The code I was running actually was an attempt to port a piece of CL code. XD Clearly that was not the correct solution. :P 21:33:14 I think clojure can do tail recursion, you just have to mark it. dunno about general tail calls 21:34:28 Yeah, you're supposed to call it with recur. 21:34:31 I thought the JVM prohibited it or something. I read that like years ago though 21:36:46 recursion isn't really that great anyway. 21:36:48 The JVM can't do TCO, but recur apparently does some tricks to improve things: http://clojure.org/special_forms#Special%20Forms--(recur%20exprs*) 21:40:39 fuck recursion, execute programs by NP graph rewriting 21:40:59 :D 21:41:13 Well, in this case it was for an exercise specifically about recursion. 21:43:14 those exercises suck 21:43:39 define exponentiation BUT YOU'RE NOT ALLOWED TO USE ADDITION, THIS IS IMPORTANT 21:44:36 Bicyclidine: The one before it was similarly redundant: find a recursive solution for proving a number is even. 21:44:52 You know, because (mod n 2) is too easy ... 21:45:23 > iterate not True !! 100 21:45:24 True 21:45:56 even numbers are a lie 21:45:57 yeah, see, those suck. 21:46:10 i don't know why people have such trouble with recursion. or supposedly do. maybe classes make it seem harder than it is 21:46:15 > (iterate (\f x -> iterate f x !! 4) id !! 3) succ 0 21:46:17 1 21:46:55 -!- oerjan has quit (Quit: Nite). 21:47:10 maybe if they picked something that wasn't tail recursion and thus completely fucking pointless to do that way 21:47:13 Bicyclidine: I use it all the time in Racket, though I'm still not great with list eaters. 21:47:35 like... how about hyper? I bet if you just told students to do hyper they'd do a recursive solution. 21:47:36 > (iterate (\f x -> iterate f x !! 4) succ !! 3) 0 21:47:37 64 21:47:48 It had just never occured to me to solve something like even? as a recursive function because, like, why thefuck would you need to do that? 21:47:57 I'm too tired for Church numerals. 21:48:25 well, that's kind of the problem, you've gotten that impression because your class is uncreative. 21:49:04 "an even number is one greater than an odd number" is actually an important observation. you're not gonna figure that out from having to write that as a computer program, probably. 21:49:51 anyway i'm not complaining about you really. i was at a party last week and CS students were joking about a professor who didn't explain things. "When you're writing a recursive function you have to assume that the recursive case works! DON'T ASK ME WHY!" 21:50:04 Heh heh. 21:50:45 eh. right, it's self-evident. *chuckles* 21:50:46 Well, I liked the clojurescript version of the koans, but the full clojure version basically just dumps you into recursion and says "figure it out". Several of the solutions are literally just blank functions. 21:51:58 And when Clojure doesn't exactly handly that like most lisps, well ... it's unhelpful at best. 21:53:17 addition can be thought of as adding 1, done repeatedly. multiplication can be considered as repeated addition, and exponentiation as repeated multiplication. Write a function hyper such that (hyper 1) is addition, (hyper 2) is multiplication, etc., that works for any positive integer. 21:53:23 i think that wouldn't be a bad problem to assign, maybe? 21:54:24 if they define (hyper n) for larger n in some simple but missing-the-point way you tell them nobody likes a clever asshole 21:54:36 heh heh. 21:55:04 -!- sivteck has quit (Quit: TIL nothing). 21:55:42 or you just mandate the repeated operations thing. i guess. that might make the solution kind of obvious, but it can't be worse than even? = odd? . (- 1) or whatever 21:55:42 welcome to the wonderful world of Ackermann-like functions. 21:56:05 I know, it's so obvious! It's like exactly what Ackermann was invented for practically 21:57:21 I think what I've realized is that while I love Lisp, all actual Lisps are terrible in their own unique ways. :P 21:57:29 everything is terrible hth 21:57:37 I'm really irritated by the requirement of not using addition for exponentiation 21:57:45 Well, this is also basically true. 21:58:10 int-e: that was totally made up. i got out of CS classes before i ran into these problems 21:59:18 why not use lists and trees for teaching recursion ... 21:59:47 yes, you can use natural numbers but the easy problems are bound to look very artificial. 21:59:55 ( :let data Even : Nat -> Type where EvenZ : Even Z; EvenSS : Even n -> Even (S (S n)) 21:59:55 defined 22:00:20 int-e: why not make them define exponentiation with addition chains. trees!!! 22:00:48 nah but they do that too. J_Arcane's probably going to get told to flatten a list any day now. 22:01:01 that's so ... untyped 22:01:02 Heh heh. 22:01:19 I did actually have to flatten a list the other day. So I called (flatten ...) 22:01:29 oh, does clojure have a function for that? 22:01:44 i've seen dozens of people ask for homework help defining it but never actually wanted to use such an operation 22:01:46 No idea, but Racket does (I was using that at the time) 22:02:00 clojure does too, looks like. wacky. 22:02:13 (flatten 5) => (), nice 22:02:16 I actually used it in one of my one-line Euler solutions. 22:02:23 How does one memorize the spelling of "Grzegorcyk"? 22:02:38 "Gregor but with a bunch of shit in it" 22:04:37 (first (sort (filter prime? (flatten (factorize 600851475143))) >)) 22:05:04 Do you mean “Grzegorczyk”? 22:05:59 Melvar: right. 22:07:05 I suggest you remember how it’s pronounced, then you can just write it out in the usual Polish manner. 22:07:28 -!- Bicyclidine has quit (Ping timeout: 252 seconds). 22:08:47 J_Arcane: what does factorize return if not a list of primes? 22:09:38 I think at the time I'd misunderstood what factorize did. 22:10:39 It is indeed an unnecessary step. 22:11:24 Somewhere I also picked up a habit of redundant ass-covering. 22:13:55 fascinating, they changed the number 22:14:26 when I solved Euler problem 3, it was the largest prime factor of 317584931803. 22:15:41 I guess because people like me go and blab their solutions? XD 22:16:36 makes me wonder how many of my solutions are wrong nowadays 22:17:05 I kinda ran into a math-skill-wall so I haven't done any in a while. 22:18:28 I wanted to try learning Clojure because there are actual paying jobs in Clojure in Finland, whereas there is only one shop I've found that does CL, and assorted shops running Erlang and a few other functional languages. 22:18:48 I guess because Java's still so big here, it kinda makes sense. 22:23:08 -!- shikhout_ has joined. 22:25:53 -!- shikhout has quit (Ping timeout: 240 seconds). 22:34:49 -!- Patashu has joined. 23:01:36 -!- drdanmaku has quit (Quit: Connection closed for inactivity). 23:36:53 -!- Guest49267 has quit (Ping timeout: 240 seconds). 23:38:56 fizzie: imo make finnish less complicated twh 23:53:14 -!- realzies has joined. 23:57:02 -!- Phantom__Hoover has quit (Read error: Connection reset by peer).