--- Log opened Wed Jan 28 00:00:30 2015 |
00:03 | | Turaiel is now known as Turaiel[Offline] |
00:04 | | Turaiel[Offline] is now known as Turaiel |
00:25 | | himi [fow035@Nightstar-dm0.2ni.203.150.IP] has joined #code |
00:25 | | mode/#code [+o himi] by ChanServ |
01:11 | | Reiv_ is now known as Reiv |
01:19 | <@macdjord> | McMartin, Derakon: The idea is to get a short, compact, and readable matching grammar, but if you insist on a specific optimization metric, let's go with fewest tokens in the resulting grammar. |
01:19 | <@macdjord> | My idea at this point is to build a DFA out of the strings, then work on simplifying that. This is what I've got so far: https://drive.google.com/file/d/0B9FX0eVxT9ryX0plRVFDSDl6OS1xeDdVeGptVUc2VTNyQVA w/view?usp=sharing |
01:27 | | Turaiel is now known as Turaiel[Offline] |
01:56 | | Xon [Xon@Nightstar-j72.ku7.252.119.IP] has quit [Client exited] |
02:04 | | Xon [Xon@Nightstar-j72.ku7.252.119.IP] has joined #code |
02:06 | | Jake [Jake@Nightstar-bci3gc.ks.cox.net] has joined #code |
02:07 | | Jake [Jake@Nightstar-bci3gc.ks.cox.net] has left #code [] |
02:47 | | celmin [celticminst@Nightstar-q7on2v.dsl.bell.ca] has joined #code |
02:47 | | mode/#code [+o celmin] by ChanServ |
02:48 | | celticminstrel [celticminst@Nightstar-5uj2p3.dsl.bell.ca] has quit [Ping timeout: 121 seconds] |
02:48 | | celmin is now known as celticminstrel |
03:00 | | thalass [thalass@Nightstar-h1qmno.eastlink.ca] has quit [[NS] Quit: sleeeep] |
03:02 | | * Derakon reads The Codeless Code, amuseds at the alt text of the image for this one: http://thecodelesscode.com/case/100 |
03:02 | <&Derakon> | "There are now abacus apps for tablet computers, in case you want to use your state-of-the-art processor for performing manual calculations. I find that strangely beautiful." |
03:26 | | Xon [Xon@Nightstar-j72.ku7.252.119.IP] has quit [NickServ (RECOVER command used by Xon2)] |
03:26 | | Xon [Xon@Nightstar-j72.ku7.252.119.IP] has joined #code |
04:34 | | Turaiel[Offline] is now known as Turaiel |
04:37 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving] |
04:54 | | Turaiel is now known as Turaiel[Offline] |
05:12 | | JustBob [justbob@Nightstar.Customer.Dissatisfaction.Administrator] has quit [Ping timeout: 121 seconds] |
05:15 | | Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
05:22 | | Derakon is now known as Derakon[AFK] |
05:47 | | Orthia [orthianz@Nightstar-ber.2ui.224.119.IP] has quit [Connection reset by peer] |
05:56 | | gnolam [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has quit [Connection closed] |
05:56 | | gnolam [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has joined #code |
05:56 | | mode/#code [+o gnolam] by ChanServ |
05:57 | | himi [fow035@Nightstar-dm0.2ni.203.150.IP] has quit [Ping timeout: 121 seconds] |
06:34 | | JustBob [justbob@ServerAdministrator.Nightstar.Net] has joined #code |
06:34 | | mode/#code [+o JustBob] by ChanServ |
07:34 | | Checkmate [Z@Nightstar-ev6.6um.94.83.IP] has joined #code |
07:34 | | mode/#code [+o Checkmate] by ChanServ |
08:05 | | Kindamoody[zZz] is now known as Kindamoody |
08:21 | | Orthia [orthianz@Nightstar-ber.2ui.224.119.IP] has joined #code |
08:21 | | mode/#code [+o Orthia] by ChanServ |
08:35 | | celticminstrel [celticminst@Nightstar-q7on2v.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
08:36 | | Kindamoody [Kindamoody@Nightstar-180u8i.tbcn.telia.com] has quit [Ping timeout: 121 seconds] |
08:40 | | Julius [abudhabi@Nightstar-7nkq9k.de] has quit [Connection closed] |
08:45 | | abudhabi [abudhabi@Nightstar-7nkq9k.de] has joined #code |
08:54 | | Orthia [orthianz@Nightstar-ber.2ui.224.119.IP] has quit [Ping timeout: 121 seconds] |
08:58 | | Orthia [orthianz@Nightstar-vfi.qgs.224.119.IP] has joined #code |
08:58 | | mode/#code [+o Orthia] by ChanServ |
09:01 | <@gnolam> | Derakon: that's reflectance - basically, the fraction of incoming light reflected per wavelength. |
09:01 | <@gnolam> | It's physical, it's unambiguous, it's hard to fuck up. |
09:03 | <@gnolam> | (Still comes in a variety of different systems though - you can have wavelength bins of different sizes and you can have different illuminants) |
09:55 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
09:55 | | mode/#code [+o himi] by ChanServ |
11:06 | | Orthia [orthianz@Nightstar-vfi.qgs.224.119.IP] has quit [Ping timeout: 121 seconds] |
11:10 | | Orthia [orthianz@Nightstar-32c.o7s.224.119.IP] has joined #code |
11:10 | | mode/#code [+o Orthia] by ChanServ |
11:56 | | * TheWatcher eyes this, flails |
11:57 | <@TheWatcher> | WTF, why has doxygen stopped generating my perl docs correctly?! |
12:56 | <@gnolam> | Buildup of carbon doxide. |
12:57 | < abudhabi> | Sunspots. |
13:00 | <@TheWatcher> | Either are likely, yes. |
15:25 | | Turaiel[Offline] is now known as Turaiel |
15:52 | | Turaiel is now known as Turaiel[Offline] |
16:02 | | Derakon[AFK] is now known as Derakon |
16:16 | <@Tarinaky> | Dammit. <regex> is C++11 only :( |
16:30 | <@iospace> | foiled again? |
16:30 | <@Tarinaky> | Maybe, |
16:31 | <@Tarinaky> | Trying to get back into C++ which requires learning how to do things I take for granted in <modern language> |
16:31 | <@Tarinaky> | Ideally without fashioning flint spears, hunting mammoth and working my way back from there. |
16:48 | < abudhabi> | If C++ is the stone age, then what is assembly? Learning how to be multi-cellular? |
16:48 | | thalass [thalass@Nightstar-h1qmno.eastlink.ca] has joined #code |
16:48 | | mode/#code [+o thalass] by ChanServ |
16:51 | <@Tarinaky> | Machine code is everything before the introduction of mitochondrial DNA. |
16:51 | <@Tarinaky> | Assembly is everything after the introduction of mitochondrial DNA. |
16:51 | <@Tarinaky> | spelling? |
16:58 | | Orthia [orthianz@Nightstar-32c.o7s.224.119.IP] has quit [Ping timeout: 121 seconds] |
17:03 | | Orthia [orthianz@Nightstar-p8m584.callplus.net.nz] has joined #code |
17:03 | | mode/#code [+o Orthia] by ChanServ |
17:04 | <@thalass> | Stupid noob question of the day: Why does nobody use python 3? |
17:05 | <@Tamber> | Stupid noob non-python-user answer: Not enough goodness to warrant the pain of changing over from python 2? |
17:06 | <@Alek> | good question. |
17:06 | <&Derakon> | Thal: mostly if you have dependencies on libraries that aren't ported to Python 3 yet. |
17:06 | <@Alek> | I think some do, but people just stay with the legacy that's already used everywhere. |
17:06 | <@thalass> | I know initially it was as Tamber says, but it's been around for a few years now. Surely things would start to tip Python 3's way eventually |
17:07 | <@Tamber> | Assuming every library you rely on, ever, has been moved over; and the new things of Python 3 warrant the pain of the transitioning. |
17:11 | | * thalass nods |
17:11 | <@Alek> | people still aren't entirely accepting HTML5, yet, but at least I think more than accepted XHTML. |
17:11 | <@Alek> | just from my observations, mind. |
17:12 | <&ToxicFrog> | thalass: I use python3 where possible, but I'm often depending on libraries that don't have python3 versions. |
17:13 | <&ToxicFrog> | For example, mo is written in python2 with __future__ imports because there isn't (or wasn't when I wrote it, anyways) a python3 version of libmutagen. |
17:15 | | * thalass nods |
18:04 | <@Tarinaky> | thalass: People tend to use from future to hedge their bets a lot. Which means they end up writing against two interpretters. |
18:04 | <@Tarinaky> | If the software runs on Python2 and Python3: which was it written for? |
18:04 | <@Tarinaky> | And almost all the 'good' stuff is available in future |
18:11 | <@thalass> | Ah. I've never had to import from future |
18:12 | < Syka> | thalass: oh oh |
18:12 | < Syka> | thalass: i LOVE answering this question |
18:13 | < Syka> | thalass: the reason you've not had to import from __future__ is that 2.6 and 2.7 are designed as "py3 lite" |
18:13 | < Syka> | so all the things that /weren't/ unicode-bytes separation got put in |
18:13 | < Syka> | and the things that were core changes (like print_statement, or the better /) were in __future__ |
18:14 | < Syka> | you nearly always want to do "from __future__ import absolute_import, division, print_function" |
18:15 | < Syka> | thalass: essentially py2->py3 is so slow because it's /hard/ to write py26,py27 and py3+ code |
18:15 | < Syka> | thalass: metaclasses across py2/py3 are a fucking disaster |
18:17 | < Syka> | thalass: and it's hard++ if you're doing anything low-level networking |
18:17 | < Syka> | because now you have to go and make sure everything is bytes |
18:18 | < Syka> | that being said, i use py27, and don't write any py3 software at all |
18:21 | < Syka> | at the end of the day, i get more benefit from py27's great support (existing software, pypy interpreter) than i would py3's nicer things |
18:21 | <@ErikMesoy> | documentation |
18:21 | <@ErikMesoy> | long examples |
18:22 | <@ErikMesoy> | people having asked all the questions on stack overflow already |
18:22 | | * ErikMesoy is sitting in py27 as well. |
18:22 | < Syka> | that's not so much a py2/py3 thing, though |
18:22 | < Syka> | apart from "this wacky thing is happening in py3" |
18:23 | < Syka> | py3's ecosystem DOES have better docs, just because they're newer, and people document things these days |
18:23 | < Syka> | but py2 has more existing things |
18:23 | < Syka> | you can't really get away with no docs these days for new projects |
18:26 | | celticminstrel [celticminst@Nightstar-q7on2v.dsl.bell.ca] has joined #code |
18:26 | | mode/#code [+o celticminstrel] by ChanServ |
19:34 | | Kindamoody|autojoin [Kindamoody@Nightstar-180u8i.tbcn.telia.com] has joined #code |
19:34 | | mode/#code [+o Kindamoody|autojoin] by ChanServ |
19:34 | | Kindamoody|autojoin is now known as Kindamoody |
19:49 | <@thalass> | I have only ever coded in py27, really. |
19:49 | <@thalass> | But I'm a noob, and everything out there for noobs is "don't bother with 3 just yet. Learn 27. |
19:49 | | thalass is now known as Thalass|afk |
19:51 | < abudhabi> | I need to get a monitor cable. |
19:55 | <@gnolam> | thalass: because that stuff was probably written in 2010 or something. |
19:55 | <@gnolam> | Nowadays, I tell people not to bother with 2.7. |
19:56 | | Thalass|afk [thalass@Nightstar-h1qmno.eastlink.ca] has quit [Ping timeout: 121 seconds] |
20:23 | | Turaiel[Offline] is now known as Turaiel |
20:26 | <@celticminstrel> | I think the university I attended has switched to Py3 now. |
20:27 | <@celticminstrel> | It was doing Py27 when I took the relevant courses, though. |
20:38 | < Reiv> | Was there a reason for py27 to be preferable to py3? |
20:38 | <&McMartin> | Py3 was not widely deployed and it lacked the extension ecosystem Py2.7 had |
20:39 | < Reiv> | aha |
20:39 | < Reiv> | And this issue has now been rectified? |
20:39 | <&jerith> | To some extent. |
20:40 | <&jerith> | There are still plenty of large codebases which have not been ported. |
20:40 | <&jerith> | All of mine, for example. |
20:41 | <&McMartin> | Ophis has remained 2.x compatible because it's widely used on machines with old and unupgraded/unupgradable Python stacks |
20:41 | <&McMartin> | Also because it dates back like ten years and so doing the conversion would cause it to to run on fewer machines for literally no benefit |
20:42 | | Thalass|afk [thalass@Nightstar-h1qmno.eastlink.ca] has joined #code |
20:42 | <&jerith> | I'm happy to write code that runs on both 2.7 and 3.3+ if it's not too hard to do so, otherwise I'll skip 3.x for the foreseeable future. |
20:42 | <&McMartin> | IIRC Ophis will run on 2.3. -_- |
20:43 | < Reiv> | Remind me what Ophis is |
20:43 | <&McMartin> | I increased the requirement to 2.3 when I decided I wanted to use booleans |
20:43 | | Turaiel is now known as Turaiel[Offline] |
20:43 | <&jerith> | Python 3 is a better language than Python 2 in some ways, but there are some questionable design decisions in it and it's not better enough to be worth the effort and expense of porting my existing code. |
20:43 | <&McMartin> | My 6502 cross-assembler. Of note here because it's the largest Python program I've written and/or maintain. |
20:43 | <&McMartin> | (I've attempted it in the past and I happen to know that I *could* port it to 3 via mechanical translation but as noted this gives me no benefit.) |
20:45 | < Reiv> | Wait, they went to the trouble of fracturing their codebase and the new designs are /questionable/? |
20:45 | <&McMartin> | All designs are questionable. You've been here long enough to know that. |
20:45 | < Reiv> | Well, OK, but hm |
20:46 | < Reiv> | "Some of them are bad enough that jerith actively objects to them"? |
20:46 | <&McMartin> | Python 3 is in the uncomfortable place where they made breaking changes but they didn't do sweeping reforms - to the level that most Python 2 code can be mechanically translated to 3 |
20:46 | <&McMartin> | Trivially, not with, like, a cross-compiler |
20:47 | <&jerith> | But not trivially enough. |
20:47 | <&McMartin> | If it were *that* trivial you wouldn't need the breaking changes~ |
20:47 | <&jerith> | Anything involving strings and unicode has to be manually rewritten. |
20:47 | <&McMartin> | ... that is demonstrably untrue |
20:47 | <&McMartin> | Since that's how Ophis *worked* |
20:48 | <&jerith> | Well, manually inspected at least. |
20:48 | <&McMartin> | The last time I ran 2to3 on it it swapped the strs for bytebuffers and went on from there |
20:48 | <&jerith> | McMartin: That's just strings, not strings and unicode. |
20:48 | <&jerith> | It's the things that involve both that are the problem. |
20:49 | <&jerith> | I spent a few days porting a templating engine. |
20:49 | <&McMartin> | Right, but that's also one of the non-questionable decisions |
20:49 | <&jerith> | Yes. |
20:49 | <&jerith> | But much of the encoding stuff is questionable. |
20:50 | <&jerith> | Filenames, for example, are unicode. |
20:50 | < Reiv> | McMartin: Were there sweeping reforms to go with? |
20:50 | <&McMartin> | ...no, that is in fact sane |
20:50 | <&McMartin> | You need a .native() or something along the way maybe |
20:51 | <&jerith> | McMartin: False, because there are legal filenames that are not valid in any unicode encoding. |
20:51 | <&McMartin> | You misunderstand me. |
20:51 | <&jerith> | So there are hacks to work around that. |
20:51 | <&McMartin> | Yes, that is "treat it as Latin-1" |
20:51 | <&McMartin> | seriously, boost::filesystem solves this and it uses UCS-4 internally |
20:52 | | * celticminstrel uses boost::filesystem! |
20:52 | < Reiv> | ... legal filenames can't fit into unicode? |
20:52 | < abudhabi> | Laptop monitor plus external monitor. Two monitors for my desktop (need DVI-D cable for one). And I'm getting a new laptop soon. |
20:52 | <&McMartin> | jerith is cheating |
20:52 | < abudhabi> | My desk can hardly contain so many screens. |
20:52 | < Reiv> | What he hell are people putting into their filenames, smiley faces |
20:52 | <&jerith> | Reiv: Filenames that consist of different bits in different encodings. |
20:52 | <&McMartin> | Raw upper-ASCII octets. |
20:52 | <@celticminstrel> | Smiley faces are in Unicode now. |
20:52 | <&McMartin> | "There are strings returned from UNIX system calls talking to ext3 filesystem that are not valid in any UTF format" |
20:53 | <@celticminstrel> | Actually, basic ones have been in Unicode for quite a long time. |
20:53 | <&McMartin> | I'm saying "that's on the os module to fix" |
20:53 | < Reiv> | That does not seem a very good design decision, but one that probably does not get blamed on python >_> |
20:53 | <&McMartin> | Because "filenames are byte streams" is a complete non-starter. |
20:53 | <@Tamber> | celticminstrel, my opinion of which can be summarised as: U+1F4A9 |
20:53 | <@celticminstrel> | Heh. |
20:54 | <@celticminstrel> | I think it's kinda silly too. |
20:54 | <&jerith> | McMartin: Sure, but the Python stdlib solves it in a way that is hard to work with. |
20:54 | <@celticminstrel> | But they're there now, and I don't think they'll be going away. |
20:54 | <@Tamber> | Well, no; they can't, really. :/ |
20:54 | | * celticminstrel nods. |
20:54 | <@Tamber> | And I accept that they're now Officially A Thing and whatnot; doesn't mean I have to like it, though. ;) |
20:55 | < Reiv> | I like smileys being in unicode. |
20:55 | <&jerith> | Anyway, a bunch of people whose competence I respect and who put a whole lot of effort into trying to solve these problems eventually gave up on python-dev and just stuck with 2.7. |
20:55 | < Reiv> | Means I can type them and the olds comprehend what the heck :) means. |
20:55 | < Reiv> | (Yes, this has been a problem on occasion.) |
20:56 | <&McMartin> | jerith: I think the correct protocol would be "convert to Unicode with current locale; if that doesn't work, fail back to Latin-1; turn the result into UCS-4 for internal processing" but even that doesn't let you write it *out* again if they're using, oh, one of the lesser Russian 8-bit encodings |
20:56 | <@celticminstrel> | "olds"? |
20:56 | <&McMartin> | celticminstrel: Elderly, nontechnical; those upon whose lawn you damn kids generally are |
20:56 | <@celticminstrel> | Ah. |
20:57 | <&jerith> | Not to be confused with Grizzled, technical; that's *my* lawn you're on, damnit! |
20:57 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
20:58 | <&McMartin> | Anyway, yes, NTFS filesystem names are UTF-16 and HFS+ filesystem names are UTF-8, and entirely too may programs try to shoehorn those into and out of 1980s-era 8-bit encodings, which hilariously tragic results |
20:58 | <&jerith> | In particular, the Twisted people had a really bad experience with the whole asyncio mess. |
20:59 | <&McMartin> | I admit the protocol I describe in fact results in garbage for people using older 8-bit encodings that aren't Latin-1, but this at least will do lossless roundtrips for them |
21:00 | <&jerith> | They posted several long and detailed analyses of the various proposals, and were either ignored or rejected by people who had very little experience with the problems they were trying to solve. |
21:01 | <&McMartin> | "There is still a GIL" is high on my list of "didn't go far enough" yeah |
21:01 | < Reiv> | a GIL? |
21:01 | <&jerith> | Global Interpreter Lock. |
21:01 | <&jerith> | McMartin: Removing the GIL is depressingly hard. |
21:02 | <&McMartin> | Yes, but we are literally designing a new language here |
21:02 | <&McMartin> | If you're going to make a breaking change, it's a new language |
21:02 | <&jerith> | However, the smartest person I've ever met is making decent progress on it. |
21:03 | <&jerith> | http://pypy.org/tmdonate2.html |
21:06 | | Wizard [Azash@wizard.engineering] has quit [Ping timeout: 121 seconds] |
21:06 | <&McMartin> | Ah, OK, yes, these papers are indeed from the mid-aughts. |
21:06 | <&McMartin> | I was gonna say "I remember TM from my grad-school days" |
21:06 | | Wizard [Azash@Nightstar-borbkp.engineering] has joined #code |
21:06 | | mode/#code [+o Wizard] by ChanServ |
21:07 | <&jerith> | pypy had to do a bunch of original JIT/GC research to make things work. |
21:25 | | Orthia [orthianz@Nightstar-p8m584.callplus.net.nz] has quit [Ping timeout: 121 seconds] |
21:30 | | Orthia [orthianz@Nightstar-32c.o7s.224.119.IP] has joined #code |
21:30 | | mode/#code [+o Orthia] by ChanServ |
22:44 | | himi [fow035@Nightstar-dm0.2ni.203.150.IP] has joined #code |
22:44 | | mode/#code [+o himi] by ChanServ |
22:57 | <&ToxicFrog> | I do rather feel like if you're going to do a major version number increment and break compatibility anyways, you should take that opportunity to redesign where appropriate rather than just polishing things up a bit. |
22:57 | <&ToxicFrog> | cf the lua4->lua5 transition. |
23:02 | < Reiv> | Yeah, one gets the feeling they chickened out halfway through |
23:02 | < Reiv> | which is unfortanute |
23:03 | <&McMartin> | This does I admit get trickier in the absence of standards committees |
23:03 | < Reiv> | Becakesue if you're going to break things you might as well break things in the name of doing a complete rebuild of the bits that sucked, etc |
23:19 | | Checkmate [Z@Nightstar-ev6.6um.94.83.IP] has quit [Ping timeout: 121 seconds] |
23:19 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
23:19 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
23:23 | <~Vornicus> | Reiv: the GIL is the Global Interpreter Lock; it prevents more than one of Python's threads from accessing anything in the interpreter's memory simultaneously. |
23:24 | < Reiv> | That sounds like it gets rapidly painful with multithreading. |
23:25 | <~Vornicus> | This is good, because it means that you don't get ridiculous low-level race conditions |
23:25 | <~Vornicus> | This is *bad*, because it means that Python essentially runs single-threaded all the time. |
23:28 | < Reiv> | Precisely |
23:28 | < Reiv> | One would have thought Py 3.0 would be the time to, uh, fix it |
23:28 | <&Derakon> | ISTR RchrdB was working on that, actually. |
23:28 | < Reiv> | (And yes I know that 'fixing it' is not exactly simple, but While We're Here and all...) |
23:29 | <&Derakon> | Doesn't he have a custom Python he works on that doesn't have a GIL? |
23:29 | <&Derakon> | Or at least where he was making progress on removing or limiting it? |
23:33 | <~Vornicus> | I thought that was Rhamphoryncus |
23:33 | <~Vornicus> | ...unless I missed a memo |
23:33 | < Reiv> | They both start with R and hang out in Code, right |
23:33 | <&ToxicFrog> | McMartin: I think part of this is that python has (afaik) no standards committee but lots of developers |
23:33 | | Kindamoody is now known as Kindamoody[zZz] |
23:33 | <&ToxicFrog> | Whereas the lua devteam is like three people |
23:34 | < Reiv> | ... Rham isn't the guy that D&D'd with you folk back in the day was he, Vorn? |
23:34 | <&ToxicFrog> | So the threshold for getting all of the maintainers on board with "let's totally redesign the language using the lessons we learned from the last major version" is a lot lower. |
23:38 | <~Vornicus> | THink he did some, Reiv |
23:42 | < simon_> | woohoo, I used Rank2Types in Haskell for something constructive for the first time! |
23:42 | <&McMartin> | woot! I have no idea what you just said! |
23:43 | | Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code |
23:43 | | mode/#code [+o Checkmate] by ChanServ |
23:43 | < simon_> | basically, I had an evalArithmetic :: Expr -> Expr -> (a -> a -> Bool) -> InterpM Value, where (a -> a -> Bool) is some polymorphic comparison function (e.g. the built-in >, <, >=, <=) |
23:44 | < simon_> | this gives a type-unification error. |
23:44 | < simon_> | because sometimes < is used on ints, sometimes on strings. |
23:44 | < simon_> | and somehow it thinks that the 'a' must be the same throughout my function body |
23:45 | < simon_> | sorry... that's :: Ord a => Expr -> Expr -> (a -> a -> Bool) -> InterpM Value |
23:45 | < simon_> | so what I somehow remembered was that you could change the type into :: Expr -> Expr -> (forall a. Ord a => a -> a -> Bool) -> InterpM Value |
23:45 | < simon_> | then it's as if that comparison operator that I'm passing was a toplevel function without the restriction of having to unify for all uses in my function body |
23:46 | < simon_> | (it'd be dead annoying if e.g. using foldl on one kind of list and then foldl on another kind of list would result in a type error) |
23:47 | < simon_> | so Rank2Types (or RankNTypes) is about moving those (most often implicit) quantifiers 'forall a.' into the type signature rather than their usual resting place at the far left of the type signature. |
23:53 | | Thalass|afk is now known as Thalass |
23:53 | | mode/#code [+o Thalass] by ChanServ |
23:59 | | Turaiel[Offline] is now known as Turaiel |
--- Log closed Thu Jan 29 00:00:46 2015 |