←2014-11-02 2014-11-03 2014-11-04→ ↑2014 ↑all
20:14:35 -!- esowiki has joined.
20:14:36 -!- glogbot has joined.
20:14:39 -!- esowiki has joined.
20:14:39 -!- esowiki has joined.
20:14:39 -!- EgoBot has joined.
20:15:35 -!- Phantom_Hoover has quit (Ping timeout: 255 seconds).
20:28:20 <oerjan> O_o
20:28:39 <oerjan> THE DEAD BOTS ARE RISING
20:30:14 -!- Sprocklem has joined.
20:31:04 <int-e> cue for metasepia?
20:31:30 <olsner> metasepia seems to be dependent on its human
20:31:43 <int-e> > map(tail.tails).(init.inits)$"1234"
20:31:45 <lambdabot> [[],[""],["2",""],["23","3",""]]
20:31:57 <int-e> > map(init.tails).(tail.inits)$"1234"
20:31:59 <lambdabot> [["1"],["12","2"],["123","23","3"],["1234","234","34","4"]]
20:32:38 <fizzie> Needs some reordering.
20:33:04 <int-e> > concat.transpose.map(tail.inits).(init.tails)$"1234"
20:33:05 <lambdabot> ["1","2","3","4","12","23","34","123","234","1234"]
20:33:13 <int-e> way too long
20:33:20 <fizzie> Now I guess we've got a bfjoust conflict, then. :/
20:33:24 <fizzie> !bfjoust
20:33:24 <zemhill> fizzie: "!bfjoust progname code". See http://zem.fi/bfjoust/ for documentation.
20:33:25 <EgoBot> ​Use: !bfjoust <program name> <program> . Scoreboard, programs, and a description of score calculation are at http://codu.org/eso/bfjoust/
20:33:27 <fizzie> Yes.
20:33:55 <fizzie> What's the CONSENSUS on how to PROCEED?
20:33:58 <elliott> !help
20:33:58 <zemhill> elliott: I do !bfjoust; see http://zem.fi/bfjoust/ for more information.
20:33:58 <EgoBot> ​help: General commands: !help, !info, !bf_txtgen. See also !help languages, !help userinterps. You can get help on some commands by typing !help <command>.
20:34:01 <elliott> !help userinterps
20:34:02 <EgoBot> ​userinterps: Users can add interpreters written in any of the languages in !help languages. See !help addinterp, delinterp, show | !userinterps. List interpreters added with !addinterp.
20:34:05 <elliott> !help addinterp
20:34:06 <EgoBot> ​addinterp: !addinterp <name> <language> <code>. Add a new interpreter to EgoBot. This interpreter will be run once every time you type !<name> <subcode>, and receive the program code as input.
20:34:14 <elliott> (uh, this output seems broken.)
20:34:23 <elliott> (unless it's just mosh)
20:34:27 <elliott> no, that was definitely "hlp"
20:34:33 <elliott> !addinterp bfjoust sh true
20:34:34 <EgoBot> ​Interpreter bfjoust installed.
20:34:35 <elliott> !bfjoust a
20:34:35 <zemhill> elliott: "!bfjoust progname code". See http://zem.fi/bfjoust/ for documentation.
20:34:36 <EgoBot> ​Use: !bfjoust <program name> <program> . Scoreboard, programs, and a description of score calculation are at http://codu.org/eso/bfjoust/
20:34:39 <elliott> aw
20:34:40 <elliott> !delinterp bfjoust
20:34:41 <EgoBot> ​Interpreter bfjoust deleted.
20:34:44 <elliott> ok, wtf?
20:34:46 <elliott> interpreer?
20:34:56 <fizzie> I'm not seeing anything weird.
20:35:14 -!- Bicyclidine has joined.
20:35:15 <fizzie> I mean, anything weirder than the usual.
20:35:51 <elliott> maybe my irssi or mosh or terminal is choking on the weird stuff it uses to prevent botloops
20:37:24 <myname> i should make a bot that triggers on zero-width spaces only
20:38:46 <oerjan> int-e: you don't need the init. before tails, also id=<< is shorter than concat if things fit
20:40:13 <oerjan> elliott: HackEgo uses the same stuff afaik
20:40:26 <elliott> `help
20:40:26 <HackEgo> Runs arbitrary code in GNU/Linux. Type "`<command>", or "`run <command>" for full shell commands. "`fetch <URL>" downloads files. Files saved to $PWD are persistent, and $PWD/bin is in $PATH. $PWD is a mercurial repository, "`revert <rev>" can be used to revert to a revision. See http://codu.org/projects/hackbot/fshg/
20:40:38 <elliott> well EgoBot's output definitely looks weird to me
20:40:58 <oerjan> i see none of your weirdness
20:41:49 <int-e> 20:34:41: <EgoBot> <U+200B>Interpreter bfjoust deleted.
20:41:52 <oerjan> int-e: that problem really chose an awkward ordering of sets.
20:42:19 <int-e> of strings. yes.
20:44:04 -!- centrinia has joined.
20:45:19 -!- AndoDaan has quit (Ping timeout: 272 seconds).
20:47:44 <fizzie> oerjan: I thought it was a very natural ordering.
20:48:22 <int-e> it's awkward to produce programmatically.
20:48:34 <int-e> at least in Haskell
20:49:52 <olsner> sorted by increasing length, then lexicographically?
20:50:09 <oerjan> not lexicographically
20:50:12 <mroman> olsner: "THE DEAD BOTS ARE RISING" sounds like a promising movie title
20:50:34 <oerjan> someone's tab completion is acting up *cough*
20:50:39 <olsner> mroman: yes, or maybe DEAD BOT RISING
20:50:41 <int-e> olsner: nah, substrings of length 1 in order of appearance, the those of length 2 in order of appearance, etc.
20:50:59 <olsner> oh, so a stable sort on length, like?
20:53:03 <int-e> something like that
20:53:36 <oerjan> i suppose sortBy (comparing length) would work to make that from a simpler construction
20:53:46 <oerjan> but so does concat.transpose
20:55:19 <oerjan> all of which are disgustingly long and require importing Data.List
21:23:19 <b_jonas> what? isn't transpose in Prelude?
21:23:24 <oerjan> nope
21:23:29 <b_jonas> ouch
21:23:42 <oerjan> neither are inits or tails
21:23:56 <b_jonas> ok
21:24:08 <oerjan> although i found a reasonably short replacement for tails...
21:30:55 -!- idris-bot has quit (Quit: Terminated).
21:31:14 -!- Melvar has quit (Quit: rebooting).
21:32:24 <oerjan> i found a 45-46 char Prelude-only thing that constructs the substrings
21:32:40 <oerjan> which means it's shorter than the transpose version if you include the import
21:35:27 -!- Melvar has joined.
21:46:35 -!- idris-bot has joined.
21:49:39 <int-e> better than mine
21:59:54 -!- Bicyclidine has quit (Ping timeout: 240 seconds).
22:08:21 <int-e> `` perl -e '$_=1234;/.+(?{print"$&\n"})(*F)/' # I think the Perl people would also be happier with another order.
22:08:22 <HackEgo> 1234 \ 123 \ 12 \ 1 \ 234 \ 23 \ 2 \ 34 \ 3 \ 4
22:08:56 -!- Bicyclidine has joined.
22:09:13 <b_jonas> int-e: what? the order is completely defined by the docs, and reliable
22:09:24 <b_jonas> int-e: what order would you prefer?
22:10:24 <int-e> b_jonas: I meant using another order in the specification of http://golf.shinh.org/p.rb?Prime+Substrings
22:12:31 <b_jonas> `perl -e hello=~/.+(?{print$&," "})(?!)/
22:12:32 <HackEgo> hello hell hel he h ello ell el e llo ll l lo l o
22:12:39 <b_jonas> `perl -e bravo=~/.+(?{print$&," "})(?!)/
22:12:40 <HackEgo> bravo brav bra br b ravo rav ra r avo av a vo v o
22:12:44 <b_jonas> `perl -e bravo=~/.+?(?{print$&," "})(?!)/
22:12:44 <HackEgo> b br bra brav bravo r ra rav ravo a av avo v vo o
22:12:52 <b_jonas> `perl -e bravo=~/.*\K.+(?{print$&," "})(?!)/
22:12:53 <HackEgo> o vo v avo av a ravo rav ra r bravo brav bra br b o vo v avo av a ravo rav ra r o vo v avo av a o vo v o
22:12:57 <b_jonas> `perl -e bravo=~/.*\K.+?(?{print$&," "})(?!)/
22:12:58 <HackEgo> o v vo a av avo r ra rav ravo b br bra brav bravo o v vo a av avo r ra rav ravo o v vo a av avo o v vo o
22:13:13 <b_jonas> you can get any order from regexen
22:13:22 <b_jonas> well, maybe not any
22:13:29 <b_jonas> sorted by length is probably more difficult
22:13:31 <b_jonas> hmm
22:13:44 <int-e> --> b r a v o br ra av vo bra rav avo brav ravo bravo
22:13:55 <b_jonas> yeah...
22:13:57 <int-e> it's unnatural!
22:14:00 <b_jonas> I wonderr how to get that
22:15:59 <int-e> it's something like a breadth first search
22:17:40 <int-e> perl -e 'bravo=~/.{$_}(?{print"$&\n"})(*F)/ for(1..5)'
22:17:45 <int-e> `` perl -e 'bravo=~/.{$_}(?{print"$&\n"})(*F)/ for(1..5)'
22:17:46 <HackEgo> Eval-group not allowed at runtime, use re 'eval' in regex m/.{1}(?{print"$&\n"})(*F)/ at -e line 1.
22:18:07 -!- nys has joined.
22:18:16 <int-e> funny. works for me.
22:18:32 <fizzie> `run perl --version
22:18:32 <HackEgo> ​ \ This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-gnu-thread-multi \ (with 88 registered patches, see perl -V for more detail) \ \ Copyright 1987-2011, Larry Wall \ \ Perl may be copied only under the terms of either the Artistic License or the \ GNU General Public License, which may be found in the Perl 5 source kit
22:18:38 <fizzie> V. new.
22:19:07 <int-e> Right. v5.20.1 here.
22:19:57 -!- `^_^ has joined.
22:20:23 <int-e> but v5.14.2 on anagol, so it won't work there either
22:22:08 <int-e> `` perl -e 'use re "eval";bravo=~/.{$_}(?{print"$&\n"})(*F)/ for(1..5)'
22:22:09 <HackEgo> b \ r \ a \ v \ o \ br \ ra \ av \ vo \ bra \ rav \ avo \ brav \ ravo \ bravo
22:22:27 -!- Sprocklem has quit (Ping timeout: 250 seconds).
22:23:05 -!- nycs has quit (Ping timeout: 244 seconds).
22:23:38 <zzo38> How can you convert a timestamp in a text format (including the timezone) into a UNIX timestamp number, in a C code?
22:24:19 <fizzie> `run perl -e '@a = ("bravo"); while ($a[-1] =~ /\S\S/) { push @a, $a[-1] =~ s/(\S)(\S*)(\S)/$1$2 $2$3/rg; } print join(" ", @a)' # probably not a useful direction, but fun nevertheless
22:24:20 <HackEgo> bravo brav ravo bra rav rav avo br ra ra av ra av av vo b r r a r a a v r a a v a v v o
22:25:23 <fizzie> I think the appropriate answer to that is "with difficulty", because POSIX strptime is entirely useless when it comes to time zones.
22:29:53 <zzo38> Then is there better way?
22:33:56 <fizzie> I think I've seen some attempts that are based on recognizing the time zone separately, (temporarily) doing tzset and parsing the rest via normal strptime. But that seems quite nasty.
22:34:53 <zzo38> How does that do? I require it to work both Windows and UNIX computers.
22:37:20 <fizzie> I somewhat suspect it wouldn't really work on Windows.
22:42:00 <oerjan> now if i only knew a good haskell golf prime test that worked up to 999...
22:42:14 <oerjan> also, if i could make my trivial one work on 0 and 1.
22:43:10 <tromp> > nubBy(((>1).).gcd)[2..]
22:43:11 <lambdabot> [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,...
22:43:35 <oerjan> not a list, a test hth
22:43:51 <oerjan> also nubBy is no good, it's not in Prelude.
22:44:47 <Bicyclidine> :t nubBy
22:44:49 <lambdabot> (a -> a -> Bool) -> [a] -> [a]
22:46:34 <tromp> how bout using fermat's test and avoiding the 3 exceptions?
22:46:51 <oerjan> there are only 3?
22:47:15 <tromp> under 1000, yes
22:47:16 <int-e> but naive is better than that
22:47:40 <tromp> yes, naive shorted and much slower
22:47:44 <tromp> shorter
22:47:51 <int-e> speed shouldn't be a problem?
22:48:51 <oerjan> it doesn't seem to be a problem, since i already ran one that failed because i forgot about 0 and 1
22:49:58 <int-e> yeah. not a problem at all.
22:50:21 -!- AndoDaan has joined.
22:52:17 <FireFly> Argh. How annoying, the input isn't newline-terminated
22:53:35 <oerjan> success
22:54:27 <oerjan> but it feels too long, anyway
22:57:42 -!- boily has joined.
23:01:00 -!- oerjan has quit (Quit: Good night).
23:02:07 -!- Bicyclidine has quit (Ping timeout: 264 seconds).
23:07:55 -!- boily_ has joined.
23:10:02 <zzo38> Someone told me to use Kronisk but that is C++ and not C.
23:11:12 -!- Bicyclidine has joined.
23:13:24 -!- boily_ has quit (Quit: DUPLICATE CHICKEN).
23:26:55 -!- nys has quit (Ping timeout: 264 seconds).
23:27:18 -!- nys has joined.
23:32:05 <fizzie> FireFly: I would estimate that roughly 98% of the problems are missing the newline on the last line.
23:32:29 -!- mihow has quit (Quit: mihow).
23:41:09 -!- `^_^ has quit (Quit: This computer has gone to sleep).
23:52:54 -!- Phantom_Hoover has joined.
←2014-11-02 2014-11-03 2014-11-04→ ↑2014 ↑all