HNHacker News
TopNewBestAskShowJobs

bstamour

303 karma · joined July 19, 2013

submissionscomments
bstamour··on NIST Random Beacon
For those interested, here's a Haskell interface to the Beacon I put together some time ago [1].

[1] https://github.com/bstamour/haskell-nist-beacon

bstamour··on Ways to Get Better at C++
Haskell did the same for me.
bstamour··on Ways to Get Better at C++
* High performance/scientific computing

* Graphics

* Infrastructure (web servers and browsers, OS's, drivers, etc)

* Any desktop apps that are CPU/memory intensive. think image processing, video editing, even office applications

* Finance

* Games

* AI. GPUs are becoming more popular for training machine learning models, and C and C++ are pretty much dominating this space with OpenCL, CUDA, etc.

You mentioned in previous comments that browsers and stuff don't really count because you're not going to be implementing a browser that competes with the big four. But people have to work on maintaining those browsers. Same with MS office, Photoshop, etc.

The world pretty much runs on C and C++. From the steering column in your car to the computational fluid dynamics models that predict hurricanes and save lives, to the telephone switches that route your cell phone calls. Until pretty much every important piece of digital technology, small or large, switches over to a new language, there will be a need for C and C++ developers.

bstamour··on Ask HN: What language-agnostic programming books should I read?
Though it uses a subset of C++ for the code examples, Elements of Programming by Stepanov and McJones. It shows how algebra can serve as an effective foundation for engineering generic, reusable programs.
bstamour··on Show HN: 15-question programming quiz with answers
I would have done better had I known how python does parameter passing...
bstamour··on C++ Language Quick Guide
That's because gcc supports it as an extension to C++. It's not an official part of the language, and using it in C++ code is therefore not portable across compilers/platforms.
bstamour··on C++ Language Quick Guide
C supports variable-length stack-allocated arrays, while C++ doesn't. So code like

    void f() {
        int x;
        scanf("%d", &x); // read from user
        int numbers[x]; // dynamic
    }
is legal C, but not C++.

Also, the C "restrict" keyword doesn't exist in C++ either. Add in C's looser typing rules regarding conversions, and C and C++ are basically sibling languages at this point. Their common ancestor language being K&R-era C.

bstamour··on Miranda: A non-strict functional language with polymorphic types (1985) [pdf]
I'm not sure, honestly. It would be nice if it were.
bstamour··on Miranda: A non-strict functional language with polymorphic types (1985) [pdf]
The University of Windsor used it in their first year intro to CS course up until 2015. I wonder how many other places still use it.
bstamour··on Miranda: A non-strict functional language with polymorphic types (1985) [pdf]
We used Miranda in my first year intro to CS course back in 2006. It was still used at my university up until last year. Others may disagree, but I feel that it's a fine language for teaching fundamental CS concepts like recursion/induction, formal reasoning about your programs, data types, etc.
bstamour··on C++ Language Quick Guide
I've found the C++ Standard Library 2nd Edition to be an excellent companion to Stroustrup's Tour of C++. It does a good job of preventing you from reinventing wheels that others have already built for you.
bstamour··on C++ Language Quick Guide
Please update the section on storage classes. Auto is no longer a storage class, but a keyword for automatic type deduction. Also, register has recently been deprecated as well, if I remember correctly.
bstamour··on Pegasus Mail
I know, right? That was the email client my dad used back when we first got dialup in the early 90's.
bstamour··on Mapping Strings in C++
> At least with C you get the power to do things the way you want to

C++ gives you the same level of control over your program that C does, but also comes with nice low-cost (in many cases zero-cost) abstractions for when you need them.

bstamour··on C++ 17 is Done
Yeah, I kind of agree that C++, when used badly, can result in some serious mess-ups in the safety department. But for better or worse the language is here to stay (at least for the foreseeable future) so it's good that these guidelines and tools exist.
bstamour··on C++ 17 is Done
C++ has that. Check out clang_tidy [1].

EDIT: In particular, the clang tidy linter has a way of checking your code against the C++ core guidelines [2], which is a set of modern best practices for the language.

[1]. http://clang.llvm.org/extra/clang-tidy/

[2]. https://github.com/isocpp/CppCoreGuidelines

bstamour··on Ask HN: Best books on AI?
Any particular reason why? I feel that the problem of mapping sensory inputs like sound etc onto internal concepts for reasoning is an important part of AI.
bstamour··on Master C++ Programming with Open-Source Books
I actually feel the exact opposite when I program in C. C is so bare that most of my time is spent building the correct constructs I need to solve my problem. C++ on the other hand has a decent set of high level features that makes it easier for me to focus on the problem.
bstamour··on How Do I Declare a Function Pointer in C?
Agreed. I rarely use pmf's, so every time I do I have to look up the syntax again.
bstamour··on How Do I Declare a Function Pointer in C?
Yeah, typedefs solve the problem for fixed types. I guess you could use a macro to create a generic FUNC_PTR or something as well.
bstamour··on How Do I Declare a Function Pointer in C?
This is one of those cases where I prefer C++

    template <typename Func> using function_ptr = add_pointer_t<Func>;
and now declarations are a bit more sane:

    void foo(function_ptr<void (int)> callback);
bstamour··on Brief History of Haskell
I read through it a long time ago, and it's fine for learning the core of the language. Real World Haskell and Learn You A Haskell For Great Good are probably better introductions nowadays.
bstamour··on Is having a '.name' email address a good idea?
I used to own $lastname.email, but I ran into issues with other people's accounts flagging me as spam.
bstamour··on Why I don't want stuff
You don't need to be low-income to appreciate free, perfectly good stuff.
bstamour··on Org-Mode for Writing: Structure and Focus
You can use the w3m console browser from inside emacs.
bstamour··on People Call Me Aaron
> No one ever quits.

I've been clean and sober since Zendikar. It's tough, but every day it gets a little easier. :-)

bstamour··on You Don't Have to Be a Scientist to Own a Proper EEG Headset
When you say real progress, are you referring to the underlying technology itself, or something else?

With regards to the technology, I'm not sure if there's much more room for improving EEG itself, it seems like a solved problem (how do we measure electro-dermal (or brain) activity). However I'm not a neuroscientist, so I may be off base. Where I do see room for improvement is in systems that can automatically make sense of the signals we're reading. This requires gaining a better understanding of the brain, though.

bstamour··on Screenshots from developers and Unix people taken in 2002
I used to think his browsing/emailing habits were silly, but then I started working in the park about 5 years ago on nice days. My phone data plan at the time was pretty crappy, so I rigged up a system using a local imap server and offlineimap/msmtp/msmtp-queue to effectively work offline. I'd get my batch of emails once at the beginning of the day, and I could attend to them (reply, forward, copy, etc) over the course of the work day, and batch-send them all out when I'd be connected again.

I never got to the point of having a bot fetch web pages for me, but I can see it as an extension of what I had set up. For someone who travels as much as Stallman, I think it's a very efficient way to browse and email when internet connections are either spotty or not to be trusted.

bstamour··on Living with Microsoft C++ Compiler Bugs and Ambiguities
> VS2010 was one of the first compilers (even before gcc/clang)

GCC supported C++0x features back when they thought the standard would be released before 2010. Hence the 0x, not 1x. I remember using the `-std=c++0x` flag back in 2008, when I first took a course on C++, which is a few years before VS2010.

bstamour··on Building a Tetris Clone in x86 Assembly, pt. Ⅱ: I/O
Thank you for this link. I was actually unaware of the site guidelines. I'll be conscious of them going forward.
← PreviousPage 3 of 5Next →