HNHacker News
TopNewBestAskShowJobs

boris

1,171 karma · joined February 20, 2007

http://build2.org/ http://codesynthesis.com/
submissionscomments
boris··on Bcachefs: “the COW filesystem for Linux that won't eat your data”
>Snapshot implementation has been started, but snapshots are by far the most complex of the remaining features to implement

Snapshots are the #1 feature of COW filesystems. I've been using them for a bit in btrfs and this feature is game-changing (and no, it hasn't eaten my data yet).

boris··on The sad state of test frameworks
If you like this approach, you may like Testscript even better: https://build2.org/build2/doc/build2-testscript-manual.xhtml
boris··on Testing GCC
Interesting to see complex pieces of software including features that are primarily used for testing. I guess this is a natural next step after having testing micro-formats[1].

One thing I don't like about GCC's testing framework is the number of files. If you need to test 10 related things (say, diagnostics for a particular language construct), then you will have 10 different test files. I would much prefer for them to be in a single file. This is one of the goals of Testscript[2].

[1] https://blog.nelhage.com/2016/12/how-i-test/

[2] https://build2.org/build2/doc/build2-testscript-manual.xhtml

boris··on Testing LLVM
Which only has effect if you pass multiple files to compile.
boris··on Single-file C/C++ public-domain/open source libraries with minimal dependencies
A package manager for C++ wouldn't be that difficult if there was a sane, uniform build system available.

But there is something actively developed in that direction: https://build2.org and https://cppget.org

In fact, the package manager is pretty feature-complete, just the build system is still heavily developed.

boris··on SQL Server on Linux public preview
Microsoft had SQL Server Native Client (ODBC) driver for Linux available for a few years now. So your could develop/test on Linux with SQL Server running in a VM. This is how we have been doing it in ODB (C++ ORM) for years.

Of course, don't expect either of them to be open source. Which means an open source ORM backend that depends on them can't be in an official Debian/Ubuntu/RH repository.

boris··on Ask HN: Who is hiring? (October 2016)
Cape Town, South Africa | UNIX Sys Admin | Full/part-time | Remote (but in CT)

* GNU/Linux (.deb/.rpm), FreeBSD, Mac OS (virtually no Windows)

* KVM-based virtualization (virsh, libvirt, bridging)

* Network (ssh, rsync, OpenWRT, etc)

* Bash scripting ($* vs $@)

* Security (X509, letsencrypt, Yubikey, etc)

* ZFS/Btrfs/COW (one-shot VMs, etc)

At Code Synthesis we build development tools and you will help maintain the development/deployment infrastructure.

http://codesynthesis.com

https://build2.org

If you are interested, boris@codesynthesis.com.

boris··on Cargo: predictable dependency management
Check out https://build2.org
boris··on GNU Make Jobserver Implementation
GNU make is a giant string-chopping hairball written in C over the past 30 years by numerous authors. Paul D. Smith (the current maintainer and the author of this article) has actually been doing a lot of codebase cleanup over the past years. But still any major change is a monumental task.
boris··on Cget: cmake package retrieval
Or not: https://build2.org
boris··on Build2 – C++ Build Toolchain
What exactly is missing in our setup that you think is critical?

The reason we don't use GitHub is because we like to be in control of things rather than relaying on someone else's whim. Maybe we could setup a mirror?

boris··on Tesla Motors Announces a New Home Battery
Today I went to pick up two 100AH lead-crystal batteries for a long-run UPS (we now have regular load-shedding here in South Africa). If I believe all what I have read about them online, they are amazing, compared to lead-acid. Crazy heavy though (33kg each).
boris··on Sqlpp11 – A type safe SQL template library for C++
You should show the definition of 'foo'. That's where things get ugly.
boris··on Challenge: Implement CLI interface like that?
The question, of course, is whether it will scale to more complex cases with more elaborate option documentation (i.e., multiple paragraphs, formatting, short version for usage, extended version for man/html, etc).

For C++ there is the CLI compiler that implements a similar idea (i.e., uses a DSL) but instead of using the usage itself as a specification, it is based on the class-with-members abstraction. While the result is not as terse, it is quite a bit more flexible. Plus it allows you to specify option type (i.e., int, double, string, etc).

From a single interface specification CLI will generate C++ parsers, usage printing code, man pages, and html pages. Here is an example of a real-world interface that is handled with CLI:

http://codesynthesis.com/products/odb/doc/odb.xhtml

The project page is here:

http://codesynthesis.com/projects/cli/

boris··on Must-Dos Before Founding a Start-Up
From experience, I would say #1 is to take a nice, long, no-emails vacation. Because once you start, you ain't gonna have one until you are done.
boris··on MemSQL (YC W11) Raises $2.1 Million From Ashton Kutcher, SV Angel And More
When I hear about such "MySQL replacement" databases built from grounds up by companies that are just a few months old, I always wonder how complete their support for MySQL feature set is. Do they support every SQL feature/quirk/misfeature of MySQL?

It seems to me that unless it is a complete one-to-one mapping, it is going to be a nightmare to explain what is supported and what is not.

