HNHacker News
TopNewBestAskShowJobs

cremno

2,647 karma · joined March 24, 2012

submissionscomments
cremno··on Linus Torvalds: Apple's HFS+ is probably the worst file-system ever
Another “funny” detail:

>The maximum representable date is February 6, 2040 at 06:28:15 GMT.

http://dubeiko.com/development/FileSystems/HFSPLUS/tn1150.ht...

cremno··on What is special about Nim?
>So Nim really needs more active users and contributors.

I've fixed an issue you're experiencing: https://github.com/Araq/Nim/issues/1804 :3

cremno··on MRI Developers Don't Use RubySpec and It's Hurting Ruby
The final draft is available: https://www.ipa.go.jp/osc/english/ruby/

But the ISO document is mostly irrelevant, if we talk about Ruby implementations like CRuby, JRuby, or Rubinius.

cremno··on Nim (formerly Nimrod) 0.10.2 released
>why it's not as hyped

I don't know how relevant that is, but Rust has Mozilla (and Samsung?) and Go has Google plus some Unix / Plan 9 people behind it. But Nim? There are probably other factors as well.

cremno··on Subtraction is not comparison
But GCC likely isn't able to do that for libc functions like qsort(). Maybe if LTO is enabled and libc is linked statically, it might.
cremno··on Subtraction is not comparison
Then why isn't his example stupid, but fine? They're basically doing the same bad thing - subtracting two signed integers without caring about possible overflow.
cremno··on Subtraction is not comparison
If performance really is of concern, qsort() or similar functions probably shouldn't be used. Instead a dedicated function, which allows to choose a specific algorithm (qsort() doesn't have to use quicksort) and also doesn't involve calling a comparison function pointed to by a function pointer, can be used.
cremno··on Subtraction is not comparison
You should read the post again and then open the last link. Then tell us again that the example is fine.
cremno··on Fast median search: an ANSI C implementation (1998)
>Every ANSI compliant C library comes with an implementation of a quicksort routine

Actually the standard doesn't require qsort() to be quicksort. For example, musl's implementation uses the smoothsort algorithm.

http://port70.net/~nsz/c/c11/n1570.html#7.22.5.2

http://git.musl-libc.org/cgit/musl/tree/src/stdlib/qsort.c?i...

cremno··on New optimizations for X86 in upcoming GCC 5.0
Actually Clang doesn't implement the listed built-in functions (yet?). They're type-generic versions.

http://llvm.org/releases/3.5.0/tools/clang/docs/LanguageExte...

http://clang.llvm.org/docs/LanguageExtensions.html#checked-a...

cremno··on Ruby Threads and the Global Interpreter Lock in C
CRuby's standard library is partially written in Ruby.

https://github.com/ruby/ruby/tree/trunk/lib

Rubinius' one (called RubySL) also includes some rewrites of standard libraries, that were originally written in C. And as you may know, Rubinius itself is just Ruby code to some extent.

https://github.com/rubysl

mruby has some Ruby code, too. Even some parts of the core language are written in it.

https://github.com/mruby/mruby/tree/master/mrblib

cremno··on Crystal: the programming language
>Matz's regret for `do ... while`

Huh? Do you mean http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/...? It's still there: http://crystal-lang.org/docs/syntax_and_semantics/while.html

Edit: Ah, the behavior of the while modifier is different in Crystal.

cremno··on GitHub dropped Pygments
Your assumption is correct. The blog post links to an issue in which an official statement (and a graph) can be found:

https://github.com/github/linguist/issues/1717#issuecomment-...

>By using TextMate grammars we also get some nice features like highlighting SQL inside Ruby heredocs. But the main motivation was improving performance.

cremno··on Chrome now uses clang for production builds on Linux
They have a site covering compatibility with MSVC: http://clang.llvm.org/docs/MSVCCompatibility.html

I think it's pretty acceptable, if you're writing C. As you can see, C++ support is only partially completed (no exceptions!). But you're right, Clang on Windows gets constantly improved.

