00:01 (join) Enoria 00:33 (join) Tyr42 00:39 (join) kvda 00:39 (quit) Fare: Ping timeout: 246 seconds 00:41 (quit) jrslepak: Quit: What happened to Systems A through E? 00:49 (quit) Tyr42: Read error: Connection reset by peer 00:49 (join) Tyr42 00:52 (quit) samth: Ping timeout: 246 seconds 01:05 (quit) Enoria: Ping timeout: 245 seconds 01:09 (join) Enoria 01:15 (quit) em: Ping timeout: 246 seconds 01:22 (quit) cdidd: Ping timeout: 245 seconds 01:35 (join) mrcarrot 01:48 (quit) dnolen: Remote host closed the connection 01:59 (join) dgs_ 02:11 (quit) haffe: Ping timeout: 244 seconds 02:17 (quit) yoklov: Quit: computer sleeping 02:36 (quit) jeapostrophe: Ping timeout: 252 seconds 02:50 (join) hkBst 02:50 (quit) hkBst: Changing host 02:50 (join) hkBst 02:53 (join) em 02:53 (quit) Tyr42: Quit: Leaving. 03:12 (quit) mithos28: Quit: mithos28 03:23 (quit) ivan\: Ping timeout: 265 seconds 03:24 (quit) realitygrill: Quit: realitygrill 03:25 (join) kampsun 03:30 (join) ivan\ 04:09 (join) Asphodelia 04:25 (join) bas_ 04:29 (quit) bas_: Read error: Connection reset by peer 04:29 mrcarrot: is there any good guide for how to make text based programs using racket? if i am going to learn racket, i will most of the time do textbased programs over ssh 04:30 mrcarrot: htdp is pretty much focused on graphics and how to use drracket.. 04:47 (join) bas_ 04:47 (nick) bas_ -> Skola 05:00 (join) ahinki 05:02 (join) djcb 05:05 (quit) Asphodelia: Ping timeout: 244 seconds 05:25 (join) noelw 05:51 (join) tim-brown 05:51 (join) GeneralMaximus 05:57 (join) veer_ 05:58 (join) rostayob 05:58 tim-brown: tewk: any progress with the places thing, can i do anything to help? 06:00 (join) Asphodelia 06:00 (quit) Asphodelia: Changing host 06:00 (join) Asphodelia 06:03 (nick) veer_ -> password 06:04 (nick) password -> veer_ 06:10 (quit) Asphodelia: Ping timeout: 252 seconds 06:11 (join) mceier 06:16 (quit) dgs_: Read error: Connection reset by peer 06:24 (join) gciolli 06:28 (join) asdfhjkl 06:56 (quit) GeneralMaximus: Quit: Leaving 07:18 (quit) dous: Ping timeout: 246 seconds 07:29 (join) masm 07:32 (join) acarrico 07:42 (join) samth 08:09 (quit) kanak: Quit: Leaving. 08:17 (quit) Diarmid: Quit: Leaving. 08:20 (quit) rostayob: Quit: WeeChat 0.3.5 08:26 (join) Diarmid 08:26 (join) kanak 08:26 (quit) kanak: Client Quit 08:50 (nick) veer_ -> veer 08:52 mrcarrot: is racket having support for persistent datastructures like acid-state in haskell? 08:53 noelw: There is a data structure library on Planet 08:54 noelw: Oops. Not in Planet 08:55 mrcarrot: does it support persistence by writinh to disk? 08:56 noelw: Oh, I thought you meant persistence in the functional data structure sense. 08:56 noelw: Not as far as I know. 08:56 noelw: Racket has generic serialisation, which you might be able to use. 08:56 noelw: (See the 'data' package in Racket) 08:57 mrcarrot: okay 09:04 Diarmid: I might not be understanding what's being asked, but wouldn't just writing the s-exp's to a file and reading them back out, the way most Lisp programs store data, do what's needed? 09:05 Diarmid: If ACID in the database sense is what's needed, that won't have any notion of 'transactions', though, but I'd guess you'd be using a database for that. 09:07 (join) GeneralMaximus 09:11 (join) yoklov 09:32 (join) Fare 09:38 (join) jeapostrophe 09:44 (join) Tyr42 09:47 (quit) Technodrome: Read error: Connection reset by peer 09:48 (join) Technodrome 09:53 (join) EmmanuelOga 09:53 (join) rostayob 09:57 (quit) rostayob: Client Quit 09:57 (join) rostayob 10:03 (quit) yoklov: Quit: computer sleeping 10:03 mrcarrot: Diarmid: it was something similar to this one: http://acid-state.seize.it/ 10:04 (quit) rostayob: Quit: WeeChat 0.3.5 10:05 (quit) GeneralMaximus: Ping timeout: 252 seconds 10:05 Diarmid: mrcarrot: I see, so it is essentially a database, without the database. I'm curious what the use case is. 10:05 (join) rostayob 10:06 mrcarrot: Diarmid: acid-state takes care to automatically write things to disk, so if your program is crashing, nothing is lost. also, the whole database is all the time in RAM, meaning it is fast and that you can use any data structure for storing your data, a tree, a list, a hashtable... with anything you want 10:07 Diarmid: Couldn't you just use the normal s-exp serialization, wrapped in a function to validate the data (in case you're afraid your program will corrupt its state), and that wrapped in a function to write to disk? 10:07 mrcarrot: the normal case for most program is to use sql databases, meaning that you need to translate the tables and queries into datastructures i your program. this is always an extra burden... 10:07 Diarmid: mrcarrot: I think you'd have to do most of the same work anyway (e.g. explaining what 'valid' means). 10:08 mrcarrot: Diarmid: i have not been writing even one program with racket yet, i am just curious of racket and exploring what it is able to do :) 10:09 rostayob: it's hard to do what acid-state does in an impure language. acid-state works because the change that can be make to every transaction can be serialized easily 10:09 rostayob: and then "replayed" 10:09 rostayob: you can just trust the user anyways 10:09 rostayob: (the user of the library) 10:09 mrcarrot: isn't scheme basically a "pure" language? 10:10 rostayob: mrcarrot: no 10:10 Diarmid: mrcarrot: I see. Well, Lisp is designed to be able to dump most data structures to a file and read them back, with little to no effort on your part. It doesn't pretend to be a database, but if your only concern is making sure the preserved state is sane, that's not very difficult to achieve. 10:10 mrcarrot: okay, somebody must have been writing wrong on one site then they said that scheme is the pure version of lisp... and that clisp is impure 10:11 rostayob: mrcarrot: do you know what "pure" mean in this context? 10:11 Diarmid: I/O becomes hellacious in every 'pure' language I've seen. I'm quite thankful Scheme isn't pure. It makes it easy to write imperative code to do I/O, and attach that to the functional bits. 10:11 rostayob: Diarmid: you haven't tried Haskell :( 10:11 rostayob: ops, it was meant to be a :) ehe 10:11 Diarmid: rostayob: Actually, Haskell is what I had in mind when I thought of 'hellacious I/O'. 10:12 rostayob: Diarmid: IO is not hellacious in Haskell. but I don't want to start a big discussion about this. 10:12 rostayob: let's say that Haskell IO model makes things like STM and acid-state possible. 10:12 mrcarrot: IO is not that difficult to do in haskell... and even "imperative" code with do notation is quite easy 10:14 Diarmid: The "do" notation gives you sequence without most of the pain of monadic I/O, but I/O interacts poorly with mandatory lazy evaluation (you have to be sure to 'force' the I/O code to be evaluated as it's needed). It's possible to work around all this, but I'm glad Scheme took a different path. 10:14 bremner: sure, on the surface it is easy. But really understanding it is a challenge for most people. 10:14 mrcarrot: personally i think the static typing (while it is good) makes the coding more hard to do.. much more than IO 10:15 rostayob: Diarmid: yeah lazy IO is bad, and the Haskell community agrees on that now, and great ways of doing IO efficiently in Haskell have surfaced 10:15 Diarmid: I don't mind static typing. The second language I learned (C; first was BASIC with a smattering of assembly I didn't fully understand) was statically typed, and it never gave me any difficulty. 10:16 rostayob: anyways, without talking about Haskell, mrcarrot: you can definitely do something like acid-state in scheme but without the same guarantees 10:16 mrcarrot: okay 10:16 Diarmid: I just wish type systems did a better job catching real bugs rather than getting in the way. Real bugs tend to have to do with the /value/ being wrong (read/write array with index out of bounds, divide by zero), rather than the /kind of thing/ (integer, in this case) being wrong. 10:17 rostayob: Diarmid: 1) Haskell catches loads of errors for me 2) you can encode those things at the type level if you really want to, but it's not that pratical ATM :) 10:17 Diarmid: Maybe what I'd really want is something like Qi/Shen, but from what little I've seen of that, it can't express those kinds of things very well. 10:17 (join) GeneralMaximus 10:18 rostayob: for example, if you have 'y / x' you can force the "kind" of x to be /= 0 at the type level with dependent types 10:18 rostayob: those are still types 10:19 Diarmid: rostayob: But how would you express this such that it could be evaluated at compile time? 10:19 rostayob: Diarmid: of course 10:19 rostayob: check out Coq or Agda 10:19 rostayob: Diarmid: IO and non-determinism don't play well in this picture for obvious reason 10:20 rostayob: so you have to have an "entry point" in which you assume that some properties hold 10:20 rostayob: long story short, right now programming with dependent types is quite an ordeal :P 10:20 Diarmid: rostayob: Assuring that a arbitrary function does not return 0 is non-trivial. I'm aware of Coq and ACL2, and a handfull of less popular things. Sadly, other than Coq and ACL2, most don't seem to export executable code. They're more designed with mathematicians than programmers in mind. 10:21 rostayob: Diarmid: Agda and Idris are designed with programmers in mind as well 10:21 rostayob: also, ATS 10:21 rostayob: again, I never claimed that I'd program with those. I'm just saying it's possible. 10:21 (quit) Tyr42: Quit: Leaving. 10:21 (quit) asdfhjkl: Read error: Connection reset by peer 10:21 rostayob: Agda in particular has very nice interoperability with Haskell 10:23 Diarmid: rostayob: I'd be happy to find something I could stand to use that made programming relatively painless, and verification at least largely automatic. I'm not expecting it to tell me whether there's a odd perfect number without me expending any effort, but something that 'automatically' checked things like array indexes an division with interval arithmetic, and recognized I/O as a (imperative and) fact of life would help a awful 10:25 rostayob: Diarmid: Agda and Coq don't help in terms of lemma discovery (they don't prove stuff for you, but they give you a framework to prove stuff in). And even those are a pain for practical programming. So I think that the "largely automatic verification" is quite hard. However verifying little things like out of bounds indices or division by zero is quite OK 10:25 rostayob: still when doing IO you have to postulate things, because you don't know what you're going to get :P 10:26 rostayob: Diarmid: also, Haskell does recognise IO as imperative, and as a fact of life 10:27 Diarmid: rostayob: Mostly agreed. I don't think I/O is as hard as theorists want to make it. it bears some resemblance to the belief in the 'impossibility' of including GOTO in Hoare Logic (it was ultimately handled by just 'forgetting' anything except properties known to hold at the 'to' label). 10:28 rostayob: yeah... I'll be waiting for a practical dependently typed language 10:28 Diarmid: rostayob: Handling things programmers actually care about (e.g. that array index thing; about 60% of security holes in native code are that), without a unreasonable amount of errors, is difficult. For instance, I can't imagine how pointer/reference use could be verified in the general case, and those are something I consider vital. 10:29 Diarmid: I don't write code that depends on odd perfect numbers, or the factors of large prime numbers. As Dijkstra said, most program proofs are 'uninteresting'. I like it that way. I just want something that automates that uninteresting part. 10:30 Diarmid: Until a type system can do that, though, I don't intend on using a language with types except for generating code that runs fast (currently C/C++'s excuse for existing). 10:30 rostayob: I think that that can be done, but it still require a lot more care. Ideally you'd write "safe" modules and then some entry points for the IO in which you assert some properties, as I said before. That might work (or at least it does in my head) 10:31 rostayob: Diarmid: I still prefer types. Not only because they catch errors, but because they force me to think about the high level design of my program, and they provide great documentation 10:32 rostayob: it's very easy for me to browse around an haskell module and see what does what. In Erlang (the other language I work in atm) is much trickier 10:32 Diarmid: rostayob: I'm not sure how it would work. I *need* data structures. I don't need a incredible variety of them. I guess if you gave me a vast number of data structures with 'assumed'/manually-proven correct functions, and pre/post-conditions, it wouldn't be that hard to work with, especially if no recursion or loops were provided other than for/foreach, and it was possible to 'hang them' off interrupts. 10:32 (join) agam 10:34 rostayob: Diarmid: well for example in Agda you get all the IO from Haskell functions 10:34 Diarmid: I mostly end up (ab)using (nested) lists and arrays and strings heavily. I sometimes end up making my own types to go into lists to provide some sort of functionality, but I think those are the least I could stand having in a modern language. 10:35 rostayob: lets say that you want a list of a certain length, which in Agda might be represented by a pair, composed by the list and a proof that the list is within those boundaries. You'd simply get the list in Haskell and then have some function that proves/disproves that property 10:36 rostayob: afterwards you'll carry around the list together with the proof, so that you can do operations on that list safely 10:36 rostayob: you could provide some combinators that automate these procedures for common properties of common data structures 10:36 Diarmid: rostayob: Interesting that they didn't just say 'no I/O' like most (semi)automated theorem provers did. I'm still not sure I could tolerate Haskell. I tried it. I really didn't like it, and that's got nothing to do with functional programming. It had everything to do with the monadic I/O, error messages (Helium apparently fixes that now), and syntax (too much Perl influence for my tastes, but cudos for indentation-based bloc 10:37 rostayob: Diarmid: I'm not sure if Helium is still alive. Once you've understood how the type system works, the error messages are clear 10:37 (join) agam_ 10:37 rostayob: you have to take a week to understand the type system 10:38 (quit) agam: Ping timeout: 260 seconds 10:38 rostayob: for what concerns monadic IO, I think it's just habit really... it makes much sense to me after 2 years of haskell 10:38 Diarmid: I'm perfectly okay with 'odd' evaluation methods. I actually quite like them. I don't like anything that makes I/O harder than it is in imperative languages (again, 'do' gets you part of the way there), or a type system that isn't capable of mostly-automated full verification that requires more of me than C. 10:38 rostayob: and it allows to separate certain side effects from others 10:40 (join) Tyr42 10:40 Diarmid: rostayob: My take-away from my experience with monadic I/O was it was obtuse enough to make most programmers believe the language was 'pure' (whatever that means in a language with side effects; i.e. a practical one), but it was really just a way of saying what functions must be evaluated first so the side effects appear in the right order, much like (baz (bar (foo))) for sequence, or (bar (foo-x) (foo-y)) for "don't care". I w 10:41 (quit) Tyr42: Remote host closed the connection 10:43 Diarmid: It's also worth noting that the only bug I've ever experienced that involved I/O was forgetting to close file handles. I don't feel the need to be 'protected' from I/O, sort of like type (kind of thing) errors vs value errors. I would very much like to be protected from value errors. 10:44 (quit) rostayob: Ping timeout: 246 seconds 10:45 (quit) Fare: Ping timeout: 246 seconds 10:47 (join) yoklov 10:51 (join) realitygrill 10:51 (join) vkz 10:52 stamourv: mrcarrot: https://github.com/takikawa/tr-pfds 10:52 stamourv: An older version is available on PLaneT. 10:57 (join) rostayob 11:01 rostayob: Diarmid: ops, crap connection. did you get my last messages? 11:02 Diarmid: rostayob: I can't say, since if I didn't, I wouldn't know one was missing. The last I saw was "and it allows to separate certain side effects from others". 11:03 rostayob: Diarmid: http://pastebin.com/d7patv5e 11:05 Diarmid: rostayob: I saw some of that, and was aware of most of the rest (but haven't read that paper). I think message passing concurrency and tree dataflow are better models than software transactional memory, but anything is better than shared state. 11:06 (join) dzhus 11:06 rostayob: Diarmid: my point is: you *can't* do STM in a language with unrestricted side effects. 11:06 Diarmid: rostayob: I'm also painfully aware that all I/O is imperative, and 'pure' claims are lies. The most common one, the one you see in older languages, are "we're passing the state of the world" which is a claim that's trivial to make in any language, including blatantly imperative ones. 11:07 rostayob: Diarmid: that doesn't add much to my statement that Haskell makes it easier to separate different side effects from one another 11:08 Diarmid: rostayob: Perhaps. Again, I don't personally think STM is that great a thing. The main 'practical' application I can imagine for a language that forces you to use monadic I/O would be some sort of "optimizing I/O compiler". I imagine something a little like how current async I/O frameworks plan reads for speed. 11:08 Diarmid: rostayob: So where the "don't care" ordering is present, you'd be free to do it whatever way is fastest. 11:08 rostayob: Diarmid: also, the fact that you don't like STM is not really the point here. The point is that once you go for unrestricted IO you can never go back 11:09 rostayob: with Haskell you can have both the "do whatever you want world" (IO) and the "you can do some things" worlds (STM, ST, acid-state, etc) and the "purity" world 11:10 Diarmid: rostayob: That could be, but I haven't really seen any benefits to the restricted I/O, and do find it exceedingly unpleasant to work with. Articulating exactly why is hard. Ignoring surface things like syntax I suppose it's because I feel like it's too "low level". It's a bit like combing one's hair by moving strands individually with tweezers (though that is an exaggeration). 11:11 rostayob: mh. unrestricted IO definitely has a more "natural" feel to it, in some sense. but I suspect is mostly habit. 11:11 Diarmid: rostayob: I think I could have handled it better in a eager-by-default language. My addiction to 'generators' shows I don't hate lazy evaluation. I just hate it when I/O is involved. :P 11:11 (quit) realitygrill: Quit: realitygrill 11:12 (join) dous 11:12 rostayob: I love lazyness too much :P. anyways, gotta go 11:12 rostayob: I like a lot of languages anyways eheh 11:12 Diarmid: I hope you have a good day. Thanks for chatting. 11:12 rostayob: (apart from C++. and Perl.) 11:12 Diarmid: Agreed on C++/Perl, and lots of languages. :) 11:13 rostayob: yeah :). good day to you too 11:13 rostayob goes to have some lunch 11:16 (quit) EmmanuelOga: Ping timeout: 272 seconds 11:21 (quit) Skola: Quit: Lost terminal 11:23 (join) bas_ 11:24 (nick) bas_ -> Skola 11:28 (quit) samth: Ping timeout: 260 seconds 11:32 (quit) jeapostrophe: Ping timeout: 265 seconds 11:42 (join) EmmanuelOga 11:50 (quit) ahinki: Quit: ChatZilla 0.9.88.1 [Firefox 11.0/20120310173008] 11:59 (quit) m4burns: Ping timeout: 252 seconds 11:59 (join) m4burns 12:02 (quit) veer: Remote host closed the connection 12:11 (join) jeapostrophe 12:12 (quit) EmmanuelOga: Read error: Connection reset by peer 12:17 (quit) Shviller: Ping timeout: 255 seconds 12:17 (join) Shviller 12:19 (join) jonrafkind 12:19 (quit) Skola: Ping timeout: 252 seconds 12:28 (quit) Technodrome: Read error: Connection reset by peer 12:28 (join) Technodrome 12:29 (join) EmmanuelOga 12:34 (join) Fare 12:34 (quit) hkBst: Quit: Konversation terminated! 13:09 (quit) vkz: Quit: vkz 13:12 (join) anRch 13:18 (join) Skola 13:22 (join) MayDaniel 13:23 tewk: tim-brown: Its fixed in a patch that is awaiting final code review. http://www.cs.utah.edu/~tewk/sync_fix.diff 13:23 (nick) noelw -> noelw_away 13:23 tewk: window 2 13:35 (quit) GeneralMaximus: Quit: Leaving 13:35 (join) GeneralMaximus 13:37 (quit) itasyno: Ping timeout: 265 seconds 13:37 (quit) MayDaniel: 13:43 (join) bmp 13:52 (nick) samth_away -> samth 14:08 (quit) jeapostrophe: Ping timeout: 245 seconds 14:09 (part) gciolli 14:17 (quit) anRch: Quit: anRch 14:17 (join) vkz 14:17 (quit) yoklov: Quit: computer sleeping 14:22 (nick) GeneralMaximus -> ankur 14:22 (nick) ankur -> ankursethi 14:27 (join) yoklov 14:27 (quit) jonrafkind: Ping timeout: 252 seconds 14:27 (quit) aidy: Ping timeout: 248 seconds 14:28 (nick) ankursethi -> Ankur 14:28 (nick) Ankur -> GeneralMaximus 14:33 (nick) GeneralMaximus -> ankursethi 14:41 (join) jeapostrophe 14:41 (quit) ankursethi: Quit: Leaving 14:44 (quit) yoklov: Quit: computer sleeping 14:53 (join) GeneralMaximus 14:58 (quit) Skola: Quit: Lost terminal 14:58 (join) jonrafkind 15:00 (quit) Fare: Ping timeout: 246 seconds 15:04 (join) RacketCommitBot 15:04 RacketCommitBot: [racket] plt pushed 2 new commits to master: http://git.io/SKMdfg 15:04 RacketCommitBot: [racket/master] Renaming slice usage - Jay McCarthy 15:04 RacketCommitBot: [racket/master] Fixing recent errors - Jay McCarthy 15:04 (part) RacketCommitBot 15:13 (join) Fare 15:18 (join) yoklov 15:51 (part) Technodrome 15:58 (quit) dzhus: Remote host closed the connection 16:00 mrcarrot: rostayob: as you have been using both haskell and racket, may i ask if you still use both, and what did get you into racket? 16:05 (join) djcb` 16:37 (join) AmyChua 16:38 AmyChua: hallo, community! what's up? 16:39 offby1: rain, snow, clouds 16:39 offby1: :-| 16:39 rostayob: mrcarrot: I haven't been using racket a lot 16:40 AmyChua: offby1, decf yourself hehe 16:40 chandler: AmyChua: What's with the rotating nicks? Do you keep getting banned in other channels? 16:40 rostayob: mrcarrot: while I spent *a lot* of time with Haskell (and since it was free time, you can guess that I like it) 16:40 AmyChua: no, chandler 16:40 rostayob: mrcarrot: so I'm kind of biased. and I wasn't a big lisp/scheme fan before I dug a bit into racket 16:40 AmyChua: i like being always different as wel as always the same 16:40 AmyChua: :) 16:42 AmyChua: chandler, what is your favorite (alcoholic) drink? 16:44 AmyChua: Oh, so sad... No one wants to talk with me... :( 16:49 (quit) GeneralMaximus: Quit: Leaving 16:49 (quit) jeapostrophe: Ping timeout: 244 seconds 16:54 (join) itasyno 16:56 (join) fftb 16:59 AmyChua: rostayob: if you like Haskell, maybe you would like to check the Shen language too. It's really beautiful! 17:04 (join) Kaylin 17:04 AmyChua: hallo kaylin 17:05 Kaylin: hello! 17:05 AmyChua: what's up? 17:05 AmyChua: homework, etc? 17:05 AmyChua: alcoholic drink? 17:05 Kaylin: not even etc, just homework =/ 17:05 AmyChua: hehehe, what a shame 17:06 AmyChua: maybe I could help you? 17:06 AmyChua: :) 17:07 Kaylin: depends, if you have a way to motivate me into doing things I don't want to be doing from far away, you should probably market that. 17:07 AmyChua: oh... neither I can do that... have motivational problems too :( 17:09 AmyChua: kaylin, who is your worst PLT-team member? :) 17:10 Kaylin doesn't understand the question. 17:10 samth: AmyChua: insulting people is not tolerated on this channel 17:10 samth: although we may make an exception for rudybot 17:10 AmyChua: i'm not insulting enyone, samth 17:10 samth: good 17:11 AmyChua: samth, calm down please, i'm totally benign 17:18 (quit) EmmanuelOga: Quit: WeeChat 0.3.7-dev 17:18 AmyChua: Mélodie d'amour chantait le cœur d'Emmanuelle 17:25 (join) dzhus 17:36 (quit) SeanTAllen: Remote host closed the connection 17:37 (quit) sid0: Remote host closed the connection 17:38 (quit) shaatar: Remote host closed the connection 17:38 (join) sid0 17:42 rostayob: I *think* I've already asked this here, but I still haven't found a nice solution 17:42 rostayob: what would be the "idiomatic" way to write a simple parser in racket? 17:45 AmyChua: most idiomatic way would be to pluck racket bad documentation an suffer 17:46 rostayob: AmyChua: oh god, you again? you used some other nick last time 17:47 AmyChua: :) 17:47 rostayob: what's the point? 17:47 AmyChua: joy of life! 17:47 rostayob: ok. 17:47 AmyChua: rostayob: if you like Haskell, maybe you would like to check the Shen language too. It's really beautiful! 17:48 rostayob: AmyChua: I understand you like Shen. I gave a quick look to it, and I didn't find it inspiring 17:48 AmyChua: weird. How so? 17:49 AmyChua: it's similar with 1) lisp 2) haskell 17:50 rostayob: I'm a bit wary of languages that try to do too much. It's very unsupported, and I'd have to be very enthusiastic to risk investing time in it 17:50 AmyChua: it's new and only one man is working on it 17:50 rostayob: exactly. 17:51 rostayob: in general I don't like "multi paradigm" languages. Usually languages with a clear vision are better to me 17:51 AmyChua: but this man has done more than the entire PLT-team! 17:51 rostayob: why are you such a great fan? 17:52 AmyChua: because i can recognise ingenuity 17:52 AmyChua: and Shen is pure ingenuity 17:52 AmyChua: :) 17:52 rostayob: AmyChua: that's very vague. 17:53 AmyChua: luk only at beautiful tutorial of shen. It's comparable to SICP 17:53 AmyChua: luk = look 17:53 rostayob: where? 17:53 AmyChua: here: 17:53 AmyChua: http://www.shenlanguage.org/Documentation/Reference/FPQi/page000.htm 17:54 AmyChua: this is official web site 17:54 AmyChua: http://www.shenlanguage.org/ 17:54 rostayob: ah that again. I really don't have time for this. 17:54 AmyChua: now exist Shen version for javascript and Clojure too 17:55 AmyChua: pitty 17:55 rostayob: ok. 17:56 rostayob: also the fact that it's composed of images it's really annoying. tell the author if you know him. 17:56 AmyChua: try to ignore this fact. Soon will come a new release and will be ok 17:57 AmyChua: it's an unimportant detail that has nothing to do with the beauty of language 17:57 rostayob: it's important for me. I can barely read that. 17:57 AmyChua: me too 17:58 AmyChua: nut you can buy the book 17:58 AmyChua: :) 17:58 AmyChua: but 17:59 samth: rostayob: the most idiomatic way would probably be to use the parser-tools collection 17:59 AmyChua: (if you can understand the doc :) 17:59 rostayob: samth: the thing is that I feel like using lexer/parser generators would be detrimental for a small parser 17:59 samth: rostayob: danny yoo recently created a cool planet package for writing grammars: http://planet.racket-lang.org/display.ss?package=autogrammar.plt&owner=dyoo 18:00 (quit) itasyno: Ping timeout: 245 seconds 18:00 rudybot: http://tinyurl.com/7v5fwvp 18:00 rostayob: samth: ok, I'll check that out. 18:00 samth: rostayob: another option is to just hand-write a recursive descenet parser 18:01 samth: AmyChua: i don't feel like you're being helpful here 18:01 (join) jeapostrophe 18:01 rostayob: samth: yes that's what I'd do usually. but there doesn't seem to be a standard set of combinators for racket 18:01 rostayob: samth: also, what's the best way to handle the input? a port? 18:01 samth: rostayob: yes 18:02 (quit) sid0: Remote host closed the connection 18:02 rostayob: ok so I'd gradually consume the port. isn't backtracking inconvenient in that case? 18:02 AmyChua: i have wrote one for "the elements of computing systems" Jack 18:03 AmyChua: for Jack Language 18:03 rostayob: AmyChua: actually, my professor of type systems in mentioned in the "Acknowledgements" section of the book aha 18:03 rostayob: *in type systems 18:03 AmyChua: nice 18:04 AmyChua: and Shen is nice too :) 18:04 (join) agam 18:04 (quit) agam_: Read error: Connection reset by peer 18:04 samth: rostayob: you can put things back on ports if you need to 18:05 (join) shaatar 18:05 (join) rudybot_ 18:05 (quit) rudybot_: Remote host closed the connection 18:05 rostayob: samth: yeah but that seems a bit awkward compared to what I usually do (working with immutable lists) 18:05 rostayob: anyways, I'll try to do that, thanks. 18:06 AmyChua: samt, are you married? 18:06 (quit) fftb: Remote host closed the connection 18:07 AmyChua: samth, are you married? 18:09 AmyChua: I have the impression, folks, that you're a little jealous of Tarver and Shen. Nobody said that he liked Shen, surprisingly 18:11 AmyChua: hahaha whole team of prominent PLT scientist cannot beat one lost desoriented man: Mark Tarver! 18:11 AmyChua: hahahahaž 18:11 AmyChua: desoriented but genius! 18:14 Diarmid: I'm assuming that, for some reason, you're trying to drive people away from using Shen. It's a pity. Maybe if more people work on things like dependent type systems we'll get to the point of having our code fully verified without much pain. In any case, you do Shen no favors (probably the idea), and will probably end up banned. 18:14 AmyChua: I'm here to promote http://www.shenlanguage.org/ the best I can and to "insult" PLT clique, hahaha! 18:15 Diarmid: For the record, I find Qi, and derived languages 'interesting', but think the approach may still be not quite right, though probably closer than other attempts, so it's not exactly true that 'nobody likes' them. 18:15 AmyChua: it's nice to hear that, Diarmid 18:15 (join) sid0 18:17 AmyChua: So, people, do you really think Racket is better? 18:18 AmyChua: Please, don't be ignorants: take a slow walt through http://www.shenlanguage.org/ and enjoy! 18:18 AmyChua: walk 18:19 Diarmid: AmyChua: The languages are more similar than most you could have chosen for comparison, but it's rather like asking whether a tree is better than a muffler. That said, Racket actually has a excellent standard library (GUI, 2-D graphics, OpenGL, sound, networking), which Shen doesn't seem to have. 18:20 AmyChua: it's true 18:20 AmyChua: but shen is so new 18:20 jonrafkind: shen macros don't look hygienic to me 18:20 jonrafkind: they look like clisp macros 18:20 AmyChua: there will be libraries because shen is for integration with other languages: common lisp, scheme, javascript, clojure... 18:21 AmyChua: see this: https://groups.google.com/group/qilang/browse_thread/thread/2568939713a1eba1?hl= 18:21 rudybot: http://tinyurl.com/6txex8p 18:21 Diarmid: For my purposes 'better' involves having good I/O facilities already provided. I'm probably going to spend most of my time with Racket doing sysadmin-type stuff, with the comfort of knowing that if I ever /need/ to grow something into a application the language will let me do that. 18:22 AmyChua: or this: https://groups.google.com/group/qilang/browse_thread/thread/8cf846d189ae263b?hl=en# 18:22 rudybot: http://tinyurl.com/7fwhtjb 18:22 AmyChua: that you can do in sh shell 18:22 (join) SeanTAllen 18:23 AmyChua: for that there is no need for real programming language 18:23 rostayob: AmyChua: Shen as you say is very new. Most people - like me - don't want to rink spending time in a language that will never be useful (because a language isn't useful without a community that writes libraries and builds an environment). Unless that programming language is very close to my interests. Shen isn't. But I shouldn't spend time writing this since you're trolling 18:23 AmyChua: wrong. You can call every function from host language in shen 18:24 Diarmid: And languages aren't trivial to compare. I'd rather write some sort of weird custom database, or a planning system, in Prolog than Lisp. I'd rather write GUI code in Python than Prolog. 18:24 AmyChua: similar to clojure (clojure can call any java lib) 18:24 AmyChua: eh, prolog is integrated in Shen 18:24 AmyChua: :) 18:25 Diarmid: Shell scripting sucks, frankly. Trying to control string expansion is horrible, making it, IMO, unsuitable even for its original purpose. 18:25 AmyChua: did you try powershell? 18:25 AmyChua: MS invention 18:25 AmyChua: it's great! 18:26 Diarmid: I quit using Bash where at all possible years ago, moving to IPython. Since then I've actually *needed* to use lambdas (Python's sufficed at the time) and deep recursion (Python does not handle this well) a few times, so I ended up here when I looked for something equivalent but more powerful. 18:26 Diarmid: PowerShell isn't a bad idea, but IPython was already doing what it did, with prettier syntax, at the time. 18:26 AmyChua: I like Ruby more than Python 18:26 AmyChua: but Shen is my favorite... i fell in love immediately 18:26 AmyChua: :) 18:27 Kaylin: it has a prettier name, snakes scare me, gemstones are shiny. 18:27 Diarmid: While I appreciate the blocks as lambdas idea, I have an aversion to complex syntax. Ruby was too Perl-like to me. 18:27 Diarmid: I'd probably be using Forth if I didn't hate debugging it so much. 18:27 (join) tomodo 18:28 AmyChua: uhhh forth. I once wrote some ilustrations in postscript by hand :) 18:29 AmyChua: postscript is essentially a forth 18:29 (join) siracusa 18:29 Diarmid: I love that the syntax is about as minimal as it gets. Unfortunately, when something goes wrong, the crash or misbehavior usually happens far from what corrupted your stack, and all you get to play detective with is the stack state at that point. Trying to use assertions at the start/end of everything is possible, but painful, since almost everything has stack side effects. 18:30 (join) nilyaK 18:30 AmyChua: than you maybe should use Visual Basic hehehe 18:30 AmyChua: :) 18:30 (part) siracusa 18:30 Diarmid: Yes, there's a lot of Forth derivatives. Joy, Factor, MUF, Postscript... 18:31 Diarmid: I don't see the connection. 18:31 AmyChua: Visual Basic is just for you: no painful stack traces, planty of libraries... :) 18:32 Diarmid: It's C# with syntax designed to resemble VB6. 18:32 AmyChua: I'm talking abuot VB6 actually :) 18:32 AmyChua: and C# is ok, actually 18:32 Diarmid: And VB never exactly had the prettiest syntax or semantics itself. 18:33 AmyChua: better than yava: it has lambdas, LINQ, etc 18:33 AmyChua: yava = java 18:33 Diarmid: Yes, and now contracts, and support for continuations in the CLR. 18:33 AmyChua: continuations? really? 18:33 Diarmid: In the CLR, I don't think it's exposed in C#. 18:33 AmyChua: wow, i didn't know tjat 18:33 (quit) djcb`: Remote host closed the connection 18:34 Diarmid: It was intended to make compiling other languages to the CLR easier. Happened when they improved the support for dynamic typing, for the same reasons. 18:34 AmyChua: It turns out that Microsoft is great! 18:35 AmyChua: their Language division, at least 18:35 Diarmid: The CLR is pretty nice now. It's made it possible to use 'weird' languages without persecution, or people even being aware you're using something other than C#. 18:35 AmyChua: (not Sharepoint, sure) 18:35 AmyChua: :) 18:36 AmyChua: and now, there is F#, too! 18:37 Diarmid: Yeah. I'm not a big fan of that sort of type system, but some people like it, and it seems the design is inspired by OCaml, which I have to respect for its performance (garbage collected, but often matches the performance of C and C++) if nothing else. 18:37 Diarmid: F# is probably responsible for much of the CLR improvements that favor functional languages. 18:38 AmyChua: i heard the rumors that Microsoft will make Shen as default language for programming new Metro system! 18:38 AmyChua: in Visual studio 2015 18:38 Diarmid: More trying to make people hate Shen, huh? ;) 18:38 AmyChua: no, i'm serious! 18:38 AmyChua: :) 18:39 rostayob: Diarmid: but F# throws away the nicest thing in SML/OCaml (the module system) 18:39 rostayob: well the nicest thing in SML. I haven't had much experience in OCaml. 18:39 AmyChua: unfortunately, i don't know much about F# and OCaml 18:39 Diarmid: Shen doesn't need to be associated with a UI designed to only function well on point-and-smudge systems. Worst advertising ever. ;) 18:40 AmyChua: hehehe, nice try 18:40 AmyChua: :) 18:40 (quit) Fare: Ping timeout: 246 seconds 18:40 Diarmid: rostayob: I wasn't aware of that. I didn't spend enough time with ML and Haskell (I gave ML a longer go at it though) to become very familiar with it, but coming from Python I do appreciate having things split into lots of small, nested, namespaces. 18:41 tomodo: what's up 18:41 (join) ben_m 18:41 rostayob: Diarmid: what's really cool about SML and OCaml is that modules are first class 18:41 AmyChua: tomodo: nice new language: http://shenlanguage.org/ 18:42 rostayob: so you can have, for example, module-level functions that take a module with a certain signature and return some other module using types and values from the given module 18:42 Diarmid: rostayob: I'm guessing this gets used for things like 'mocking', for unit testing? 18:43 tomodo: what's good about it? 18:43 AmyChua: i don't like racket because of: 1) poor documentation, 2) every time I wanna write a macro, i begin with syntax-case, then i give-up and at the end I write macro in classic common lisp unhygienic way 18:43 tomodo: doesn't look at all interesting to me 18:43 Diarmid: rostayob: Or perhaps swapping out interfaces, rather like streams/ports in lisp, so say, the code for working with one kind of database can be replaced with another? 18:43 rostayob: Diarmid: I'm not sure about unit testing, but it's tremendously useful. for example, you can have a functor (module level function) that takes a signature with a type and an ordering on that type and returns a module that lets you create a binary tree on that type 18:44 AmyChua: tomodo, look better 18:44 tomodo: AmyChua: I think you're just mistaken 18:44 rostayob: Diarmid: yes, you can do stuff like that. 18:44 Diarmid: rostayob: I have to admit that's really cool and useful. 18:45 rostayob: it is, that's why I'm angry at F#! ehe 18:45 tomodo: AmyChua: it's easy to get all excited about some new shiny gadgets, but it's just another wacky combination of a bunch of cool sounding - yet useless - trinkets 18:46 Diarmid is rather mystified by the harping on bad documentation. So far everything I've asked for has been documented, or not supplied, and the only things that didn't come with the standard library that I wanted were the "fmt" library for text formatting, and irregex for doing sick things to regular expressions. 18:46 AmyChua: just like a racket, tomodo 18:46 AmyChua: :) 18:46 rostayob: Diarmid: yeah, the docs that come with racket are excellent... 18:47 AmyChua: i don't agree at all 18:47 AmyChua: documentation for Shen is a way better! 18:47 tomodo: AmyChua: racket is irrelevant 18:47 tomodo: AmyChua: shen is a joke 18:48 AmyChua: no, it's not. It's veri thoughtful product 18:48 rostayob: aren't there any ops here? 18:48 AmyChua: made by genius Mark Tarver 18:48 Diarmid: tomodo: All languages suck, or blow, the important thing is linking them together to achieve balance? :P 18:48 tomodo: heh, no 18:49 tomodo: scheme is good, racket implements it welll 18:49 tomodo: this is irrelevant to whether or not shen is worth anything 18:49 tomodo: AmyChua is just dodging the critism by trying to move attention to racket 18:49 Diarmid: rostayob: I gather they're waiting for AmyChua to get bored, or finish making people not want to use Shen, due to the trolling in this channel. 18:50 AmyChua: i'm surprised i'm not banned yet 18:50 Diarmid: AmyChua: I'm surprised you're trying so hard. 18:50 ben_m: I'm impressed by this channel's patience and maturity :D 18:50 Diarmid: AmyChua: Don't you have anything better to do? 18:50 AmyChua: unfortunately, no 18:50 ben_m: AmyChua, who I presume is shen from yesterday, keeps trying to bash Racket and advocate his own language 18:51 ben_m: Trying to bait people into arguments 18:51 Diarmid: AmyChua: You could be adding good I/O support to Shen, so people like me might actually use it? 18:51 ben_m: And nobody took the bait yet :) 18:51 AmyChua: I suffer from deep dark depression 18:51 tomodo: why would you ever use this frankenstein? 18:51 Diarmid: AmyChua: Perhaps it's from feeling like everybody hates you, due to your trolling? 18:51 (quit) jonrafkind: Ping timeout: 245 seconds 18:51 AmyChua: maybe, diarmid 18:52 tomodo: shen is a waste of time 18:52 rostayob: btw, tomodo is a troll from another channel, I made the mistake of mentioning that someone was spamming links here and he came here. 18:52 rostayob: to put fuel on the flames I suppose 18:53 AmyChua: nice, i'm a troll too 18:53 AmyChua: we are brothers in arms 18:53 AmyChua: :) 18:53 tomodo: what are you talking about 18:53 rostayob: *there and he came here 18:53 Diarmid: tomodo: I actually like what people are trying to achieve with defendant type systems. They still don't seem to offer a way to state the kinds of preconditions/postconditions/invariants/assertions that I actually want to use (contracts do that better), but the automatic checking is nice, and maybe if they keep at it they'll get there. 18:54 samth: rostayob: tomodo has been in this channel for a while, and hasn't seemed like a troll 18:54 AmyChua: and me? 18:54 AmyChua: :) 18:54 tomodo: Diarmid: shen does not satisfy the de bruijn criterion. It is useless if you want to prove things about your programs 18:54 rostayob: oh well. my bad. he was banned on #haskell-blah, and he started talking to AmyChua after I mentioned what was happening here there. 18:54 tomodo: its' inconsistent too 18:54 tomodo: it's basically a huge nebulous mess of rubbish 18:55 AmyChua: shen is great! 18:55 rostayob: samth: they unbanned him recently there 18:55 tomodo: false for the reasons I've just given 18:55 AmyChua: shen is great, mark tarvedr is fucking genius! 18:55 samth: ok, everyone, discussion of shen is now over 18:55 AmyChua: :( 18:55 AmyChua: samth, why you don't like shen? 18:56 AmyChua: i'm really interested in your reasons 18:56 samth: AmyChua: i have no problems with shen -- i've never used it 18:56 samth: but it is *not* the topic of this channel 18:56 AmyChua: i know, but it's just stronger then me... :) 18:57 AmyChua: beside shen, it seems that the main topic of this channel is silence 18:57 Diarmid: tomodo: In what way is it inconsistent? I assume you mean a logical paradox? 18:57 tomodo: Diarmid: yeah 18:57 AmyChua: so beter shen, then silence, no? 18:57 AmyChua: sound of silence 18:57 Diarmid: tomodo: Hmm, I'm curious. I've not heard this about Qi, the language it was supposedly based on. Can you explain a bit more? 18:57 AmyChua: hello darknes my old friend... 18:57 tomodo: let's move to #shen as to not upset samth 18:57 rostayob: Diarmid: tomodo didn't know what shen was 15 mins ago. 18:58 tomodo: same for qi 18:58 rostayob: *what shen is 18:58 tomodo: it's all rubbish 18:58 AmyChua: i come to talk with you again... 18:59 Diarmid: tomodo: Perhaps this is naive, but since it allows you to specify the type of everything, and how the types are checked, it seems like if there /was/ a inconsistency, it would have to be due to the type specifications rather than the language itself. 18:59 (join) debrujin 19:01 Diarmid: tomodo: Anything with a Turing-complete type system can certainly have that problem, along with non-termination. 19:01 tomodo: yeah, Turing-complete is a mistake 19:02 Diarmid: tomodo: It's the only way to 'slay the beast' though. If you want to be able to automatically verify things, you have to be able to add rules to the system OR restrict yourself to a set of already-verified components. Most people aren't willing to give up recursion and while loops, so you pretty much have to give them a 'programmable type system'. 19:02 rostayob: Diarmid: anything turing complete language leads to an inconsistent logic at the type level 19:03 tomodo: no that's not true 19:03 rostayob: if you have general recursion, every type is inhabited 19:03 Diarmid: tomodo: I'd be very interested in alternatives. 19:03 rostayob: in other words you can prove everything 19:03 tomodo: let's talk about in #shen 19:05 (quit) agam: Read error: Connection reset by peer 19:05 (join) fizzbang 19:05 (join) agam 19:06 (quit) Kaylin: Read error: Connection reset by peer 19:08 (quit) mceier: Quit: leaving 19:13 debrujin: sound of silence, again??? 19:13 debrujin: :( 19:13 debrujin: so sad! :(((((( 19:13 debrujin: pity, people went to #shen 19:13 debrujin: :) 19:14 ben_m: You might want to consider why you were kicked and avoid it happening again 19:14 debrujin: i'm so sorry that samt don't understand me and think that i'm destructive 19:14 debrujin: i'm so nice person, totally benign 19:15 ben_m: You've said yourself that you're a troll, that's pretty much the opposite of what nice, benign and non destructive. 19:15 (quit) abbe: Quit: Aah IRC, where men are men, women are men 19:15 debrujin: i was just kidding 19:15 ben_m: Anyways, don't want to fuel this stuff, I'll be coding some Racket :D 19:16 debrujin: i try to animate people to talk, all the time 19:16 debrujin: but it's just silence here 19:16 debrujin: why is that so? 19:16 debrujin: is it really the case that nobody have noting to say? 19:17 (join) ashish 19:17 offby1 is hiding from the flamage 19:18 rostayob: debrujin: you missed an "i" 19:18 debrujin: ? 19:18 rostayob: it's de bruijin 19:18 debrujin: ah, thanks 19:18 rostayob: no problem. 19:18 rostayob goes to study 19:30 (quit) debrujin: Quit: Page closed 19:37 ben_m: Is there a nice way to pass a variable to the next on-paint call of a canvas%? ie. I want to animate something using no state if possible 19:38 (join) realitygrill 19:40 (join) dnolen 19:52 tomodo: it's just like, come on man.. im trying to give you useful advice you can put into practice.. this isn't a battle me vs you 19:52 Diarmid: ben_m: I'm not sure this is considered clean, but perhaps you could, upon calling it, return a lambda that would call it with the next value? 19:53 ben_m: I've thought about that, that would still need a bit of state though, right? 19:54 ben_m: To store the lambda for the next on-paint call 19:54 Diarmid: ben_m: I may not be the best person to ask about this, because I consider the whole 'there is no state in functional programming' to be about as much bunk as the 'pure functional I/O' stuff, but it's my understanding that returning a curried function would be considered 'pure' by people that care about such things. 19:55 Diarmid: ben_m: I guess that depends on what the rest of your code looks like. You could tail-recurse to call yourself to avoid that, or something. 19:56 ben_m: Well the problem is I'm using racket/gui, so I don't have control over the event loop. The best I can do is override on-paint, but I can't control how it gets called. 19:56 (quit) kampsun: Ping timeout: 246 seconds 19:56 ben_m: As far as I understand racket/gui 20:04 eli: samth, stamourv: ping 20:11 Diarmid: ben_m: Do I understand correctly that you want to, basically, pass the event handler data 'from outside', like variables used by a closure? 20:12 (quit) shaatar: Ping timeout: 245 seconds 20:13 (quit) SeanTAllen: Ping timeout: 245 seconds 20:13 (quit) sid0: Ping timeout: 244 seconds 20:13 (quit) masm: Quit: Leaving. 20:14 ben_m: What I want, optimally, would be that the callback gets passed a state variable and the return value of the callback will be this state the next time the callback gets called. Sorry if that's confusingly explained. 20:14 ben_m: However, I just realize that on-paint isn't called periodically, so that won't work anyways. 20:15 Diarmid: ben_m: It's only called as needed, when the area is 'dirty? 20:15 ben_m: yeah 20:16 Diarmid: ben_m: I'm sure there's a way to hang things off a timer interrupt somehow. 20:16 ben_m: mhm 20:16 ben_m: 2htdp/universe does it somehow 20:16 ben_m: So there must be a way :D 20:17 Diarmid: there is a "timer%". 20:18 Diarmid: http://docs.racket-lang.org/gui/timer_.html 20:18 ben_m: Reading :) 20:18 (join) asurai 20:21 (quit) realitygrill: Read error: Connection reset by peer 20:22 (join) realitygrill 20:27 (quit) fizzbang: Quit: leaving 20:29 (join) shaatar 20:30 rostayob: samth: you mentioned that "you can put things back into ports if you want to". if I open a port from a mutable string, how can I do that? 20:30 rostayob: also, is there an easy way to "seek" ports, but skipping characters and not bytes? 20:31 (quit) yoklov: Quit: computer sleeping 20:34 rostayob: more than seek arbitrarly, simply go forward or backwards (so seek with SEEK_CUR) 20:36 (quit) dzhus: Remote host closed the connection 20:39 (join) SeanTAllen 20:40 (quit) dnolen: Ping timeout: 252 seconds 20:41 (join) yoklov 20:44 Diarmid: rostayob: http://docs.racket-lang.org/reference/port-lib.html#%28def._%28%28lib._racket/port..rkt%29._read-string-evt%29%29 20:44 rudybot: http://tinyurl.com/6p5ko5t 20:44 Diarmid: Err, sorry, lemme try that again 20:45 Diarmid: rostayob: http://docs.racket-lang.org/reference/port-lib.html#%28part._.Creating_.Ports%29 20:45 rudybot: http://tinyurl.com/76g7fcj 20:46 Diarmid: rostayob: It looks like you can append and seek string ports with some of the functions given there. 20:49 (quit) vkz: Quit: vkz 20:49 rostayob: Diarmid: thanks, I'll take a look. 20:50 rostayob: Diarmid: were you referring to peeking-input-port? because that provides half of what I need (going forward, while I also want to go backwards) 20:51 rostayob: also, it has the annoying downside that if the original port is read, the peeking port will skip the input 20:51 Diarmid: rostayob: Is there a reason to not use an array? 20:52 Diarmid: rostayob: http://docs.racket-lang.org/guide/vectors.html 20:53 rostayob: Diarmid: ports seem to provide a really nice interface if I need to write a parser. 20:53 Diarmid: rostayob: That might be what you want if you want true, fast, painless random access. 20:53 rostayob: I don't want random access, I just want to consume a stream with the ability to backtrack 20:53 Diarmid: rostayob: I suppose that's true, but I'm not sure why you'd need to 'read backwards' in a file. Lexers generally go forward, at least. 20:54 rostayob: Diarmid: my plan was to write some parser combinators in the style of parsec, so no need of explicit lexing 20:54 nilyaK: language isn't LLK, doesn't want to store data they might not need and can't know ahead of time? idk =/ 20:54 Diarmid: rostayob: Depends on what kind of language you're trying to parse, but you can often back up by using a recursive descent parser. The lexer itself should be able to get by with a simple string port. 20:55 rostayob: Diarmid: it's not really because of the grammar, but for ease of programming 20:56 rostayob: I don't know if you've ever use parsec, but it's really nice 20:57 Diarmid: rostayob: I probably can't help then. I'm not familiar with parsec, and learned to think of things in terms of lexing and parsing (as separate events). The lispy way to do things is usually write a reader macro or just use a regular macro to embed a domain specific language, but if you need to parse C++ or Perl that won't do you much good. I'm of the unpopular opinion that once you go past LL(1) you've messed up. 20:58 (quit) nilyaK: Quit: Leaving. 20:59 rostayob: Diarmid: I'm used to writing quick parsers easily with parsec now, it's really great (and for big parsers parsec is great since it can generate lexers internally) 20:59 Diarmid has a look. Finds it hard to imagine mixing lexing in with parsing as making anything easier. 21:00 rostayob: Diarmid: http://hackage.haskell.org/packages/archive/parsec/3.1.2/doc/html/Text-Parsec-Token.html 21:00 rudybot: http://tinyurl.com/7fgoxaa 21:00 rostayob: trust me, I haven't met a person who doesn't like parsec (and parsec is not even that great) 21:00 rostayob: still, it seems very strange that I can't do fseek-style operations on ports. 21:01 (join) kampsun 21:02 (quit) tomodo: Quit: leaving 21:02 (quit) em: Ping timeout: 260 seconds 21:05 Diarmid: rostayob: streams/ports remind me very stroingly of dataflow language streams. They're very nice if you plan your program around streaming data in and out, and it can be memory efficient by not needing to hold the whole thing in memory. 21:05 (join) jrslepak 21:06 Diarmid: rostayob: I'd normally think of a string port being fed into a lexer generator that returns lexemes, being called repeatedly by a parser that builds/decorates a tree representing the source. None of that should require doing anything but reading forward in the port. 21:08 rostayob: Diarmid: ok, that sounds reasonable :) 21:08 Diarmid: rostayob: If you're parsing something hideous the parser might need to go through a lot of contortions, remembering things and 'looking ahead', but you should still be able to get by without moving back and forth in the stream. Heck, a lot of systems do the lexing all in one pass, then do parsing next, though it means you often end up lexing the whole file unnecessarily if there's a syntax or (detectable) semantics error. 21:09 rostayob: Diarmid: no, I'm actually parsing something really easy to parse. I'm just used to parsec, which works great for this kind of things (parsing small languages) 21:11 Diarmid: rostayob: At first glance it looks like parsec is a set of little functions often found in parsers. I'm sure it's useful (sounds like sort of the opposite of the "fmt" library), but I don't think it'd be all that hard to write something similar in Scheme. 21:14 rostayob: Diarmid: oh it's not hard at all. I was wondering on how to write "try" when working on ports. 21:15 rostayob: try is a function that takes a parser, and if the parser fails puts back the input that the parser has consumed 21:15 (join) em 21:16 Diarmid: rostayob: The page I showed you on making 'custom' port types has a example of appending ports. I'd think you could basically append "oops I couldn't use this" to "rest of the string" to put it back. 21:17 rostayob: Diarmid: yeah but what I want is to put it back to the beginning of the string 21:17 Diarmid: rostayob: Though you might consider whether that's the best way to go about it. Nested cond (like switch-case) so you always 'go forward' or fail to match at all, could avoid the need to do such things. 21:18 Diarmid: rostayob: Can't you just 'append' things in that order then? If you decide you really want to stick it back on? 21:20 rostayob: Diarmid: oh right, I could. It's late :) 21:20 Diarmid: rostayob: Don't worry about it. :) 21:21 rostayob: ok, going to bed 21:21 rostayob: Diarmid: thanks for the help, I'll be back! 21:21 Diarmid: rostayob: Sleep well. 21:21 rostayob: thanks 21:21 (quit) rostayob: Quit: WeeChat 0.3.5 21:26 (join) vkz 21:26 (quit) em: Ping timeout: 252 seconds 21:32 (quit) kampsun: Read error: Connection reset by peer 21:34 (join) em 21:34 asumu: Diarmid: there is a parsec-esque library for Racket called parseq on PLaneT. 21:34 asumu: I can't attest to how good it is, but it's there. 21:35 asumu: (It needs better docs... been meaning to ask YC if he'd accept patches) 21:36 Diarmid: asumu: I'll give it a look. I kind of like the idea, especially given the symmetry with fmt, which I really like. 21:41 asumu: Seen on Twitter: https://twitter.com/#!/dlouhy/status/180046188660269057 21:41 asumu: Diarmid: It has docs, but as a series of blog posts. Good blog posts, but not scribble docs nonetheless. 21:47 (quit) em: Ping timeout: 240 seconds 21:52 Diarmid: asumu: I'm curious how people would feel if someone used this to still split things into separate lexing and parsing. 21:53 asumu: Diarmid: Hmm, I thought that you could still do that in parsec. 21:54 asumu hasn't used it in a while though 21:54 Diarmid: asumu: I think it'd be doable, but it looks like people usually mingle it together. I wondered if people would find that 'ugly' since I'm a bit more comfortable with the old fashioned way of thinking about it. 21:59 asumu: Diarmid: http://legacy.cs.uu.nl/daan/download/parsec/parsec.html#SeperateScanners 22:01 Diarmid: asumu: Ok. So I wouldn't get yelled at for that. :) 22:02 asumu: Yeah, probably not. :) 22:08 (quit) yoklov: Quit: computer sleeping 22:17 (quit) bmp: Disconnected by services 22:17 (nick) asurai -> bmp 22:18 (join) yoklov 22:29 (quit) bmp: Quit: Bye! 22:31 (join) veer 22:32 (join) mithos28 22:39 (quit) vkz: Quit: vkz 22:51 (join) em 22:57 (quit) em: Ping timeout: 240 seconds 23:05 (part) ben_m: "Leaving" 23:07 (join) jonrafkind 23:08 (quit) agam: Quit: Computer has gone to sleep 23:23 (join) Fare 23:27 (join) AlbireoX 23:42 (join) em