←2014-09-08 2014-09-09 2014-09-10→ ↑2014 ↑all
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 <Lymia> nya~
00:11:52 <elliott> 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 <G33kDude> Anyone here that can help me with piet? I'm having a very hard time understanding the roll command
01:13:42 <G33kDude> ?
01:13:55 <Bicyclidine> i can't.
01:13:59 <tromp_> where is roll documented?
01:17:37 <G33kDude> 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 <tromp_> seems clear. eg. roll on stack a b c d e 4 2 results in a d e b c
01:21:28 <tromp_> roll on stack a b c d e 4 1 results in a e b c d
01:22:32 <G33kDude> With left on top, 2 4 5 4 3 2 1 is returning 3 2 5 4 1
01:22:46 <tromp_> i have top on right
01:23:15 <G33kDude> 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 <G33kDude> Experimentation leaves me confused
01:24:27 <tromp_> roll on stack a b c d e 4 -1 results in a c d e b
01:24:38 <tromp_> same as roll on stack a b c d e 4 3
01:25:30 <G33kDude> oh
01:25:40 <G33kDude> I've been thinking about this completely in the wrong way
01:28:07 <G33kDude> I'm not too familiar with stack manipulations
01:28:11 <G33kDude> hence my confusion
01:28:29 <tromp_> roll is standard among all stack based languages
01:29:07 <G33kDude> of which none I am familiar with
01:29:49 <tromp_> it literally moves stack elements around
01:30:12 -!- Bicyclidine has quit (Ping timeout: 246 seconds).
01:30:12 <tromp_> in a circular motion
01:30:25 <G33kDude> I understand now
01:30:34 <G33kDude> 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 <Lymia> !bfjoust ping <
02:48:54 <G33kDude> tromp_: Thank you for your help
02:49:07 <G33kDude> My piet interpreter works now :)
02:59:05 <tromp_> gratz, G33kDude!
03:17:18 <G33kDude> tromp_: My test program was http://www.dangermouse.net/esoteric/piet/pietquest.png
03:17:32 <G33kDude> It's a text adventure; very fun.
03:19:24 <tromp_> 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 <GeekDude> 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 <GeekDude> tromp_:
04:20:24 <GeekDude> 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 <mroman_> Integers with multpilication form a group, right?
06:18:17 <shachaf> No.
06:18:54 <mroman_> I suspected so.
06:19:19 <mroman_> Is it because you can't define an inverse?
06:19:57 <Bike> yea
06:20:35 <Bike> naturals mod a prime (or more? eh) should be alright though.
06:25:22 <mroman_> oh wait. overloading doesn't work with java generics
06:25:30 <mroman_> screw this. Who made this crappy language?
06:27:19 <mroman_> Bike: at least mod a prime
06:27:24 <mroman_> since you can define an inverse for everything then
06:27:52 <mroman_> I'm not sure if there are non primes that have an inverse for everything
06:32:16 <fizzie> mroman_: Backwards compatibility, y'see.
06:32:33 <fizzie> Overloading is overrated, anyway.
06:39:38 -!- clog has joined.
06:45:08 <fizzie> Hrm. The London subway map is not terribly intelligible in grayscale.
06:49:45 <mroman_> It'd be tricky anyway
06:49:51 <mroman_> for example class Foo<T,U>
06:50:02 <mroman_> Foo(T t) { ..} Foo(U u) {..}
06:50:09 <mroman_> since that would require a constraint T != U
06:50:15 <mroman_> and I don't think Java supports that
06:52:43 <fizzie> 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 <mroman_> yep
06:53:47 <mroman_> it would be sorta cool because you probably then could extract an element by type
06:53:53 <mroman_> i.e U get(); T get();
06:54:22 <fizzie> Well, you can't overload based on only return type in the first place, anyway.
06:54:24 <mroman_> rather than U getU(); T getT();
06:54:40 <mroman_> not in Java, yes @return type only
06:54:54 <mroman_> since U and T are both erased to Object
06:54:59 <mroman_> anyway
06:55:17 <fizzie> Well, even without that. The language won't let you write an int get() and a double get().
06:56:45 <mroman_> I know.
06:57:21 <coppro> mroman_: integers are a group if you drop 0
06:57:37 <shachaf> coppro: ?
06:58:03 <coppro> 02:18:04 < mroman_> Integers with multpilication form a group, right?
06:58:06 <fizzie> So which integer is the multiplicative inverse of 2?
06:58:18 <coppro> oh... integers
06:58:18 <coppro> nvm
06:58:22 <coppro> somehow I read rationals
07:02:29 <mroman_> hm
07:02:35 <mroman_> there's now T.getClass() either
07:02:38 <mroman_> *no
07:04:04 <fizzie> In quite a lot of cases, you just ask clients to pass a Class<T> object if you need a "type token" inside the code.
07:04:22 <mroman_> http://codepad.org/nSxBZMFi
07:04:27 <mroman_> ^- this isn't working as well
07:05:04 <mroman_> technically I'd expect (U)t; to fail on the Integer
07:05:16 <mroman_> but it doesn't.
07:05:30 <mroman_> probably because it's (Object)t anyway
07:06:11 <fizzie> mroman_: public <U> U get(Class<U> clazz) { return clazz.cast(whatever); }
07:06:47 <mroman_> but that's uncool
07:06:48 <fizzie> objs.get(Integer.class); will then properly barf out at cast-time with a ClassCastException.
07:07:08 <fizzie> Incidentally, the fromT/fromU I wrote above needs to be (sigh) public static <R,S> Tmp<R,S> fromT(R t) { return new Tmp<>(t, null); } and then you have to call it as Tmp.<Foo,Bar>fromT(foo);
07:07:29 <mroman_> it works though of course
07:08:29 <mroman_> it would be much more usefull if Java could provide U.getClass
07:08:37 <mroman_> which is technically possible
07:08:42 <mroman_> probably
07:08:56 <mroman_> ah no
07:09:08 <mroman_> the compiler knows U
07:09:11 <mroman_> but the runtime doesn't
07:09:24 <fizzie> Yes, and the compiler can only generate the one method, since it's not templates or anything.
07:09:25 <mroman_> but maybe the compiler could inject some boiler-plate code
07:09:48 <fizzie> A hidden type token parameter injected at each call site?
07:09:51 <mroman_> the compiler *could* create multiple methods
07:09:53 <mroman_> like C++-style
07:10:01 <mroman_> but yeah.
07:10:06 <mroman_> that ain't gonna happen soon
07:10:17 <mroman_> (I suppose Java 8 nor Java 9 will have such features?)
07:10:31 <fizzie> Java 8 has been out for quite a while, and it doesn't do that.
07:10:39 <fizzie> The streams are nice, though.
07:11:42 <fizzie> It's anonymous inner classes all the way down, of course, but with lots of syntactic sugar.
07:12:09 <mroman_> actually
07:12:20 <mroman_> Tmp.<> shouldn't be necessary in Java 8?
07:12:43 <fizzie> That's possible, I think I heard something vague about improving the type inference.
07:13:02 <fizzie> I don't have a Java 8 thing on this thing.
07:14:01 <mroman_> List<string> names = students.stream().map(Student::getName).filter(name->name.startsWith("A"))
07:14:04 <mroman_> .collect(Collectors.toList());
07:14:05 <fizzie> Oh, I must've messed something earlier, it does work in Java 7 without that too.
07:14:18 <mroman_> interesting @streams
07:19:52 <fizzie> 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 <HackEgo> [wiki] [[Talk:AutoMouse]] http://esolangs.org/w/index.php?diff=40425&oldid=8333 * Rdebath * (+5701) Bit of digging.
07:21:07 <mroman_> what's the type of lambda expressions actually?
07:21:15 <mroman_> All those fancy example pages never list that
07:21:28 <HackEgo> [wiki] [[AutoMouse]] http://esolangs.org/w/index.php?diff=40426&oldid=37444 * Rdebath * (-8) Source code says 1998
07:21:43 <mroman_> looks like it infers it
07:21:52 <mroman_> i.e n -> Boolean is Predicate<n>
07:24:08 <int-e> http://java.dzone.com/articles/introduction-functional-1
07:25:17 <int-e> (that sounds like any "functional interface" works, but doesn't say anything about inference)
07:30:30 <fizzie> 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 <myname> automouse sounds great, except this microsoft windows thingie
08:25:40 -!- Patashu has joined.
08:27:45 -!- ^v has joined.
08:34:26 <HackEgo> [wiki] [[Special:Log/newusers]] create * CRS-ECHO51 * New user account
08:34:28 <HackEgo> [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 <myname> 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 <mroman_> ok
09:09:16 <mroman_> if you do that I'lll create XMLFuck
09:09:59 <mroman_> <bf:loop><bf:op type="+"/></bf:loop> .
09:10:08 <mroman_> something ugly like thatt
09:10:12 <oerjan> how can that possibly not have been done already.
09:10:31 <mroman_> wait
09:10:33 <mroman_> there's an XMLfuck
09:10:51 <oerjan> @messages-
09:10:51 <lambdabot> boily said 10h 13m 14s ago: on a wiki-editing frenzy again?
09:10:57 <oerjan> mroman_: thought so
09:11:27 <mroman_> well...
09:11:31 <mroman_> HTMLfuck is probably still open
09:11:37 <oerjan> @tell boily I am reading the wiki recent changes in very large batches recently
09:11:37 <lambdabot> Consider it noted.
09:11:46 <oerjan> mroman_: wouldn't bet on it.
09:12:17 <myname> mroman_: type=increment?
09:12:32 <myname> mroman_: besides that: go for it
09:14:23 <mroman_> I will!
09:17:10 <zzo38> 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 <zzo38> (Note that pseudo-blocks such as RETURN are also possible.)
09:19:17 <mroman_> http://mroman.ch/bfhtml.html <- there you go
09:19:37 <zzo38> (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 <mroman_> <div class="loop">..</div> shall be treated as a loop .
09:20:13 <mroman_> the rest is usual brainfuck style
09:20:18 <mroman_> except that < > are &lt; &gt; of course
09:20:45 <mroman_> it also provides neat indentation .
09:21:45 <mroman_> however, most browsers refuse to copy the [ and ] in the webpage
09:22:44 <mroman_> which makes it kinda pythony
09:22:50 <mroman_> instead of [] you have to use indentation .
09:23:04 <mroman_> aka Braynfuck
09:24:22 <mroman_> so you remove one character from the Brainfuck-Alphabet without loosing anything
09:24:31 <mroman_> the perfect brainfuck minimalization
09:25:19 <zzo38> You minimalize nothing. Instead of [ and ] you now need spaces and line breaks.
09:25:36 <zzo38> Still two characters each.
09:25:56 <mroman_> three if you have windows
09:26:27 <mroman_> I didn't expect people to find out that soon that it's bogus
09:27:12 <zzo38> I don't know if you expected anyone else to, but I did.
09:30:39 <impomatic_> How about Huffman encoded BF?
09:31:18 <mroman_> Or noe encoded bf
09:31:24 <mroman_> noe oughta be really well with brainfuck
09:32:43 <oerjan> <mroman_> since you can define an inverse for everything then <-- everything that isn't divisible by the prime, you mean.
09:33:14 <oerjan> <mroman_> 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 <mroman_> noe can compress helloworld bf by 30%
09:33:55 <mroman_> at least
09:34:25 <oerjan> what's noe
09:34:45 <mroman_> some stupid compression algorithm I had the idea to
09:34:46 <impomatic_> 00 = + / 01 = - / 10 = < / 110 = > / 11100 = [ / 11101 = ] / 11110 = . / 11111 = ,
09:35:02 <impomatic_> 3.625 bits per average instruction instead of 3.
09:36:22 <oerjan> i have a hunch you're not referring to https://github.com/noe/encoding
09:36:55 <mroman_> what
09:36:59 <mroman_> *not*?
09:37:07 <mroman_> I'm referring to that
09:37:09 <oerjan> oh.
09:37:19 <oerjan> i didn't think you were spanish
09:37:28 <mroman_> oh
09:37:29 <mroman_> wait
09:37:29 <mroman_> no
09:37:44 <mroman_> https://github.com/FMNSSun/noe/
09:37:47 <mroman_> ^- im refering to that
09:37:51 <mroman_> sry. I read your url wrong
09:39:19 <mroman_> It can compress http://www.iwriteiam.nl/Ha_bf_inter.html by 46%
09:39:47 <mroman_> the simple version of noe
09:39:53 <mroman_> the real version oughta do much better
09:40:29 <oerjan> good, good
09:44:48 <mroman_> hm. or not.
09:46:14 <mroman_> gotta tune the params.
09:47:55 <mroman_> 47%
09:47:59 <mroman_> not really that much better
09:48:30 <mroman_> however, you can combine it with huffman
09:48:41 <mroman_> i.e. by not encoding a char with 8bits you obviously get even more
09:49:04 <mroman_> technically you'd need 3 bits max for a bf instruction
09:49:46 <oerjan> shannon will get you anyhow.
09:50:06 <mroman_> yeah it's 47% for the selfinterpreter
09:53:50 <mroman_> 55% with simple if you use 3 bits
09:53:54 <mroman_> which sounds odd
09:53:57 <mroman_> > 8.0/3.0
09:53:59 <lambdabot> 2.6666666666666665
09:54:11 <mroman_> > 1/2.666
09:54:12 <lambdabot> 0.37509377344336087
09:54:23 <mroman_> > 1-(1/2.666)
09:54:24 <lambdabot> 0.6249062265566392
09:54:32 <mroman_> just using 3bits should already give you 62%
09:55:21 <mroman_> wait
09:55:27 <mroman_> my ratio calculation looks terribly wrong
09:57:12 <oerjan> > 3/8
09:57:13 <lambdabot> 0.375
10:05:35 <mroman_> yeah.
10:05:46 <mroman_> it can't compress anything if a symbol only has three bits
10:08:47 <mroman_> noe works differently
10:12:35 -!- boily has joined.
10:13:29 <mroman_> it's usually able to compress single english sentences by 25% - 35%
10:22:23 <mroman_> so I thought
10:22:42 <mroman_> a more reasonable benchmark says around 8% :(
10:24:43 <mroman_> but yeah. It's a sucky compression algorithm except in a few edgecases
10:29:55 <mroman_> other sucky compression algorithms in my head are using permutations
10:29:56 <mroman_> i.e.
10:30:06 <mroman_> if you have 5 symbols, you need 3 bits for one symbol
10:30:25 <mroman_> which means to encode a string of 5 symbols you need 15bits
10:30:33 <mroman_> however, there are only 120 permutations of 5 symbols
10:30:47 <mroman_> i.e. you could encode which permutation of 5 symbols it is in 7bits
10:30:53 <mroman_> saving 8 bits
10:32:21 <mroman_> also
10:32:24 <mroman_> you can create a tape
10:32:34 <mroman_> i.e "ABCDE" if you have 5 symbols
10:32:47 <mroman_> and the pointer is at A
10:32:59 <mroman_> 1 means left, 0 means right
10:33:35 <mroman_> if the you want to compress BACDEAB you'd write 0100000
10:34:32 <mroman_> (also 7 bits instead of 15)
10:35:08 <int-e> But what if I want to encode "Qzyzzalroum"?
10:35:16 <boily> you lost me there. isn't “0100000” ambiguous?
10:35:58 <fizzie> 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 <mroman_> boily: maybe i made a mistake there
10:36:22 <mroman_> let me check that
10:36:47 <mroman_> true
10:37:02 <mroman_> I forgot the stop sign
10:37:04 <mroman_> :)
10:37:06 <int-e> Oh I actually brought this word up here before. Interesting :)
10:37:33 <boily> `? qzyzzalroum
10:37:34 <HackEgo> qzyzzalroum? ¯\(°​_o)/¯
10:37:45 <boily> int-e: then define it ^^
10:37:56 <mroman_> fizzie: It's not a general purpose compression ;)
10:38:50 <int-e> `define qzyzzalroum You should start the crossword over.
10:38:51 <HackEgo> 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 <mroman_> obviously the tape thingy is only working if you have lots of sorted substrings
10:39:23 <boily> `learn qzyzzalroum You should start the crossword over.
10:39:27 <HackEgo> I knew that.
10:39:37 <int-e> so what's `define?
10:39:43 <boily> I don't know.
10:39:52 <fizzie> You can tell from the URL.
10:39:59 <fizzie> It used to be "ask google for a definition of a word".
10:40:09 <fizzie> Now it's "break down".
10:40:10 <boily> mroman_: well, you can achieve that with that banana matrix from bzip2 I guess.
10:40:25 <int-e> fizzie: oh I missed the readable part in all the gibberish
10:40:29 <boily> (how is it called again? I only have the wikipédia example in my head...)
10:40:59 <boily> ah! burrows-wheeler. but I still prefer “banana matrix”.
10:41:00 <Jafet> > 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 <lambdabot> "G\aO\a\a=\ACKH\ACKK\ACK\DC4;\ACKK\DC4ID\ACKK\ACK@*Exception: Prelude.head: ...
10:41:31 <Jafet> > 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 <lambdabot> "qzyzzalroum You should\NUL*Exception: Prelude.tail: empty list
10:43:16 <Jafet> > read "0x" :: Int
10:43:17 <lambdabot> *Exception: Prelude.read: no parse
10:43:48 <Jafet> > reads "0x" :: [(Int, String)]
10:43:49 <lambdabot> [(0,"x")]
10:44:01 <Jafet> Sure.
10:44:14 <Jafet> > reads "0x1" :: [(Int, String)]
10:44:15 <lambdabot> [(1,"")]
10:45:25 <int-e> `` 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 <HackEgo> 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 <int-e> of course.
10:47:51 <int-e> `` 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 <HackEgo> qzyzzalroum You should%
10:51:51 <fizzie> `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 <HackEgo> qzyzzalroum You should
11:00:31 -!- GeekDude has joined.
11:00:34 <GeekDude> hello tromp_
11:00:38 <GeekDude> and everyone else
11:02:31 <boily> GeekDood morning!
11:07:33 -!- boily has quit (Quit: QZYZZALROUMISCH CHICKEN).
11:26:01 <oerjan> `? qzyzzalroum
11:26:01 <HackEgo> qzyzzalroum You should start the crossword over.
11:26:41 <oerjan> @tell boily I think the pdf maintainer should know how `learn actually works twh
11:26:42 <lambdabot> Consider it noted.
11:27:15 <oerjan> `run echo "You should start the crossword over." >wisdom/qzyzzalroum
11:27:18 <HackEgo> No output.
11:27:22 <oerjan> `? qzyzzalroum
11:27:23 <HackEgo> You should start the crossword over.
11:45:13 <int-e> `cat bin/learn
11:45:14 <HackEgo> ​#!/bin/bash \ topic=$(echo "$1" | lowercase | sed 's/^\(an\?\|the\) //;s/s\? .*//') \ echo "$1" >"wisdom/$topic" \ echo "I knew that."
11:46:52 <int-e> `? I
11:46:53 <HackEgo> 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 <mroman_> 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 <mroman_> 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 <mroman_> @hoogle ldapClose
12:17:18 <lambdabot> No results found
12:17:20 <mroman_> @hoogle ldapOpen
12:17:20 <lambdabot> No results found
12:17:29 <mroman_> LDAP has ldapOpen
12:17:33 <mroman_> 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 <mroman_> (("objectCategory" `ldapEqu` "person") `ldapAnd` ("objectCategory" `ldapEqu` "contact")) `ldapAnd` (("sn" `ldapEqu` "Smith") `ldapOr` ("sn" `ldapEqu` "Johnson"))
12:47:50 <mroman_> (&(&(objectCategory=person)(objectCategory=contact))(|(sn=Smith)(sn=Johnson)))
12:48:17 <mroman_> ^- Somebody should do this
12:48:21 <mroman_> but more serious
12:49:17 <Melvar> What’s it called again where you stick the module name in everything? ;_;
12:49:34 -!- tromp has joined.
12:49:57 <GeekDude> this is going to be painful to implement
12:51:48 <mroman_> *Main> "fooAttrib" `ldapEqu` "(.*)"
12:51:48 <mroman_> (fooAttrib=\28.\2a\29)
12:52:07 <mroman_> 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 <mroman_> Melvar: "in everything"?
13:02:28 <mroman_> You mean re-export it?
13:02:35 <mroman_> or qualified import?
13:04:17 <Melvar> mroman_: No, I mean having “ldap” in “ldapEqu”, “ldapAnd”, “ldapOr”, etc.
13:04:54 <mroman_> it's called "avoid collisions with other operators from other modules"
13:05:07 <mroman_> @hoogle or
13:05:09 <lambdabot> Prelude or :: [Bool] -> Bool
13:05:09 <lambdabot> Data.List or :: [Bool] -> Bool
13:05:09 <lambdabot> Data.Foldable or :: Foldable t => t Bool -> Bool
13:05:14 <mroman_> ^- see
13:05:17 <mroman_> or is already taken :)
13:05:24 <Melvar> You let the *user* decide that.
13:05:27 <mroman_> foldable?
13:05:30 <mroman_> interesting
13:05:32 <Melvar> They can import your module qualified if they like.
13:05:34 <mroman_> @info Foldable
13:05:34 <lambdabot> Foldable
13:05:39 <mroman_> -.-
13:05:55 <mroman_> oh
13:06:08 <mroman_> it's that secret-black-magic * -> * stuff
13:07:29 <mroman_> Any examples using Foldable Maybe?
13:07:33 <mroman_> I can't figure one out
13:09:31 <mroman_> > fold (\a b -> a + b) [Just 5, Just 6]
13:09:33 <lambdabot> No instance for (GHC.Show.Show a0)
13:09:33 <lambdabot> arising from a use of ‘M114505817426468540712624.show_M1145058174264685407...
13:09:33 <lambdabot> The type variable ‘a0’ is ambiguous
13:09:33 <lambdabot> Note: there are several potential instances:
13:09:33 <lambdabot> instance [safe] GHC.Show.Show (b GHC.Types.Int) =>
13:09:52 <mroman_> > (fold (\a b -> a + b) [Just 5, Just 6]) :: Maybe Int
13:09:54 <lambdabot> Couldn't match type ‘[Data.Maybe.Maybe a0]’
13:09:54 <lambdabot> with ‘Data.Maybe.Maybe GHC.Types.Int’
13:09:54 <lambdabot> Expected type: [Data.Maybe.Maybe a0]
13:09:54 <lambdabot> -> [Data.Maybe.Maybe a0] -> [Data.Maybe.Maybe a0]
13:09:54 <lambdabot> Actual type: [Data.Maybe.Maybe a0]
13:09:58 <Melvar> @type fold
13:09:59 <lambdabot> (Monoid m, Foldable t) => t m -> m
13:10:35 <mroman_> > fold (Just 5)
13:10:36 <lambdabot> No instance for (GHC.Show.Show a0)
13:10:36 <lambdabot> arising from a use of ‘M712488520844229804512663.show_M7124885208442298045...
13:10:36 <lambdabot> The type variable ‘a0’ is ambiguous
13:10:36 <lambdabot> Note: there are several potential instances:
13:10:36 <lambdabot> instance [safe] GHC.Show.Show (b GHC.Types.Int) =>
13:10:44 <mroman_> Maybe is a foldable
13:10:48 <Melvar> What do you want the monoid to be?
13:10:54 <mroman_> I have no idea
13:11:19 <mroman_> but Maybe is also a Monoid
13:11:31 <mroman_> > fold (Just (Just 5))
13:11:33 <lambdabot> No instance for (GHC.Show.Show a0)
13:11:33 <lambdabot> arising from a use of ‘M514486933773938025012685.show_M5144869337739380250...
13:11:33 <lambdabot> The type variable ‘a0’ is ambiguous
13:11:33 <lambdabot> Note: there are several potential instances:
13:11:33 <lambdabot> instance [safe] GHC.Show.Show (b GHC.Types.Int) =>
13:11:34 <Melvar> Only for Monoid element type.
13:11:36 <mroman_> :(
13:11:45 <mroman_> > fold (Just (succ))
13:11:47 <lambdabot> No instance for (Data.Typeable.Internal.Typeable a0)
13:11:47 <lambdabot> arising from a use of ‘M163181566624904154912697.show_M1631815666249041549...
13:11:47 <lambdabot> The type variable ‘a0’ is ambiguous
13:11:47 <lambdabot> Note: there are several potential instances:
13:11:47 <lambdabot> instance Data.Typeable.Internal.Typeable Data.Dynamic.Dynamic
13:12:01 <mroman_> @type fold
13:12:03 <lambdabot> (Monoid m, Foldable t) => t m -> m
13:12:10 <mroman_> it want's a Foldable that contains a Monoid
13:12:16 <mroman_> and returns the Monoid
13:12:19 <mroman_> *wants
13:12:22 <Melvar> Yes.
13:12:25 <mroman_> so
13:12:30 <mroman_> Maybe is Foldable
13:12:43 <mroman_> and also a Monoid
13:12:51 <mroman_> then Just Nothing should be t m?
13:12:51 <Melvar> Only for monoid element type.
13:13:05 <mroman_> @type Just Nothing
13:13:06 <lambdabot> Maybe (Maybe a)
13:13:17 <mroman_> oh
13:13:48 <Melvar> fold (Just "foo")
13:13:53 <Melvar> > fold (Just "foo")
13:13:54 <lambdabot> "foo"
13:14:00 <mroman_> Maybe isn't a Monoid
13:14:11 <Melvar> > fold (Nothing :: Maybe String)
13:14:13 <lambdabot> ""
13:14:45 <mroman_> hu
13:14:50 <mroman_> String is a monoid?
13:15:04 <mroman_> [a] is one at least, I see
13:15:19 <mroman_> > fold (Sum 8)
13:15:21 <lambdabot> Could not deduce (Data.Foldable.Foldable Data.Monoid.Sum)
13:15:21 <lambdabot> arising from a use of ‘Data.Foldable.fold’
13:15:21 <lambdabot> from the context (Data.Monoid.Monoid m, GHC.Num.Num m)
13:15:21 <lambdabot> bound by the inferred type of
13:15:21 <lambdabot> it :: (Data.Monoid.Monoid m, GHC.Num.Num m) => m
13:15:37 <mroman_> > fold (Just (Sum 8))
13:15:39 <lambdabot> Sum {getSum = 8}
13:16:01 <Melvar> “instance Monoid a => Monoid (Maybe a)”
13:16:24 <Melvar> > fold (Nothing :: Maybe (Sum Integer))
13:16:25 <lambdabot> Sum {getSum = 0}
13:16:30 <mroman_> > fold [Sum 8]
13:16:31 <lambdabot> Sum {getSum = 8}
13:16:35 <mroman_> > fold [Sum 8, Sum 9]
13:16:37 <lambdabot> Sum {getSum = 17}
13:16:50 <mroman_> > fold [Just 8, Just 9]
13:16:51 <lambdabot> No instance for (GHC.Show.Show a0)
13:16:51 <lambdabot> arising from a use of ‘M62230355020165895612855.show_M62230355020165895612...
13:16:51 <lambdabot> The type variable ‘a0’ is ambiguous
13:16:51 <lambdabot> Note: there are several potential instances:
13:16:51 <lambdabot> instance [safe] GHC.Show.Show (b GHC.Types.Int) =>
13:17:11 <mroman_> > (fold [Just 8, Just 9]) :: Maybe Int
13:17:12 <lambdabot> No instance for (Data.Monoid.Monoid GHC.Types.Int)
13:17:13 <lambdabot> arising from a use of ‘Data.Foldable.fold’
13:17:16 <mroman_> ok
13:17:17 <mroman_> I see
13:17:23 <mroman_> I understand now
13:17:26 <Melvar> For Maybe, fold = maybe mempty id .
13:17:32 <mroman_> > fold [All False, All True]
13:17:34 <lambdabot> All {getAll = False}
13:17:58 <mroman_> but...
13:18:04 <mroman_> > mconcat [All False, All True]
13:18:06 <lambdabot> All {getAll = False}
13:18:11 <mroman_> where's the difference?
13:18:18 <Melvar> For List, fold = mconcat .
13:18:51 <mroman_> > fold $ Just (Any False)
13:18:52 <Melvar> fold works on all Foldables, mconcat only on lists.
13:18:52 <lambdabot> Any {getAny = False}
13:19:03 <Melvar> @type fold
13:19:03 <lambdabot> (Monoid m, Foldable t) => t m -> m
13:19:05 <Melvar> @type mconcat
13:19:06 <lambdabot> Monoid a => [a] -> a
13:19:16 <mroman_> ic.
13:19:30 <mroman_> What are usually usecases for fold where fold /= mconcat?
13:20:17 <Melvar> You get to be generic in your container type.
13:20:18 <mroman_> Foldable ((,) a) wtf
13:20:27 <mroman_> (,) is a function?
13:20:30 <mroman_> @type (,)
13:20:31 <lambdabot> a -> b -> (a, b)
13:20:42 <mroman_> you can make instances of functions?
13:20:52 <Melvar> @kind (,)
13:20:53 <lambdabot> * -> * -> *
13:20:59 <Melvar> It’s that one.
13:21:41 <Melvar> @kind (,) Integer
13:21:42 <lambdabot> * -> *
13:22:14 <mroman_> @kind id
13:22:15 <lambdabot> Not in scope: type variable ‘id’
13:22:21 <mroman_> @kind Just
13:22:22 <lambdabot> k -> Maybe k
13:22:28 <myname> k
13:22:33 <Melvar> Oh, datakinds.
13:23:00 <mroman_> > let foo = Just :: (k -> Maybe k)
13:23:02 <lambdabot> not an expression: ‘let foo = Just :: (k -> Maybe k)’
13:23:06 <mroman_> > let foo = Just :: (k -> Maybe k) in undefined
13:23:08 <lambdabot> *Exception: Prelude.undefined
13:23:31 <Melvar> mroman_: Kinds are the types of types.
13:24:10 <mroman_> and super kinds are the type of kinds?
13:24:12 <mroman_> ;P
13:24:34 <mroman_> @type []
13:24:35 <lambdabot> [t]
13:24:38 <mroman_> @kind []
13:24:39 <lambdabot> * -> *
13:25:01 <mroman_> @data Foo a b c = Foo a b c
13:25:01 <lambdabot> Unknown command, try @list
13:25:08 <mroman_> @define Foo a b c = Foo a b c
13:25:09 <lambdabot> .L.hs:181:1: Not in scope: data constructor ‘Foo’
13:25:09 <lambdabot>
13:25:09 <lambdabot> .L.hs:181:13: Not in scope: data constructor ‘Foo’
13:25:09 <lambdabot>
13:25:09 <lambdabot> .L.hs:181:17:
13:25:10 <Melvar> I think those are usually called sorts, but haskell doesn’t do anything at that level I think.
13:25:30 <mroman_> @kind Maybe
13:25:31 <lambdabot> * -> *
13:25:39 <mroman_> hm
13:25:39 <mroman_> ok
13:25:49 <Melvar> Also
13:25:56 <Melvar> @let data Foo a b c = Foo a b c
13:25:59 <lambdabot> Defined.
13:26:44 <Melvar> Now you have one Foo at the type level and one Foo at the data level.
13:26:55 <Melvar> @kind Foo
13:26:56 <lambdabot> * -> * -> * -> *
13:27:01 <Melvar> This is the former.
13:27:04 <Melvar> @type Foo
13:27:05 <lambdabot> a -> b -> c -> Foo a b c
13:27:09 <Melvar> This is the latter.
13:28:05 <Melvar> Similarly with (,) .
13:28:09 <mroman_> http://codepad.org/Vv2ggd5x
13:28:30 <mroman_> Fancy stuff
13:29:08 <Melvar> Probably needs an extension of some kind if you want to state the kind explicitly. It can infer it though.
13:29:20 <mroman_> -XKindSignatures is at least required
13:30:31 <Melvar> ( :t Maybe
13:30:31 <idris-bot> Prelude.Maybe.Maybe : Type -> Type
13:30:50 <Melvar> ( :t Just
13:30:52 <idris-bot> Prelude.Maybe.Just : a -> Maybe a
13:31:18 <Melvar> ( Just Maybe
13:31:18 <idris-bot> Just Maybe : Maybe (Type -> Type)
13:32:26 <mroman_> hm
13:32:55 <mroman_> can't have multiple kinds?
13:33:06 <mroman_> class Foo (t :: * -> * -> *, u :: * -> *)
13:33:27 <Melvar> “class Foo (t :: * -> * -> *) (u :: * -> *)”?
13:33:38 <mroman_> ah
13:33:41 <mroman_> Multiparamtypeclasses
13:33:44 <mroman_> yay
13:34:30 <Melvar> @type traverse_
13:34:31 <lambdabot> Not in scope: ‘traverse_’
13:34:31 <lambdabot> Perhaps you meant one of these:
13:34:31 <lambdabot> ‘F.traverse_’ (imported from Data.Foldable),
13:34:49 <Melvar> @type F.traverse_
13:34:50 <lambdabot> (Foldable t, Applicative f) => (a -> f b) -> t a -> f ()
13:35:41 <Melvar> @type F.traverse_ print (Just "foo")
13:35:42 <lambdabot> IO ()
13:36:24 <mroman_> http://codepad.org/pMAn78K6 <- I think I understand it now
13:36:25 <Melvar> That’s another thing to do with a Foldable Maybe.
13:36:29 <mroman_> I just don't know anything useful to do with it
13:38:39 <mroman_> http://codepad.org/FLi0rKHf <- that's the most useful thing I can imagine
13:39:39 <Melvar> That still doesn’t require the kind signatures.
13:40:07 <mroman_> not?
13:40:19 <mroman_> (t :: * -> *) at least is illegal without -XKindSignatures
13:40:30 <Melvar> The kinds can be inferred.
13:41:12 <mroman_> class Convert t u isn't working though
13:41:43 <Melvar> What’s it saying?
13:43:26 <Melvar> More precisely: WFM.
13:43:36 <mroman_> ‘Convert’ is applied to too many type arguments In the instance declaration for ‘Convert (Maybe) ([])’
13:43:46 <mroman_> ah
13:43:48 <mroman_> damn reload
13:44:33 <mroman_> it works, yes
13:44:38 <Melvar> “class Functor f where fmap :: (a -> b) -> f a -> f b” doesn’t require an explicit signature either.
13:45:38 <Melvar> 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 <Melvar> ( :t sequence
13:49:07 <idris-bot> Prelude.Traversable.sequence : Traversable t => Applicative f => t (f a) -> f (t a)
13:49:09 -!- ais523 has joined.
13:49:34 <Melvar> with Vect sequence [[1,2,3],[4,5,6]]
13:49:37 <Melvar> ( with Vect sequence [[1,2,3],[4,5,6]]
13:49:37 <idris-bot> [[1, 4], [2, 5], [3, 6]] : Vect 3 (Vect 2 Integer)
13:51:45 <ais523> what does "with" do?
13:53:11 <mroman_> @hoogle u (t a) -> u a
13:53:12 <lambdabot> Control.Monad.List ListT :: m [a] -> ListT a
13:53:12 <lambdabot> Language.Haskell.TH.Syntax Q :: (forall m. Quasi m => m a) -> Q a
13:53:12 <lambdabot> Data.Maybe catMaybes :: [Maybe a] -> [a]
14:11:59 <mroman_> > catMaybes $ map Just [99,99]
14:12:01 <lambdabot> [99,99]
14:12:28 <mroman_> ( id 4
14:12:28 <idris-bot> 4 : Integer
14:12:43 <mroman_> ( :t id
14:12:44 <idris-bot> Prelude.Basics.id : a -> a
14:12:44 <idris-bot> Control.Category.id : Category cat => cat a a
14:12:51 <mroman_> ( :t (+)
14:12:53 <idris-bot> Prelude.Classes.(+) : Num a => a -> a -> a
14:12:53 <idris-bot> Prelude.Fin.(+) : Fin n -> Fin m -> Fin (n + m)
14:13:05 <mroman_> ( :t Fin.(+)
14:13:05 <idris-bot> Prelude.Fin.(+) : Fin n -> Fin m -> Fin (n + m)
14:13:12 <mroman_> ( Fin 9
14:13:12 <idris-bot> Fin 9 : Type
14:13:27 <mroman_> ( :t (Fin 9) Fin.(+) (Fin 1)
14:13:28 <idris-bot> (input):1:12:When elaborating an application of constructor __infer:
14:13:28 <idris-bot> Fin (fromInteger 9) does not have a function type (Type)
14:13:37 <mroman_> ( :t (Fin 9) `Fin.(+)` (Fin 1)
14:13:37 <idris-bot> (input):1:22:When elaborating an application of function Prelude.Fin.+:
14:13:37 <idris-bot> Can't unify
14:13:37 <idris-bot> Type
14:13:37 <idris-bot> with
14:13:37 <idris-bot> Fin m↵…
14:13:47 <mroman_> ( :t (Fin 9) + (Fin 1)
14:13:47 <idris-bot> Can't resolve type class Num Type
14:13:51 <mroman_> boo!
14:21:03 <HackEgo> [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 <mroman_> WIP?
14:23:36 <mroman_> TIOBE-Sprachen-Index: C++ und Java auf Allzeit-Tief <- suck it C++ and Java
14:26:07 <mroman_> Everything that matches /trivial brainfuck substitution/ or the like should be treated as spam :(
14:26:27 <mroman_> unless it's funny
14:26:38 <mroman_> 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 <Melvar> ais523: It says to prefer that namespace if it can’t disambiguate something otherwise.
14:39:06 <ais523> Melvar: right, I was guessing it was something like that
14:39:31 <Melvar> mroman_: Fin 9 is a type. You can’t add types together.
14:40:20 <ais523> Melvar: I add together types all the time :-(
14:40:26 <ais523> (seriously, that's one of the things I do in my research)
14:41:08 <Melvar> Oh sure, I mean there is no function named (+) that does it in the Idris stdlib.
14:41:47 <ais523> yes, that makes more sense
14:42:05 <ais523> hmm, is linear typing expressable in Idris?
14:42:15 <Melvar> ( the (Fin 9) 3 + the (Fin 2) 1
14:42:16 <idris-bot> fS (fS (fS (fS fZ))) : Fin 11
14:43:22 <Melvar> 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 <ais523> because you'd need some sort of wrapper to prevent you copying data
14:44:02 <ais523> 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 <Melvar> The latest versions do have UniqueType, a universe of uniqueness types IIUC, but those are unique, not linear.
14:44:28 <ais523> 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 <Melvar> 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 <Melvar> ( the (Fin 9) 3 + the (Fin 2) 1
14:52:20 <idris-bot> fS (fS (fS (fS fZ))) : Fin 11
14:52:23 <Melvar> mroman_: ↑
14:54:56 <mroman_> too complicated ;)
14:56:36 -!- ais523 has quit (Read error: Connection reset by peer).
14:56:48 -!- ais523 has joined.
14:56:54 <Melvar> Not sure how it’s complicated.
15:02:32 <mroman_> Like a Bird on a moving vehicle chased by the police aiming their guns at it while driving off a cliff.
15:04:22 <Melvar> ( the (Fin 9) 3
15:04:22 <idris-bot> fS (fS (fS fZ)) : Fin 9
15:04:27 <Melvar> ( the (Fin 2) 1
15:04:28 <idris-bot> fS fZ : Fin 2
15:07:15 <Melvar> ( :t Fin.(+)
15:07:16 <idris-bot> Prelude.Fin.(+) : Fin n -> Fin m -> Fin (n + m)
15:07:40 <Melvar> ( :t Fin.(+) {n=9} {m=2}
15:07:40 <idris-bot> (+) : Fin (fromInteger 9) -> Fin (fromInteger 2) -> Fin (fromInteger 9 + fromInteger 2)
15:07:48 <Melvar> ( Fin.(+) {n=9} {m=2}
15:07:48 <idris-bot> (+) : Fin 9 -> Fin 2 -> Fin 11
15:14:04 <fizzie> 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 <J_Arcane> 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 <Schoening> Is there a programming language that uses morse code?
15:58:44 <ais523> Schoening: well, apparently GRUB has an option to use morse code for its interface
15:58:51 <ais523> presumably so that you can hear error messages if you don't have a working screen
15:59:00 <Schoening> lol
16:00:05 <Schoening> well that settles that hehe
16:02:22 -!- Sprocklem has quit (Ping timeout: 245 seconds).
16:03:46 <b_jonas> ais: hear? I thought it would use morse to blink the keyboard leds.
16:04:00 <ais523> b_jonas: it used the speaker
16:04:05 <b_jonas> ok
16:04:39 -!- Schoening has left.
16:06:32 -!- sivteck has joined.
16:10:25 <HackEgo> [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 <J_Arcane> 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 <tromp_> 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 <oerjan> :t (&~)
20:19:11 <lambdabot> s -> State s a -> s
20:19:28 <oerjan> oh hm
20:19:42 <int-e> @type execState
20:19:42 <lambdabot> State s a -> s -> s
20:19:44 <oerjan> :t (%~)
20:19:45 <lambdabot> Profunctor p => Setting p s t a b -> p a b -> s -> t
20:20:17 <int-e> (just checking whether I remembered the roles of run/exec/eval correctly)
20:20:38 <oerjan> i just realized that it would have been more logical for %~ to have been called &~ once & exists
20:20:58 <shachaf> run is for everything, eval is for the value, exec is for the effect
20:21:22 <oerjan> execute evil effects
20:21:49 <Melvar> ( :t run
20:21:49 <idris-bot> Effects.run : Applicative m => {tacimp env : Env m xs} -> Eff a xs xs' -> m a
20:22:15 <oerjan> alternatively, & should have been called %, except that's taken by Data.Ration iirc
20:22:22 <shachaf> That's a suspicious function.
20:22:22 <oerjan> *-n
20:22:50 <shachaf> oerjan: & used to be called %
20:22:58 <oerjan> oh
20:23:11 <shachaf> It was renamed due to data rationing.
20:23:20 <Melvar> ( :t runEnv
20:23:20 <idris-bot> Effects.runEnv : Applicative m => Env m xs -> Eff a xs xs' -> m (x ** Env m (xs' x))
20:23:24 <oerjan> ic. i'm not sure that was a good enough reason...
20:24:13 <oerjan> :t ($~)
20:24:13 <shachaf> well it's actually Data.Ratio but i was going along with your thing
20:24:14 <lambdabot> Not in scope: ‘$~’
20:24:14 <lambdabot> Perhaps you meant one of these:
20:24:14 <lambdabot> ‘$!’ (imported from Prelude), ‘$’ (imported from Data.Function),
20:24:30 <Melvar> Should’ve used ÷ for Ratio.
20:24:53 <oerjan> Melvar: they're not big on unicode operators in the standard.
20:24:57 <zzo38> That isn't ASCII though.
20:25:02 <Melvar> Yeah I know.
20:25:21 <zzo38> ASCII forms should always be made available even if there are non-ASCII alternatives.
20:25:22 <shachaf> oerjan: of code points above 127, anyway
20:29:22 -!- sivteck has joined.
20:31:11 -!- ais523 has quit.
20:31:19 <zzo38> 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 <int-e> oh, there *are* negative width unicode characters. charming...
20:34:16 <zzo38> I really think that such a thing should be dependent on the font.
20:35:51 <zzo38> 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 <int-e> 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 <int-e> (though the precise placement should depend on the previous character)
20:53:10 <Vorpal> zzo38, are you there?
20:53:27 <zzo38> Vorpal: Am I where?
20:53:39 <Vorpal> zzo38, Out of interest, what gopher server do you use?
20:54:25 <zzo38> Vorpal: I wrote the software myself
20:54:46 <Vorpal> Is it the best one available? Do you have a link to it?
20:54:46 <shachaf> Is the software you wrote available?
20:55:06 <zzo38> Vorpal: I don't know if it is best one available
20:55:29 <Vorpal> What alternatives are there? And do you have links to any of them?
20:56:19 <zzo38> I wrote it in BASIC, but probably one written in C may be better
20:56:31 <zzo38> I do not have links; you will have to look yourself
20:57:02 <Vorpal> Right, so your doesn't run on Linux then=
20:58:06 <zzo38> It is FreeBASIC, so probably it will run on Linux.
20:58:20 <Melvar> 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 <zzo38> I have actually written a similar gopher server in C on Linux too, but I don't have it available.
20:59:54 <zzo38> 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 <Melvar> Unicode is kinda the only thing like itself though.
21:07:44 <zzo38> 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 <fizzie> Hello from the land of London.
21:23:47 <GeekDude> hello
21:24:10 <GeekDude> From cloud cuckoo land
21:24:22 -!- Sprocklem has quit (Ping timeout: 245 seconds).
21:24:38 <J_Arcane> query: is a lisp that is bad at recursion essentially missing the bloody point?
21:25:44 <Bicyclidine> what does being bad at recursion entail
21:26:10 <shachaf> Bicyclidine: i get it
21:26:36 <Bicyclidine> that wasn't a joke
21:26:45 <Bicyclidine> i mean, intentionally. i guess if you laughed anyway that's cool
21:27:25 <J_Arcane> Bicyclidine: poor performance, no TCO, poor exception handling, inability to gracefully break loops ...
21:27:45 <Bicyclidine> what do any of those have to with recursion except the second i guess
21:27:50 <Bicyclidine> 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 <elliott> common lisp doesn't guarantee tail recursion
21:30:42 <Bicyclidine> 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 <J_Arcane> 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 <elliott> J_Arcane: yeah, but it's not really considered that idiomatic.
21:31:10 <elliott> afaik.
21:31:16 <Bicyclidine> yeah.
21:31:22 <Bicyclidine> it's nice to be able to turn it off though. for debugging.
21:31:58 <J_Arcane> 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 <elliott> I think clojure can do tail recursion, you just have to mark it. dunno about general tail calls
21:34:28 <J_Arcane> Yeah, you're supposed to call it with recur.
21:34:31 <Bicyclidine> I thought the JVM prohibited it or something. I read that like years ago though
21:36:46 <elliott> recursion isn't really that great anyway.
21:36:48 <J_Arcane> 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 <Bicyclidine> fuck recursion, execute programs by NP graph rewriting
21:40:59 <J_Arcane> :D
21:41:13 <J_Arcane> Well, in this case it was for an exercise specifically about recursion.
21:43:14 <Bicyclidine> those exercises suck
21:43:39 <Bicyclidine> define exponentiation BUT YOU'RE NOT ALLOWED TO USE ADDITION, THIS IS IMPORTANT
21:44:36 <J_Arcane> Bicyclidine: The one before it was similarly redundant: find a recursive solution for proving a number is even.
21:44:52 <J_Arcane> You know, because (mod n 2) is too easy ...
21:45:23 <int-e> > iterate not True !! 100
21:45:24 <lambdabot> True
21:45:56 <oerjan> even numbers are a lie
21:45:57 <Bicyclidine> yeah, see, those suck.
21:46:10 <Bicyclidine> 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 <int-e> > (iterate (\f x -> iterate f x !! 4) id !! 3) succ 0
21:46:17 <lambdabot> 1
21:46:55 -!- oerjan has quit (Quit: Nite).
21:47:10 <Bicyclidine> maybe if they picked something that wasn't tail recursion and thus completely fucking pointless to do that way
21:47:13 <J_Arcane> Bicyclidine: I use it all the time in Racket, though I'm still not great with list eaters.
21:47:35 <Bicyclidine> like... how about hyper? I bet if you just told students to do hyper they'd do a recursive solution.
21:47:36 <int-e> > (iterate (\f x -> iterate f x !! 4) succ !! 3) 0
21:47:37 <lambdabot> 64
21:47:48 <J_Arcane> 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 <int-e> I'm too tired for Church numerals.
21:48:25 <Bicyclidine> well, that's kind of the problem, you've gotten that impression because your class is uncreative.
21:49:04 <Bicyclidine> "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 <Bicyclidine> 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 <J_Arcane> Heh heh.
21:50:45 <int-e> eh. right, it's self-evident. *chuckles*
21:50:46 <J_Arcane> 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 <J_Arcane> And when Clojure doesn't exactly handly that like most lisps, well ... it's unhelpful at best.
21:53:17 <Bicyclidine> 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 <Bicyclidine> i think that wouldn't be a bad problem to assign, maybe?
21:54:24 <Bicyclidine> 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 <J_Arcane> heh heh.
21:55:04 -!- sivteck has quit (Quit: TIL nothing).
21:55:42 <Bicyclidine> 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 <int-e> welcome to the wonderful world of Ackermann-like functions.
21:56:05 <Bicyclidine> I know, it's so obvious! It's like exactly what Ackermann was invented for practically
21:57:21 <J_Arcane> 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 <Bicyclidine> everything is terrible hth
21:57:37 <int-e> I'm really irritated by the requirement of not using addition for exponentiation
21:57:45 <J_Arcane> Well, this is also basically true.
21:58:10 <Bicyclidine> int-e: that was totally made up. i got out of CS classes before i ran into these problems
21:59:18 <int-e> why not use lists and trees for teaching recursion ...
21:59:47 <int-e> yes, you can use natural numbers but the easy problems are bound to look very artificial.
21:59:55 <Melvar> ( :let data Even : Nat -> Type where EvenZ : Even Z; EvenSS : Even n -> Even (S (S n))
21:59:55 <idris-bot> defined
22:00:20 <Bicyclidine> int-e: why not make them define exponentiation with addition chains. trees!!!
22:00:48 <Bicyclidine> nah but they do that too. J_Arcane's probably going to get told to flatten a list any day now.
22:01:01 <int-e> that's so ... untyped
22:01:02 <J_Arcane> Heh heh.
22:01:19 <J_Arcane> I did actually have to flatten a list the other day. So I called (flatten ...)
22:01:29 <Bicyclidine> oh, does clojure have a function for that?
22:01:44 <Bicyclidine> i've seen dozens of people ask for homework help defining it but never actually wanted to use such an operation
22:01:46 <J_Arcane> No idea, but Racket does (I was using that at the time)
22:02:00 <Bicyclidine> clojure does too, looks like. wacky.
22:02:13 <Bicyclidine> (flatten 5) => (), nice
22:02:16 <J_Arcane> I actually used it in one of my one-line Euler solutions.
22:02:23 <int-e> How does one memorize the spelling of "Grzegorcyk"?
22:02:38 <Bicyclidine> "Gregor but with a bunch of shit in it"
22:04:37 <J_Arcane> (first (sort (filter prime? (flatten (factorize 600851475143))) >))
22:05:04 <Melvar> Do you mean “Grzegorczyk”?
22:05:59 <int-e> Melvar: right.
22:07:05 <Melvar> 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 <int-e> J_Arcane: what does factorize return if not a list of primes?
22:09:38 <J_Arcane> I think at the time I'd misunderstood what factorize did.
22:10:39 <J_Arcane> It is indeed an unnecessary step.
22:11:24 <J_Arcane> Somewhere I also picked up a habit of redundant ass-covering.
22:13:55 <int-e> fascinating, they changed the number
22:14:26 <int-e> when I solved Euler problem 3, it was the largest prime factor of 317584931803.
22:15:41 <J_Arcane> I guess because people like me go and blab their solutions? XD
22:16:36 <int-e> makes me wonder how many of my solutions are wrong nowadays
22:17:05 <J_Arcane> I kinda ran into a math-skill-wall so I haven't done any in a while.
22:18:28 <J_Arcane> 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 <J_Arcane> 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 <shachaf> 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).
←2014-09-08 2014-09-09 2014-09-10→ ↑2014 ↑all