22 ms·
Wow, didn't expect to see this at the top of HN. Thanks kudo for promoting the project! Aaron Leung and I have been working on this for a while. I'm the origin
by hcatlin 13y ago
Wow, didn't expect to see this at the top of HN. Thanks kudo for promoting the project!
Aaron Leung and I have been working on this for a while. I'm the original creator of Sass and Aaron is a badass computer linguist. Hoping to announce some big new features around the end of the year.
Official site is at: http://libsass.org http://libsass.org
Or, follow us on Twitter for more updates: @hcatlin & @akhleung
- akhleung 13y agoYes, playing catch-up with Ruby Sass has been difficult (the sophistication and subtlety of some of Sass's features are impressive), but we're hoping to make some big leaps by the end of the year!
- mradmin 13y agoAre you planning on creating the sass-convert utility?
- kudu 13y agoNo problem, thanks for your work on Sass! I suggest linking to the website from the GitHub repo, I hadn't seen it.
- mhogomchungu 13y agoa bit of optimization in $src/libsass/copy_c_str.cpp char* copy_c_str(const char* orig) { size_t len = strlen(orig) + 1 ; char* copy = (char*) malloc(sizeof(char) * len ); memcpy(copy, orig, len); return copy; }
- akhleung 13y agoThanks, I'll give it a try and benchmark it. Also, pull requests are welcome for this sort of thing!
- mtklein 13y agoor maybe just #define copy_c_str strdup ?
- unwind 13y agoUh, okay. I didn't read the original, sounds somewhat scary. Anyway, please don't cast the return value of malloc() in C (http://stackoverflow.com/a/605858/28169 http://stackoverflow.com/a/605858/28169). Also, of course len should be const and sizeof (char) should be removed. Also testing whether malloc() succeeded before relying on the result being valid is a good idea (but perhaps there's machinery in place to abort on error), as is deciding what to do if the input string is NULL.
- dchest 13y agoAnyway, please don't cast the return value of malloc() in C (http://stackoverflow.com/a/605858/28169 http://stackoverflow.com/a/605858/28169). It's C++.
- deleted 13y ago[deleted]
- beagle3 13y agoit will; he allocates and copies strlen()+1 bytes
- stevekemp 13y agoWouldn't this be even better: return( strdup( orig ) ); ?
- WalterSear 13y agoI'm sure I'm not the only person who's spent more time than they should trying to decide whether rebuilding sass would take longer overall than just waiting for the ruby one to finish compiling something :) Thanks for this!
- nightwolf 13y agoJFYI: The link to SassC on http://libsass.org http://libsass.org is broken.