←2014-01-05 2014-01-06 2014-01-07→ ↑2014 ↑all
00:04:19 <oerjan> > ৭٩
00:04:20 <lambdabot> <hint>:1:1: lexical error at character '\2541'
00:04:36 <oerjan> lambdabot: you disappoint me.
00:05:57 <olsner> `run python -c 'print int("৭٩")'
00:06:00 <HackEgo> Traceback (most recent call last): \ File "<string>", line 1, in <module> \ ValueError: invalid literal for int() with base 10: '\xe0\xa7\xad\xd9\xa9'
00:06:28 <olsner> `run python -c 'print int("৭٩".decode("utf-8"))'
00:06:29 <HackEgo> 79
00:07:22 <oerjan> `run python -c 'print ৭٩'
00:07:23 <HackEgo> ​ File "<string>", line 1 \ print ৭٩ \ ^ \ SyntaxError: invalid syntax
00:07:53 <olsner> > read "৭٩" :: Int
00:07:54 <lambdabot> *Exception: Prelude.read: no parse
00:09:24 <Phantom_Hoover> oh shit its my birthday
00:09:43 <Taneb> Phantom_Hoover, happy getting older day
00:09:56 <Taneb> Which getting older day is it?
00:09:57 <Phantom_Hoover> yay
00:10:06 <Phantom_Hoover> 19
00:10:13 <Taneb> Yay
00:10:25 <Taneb> I did not get you anything, I'm sorry
00:10:30 <Phantom_Hoover> soon i will be older than you
00:10:37 <Phantom_Hoover> that knowledge alone is enough
00:11:25 <Taneb> I am afraid I have engineered events such that I am always approximately 64 days older than you
00:11:51 <Phantom_Hoover> bastard!
00:12:18 <Taneb> It is a dastardly scheme tracing back to approximately 19 years ago
00:12:25 <Phantom_Hoover> wait if i kill you you technically stop getting older don't you
00:12:31 <Taneb> I... am not sure
00:12:40 <Taneb> But do you really think you can kill me?
00:12:43 <Taneb> Ahahahahahaha!
00:12:48 <Taneb> I can turn into an elf!
00:13:07 <Phantom_Hoover> Taneb you know how i feel about elves
00:13:23 <Phantom_Hoover> the only way you could make it easier still for me to kill you is if you also turned into a swede
00:13:41 <Taneb> Have you ever successfully killed an elf, though?
00:13:59 <Taneb> And I'm not talking about one of those pixies you get down the bottom of your garden, either.
00:14:37 <olsner> Taneb: but swedes are not elves, and as a swede it would be trivial to kill you
00:14:52 <Taneb> olsner, I'm also an Australian
00:15:01 <Taneb> Can a Swede kill an Australian!?
00:15:09 <Phantom_Hoover> you wouldn't be if you turned into a swedish elf
00:15:18 <olsner> Taneb: australia = austria = switzerland = sweden
00:15:25 <Taneb> Foiled again!
00:15:28 * Taneb dies
00:17:27 <Taneb> Phantom_Hoover, on the bright side, you're older than elliott
00:17:49 <Phantom_Hoover> that means he'll try to kill me!
00:17:57 <olsner> Taneb: who isn't?
00:18:08 <Taneb> olsner, hmmmmmm
00:18:30 <Phantom_Hoover> asie wasn't was he
00:18:40 <Taneb> fungot, I guess
00:18:40 <fungot> Taneb: and write as fnord as i'd like. but quality for sure. :) i just remembered
00:18:46 <olsner> we've been here quite some time though, I guess elliott might now be older than he used to be
00:18:56 <Phantom_Hoover> by extension nooodl probably was/isn't either? i forget though
00:19:01 <olsner> fungot: are you older?
00:19:01 <fungot> olsner: but there is naturally limit soon ( although not strictly conformant) c. this is only valid in one store, which is a problem
00:21:08 -!- LinearInterpol has quit (Read error: Connection reset by peer).
00:21:56 -!- LinearInterpol has joined.
00:28:03 <Taneb> Phantom_Hoover, seriously, though, happy birthday
00:28:34 <Phantom_Hoover> it's my first day back at uni HOW CAN THIS DAY BE HAPPY
00:29:09 <Taneb> Phantom_Hoover, you can run around the streets of Coventry screaming to the heavens about the oncoming angels
00:29:38 <Taneb> Do you by any chance know anyone by the name of Mr Green?
00:29:45 <Phantom_Hoover> why would i ruin my birthday by going into coventry
00:30:09 <Taneb> God knows
00:30:12 <Phantom_Hoover> i went there last term for a social, we got lost and some youths on skateboards started circling in for the kill
00:30:33 <Taneb> On Freshers' something similar happened to me, except they were jugglers
00:30:59 <oerjan> it's when they're mimes you need to really be afraid.
00:31:00 <Taneb> Jugglers can be terrifying
00:31:56 <Bike> is there a generic god help me i'm doomed linux help channel or something
00:32:10 <Taneb> #esoteric, probably
00:32:17 <fizzie> "##Linux"?
00:32:33 <Bike> aaaaah
00:32:41 <fizzie> 1241 users, I'm sure you'll get very personal attention.
00:33:09 <fizzie> "The purpose of ##Linux is to provide a fun and friendly medium for new and hardcore Linux users alike seeking help, advice and constructive discussion on Linux-related topics. The channel is for ALL levels of user experience, including none."
00:33:26 <fizzie> (Do you self-identify as a "hardcore Linux user"?)
00:33:26 <oerjan> very zen.
00:33:47 <Bike> it's really exciting being dumped to some absurd initramfs 'emergency shell' and being gold i might want to save whate ever the fuck to a usb and then it doesn't let me use the keyboard and god
00:34:09 <Bike> getting fucking usb power errors it's ridiculous
00:34:55 <Phantom_Hoover> have you tried turning it off and on again
00:35:09 <oerjan> Bike: well i won't help you as my recent logreading has uncovered evidence that you may be a tzetze fly posing as a bike.
00:35:21 <Bike> is that so
00:35:55 <oerjan> (also because i have no clue how to fix linux.)
00:36:53 -!- Phantom_Hoover has quit (Quit: Leaving).
00:37:23 <FreeFull> I certainly don't know as much about Linux as a kernel hacker or sysadmin would
00:37:24 <FreeFull> Well, good sysadmin
00:43:54 <olsner> a kernel hacker wouldn't necessarily know much about what goes on in the rest of the system
00:44:09 <olsner> "that's a userspace problem"
00:46:05 <kmc> indeed the APIs used within the kernel are often a lot cleaner than the APIs by which userspace talks to the kernel
00:46:22 <kmc> because there is no stability requirement on the former and a near-absolute stability requirement on the latter
00:49:19 <olsner> I think windows had the right idea with putting all "kernel" APIs in userspace and making the real kernel api private (but I do wonder exactly how freely they can actually change that)
00:49:30 <kmc> yeah
00:49:49 <kmc> they do some pretty insane compatibility hacks within that "userspace" component
00:51:46 <Sgeo> http://thinkprogress.org/justice/2014/01/05/3120451/wyoming-law-says-better-drive-high-possess-unsmoked-joint/
00:57:56 <mauke> olsner: oh, is that what they do?
00:58:14 <mauke> I never understood windows programming and none of the resources I read spelled it out
01:02:01 <olsner> at the bottom there's a DLL exporting functions for all "syscalls" that does int X/sysenter/syscall with the appropriate syscall number (and those change wildly between windows versions)
01:02:36 <olsner> (but even that might technically not be part of the API you're allowed to rely on, not entirely sure)
01:03:15 <mauke> is there a windows programming book for unix people?
01:04:15 -!- Sprocklem has quit (Ping timeout: 245 seconds).
01:06:16 <pikhq> olsner: kernel32.dll actually is guaranteed solid API.
01:06:29 <pikhq> Though the name is a bit of a misnomer.
01:06:47 <pikhq> It was kinda-sorta the kernel in 16-bit Windows.
01:07:11 <mauke> and that's why it's called kernel32 amirite
01:07:39 <pikhq> All DLLs that were in 16-bit Windows made it to 32-bit Windows by just adding a "32" suffix.
01:07:45 <Bike> usb 5-1: device descriptor read/64, error -32. supposedly indicates automatic shutoff of usb device due to high power draw. but the usb devices work fine on another OS on the same computer.
01:07:57 <pikhq> Also, this kinda-sorta was the case on Windows 9x.
01:08:21 <olsner> https://en.wikipedia.org/wiki/Native_API is more what I was thinking about, seems to be below kernel32.dll maybe
01:08:21 <mauke> ah, like mario 64
01:08:35 <pikhq> Windows is made up of dubious legacy decisions.
01:09:27 <kmc> computer is made up of dubious legacy decisions
01:09:42 <mauke> I,I A20
01:09:44 <Bike> life is made up of dubious legacy decisions
01:09:47 <pikhq> Though in the case of Windows it's decisions that were dubious at the time far too often.
01:10:03 <Bike> lfimduodboseayeiin
01:10:38 <pikhq> (what sort of monster would use UTF-16 in '93?!?)
01:10:53 <mauke> did UTF-16 exist then?
01:10:58 <pikhq> Yes.
01:11:09 <pikhq> Well, arguably UCS-2 is the proper name.
01:11:11 <Slereah_> Why not UFT-64
01:11:17 <Slereah_> UTF*
01:11:24 <mauke> UTF-16 is from 1996
01:11:34 <kmc> if you believed the Unicode people when they said it would remain a 16-bit code, then using UCS-2 seems sensible
01:11:53 <kmc> and that switch happened in 1996 yeah
01:12:33 <pikhq> Except that Windows at the time did crazy stuff to make 16-bit code build on Win32. But didn't seem to care about the idea of making Unicode-unaware code work in Unicode land.
01:12:43 <pikhq> And indeed still don't.
01:14:36 <pikhq> And now Windows is a crazy land where you either do UTF-16 or do 8-bit legacy charsets.
01:16:15 <mauke> http://support.microsoft.com/kb/99884
01:16:15 * pikhq honestly doesn't know why they don't let you just use UTF-8 for their char* APIs
01:17:21 <olsner> nice, wikipedia seems to have quite a lot of articles about windows internals
01:17:26 <pikhq> Not all that relevant. UTF-16 was a bad decision at the time.
01:17:42 <mauke> UTF-16 didn't exist at the time
01:17:53 <pikhq> Blah.
01:17:58 <pikhq> UCS-2 was a bad decision.
01:18:00 <mauke> nor did UTF-8, probably
01:18:06 <pikhq> UTF-8 certainly did.
01:18:24 <pikhq> UTF-8 was *new* to be sure, but hey.
01:18:41 <pikhq> Plan 9 was completely on UTF-8 in September '92.
01:19:34 <mauke> draft unicode standard: 1988; first unicode volume: 1991; windows nt release: 1993
01:19:40 <mauke> utf-8 first officially presented: 1993
01:19:57 <pikhq> It also doesn't matter that much: UCS-2 was an awful decision even if there was no alternative way of encoding Unicode.
01:20:12 <coppro> Windows has had enough opportunities to redesign that portion of the code and keep legacy APIs around only where necessary
01:20:12 <kmc> my theory is that they had to pretend it would stay a 16-bit code or nobody would adopt it at all
01:21:53 <Sgeo> I should try to learn about Windows internals
01:22:54 <pikhq> "Hmm, all text is in ASCII or a superset thereof. Let's use something completely incompatible! Oh, and then make it so that everyone has to rewrite all their code to work with it. Great!"
01:23:00 <kmc> Sgeo: nooooo you have so much to live for
01:23:16 <Sgeo> kmc: but everyone else here knows Windows internals. It sounds fun
01:23:37 <mauke> pikhq: but they were getting ready for The Future!
01:24:29 <pikhq> This from a company that is yet to break DOS compatibility.
01:25:40 <mauke> don't knock DOS. it lets you use / as a directory separator! it's practically unix
01:31:51 <kmc> but doesn't it also use / for flags
01:35:54 <Bike> http://paste.debian.net/74463/ woot woot.
01:55:37 <ais523> kmc: there's an option to have / as separator and - for flags
01:55:41 <ais523> but it's kind-of hidden
01:57:03 <olsner> does it actually work, or does it only work for programs that happen to use some DOS api for parsing the command line?
01:58:03 <ais523> olsner: probably the latter
01:59:03 <kmc> iirc on DOS/Windows a program gets a single arg string and not an argv
01:59:16 <kmc> it's the job of the c stdlib to break it up for main()
01:59:47 <ais523> kmc: on DOS, the first command argument is actually parsed out into a file control block for you
01:59:59 <ais523> but people stopped using that feature after a while because it's too inflexible
02:00:38 <FreeFull> I just thought of something
02:00:50 <FreeFull> minimum ascending number partition
02:01:25 <FreeFull> So for example, 18249 could be partitioned into [18,249]
02:01:53 <lifthrasiir> and 31415926535 into [3,14,159,26,5,35]?
02:01:56 <FreeFull> But [1,8,249] would be better
02:02:01 <FreeFull> Because the sum is smaller
02:02:12 <FreeFull> lifthrasiir: Nope
02:02:15 <kmc> ais523: what? so they just assume the first arg will be a file?
02:02:17 <lifthrasiir> I don't get the point, [1,8,2,4,9] would be the best
02:02:18 <FreeFull> 159 is larger than 26
02:02:22 <lifthrasiir> hm
02:02:25 <FreeFull> It has to be ascending
02:02:30 <lifthrasiir> ah
02:02:43 <ais523> kmc: if it isn't, you don't use the FCB
02:02:46 <lifthrasiir> so you can partition any part of the numeric string but the parts should be increasing, right?
02:02:49 <ais523> but yeah, really inflexible
02:02:53 <ais523> also it doesn't work with directories
02:02:55 <FreeFull> A worst case would be something like 987654321
02:02:55 <ais523> drive and filename only
02:03:02 <ais523> so people don't use it past, like, DOS 1
02:03:58 <FreeFull> Which would partition into [9,876,54321] I think
02:04:25 <FreeFull> > sum [9,87,654321]
02:04:27 <lambdabot> 654417
02:04:31 <FreeFull> > sum [9,876,54321]
02:04:32 <lambdabot> 55206
02:04:43 <FreeFull> Yeah, I think [9,876,54321] is minimal
02:04:49 <lifthrasiir> I think so
02:05:48 <FreeFull> Note that in unary, all partitionings are minimal
02:06:01 <FreeFull> So binary is the first interesting case
02:06:46 <FreeFull> Can't do this to complex numbers since those don't have a built-in ordering
02:13:43 <oerjan> > sum [98,765,4321] -- i disagree
02:13:44 <lambdabot> 5184
02:14:10 <lifthrasiir> I thought so*
02:14:17 <lifthrasiir> ;)
02:16:43 <oerjan> now find one where minimizing the length of the final one is _not_ optimal.
02:17:33 <oerjan> FreeFull: should it be strictly ascending
02:17:49 <FreeFull> oerjan: Nice
02:18:14 <FreeFull> Is there one?
02:18:39 <Bike> i don't even know what's causing this error.
02:18:44 <Bike> what's reporting the error
02:18:53 <FreeFull> Let's try the first 7 digits of pi
02:18:54 <FreeFull> > pi
02:18:55 <lambdabot> 3.141592653589793
02:19:04 <FreeFull> 3141592
02:19:17 <Slereah_> e
02:19:20 <Slereah_> > e
02:19:21 <lambdabot> e
02:19:24 <Slereah_> :(
02:19:29 <FreeFull> > exp 1
02:19:31 <lambdabot> 2.718281828459045
02:19:55 <FreeFull> 271828182 make that 9 digits
02:20:10 <quintopia> oerjan: do you know a way to raise a continued fraction (given as a left-to-right digit generator) can be raised to a power (also a continued fraction in the same format)?
02:20:13 <FreeFull> > sum [27,182,8182]
02:20:13 <oerjan> 3 14 15 92 looks plausible
02:20:14 <lambdabot> 8391
02:20:17 <Bike> 31, 41, 592
02:20:45 <Bike> oh, lost.
02:20:51 * oerjan cackles evilly
02:21:06 <Bike> quintopia: integer power?
02:21:14 <FreeFull> I wonder if we should stay as strictly ascending, or if we should make it strictly non-descending
02:21:57 <oerjan> quintopia: i don't even know if there's an efficient way to _add_ numbers.
02:22:14 <quintopia> Bike: i don't even know a way to do it with integer power except a crap ton of adding and multiplying using the binomial theorem, but i want to know about real powers too.
02:22:32 <Bike> presumably you'd exponentiate
02:23:27 <FreeFull> quintopia: Very tricky
02:23:42 <FreeFull> oerjan: adding only inefficient if the bottom part of the fraction is the same
02:23:43 <quintopia> Bike: presumably.
02:23:55 <FreeFull> I mean, only efficient
02:25:41 <oerjan> > sum [2,7,18,28,182] -- tip, there's never a point in keeping the first two digits together if they're ascending
02:25:42 <lambdabot> 237
02:26:03 <quintopia> this problem FreeFull posed seems almost as difficult as the one about free-form series for brainfuck constants
02:26:55 <FreeFull> oerjan: Good point
02:27:13 <FreeFull> I think extending that to multiple digits is the answer
02:27:14 <oerjan> i think any example that _doesn't_ fulfil my idea of making the length of the last one minimal must be pretty long.
02:27:31 <FreeFull> oerjan: Does it exist?
02:28:44 <int-e> > sum [98,765,4321]
02:28:45 <lambdabot> 5184
02:29:03 <int-e> mm.
02:29:15 <oerjan> FreeFull: something like 12121212121212199
02:29:39 <oerjan> > sum [1,2,12,12,12,12,12,12,12,199]
02:29:40 <lambdabot> 286
02:30:12 <oerjan> > sum [1,21,21,21,21,21,21,21,21,99]
02:30:13 <lambdabot> 268
02:30:19 <oerjan> oops not quite
02:31:00 <oerjan> > sum [1,21,21,21,21,21,21,21,21,21,21,21,99]
02:31:01 <lambdabot> 331
02:31:03 <FreeFull> oerjan: Not strictly ascending anymore
02:31:07 <oerjan> > sum [1,21,21,21,21,21,21,21,21,21,21,21,99]
02:31:08 <lambdabot> 331
02:31:17 <oerjan> > sum [1,2,12,12,12,12,12,12,12,12,12,12,199]
02:31:18 <lambdabot> 322
02:31:45 <oerjan> FreeFull: i didn't hear a clear policy statement on that.
02:31:59 <FreeFull> Let's make it strictly ascending, for now
02:32:18 <FreeFull> 0 is basically free?
02:32:41 <oerjan> wat
02:32:43 <int-e> 0 is nasty
02:32:45 <FreeFull> It's the only case where you could have a longer sequence followed by a shorter one
02:32:54 <FreeFull> [1,042,99]
02:33:04 <int-e> for 10000000, you can't split the sequence at all.
02:33:09 <FreeFull> I mean, the other way around
02:33:16 <oerjan> i would have assumed you cannot have initial zeros.
02:33:18 <FreeFull> int-e: Yeah, there are unsplittable numbers
02:33:41 <FreeFull> I wonder how the ratio of unsplittable to splittable changes
02:33:46 <FreeFull> As you go up
02:34:09 <int-e> well, you can split off the first digit for almost all numbers
02:34:20 <FreeFull> All one-digit numbers are unsplittable
02:34:44 <FreeFull> Two digit numbers are unsplittable if the first digit is larger or equal to the second
02:35:04 <FreeFull> Should we count 03 as a two-digit number?
02:35:58 <oerjan> int-e: splitting off the first digit isn't always optimal.
02:36:06 <FreeFull> If we do, that's 10 + 9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1 unsplittable two-digit numbers, I think
02:36:15 <FreeFull> Or is that splittable
02:36:25 <FreeFull> > sum [1..10]
02:36:26 <lambdabot> 55
02:36:47 <FreeFull> I'm three quarters asleep
02:37:07 <oerjan> oh right sleep
02:37:17 <quintopia> wow i don't like the strictly ascending rule. narrows the possibilities too much
02:37:33 -!- oerjan has quit (Quit: Gnith).
02:38:51 <int-e> FreeFull: 45 splittable, 55 non-splittable, that includes numbers with leading zeros like 00.
02:40:24 <FreeFull> Three-digit numbers are trickier
02:40:35 <mauke> http://www.twitch.tv/speeddemosarchivesda
02:41:09 <FreeFull> Actually, for three digit numbers it might just depend on the first two digits anyway
02:41:20 <int-e> FreeFull: not really. 55 of those are non-splittable.
02:41:22 <FreeFull> No, it doesn't
02:41:38 <int-e> FreeFull: because if the middle digit is non-zero then the number is splittable
02:41:39 <FreeFull> I mean, for 3-digit
02:41:48 <int-e> FreeFull: so do I
02:41:59 <FreeFull> int-e: 100 isn't splittable
02:42:11 <int-e> that has a zero center digit
02:42:26 <FreeFull> Ah, I misread your sentence
02:42:40 <FreeFull> Yeah, you're right
02:42:52 <FreeFull> Are you sure it's 55 though?
02:43:20 <FreeFull> Hmm, 001 to 009 are splittable
02:43:42 <FreeFull> 000 is splittable too
02:43:55 <int-e> a(0)b is splittable if a < b.
02:44:01 <int-e> it's the same as with two digits.
02:44:51 <FreeFull> Yeah, you're right
02:44:57 <FreeFull> What about four digits?
02:45:10 <int-e> 55 nonsplittable ones, again
02:45:25 <FreeFull> n000 is non-splittable, trivially
02:45:37 <FreeFull> For any number of zeroes after the n
02:46:02 <FreeFull> And then I guess there is a00b for any number of 0s
02:46:12 <int-e> more to the point, you can split abcd into a,bcd if bc>0 or if a<b.
02:46:23 <int-e> err ... a<d
02:47:10 <FreeFull> So are there only 55 non-splittable numbers total, for any fixed digit size?
02:47:21 <int-e> greater than 1, yes.
02:47:30 <FreeFull> What if it's not fixed? so 10 and 010 are different
02:47:41 <FreeFull> Infinite then
02:47:46 <quintopia> int-e: 2011 meets your criterion doesn't it?
02:47:49 <quintopia> oh
02:47:51 <quintopia> b*c
02:47:53 <quintopia> nvm
02:48:02 <FreeFull> 2,011
02:48:23 <int-e> quintopia: no, bc was juxtaposition there. but we allowed leading zeros.
02:48:28 <FreeFull> I bet the ratio is actually something quite boring
02:48:29 <quintopia> oh
02:49:06 <FreeFull> Leading zeros make any number instantly splittable
02:50:35 <int-e> FreeFull: We treated 10 and 010 as different inputs in that analysis.
02:50:47 <int-e> 10 is not splittable; 010 is.
02:50:58 <FreeFull> Yep
02:51:03 <int-e> so we're really working with digit strings at the moment.
02:51:52 <FreeFull> The notion of splitting doesn't really work if you aren't working with digit strings
02:53:10 <FreeFull> 😶
02:53:21 <int-e> well, you can still forbid leading zeros in the input sequence and/or the parts of the output sequence.
02:53:48 -!- Sorella has quit (Quit: It is tiem!).
02:57:15 <FreeFull> You could
02:57:18 <FreeFull> It is a choice
02:57:32 <FreeFull> You could get rid of zeros altogether
02:59:06 -!- conehead has joined.
03:02:18 <Bike> i'm getting actual kernel panics fuuuuuck
03:03:15 <FreeFull> Some mathematician probably has already gone over this ages ago
03:03:25 <FreeFull> Bike: Could be just hardware failure
03:04:02 -!- ter2 has joined.
03:04:15 -!- tertu3 has joined.
03:04:51 -!- tertu3 has changed nick to tertu.
03:05:05 <quintopia> FreeFull: i actually think it's a new problem
03:05:33 <FreeFull> quintopia: I wouldn't be surprised if it isn't
03:05:54 <quintopia> no but who ever is?
03:06:05 <quintopia> cutting edge mathematicians i guess
03:08:28 -!- yorick has quit (Remote host closed the connection).
03:11:08 <int-e> > let v = foldl' (\n r -> n*10+r) 0;m = minimumBy (comparing sum);b [] = [[[]]];b xs = let b' = b (tail xs) in [v n : m t' | (n,t) <- zip (tail (inits xs)) b', let t' = filter (\t -> null t || v n <= head t) t, not (null t')] : b'; f = m . head . b . map (fromIntegral . digitToInt) . show in f 987654321
03:11:09 <lambdabot> [98,765,4321]
03:11:28 <int-e> > let v = foldl' (\n r -> n*10+r) 0;m = minimumBy (comparing sum);b [] = [[[]]];b xs = let b' = b (tail xs) in [v n : m t' | (n,t) <- zip (tail (inits xs)) b', let t' = filter (\t -> null t || v n <= head t) t, not (null t')] : b'; f = m . head . b . map (fromIntegral . digitToInt) . show in f 9876543210
03:11:29 <lambdabot> [9,87,654,3210]
03:11:47 <quintopia> is that a brute force search?
03:12:16 <int-e> > let v = foldl' (\n r -> n*10+r) 0;m = minimumBy (comparing sum);b [] = [[[]]];b xs = let b' = b (tail xs) in [v n : m t' | (n,t) <- zip (tail (inits xs)) b', let t' = filter (\t -> null t || v n <= head t) t, not (null t')] : b'; f = m . head . b . map (fromIntegral . digitToInt) . show in f 1212121212121212199
03:12:17 <lambdabot> [1,21,21,21,21,21,21,21,21,99]
03:12:21 <quintopia> ah
03:12:26 <int-e> > let v = foldl' (\n r -> n*10+r) 0;m = minimumBy (comparing sum);b [] = [[[]]];b xs = let b' = b (tail xs) in [v n : m t' | (n,t) <- zip (tail (inits xs)) b', let t' = filter (\t -> null t || v n < head t) t, not (null t')] : b'; f = m . head . b . map (fromIntegral . digitToInt) . show in f 1212121212121212199
03:12:27 <lambdabot> [1,2,12,121,212,1212,12199]
03:12:50 <int-e> No, it's the "natural" dynamic programming approach. So it's rather efficient.
03:13:34 <quintopia> not clear what the natural dynamic programming approach would be here
03:13:40 <quintopia> and i am shit at parsing haskell
03:14:45 <quintopia> explain?
03:18:54 <int-e> Well, we have this sequence d_i (1 <= i <= n) of digits that we somehow split into numbers. Assume that one of these numbers is d_(k..l). Then how to split d_(l+1)...d_n optimally does not depend on d_1..d_(k-1).
03:20:58 <FreeFull> @let splitOptimal = f where v = foldl' (\n r -> n*10+r) 0;m = minimumBy (comparing sum);b [] = [[[]]];b xs = let b' = b (tail xs) in [v n : m t' | (n,t) <- zip (tail (inits xs)) b', let t' = filter (\t -> null t || v n < head t) t, not (null t')] : b'; f = m . head . b . map (fromIntegral . digitToInt) . show
03:20:59 <lambdabot> .L.hs:152:62:
03:20:59 <lambdabot> No instance for (Show a0) arising from a use of `show'
03:20:59 <lambdabot> The type variable `a0' is ambiguous
03:20:59 <lambdabot> Possible cause: the monomorphism restriction applied to the following:
03:20:59 <lambdabot> splitOptimal :: a0 -> [Integer] (bound at .L.hs:143:1)
03:21:35 <FreeFull> @let splitOptimal :: Show a => a -> [Integer]; splitOptimal = f where v = foldl' (\n r -> n*10+r) 0;m = minimumBy (comparing sum);b [] = [[[]]];b xs = let b' = b (tail xs) in [v n : m t' | (n,t) <- zip (tail (inits xs)) b', let t' = filter (\t -> null t || v n < head t) t, not (null t')] : b'; f = m . head . b . map (fromIntegral . digitToInt) . show
03:21:36 <lambdabot> Defined.
03:21:46 <FreeFull> A bit hairy
03:22:04 -!- ter2 has quit (Quit: Leaving).
03:22:08 <FreeFull> > splitOptimal 100001
03:22:10 <lambdabot> [100001]
03:22:20 <FreeFull> > splitOptimal 101101
03:22:22 <lambdabot> [1,1101]
03:22:37 <FreeFull> > splitOptimal 101102
03:22:39 <lambdabot> [101,102]
03:22:40 <int-e> v n < head t <-- that's the strictly increasing version.
03:22:47 <lifthrasiir> > splitOptimal 31415926535897932
03:22:47 <FreeFull> Yep
03:22:48 <lambdabot> [31,41,59,265,3589,7932]
03:23:04 <FreeFull> It'd be nice to have some sort of proof it is optimal
03:23:08 -!- myndzi\ has changed nick to myndzi.
03:23:13 <int-e> > splitOptimal $ 2^100
03:23:14 <lambdabot> [1,2,6,76,506,22822,94014,96703,205376]
03:23:34 <int-e> trust me? ;-)
03:23:52 <lifthrasiir> > splitOptimal 10000000000000000000001
03:23:54 <lambdabot> [10000000000000000000001]
03:27:30 <FreeFull> > splitOptimal 0000032
03:27:32 <lambdabot> [32]
03:27:41 <FreeFull> I see, it just truncates the zeroes off
03:28:54 <int-e> @let splitOptimalS = f where v = foldl' (\n r -> n*10+r) 0;m = minimumBy (comparing sum);b [] = [[[]]];b xs = let b' = b (tail xs) in [v n : m t' | (n,t) <- zip (tail (inits xs)) b', let t' = filter (\t -> null t || v n < head t) t, not (null t')] : b'; f = m . head . b . map (fromIntegral . digitToInt)
03:28:55 <lambdabot> Defined.
03:29:23 <int-e> > splitOptimalS "000000000000001" -- hmm, it'll still drop zeros in the output.
03:29:24 <lambdabot> [0,1]
03:41:01 <int-e> quintopia: http://sprunge.us/fPSP works out a couple of steps of the dynamic programming idea.
03:42:33 <quintopia> int-e: no what little you explained is enough. it's kind of what i was thinking of anyway.
03:44:05 <quintopia> int-e: and the running time should be something like n^2?
03:45:37 <int-e> n^3, I think (for each pair 1 <= k < l <= n, we have up to n candidate lists to sift through. Oh and as implemented it's worse, because the sums of the list elements are not cached.)
03:47:56 <quintopia> int-e: it still looks like n^2 to me (not counting the recomputation of sums)
03:48:29 <quintopia> int-e: if it's n^3, what are the three dimensions of the "table"?
03:48:39 <int-e> quintopia: just look at the worked out example; there are O(n^2) rows, and each row has O(n) lists to consider.
03:48:51 <int-e> quintopia: there are only two dimensions, but computing each entry takes O(n) steps.
03:48:57 <quintopia> ah
03:49:55 <int-e> (Which I think can be reduced to O(log(n)) but that would be messy and require arrays, perhaps even mutable ones. So ... no.)
03:51:15 <quintopia> oh i see. n^3, but the coefficient is very low (like 1/3 maybe)
03:51:19 <quintopia> 1/6
03:52:10 <int-e> right.
03:53:42 <Sgeo> "ask for 11 numbers to be read into a sequence S"
03:53:46 <Sgeo> wtf is this shit? Groovy?
03:53:57 <Sgeo> I thought Groovy was supposed to be like a scripting Java
03:54:08 <myndzi> i feel slightly embarrassed every time i go to hang out in sda chat because i have ops and probably nobody knows why
03:54:08 <myndzi> lol
03:54:15 <Sgeo> Oh, that's from pseudocode describing an algorithm
03:54:16 <Sgeo> derp
03:54:28 <Bike> good job
03:55:28 <int-e> Pah. A program should not simply ask for numbers. It should beg, it should plead, it should grovel!
03:56:59 <int-e> YUCK. (x > 400 ? cout << "TOO LARGE" : cout << x) << endl
03:57:21 <int-e> Somebody really went out of their way to prove that C++ code would be shorter than C.
04:02:29 <FreeFull> Ugly
04:02:44 <Bike> << returns the stream?
04:02:46 <FreeFull> Unnecessary spaces though
04:02:48 <pikhq> x > 400 && puts("TOO LARGE"); // Like this?
04:02:52 <pikhq> Bike: Yes.
04:03:21 <int-e> Bike: yes. that's why std::cout << x << "," << y << std::endl; works.
04:03:26 <Bike> great
04:03:32 <FreeFull> pikhq: Doesn't output the x
04:04:27 <pikhq> FreeFull: Humbug.
04:05:00 <pikhq> x > 400 || printf("%d\n", x) && puts("TOO LARGE"); I think.
04:05:09 <FreeFull> Could be shorter
04:06:52 <int-e> pikhq: use ?:. printf returns the number of characters printed.
04:07:14 <int-e> So when x <= 400, that will print x and also TOO LARGE.
04:07:23 <pikhq> Good catch.
04:07:46 <FreeFull> You only need one printf and cleverness
04:07:58 <FreeFull> Not sure how much cleverness
04:08:19 <pikhq> Note that printf's arguments not matching the format spec is UB.
04:11:12 <int-e> And x was supposed to be a double.
04:12:33 <Bike> hm, there's nothing like sprintf except returning a new string. HOW UNFUNCTIONAL
04:12:51 <shachaf> Is there a standard definition of topological spaces that doesn't use weird set-theoretic concepts like "union" and "intersection" and "subset" but instead talks about monomorphisms and maybe pullbacks or something like that?
04:12:58 <shachaf> I guess maybe you could end up with the whole frame/topological system that Vickers talks about. But is there something more direct and closer to the classical definition?
04:13:19 <Bike> nice easy concepts like pullbacks
04:16:33 <shachaf> do you hate pullbacks
04:16:40 <Bike> no.
04:16:43 <int-e> I guess you could have A -> B if A \subset B. But why anybody would do that to a set of sets is beyond me.
04:17:43 <FreeFull> shachaf: homotopy theory? Not sure
04:21:22 <shachaf> int-e: What do you mean?
04:23:12 <shachaf> http://imogenquest.net/comics/2014-01-05-podbay.jpg
04:26:38 <Bike> that's such a dumb thing
04:27:27 <shachaf> should i see that movie
04:27:51 <shachaf> Bike: do you think there is virtue in distinguishing between one-element sets
04:28:32 <Bike> {4} and {7} seem pretty different?
04:28:50 <shachaf> but they're isomorphic...........
04:29:07 <shachaf> :'(
04:30:40 <shachaf> Bike: anyway look at section 1 of http://arxiv.org/pdf/1012.5647v3.pdf or something
04:31:01 <Bike> nahhhhh
04:31:45 <shachaf> h8r
04:31:47 <Bike> pst i'm not confident in basic category theory or actually anything
04:32:03 <shachaf> ok then look at http://arxiv.org/pdf/1212.6543v1.pdf
04:32:19 <shachaf> it doesn't even talk about categories
04:32:32 <Bike> i've read that and whyyyy do you direct link the pdfs :(
04:32:44 <shachaf> because that's what i have open in my browser??
04:34:12 -!- conehead has quit (Quit: Computer has gone to sleep.).
04:36:13 -!- mauke has quit (Disconnected by services).
04:36:23 -!- mauke has joined.
04:37:35 -!- preflex has quit (Ping timeout: 245 seconds).
04:39:51 <shachaf> Bike: you have a zillion pdfs, right
04:39:54 <shachaf> how do you keep track of them
04:39:56 -!- preflex has joined.
04:40:33 <shachaf> also i thought you knew all of maths??
04:41:27 <Bike> vague categorizations and spite
04:41:39 <Bike> i only know the maths marked with an orange sticker
04:41:50 <shachaf> what does the orange sticker mean
04:42:37 <Bike> orange stickers mark literature for fourth grade readers
04:42:48 <shachaf> oh
04:52:09 <Bike> is installing a linux on a hard drive from a linux on a different hard drive in the same computer a sane thing to want to do
04:52:32 <shachaf> i've done that
04:52:34 <shachaf> why not
04:52:40 <Bike> k
04:52:51 <Bike> though i don't know how to do it.
04:53:16 <shachaf> linuxfromscratch.org hth
04:53:25 <shachaf> anyway, some distributions make it easier than others
04:54:04 <shachaf> so it depends on what you're installing
04:55:18 <Bike> arch or debian i guess
04:55:50 <shachaf> https://wiki.archlinux.org/index.php/Hard_Disk_Installation http://www.debian.org/releases/stable/i386/ch04s04.html.en hth
04:55:56 <shachaf> or something
04:56:04 <Bike> thx
04:57:06 <Bike> this seems like i'll probably fuck it up
04:57:24 <shachaf> and then you can fix it, learning all around
04:58:12 <shachaf> remember the time when i wanted grub in the mbr so i did dd if=/dev/hda4 of=/dev/hda bs=512 count=1
04:58:36 <shachaf> i even made a backup in my home directory first in case something got messed up, how helpful
05:00:07 <shachaf> (the joke is that the partition table is stored in the mbr, as i discovered that day)
05:00:30 <shachaf> this is the worst sound of all sounds: http://www.youtube.com/watch?v=Z5h411OcttA
05:00:36 <Bike> good effort
05:01:26 <Bike> having an install fail by the usb inexplicably not working during boot sucks
05:04:20 -!- zzo38 has joined.
05:04:51 -!- gully_foil_Ja has quit (Ping timeout: 276 seconds).
05:21:06 -!- LinearInterpol has quit (Ping timeout: 276 seconds).
05:35:42 -!- tromp_ has quit (Remote host closed the connection).
05:36:15 -!- tromp has joined.
05:40:30 -!- tromp has quit (Ping timeout: 245 seconds).
05:48:51 <Sgeo> http://www.yopmail.com/en/alternate-email-address.php I somehow doubt this is secure
05:49:12 <Sgeo> Would have to check the code to see if it looks reasonable
05:49:16 <Sgeo> Which doesn't mean it is
05:51:14 <Sgeo> Sends the typed email over to the server to convert it, I think
05:56:11 <Jafet> Just PCI passthrough and virtualize everything with dom0 snapshot unicycle.
05:57:16 <Jafet> Huh, youtube now hosts 4 GB videos.
06:02:24 <Jafet> Sgeo: yeah they can read your email, huge vulnerability
06:03:06 <Sgeo> The question is, if random person X can get the real email address from the alias
06:03:17 <shachaf> How does translation from lambda calculus to B,C,K,W (<https://en.wikipedia.org/wiki/BCKW>) work?
06:03:33 <Jafet> Depends on the distribution of X, but unlikely.
06:03:52 <Bike> translate to ski and then translate ski to bckw, oooooooobviously
06:04:13 <Bike> tht's pronounced with an 'oo' like 'cool'
06:05:53 <shachaf> thx
06:06:03 <shachaf> is there something nice and structural like ski
06:06:14 <Bike> structural?
06:08:13 <shachaf> who knows what i mean
06:09:12 <shachaf> ok jstor i'm not going to pay you $24 for curry's thesis from 1930 which is in german so i won't even be able to read it
06:14:39 <Bike> huh, zsh puts the return code of the last call just before your line
06:15:17 <shachaf> you can get that in bash too
06:15:45 <shachaf> just put $? in your PS1
06:15:57 <Bike> gosh.
06:16:57 <Jafet> Does zsh even do that "by default"?
06:21:25 <Bike> i don't know, the install thingie is, that's all i know
06:36:25 <zzo38> Now I added into HWPL, some new functions such as TAKE and PHYSICAL, and a few other things. I also made up a file of examples, although maybe it contains some errors, since it isn't tested.
06:44:35 -!- Bike has quit (Ping timeout: 265 seconds).
06:46:16 -!- Bike has joined.
07:11:46 <zzo38> Do you like these kind of codes? FOR ?X IN ?ADDRESS BITS: BEGIN LOCAL .REG; REGISTER .REG(?DATA); CONNECT .REG TO .DATA WHEN .READ&~|(?X^.ADDRESS); LATCH .WRITE&~|(?X^.ADDRESS) SET .REG TO .DATA; END Maybe it is wrong or inefficient or something though, but it is trying to implement RAM. Also, use of TAKE and unary % operation will be like: CONNECT TAKE(MUX(%.S,{%.I1,%.I0}))&~-./E TO .Y;
07:12:53 <Bike> that is ugly as fuck.
07:13:08 <zzo38> To you it is!
07:14:56 <zzo38> You must hate it a lot, but I find it better. Maybe there is other feature other people hate of other hardware programming languages too; it is one reason why other people try to invent more possible hardware programming languages, isn't it?
07:15:23 <Bike> i don't mean the content, i'm just saying, that has fucking "&~|(?X^." in it, that is some fucked shit.
07:15:41 <zzo38> You can space it out more if you prefer.
07:16:15 <zzo38> The individual tokens there will be .WRITE & ~ | ( ?X ^ .ADDRESS )
07:18:12 <zzo38> Do you prefer it this way?
07:20:41 <zzo38> Is the purpose of these commands clear from the example, or not? If not, you can ask for clarification, please.
07:21:38 -!- impomatic has joined.
07:26:46 -!- tromp__ has quit (Remote host closed the connection).
07:27:10 -!- tromp__ has joined.
07:27:32 -!- FreeFull has quit.
07:31:17 -!- ^v has quit (Quit: http://i.imgur.com/MHuW96t.gif).
07:35:27 <Sgeo> http://www.cnn.com/2014/01/06/tech/california-crop-circle-hoax/index.html?hpt=hp_t2
07:35:31 <Sgeo> Isn't that... vandalism?
07:35:47 <kmc> I'm alive... I'm alive.. I'm alive... and how I know it... but for chips and for freedom I could die
07:42:39 <Sgeo> http://dilbert.com/strips/comic/1991-04-24/
07:48:14 -!- myndzi has changed nick to 2JTAAB023.
07:48:18 -!- qlkzy has joined.
07:48:18 -!- myndzi has joined.
07:48:18 -!- CADD has joined.
07:48:57 <Sgeo> "So Nvidia is marketing this new chip to braille users? This way blind people can see computer graphics more clearly with vivid colors. It turned out to be a public service announcement. Mystery solved!"
08:03:02 <Sgeo> http://en.wikipedia.org/wiki/Zooko%27s_triangle
08:03:08 <Sgeo> I'm not used to thinking of this as disproved
08:10:22 -!- Bike has quit (Quit: loud).
08:24:19 <zzo38> Which instructions sets would include a triple-indirect-jump-with-post-increment instruction?
08:30:31 <quintopia> none
08:32:54 <ais523> zzo38: [[[ax]++]]?
08:33:26 <zzo38> ais523: Yes, like that
08:34:02 <ais523> I can't think of an instruction set that would allow that, but not arbitrary combinations of addressing modes
08:38:42 <Sgeo> Kind of bothers me that all .bit registrations are browsable
08:38:56 <Sgeo> Doesn't DNS attempt to deliberately prevent browsing of all registrations?
08:39:00 <Sgeo> Or am I mistaken?
08:39:25 <ais523> hmm… I think there's a much simpler Zooko's triangle solution
08:39:37 <ais523> in particular, the web-of-trust that's used for public keychains
08:40:04 <ais523> it's obviously decentralized, it's secure in that you know exactly how much you trust each individual entry
08:40:27 <ais523> and it's memorable in that the keys are associated with human-readable names, and you can adopt the name associations listed by people you trust
08:41:22 <elliott> ais523: that's not a global naming system
08:41:32 <elliott> making names relative is one way of squaring the triangle
08:41:51 <ais523> elliott: hmm, the description doesn't imply "global"
08:41:53 <elliott> plus, there's no way of going name -> key uniquely
08:42:02 <ais523> and there is relative to any particular person
08:42:10 <elliott> I guess the "name" would be an IP
08:42:14 <ais523> because you can't adopt two name→key mappings with different names
08:42:16 <Sgeo> "Each application type that want to store data associated with an identity must be added in the registered applications list with a description on how data will be formatted."
08:42:20 <elliott> but then it fails human-readable (because key identifiers are not human readable)
08:42:27 <Sgeo> How decentralized
08:42:34 <ais523> I guess my goalposts are in different places from yours
08:42:55 <elliott> well, I don't even quite understand what you're proposing or how it's even a naming system I guess :/
08:44:04 <ais523> I didn't realise that the article was about naming systems
08:50:57 <Sgeo> Delegate your domain and subdomains to DNS servers:
08:50:57 <Sgeo> Recommended :
08:50:57 <Sgeo> {"ns": ["ns0.web-sweet-web.net", "ns1.web-sweet-web.net", "ns0.xname.org"]}
08:51:09 <Sgeo> uh.... so basically, point to normal DNS?
08:52:10 <fizzie> I don't think "DNS" itself really attempts to prevent browsing of all entries, though maybe the DNSSEC no-enumeration NSEC3 stuff counts.
08:52:22 <fizzie> (Common DNS deployment practices do, sure.)
08:52:53 -!- ais523 has quit.
08:53:11 <fizzie> Are .pif files still alive in some shape or form? (Sure it's relevant.)
08:56:22 <mroman> fizzie: I think so.
08:56:31 <mroman> Though they should not work on windows 64-bit anymore
08:56:55 <mroman> and as far as I know windows 32 bit requires you to enable a feature to execute 16bit programs
08:57:05 <mroman> but 64bit versions don't ship with support for 16bit programs anymore
08:57:20 <zzo38> So you should need an emulator, I suppose, in such a case.
08:57:26 <mroman> and by windows 32 bit I mean windows >= 7 perhaps?
08:57:39 <mroman> windows xp executes 16bit programs by default
08:58:57 <mroman> although
08:59:02 <mroman> PIF's aren't really executables
08:59:37 <Sgeo> Ooh, I should try to get Microsoft Ants working in VM
08:59:44 <Sgeo> I miss Ants
09:00:10 <Sgeo> It's to blame for my habit of saying ??? when I'm confused (I did eventually drop that habit)
09:00:57 <mroman> Can PIFs point to 32/64bit programs?
09:03:05 <fizzie> Interweb is saying that 32-bit Windows 8 still makes a .pif file if you try to make a shortcut to a 16-bit DOS executable.
09:04:03 <mroman> Ok.
09:04:23 <mroman> Windows 64bit might still do that without being able to actually run a 16bit program
09:04:44 <mroman> which would not be really helpful at all
09:05:16 <mroman> hm
09:05:21 <mroman> where can I see if I have Win64?
09:05:36 <mroman> ah there
09:05:38 <mroman> SysWOW64
09:05:39 <mroman> ok
09:06:39 <mroman> well.
09:06:53 <mroman> rightclick -> create shortcut on a .com-file does not work
09:07:04 <mroman> but I just created an empty txt file and renamed it to com
09:28:06 -!- oklopol__ has changed nick to oklopol.
09:28:15 <oklopol> so i did some google searching with python
09:28:30 <oklopol> and apparently google banned me forever (except if i use chrome)
09:28:54 <oklopol> i did a search every minute or so, and when the search failed i added another minute
09:29:15 <fizzie> That's what they have APIs for.
09:29:25 <b_jonas> ioccc winning sources are released
09:29:33 <oklopol> yeah i didn't find it
09:29:35 <fizzie> b_jonas: See: topic.
09:29:38 <b_jonas> yeah
09:29:41 <oklopol> i found apis for everything but search
09:29:50 <b_jonas> yay
09:29:55 <oklopol> well i mean i found one
09:29:56 <fizzie> oklopol: Why didn't you... Google for it.
09:30:08 <oklopol> but it seemed too hard to use
09:30:18 <oklopol> pygoogle was much easier
09:30:56 <fizzie> "Don’t misuse our Services. For example, don't -- try to access them using a method other than the interface and the instructions that we provide."
09:30:59 <fizzie> It's what they say.
09:31:30 <oklopol> are you talking about the deprecated one?
09:31:33 <oklopol> or which one
09:31:52 <mroman> Fun fact: If you desperately google for something
09:31:54 <mroman> they'll ban you too
09:32:06 <oklopol> the custom search they link looked more like something that lets you put a search box on your website
09:32:21 <mroman> I got banned googlig (manually) for about 10 minutes.
09:32:56 <mroman> oklopol: Ban forever?
09:33:14 <oklopol> well obviously i haven't checked that
09:33:22 <mroman> Yes, obviously
09:33:37 <mroman> but I thought they give you the chance to answer a captcha
09:33:56 <oklopol> probably, i don't know what's going on because i'm using pygoogle
09:33:59 <mroman> to prove that your not some bot.
09:33:59 <oklopol> and i don't know what it does
09:34:05 <mroman> *you're
09:34:11 <fizzie> oklopol: That may be what it looks like, but it has the https://developers.google.com/custom-search/json-api/v1/overview half.
09:35:17 <fizzie> (Also the "custom search box" side is not only for "search my site only", but also "make a topical search engine that rewrites queries" or whatnot.)
09:35:23 <oklopol> if it comes out as json then it's already a million times harder than pygoogle
09:35:35 <oklopol> but perhaps doable
09:36:17 <b_jonas> C and C++ have so crazy corners
09:37:53 <oklopol> wow that sounds complicated
09:38:15 <oklopol> i have used an api key thingie once but it was php so i could just copypaste stuff
09:39:20 -!- zzo38 has quit (Ping timeout: 260 seconds).
09:40:12 <oklopol> For smaller sites, Google Site Search starts at just $100 for up to 20,000 annual searches. For usage above one million searches, enterprise-level support and offline purchasing are available.
09:40:27 <oklopol> 20000 annual ones is 100 dollars?
09:40:39 -!- zzo38 has joined.
09:40:41 <oklopol> i need to do 1400 queries, i figured that's nothing
09:40:50 <fizzie> GSS is a whole another thing than CSE, though.
09:40:54 <oklopol> i know, but still
09:41:24 <fizzie> "For CSE users, the API provides 100 search queries per day for free. If you need more, you may sign up for billing in the Cloud Console. Additional requests cost $5 per 1000 queries, up to 10k queries per day."
09:42:40 <fizzie> What's this "pygoogle" anyway? The first hit I get just goes "Unfortunately, Google no longer supports the SOAP API for search, nor do they provide new license keys. In a nutshell, PyGoogle is pretty much dead at this point", and the second and third ones seemed to be using the deprecated-but-still-working web search APIs. (Which I think has just a "50 queries per day without an API key" limit ...
09:42:46 <fizzie> ... and no more complicated bans than that.)
09:43:19 <oklopol> pygoogle is what i found by searching for python google search
09:43:22 <oklopol> consistently
09:43:41 <oklopol> also xgoogle and some other thing but someone somewhere said they don't work anymore so i didn't try them
09:44:03 <fizzie> There's also the https://developers.google.com/api-client-library/python/start/get_started thing.
09:44:28 <oklopol> apparently i never found the page that's the first hit with "pygoogle"
09:44:33 <oklopol> (i never searched for pygoogle)
09:45:14 <fizzie> (The official Google-provided Python thing does seem to list Custom Search as one of their supported APIs. But it does have that 100-queries-a-day limit if you want it to be entirely free.)
09:45:37 <oklopol> that looks like i need to spend hours decrypting it
09:46:05 <oklopol> pygoogle was more like import pygoogle and a = pygoogle.search(url).number_or_results()
09:46:12 <oklopol> but yeah i guess i need to do that
09:46:13 <oklopol> asdsad
09:46:35 <oklopol> money is not an issue, but yeah paying is a bit too complicated
09:47:13 <fizzie> The "Simple API example" code is not really all that more complicated.
09:48:02 <fizzie> And it's also not terribly complicated to make a "project" in their "console"; I did that once for their big-data query-executing thingamajick.
09:49:19 <fizzie> (Though I admit they could provide more "anonymous access is supported with one query per minute" kind of features.)
09:49:43 <oklopol> it's probably not complicated once you get it, but understanding apis and such is the hardest thing in the world
09:49:47 <oklopol> (for me)
09:50:13 <fizzie> (It's not like they'd notice that in their flood of search requests via the web interface, and nobody's going to be building a Real Service on something like that, hopefully.)
09:50:40 <oklopol> yeah basically my hope was that they wouldn't mind me slowly querying over the night
09:51:13 <fizzie> You should've probably just used something that crawls the web interface for that. :p
09:51:46 <fizzie> They got (in 2013), on average, 5922000000 requests per day.
09:52:15 <oklopol> i considered that, but again that sounded a bit complicated
09:52:55 <oklopol> especially as i'm on linux and i have no idea how the api works (or whatever it's called)
09:53:36 <fizzie> gcolor used to just use the web interface of Google image search, because they didn't have a programmatic API for it at the time.
09:54:29 <fizzie> Actually, I'm not sure if they do have one now either.
09:55:26 <fizzie> Apparently, since that, they made one and deprecated it already, then spent some more time API-less, then added image search functionality in the Custom Search thing.
09:58:15 <oklopol> i tried to make an api key and now i made a client id and have no idea how to make an api key
09:58:31 <oklopol> and i have no idea what a client id is
09:59:30 <fizzie> Apparently it's for those things that require authentication.
09:59:47 <fizzie> I don't think the custom search one does.
10:02:00 <fizzie> From what I recall, the "workflow" is such that you get in the google cloud service buzzword developer console, make a "project", go to "APIs" and toggle the ones you want to use "on", then go to "credentials" and select the "Public API access" one (and not the "OAuth Client ID" one).
10:02:49 <fizzie> I think I need to go meet some relatives now.
10:03:02 <oklopol> have fun
10:03:05 <oklopol> i need to do the same soon
10:06:54 <ion> http://www.machinadynamica.com/machina31.htm
10:25:04 -!- Sorella has joined.
10:51:00 -!- MindlessDrone has joined.
11:13:13 -!- ter2 has joined.
11:16:18 -!- tertu has quit (Ping timeout: 240 seconds).
11:22:19 -!- nortti has changed nick to yesrtti.
11:22:39 -!- yesrtti has changed nick to nortti.
11:24:47 -!- heroux has quit (Ping timeout: 260 seconds).
11:33:29 -!- tertu3 has joined.
11:36:50 -!- ter2 has quit (Ping timeout: 246 seconds).
11:40:46 -!- Phantom_Hoover has joined.
11:42:37 -!- jix has quit (Remote host closed the connection).
11:42:44 -!- jix has joined.
11:49:12 -!- ter2 has joined.
11:53:03 -!- tertu3 has quit (Ping timeout: 276 seconds).
11:53:45 -!- atrapado has quit (Quit: Bye).
12:09:19 -!- LinearInterpol has joined.
12:35:46 -!- tertu3 has joined.
12:35:47 -!- ter2 has quit (Read error: Connection reset by peer).
12:46:18 -!- heroux has joined.
12:51:53 -!- tertu3 has quit (Read error: Connection reset by peer).
12:55:06 -!- Slereah_ has quit (Read error: Connection reset by peer).
12:55:26 -!- Slereah has joined.
13:21:02 <Taneb> `? arrows
13:21:06 <HackEgo> arrows? ¯\(°​_o)/¯
13:21:21 <Taneb> `learn arrows are just strong monads in the category of profunctors
13:21:26 <HackEgo> I knew that.
13:21:33 <Taneb> `? arrow
13:21:36 <HackEgo> arrows are just strong monads in the category of profunctors
13:21:42 <Taneb> `learn Arrows are just strong monads in the category of profunctors
13:21:47 <HackEgo> I knew that.
13:34:37 -!- Sgeo has quit (Read error: Connection reset by peer).
13:37:06 -!- Chillectual has joined.
13:40:21 -!- LinearInterpol has quit (Ping timeout: 248 seconds).
13:57:13 -!- boily has joined.
14:04:32 -!- upgrayeddd has quit (Ping timeout: 272 seconds).
14:07:29 -!- upgrayeddd has joined.
14:08:17 -!- Chillectual has changed nick to LinearInterpol.
14:08:29 -!- boily has quit (Quit: Poulet!).
14:08:42 -!- conehead_ has joined.
14:23:36 -!- conehead_ has quit (Changing host).
14:23:37 -!- conehead_ has joined.
14:23:37 -!- conehead_ has quit (Changing host).
14:23:37 -!- conehead_ has joined.
14:29:21 -!- atrapado has joined.
14:37:42 -!- conehead has joined.
14:40:46 -!- oerjan has joined.
14:44:42 -!- conehead has quit (Quit: Computer has gone to sleep.).
14:45:05 -!- yorick has joined.
15:01:55 -!- MindlessDrone has quit (Quit: MindlessDrone).
15:15:09 -!- mrhmouse has joined.
15:15:30 -!- atrapado has quit (Quit: Leaving).
15:25:52 -!- llamavioleta has joined.
15:43:32 <oerjan> `? monad
15:43:34 <HackEgo> Monads are just monoids in the category of endofunctors.
15:43:41 <oerjan> `? endofunctor.
15:43:42 <HackEgo> endofunctor.? ¯\(°​_o)/¯
15:43:44 <oerjan> `? endofunctor
15:43:46 <HackEgo> Endofunctors are just endomorphisms in the category of categories.
15:43:46 <LinearInterpol> lol.
15:43:52 <oerjan> `? arrow
15:43:54 <HackEgo> Arrows are just strong monads in the category of profunctors
15:44:05 <oerjan> `run sed -i 's/$/./' wisdom/arrow
15:44:09 <HackEgo> No output.
15:44:11 <oerjan> `? arrow
15:44:13 <HackEgo> Arrows are just strong monads in the category of profunctors.
15:44:42 <oerjan> Taneb: YOU JUST CANNOT PLEASE US, GIVE UP
15:46:05 -!- llamavioleta has quit (Quit: IRcap 8.71 ).
15:49:59 <oerjan> `run echo nixon | grep '/bu|[rn]t|[coy]e|[mtg]a|j|iso|n[hl]|[ae]d|lev|sh|[lnd]i|[po]o|ls/'
15:50:00 <HackEgo> No output.
15:50:24 <oerjan> `run echo clinton | grep '/bu|[rn]t|[coy]e|[mtg]a|j|iso|n[hl]|[ae]d|lev|sh|[lnd]i|[po]o|ls/'
15:50:26 <HackEgo> No output.
15:50:33 <oerjan> oh oops
15:50:41 <oerjan> `run echo nixon | grep 'bu|[rn]t|[coy]e|[mtg]a|j|iso|n[hl]|[ae]d|lev|sh|[lnd]i|[po]o|ls'
15:50:42 <HackEgo> No output.
15:50:50 <oerjan> `run echo clinton | grep 'bu|[rn]t|[coy]e|[mtg]a|j|iso|n[hl]|[ae]d|lev|sh|[lnd]i|[po]o|ls'
15:50:51 <HackEgo> No output.
15:51:19 <oerjan> wait.
15:51:29 <oerjan> i think munroe is bullshitting.
15:51:35 <mrhmouse> You think? :P
15:52:14 <oerjan> mrhmouse: i only started checking because i vaguely recalled nixon was _both_ a president and an opponent.
15:52:53 -!- nooodl has joined.
15:53:27 <mrhmouse> oerjan: I didn't know that! Either way, the regex doesn't contain an 'x' (so Nixon is right out). It's also missing an 'ob', so the current president is out as well.
15:53:29 <oerjan> `run echo test | grep 'e|a'
15:53:30 <HackEgo> No output.
15:53:34 <oerjan> oops
15:53:53 <oerjan> `run echo nixon | egrep 'bu|[rn]t|[coy]e|[mtg]a|j|iso|n[hl]|[ae]d|lev|sh|[lnd]i|[po]o|ls'
15:53:54 <HackEgo> nixon
15:54:01 <mrhmouse> !!!
15:54:06 <oerjan> ok i was just doing something wrong
15:54:08 <Taneb> :(
15:54:30 <oerjan> Taneb: you got closer than usual, i admit
15:54:46 <Taneb> Maybe next time I'll get there
15:54:52 <mrhmouse> oerjan: am I missing something about that regex, or are my eyes just too tired to read it properly?
15:54:54 <oerjan> `run echo obama | egrep 'bu|[rn]t|[coy]e|[mtg]a|j|iso|n[hl]|[ae]d|lev|sh|[lnd]i|[po]o|ls'
15:54:55 <HackEgo> obama
15:55:08 <oerjan> mrhmouse: it's not anchored at the ends, might be it.
15:55:19 <Taneb> `run echo romney | egrep 'bu|[rn]t|[coy]e|[mtg]a|j|iso|n[hl]|[ae]d|lev|sh|[lnd]i|[po]o|ls'
15:55:21 <HackEgo> No output.
15:55:22 <mrhmouse> Ahhh, it's only partially matching.
15:55:22 <oerjan> `run echo kerry | egrep 'bu|[rn]t|[coy]e|[mtg]a|j|iso|n[hl]|[ae]d|lev|sh|[lnd]i|[po]o|ls'
15:55:24 <HackEgo> No output.
15:56:04 <Taneb> `run echo abbott | egrep 'bu|[rn]t|[coy]e|[mtg]a|j|iso|n[hl]|[ae]d|lev|sh|[lnd]i|[po]o|ls'
15:56:05 <HackEgo> No output.
15:56:07 <Taneb> HMMM
15:56:19 <Taneb> Conclusion: Tony Abbott isn't president of the US
15:56:25 <mrhmouse> `run echo obama | egrep -o 'bu|[rn]t|[coy]e|[mtg]a|j|iso|n[hl]|[ae]d|lev|sh|[lnd]i|[po]o|ls'
15:56:26 <HackEgo> ma
15:56:32 <mrhmouse> Yeah, that's what I was missing.
15:59:29 <oerjan> `run echo carter | egrep 'bu|[rn]t|[coy]e|[mtg]a|j|iso|n[hl]|[ae]d|lev|sh|[lnd]i|[po]o|ls'
15:59:30 <HackEgo> carter
15:59:56 <oerjan> he of course was also an opponent, since he lost to reagan. iirc.
16:04:10 <Taneb> Didn't Nixon lose to Kennedy?
16:04:24 <oerjan> yes that's what i was remembering
16:05:56 -!- FreeFull has joined.
16:19:49 <quintopia> there are quite a number of presidents who were also opponents, so i imagine the list of "don't match" strings is a good bit shorter
16:21:46 <oerjan> `run echo ford | egrep 'bu|[rn]t|[coy]e|[mtg]a|j|iso|n[hl]|[ae]d|lev|sh|[lnd]i|[po]o|ls'
16:21:47 <HackEgo> No output.
16:21:53 <oerjan> pointed out on forum
16:22:08 <oklopol> asdasd
16:22:42 <oerjan> (the only one who was an opponent, a president, but never elected as one)
16:34:01 <quintopia> makes sense
16:39:37 -!- oerjan has quit (Quit: Gerald Fnord).
16:59:12 -!- LinearInterpol has quit (Ping timeout: 276 seconds).
17:04:50 <mroman> Can HackEgo pipe to haskell?
17:04:56 <mroman> somehowe
17:04:59 <mroman> -e
17:06:08 -!- Sprocklem has joined.
17:06:33 -!- fungot has quit (Ping timeout: 252 seconds).
17:07:35 -!- fizzie has quit (Ping timeout: 245 seconds).
17:10:47 -!- fizzie has joined.
17:15:10 -!- Slereah_ has joined.
17:16:06 -!- Slereah has quit (Ping timeout: 276 seconds).
17:45:01 -!- atrapado has joined.
17:50:43 -!- LinearInterpol has joined.
18:15:15 -!- tswett has joined.
18:23:48 -!- mrhmouse has quit (Read error: Connection reset by peer).
18:26:03 -!- Picky_Nurse has joined.
18:26:35 -!- Picky_Nurse has left.
18:27:17 <tswett> Here's a language for you.
18:27:21 <tswett> The program is a graph.
18:27:55 <tswett> The memory state consists of a coloring of its nodes black or white. Initially, all nodes are black.'
18:28:34 <tswett> One execution step consists of nondeterministically selecting a node that's the same color as a majority of its neighbors, and flipping its color.
18:28:44 <tswett> Execution halts when there are no longer any such nodes.
18:29:00 -!- conehead has joined.
18:29:25 <tswett> ("A majority", as always, means "more than half".)
18:37:47 -!- MindlessDrone has joined.
18:38:49 <coppro> tswett: nondeterministically as in a nondeterminisitc automaton, or as in random?
18:39:52 <tswett> Let's say nondeterministic as in "unspecified behavior".
18:40:01 <tswett> Which, I suppose, isn't necessarily nondeterministic at all.
18:42:33 <coppro> I mean does it pick an ideal path, or just according to some probability distribution/
18:43:55 <tswett> A valid implementation can use any method to select the node. In particular, it doesn't have to pick an ideal path.
18:46:55 <coppro> ok
18:47:08 <coppro> i.e. assume it's adversarial
18:48:28 <FreeFull> tswett: How would that be used to commpute things?
18:48:31 <FreeFull> compute*
18:49:33 <coppro> FreeFull: you would have to ensure that every possible path gives you a useful result
18:49:36 <coppro> this may be tricky...
18:50:04 <tswett> I'm trying to think how you could propagate a signal, like you'd have to in a CA.
18:50:47 <coppro> tswett: undirected graph?
18:50:52 <tswett> coppro: yeah.
18:51:32 <coppro> the problem I see is fanning out
18:51:40 -!- mrhmouse has joined.
18:51:42 <coppro> once you have that you can propagate an arbitrary distance by shrinking at each step
18:52:06 <coppro> reuse is also a problem. I don't see how most components would reset
18:52:27 <tswett> Yeah, I don't immediately see how you could make something that continues running forever.
18:54:12 <FreeFull> I don't think this is turing complete
18:58:24 <myname> i like the idea
18:58:53 <myname> i would however force it to be deterministic
19:00:55 <tswett> Using a directed graph instead would make this a lot easier.
19:01:15 <tswett> I think you could construct logic gates pretty trivially.
19:01:31 <myname> you start getting near petri nets now
19:02:10 <tswett> Oh, that reminds me. Petri nets of song lyrics would look pretty cool.
19:02:31 <myname> what?
19:03:14 <tswett> A Petri net where each transition is labeled with a fragment of a song's lyrics.
19:03:43 <myname> which should do wat?
19:03:45 <tswett> The Petri net executes deterministically (because there's only one possible execution path), and the order of execution produces the song's lyrics.
19:05:27 <tswett> So, imagine a net with three places, A, B, and C. Initially, A has 11 tokens, B has none, and C has I-dunno-a-bunch.
19:06:04 <tswett> There's a transition labeled "NAH" taking one token from A and putting one token in B. Then there's a transition labeled "HEY JUDE" taking 14 tokens from B and one from C, and putting one in A.
19:06:14 -!- Sprocklem has quit (Ping timeout: 264 seconds).
19:06:15 <tswett> s/14/11/
19:06:27 <tswett> The result is that you get "NAH NAH NAH NAH NAH NAH NAH NAH NAH NAH NAH HEY JUDE" a bunch of times.
19:11:22 <coppro> tswett: I'm not sure a directed graph is TC. I'm still unsure about how resets would work
19:11:29 <coppro> actually, you might be able to get away with this
19:11:56 <coppro> NAND and FANOUT are all you need for TC, right?
19:12:10 <coppro> or AND, OR, NOT, FANOUT?
19:12:20 <coppro> FANOUT is trivial, so that's easy
19:12:47 -!- Sprocklem has joined.
19:12:56 <coppro> oh wait, just need AND and NOT since that gets NAND
19:13:01 <tswett> You can make NOT just by doing FANOUT to two and having both of them point at another node.
19:13:02 <coppro> AND is also easy, which just leaves NOT
19:13:11 <coppro> tswett: wha?
19:13:18 <coppro> oh I completely forgot the semantics
19:13:20 <coppro> wow, yeah
19:13:25 <coppro> with directed graphs it's easily TC
19:14:23 <int-e> @doc System.IO
19:14:23 <lambdabot> http://haskell.org/ghc/docs/latest/html/libraries/base/system-io.html
19:15:13 -!- Bike has joined.
19:16:31 -!- lambdabot has quit (Quit: updating).
19:16:53 -!- rodgort` has quit (Ping timeout: 248 seconds).
19:18:34 -!- rodgort has joined.
19:20:33 -!- lambdabot has joined.
19:20:36 <int-e> @doc System.IO
19:20:41 <lambdabot> http://haskell.org/ghc/docs/latest/html/libraries/base/System-IO.html
19:21:39 <tswett> So, how am I going to make this Petri net...
19:25:23 <tswett> Some fragments, like "HEY JUDE", are used all over the place. So I'd probably just have a "HEY JUDE 'in' place" and a "HEY JUDE 'out' place", and the HEY JUDE transition just takes from one and puts in the other, and... yeah.
19:40:30 -!- conehead has quit (Quit: Computer has gone to sleep.).
19:50:51 <quintopia> are you writing a petri program that prints the hey jude lyrics
19:55:45 -!- 2JTAAB023 has quit (Ping timeout: 252 seconds).
19:55:51 <tswett> I was, and then I got bored.
19:57:45 -!- myndzi\ has joined.
20:01:59 -!- Slereah has joined.
20:03:33 -!- rodgort has quit (Ping timeout: 240 seconds).
20:03:34 -!- Slereah_ has quit (Ping timeout: 240 seconds).
20:05:04 -!- rodgort has joined.
20:32:38 -!- AnotherTest has joined.
20:46:30 -!- MindlessDrone has quit (Quit: MindlessDrone).
20:48:27 <shachaf> kmc: you can't look up anything from this book on the google without finding spoilers :'(
20:50:31 -!- Sprocklem has quit (Ping timeout: 246 seconds).
20:59:30 <ion> How to Fix a Guitar http://youtu.be/glxAKmY8p1k
21:02:03 -!- conehead has joined.
21:02:51 <Phantom_Hoover> shachaf, spoilers are overrated
21:07:05 <ion> http://www.techdirt.com/articles/20140106/00442525768/fbi-admits-its-not-really-about-law-enforcement-any-more-ignores-lots-crimes-to-focus-creating-fake-terror-plots.shtml
21:10:52 <int-e> Ah, national security theater
21:11:50 <int-e> I can't even blame them much ... the easiest way to find a terrorist plot is to make one up yourself.
21:13:10 -!- Oj742 has joined.
21:18:26 -!- Sprocklem has joined.
21:23:29 <b_jonas> I just filed my second bug report to gcc ever.
21:24:06 <b_jonas> I think that counts as esoteric programming work because it needed some abuse of the C++ language.
21:24:36 <mauke> gcc has an asm injection bug
21:25:16 <b_jonas> mauke: what?
21:25:26 <Bike> joke failures
21:25:32 <b_jonas> mauke: do you mean the old one that involves strange filename for #line directives?
21:25:45 <mauke> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52554#c3
21:26:31 <b_jonas> ah...
21:26:32 <b_jonas> mauke: nice
21:27:57 <b_jonas> the starting dollar marks an immediate number there in the assembler, right?
21:28:01 <mauke> yes
21:28:07 <b_jonas> gcc should quote or mangle it, or reject it
21:28:28 <b_jonas> I agree it's a bug if it doesn't do any of those
21:28:48 <b_jonas> and yes, that counts as suitably esoteric as well
21:30:12 <mauke> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20140 this one was reported in 2005 and fixed in 2012
21:30:31 -!- Oj742 has quit (Ping timeout: 265 seconds).
21:32:55 <b_jonas> I'll now try to understand the C++ overloading rules to figure out whether I can reproduce the crazyness I want without variadic functions and preferably without templates
21:34:07 <mauke> what craziness is this?
21:35:26 <tswett> "(void)s;"
21:35:30 <tswett> What happens when you cast something to void?
21:35:36 <mauke> nothing
21:35:38 <b_jonas> tswett: nothing special. the value is lost.
21:35:46 <shachaf> I wish C++ supported void values. :-(
21:35:48 <b_jonas> you can cast anything to void to get a void expression
21:35:52 <b_jonas> no, void values don't exist
21:36:31 <b_jonas> you can use void expressions as a statement, or as the left argument of the comma operator, or in a few other places
21:36:35 <tswett> b_jonas: how did you ever discover 20140?
21:36:59 <mauke> by reading this channel
21:37:04 <b_jonas> tswett: ask mauke, that wasn't me
21:37:25 <tswett> mauke: how did you ever discover 20140?
21:37:37 <mauke> let's see
21:37:39 <b_jonas> mauke: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59704 is the bug, the story is a bit complicated
21:37:48 <mroman> (void)s; is used to make gcc/g++ not throw "unused variable" erros when compiling with -Werror
21:37:53 <shachaf> At least gcc supports void f(); void g { return f(); }
21:37:59 <mauke> I don't quite remember what I used the buffers for
21:38:20 <b_jonas> mroman: not only that. it has other uses too
21:38:27 <shachaf> but not void x = f(); return x; :'(
21:38:34 <b_jonas> mroman: for example, it allows you to use the comma operator on any value without fearing of triggering an overloaded comma
21:38:37 <shachaf> Er, I mean void g(), of course.
21:39:20 <tswett> Can you declare a void variable at all?
21:39:24 <b_jonas> mauke: basically, Jens Gustedt has discovered a way in C to test whether an expression in compile time constant: http://gustedt.wordpress.com/2013/08/22/testing-compile-time-constness-and-null-pointers-with-c11s-_generic/
21:39:34 <b_jonas> tswett: no, nor a void parameter
21:39:51 <b_jonas> mauke: but his solution uses a quirk that doesn't work in C++, so we were wondering if it's possible in C++ too
21:40:05 <b_jonas> mauke: I think it's possible, but there seems to be a gcc bug that breaks it
21:40:34 -!- AnotherTest has quit (Read error: Connection reset by peer).
21:40:38 -!- AnotherTest_ has joined.
21:40:50 -!- AnotherTest_ has changed nick to AnotherTest.
21:41:23 <mauke> tswett: it may have been for runtime code generation
21:42:16 <b_jonas> also, cast to void can be useful to write a ?: expression where you don't care of the return value but the two arms have completely incompatible types
21:42:45 <b_jonas> and cast to void also helps in some nice macro tricks
21:42:48 <mauke> or maybe it was for the generic constructor?
21:43:00 <tswett> if condition then action1 >> return () else action2 >> return ()
21:43:07 <tswett> Looks legit.
21:43:34 <tswett> Isn't it nice how every language can be written in Haskell...
21:44:57 <b_jonas> well, haskell is crazy in a different way than C++ is crazy
21:45:56 <b_jonas> there might be a second gcc bug here, I'll have to examine this
21:45:59 <shachaf> if condition then void action1 else void action2
21:46:25 <mauke> if (condition) action1; else action2;
21:51:46 <b_jonas> wtf
21:51:48 <b_jonas> this si wierd
21:53:59 <b_jonas> there's something I really don't understand here
21:54:05 <b_jonas> I'll have to ask the c++ guys
21:55:10 <mauke> whoa, what's _Generic? typecase?
21:55:18 <kmc> yep
21:55:20 <b_jonas> mauke: yes
21:55:26 <kmc> new in C11 iirc
21:59:18 <pikhq> Yep.
22:05:50 -!- atrapado has quit (Quit: Leaving).
22:08:17 -!- AnotherTest has quit (Ping timeout: 240 seconds).
22:08:56 -!- tertu3 has joined.
22:08:57 <mauke> wtf
22:09:03 <mauke> constexpr int v = argc - argc; compiles
22:09:05 <int-e> So do all C compilers get this right? :-)
22:09:14 <int-e> mauke: oh!
22:09:29 <int-e> That is ... interesting.
22:09:32 <mauke> but covl(0, v) says it's nonconstant
22:10:30 <int-e> char *p; constexpr ptr_diff_t d = (p+4) - p; // is this supposed to work?
22:11:33 -!- ais523 has joined.
22:11:34 -!- atrapado has joined.
22:12:12 -!- Sprocklem has quit (Read error: Operation timed out).
22:12:22 <mauke> too esoteric for me
22:12:29 <b_jonas> there's no second bug, it was a misunderstanding at my part
22:12:45 <b_jonas> mauke: no
22:12:50 <elliott> mauke: covl?
22:13:04 <b_jonas> mauke: v doesn't convert to a pointer but 1*v does, because v is an lvalue
22:13:06 <mauke> elliott: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59704
22:13:10 <olsner> int-e: I think p+4 may be undefined, depending on what p points to
22:13:19 <b_jonas> mauke: only _prvalue_ constant expressions of integral type and value zero convert to a null pointer
22:13:31 <b_jonas> (not counting nullptr_t expressions)
22:14:05 <b_jonas> mauke: so v must not convert to a null pointer
22:14:23 <b_jonas> not even if you say const int v = 0;
22:14:49 <b_jonas> it's complicated
22:15:07 <mauke> try.cc:5:32: error: '* &<anonymous>' is not a constant expression
22:15:07 <mauke> const constexpr int &v = argc-argc;
22:15:07 <mauke> ^
22:15:12 <mauke> u wot m8
22:15:37 <b_jonas> mauke: good luck trying to understand C++, I must go now
22:16:45 <int-e> olsner: I was speculating about why constexpr int v = argc - argc might be supposed to work. Taking the difference of pointers seems to be the most useful case where such cancellation might turn up.
22:17:13 <int-e> olsner: (But I don't know whether it is supposed to work.)
22:17:26 <Bike> what if argc is NaN, huh!
22:18:08 <int-e> it's an int.
22:18:15 <mauke> it doesn't compile if argc is a double
22:18:27 <int-e> and argc-argc can't even overflow.
22:18:44 <int-e> (close one!)
22:18:47 <mauke> I'm testing with constexpr int v = x == x;
22:30:02 -!- callforjudgement has joined.
22:30:50 -!- ais523 has quit (Ping timeout: 264 seconds).
22:40:40 -!- oerjan has joined.
22:42:52 <oerjan> `run ghc -e 'putStrLn "Yes"'
22:42:59 <HackEgo> Yes
22:44:14 <oerjan> `run echo 'main = putStrLn "Maybe."' | runhaskell
22:44:18 <HackEgo> Maybe.
22:44:56 <oerjan> @tell mroman <mroman> Can HackEgo pipe to haskell? <-- `run echo 'main = putStrLn "Yes."' | runhaskell
22:44:57 <lambdabot> Consider it noted.
22:46:51 <oerjan> @tell mroman `run ghc -e 'putStrLn "This also works."'
22:46:51 <lambdabot> Consider it noted.
22:49:36 <callforjudgement> `unidecode ‑ -
22:49:38 <HackEgo> ​[U+0020 SPACE] [U+2011 NON-BREAKING HYPHEN] [U+0020 SPACE] [U+002D HYPHEN-MINUS]
22:56:22 -!- Sprocklem has joined.
22:58:51 -!- EgoBot has quit (Remote host closed the connection).
23:01:57 -!- EgoBot has joined.
23:02:11 -!- Gregor has quit (Read error: Operation timed out).
23:02:18 -!- Gregor has joined.
23:04:00 <tswett> It definitely seems like most programming languages are subsets of Haskell.
23:04:55 <Taneb> tswett, what about Agda
23:05:07 <tswett> Agda is one of the programming languages that is not a subset of Haskell.
23:05:30 <tswett> I don't think Haskell is a subset of Agda, either. Not sure about that one.
23:05:36 <tswett> They might both be subsets of Idris.
23:06:00 <tswett> Anyway, I'm trying to think how E could be seen as a subset of Haskell.
23:06:20 <Taneb> E, esoteric, ire to see
23:06:29 <tswett> My first thought, as with all my attempts to interpret a programming language as Haskell, is "use a monad!"
23:06:54 -!- zzo38 has left.
23:06:57 -!- zzo38 has joined.
23:06:57 <oerjan> tswett: it seems to me like your graph thing is harder to program because you have all nodes be black at the outset, which means _any_ node can change on the first step.
23:07:39 <tswett> oerjan: huh, you're right.
23:09:47 <Bike> need to know the twoducks subset
23:09:52 <tswett> So, in E, there are these things called objects, and there are these things called references (which can be futures, as in http://en.wikipedia.org/wiki/Futures_and_promises). A fancy thing you can do with an object is to "eventual send" a message to it, with some references as arguments.
23:10:11 <oerjan> Bike: obviously you need the Tardis monad somewhere.
23:10:34 <tswett> And a fancy thing you can do with a reference is to "wait" on it, given a function from an object to a reference; the result is a reference to the eventual result.
23:10:36 <tswett> So, uh.
23:10:53 <tswett> Something like this: wait :: ERef a -> (EObj a -> ERef b) -> ERef b
23:11:15 <tswett> Which looks suspiciously monadic already.
23:11:28 <mauke> >>= takes a continuation
23:12:07 <tswett> If you drop the EObj constructor (and I see no reason not to), that's wait :: ERef a -> (a -> ERef b) -> ERef b. Very monadic-looking.
23:12:19 <zzo38> Yes it looks monadic, but for what category (if you don't drop the EObj)?
23:12:22 <tswett> And, of course, given an object, you can make a reference to it: a -> ERef a.
23:12:41 <tswett> Uh, give me a few moments to remember how monads and categories relate.
23:12:59 <Bike> monoid on the category of endofunctors
23:13:13 <shachaf> @quote copumpkin lax
23:13:13 <lambdabot> copumpkin says: a monad is just a lax functor from a terminal bicategory, duh. fuck that monoid in category of endofunctors shit
23:13:27 <Bike> i am pwend
23:13:35 <shachaf> also i can't tell if Bike is saying that to be helpful or unhelpful or what
23:13:46 <Bike> neither can i
23:14:06 <tswett> A monad is a type of endofunctor, right? And... it sounds like the question of "what category" is just the question of what the domain of "ERef" is.
23:14:09 <mauke> endomeme
23:14:48 <shachaf> In the case of Haskell the functor is from and to the category of Haskell functions.
23:14:56 <shachaf> So it maps Haskell functions to Haskell functions.
23:15:09 <tswett> Proposal for a new conjunction: eqv'ly. "a eqv'ly b" asserts that "a" and "b" are the same thing, and means "a", or, equivalently, "b".
23:15:19 <zzo38> tswett: Yes, a monad is a endofunctor with return and join added following certain laws (or, alternatively, a Kleisli category)
23:15:32 <shachaf> a monad is just a free monad monad monad algebra
23:15:49 <tswett> A monad is just an element of the collection of monads.
23:16:36 <zzo38> But a monad needs return :: forall x. x -> m x not ERef a -> (EObj a -> ERef b) -> ERef b; so it isn't quite a monad on (->) (if you drop the EObj then it might be, if it still follows the monad laws, though)
23:16:39 -!- Sprocklem has quit (Ping timeout: 240 seconds).
23:16:56 <tswett> Pretty sure this follows the monad laws.
23:17:03 <zzo38> OK
23:17:11 -!- ^v has joined.
23:17:17 <tswett> Those are what, again...
23:17:33 <zzo38> One way to mention the monad laws is simply to say that the Kleisli category is, in fact, a category.
23:18:35 <fizzie> mauke: What if argc is a trap value?
23:19:05 <mauke> no such thing
23:19:09 <tswett> Yeah. I'm quite sure this follows the monad laws.
23:20:13 <tswett> Now, the semantics of eventual sends are really pretty complicated.
23:23:39 <tswett> You have an event queue (which need not actually be a queue, but does need to have certain ordering properties). Every ERef is a reference to the result of one of these events (perhaps an event that hasn't happened yet).
23:24:14 <tswett> I think that, at least to an approximation, creating an ERef is the same thing as putting an event on the queue.
23:25:14 -!- mrhmouse has quit (Quit: Leaving.).
23:25:28 <tswett> This means that both return :: a -> ERef a and >>= :: ERef a -> (a -> ERef b) -> ERef b put events on the queue. It's likely that this can be done without side effects.
23:30:45 <tswett> return creates a pretty boring event; this event just immediately returns a value. >>= also creates a boring event; it just waits for a first event to finish, calls a second event with the result, waits for the second event to finish, and returns the result.
23:50:08 -!- ^v has quit (Remote host closed the connection).
23:52:27 -!- ^v has joined.
23:57:30 -!- ter2 has joined.
23:58:12 <tswett> Now, suppose I want to create an E object with a single method, which nominally takes a Char and returns an Int. Well, when I do that in E, my method doesn't actually necessarily get a Char; it merely gets a reference to a Char. But it doesn't have to return an Int; it merely has to return a reference to an Int.
23:58:59 <tswett> So if I have a function "ERef a -> ERef b", I ought to be able to create one of those E objects with a single method. Let's call it an EFunc, how about. So the function is (ERef a -> ERef b) -> EFunc a b.
←2014-01-05 2014-01-06 2014-01-07→ ↑2014 ↑all