boris··on Ask HN: Best monitor for software development?
I switched to HP ZR30w (30" IPS panel) not long ago from an old 20" Dell. The text is super clear and the space is huge.

Some people say that they use a 24" panel in the portrait mode for coding. I haven't tried it myself but one thing that I am curious about is whether their neck starts hurting. You see, if you have a text editor occupying all of the vertical space in such a setup, you cannot just move your eyes to be able to see the top and botton text. You actually have to move your head. I already feel this a bit on my 30" in the ladscape mode. That's why my emacs is not running at full-vertical-screen.

boris··on The context sensitivity of C’s grammar
To be more precise, "a context-free parser has to receive a TYPE-NAME token...". A hand-coded parser would be able to parse things just fine if both XX and yy were IDENTIFIERs.

Or, to put it another way, you resort to uglyfying the lexer to overcome definiciencies in the parser.

boris··on Advice for YC applicants on the fence
I don't think there are many YC startups that can boast a few hundred grand per year in profit, as opposed to revenue or money they raised.
boris··on Libraries in C++ for ACM
The code is fairly idiomatic C++, except maybe for the name of the class template (BST); hardly anybody names their classes in all capital letters (note that naming template parameters [T, MAXN in this case] in all capitals is quite common). Other than that, maybe the spaces after ( and < as well as before ) and > are a matter of taste.
boris··on Ask HN: Simple, accessible straightforward book on accounting?
"The Accounting Game: Basic Accounting Fresh from the Lemonade Stand"

It may look silly on the outset, but this is the book. Accounting is very idiomatic. If you are not "in", things just look backwards or outright idiotic, especially if you have math or similar background. This book bridges the gap between the common sense and accounting.

boris··on How to write cross-platform code
He doesn't have big enough patent warchest?
boris··on On a New Road : James Gosling on Apple and Java
Sun to developers: "With Java you can write once and run anywhere!"

Sun to OS vendors: "Hey, we just promised developers they can run Java on your platforms. Now you go make it happen!"

Apple to Sun: "... you!"

boris··on AsmXml: a fast XML parser/decoder in pure x86 assembler
Except that RapidXml is not a real XML parser. It is a parser that can only handle a subset of XML 1.0 language. See:

http://www.codesynthesis.com/~boris/blog/2008/05/19/real-xml...

boris··on AsmXml: a fast XML parser/decoder in pure x86 assembler
Those are exactly the questions I ask myself every time I hear about a new, super-fast XML parser. Is it a real XML parser[1] or can it only handle a "simple" subset of XML? I am surprised that more people don't seem to share the same skepticism as you and me. Probably because most people don't realize that implementing a conforming XML 1.0 parser is not a trivial task.

And you are right about the XML data binding tools. In most cases parsing XML itself is not what takes the bulk of the time. It is validation (against DTD, XML Schema, or ad-hoc), data conversion (e.g., from "123" string to 123 integer) and perhaps construction of some in-memory representation (with memory allocations that it involves) that take the bulk of the time. There are existing tools[2] that can performs the above tasks an order of magnitude faster than a general-purpose XML parsers by generating the tailor-made validation and data extraction code as well as data structures from XML Schema.

[1] http://www.codesynthesis.com/~boris/blog/2008/05/19/real-xml...

[2] http://www.codesynthesis.com/products/xsde/

boris··on Ask HN: Who's hiring? (September 2010)
Hard-Core C++/Systems Programming - Cape Town, South Africa

Good sense of design, Modern C++, compilers, source-to-source translation, object persistence, multi-threading, etc:

http://www.codesynthesis.com/company/jobs.xhtml

boris··on Ask HN: What's your computer setup?
Office hardware: Dual Nehalem Xeon 2.4Ghz with 12GB RAM and two RAID'ed Cheetah SAS drives, all in Supermicro chassis. make -j 16 all the way!

Travel hardware: ThinkPad T61

Software on both: 64-bit Debian unstable with xorg/sawfish wm (no Gnome or KDE), emacs, screen, g++, make, etc.

boris··on GCC starts move towards implementation in C++
because large-scale C projects end up reinventing C++ features in a more complicated, error-prone way

You are spot on. Here is an excerpt from a blog post on writing a GCC plugin:

The GCC AST itself is a curious data structure in that it is an implementation of the polymorphic data type idea in C (next time someone tells you that polymorphism works perfectly in C and they don’t need “bloated” C++ for that, show them the GCC AST). The base “handle” for all the AST nodes is the tree pointer type. Because the actual nodes can be of some “extended” types, access to the data stored in the AST nodes is done via macros. All such macros are spelled in capital letters and normally perform two operations: they check that the actual node type is compatible with the request and, if so, they return the data requested.

http://www.codesynthesis.com/~boris/blog/2010/05/10/parsing-...

boris··on GCC starts move towards implementation in C++
throwing an exception in the constructor comes to mind, in which case the destructor isn't called

Of course it is not called -- the object has failed to construct. There is no object. You cannot call a destructor on nothing. Now if some data member has been constructed but the call constructor failed, destructors for such members will be called.

boris··on Dehydra: Static analysis for C++, scripted with JS
Dehydra is a thin wrapper over GCC AST that allows you to access it from JS. This means you (or someone else) has to write the actual JS code that does the static analysis.

If you want some more information on how this works, take a look at this intro to parsing C++ with a GCC plugin:

http://www.codesynthesis.com/~boris/blog/2010/05/03/parsing-...

← PreviousPage 9 of 12Next →