Search found 127 matches
- Sat Apr 02, 2011 12:13 am
- Forum: Common Lisp
- Topic: Using binary arithmetics in collect statement?
- Replies: 5
- Views: 5951
Re: Using binary arithmetics in collect statement?
Aha, thank you! That makes sense now.
- Fri Apr 01, 2011 12:06 pm
- Forum: Common Lisp
- Topic: Using binary arithmetics in collect statement?
- Replies: 5
- Views: 5951
Re: Using binary arithmetics in collect statement?
Thank you! Now, if I may, a few questions. In general, if I can do (nth 0 list) and (first list), for example, which should I use? Likewise, subseq vs cddr in this case - is this a matter of personal preference, or is one variant in some way better then the other? Won't I get (and if not, why) a sor...
- Fri Apr 01, 2011 4:11 am
- Forum: Common Lisp
- Topic: Using binary arithmetics in collect statement?
- Replies: 5
- Views: 5951
Using binary arithmetics in collect statement?
Hello. I'm trying to figure out how would I write the same thing, but using "collect", because it seems like a better way to do the same thing. Here's my code: ;; 0.123456 (defparameter *test-float* (list #x3F #xBF #x9A #xCF #xFA #x7E #xB6 #xBF)) (defun decode-ieee-754 (bytes) (let ( (sign...
- Tue Mar 29, 2011 1:36 pm
- Forum: Common Lisp
- Topic: Integer doesn't grow in size when left-shifted?
- Replies: 5
- Views: 5119
Re: Integer doesn't grow in size when left-shifted?
Just for the record, here's how it ended: ;package tests ;{ ; import flash.display.Sprite; ; import flash.utils.ByteArray; ; ; public class TestAmfEncoding extends Sprite ; { ; public function TestAmfEncoding() ; { ; super(); ; this.testUI29(); ; } ; ; private function testUI29():void ; { ; var byte...
- Sat Mar 26, 2011 2:36 pm
- Forum: Common Lisp
- Topic: Integer doesn't grow in size when left-shifted?
- Replies: 5
- Views: 5119
Re: Integer doesn't grow in size when left-shifted?
Regarding the first, hm... I think that was what I did originally, but then I compared it to the result I'm getting from Flash and I changed it to what it is now. I will need to make sure who's wrong here, chances are it's me :) Re' debugger - thanks again, I was looking in a completely wrong place,...
- Sat Mar 26, 2011 1:30 pm
- Forum: Common Lisp
- Topic: Integer doesn't grow in size when left-shifted?
- Replies: 5
- Views: 5119
Re: Integer doesn't grow in size when left-shifted?
Oh, my bad. Yeah, the ((total <<= shift) > 0) should've been the first condition, not the last... Sorry, I was copying and pasting to get it posted here and get this messed up. So, no, shift shouldn't be a constant, it should increment if the number of iterations reaches 4 (because we don't care if ...
- Sat Mar 26, 2011 6:48 am
- Forum: Common Lisp
- Topic: Integer doesn't grow in size when left-shifted?
- Replies: 5
- Views: 5119
Integer doesn't grow in size when left-shifted?
Hello. In attempt to teach myself the language, I'm writing a library to read and write AMF format. The documentation is here: http://opensource.adobe.com/wiki/download/attachments/1114283/amf3_spec_05_05_08.pdf In a nutshell, this format is a "native" for Flash object encoding, which Flas...