Comments (7)
VC again? When can I expect MS to stop ignoring more-than 10 years old standard? I'm getting sick of it.
Are isinf and isnan available on VC?
from mruby.
This quote from an InfoQ article on MS C++ vs. C99 just about sums it up "This failure to support C99 has frustrated developers requesting Visual Studio compatibility with the long time standard. If VS supported C99 natively, it would be easier for users to develop and port existing cross-platform applications."
re: VC isinf and isnan, here's a quick scan
C:\Program Files\Microsoft Visual Studio 10.0\VC>\gnuwin32\grep\bin\grep.exe -PRin isnan include
include/complex:81: static bool _Isnan(_Ty _Left)
include/complex:169: static bool _Isnan(_Ty _Left)
include/complex:256: static bool _Isnan(_Ty _Left)
include/complex:343: static bool _Isnan(_Ty _Left)
include/complex:484: if (_Myctraits::_Isnan(_Rightreal) || _Myctraits::_Isnan(_Rightimag))
include/complex:495: if (_Myctraits::_Isnan(_Wd) || _Wd == 0)
include/complex:519: if (_Myctraits::_Isnan(_Wd) || _Wd == 0)
include/float.h:220:_Check_return_ _CRTIMP int __cdecl _isnan(_In_ double _X);
include/intrin.h:283:__MACHINECE(int _isnan(double))
include/intrin.h:284:__MACHINECE(int _isnanf(float))
include/math.h:257:_CRTIMP int __cdecl _isnanf(_In_ float _X);
include/xcomplex:198: else if (_CTR(_Ty)::_Isnan(_Av))
include/xcomplex:200: else if (_CTR(_Ty)::_Isnan(_Bv))
include/xcomplex:286: if (_CTR(_Ty)::_Isnan(_Theta))
C:\Program Files\Microsoft Visual Studio 10.0\VC>\gnuwin32\grep\bin\grep.exe -PRin isinf include
include/complex:75: static bool _Isinf(_Ty _Left)
include/complex:164: static bool _Isinf(_Ty _Left)
include/complex:251: static bool _Isinf(_Ty _Left)
include/complex:338: static bool _Isinf(_Ty _Left)
include/xcomplex:196: if (_CTR(_Ty)::_Isinf(_Av) || _CTR(_Ty)::_Isinf(_Bv))
include/xcomplex:299: : _CTR(_Ty)::_Isinf(_Rho) ? _Rho // log(INF) == INF
include/xcomplex:400: if (_CTR(_Ty)::_Isinf(_Dv))
compare that with a quick check from a recent mingw-w64 release:
C:\mingw-rvb\i686-w64-mingw32>\gnuwin32\grep\bin\grep.exe -PRin isnan include include/float.h:286:_CRTIMP int __cdecl __MINGW_NOTHROW _isnan (double); include/intrin.h:302: __MACHINECE(int _isnan(double)) include/intrin.h:303: __MACHINECE(int _isnanf(float)) include/math.h:197: _CRTIMP int __cdecl _isnan (double); include/math.h:336: extern int __cdecl __isnan (double); include/math.h:337: extern int __cdecl __isnanf (float); include/math.h:338: extern int __cdecl __isnanl (long double); include/math.h:341: __CRT_INLINE int __cdecl __isnan (double _x) include/math.h:350: __CRT_INLINE int __cdecl __isnanf (float _x) include/math.h:359: __CRT_INLINE int __cdecl __isnanl (long double _x) include/math.h:369:#define isnan(x) (sizeof (x) == sizeof (float) ? __isnanf (x) \ include/math.h:370: : sizeof (x) == sizeof (double) ? __isnan (x) \ include/math.h:371: : __isnanl (x)) include/math.h:877: _CRTIMP int __cdecl _isnanf(float _X); C:\mingw-rvb\i686-w64-mingw32>\gnuwin32\grep\bin\grep.exe -PRin isinf include ...irrelevant stuff elided... include/math.h:330:#define isinf(x) (fpclassify(x) == FP_INFINITE)
from mruby.
Sigh. I am almost giving up VC.
Without extensive help from VC users, it's almost impossible to support VC.
from mruby.
Yes, it's ugly. But don't give up just yet.
Once we give VC users (cmd line and IDE) an easy way to build with their favorite tool (makefile or project file) via CMake I think/hope you'll get more VC dev participation.
The good news is that devs like @nkshigeru are able to build mruby on VC IDE using the CMake generated project file :)
Even though the CMake proto is still in early shape, I'd like to see more people tweet about it to get the word out to the VC devs. How many people know that the CMake proto can build mruby on OSX, Linux, and Windows mingw or VC? https://github.com/thecodeshop/mruby/wiki/CMake-compatible
No bikeshedding here, but if we have to spackle a bunch more VC/Win32-specific workaround code, the #include "mrb-internal/win32.h
and #ifdef HAVE_XXX
idea may start to look more attractive even if there's never any platform specific *.c
impl files ;)
from mruby.
I drop isfinite() from num_pow() in 74e531e.
from mruby.
I hope mruby support VC, and I would like to help.
VC does not have isfinite
but provide _finite
in <float.h>
.
from mruby.
Thank you. When you see any problem compiling mruby on VC, submit the issue.
If you could provide pull-request, that would be awesome, but report itself is valuable.
from mruby.
Related Issues (20)
- When `MRB_UTF8_STRING` is enabled, giving byte characters for `String#index` and `String#split` gives wrong results HOT 3
- Parse error with required kwargs and omitted parens
- `NODE_ZSUPER` from deeply nested blocks will result in a truncated digits for block index in `OP_ARGARY` HOT 1
- `NODE_SUPER` / `NODE_ZSUPER` on the top level passes the wrong block index to `gen_blkmove()` which generates `OP_GETUPVAR`
- MSVC: can't use `malloc()` in `string.c` with `WIN32_LEAN_AND_MEAN` HOT 3
- build with build_config.rb w/mruby extensions succeeds but doesn't create SciTE binary HOT 1
- mrb_fixnum returns wrong value if integer is large HOT 1
- Segmentation fault in function get_file in debug.c HOT 3
- Mirror of prettier package for pre-commit is now archived HOT 1
- Assigning to a block variable changes the actual block (thus affecting `block_given?` and `yield`) HOT 3
- `foo :bar {}` is legal in mruby? HOT 1
- method call faile on arm v5 HOT 2
- Calling method_missing with only Kwargs passes arguments incorrectly HOT 3
- Is peephole optimization done by mrb_load_string or only by mrbc? HOT 3
- Planned change patch for `mrb_vm_exec()` HOT 3
- Add an actual `Makefile` to the sources HOT 11
- Double free during GC sweep HOT 1
- mrb_gc_register() may cause GC and collect the object being protected HOT 2
- Detect โUse-after-freeโ with address sanitizer HOT 5
- Is possible change this line in gc.h ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mruby.