<cmccann> wavewave, liberal type synonyms mostly just let you use them partially applied in type signatures, I think <cmccann> with some entertaining consequences, like being able to encode church numerals in type synonyms and do basic arithmetic <lispy> maloi: when you say, ‘last step’ you mean the substitution I did or the step after it? <wavewave> cmccann: i see.. is this new addition? <maloi> the step fter it (where u used @unpl) <cmccann> …basic arithmetic on church numerals, by the way, including exponentiation but not subtraction I guess <cmccann> hm <lispy> maloi: rename c to something like, z so it doesn’t conflict, then use that substitution where (a b c -> a (b c)) <cmccann> I should try to write the Ackerman function with type synonyms again, last time the thing that stopped me was needing polymorphic kinds <cmccann> this is obviously an excellent idea <cmccann> but anyway <wavewave> hmm…. difficult. <wavewave> Impredicative types.. LiberalTypeSynonyms… PolymorphicKinds.. <Mike___> is it hard to check if a file exists, and if not, create it? <lispy> This is Haskell we solve more general recursion problems in the type system before 8am than most people solve all day. <wavewave> that’s hard
in my experience. <cmccann> I’m not sure what’s up with impredicative types these days <wavewave> cmccann: I heard that it would be back around 7.4 time.. but i didn’t follw. * lispy doesn’t like impredicative types <lispy> So if they are gone, that’s fine with me
<wavewave> those stuffs are too mind-boggling. now i am getting myslef away from it. <serversale> I am selling dedicated servers (VDS) in different countries, windows xp, 2003,2008, seven, linux! write to PM who need them. <cmccann> wavewave, but yes liberal type synonyms allow you to use quantifiers and whatnot as well in places you can’t otherwise <cmccann> but once all the synonyms are expanded the type still has to follow the same rules <Mike___> Well, I’ve got all my work nearly done, keep having one single problem <Mike___> if anyone can help me <lispy> It’s pretty amazing how little the core type system has changed even after all the front end type extensions. <Mike___> *** Exception: tabela.txt: openFile: permission denied (Permission denied) <lispy> Mike___: are you on windows? <Mike___> yes I am <wavewave> then.. it has a lock. <lispy> Mike___: are you trying to have multiple readers on a file? <Mike___> http://hpaste.org/63595 <Mike___> I think I only have one <Mike___> oh well <Mike___> now that you mention it <Mike___> i do call main at the end again <Mike___> and it calls the reader again <Mike___> for the same file <lispy> oh <wavewave> Mike___ : use withFile if possible. <lispy> I bet this is a problem with lazy readFile <Mike___> what do you mean? <lispy> readFile doesn’t close a file until you’ve requested all the contents <wavewave> your file is in open state until what you need has been read completely. <wavewave> becaues lazy evaluation <lispy> This is something I consider to be a bug in the Prelude <Mike___> Is that possible if the file is empty? <wavewave> hmm I didn’t know readFile still leave a file open even if it finished. <maloi> lispy: thx, i think i got it now <wavewave> so withFile is safe in that behavior? <lispy> you could test this theory by changing the last line of readTabela to be seq (length t) (return (read t)) <wavewave> btw, these days, I am using iteratee for all such operations to avoid such problem. <Mike___> I tested something <Mike___> i oppened the file <Mike___> and tried to change it and save <Mike___> it doesnt let me <Mike___> it says it’s beeing used <Mike___> but, if i close ghci, it lets me change it <Mike___> lispy: i tried what u said <Mike___> *** Exception: Prelude.read: no parse <lispy> Mike___: that means that t wasn’t a valid string for [(Int,String)] which is not surprising considering t = “”, right? <rasfar> just got the darcs source (using darcs) — watched the last bit of the get, it was bash scripts, lots of them. Thought that was amusing… <Mike___> hmm, but it shouldnt be happening <lispy> rasfar: the entire test suite is bash scripts * hackagebot rezoom 0.0.3 – Github resume generator http://hackage.haskell.org/package/rezoom-0.0.3 (JoelTaylor) * hackagebot highlighting-kate 0.5.0.4 – Syntax highlighting http://hackage.haskell.org/package/highlighting-kate-0.5.0.4 (JohnMacFarlane) <rasfar> why not quickcheck? <lispy> rasfar: it uses that too for some unit testing, but what do you use to make sure all the units fit together? <rasfar> lispy: i dunno, just being querulous <lispy> rasfar: also, there is probably no end to legitimate ‘why not foo?’ questions when it comes to the darcs source
<lispy> it used perl at one point <rasfar> maybe i’ll genuinely penetrate the source this time; not the first time i obtained it… <lispy> I can’t even remember why the perl was converted to bash <lispy> rasfar: You might find this a handy read: http://blog.codersbase.com/2009/03/type-correct-changes-safe-approach-to.html there are links to pdf of my thesis and slides <elliott> hmm I didn’t know readFile still leave a file open even if it finished. <elliott> wavewave: it closes once you force the [] <elliott> welcome to lazy IO <lispy> readFile doesn’t have to be this way. It’s this way because of an unsafePerformIO buried inside the definition in the prelude <rasfar> lispy: yes i would, how did you guess. exactly my present interest. <lispy> rasfar: psychic
<rasfar> it’s *your* thesis, geeze! <rasfar> we shall talk….. <lispy> heh <lispy> I should probably reread it then to know what it says
<rasfar> hee <elliott> lispy: *unsafeInterleaveIO <lispy> elliott: how do you define unsafeInterleaveIO? <lispy> Okay, so ghc doesn’t define it interms of unsafePerformIO, but I think you can use unsafePermforIO to define unsafeInterleaveIO <elliott> you can use unsafePerformIO to define return too <elliott> unsafeInterleaveIO is considerably more benign <elliott> (not benign, but more benign) <lispy> unsafeInterleaveIO io = return $ unsafePerformIO a — I think this works <lispy> er, a should be io <otters> so I can’t find the bit in the lambdabot documentation where it explains online.rc <otters> ahh <otters> there is an example <elliott> lispy: yes, it does, but so? <otters> elliott why aren’t you a lambdabot admin <elliott> lispy: you can define perfectly safe things with unsafePerformIO too, but more importantly, you can’t define unsafePerformIO with unsafeInterleaveIO <elliott> otters: good question! Cale: Why aren’t I a lambdabot admin? * elliott doesn’t actually want to be a lambdabot admin. <otters> I’ll be an admin if elliott doesn’t want it <otters> the easiest way to learn is with unlimited power <elliott> quite <rasfar> (lispy: actually we’re looking at different problems but your thesis will help for sure, thank you) <lispy> rasfar: this document is now old, but it should help you understand how ‘record’ is implemented: http://wiki.darcs.net/Internals/Record <rasfar> super. i’ve been through the Internals docs before, and skimmed some papers, but my project keeps getting sidelined. <lispy> rasfar: what is your project? * lispy wonders if we should move to #darcs <rasfar> sure, let’s go to #darcs for this… Session Close: Mon Feb 13 00:00:00 2012
Feb 162012