lbguilherme / crystal

The Crystal Programming Language
http://crystal-lang.org
Apache License 2.0
1 stars 0 forks source link

allow printing floats. add LibC.memchr #3

Closed bcardiff closed 7 years ago

bcardiff commented 7 years ago

Allow the following program to work.

puts 3.4

Very minimal but came along the long way while trying to make "spec" run.

It there any preferred source of documentation for api or if it works we are fine?

Should we define a #TODO to highlight if flag?(:windows) to be removed?


I needed to change branch name and github decided to close #2.

lbguilherme commented 7 years ago

It there any preferred source of documentation for api or if it works we are fine?

We have to decide which libc will be used at the end. It could be glibc, it could be Microsoft's CRT. Everything in src/lib_c/x86_64-windows-gnu will need to be revisited later. But almost everything will be source compatible I think, so if it works it should be safe.

Should we define a #TODO to highlight if flag?(:windows) to be removed?

Which if flag?(:windows)? I didn't understand

bcardiff commented 7 years ago

Ok, definitely Microsoft's CRT should be. As native as possible.

Regarding the flag checks, while trying to make things work sometimes we might add some if flag?(:windows) that will allow compilation yet they are feature incomplete. I was aiming for highlighting things to be revised, yet I am probably overthinking.

When merging PR, feel free to squash instead of merge them if you prefer a linear history. But is a matter of taste.

lbguilherme commented 7 years ago

Ok, definitely Microsoft's CRT should be. As native as possible.

It may require using Microsoft's linker and installing some subset of Visual Studio (probably the Windows SDK), but some research will have to be made here. But I agree this is the preferred goal.

Regarding the flag checks, while trying to make things work sometimes we might add some if flag?(:windows) that will allow compilation yet they are feature incomplete. I was aiming for highlighting things to be revised, yet I am probably overthinking.

I don't think it will be needed. The whole thing will have to be reread and pass specs before the big merge anyway. Those quick fixes will eventually be noticed and fixed.