Search
4:27:14
beach
Good morning everyone!
4:39:10
drmeister
What do people use to divide an integer by two?
4:39:17
drmeister
If you want an integer?
4:40:43
beach
The latter corresponds better to the intended use, and the same code ought to be generated when the second argument is a constant.
4:42:09
Bike
though it won't be on clasp
4:43:22
drmeister
It's going to involve a lot of work to get methods wrapped properly.
4:44:03
beach
You just make a compiler macro on FLOOR, no?
4:44:31
drmeister
beach: Yeah - C++ methods
4:44:32
Bike
that could be done, yes
4:44:52
drmeister
CL_EXTERN_DEFMETHOD(IRBuilder_O,&IRBuilder_O::ExternalType::CreateStore);
4:44:53
Bike
check if it's a fixnum, if it is do.... whatever machine thing
4:44:56
drmeister
Needs to be converted to...
4:45:05
Bike
there are some funny optimizations on that that take more work though
4:45:06
drmeister
CL_EXTERN_DEFMETHOD(IRBuilder_O, (llvm::StoreInst (*)(llvm::Value *Val, llvm::Value *Ptr, bool isVolatile)) &IRBuilder_O::ExternalType::CreateStore);
4:45:21
beach
drmeister: I think the more work being done in Common Lisp, the more flexible the code, thus enabling more transformations.
4:46:07
drmeister
I'm talking about the CL/C++ interop - we are trying to improve performance
4:46:39
beach
Oh, I thought you were talking about dividing by 2. Sorry.
4:47:12
drmeister
I'm all over the place at the moment.
6:55:11
borei
got confused with variables type, im expecting that im going to use FLOAT, but lisp doesn't agree with me and uses double
6:55:40
borei
as a result - type error, and not going forward
6:55:49
borei
https://pastebin.com/E34L4Br8
6:55:59
borei
if somebody can take a look
6:56:34
borei
there is function (part of the function where i localized problem) and backtrace
7:00:55
beach
borei: pi is double float, so everything gets converted to that.
7:03:20
borei
how, that is very basic thing
7:13:50
borei
hmm, is there way to convert double to float ?
7:14:13
borei
but getting double float
7:15:08
borei
or maybe just introduce *pi* as float
7:17:54
beach
FLOAT is the super-type of all floats.
7:18:03
beach
So if it is already a double float, then it is a float.
7:18:12
beach
So the coercion won't do anything.
7:18:18
beach
You need to coerce to single-float.
7:36:46
beach
borei: Are you a native speaker of French?