News for hackers. Stuff that matters.

Rangi42

Re:FLTK 1.4 Released on Wednesday November 20, 2024 @09:18AM (#42194107)
Theme author here! I designed those for a few of my C++ programs years ago, back before FLTK had high-DPI support. (I wasn't involved with porting them to fltk-rs, but I'm glad FLTK for Rust has them available!)

At 100% scaling, they look they way they're supposed to.[1] But at other scales, particularly non-integer ones, their drawing code will need updating to use the new fl_override_scale()/fl_restore_scale() API.[2] (Now that 1.4.0 is officially out, I expect to get back to maintaining those programs.)

[1]: https://i.imgur.com/A7CvKFe.png [2]: https://groups.google.com/g/fltkgeneral/c/gcqn9EeA7_A/

Re:Ask HN: Who wants to be hired? (April 2021) on Thursday April 01, 2021 @11:41AM (#26661897)
Location: New York City, NY

Remote: Yes

Willing to relocate: No

Technologies: Java, Spring, C, C++, Python, Spark, SQL, MongoDB, Angular, HTML5, CSS3, Javascript, Typescript, Git, Windows, Linux

Résumé/CV: https://www.linkedin.com/in/remyoukaour/

Email: [email protected]

Experience: 3 years full-stack fintech development; 2 years academic research; various web development; BS+MS in Computer Science

I've worked on a variety of projects in the past few years, from web app frontends and backends to an automated trading system, as well as retro assembly programming in my spare time (it's the polar opposite of Java+Spring's high-level abstraction). I'm seeking full-time employment but would also be open to short-term positions.

Re:Building a runtime reflection system for Rust (Part 3) on Saturday January 09, 2021 @05:24PM (#25705574)
From the article:

> There's an open issue for something like this: Variadic generics[1]. But so far every attempt at an RFC has been closed or postponed.

[1]: https://github.com/rust-lang/rfcs/issues/376

Re:Std::visit is everything wrong with modern C++ (2017) on Sunday December 06, 2020 @11:39AM (#25324573)
With C++17's compile-time conditionals, plus good old C preprocessor macros, you could do this:

    #define MATCH_VARIANT(x) [](auto& x)
    #define CASE_VARIANT(x, T) constexpr (std::is_same_v<std::decay_t<decltype(x)>, T>)
    
    MATCH_VARIANT(arg) {
        if CASE_VARIANT(arg, string) {
            printf("string: %s\n", arg.c_str());
            // ...
        }
        else if CASE_VARIANT(arg, int) {
            printf("integer: %d\n", arg);
            // ...
        }
        else if CASE_VARIANT(arg, bool) {
            printf("bool: %d\n", arg);
            // ...
        }
    }
(MATCH_VARIANT could be extended to allow capturing vairables, or just omit that macro, it saves less typing than CASE_VARIANT anyway.)
Re:Ask HN: Dark mode for HN please? on Friday May 15, 2020 @06:58PM (#23198500)
Here's my own dark theme userstyle for HN, with the colors from Firefox's dev tools.

For news.ycombinator.com - https://pastebin.com/K1KS64KR

For hn.algolia.com (the search form) - https://pastebin.com/ksH6QcV4

Re:Ask HN: Who wants to be hired? (April 2018) on Monday April 02, 2018 @12:13PM (#16735862)
Location: New York City, NY

Remote: Willing to consider

Willing to relocate: No

Technologies: C++, C, Python, Java, PHP, SQL, HTML/CSS, Javascript, Windows, Linux, Git, GUI design, technical writing

Résumé/CV: https://www.linkedin.com/in/remyoukaour/

GitHub: https://github.com/roukaour/

Email: [email protected]

I left Stony Brook University in 2017 with a Master's in Computer Science, and am currently seeking a software development position. I'm open to contract, part-time, or full-time opportunities. I care about writing code that's not just correct, but documented for the developers' sake and designed for the users' sake.

Re:Ask HN: Who wants to be hired? (January 2018) on Friday January 05, 2018 @03:21PM (#16081328)
Location: New York City, NY

Remote: Willing to consider

Willing to relocate: No

Technologies: C++, C, Python, Java, PHP, SQL, HTML/CSS, Javascript, Windows, Linux, Git, GUI design, technical writing

Résumé/CV: https://www.linkedin.com/in/remyoukaour/

GitHub: https://github.com/roukaour/

Email: [email protected]

I left Stony Brook University in 2017 with a Master's in Computer Science, and am currently seeking a software development position. I'm open to contract, part-time, or full-time opportunities. I care about writing code that's not just correct, but documented for the developers' sake and designed for the users' sake.

Re:Quadratic voting (2014) on Saturday September 09, 2017 @08:45AM (#15206817)
As the paper's abstract states, "Quadratic cost uniquely makes the marginal cost proportional to votes purchased". The full paper shows their proof and the assumptions behind it, such as "an individuals’ value for votes is likely to be approximately linear in the number of votes she casts so long as her utility is driven by the impact she has on the vote total, as argued by Mueller (1973, 1977) and Laine (1977)".
Re:Quadratic voting (2014) on Saturday September 09, 2017 @08:38AM (#15206795)
If merely 100 less-wealthy voters out of the whole population couldn't coordinate to buy a few extra votes—and they wouldn't even have to explicitly communicate, it would just take 100 people who individually hear about the issue and decide to vote more—then how important can the issue really have been to them?

I believe this is what is meant by "the collective decision rapidly approximates efficiency as the number of voters increases".

Sounds like the system would be doing its job in that case.
Re:What about cartesian programming? on Sunday April 30, 2017 @09:40PM (#14234969)
That translates fairly well into Python, with its set type and list/set/dict comprehensions.

    def setrange(first, next, last):
        return set(range(first, last+1, next-first))
    
    fizz = setrange(3, 6, 100)
    buzz = setrange(5, 10, 100)
    fizzbuzz = fizz & buzz
    fizz -= fizzbuzz
    buzz -= fizzbuzz
    num = setrange(1, 2, 100) - fizz - buzz - fizzbuzz
    line_map = dict({n: "Fizz" for n in fizz}.items() +
        {n: "Buzz" for n in buzz}.items() +
        {n: "FizzBuzz" for n in fizzbuzz}.items() +
        {n: n for n in num}.items())
    for i in range(1, 100+1):
        print(line_map[i])
Some SETL features Python lacks:

• No ellipsis notation for ranges; must use the "range" function and add one to the maximum value, or define a custom "setrange" function

• Can't concatenate dictionaries; must concatenate their "items" lists and convert back to a dictionary

• No consistent map-lookup notation; collections are indexed with brackets, but functions are called with parentheses

Re:How We Got 10M Teens to Read Fiction on Their Phones on Sunday April 23, 2017 @08:36PM (#14181228)
"Chat stories" with "comic-book inspired" young-adult plots, made to be read on mobile phones... Sounds like they've reinvented Japanese cell phone novels[1]. Sci-fi/fantasy YA plots are also common to light novels [2].

[1] https://en.wikipedia.org/wiki/Cell_phone_novel [2] https://en.wikipedia.org/wiki/Light_novel

Re:Five world map styles on Wednesday March 29, 2017 @01:01PM (#13988288)
From the Google Maps & Earth Help Forum[1]:

> Why does Google maps use the inaccurate, ancient and distorted Mercator Projection?

> Maps uses Mercator because it preserves angles. The first launch of Maps actually did not use Mercator, and streets in high latitude places like Stockholm did not meet at right angles on the map the way they do in reality. While this distorts a 'zoomed-out view' of the map, it allows close-ups (street level) to appear more like reality. The majority of our users are looking down at the street level for businesses, directions, etc... so we're sticking with this projection for now.

[1]: https://productforums.google.com/forum/#!topic/maps/A2ygEJ5e...

Re:Zerocoin implementation bug on Friday February 17, 2017 @08:19PM (#13673085)
Apparently those are names for 50 and 100 BTC.

From this presentation[1] or the source code[2]:

    1 Lovelace = 1 Bitcoin
    1 Goldwasser = 10 Bitcoin
    1 Rackoff = 25 Bitcoin
    1 Pedersen = 50 Bitcoin
    1 Williamson = 100 Bitcoin
But yes, those are meaningless names in themselves. Metric prefixes like "hectobitcoin" would be better.

[1]: https://sar.informatik.hu-berlin.de/teaching/2013-w/2013-w%2... [2]: https://github.com/Zerocoin/libzerocoin/blob/master/Coin.h#L...

Re:How Do I Declare a Function Pointer in C? on Friday January 20, 2017 @12:37AM (#13441907)
"Unambiguous" is not the same as "trivial". C code generally reads left to right, so a trivial syntax for declaring, say, an array of const pointers to functions that take a const pointer to a char and return a const pointer to a char, would have tokens for those things in that order.
Re:New Ubuntu-based Precision line-up on Monday January 09, 2017 @09:49PM (#13362136)
There may still be conference rooms and auditoriums with VGA-only projectors in 2027.
Re:People's underestimation of AI on Wednesday December 28, 2016 @07:50PM (#13274945)
I'm all for some kind of social support system to help people through automation. Unemployment benefits, basic income, subsidized retraining, those have their merits. But how does giving someone a do-nothing job, where everyone (including the worker) knows they're dead weight, respect their dignity?
Re:Reflecting on the Right to be Forgotten on Saturday December 10, 2016 @01:49AM (#13144439)
Effectively legal? It is legal. I can privately crawl the web for all references to "John Doe", "johndoe.com", "/u/johndoe28", etc, and save them, because it's all content that John Doe chose to make publically available, whether on his own website or on forum posts or Facebook or what.

There's probably some point at which the ways I use that data can be classified as stalking or harassment, but simply collecting it is allowed.

Re:Nommu Linux on Monday October 10, 2016 @05:14AM (#12675981)
TempleOS already does this. ("This" being "no virtual addresses".)
Re:The P programming language on Sunday October 09, 2016 @11:10PM (#12674784)
If you can rely on the developer to use gotos in clear patterns like that, then great. But if there is a recognizable pattern, it's an opportunity for the language to provide an alternative like with{} or try{}finally{}.
Re:Bitcoin Wealth Distribution on Saturday September 24, 2016 @04:16PM (#12572454)
"Everything is linear if plotted log-log with a fat magic marker." — Mar's Law
That's a false dichotomy, especially since they're getting more flak for deleting the controversial photo than they would have for removing it. It's pretty easy to distinguish between a historically significant photo, to keep, and 4chan-style offensive trolling, to delete. There is a gray area, but this was clearly on the right side of it.
Re:What typing ^D does on Unix (2009) on Tuesday September 06, 2016 @03:39PM (#12438711)
But Ctrl is easier to figure out from context, since it's a multi-character Googlable symbol that's even printed on the key.
Re:I want to motivate you to keep trying to switch to Linux on Saturday September 03, 2016 @02:39AM (#12418062)
That cursor bug has bothered me on Xubuntu 16.04. I didn't realize how old it was. Is there a workaround besides "awkwardly save your work and restart using the keyboard and an invisible cursor"? (Please nobody say "stop using a mouse"; just try editing graphics without one.)
Re:Folding Paper in Half (2015) on Monday August 22, 2016 @09:23AM (#12336113)
You can even solve cubic equations with origami[1], which is what allows you to double a cube and trisect an angle by adding folding to the usual tools of compass and straightedge. (It's still not enough to square the circle.)

[1]: http://math.stackexchange.com/questions/581958/solving-cubic...

> Because of the large amount of global variables... NCC Group was unable to fully determine the impact of this vulnerability.

In other words, "This project is too full of potential security holes to find the definite ones."

Re:Test your “free will” at the Aaronson Oracle on Friday June 03, 2016 @02:10PM (#11832090)
I can consistently get 60% by drumming the keys with both index fingers, not consciously picking the values but still generating them myself.
One advantage to my grandmother still using Windows XP: it won’t auto-upgrade to Windows 10.
Re:Europe nearing Google antitrust charges on Tuesday April 19, 2016 @03:12AM (#11525340)
If cornering 80% of the market is so terrible, the EU should make it illegal to sell the Nth Android phone that pushes past 79%, and/or make it illegal for the customer to buy such a phone.

The absurdity of such a proposed law should make it obvious that Google is doing nothing wrong by selling popular devices with a certain operating system.

Older »