The creation of good debugging information (MSVC's /Zi or even /ZI option) is also missing. For a first class citizen, support of the (undocumented) PDB format is a requirement in my opinion.

cremno··on Show HN: A Fast, Malloc-Free C++14 Json Parser and Encoder

  void fun(int mandatory_arg, int optional_arg1 = 1, int optional_arg2 = 12, int optional_arg3 = 12);
No, this isn't legal ISO C. There are ways to simulate them though: https://gustedt.wordpress.com/2010/06/03/default-arguments-f...
cremno··on Ruby 2.1.5 Released
And what has that do with the core developers? Is there a bug that prevents 2.1.5, but not 2.1.4 from running on Windows? The hostility against Windows is usually rather a community issue.

And they're not releasing pre-compiled versions for any other OS either. Build it yourself [1] or try to be patient until Luis Lavena uploads the Ruby Installer for 2.1.5.

[1] https://github.com/oneclick/rubyinstaller (edit config/ruby_installer.rb to compile 2.1.5 and not 2.1.4)

cremno··on Visual Studio 2013 Community Edition now available
http://blogs.msdn.com/b/visualstudio/archive/2014/11/12/visu...:

>VS Community enables you to develop everything from Windows Forms and WPF and MFC to Windows Phone and Store to Azure and ASP.NET

cremno··on Visual Studio 2015 Preview Is Now Available
I linked to the VC++ blog post as there wasn't a post on the official Visual Studio blog yet. So if C++ isn't your thing or you're interested in other changes to VS, there is one now: http://blogs.msdn.com/b/visualstudio/archive/2014/11/12/visu...
cremno··on World War II Is Full of Plot Holes (2010)
https://en.wikipedia.org/wiki/Adrian_Carton_de_Wiart

>He served in the Boer War, First World War, and Second World War; was shot in the face, head, stomach, ankle, leg, hip, and ear; survived two plane crashes; tunnelled out of a POW camp; and bit off his own fingers when a doctor refused to amputate them. Describing his experiences in World War I, he wrote, "Frankly I had enjoyed the war."

https://en.wikipedia.org/wiki/Simo_H%C3%A4yh%C3%A4 | http://www.telegraph.co.uk/news/uknews/1517044/The-long-view...

>Using nothing more than an iron-sighted, bolt action standard rifle, Simo killed 505 Russians during a three-month period

cremno··on Libtls – New TLS API from LibreSSL
This isn't a standalone implementation (yet [1]). It's a sane wrapper around OpenSSL's less sane libssl API.

[1] https://marc.info/?l=openbsd-tech&m=141524972826918&w=2

cremno··on DuckDuckGo understands unicode
Bing (and Yahoo) does, too.

http://blogs.bing.com/search/2014/10/27/do-you-speak-emoji-b...

cremno··on C Legacy Is Evil
In ISO C++ and GNU C you can also omit the 0:

    struct tm tm_struct = { };
cremno··on C4 – C in 4 functions
I think it doesn't work on x86-64, since the code assumes

    sizeof(int) == sizeof(void*)
cremno··on Intel subsidiary fined for unlawful export of software that enables encryption
I'm not sure if it was intended, but using that idiom here looks to me as a clever reference to <blink>.
cremno··on Will It Optimize? (2010)
There doesn't seem to be any differences. I've used http://gcc.godbolt.org/, where one can also use Clang and compare the produced assembly by it with GCC's. At least one optimization is done by Clang 3.4.1, but not by GCC 4.2.1 and 4.9.0.
cremno··on Windows 93
A weird Win95-style desktop with some interesting “programs”: https://i.imgur.com/7l8JhBL.png
cremno··on Show HN: Maim – A simple screenshot utility for Linux
Actually it would be:

  topng < /dev/screen > foo.png
cremno··on Fixing a 37-year-old bug by merging a 22-year-old fix
ASCII case-insensitive comparison of up to 8 characters from a stream with "infinity".
cremno··on Fixing a 37-year-old bug by merging a 22-year-old fix
>does this line predate the while loop?

It's the other way around. Very early C didn't have a for loop. It seems it was introduced in Unix V5: http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/c/c00.c

And a for loop is basically just a while one, but they are sometimes used in different ways than the usual `for (size_t i = 0; i < len; ++i)`. One of my favorites is http://git.musl-libc.org/cgit/musl/tree/src/internal/floatsc....

>or boolean values in C?

1 and 0 are boolean values in C. But C didn't have a boolean type until C99 (called _Bool or bool after including <stdbool.h>).

cremno··on Reverse engineering the binary data format for Star Wars: Yoda Stories
I found Waldo! Just kidding, but I found Indiana Jones. I also doubt, that the sprites on the left side of him, are part of this Star Wars game.

Edit:

I did the same for the Indiana Jones game: https://i.imgur.com/c1kKfV7.png

(thanks ImageMagick's convert and montage)

Edit 2:

Well, they're part of the game according to http://starwars.wikia.com/wiki/Star_Wars:_Yoda_Stories:

>Indiana Jones is featured as an easter egg in a mission, as a sequel to a mission in Desktop Adventures. His similarity to Han Solo is remarked upon.

← PreviousPage 6 of 7Next →