freenode/sicl - IRC Chatlog
Search
5:11:37
beach
So, I think I have a very good idea of what needs to be patched in environment E5. I have 91 functions that are not SICL objects. Some of those are the sequence functions. Some of them are the environment functions.
5:11:51
beach
I know what to do with the sequence functions, but it is not going to be easy, so I am putting it off. I still don't know how to deal with the environment and its functions. I have 102 method functions that are not SICL objects. They result from accessor methods that were created in earlier phases. I can patch those by creating a new method function, because the method function of an accessor function is compiled in the null lexical
5:11:52
beach
I have 89 method functions where the function is a SICL object, but it is not pure, i.e. its class object is not a SICL object. That's an easy one. I just modify the class slot of the object.
6:07:30
no-defun-allowed
I completed a (C++) assignment this afternoon, and I'm starting to think it was fairly easy because I used different data structures than what were intended and/or taught to us. A lot of the work we were meant to do was kludging around probably poorer choices of data structures; like using an adjustable vector (and managing ordering yourself) in place of a priority queue because the latter can't be iterated over.
6:08:00
no-defun-allowed
Is it supposed to be easier to suffer and write slow equivalents of appropriate data structures than learn when to use those?
6:09:38
beach
Hard to say in this case. There are a number of explanations. Perhaps the teacher was not interested in teaching you about data structures, but about C++ features. Perhaps the teacher doesn't know about priority queues.
6:11:16
no-defun-allowed
There was a note in the assignment stating that a priority queue wouldn't work, and I eventually figured out that you would need to iterate over the queue which is impossible; and we used maps (although in also questionable ways) as well.
6:13:03
beach
Well, if you use the concrete version of the priority queue, i.e. a vector, you can iterate over it.
6:14:25
no-defun-allowed
Yeah; in this case, we weren't popping off the queue, so an ordered multimap keyed by the priority value was the most appropriate to me.
6:15:49
no-defun-allowed
It's not important nor relevant, I'm just confused about what the priorities of the course (heh) are.
6:17:16
beach
Taking university courses is a job that requires expertise. Often that expertise has nothing to do with the subject, but about knowing what is expected, and doing that and nothing else.
6:18:15
beach
I became a great expert in that job. I guess I learned a few things at the same time, but most of the learning came afterwards.
6:19:19
no-defun-allowed
There's one page on every assignment that says something like "While you can do this assignment however you want and are free to experiment and innovate, we value understanding, and you may be asked to explain anything you found out of class."
6:20:11
no-defun-allowed
I never got how much I'm expected to explain, though, partly because I've never been asked, and it's frightened me. Do I have to know how it's implemented? Is it just the interface? etc
6:22:05
splittist
intro comp sci seems a really tough thing to teach at scale, since the knowledge of the students will be so variable (and variable on many axes)
6:23:12
no-defun-allowed
Probably a good idea then. (Once, for my first Java assignment, I used a "lambda expression" to find an element in a sequence of some kind, and I wondered how to explain that. "Well, in the 1930s, Mr Church wanted to do some fancy maths...")
6:23:35
beach
I need to go water the yard (garden). It is going to be hot and dry today. I'll be back in half an hour or so.
6:30:22
no-defun-allowed
There's also just not much time for in-depth discussion with online classes; I might have to write some emails eventually.
6:32:37
scymtym
i have another spec conformance question concerning eclector. consider #( #C( and #S( . #( clearly doesn't allow any non-object between # and ( . #S( is specified as "#s(name …" so arguably doesn't allow non-objects between S and ( . #C , however, is specified as "#C reads a following object" which probably means "READs the following object" and thus skips over non-objects, allowing e.g. #C #|foo|# (1 2) . SBCL indeed behaves
6:32:37
scymtym
like that. i don't like the inconsistency (and #C #|foo|# … is also a bit strange in terms of CSTs), but making #C and #S behave differently in this regard seems like the only conforming option. what do you think?
6:46:40
pjb
scymtym: #42( a ) #| --> #(a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a) |#
6:47:45
pjb
scymtym: the dispatching #S reader macro does not! (defstruct point x y) #S ( point :x 1 :y 2) #| --> #S(point :x 1 :y 2) |#
6:48:36
pjb
scymtym: the dispatching #C reader macro does not either! But the dispatching #A does! (list #2A ((1 2) (3 4)) #0A foo) #| --> (#2A((1 2) (3 4)) #0Afoo) |#
6:49:55
pjb
scymtym: the comment is possible because after having read the dispatching macro character (including the optional integer argument), those dispatching reader macros use READ to further read their syntax.
6:50:47
pjb
Not all standard reader macros do. For example #\ doesn't take an integer argument, and doesn't use READ to read the name of the character: (list #\#|foo|#a) #| ERROR: Unknown character name - "#foo#a" . |#
6:52:42
pjb
scymtym: just don't confuse #( #C #A #S #\ with the object or the characters that are read after them.
6:54:07
pjb
scymtym: and ok, the funny thing, is that #( uses READ-DELIMITED-LIST to read the objects until the closing #\), while #C #P #' #S etc use READ (both with the recursive parameter set to T)
6:54:27
pjb
scymtym: but note that the reader macro ( doesn't use READ-DELIMITED-LIST since it has to parse the dotted lists!
7:06:14
scymtym
pjb: don't you think i consulted chapter 2 while working on a reader? anyway, most of the points are tangential but your #S #||# (point) example is relevant because i don't see the entry for #S allowing that. also, regarding list syntax after macro characters, there are more subtelities: since #C reads an object which must be a list #C[1 2] is valid if #\[ and #\] have the appropriate syntax and macros. the entry for #S is explicitly
7:13:22
scymtym
no-defun-allowed: yeah, i thought of those. i think they are in the "skipping over non-objects" category
7:26:10
pjb
beach: indeed, the hyperspec is not consistent about saying that an object is read after the reader macro characters, or some syntax is parsed character by character. For example, #.foo talks of evaluating foo, but not of reading it. #( doesn't explicitely say that the values in the vector are read, etc. While #S stresses on the destructured form of the list, and forgets to say it's read, I think all implementations got it right
7:44:11
scymtym
pjb: SBCL takes the #S entry literally: (read-from-string "#s (foo)") |- non-list following #S
8:04:04
pjb
scymtym: I noted while you were out that indeed the hyperspec was inconsistent in specifying that an object is read. As beach I think that the specification should be precised, and in the case of #S I don't see why we would not specify that an object is read, a list is expected and destructuring on it will happen.
8:05:05
pjb
scymtym: also, note that #S needs access to internal defstruct data, since it must map the structure type name to the name of a constructor that takes the keyword arguments.
8:05:25
scymtym
pjb: thanks for admitting the fact that the spec is inconsistent. i agree that #S /should/ be specified like #C to read an object
8:06:53
scymtym
pjb: eclector solves the structure constructor "issue" by letting the client specialize a generic function MAKE-STRUCTURE-INSTANCE
8:10:44
scymtym
i'm considering this for eclector: https://github.com/s-expressionists/Eclector/commit/d0071bd2e53e8c5a7418d794f3c5e5c0bf983c72 (and same for #S)
8:24:01
pjb
On the other hand, while one can understand why we may not allow (let ((a 1) (b 2) (ca :y) (cb :x)) `( #S(point ,ca ,a ,cb ,b) )) (#S cannot work at read-time and produce a literal structure object), (let ((a 1) (b 2) (ca :y) (cb :x)) `( #(point ,ca ,a ,cb ,b) )) #| --> (#(point :y 1 :x 2)) |# is allowed. The ` macro has to know how to build literal vectors itself, without going thru #(.
8:25:54
pjb
(well, the point being that `#(,var) is not a literal vector. it's equivalent to (vector var), not to #(…something-not-available-at-read-time…)
8:31:51
pjb
The point here is that #'foo reads as (function foo) not the result of evaluating (function foo) as a literal value. (type-of '#'foo) #| --> cons |# but #P"foo" reads as a read-time pathname literal (type-of '#P"foo") #| --> pathname |# like #S(foo) reas as a read-time structure literal.
8:32:25
pjb
Of course #(foo) also reads as a read-time vector literal, but here ` cheats and returns a run-time vector for `#(,foo).
8:33:57
scymtym
it is clear that `#',foo /can/ work. the question is, again, whether it is /specified/ to work
9:20:07
jackdaniel
beach: they got back to me and the issue is that the receiver of the transfer is TURTLEWARE, while they require it to be my name. They have a sloppy way of enforcing it, because the first transfer came through, but either way instead of the company name please put there my name
9:33:36
beach
I am not sure my bank software will allow the special character in your name. I hope your bank will recognize you anyway.
9:34:30
pjb
Since it uses special characters as delimitked of fields, you cannot use eg. / in the wire messages or names, etc.
9:35:48
pjb
(and it's a miracle SWIFT, VISA, etc can still run, given how they outlived their initial limits).
9:36:18
pjb
Notably, VISA have problems nowadays with the card numbers (similar to IPv4 address scarcity).
9:36:55
pjb
So far, they didn't reuse card numbers, but nowadays, they are starting to have to do that. In Japan, they use extended card numbers with more than 16 digits, but of course, this is incompatible with the rest of the world.
9:37:41
jackdaniel
while interesting (general concept of money and flawed assumptions of economy that it may grow infinitely), this is offtopic I think :)
9:39:53
pjb
Depends. How easy is it to change the implementation constants (most-positive-fixnum, size of boxes, etc)?
9:48:00
beach
jackdaniel: This time it's the website of my bank that is screwy. I'll try again this afternoon.