2015-01-21T00:00:04Z pjb: Everybody has it, more or less. Or else we wouldn't be programmer. 2015-01-21T00:00:14Z lrs_: lol 2015-01-21T00:00:25Z daowee quit (Ping timeout: 256 seconds) 2015-01-21T00:00:51Z pjb: Do you have a file where you're editing this function? Or do you retype it everytime in irc and elsewhere? 2015-01-21T00:01:01Z lrs_: No I have a file with everything 2015-01-21T00:01:06Z pjb: good. 2015-01-21T00:01:18Z lrs_: <- Bad memory but not stupid 2015-01-21T00:01:22Z pjb: :-) 2015-01-21T00:01:38Z pjb: Anyways, Once you have a function that can be defined in the repl without error, you may test it. 2015-01-21T00:01:53Z pjb: (find-if even? '(1 3 5 2 4 6)) --> 2 2015-01-21T00:01:58Z pjb: (find-if even? '(1 3 5 7 9)) --> nil 2015-01-21T00:02:04Z pjb: (find-if even? '()) --> nil 2015-01-21T00:02:14Z pjb: (find-if even? '(2 4 6)) --> 2 2015-01-21T00:02:47Z lrs_: Well, I need to define predicate? first 2015-01-21T00:03:01Z pjb: There's no function named predicate? 2015-01-21T00:03:06Z lrs_: Nope 2015-01-21T00:03:07Z pjb: predicate? is the name of a parameter. 2015-01-21T00:03:23Z pjb: You don't define it. You pass a predicate as argument to the function find-if. 2015-01-21T00:03:33Z pjb: Check the examples I just gave. Here, the predicate is even? 2015-01-21T00:03:35Z lrs_: Oh, thats right 2015-01-21T00:03:41Z pjb: You may try with odd? 2015-01-21T00:03:47Z pjb: or with integer? 2015-01-21T00:03:49Z lrs_: Im just used to write predicate? and then when i write with an ? I usually define it with something 2015-01-21T00:04:13Z pjb: (find-if integer? '("hello" world 4.2 33 75)) --> 33 2015-01-21T00:04:59Z pjb: Yes, in this case, the question mark is used to remember that the parameter is a predicate function. It is redundant with the name of the parameter which is already predicate?. 2015-01-21T00:05:10Z vdamewood joined #scheme 2015-01-21T00:05:14Z pjb: We could have named it found? 2015-01-21T00:05:23Z pjb: (define (find-if found? list) …) 2015-01-21T00:05:44Z pjb: if you prefer, you can name it found? instead of predicate? 2015-01-21T00:06:20Z lrs_: Thats probably a better name 2015-01-21T00:10:22Z jlongster joined #scheme 2015-01-21T00:10:45Z lrs_: pjb, Weird. Some of them work. Some dont. 2015-01-21T00:11:02Z pjb: which don't work? 2015-01-21T00:11:58Z lrs: > (find-if integer? '("hello" world 4.2 33 75)) 2015-01-21T00:11:58Z lrs: (world 4.2 33 75) 2015-01-21T00:12:03Z xyh quit (Ping timeout: 265 seconds) 2015-01-21T00:12:17Z lrs: (find-if even? '(2 4 6)) -> 2 2015-01-21T00:12:34Z lrs: (find-if even? '(1 3 5 7 9)) -> 3 5 7 9 2015-01-21T00:13:22Z pjb: So your else branch is false. 2015-01-21T00:13:27Z pjb: wrong 2015-01-21T00:13:43Z pjb: I told you to check the syntax of cond. 2015-01-21T00:14:03Z pjb: (cond (test1 expression1) (test2 expression2) (else expresssionE)) 2015-01-21T00:14:23Z lrs: Oh right, you need to write else 2015-01-21T00:14:45Z pjb: If you write (cond (test1 expression1) (test2 expression2) (find-if predicate? (cdr lst))) then the last is a test for find-if which is true, then it evaluates predicate? and ignore it, then it evaluates and returns (cdr lst). 2015-01-21T00:16:06Z lrs: ah 2015-01-21T00:16:16Z lrs: I figured it was something to do with cdr 2015-01-21T00:16:30Z lrs: (define (find-if found? lst) 2015-01-21T00:16:30Z lrs: (cond ((null? (car lst)) 'nil ) 2015-01-21T00:16:31Z lrs: ((found? (car lst))(car lst)) 2015-01-21T00:16:31Z lrs: (else (find-if found? (car lst))))) 2015-01-21T00:16:39Z lrs: Thats how it looks like right now, but its something wrong. 2015-01-21T00:21:32Z lrs_: cdr: contract violation expected: pair? given: --> 2015-01-21T00:21:33Z lrs_: :S 2015-01-21T00:23:10Z pjb: find-if takes a predicate and a list. What is (car lst)? 2015-01-21T00:24:59Z lrs_: pjb, you mean it should lst ? 2015-01-21T00:25:06Z pjb: it should be A list. 2015-01-21T00:25:10Z pjb: (car lst) is an element. 2015-01-21T00:25:15Z pjb: (cdr lst) is a list. 2015-01-21T00:25:26Z lrs_: Oh 2015-01-21T00:25:43Z pjb: also, when the first element is not found?, then there's no need to test it again, so we can process only (cdr lst). 2015-01-21T00:26:16Z lrs_: lol @ success 2015-01-21T00:26:18Z pjb: And this is what makes recursion work: we call it recursively on a smaller data structure, so eventually it will be empty, and we will be able to return nil. 2015-01-21T00:28:00Z pjb: Then if it works well, you should be able to run the test function. 2015-01-21T00:30:28Z pjb: Now, there remain a little problem. 2015-01-21T00:31:05Z xyh joined #scheme 2015-01-21T00:31:25Z pjb: in type-atom? we have a literal list of the type atoms. But this list could change depending on the rules. If you add a rules with a new type, then this type-atom? function would have to be updated. 2015-01-21T00:32:25Z pjb: Instead, we could write a function that would scan all the rules, and collect all the type atoms in a type-atoms list. Then each time we change the rules, we could call this function to update this type-atoms list. 2015-01-21T00:33:13Z lrs_: Hmm 2015-01-21T00:33:50Z pjb: http://paste.lisp.org/+3440/5 2015-01-21T00:35:03Z lrs_ scratches head 2015-01-21T00:35:13Z lrs_: pjb, Can you explain a bit what that is? 2015-01-21T00:35:23Z lrs_: Like the purpose 2015-01-21T00:35:31Z pjb: I just did. 2015-01-21T00:35:37Z pjb: and this is the whole code of the project. 2015-01-21T00:36:02Z pjb: Do you want me to copy and paste the explaination again? 2015-01-21T00:36:51Z pjb: Also, notice the comment in each function explaining what it does. 2015-01-21T00:37:14Z lrs_: pjb, No its ok. I was just wondering of the stuff that was added on just now. What it doesm kind of like a breaf descripotion what yo uadded and why 2015-01-21T00:37:21Z lrs_: And the atom thing 2015-01-21T00:37:34Z lrs_: *brief description 2015-01-21T00:37:44Z pjb: check all-types-in-rules and update-type-atoms 2015-01-21T00:38:00Z pjb: also notice how I extracted the function matching-rule. 2015-01-21T00:39:06Z lrs_: pjb, Ok, can you give me some time so I can look at it 2015-01-21T00:39:19Z pjb: sure 2015-01-21T00:40:35Z hiroakip quit (Ping timeout: 272 seconds) 2015-01-21T00:42:30Z vdamewood quit (Quit: ["Textual IRC Client: www.textualapp.com"]) 2015-01-21T00:43:59Z masm joined #scheme 2015-01-21T00:45:28Z pjb: The functions such as find-if flatten remove-duplicates can often be found in libraries (SRFIs). They are general functions that can be reused in various programs. 2015-01-21T00:45:47Z lrs_: Yes, I figured that 2015-01-21T00:45:51Z pjb: Other functions such as matching-rules type-atoms? apply-rules are small functions required by the specific program. 2015-01-21T00:46:21Z lrs_: I think my question marks is around the atom-thing nad flatten 2015-01-21T00:46:44Z pjb: In any case, the idea is to write small functions that do one thing and only one, defering to other functions the other abstractions. 2015-01-21T00:47:33Z pjb: You could try the subexpression: (map (lambda (rule) (cons (rule-result-type rule) (rule-argument-types rule))) rules) to understand why we apply flatten and remove-duplicates. 2015-01-21T00:48:03Z acarrico quit (Quit: Leaving.) 2015-01-21T00:49:18Z Riastradh joined #scheme 2015-01-21T00:50:01Z kongtomorrow joined #scheme 2015-01-21T00:55:09Z acarrico joined #scheme 2015-01-21T00:57:58Z xyh quit (Ping timeout: 265 seconds) 2015-01-21T01:00:07Z lrs_: pjb, So how do I replace the rules thing 2015-01-21T01:00:11Z lrs_: pjb, So that I can write 2015-01-21T01:00:17Z lrs_: (check (+ int int)) 2015-01-21T01:00:22Z lrs_: And get booleans, int, etc 2015-01-21T01:00:33Z lrs_: pjb, Because right now, theyre not really defined 2015-01-21T01:01:01Z aranhoide joined #scheme 2015-01-21T01:01:19Z pjb: You must quote the type expressions, because they are not lisp forms: (check '(+ int int)) 2015-01-21T01:02:07Z pjb: Now to update the rules, you have two choices: either you edit the define rules and re-evaluate it (but it's actually not defined by the standard what happens when we do that), or you write a function to add rules. 2015-01-21T01:02:31Z lrs_: pjb, (check '(= (< (+ int int) (quotient int int)) (> int int))) ----> car: contract violation expected: pair? given: () in (define (find-if found? lst) (cond ((null? (car lst)) 'nil ) 2015-01-21T01:03:46Z xyh joined #scheme 2015-01-21T01:06:05Z pjb: I've added add-rule: http://paste.lisp.org/+3440/6 2015-01-21T01:06:36Z pjb: You want to test whether the list is empty, not whether the first element of the list is empty. 2015-01-21T01:08:17Z lrs_: pjb, Now I get type error 2015-01-21T01:10:32Z lrs_: And it points to (apply-rules op (map check args)) 2015-01-21T01:10:42Z lrs_: 8 i change it so that null? lst 2015-01-21T01:11:59Z pjb: Yes you want to test (null? lst), not (null? (car lst)). 2015-01-21T01:12:43Z pjb: check the comment I have in my check function. If you uncomment the display, you will be able to see the recursive calls to check. This can help you debug when you have errors. 2015-01-21T01:15:45Z ddp joined #scheme 2015-01-21T01:16:01Z lrs_: (check (= (< (+ int int) (quotient int int)) (> int int))) ---> (check (< (+ int int) (quotient int int))) ---> (check (+ int int))---> (check int)---->(check int)---->(check (quotient int int))--->(check int)-->(check int) 2015-01-21T01:16:07Z lrs_: Any clues pjb ? 2015-01-21T01:16:58Z arrdem joined #scheme 2015-01-21T01:18:51Z pjb: works for me: (check '(= (< (+ int int) (quotient int int)) (> int int))) --> bool 2015-01-21T01:19:03Z pjb: Did you add the required rules? 2015-01-21T01:19:23Z pjb: (add-rule '(--> (quotient int int) int)) (add-rule '(--> (= bool bool) bool)) 2015-01-21T01:19:25Z lrs_: THe define rules ? 2015-01-21T01:20:26Z pjb: If you changed the define rules, did you call (update-type-atoms)? 2015-01-21T01:20:34Z pjb: Notice how add-rule calls it automatically. 2015-01-21T01:21:55Z bb010g joined #scheme 2015-01-21T01:22:23Z daviid quit (Ping timeout: 272 seconds) 2015-01-21T01:24:06Z lrs_: pjb, Is the last one the one you did that worked? 2015-01-21T01:24:23Z pjb: Yes. 2015-01-21T01:26:09Z lrs_: Hmm. No rule for quotient int int 2015-01-21T01:26:16Z lrs_: When (check '(= (< (+ int int) (quotient int int)) (> int int))) 2015-01-21T01:29:22Z pjb: http://paste.lisp.org/+3440/7 2015-01-21T01:29:45Z pjb: (check '(= (< (+ int int) (quotient int int)) (> int int))) --> bool 2015-01-21T01:31:22Z hiroakip joined #scheme 2015-01-21T01:33:08Z lrs_: pjb, If I copypaste all that and remove the ; before #lang scheme 2015-01-21T01:33:09Z lrs_: I get 2015-01-21T01:33:15Z MichaelRaskin quit (Ping timeout: 265 seconds) 2015-01-21T01:33:18Z zachstone joined #scheme 2015-01-21T01:33:25Z lrs_: if: missing an "else" expression in: (if indent? (begin (newline) (display indent))) 2015-01-21T01:34:16Z lrs_: Now, it works 2015-01-21T01:34:17Z pjb: it's optional. 2015-01-21T01:34:26Z lrs_: That thing was for bugseeking? 2015-01-21T01:34:28Z pjb: then the result is "undefined". 2015-01-21T01:34:45Z pjb: It's to pretty print the define form. 2015-01-21T01:35:00Z pjb: Otherwise we could just type: `(define rules ',rules) but this wouldn't print nicely. 2015-01-21T01:35:16Z lrs_: pjb, what about (check '(* int (+ real int))) 2015-01-21T01:35:32Z pjb: later, you will read about files in scheme (in r5rs), and write functions to load rules from a file, and save them there, after having called add-rule. 2015-01-21T01:35:39Z lrs_: Then it has to print, the perator '+) has to have operands of the same numerical type 2015-01-21T01:35:46Z pjb: (check '(* int (+ real int))) --> real 2015-01-21T01:36:08Z davexunit joined #scheme 2015-01-21T01:36:09Z pjb: Then remove the rule for (+ real int)! 2015-01-21T01:36:13Z pjb: I don't know your rules. 2015-01-21T01:36:24Z pjb: That's why rules are in a variable: so you may vary them. 2015-01-21T01:36:47Z lrs_: pjb, If I want to to write a faulty message, what do I do? 2015-01-21T01:39:26Z pjb: (error "faulty message") 2015-01-21T01:40:34Z lrs: pjb, It goes haywire then 2015-01-21T01:40:36Z pjb: now for now rules are very rudimentary. We could have smarter rules. For example, (--> (+ ?a ?a) ?a) which means that + with two arguments of the same type returns the same type. 2015-01-21T01:41:05Z lrs: It goes to apply-rules and says (error "type error, there's no rule for:" (cons operator arg-types)) 2015-01-21T01:41:22Z pjb: what goes there? 2015-01-21T01:41:41Z pjb: I provided you with my correct code. You can compare. 2015-01-21T01:41:49Z lrs: (error "type error, there's no rule for:" (cons operator arg-types)) 2015-01-21T01:42:00Z lrs: type error, there's no rule for: (+ (error "faulty message") int) 2015-01-21T01:42:13Z pjb: Good then. 2015-01-21T01:42:29Z pjb: I don't understand the problem. 2015-01-21T01:42:42Z lrs: Well, I wrote in the rules 2015-01-21T01:42:45Z lrs: The error message 2015-01-21T01:43:05Z lrs: But it prints "type error, there's no rule for:" and then the error message that i put in rules 2015-01-21T01:43:19Z pjb: you cannot put an error message in rules. 2015-01-21T01:43:26Z pjb: It's not _defined_. 2015-01-21T01:43:44Z pjb: The definition of a rule is that it's a list of the form (--> (operator . argument-types) result-type). 2015-01-21T01:43:48Z pjb: There's no error message in there. 2015-01-21T01:44:02Z lrs: pjb, so, how do I do so that it gives me a false error message? 2015-01-21T01:44:11Z lrs: because its real right now. Which it shouldnt be 2015-01-21T01:44:17Z pjb: If you want to add an error message specific to a rule, then you need to DEFINE the new format, and MODIFY the program to IMPLEMENT this new DEFINITION. 2015-01-21T01:44:45Z pjb: Then replace the call to error by the "false" result you want to obtain. 2015-01-21T01:45:25Z pjb: There are two calls to error that you need to replace: one in check and one in apply-rules. 2015-01-21T01:45:48Z pjb: You could replace (error …) with (list 'error …) 2015-01-21T01:46:17Z pjb: but you may want to propagate this result from recursive calls, instead of wrapping it. 2015-01-21T01:46:50Z pjb: This means that check becomes more complex. 2015-01-21T01:47:04Z lrs: So i need to create another condition in check 2015-01-21T01:48:40Z lrs: So that when... (+ real int)... It gives me an error message where "+" has to have the same *numeric* operands 2015-01-21T01:48:43Z hiroakip quit (Ping timeout: 265 seconds) 2015-01-21T01:48:48Z lrs: Is that right? 2015-01-21T01:49:36Z pjb: Do you have to return a sexp expressing that? 2015-01-21T01:49:54Z lrs: Just an error expressing that 2015-01-21T01:50:10Z pjb: What about (+ a b)? 2015-01-21T01:50:17Z pjb: or (+ bool string) ? 2015-01-21T01:50:40Z lrs: The proram should only work with int real and bool 2015-01-21T01:50:51Z pjb: or (+ bool int) ? 2015-01-21T01:50:51Z lrs: So, (* int bool) doesnt work 2015-01-21T01:51:09Z pjb: anyways, for now, the rules are not algorithmic. 2015-01-21T01:51:14Z pjb: As I said, they're very simple. 2015-01-21T01:51:35Z pjb: If you want to add algorithmic checks, then you will have to add new kinds of rules. 2015-01-21T01:51:55Z arrdem quit (Quit: leaving) 2015-01-21T01:52:05Z pjb: For example, one thing that you could do, before adding new kinds of rules, is to collect the rules by operator. 2015-01-21T01:52:43Z pjb: But I will leave you do all those addition by yourself. 2015-01-21T01:53:17Z lrs: pjb, Ok, so basically. I should look at rules, and there fix the error messages? 2015-01-21T01:53:31Z lrs: And then look at check and see what happens 2015-01-21T01:53:52Z lrs: pjb, Are you leaving? 2015-01-21T01:54:01Z pjb: intermitently. 2015-01-21T01:54:15Z lrs: pjb, Thank you _sooooooooo_ much for the help, really 2015-01-21T01:54:21Z arrdem joined #scheme 2015-01-21T01:54:42Z lrs: This has made me learn alot of stuff and it would probably have taken me a week to figure this out by myself 2015-01-21T01:55:05Z lrs: Im gonna work with this more and polish it 2015-01-21T01:55:10Z pjb: You could have rules such as: `(rule for + (algorithmic ,check-argument-same-type) (--> (?a ?a) ?a)) 2015-01-21T01:55:23Z lrs: Ah 2015-01-21T01:55:39Z lrs: Now it is "set in stone" or whatever 2015-01-21T01:55:52Z pjb: There's nothing set in stone, this is SOFT ware. 2015-01-21T01:56:07Z lrs: No I meant 2015-01-21T01:56:15Z lrs: The wya the rules are now, they are hardcoded 2015-01-21T01:56:33Z lrs: Sounds like a better solution the way you said, that way i could print out operator-type in the error message too 2015-01-21T01:57:49Z lrs: pjb, Thanks again though 2015-01-21T01:58:50Z pjb: well, with `(… (algorithmic ,check-argument-same-type) …) I propose to insert in the rule list the actual function to be called to perform algorithmic check but this could be a problem if you want to save the rules in files. 2015-01-21T01:59:24Z pjb: It may be better to define your own "language", and "interpret" it, rather than blindly calling such scheme functions. 2015-01-21T02:00:04Z pjb: So you could write: (rule-for + check-arguments-same-type (--> (?a ?a) ?a)) 2015-01-21T02:00:23Z pjb: (rule-for + check-arguments-same-type check-arguments-numeric-type (--> (?a ?a) ?a)) 2015-01-21T02:00:32Z pjb: well, we can s/check-// 2015-01-21T02:00:42Z pjb: (rule-for + arguments-same-type arguments-numeric-type (--> (?a ?a) ?a)) 2015-01-21T02:01:30Z lrs: What does (?a ?a) ?a)) symbolise? 2015-01-21T02:03:59Z Fare quit (Ping timeout: 245 seconds) 2015-01-21T02:05:09Z pjb: ?x is a convention often used in pattern matching expressions. 2015-01-21T02:05:17Z pjb: It stands for variables in the pattern. 2015-01-21T02:05:38Z hiyosi quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2015-01-21T02:06:09Z pjb: So (--> (?a ?a) ?a) means that the argument type list must match (?a ?a) ie: it must contain two identical types, and if that's the case, the result type is ?a, that is the type of the arguments. 2015-01-21T02:06:25Z pjb: So (+ int int) --> int and (+ real real) --> real 2015-01-21T02:06:55Z pjb: (--> (?a ?a) ?a) would also match (+ bool bool) --> bool, but this would be rejected by arguments-numeric-type 2015-01-21T02:07:13Z kongtomorrow quit 2015-01-21T02:08:59Z turtleman_ quit (Ping timeout: 245 seconds) 2015-01-21T02:15:34Z echo-area joined #scheme 2015-01-21T02:20:39Z tobik quit (Ping timeout: 245 seconds) 2015-01-21T02:21:36Z tobik joined #scheme 2015-01-21T02:25:22Z iKlsR quit (Quit: Respawning..) 2015-01-21T02:25:23Z zachstone quit (Ping timeout: 240 seconds) 2015-01-21T02:31:04Z excelsior joined #scheme 2015-01-21T02:34:27Z pjb quit (Ping timeout: 245 seconds) 2015-01-21T02:35:39Z githogori quit (Ping timeout: 244 seconds) 2015-01-21T02:37:36Z Bahman quit (Quit: zzZZ) 2015-01-21T02:38:27Z frkout_ joined #scheme 2015-01-21T02:39:19Z kibo joined #scheme 2015-01-21T02:39:27Z frkout_ quit (Remote host closed the connection) 2015-01-21T02:39:55Z frkout_ joined #scheme 2015-01-21T02:40:05Z pjb joined #scheme 2015-01-21T02:42:03Z cosmez quit (Ping timeout: 245 seconds) 2015-01-21T02:42:03Z frkout quit (Ping timeout: 264 seconds) 2015-01-21T02:43:59Z frkout_ quit (Remote host closed the connection) 2015-01-21T02:44:05Z frkout joined #scheme 2015-01-21T02:44:46Z Fare joined #scheme 2015-01-21T02:47:13Z githogori joined #scheme 2015-01-21T02:51:12Z nowhereman_ joined #scheme 2015-01-21T02:51:27Z nowhere_man_ quit (Ping timeout: 252 seconds) 2015-01-21T02:52:18Z theseb joined #scheme 2015-01-21T02:58:26Z turtleman_ joined #scheme 2015-01-21T03:08:29Z Rptx quit (Quit: gone!) 2015-01-21T03:15:06Z davexunit quit (Quit: Later) 2015-01-21T03:20:59Z theseb quit (Quit: Leaving) 2015-01-21T03:22:16Z kongtomorrow joined #scheme 2015-01-21T03:30:03Z Neet quit (Read error: Connection reset by peer) 2015-01-21T03:30:18Z frkout quit (Remote host closed the connection) 2015-01-21T03:30:44Z frkout joined #scheme 2015-01-21T03:30:44Z ggherdov quit (Read error: Connection reset by peer) 2015-01-21T03:35:45Z turtleman_ quit (Ping timeout: 276 seconds) 2015-01-21T03:39:05Z kongtomorrow quit 2015-01-21T03:41:43Z Fare quit (Quit: Leaving) 2015-01-21T03:44:33Z kibo is now known as cosmez 2015-01-21T03:45:12Z Neet joined #scheme 2015-01-21T03:46:33Z ggherdov joined #scheme 2015-01-21T03:53:25Z Neet quit (Ping timeout: 252 seconds) 2015-01-21T03:54:31Z joneshf-laptop quit (Read error: Connection reset by peer) 2015-01-21T03:55:01Z joneshf-laptop joined #scheme 2015-01-21T03:58:11Z ggherdov quit (Ping timeout: 272 seconds) 2015-01-21T03:59:07Z cdidd_ quit (Remote host closed the connection) 2015-01-21T04:00:22Z enitiz quit (Remote host closed the connection) 2015-01-21T04:03:18Z cdidd joined #scheme 2015-01-21T04:12:13Z gravicappa joined #scheme 2015-01-21T04:12:39Z Neet joined #scheme 2015-01-21T04:23:16Z amgarchIn9 joined #scheme 2015-01-21T04:23:57Z adu joined #scheme 2015-01-21T04:26:54Z ggherdov joined #scheme 2015-01-21T04:27:06Z alexei___ quit (Ping timeout: 276 seconds) 2015-01-21T04:28:57Z tmh_ joined #scheme 2015-01-21T04:31:02Z vanila joined #scheme 2015-01-21T04:32:59Z pera quit (Quit: leaving) 2015-01-21T04:33:16Z tmh_ quit (Changing host) 2015-01-21T04:33:17Z tmh_ joined #scheme 2015-01-21T04:33:32Z xyh quit (Ping timeout: 265 seconds) 2015-01-21T04:34:29Z kazimir42 joined #scheme 2015-01-21T04:34:51Z Vutral joined #scheme 2015-01-21T04:39:24Z lrs quit (Ping timeout: 245 seconds) 2015-01-21T04:39:37Z lrs_ quit (Ping timeout: 252 seconds) 2015-01-21T04:40:52Z ddp quit (Quit: ddp) 2015-01-21T04:42:42Z enitiz joined #scheme 2015-01-21T04:45:19Z vdamewood joined #scheme 2015-01-21T04:48:57Z jlongster quit (Ping timeout: 244 seconds) 2015-01-21T04:53:24Z Vutral quit (Ping timeout: 244 seconds) 2015-01-21T04:53:48Z xyh joined #scheme 2015-01-21T04:55:32Z badkins quit 2015-01-21T05:02:48Z ddp joined #scheme 2015-01-21T05:02:48Z ddp quit (Client Quit) 2015-01-21T05:14:18Z fsckd quit (Ping timeout: 264 seconds) 2015-01-21T05:18:00Z zacts: oh yeah in scheme 2015-01-21T05:18:12Z zacts: there is an implicit begin in each lambda definition? 2015-01-21T05:18:25Z xyh: zacts: yes 2015-01-21T05:18:27Z zacts: so the steps within a lambda definition are evaluated in order? 2015-01-21T05:18:28Z zacts: ok 2015-01-21T05:18:29Z zacts: cool 2015-01-21T05:18:33Z racycle joined #scheme 2015-01-21T05:19:51Z xyh: zacts: the arguments of a function call are not evaluated in order, (f v1 v2 v3), v1 v2 v3 are no order. 2015-01-21T05:20:28Z xyh: zacts: so is to (let ((v1 ...) (v2 ...) (v3 ...)) ...) 2015-01-21T05:20:46Z jlongster joined #scheme 2015-01-21T05:24:32Z zacts: I know the arguments aren't evaluated in order 2015-01-21T05:24:54Z zacts: it was the steps (lambda (x y z) ) 2015-01-21T05:25:11Z zachstone joined #scheme 2015-01-21T05:25:24Z zacts: ((lambda ( ) ...) x y z) 2015-01-21T05:25:35Z jlongster quit (Ping timeout: 272 seconds) 2015-01-21T05:42:41Z zbigniew quit (Ping timeout: 252 seconds) 2015-01-21T05:42:56Z zbigniew joined #scheme 2015-01-21T06:00:31Z mrowe is now known as mrowe_away 2015-01-21T06:07:08Z enitiz quit (Ping timeout: 246 seconds) 2015-01-21T06:09:33Z oleo__ quit (Quit: Verlassend) 2015-01-21T06:18:15Z steenuil quit (Quit: SEIZON SENRYAKU) 2015-01-21T06:20:17Z zachstone quit (Ping timeout: 245 seconds) 2015-01-21T06:23:09Z Vutral joined #scheme 2015-01-21T06:23:13Z adu quit (Quit: adu) 2015-01-21T06:23:37Z Vutral quit (Excess Flood) 2015-01-21T06:25:35Z vanila: anyone who uses saggitarius scheme? 2015-01-21T06:28:34Z xyh quit (Ping timeout: 265 seconds) 2015-01-21T06:32:46Z kongtomorrow joined #scheme 2015-01-21T06:35:55Z kazimir42 quit (Ping timeout: 250 seconds) 2015-01-21T06:40:08Z racycle quit (Quit: ZZZzzz…) 2015-01-21T06:40:28Z bjz joined #scheme 2015-01-21T06:43:37Z Vutral joined #scheme 2015-01-21T06:43:59Z Vutral quit (Changing host) 2015-01-21T06:43:59Z Vutral joined #scheme 2015-01-21T06:46:40Z vanila: where can I get some R7RS code to try out 2015-01-21T06:47:04Z hiroakip joined #scheme 2015-01-21T06:52:42Z gravicappa quit (Ping timeout: 264 seconds) 2015-01-21T06:54:53Z REPLeffect quit (Ping timeout: 272 seconds) 2015-01-21T06:56:05Z MichaelRaskin joined #scheme 2015-01-21T07:01:51Z excelsior quit (Quit: Lost terminal) 2015-01-21T07:02:45Z Vutral quit (Excess Flood) 2015-01-21T07:03:22Z hiroakip quit (Ping timeout: 265 seconds) 2015-01-21T07:06:25Z bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) 2015-01-21T07:06:47Z Vutral joined #scheme 2015-01-21T07:07:10Z Isp-sec joined #scheme 2015-01-21T07:07:28Z jeapostrophe joined #scheme 2015-01-21T07:07:28Z jeapostrophe quit (Changing host) 2015-01-21T07:07:28Z jeapostrophe joined #scheme 2015-01-21T07:17:35Z hiroakip joined #scheme 2015-01-21T07:20:08Z Vutral quit (Ping timeout: 244 seconds) 2015-01-21T07:20:17Z psy_ quit (Ping timeout: 246 seconds) 2015-01-21T07:26:09Z psy_ joined #scheme 2015-01-21T07:28:00Z brianmwaters joined #scheme 2015-01-21T07:28:17Z aranhoide quit (Ping timeout: 252 seconds) 2015-01-21T07:28:21Z bjz joined #scheme 2015-01-21T07:35:27Z jeapostrophe quit (Ping timeout: 256 seconds) 2015-01-21T07:36:30Z amgarchIn9 quit (Ping timeout: 264 seconds) 2015-01-21T07:37:02Z bjz quit (Max SendQ exceeded) 2015-01-21T07:38:59Z bjz joined #scheme 2015-01-21T07:39:00Z bjz quit (Client Quit) 2015-01-21T07:39:51Z hiroakip quit (Ping timeout: 272 seconds) 2015-01-21T07:43:21Z aranhoide joined #scheme 2015-01-21T07:47:43Z aranhoide quit (Read error: Connection reset by peer) 2015-01-21T07:48:46Z jlongster joined #scheme 2015-01-21T07:51:00Z REPLeffect joined #scheme 2015-01-21T07:53:18Z jlongster quit (Ping timeout: 264 seconds) 2015-01-21T07:57:39Z bjz joined #scheme 2015-01-21T08:02:39Z kazimir42 joined #scheme 2015-01-21T08:03:34Z brianmwaters quit (Quit: Leaving) 2015-01-21T08:04:05Z kibo joined #scheme 2015-01-21T08:07:01Z cosmez quit (Ping timeout: 255 seconds) 2015-01-21T08:07:19Z benregn joined #scheme 2015-01-21T08:07:47Z cosmez joined #scheme 2015-01-21T08:10:41Z kibo quit (Ping timeout: 246 seconds) 2015-01-21T08:10:49Z srenatus joined #scheme 2015-01-21T08:11:51Z Vutral joined #scheme 2015-01-21T08:11:54Z msgodf joined #scheme 2015-01-21T08:13:25Z cosmez quit (Ping timeout: 272 seconds) 2015-01-21T08:17:19Z bb010g quit (Quit: Connection closed for inactivity) 2015-01-21T08:23:58Z cosmez joined #scheme 2015-01-21T08:31:46Z jeapostrophe joined #scheme 2015-01-21T08:31:46Z jeapostrophe quit (Changing host) 2015-01-21T08:31:46Z jeapostrophe joined #scheme 2015-01-21T08:36:39Z jeapostrophe quit (Ping timeout: 256 seconds) 2015-01-21T08:37:43Z gravicappa joined #scheme 2015-01-21T08:41:57Z chu quit (Ping timeout: 245 seconds) 2015-01-21T08:44:08Z chu joined #scheme 2015-01-21T08:44:59Z taylanub: vanila: https://gitorious.org/taylan-scheme/srfi/ 2015-01-21T08:45:57Z taylanub: maybe also the R7 parts of bytestructures https://gitorious.org/taylan-scheme/bytestructures though Saggitarius supports R6 as well doesn't it 2015-01-21T08:46:13Z vanila: thanks a lot! 2015-01-21T08:46:21Z kazimir42 quit (Ping timeout: 250 seconds) 2015-01-21T08:51:05Z mrowe_away is now known as mrowe 2015-01-21T08:53:24Z redeemed joined #scheme 2015-01-21T08:59:54Z frkout_ joined #scheme 2015-01-21T09:02:53Z frkout quit (Ping timeout: 252 seconds) 2015-01-21T09:03:03Z fantazo joined #scheme 2015-01-21T09:08:44Z excelsior joined #scheme 2015-01-21T09:18:34Z hellofunk quit (Ping timeout: 245 seconds) 2015-01-21T09:20:00Z hellofunk joined #scheme 2015-01-21T09:26:54Z kongtomorrow quit 2015-01-21T09:27:44Z mrowe is now known as mrowe_away 2015-01-21T09:32:08Z taraz`` joined #scheme 2015-01-21T09:35:02Z zwer_b joined #scheme 2015-01-21T09:35:45Z zwer quit (Ping timeout: 250 seconds) 2015-01-21T09:58:29Z chu quit (Ping timeout: 246 seconds) 2015-01-21T09:59:54Z mutley89 quit (Quit: Leaving) 2015-01-21T10:00:22Z chu joined #scheme 2015-01-21T10:03:46Z jeapostrophe joined #scheme 2015-01-21T10:03:46Z jeapostrophe quit (Changing host) 2015-01-21T10:03:46Z jeapostrophe joined #scheme 2015-01-21T10:07:10Z Isp-sec quit (Ping timeout: 255 seconds) 2015-01-21T10:08:34Z jeapostrophe quit (Ping timeout: 245 seconds) 2015-01-21T10:08:43Z benregn quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2015-01-21T10:15:17Z robot-beethoven quit (Quit: ERC Version 5.3 (IRC client for Emacs)) 2015-01-21T10:20:44Z benregn joined #scheme 2015-01-21T10:25:24Z c74d quit (Ping timeout: 265 seconds) 2015-01-21T10:33:45Z b4283 joined #scheme 2015-01-21T10:34:03Z srenatus quit (Quit: Connection closed for inactivity) 2015-01-21T10:36:44Z hellofun` joined #scheme 2015-01-21T10:38:52Z kibo joined #scheme 2015-01-21T10:39:39Z hellofunk quit (Ping timeout: 264 seconds) 2015-01-21T10:41:52Z cosmez quit (Ping timeout: 240 seconds) 2015-01-21T10:42:12Z srenatus joined #scheme 2015-01-21T10:45:16Z hellofun` is now known as hellofunk 2015-01-21T10:52:54Z zacts: hello 2015-01-21T10:54:37Z vanila: hi 2015-01-21T10:55:49Z zacts: do you have any experience with goops? 2015-01-21T10:57:29Z vanila: no 2015-01-21T10:57:35Z vanila: iive heard of it thats all 2015-01-21T10:57:43Z zacts: ah ok 2015-01-21T10:57:53Z zacts: I'll just wait for the guile people to wake up 2015-01-21T10:58:12Z zacts: is there an srfi for a scheme equivalent to CLOS, or is it implementation specific? 2015-01-21T10:59:47Z vanila: http://ktakashi.github.io/sagittarius-online-ref/section5.html thre is this 2015-01-21T11:00:02Z vanila: and by goops I thought you meant http://people.csail.mit.edu/jrb/goo/goo.htm 2015-01-21T11:00:16Z zacts: oh 2015-01-21T11:00:19Z zacts: nope 2015-01-21T11:00:24Z zacts: I mean the guile object system 2015-01-21T11:00:37Z zacts: I'm trying to make a simple editor in guile 2015-01-21T11:00:40Z zacts: like ed 2015-01-21T11:01:57Z LeoNerd: Morning zacts 2015-01-21T11:02:07Z zacts: hi LeoNerd 2015-01-21T11:02:38Z zacts: I'm trying to figure out how to go about doing this 2015-01-21T11:03:00Z zacts: it's just a fun little throwaway project for me 2015-01-21T11:03:08Z zacts: but I hope to learn from it 2015-01-21T11:04:44Z zacts: let me pastebin my code 2015-01-21T11:06:32Z zacts: do you guys mind if I use sprunge.us instead of the channel pastebin? sprunge is raw text, and can be read by lynx 2015-01-21T11:06:54Z zacts: I mean I will still use the /topic pastebin if you want, but it's much easier for me to deal with sprunge 2015-01-21T11:09:03Z zacts: http://paste.lisp.org/display/145304 2015-01-21T11:09:29Z zacts: ^ my question with this simple paste is, how can I group all of the constructors and selectors together as a unit? 2015-01-21T11:09:38Z zacts: while still staying pretty functionalish, and not OOPish? 2015-01-21T11:10:02Z zacts: I guess I want to stay as functionalish as possible, but not if it is going to hurt the overall design 2015-01-21T11:11:46Z hellofunk quit (Remote host closed the connection) 2015-01-21T11:14:11Z zacts: hum.. I just had an idea 2015-01-21T11:14:29Z zacts: how about I make the data contain all of the functionality within it 2015-01-21T11:14:35Z zacts: let me pastebin this new idea 2015-01-21T11:16:59Z zacts: like my (make-buffer) will return a lambda instead of a list 2015-01-21T11:17:08Z DerGuteMoritz: zacts: you should look at define-record-type and friends 2015-01-21T11:17:14Z zacts: ah ok 2015-01-21T11:17:20Z zacts: but those have setters right? 2015-01-21T11:17:24Z zacts: I don't want setters 2015-01-21T11:17:32Z DerGuteMoritz: those are optional 2015-01-21T11:17:35Z zacts: oh, ok 2015-01-21T11:17:38Z zacts: I'll do that then 2015-01-21T11:17:41Z DerGuteMoritz: you can also only make it define getters 2015-01-21T11:18:02Z DerGuteMoritz: it's basically a short-hand syntax for what you just pasted 2015-01-21T11:18:08Z zacts: ok neato 2015-01-21T11:18:19Z DerGuteMoritz: and usually a bit more efficient, too, as record slots can be accessed in constant time 2015-01-21T11:18:30Z zacts: oh kind of like a hash table underneath? 2015-01-21T11:19:51Z DerGuteMoritz: yeah, usually a vector though 2015-01-21T11:20:14Z DerGuteMoritz: but I think that's not guaranteed by the spec, just how it's usually done 2015-01-21T11:20:24Z zacts: sweet 2015-01-21T11:25:33Z zacts: oh cool srfi-9 records mention this 2015-01-21T11:25:52Z zacts: that you can still have setters that return new data, but still stay within the functional immutable paradigm 2015-01-21T11:26:02Z DerGuteMoritz: sure 2015-01-21T11:26:15Z zacts: oh I hope to make some simple cli apps too for fun 2015-01-21T11:26:17Z DerGuteMoritz: e.g. chicken has the defstruct egg which automatically defines such a functional updater procedure 2015-01-21T11:26:33Z zacts: I want to make UNIX style cli apps with scheme 2015-01-21T11:26:40Z zacts: filters mainly 2015-01-21T11:26:49Z DerGuteMoritz: sure 2015-01-21T11:26:56Z zacts: :-) 2015-01-21T11:28:16Z DerGuteMoritz: maybe https://www.kitten-technologies.co.uk/project/magic-pipes/doc/trunk/README.wiki is of interest for you, then 2015-01-21T11:28:16Z rudybot: http://tinyurl.com/mfaqngm 2015-01-21T11:29:23Z zacts: oh that's way cool man 2015-01-21T11:29:24Z zacts: thanks 2015-01-21T11:30:39Z DerGuteMoritz: yw 2015-01-21T11:31:43Z zacts: what datatype should I use, be it records or something else, for a list-like data structure. I want a list of lines for example? 2015-01-21T11:32:04Z vanila: lits 2015-01-21T11:32:06Z vanila: list* 2015-01-21T11:32:29Z zacts: yeah but I still want to bunch the selectors and contsturctor togethery like with the records 2015-01-21T11:32:34Z zacts: together 2015-01-21T11:32:36Z zacts: * 2015-01-21T11:33:27Z MichaelRaskin quit (Quit: MichaelRaskin) 2015-01-21T11:33:29Z zacts: this way I can in the future optimize how I store a buffer's text. i.e. a gap text buffer for example 2015-01-21T11:33:42Z zacts: but for now I just want to get this working without too many optimizations 2015-01-21T11:34:49Z pnkfelix quit (Ping timeout: 245 seconds) 2015-01-21T11:35:32Z zacts: I'm wondering if I can do (define-record-type (make-text . lines) ...) 2015-01-21T11:35:46Z zacts: but then I wonder how I can make (text-car) and (text-cdr) and friends 2015-01-21T11:36:20Z uber_hulk joined #scheme 2015-01-21T11:36:30Z c74d joined #scheme 2015-01-21T11:37:08Z vdamewood quit (Quit: ["Textual IRC Client: www.textualapp.com"]) 2015-01-21T11:37:16Z DerGuteMoritz: nah you would have a "lines" slot in the record 2015-01-21T11:37:38Z DerGuteMoritz: and define record-lines-for-each or something which knows how to handle the internal representation of lines 2015-01-21T11:38:44Z zacts: would record-lines-for-each be defined outside of the record definition? 2015-01-21T11:38:49Z DerGuteMoritz: sure 2015-01-21T11:39:02Z DerGuteMoritz: you want some kind of syntactic grouping? 2015-01-21T11:39:11Z LeoNerd: I've never liked "record" as a word for this.. In English, "record" can be either a noun or a verb. 2015-01-21T11:39:13Z DerGuteMoritz: if so, use a scheme with a module system 2015-01-21T11:39:20Z LeoNerd: I like function names to be very clearly one or the other 2015-01-21T11:39:21Z DerGuteMoritz: yeah record is weird :-) 2015-01-21T11:39:36Z DerGuteMoritz: with define-record-type it's pretty clear though 2015-01-21T11:39:41Z LeoNerd: Yes.. that's fine 2015-01-21T11:40:01Z zacts: eh, sorry for my terminology 2015-01-21T11:40:37Z zacts: DerGuteMoritz: perhaps yeah I want to clump functionality with data as much as possible, without it becoming OOP 2015-01-21T11:40:50Z zacts: unless, you think this is a bad design practice 2015-01-21T11:41:05Z DerGuteMoritz: well, a module / namespace is what you want then 2015-01-21T11:41:18Z DerGuteMoritz: e.g. r7rs' define-library 2015-01-21T11:41:22Z zacts: ah ok, LeoNerd is a module like a package in Perl? 2015-01-21T11:41:47Z zacts: DerGuteMoritz: I don't think Guile supports r7rs yet 2015-01-21T11:41:55Z zacts: let me double check 2015-01-21T11:41:57Z DerGuteMoritz: guile has define-module IIRC 2015-01-21T11:42:01Z zacts: ah ok 2015-01-21T11:42:05Z LeoNerd: zacts: Prettymuch, yah 2015-01-21T11:42:22Z DerGuteMoritz: there's a #guile channel with people who know more about it :-) 2015-01-21T11:42:22Z zacts: ok cool 2015-01-21T11:42:30Z zacts: sure 2015-01-21T11:42:44Z zacts: I'll make sure to ask more scheme specific questions here, and not guile. :-) 2015-01-21T11:42:48Z LeoNerd: Only, Perl packages are "globally named", in that they just exist with a name; if the code is loaded then mere knowledge of that name is enough to find it. Whereas, Scheme modules are lexical - you have to request to import it 2015-01-21T11:46:43Z zacts: heh, ok man 2015-01-21T11:48:00Z uber_hulk: Hi is there any channel for preparing for interviews? 2015-01-21T11:49:26Z DerGuteMoritz: uber_hulk: what kind of interviews? 2015-01-21T11:49:37Z uber_hulk: DerGuteMoritz: tech 2015-01-21T11:49:42Z jumblerg joined #scheme 2015-01-21T11:49:45Z uber_hulk: DerGuteMoritz: and HR both 2015-01-21T11:50:13Z DerGuteMoritz: ok, I'm not aware of channels which expicitly prepare you for any kind of interview :-) 2015-01-21T11:50:29Z uber_hulk: DerGuteMoritz: ok :( 2015-01-21T11:50:46Z uber_hulk: DerGuteMoritz: any book recommendations? 2015-01-21T11:51:23Z C-Keen: uber_hulk: just do it a couple of times, apply for positions that you find interesting but are not too eager to get, that way you can practise 2015-01-21T11:52:16Z uber_hulk: C-Keen: ok, but I am not finding such places to practice that's why 2015-01-21T11:52:31Z jeapostrophe joined #scheme 2015-01-21T11:52:41Z C-Keen: uber_hulk: just that one job offering? 2015-01-21T11:52:53Z uber_hulk: C-Keen: yeah, two 2015-01-21T11:56:32Z jumblerg quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2015-01-21T11:57:19Z jeapostrophe quit (Ping timeout: 245 seconds) 2015-01-21T11:58:10Z uber_hulk: C-Keen: so? 2015-01-21T11:58:35Z C-Keen: uber_hulk: so what? 2015-01-21T11:59:28Z uber_hulk: any other option, C-Keen? 2015-01-21T12:00:20Z C-Keen: uber_hulk: talk to people, find someone positioned in HR, run a fake interview with that person, talk to your friends, spouse, the sea, etc etc 2015-01-21T12:01:03Z uber_hulk: okay got it 2015-01-21T12:01:50Z C-Keen: my point is that you really need to practise the interview situation and actually talk. All else can get you only so far 2015-01-21T12:06:49Z uber_hulk: aha, C-Keen also are there any programming skills that I would learn by reading sicp that would be helpful in interview? 2015-01-21T12:07:12Z C-Keen: depends on the job position 2015-01-21T12:07:35Z uber_hulk: hmm, fresh passout from college 2015-01-21T12:09:05Z uber_hulk: C-Keen: ^ 2015-01-21T12:10:17Z ELLIOTTCABLE is now known as ec 2015-01-21T12:12:02Z wasamasa: there's some website about setting you up with people to do test interviews with 2015-01-21T12:12:21Z uber_hulk: wasamasa: can you please give me link? 2015-01-21T12:13:35Z wasamasa: meh, doubt I can find it again 2015-01-21T12:13:40Z wasamasa: best I could get was https://www.interviewcake.com/free-weekly-coding-interview-problem-newsletter 2015-01-21T12:13:40Z rudybot: http://tinyurl.com/lq2jxpt 2015-01-21T12:14:49Z agumonkey quit (Quit: ZNC - http://znc.in) 2015-01-21T12:15:01Z uber_hulk: wasamasa: that one^? Thanks will have a look 2015-01-21T12:15:16Z wasamasa: uber_hulk: no, it's just questions 2015-01-21T12:15:24Z wasamasa: uber_hulk: that won't help you with the interview part 2015-01-21T12:16:04Z agumonkey joined #scheme 2015-01-21T12:20:03Z uber_hulk: wasamasa: thanks for that 2015-01-21T12:20:14Z wasamasa: you will need to actually go out and have interviews 2015-01-21T12:20:18Z uber_hulk: please let me know if that link stucks your mind 2015-01-21T12:20:45Z wasamasa: well, it wouldn't matter anyways since such things where you get to speak with a real person over the internet tend to be constantly booked out 2015-01-21T12:20:45Z uber_hulk: that I will figure out what I hvae to do 2015-01-21T12:21:00Z uber_hulk: right 2015-01-21T12:21:01Z wasamasa: I've had like two dozen interviews so far for a damn internship that's paying me my college fees 2015-01-21T12:21:12Z wasamasa: and been at three different places 2015-01-21T12:21:19Z uber_hulk: I see 2015-01-21T12:21:35Z wasamasa: I don't want to know how bad it is for a real job :D 2015-01-21T12:22:27Z uber_hulk: wasamasa: I see 2015-01-21T12:22:44Z jumblerg joined #scheme 2015-01-21T12:25:28Z wasamasa: some people tell me I need a master of science, other tell me to get really good and know the right people 2015-01-21T12:26:06Z uber_hulk: hmm 2015-01-21T12:26:16Z booly-yam-5194_ joined #scheme 2015-01-21T12:30:24Z pnkfelix joined #scheme 2015-01-21T12:32:51Z hiyosi joined #scheme 2015-01-21T12:43:43Z taraz`` quit (Ping timeout: 256 seconds) 2015-01-21T12:53:19Z jeapostrophe joined #scheme 2015-01-21T12:53:19Z jeapostrophe quit (Changing host) 2015-01-21T12:53:19Z jeapostrophe joined #scheme 2015-01-21T12:58:02Z zadock joined #scheme 2015-01-21T12:58:37Z jeapostrophe quit (Ping timeout: 265 seconds) 2015-01-21T13:12:20Z lrs_ joined #scheme 2015-01-21T13:13:35Z lrs joined #scheme 2015-01-21T13:16:42Z psy_ quit (Read error: No route to host) 2015-01-21T13:18:31Z psy_ joined #scheme 2015-01-21T13:19:06Z psy_ quit (Max SendQ exceeded) 2015-01-21T13:19:33Z psy_ joined #scheme 2015-01-21T13:20:38Z wingo joined #scheme 2015-01-21T13:24:41Z jumblerg quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2015-01-21T13:25:11Z fsckd joined #scheme 2015-01-21T13:27:08Z joan_ joined #scheme 2015-01-21T13:29:27Z alezost joined #scheme 2015-01-21T13:30:30Z joan quit (Ping timeout: 276 seconds) 2015-01-21T13:34:46Z hellofunk joined #scheme 2015-01-21T13:40:22Z psy_ quit (Ping timeout: 240 seconds) 2015-01-21T13:40:23Z jumblerg joined #scheme 2015-01-21T13:45:52Z taylanub quit (Disconnected by services) 2015-01-21T13:46:27Z taylanub joined #scheme 2015-01-21T13:46:53Z karswell joined #scheme 2015-01-21T13:48:01Z psy_ joined #scheme 2015-01-21T13:48:37Z Vutral quit (Ping timeout: 245 seconds) 2015-01-21T13:52:53Z enitiz joined #scheme 2015-01-21T13:53:53Z Cheery joined #scheme 2015-01-21T13:54:28Z davexunit joined #scheme 2015-01-21T13:55:55Z Cheery: I have a problem, I suspect someone here might have already solved something like it. 2015-01-21T13:56:03Z technomancy left #scheme 2015-01-21T13:57:08Z Cheery: it's related to this: https://github.com/cheery/textended-edit/ 2015-01-21T13:57:35Z Cheery: but I suspect you're not willing to read 2000 lines of python. 2015-01-21T13:57:42Z Cheery: so I explain what's the problem. 2015-01-21T13:59:25Z Cheery: the project replaces (or extends) text representation with labelled lists, binary blobs, strings, and unlabelled symbols 2015-01-21T14:00:48Z Cheery: it's got a programmable layout engine. basically you can define a function which produces a box model from the document 2015-01-21T14:01:42Z Cheery: it's annotated such that you can select portions using a mouse, and navigate with cursors in the structure. 2015-01-21T14:02:19Z Cheery: the document model can be anything, as long as it can be 'projected' into a tree. 2015-01-21T14:05:49Z Vutral joined #scheme 2015-01-21T14:07:26Z Cheery: the problem is. For this to be useful, translation is needed from the document model, into structures used by various languages 2015-01-21T14:07:41Z Cheery: it is analogous to the transformation the layout engine must do 2015-01-21T14:08:48Z Cheery: now I'm wondering. Would there be more effective document model than the labelled lists, which is inspired from lisp. 2015-01-21T14:09:37Z pjb: Probably. 2015-01-21T14:10:16Z pjb: A few years ago, somebody in #lisp worked on a multi-facet editor in CL. There were a few videos on youtube. I've see also other projects like this. 2015-01-21T14:10:22Z jeapostrophe joined #scheme 2015-01-21T14:10:23Z jeapostrophe quit (Changing host) 2015-01-21T14:10:23Z jeapostrophe joined #scheme 2015-01-21T14:13:03Z pjb: You could imagine a data structure where you have "nodes" having various attributes, and a multidimensionnal "grid" where those nodes are ordered according to those attributes. When editing a node, if an attribute is modified, it's position may change on that plane. You may visualize the document from any plane of the grid. 2015-01-21T14:16:48Z Cheery: difficult to wrap my head around that. Some sort of multidimensional spreadsheet? 2015-01-21T14:19:42Z uris77 joined #scheme 2015-01-21T14:21:20Z gravicappa quit (Remote host closed the connection) 2015-01-21T14:22:47Z Cheery: keeping thinking it's a common problem. xml schemas are perhaps something similar to what I'm looking at 2015-01-21T14:23:03Z badkins joined #scheme 2015-01-21T14:26:02Z Cheery: you've got generic representation for thing, which allows more variation than is understood by something that reads the representation 2015-01-21T14:27:10Z Bahman joined #scheme 2015-01-21T14:33:21Z Cheery: Took a screenshot inside the software to illustrate: http://i.imgur.com/dOrHEql.png 2015-01-21T14:34:14Z Cheery: I got some validation with the current structure 2015-01-21T14:34:27Z Cheery: implemented here: https://github.com/cheery/textended-edit/blob/master/tpython.py 2015-01-21T14:35:03Z Cheery: the amount of code though.. it's quite a lot and it's possible this same mechanism may not fit layouting. 2015-01-21T14:37:08Z adu joined #scheme 2015-01-21T14:37:13Z pjb: Yes, a multidimensional spreadsheet, but where you don't necessarily use numeric indices. So it's more like multidimensional hash tables. 2015-01-21T14:38:49Z Cheery: there are also other things such as scope & identity of variables not resolved in the current model. So I've got good motivation for looking into alternatives 2015-01-21T14:39:30Z booly-yam-5194_ quit (Ping timeout: 264 seconds) 2015-01-21T14:40:45Z oleo joined #scheme 2015-01-21T14:40:47Z Cheery: hm.. could implement such a structure you propose. that way we can see how it fares. 2015-01-21T14:41:23Z vanila quit (Quit: Leaving) 2015-01-21T14:41:49Z pjb: At least, you can easily make a prototype. There is probably a good optimized data structure to be found. 2015-01-21T14:41:57Z racycle joined #scheme 2015-01-21T14:43:35Z Cheery: so a node would be something like: (x0:a, x1:b, x2:c, x3:d, x4:e, x5:f) 2015-01-21T14:44:12Z Cheery: layed on a grid. 2015-01-21T14:45:27Z Cheery: so picking a key.. say x0, you'd get every node with parameter x0, sorted by the value? 2015-01-21T14:46:47Z Cheery: how would you represent programs using this structure? 2015-01-21T14:47:19Z pjb: it was Levente Mészáros' Projectional editor. https://www.youtube.com/watch?v=WeLBFgOGk8k https://www.youtube.com/channel/UCr5UHCTN591TQ22oInSh4Ww 2015-01-21T14:47:22Z Cheery: and how would you lay out that thing to a box model.. that is turn out the tree projection 2015-01-21T14:48:04Z adu quit (Remote host closed the connection) 2015-01-21T14:48:11Z pjb: Cheery: you may get it in Common Lisp with (ql:quickload :projectured). 2015-01-21T14:48:57Z Cheery: I should probably pick it up and try it 2015-01-21T14:50:20Z pjb: Well, if you have as attributes different language, and if you have also routines to generate and parse the various syntaxes, you can select the "lisp" plane and see (defun f (x) (+ 2 x)) and if you select the "C" plane you get Number f(Number x){return Number_add(x,(Number_fixnum(2)));} and if you edit this 2 into a 3, and switch back to the "lisp" plane, you get to see now (defun f (x) (+ 3 x)) 2015-01-21T14:51:03Z Cheery: put the quickload.. how does it start up? 2015-01-21T14:51:10Z Cheery: tried in sbcl 2015-01-21T14:51:53Z pjb: let me try 2015-01-21T14:52:40Z Cheery: um.. so it's operating on plain text, each buffer is a "plane" 2015-01-21T14:52:54Z lrs quit (Remote host closed the connection) 2015-01-21T14:52:54Z lrs_ quit (Remote host closed the connection) 2015-01-21T14:53:39Z pjb: There's a documentation directory ~/quicklisp/dists/quicklisp/software/projectured-quicklisp-6e300bae-git/documentation/ 2015-01-21T14:55:29Z booly-yam-5194_ joined #scheme 2015-01-21T14:58:32Z Cheery: trying to load :projectured.sdl results in: ; Unknown CFFI type: :STRUCT. 2015-01-21T15:00:01Z jlongster joined #scheme 2015-01-21T15:00:17Z pjb: I can't load it with my version of sbcl. 2015-01-21T15:00:33Z pjb: Yes, that's some bit rot, cffi has changed a little in the meantime IIRC. 2015-01-21T15:00:52Z pjb: Anyways, you may browse the sources to see what kind of data structures it uses. 2015-01-21T15:01:13Z lfo left #scheme 2015-01-21T15:01:26Z pjb: I guess if some interest is shown, perhaps the authour would update it? 2015-01-21T15:05:14Z Cheery: saw that same error before, on another project 2015-01-21T15:07:01Z pjb: IIRC, you have to change :struct -> (:pointer :struct) 2015-01-21T15:07:18Z Cheery: where? how? 2015-01-21T15:07:26Z pjb: In the sources where :strut appear. 2015-01-21T15:07:51Z pjb: Oh, but it's not in projectured sources. 2015-01-21T15:08:14Z pjb: Perhaps you have old dependencies. You can update quicklisp with: (ql:update-client) (ql:update-all-dists) 2015-01-21T15:09:44Z Cheery: hm. still. it happens in lispbuilder-sdl-cffi 2015-01-21T15:11:31Z pjb: I have quicklisp/dists/quicklisp/software/lispbuilder-20140113-svn and quicklisp/dists/quicklisp/software/cffi_0.12.0 2015-01-21T15:12:26Z Cheery: got no cffi_ in software/ 2015-01-21T15:12:49Z pjb: strange. Try (ql:quickload :cffi) directly. That should download and install it. 2015-01-21T15:13:29Z Cheery: still nothing 2015-01-21T15:14:05Z pjb: I'm puzzled. Try to ask on #lisp, there's Xach (quicklisp author) there. 2015-01-21T15:14:33Z pjb: bbl 2015-01-21T15:14:51Z Cheery: k 2015-01-21T15:15:18Z taraz`` joined #scheme 2015-01-21T15:15:59Z kongtomorrow joined #scheme 2015-01-21T15:17:19Z kongtomorrow quit (Client Quit) 2015-01-21T15:20:22Z racycle quit (Quit: ZZZzzz…) 2015-01-21T15:25:54Z hellofunk quit (Remote host closed the connection) 2015-01-21T15:27:18Z hellofunk joined #scheme 2015-01-21T15:33:12Z pera joined #scheme 2015-01-21T15:34:05Z davexunit quit (Read error: No route to host) 2015-01-21T15:38:20Z uber_hulk quit (Quit: Connection closed for inactivity) 2015-01-21T15:39:15Z davexunit joined #scheme 2015-01-21T15:43:46Z joast quit (Quit: Leaving.) 2015-01-21T15:51:26Z xyh joined #scheme 2015-01-21T15:52:15Z jeapostrophe quit (Ping timeout: 264 seconds) 2015-01-21T15:55:16Z benregn quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2015-01-21T16:03:28Z Cheery: Has there been schemas for lisp? 2015-01-21T16:03:57Z z0d: what schemas? 2015-01-21T16:04:37Z Cheery: well.. () denotes a normal form, except that inside a macro it can mean anything 2015-01-21T16:05:03Z Cheery: for example: (define (thing x) body) 2015-01-21T16:05:35Z Cheery: the () inside probably isn't understood as a call. 2015-01-21T16:06:38Z Cheery: is there something designed, that describes such a pattern? 2015-01-21T16:06:57Z z0d: that's what the Scheme specification defines 2015-01-21T16:07:03Z Riastradh quit (Ping timeout: 250 seconds) 2015-01-21T16:07:13Z ecraven: Cheery: ( and ) delimit lists for the parser 2015-01-21T16:11:15Z Cheery: but as far as I've understood. the scheme evaluator is a function. It looks if the first thing is a symbol, looks into the table of macros and treats it as a macro if it appears there 2015-01-21T16:11:46Z Cheery: it's integrated there 2015-01-21T16:11:58Z Cheery: same mechanism cannot be used for.. say. validation of the constructs. 2015-01-21T16:12:56Z Cheery: or for coloring them 2015-01-21T16:15:03Z gravicappa joined #scheme 2015-01-21T16:41:26Z joast joined #scheme 2015-01-21T16:42:07Z ecraven: Cheery: no, everything is read into a nested list, then the list is evaluated (or compiled) 2015-01-21T16:42:17Z ecraven: macro expansion generally happens after reading 2015-01-21T16:45:32Z wilfredh joined #scheme 2015-01-21T16:59:19Z booly-yam-5194_ quit (Ping timeout: 265 seconds) 2015-01-21T17:08:02Z frkout_ quit (Read error: Connection reset by peer) 2015-01-21T17:08:21Z frkout joined #scheme 2015-01-21T17:10:16Z fantazo quit (Quit: Verlassend) 2015-01-21T17:11:17Z redeemed quit (Quit: q) 2015-01-21T17:12:28Z msgodf quit (Ping timeout: 245 seconds) 2015-01-21T17:12:36Z amgarchIn9 joined #scheme 2015-01-21T17:14:40Z wingo quit (Ping timeout: 255 seconds) 2015-01-21T17:16:57Z jewel quit (Quit: Leaving) 2015-01-21T17:18:43Z frkout quit (Ping timeout: 255 seconds) 2015-01-21T17:19:36Z booly-yam-5194_ joined #scheme 2015-01-21T17:20:25Z badkins quit 2015-01-21T17:25:21Z amgarchIn9 quit (Ping timeout: 256 seconds) 2015-01-21T17:27:49Z amgarchIn9 joined #scheme 2015-01-21T17:33:52Z kongtomorrow joined #scheme 2015-01-21T17:37:31Z mumptai joined #scheme 2015-01-21T17:40:35Z szgyg joined #scheme 2015-01-21T17:45:52Z taraz`` quit (Ping timeout: 240 seconds) 2015-01-21T17:51:38Z daviid joined #scheme 2015-01-21T17:51:57Z goemon joined #scheme 2015-01-21T17:54:33Z uber_hulk joined #scheme 2015-01-21T17:54:48Z kongtomorrow quit 2015-01-21T18:02:12Z enitiz quit (Quit: Leaving) 2015-01-21T18:05:00Z brianmwaters joined #scheme 2015-01-21T18:05:18Z Riastradh joined #scheme 2015-01-21T18:07:08Z psy_ quit (Read error: No route to host) 2015-01-21T18:16:27Z pnkfelix quit (Quit: rcirc on GNU Emacs 24.3.92.1) 2015-01-21T18:23:47Z psy_ joined #scheme 2015-01-21T18:32:55Z b4283 quit (Quit: Konversation terminated!) 2015-01-21T18:34:03Z srenatus quit (Quit: Connection closed for inactivity) 2015-01-21T18:34:27Z jeapostrophe joined #scheme 2015-01-21T18:34:27Z jeapostrophe quit (Changing host) 2015-01-21T18:34:27Z jeapostrophe joined #scheme 2015-01-21T18:43:56Z enitiz joined #scheme 2015-01-21T18:45:53Z zadock quit (Quit: Leaving) 2015-01-21T18:49:19Z pnkfelix joined #scheme 2015-01-21T18:53:48Z hiroakip joined #scheme 2015-01-21T19:01:27Z amgarchIn9 quit (Ping timeout: 244 seconds) 2015-01-21T19:01:34Z enitiz quit (Quit: Leaving) 2015-01-21T19:01:55Z brianmwaters quit (Quit: Leaving) 2015-01-21T19:03:23Z enitiz joined #scheme 2015-01-21T19:04:50Z badkins joined #scheme 2015-01-21T19:05:14Z booly-yam-5194_ quit (Ping timeout: 245 seconds) 2015-01-21T19:06:08Z amgarchIn9 joined #scheme 2015-01-21T19:25:13Z jeapostrophe quit (Ping timeout: 244 seconds) 2015-01-21T19:27:28Z amgarchIn9 quit (Ping timeout: 245 seconds) 2015-01-21T19:31:28Z amgarchIn9 joined #scheme 2015-01-21T19:36:47Z jumblerg quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2015-01-21T19:45:08Z jumblerg joined #scheme 2015-01-21T19:55:52Z goemon quit (Remote host closed the connection) 2015-01-21T19:56:55Z MichaelRaskin joined #scheme 2015-01-21T19:58:20Z uber_hulk quit (Quit: Connection closed for inactivity) 2015-01-21T20:02:54Z pera quit (Ping timeout: 264 seconds) 2015-01-21T20:04:58Z zadock joined #scheme 2015-01-21T20:05:38Z uber_hulk joined #scheme 2015-01-21T20:14:38Z AkashicLegend joined #scheme 2015-01-21T20:18:27Z xyh quit (Ping timeout: 265 seconds) 2015-01-21T20:23:54Z wilfredh quit (Quit: Connection closed for inactivity) 2015-01-21T20:29:15Z AkashicLegend quit (Remote host closed the connection) 2015-01-21T20:39:02Z enitiz quit (Ping timeout: 245 seconds) 2015-01-21T20:39:15Z pera joined #scheme 2015-01-21T20:47:57Z daviid quit (Ping timeout: 276 seconds) 2015-01-21T20:51:48Z rtra quit (Ping timeout: 265 seconds) 2015-01-21T20:55:47Z szgyg quit (Quit: leaving) 2015-01-21T20:57:00Z xyh joined #scheme 2015-01-21T20:57:11Z rtra joined #scheme 2015-01-21T20:58:23Z amoe quit (Ping timeout: 240 seconds) 2015-01-21T20:59:09Z amoe joined #scheme 2015-01-21T21:14:02Z xyh quit (Ping timeout: 265 seconds) 2015-01-21T21:14:05Z excelsior quit (Quit: Lost terminal) 2015-01-21T21:14:25Z jeapostrophe joined #scheme 2015-01-21T21:14:25Z jeapostrophe quit (Changing host) 2015-01-21T21:14:25Z jeapostrophe joined #scheme 2015-01-21T21:14:45Z hiroakip quit (Ping timeout: 244 seconds) 2015-01-21T21:25:02Z hellofun` joined #scheme 2015-01-21T21:27:52Z hellofunk quit (Ping timeout: 240 seconds) 2015-01-21T21:33:14Z enitiz joined #scheme 2015-01-21T21:34:34Z mumptai quit (Quit: Verlassend) 2015-01-21T21:35:04Z Shadox joined #scheme 2015-01-21T21:35:08Z ijp joined #scheme 2015-01-21T21:39:23Z taraz joined #scheme 2015-01-21T21:39:44Z enitiz quit (Excess Flood) 2015-01-21T21:39:55Z xyh joined #scheme 2015-01-21T21:45:18Z enitiz joined #scheme 2015-01-21T21:50:20Z hellofun` is now known as hellofunk 2015-01-21T21:54:09Z Riastradh quit (Ping timeout: 250 seconds) 2015-01-21T21:55:25Z turbofail quit (Remote host closed the connection) 2015-01-21T21:55:36Z xyh quit (Ping timeout: 265 seconds) 2015-01-21T21:57:16Z davexunit quit (Quit: Later) 2015-01-21T21:58:10Z gravicappa quit (Remote host closed the connection) 2015-01-21T21:59:33Z enitiz quit (Ping timeout: 245 seconds) 2015-01-21T22:06:17Z bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) 2015-01-21T22:09:33Z jeapostrophe quit (Ping timeout: 245 seconds) 2015-01-21T22:17:22Z alezost quit (Quit: I use GNU Guix ) 2015-01-21T22:22:28Z vdamewood joined #scheme 2015-01-21T22:25:32Z enitiz joined #scheme 2015-01-21T22:27:39Z badkins quit (Read error: Connection reset by peer) 2015-01-21T22:27:53Z booly-yam-5194_ joined #scheme 2015-01-21T22:30:42Z taylanub quit (Disconnected by services) 2015-01-21T22:31:08Z taylanub joined #scheme 2015-01-21T22:33:10Z senoj joined #scheme 2015-01-21T22:33:56Z taylanub quit (Disconnected by services) 2015-01-21T22:34:22Z taylanub joined #scheme 2015-01-21T22:35:05Z bjz joined #scheme 2015-01-21T22:36:34Z taylanub quit (Client Quit) 2015-01-21T22:37:07Z taraz quit (Quit: ERC (IRC client for Emacs 25.0.50.1)) 2015-01-21T22:38:30Z xyh joined #scheme 2015-01-21T22:41:51Z mrowe_away is now known as mrowe 2015-01-21T22:43:42Z bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) 2015-01-21T22:44:15Z pnkfelix quit (Quit: rcirc on GNU Emacs 24.3.92.1) 2015-01-21T22:46:25Z booly-yam-5194_ quit (Ping timeout: 252 seconds) 2015-01-21T22:47:34Z bjz joined #scheme 2015-01-21T22:47:53Z enitiz quit (Ping timeout: 245 seconds) 2015-01-21T22:47:58Z daviid joined #scheme 2015-01-21T22:48:20Z uber_hulk quit (Quit: Connection closed for inactivity) 2015-01-21T22:48:25Z boycottg00gle joined #scheme 2015-01-21T22:49:03Z enitiz joined #scheme 2015-01-21T22:52:54Z bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) 2015-01-21T22:59:55Z uris77 quit (Ping timeout: 264 seconds) 2015-01-21T23:04:33Z booly-yam-5194_ joined #scheme 2015-01-21T23:05:51Z davexunit joined #scheme 2015-01-21T23:06:31Z kuribas joined #scheme 2015-01-21T23:14:10Z senoj quit (Read error: Connection reset by peer) 2015-01-21T23:16:18Z jeapostrophe joined #scheme 2015-01-21T23:16:18Z jeapostrophe quit (Changing host) 2015-01-21T23:16:18Z jeapostrophe joined #scheme 2015-01-21T23:20:09Z mrowe is now known as mrowe_away 2015-01-21T23:20:55Z jeapostrophe quit (Ping timeout: 264 seconds) 2015-01-21T23:24:08Z booly-yam-5194_ quit (Ping timeout: 245 seconds) 2015-01-21T23:26:12Z booly-yam-5194_ joined #scheme 2015-01-21T23:33:14Z xyh quit (Ping timeout: 265 seconds) 2015-01-21T23:34:24Z zadock quit (Quit: Leaving) 2015-01-21T23:36:05Z xyh joined #scheme 2015-01-21T23:37:24Z araujo quit (Read error: Connection reset by peer) 2015-01-21T23:37:57Z araujo joined #scheme 2015-01-21T23:38:21Z boycottg00gle quit (Remote host closed the connection) 2015-01-21T23:42:03Z booly-yam-5194_ quit (Ping timeout: 264 seconds) 2015-01-21T23:43:13Z bb010g joined #scheme 2015-01-21T23:47:42Z badkins joined #scheme 2015-01-21T23:47:50Z enitiz quit (Excess Flood) 2015-01-21T23:48:48Z enitiz joined #scheme 2015-01-21T23:56:04Z oleo quit (Read error: Connection reset by peer) 2015-01-21T23:56:56Z adu joined #scheme 2015-01-21T23:58:26Z oleo joined #scheme 2015-01-21T23:59:27Z turtleman_ joined #scheme