freenode/#lisp - IRC Chatlog
Search
16:17:53
Inline
understanding the machinery is a thing but modeling your domain is another thing....
16:20:13
Josh_2
Theres a digital copy that I have but It's not very good quality, looks like someone did a bad job scanning the book into a digital format
16:21:12
djeis[m]
There's nothing enforcing referential transparency, but there's nothing stopping it either.
16:40:15
moldybits
Josh_2: is that a different book? i thought it was Object-Oriented Programming in Common Lisp
17:36:39
mrcode_
is there a way to declare a type so that it maps to uint32_t to take advantage of a natural wrap-around once it goes beyond uint32_max ?
17:38:10
Bike
however, if you wrap your arithmetic in logand the complier might take care of it (sbcl does, at least)
18:02:18
mrcode_
what's a good idiomatic way to convert a list of character codes gathered during a loop collect (code-char ...) into a string type ?
18:04:54
mrcode_
i actually have a list of codes and with collect (code-char elem) i end up with a list of characters, but ultimately, i'd like a string
18:19:16
_death
perhaps you could just use with-output-to-string, map-into with a string, or (setf aref)...
19:16:14
dlowe
because unless it's ascii-only, iterating over the bytes will probably not do what you want
22:12:46
semz
Does shadowing a CL function via FLET etc conflict with the standard? If no, is there a way to disable the warnings for it?
22:26:34
specbot
Constraints on the COMMON-LISP Package for Conforming Programs: http://www.lispworks.com/reference/HyperSpec/Body/11_abab.htm
22:28:37
|3b|
it could break macros (or special forms implemented as macros) or compiler macros that expect the official definitions, so not really a good idea anywayy
23:37:01
mrcode_
dlowe, pjb was asking about the classic unsigned fixed width integer wraparound, where you can do 0x4 - 0xfffffffa = 0xa
23:38:23
mrcode_
is there a good intro somewhere on the web on how to create a custom stream type that works with read-line, read-sequence, etc ? afaik those are not CLOS methods but just regular functions?
23:40:06
pjb
There's an example https://github.com/informatimago/lisp/blob/master/clext/pipe-article-en.txt
23:41:09
mrcode_
briefly looked at flexistreams and my enthusiasm quickly dissipated ;) the link above seems more approachable
23:42:08
pjb
mrcode_: notice that if you really need Z/2^n, or in general Z/p, you can easily implement it defining your own plus minus times divide operations. Or shadowing CL:+, CL:-, CL:* and CL:/, your own modular-arithemtic:+ modular-arithemtic:- modular-arithemtic:* modular-arithemtic:/ etc.
23:43:26
pjb
stylewarning: ℤ = the set of integers. ℤ/p = the set of integers modulo p ; usually, processors provide various modulo p that are a power of 2, like, 2^8, 2^16, 2^32, and now 2^64.