freenode/#lisp - IRC Chatlog
Search
6:47:16
easye
If one applies CL:REVERSE to a vector specialized on a given type (unsigned-byte 32), is a conforming implementation allowed to return an unspecialized result?
6:50:21
easye
From <http://www.lispworks.com/documentation/HyperSpec/Body/f_revers.htm>, a conforming implementation has to have an "actual array element type" so I'm judging the answer to be yes.
6:53:36
phoe
so, "For reverse, if sequence is a vector, the result is a fresh simple array of rank one that has the same actual array element type as sequence."
6:54:10
phoe
"For reverse, if sequence is a vector, the result is a fresh simple array of rank one that has the same type for which the array is actually specialized as the input sequence."
6:54:25
phoe
so I read it as: if you pass a specialized vector of ub32, then the result must also be a specialized vector of ub32
7:05:19
phoe
if your answer is "yes, the implementation is allowed to return an unspecialized result" then I guess I disagree
7:05:54
easye
No, I agree that having CL:REVERSE return an unspecialized type for a specialized argument would be non-conforming.
9:01:01
Harag
ok is there a way to maybe swop out two methods and runtime and then swop them back with the mop?
9:03:29
beach
Heh, you need the "Incless" library that is not finished yet, but that would allow you to play tricks like that.
9:12:37
Harag
is incless taking over printing "control" using shadowing and then giving its own implementation?
9:24:25
beach
So the print-object methods trampoline to a generic function print-object-using-client.
9:25:18
beach
So you would put a method on print-object-using-client with a client that alters the printing as you want.
9:25:52
beach
Then when you want the altered behavior, you bind INCLESS:*CLIENT* to the one that behaves like that.
9:27:02
beach
I think we (collectively) are getting the hang of creating implementation-independent libraries. :)
9:31:38
phoe
you don't need to make a fancy name for first-class global environment because "class" already contains the "cl" substring that is required
10:30:07
flip214
beach: no. My wife is a nurse, and daughter is becoming one, so I'm hearing stuff like that a lot.
10:32:42
jackdaniel
if there is a problem with dynamic bindings please report a bug. unless you mean, that ecl inlines some functions?
10:34:01
phoe
if you are trying to FLET/LABELS/MACROLET any function or macro or special operator from the CL package, it's undefined behavior
10:54:45
phoe
random note: today, I have removed the last TODO from my upcoming condition system book
10:55:38
phoe
but it seems like after my editors have a go at the last bits of text I've introduced, it is ready to go into production
10:58:14
phoe
I think that most of the heavy lifting has been done by the Lisp community though; digikar and gendl and heisig and adlai and splittist and SAL9000 and *way* *WAY* too many people to count here have done a #.most-positive-fixnum amount of work with beating my words into proper shape
10:58:53
phoe
to the point where the editor from Apress didn't really have anything to do, save for restructuring the chapters in the way that is acceptable by Apress and noticing like two or three minor issues that weren't caught earlier
10:59:09
SAL9000
(I really should get around to putting a reviewer blurb thing into that issue before it's too late)
11:02:46
heisig
phoe: Congratulations on removing your last TODO! I am very excited about this book.
11:03:27
heisig
I secretly hope that other language designers will read it and adapt their languages accordingly :)
11:03:34
phoe
like, literally, the Hall of Fame section of my book is so fat that I am grinning just looking at it
11:06:28
SAL9000
so long as it isn't "alot" of people http://hyperboleandahalf.blogspot.com/2010/04/alot-is-better-than-you-at-everything.html
11:09:17
TMA
" is a fine verb though. phoe, do not be concerned if you find it (in the verb position)
12:25:01
lonjil
Harag: Incless uses the CL package but shadows the standard printing related symbols. Thus, Incless can have its own symbols with the same names. This should work on all CL implementations.
12:36:10
lonjil
phoe: for implementations that want to use Incless, I believe that we are actually going to have a separate system and package that uses CL into Incless but without shadowing.
13:47:28
chrnybo
I usually work in latin-1, now I need unicode. Connecting to lispworks with slime, and (code-char 3459) gives expected result in the repl.
14:25:04
chrnybo
phoe: thanks for the hint on base-char, I'll resort to utputting to a file that I open with additional keys :external-format '(:utf-8 :eol-style :lf) :element-type 'character
16:03:44
tychoish
are there implementations that have reasonable cross-compiulation support/tooling, if I wanted to, say produce a darwin build on a linux system?
16:08:39
phoe
tychoish: it's an answer to an orthogonal question, but I use Travis to actually build my stuff for me on three OSes - see https://github.com/phoe-trash/furcadia-post-splitter/blob/master/.travis.yml
16:21:23
adlai
it'd be awesome if anyone is able to confirm whether my fix works on their system as well
16:25:33
tychoish
phoe: yeah, that's sort of the fall back solution, but I have an old laptop that I can hook up
16:27:10
adlai
if anyone wants to test: the official repository [in zkat's github account] still has the buggy code, and my version https://github.com/adlai/chanl/commit/a030296 has the fix
16:30:19
tychoish
adlai: I just used chanl for the first time last week, and really liked it (also hillariously zkat when to college with my partner, so its all very small world)
16:30:55
adlai
hilariously enough, zkat abandoned common lisp, and left me to maintain the projects >:(
16:32:35
adlai
ACTION ponders whether to attack the part of chanl that uses :arguments, or first see how difficult it'll be to get this working on ECL
16:33:32
adlai
this specific part of chanl is, as far as I can tell, not yet used anywhere else; it implements a method combination that builds a call to chanl's select macro, out of the applicable methods
16:36:05
adlai
ehehe yes, it is defined and used in https://github.com/adlai/chanl/blob/master/src/actors.lisp
16:37:17
adlai
The code in that file is intentionally in a separate package, and it has not yet been documented, because the tests are quite rudimentary.
16:40:52
adlai
I've been using an earlier version of this in scalpl for a while. Maybe I should first update that to use the latest version.
17:00:56
Bike
like a macro to classify the methods without using the define-method-combination mechanism?
17:01:47
adlai
at this point, The Right Thing is probably to have a separate chanl/actors system, that depends on closer2mop
17:03:54
adlai
hmm, no, it's in a different library: https://github.com/sellout/method-combination-utilities/blob/master/src/definition-helpers.lisp
17:18:41
adlai
ahh, wonderful, it is deterministic, just has an implementation-dependent failure probability
17:20:08
phoe
(defvar *failure-probability #+sbcl 0.1 #+ccl 0.3 #+ecl 0.02 #-(or sbcl ccl ecl) (error "Failures not supported."))
17:22:08
adlai
wonderful, adding a (sleep 0.5) before the failing test causes it to pass 100/100 times on both implementations
17:22:55
adlai
I'm quite certain that this specific test should pass even without that sleep, though. It should not matter in this case which thread is started first, because they should synchronize.
17:23:39
adlai
jackdaniel: I glanced at SBCL's code for the :arguments feature, and it is quite gnarly
17:23:59
jackdaniel
method combinations as specified are (suposedly) impossible to implement fully, i don't remember details
17:24:41
specbot
Define-method-combination Arguments Lambda Lists: http://www.lispworks.com/reference/HyperSpec/Body/03_dj.htm
17:25:05
adlai
the one and only place where 3.4.10 lambda lists can appear, is in the :arguments argument
17:27:12
adlai
well this is a nasty gotcha: &whole means slightly different things in d-m-c and defmacro lambda lists
17:30:23
Bike
you also can't just hand the list of arguments to a destructuring-bind or anything, it does different things depending on the generic function's lambda list
17:57:30
Harag
lonjil: thanx, I figured it out eventually... my confusion came from doing stuff in the repl and not a package, I clobbering sbcl's print-object for hash tables, and got print functions it to run my version, which then decided if it wanted to deal with it or pass it on to sbcl... ecl would not let me clobber the method.