News for hackers. Stuff that matters.

mierle

Re:How to make smaller C and C++ binaries on Sunday May 07, 2023 @02:39PM (#35854254)
I work on Pigweed, a suite of embedded C++ tools and libraries. A major focus for us is size optimization, and we've written up some of our learnings:

https://pigweed.dev/docs/size_optimizations.html

Wow, it's cool to see astrometry.net get put to use! I worked on astrometry.net back in undergrad and grad school. If you have questions about how it works, I can answer them.

How does it work? astrometry.net uses 4-star combinations to define codes, then indexes the codes on the celestial sphere. The particulars of each of these phases matter, but that's the basic idea.

Re:The Next Chapter for Learning on YouTube on Friday September 09, 2022 @08:04PM (#32786341)
Take a look at Veritasium's perspective on this issue [1]. Veritasium reflects on clickbait thumbnails from the content producer perspective, and balances that against the motivation behind YouTube's algorithms. His final conclusion is that cilckbait isn't all bad, and that it serves an important purpose for both viewers and content creators. His classification of clickbait into different types is also fascinating.

[1] https://www.youtube.com/watch?v=S2xHZPH5Sng

Re:ELF: From the Programmer's Perspective on Sunday March 06, 2022 @01:59PM (#30580075)
The key to understanding ELF is that it serves three purposes:

(1) Execution - A container describing how an OS can load and execute a binary

(2) Linking - A container with relocatable machine code; for the linker to assemble

(3) Metadata for debugging and other purposes like stack traces

Program headers describe "segments". Segments are for the execution time view of the ELF. They describe the parts of the file to load into memory regions, and the execution entry address. The program headers are what are read by the OS when running "./my_executable". The segments don't always have names. Also, it is confusing that "sections" and "segments" mean very different things, but that's just how it is.

Thus, program headers (and the segments they describe) are for #1 - Execution.

Sections are a link-time construct, leveraged by the linker, to decide how to allocate functions and data to the execution segments (via sections). Intermediate ELF object files contain relocatable code, where the code is allocated to sections (you can manually specify them if you want). Example sections include ".text", which is executable code; ".bss" which is zero-initialized static variables; ".data" which is pre-initialized static variables, and so on. You can see an example of sections being allocated to segments in this thoroughly described linker script [1]. Sections are mostly ignored during program execution.

Thus, section headers (and the sections they describe) are for #2 - Linking.

You aren't alone in not knowing these details about ELF. It wasn't until I got into the embedded space that I dug deep to understand linking and loading, linker scripts, and executable formats. These details are important to understand for microcontrollers since you may need to carefully allocate code to physical addresses that have faster memory (e.g. core coupled RAM), or put code in flash. In some cases you execute code directly out of flash (so must tell the linker that including physical addresses); but in other cases, you might need to load code into RAM (manually, there is no OS!) from flash since executing out of flash can be slow. On desktops and servers, it's rare to change (or even know about) linker scripts.

[1] https://blog.thea.codes/the-most-thoroughly-commented-linker...

Valora made it easy for me to donate to a typhoon relief effort - https://doni.app/c/36/. The onboarding flow is well thought through. Valora is the first app that for me, feels like a crypto currency system that's usable by normal people. I suggest checking it out if you've interested in crypto but haven't given it a try yet.
Re:Google Photos will end its free unlimited storage in June 2021 on Wednesday November 11, 2020 @02:52PM (#25062200)
If you're interested in self hosting and willing to put in a bit of work to collect data from your online presence for archival, take a look at Perkeep (previously known as Calimstore) [1].

[1] https://perkeep.org/

Have you seen Saga [0]? They're an app for making private podcasts with people in your life but, it's free - they help you choose questions and then everyone can hear each other's answers. There is an app [1] for the tech savvy, but also they have a dial-in option for older users where they can just call from a landline and record that way.

[0] http://trysaga.com/

[1] https://apps.apple.com/app/saga-private-family-podcast/id150...

Re:Embedded Programming Without the IDE on Sunday October 25, 2020 @02:43PM (#24888743)
My team works on Pigweed [1], which offers a more terminal based approach to embedded development. Instead of working with Make, we use GN [3] as our primary build system (though we also support CMake, and plan to support Bazel).

The "pw watch" command is an integrated watcher that can detect file changes from e.g. vim, then re-build, re-flash your device, and re-run tests according to the dependency graph. I use 2 or 3 STM32F429i Discovery boards to run tests in parallel.

If you're curious, we're giving a workshop [4] at Hackaday's Remoticon; feel free to join or watch the recording after it's up.

[1] https://pigweed.dev

[2] https://pigweed.dev/docs/getting_started.html

[3] https://gn.googlesource.com/

[4] https://hackaday.io/project/175167-remoticon-give-pigweed-a-...

Re:How to Detect Business Fraud on Tuesday May 05, 2020 @02:45PM (#23083333)
For those who are interested in the accounting side, I highly recommend Financial Shenanigans by Howard Schilit [1]. If you don't have an accounting background, all you need to get value out of this book is a basic understanding of the double entry accounting method, and understand the four financial statements: balance sheets, income statements, cash flow statements, and statements of shareholders equity.

After reading this book, I found myself digging through earnings reports to look for signs of shenanigans, and have found cases that raise my armchair-accountant eyebrows.

[1] https://www.amazon.com/Financial-Shenanigans-Fourth-Accounti...

Re:To find the best parking spot, do the math on Sunday September 29, 2019 @03:36PM (#21109187)
First, assume a spherical car...
Re:3D Lightning (2013) on Friday March 09, 2018 @10:38PM (#16556958)
I'm one of the founders of Ceres Solver; let me know if you need any help.
Re:KeepassXC – A cross-platform community fork of KeepassX on Tuesday January 24, 2017 @12:27AM (#13469035)
I previously used KeePassX, which was great due to the multiplatform support. However the project seemed stalled, and I've since switched to the excellent KeeWeb; it's Electron based and is in general more modern.

https://keeweb.info/

Re:Everyday Statistics for Programmers: Nonlinear Regression on Wednesday October 22, 2014 @01:50AM (#8491575)
If you're using C++, consider looking at the Ceres Solver tutorial [1]

http://ceres-solver.org/tutorial.html

Re:How Google Map Hackers Can Destroy a Business at Will on Monday July 07, 2014 @12:24PM (#7999606)
GoDaddy's Get Found does this; http://getfound.com. Disclaimer: I work at GoDaddy on Get Found.
Re:Ask HN: Who is hiring? (May 2014) on Thursday May 01, 2014 @03:56PM (#7682339)
San Francisco, CA and Cambridge, MA - Locu is hiring Frontend Engineers, Backend Engineers and Visual Designers for Full-time

Locu helps local businesses Get Found. With a patent-pending technology platform that digitizes and structures real-world data, Locu is building tools that help businesses connect with customers. Locu’s content platform is the easiest way for merchants to keep business information, menus and price lists updated and distributed across the Web, and Locu’s API gives developers access to the world's largest real-time, structured repository of local business data. Over 40,000 local merchants are using Locu to promote their businesses online. Locu was founded by MIT graduates and is backed by investors including General Catalyst Capital Partners, Lowercase, Lightbank, and SV Angel. Our beautiful offices are in downtown San Francisco, CA (Union Square) and Cambridge, MA (Kendall Square). Check out photos and learn more about our other perks:

http://locu.com/about/jobs/

Frontend Engineering

If you are passionate about building products that will touch millions of merchants and hundreds of millions of consumers through the applications powered by our local data APIs, Locu is the right place for you. [JQuery, Less, Django, node.js, etc.]

Backend engineering

We started Locu out of MIT to solve real-world problems by leveraging the latest research in computer science. If you are looking to solve some of the most challenging problems in machine learning, NLP and human computation, you'll feel right at home. [Python, Django, Node.js, Postgres, Redis, AWS, etc.]

Design

We're looking for visual designers who are excited to redefine what the future of local business data looks like across web and print, and to create tools that put modern web technology in the hands of merchants.

Interested? Drop us a line at [email protected]. Please include "[HN]" in the subject of your letter. Learn more about us (now with photos!) at: http://locu.com/about/jobs/

Re:Forge – mobile 3-D capture [video] on Wednesday March 26, 2014 @03:19PM (#7475753)
No Ceres?
Re:How I Lost My $50,000 Twitter Username on Wednesday January 29, 2014 @12:56AM (#7142209)
Was there anything in particular that made you migrate away from GoDaddy?
Re:New Google Sheets: faster, more powerful, and works offline on Wednesday December 11, 2013 @01:10PM (#6889374)
I recently went through an acquisition where we transitioned from Google Apps to the Microsoft suite. I do not share your love of Microsoft's suite.

Among the many problems I have with the Microsoft suite, Outlook is at the top of my list for generating the most frustration. GMail's priority inbox and new-style inbox where machine learning is used to sort out mail is a productivity booster for me. With Outlook, I regularly lose important mail because it is buried under the difficult to filter masses of other email.

I could go on about how the lack of robust collaboration facilities are a direct time waster for my team, but I don't want to hijack this thread further...

Re:Ask HN: Who is hiring? (November 2013) on Friday November 01, 2013 @09:49PM (#6657757)
San Francisco, CA and Cambridge, MA - Locu is hiring Frontend Engineers, Backend Engineers and Visual Designers for Full-time; H-1B is OK

Locu helps local businesses be found. With a patent-pending technology platform that digitizes and structures real-world data, Locu is building tools that help businesses connect with customers. Locu’s content platform is the easiest way for merchants to keep business information, menus and price lists updated and distributed across the Web, and Locu’s API gives developers access to the world's largest real-time, structured repository of local business data. Over 30,000 local merchants are using Locu to promote their businesses online. Locu was founded by MIT graduates and is backed by investors including General Catalyst Capital Partners, Lowercase, Lightbank, and SV Angel. Our beautiful offices are in downtown San Francisco, CA (Union Square) and Cambridge, MA (Kendall Square). Check out photos and learn more about our other perks: http://locu.com/about/jobs/

Frontend Engineering

If you are passionate about building products that will touch millions of merchants and hundreds of millions of consumers through the applications powered by our local data APIs, Locu is the right place for you. [JQuery, Less, Django, etc.]

Backend engineering

We started Locu out of MIT to solve real-world problems by leveraging the latest research in computer science. If you are looking to solve some of the most challenging problems in machine learning, NLP and human computation, you'll feel right at home. [Python, Django, Node.js, Postgres, Redis, AWS, etc.]

Design

We're looking for visual designers who are excited to redefine what the future of local business data looks like across web and print, and to create tools that put modern web technology in the hands of merchants.

Interested? Drop us a line at [email protected]. Please include "[HN]" in the subject of your letter. Learn more about us (now with photos!) at: http://locu.com/about/jobs/

Re:Ask HN: Who is hiring? (October 2013) on Tuesday October 01, 2013 @07:58PM (#6479851)
San Francisco, CA and Cambridge, MA - Locu is hiring Frontend Engineers, Backend Engineers and Visual Designers - Full-time; H-1B OK

Locu helps local businesses be found. With a patent-pending technology platform that digitizes and structures real-world data, Locu is building tools that help businesses connect with customers. Locu’s content platform is the easiest way for merchants to keep business information, menus and price lists updated and distributed across the Web, and Locu’s API gives developers access to the world's largest real-time, structured repository of local business data. Over 30,000 local merchants are using Locu to promote their businesses online. Locu was founded by MIT graduates and is backed by investors including General Catalyst Capital Partners, Lowercase, Lightbank, and SV Angel.

Our beautiful offices are in downtown San Francisco, CA (Union Square) and Cambridge, MA (Kendall Square). Check out photos and learn more about our other perks: http://locu.com/about/jobs/

Frontend Engineering

If you are passionate about building products that will touch millions of merchants and hundreds of millions of consumers through the applications powered by our local data APIs, Locu is the right place for you. [JQuery, Less, Django, etc.]

Backend engineering

We started Locu out of MIT to solve real-world problems by leveraging the latest research in computer science. If you are looking to solve some of the most challenging problems in machine learning, NLP and human computation, you'll feel right at home. [Python, Django, Node.js, Postgres, Redis, AWS, etc.]

Design

We're looking for visual designers who are excited to redefine what the future of local business data looks like across web and print, and to create tools that put modern web technology in the hands of merchants.

Interested? Drop us a line at [email protected]. Please include "[HN]" in the subject of your letter. Learn more about us (now with photos!) at: http://locu.com/about/jobs/

Sorry, I messed up the link and can't change it.
Unfortunately most Google software is practically inseparable from Google's infrastructure. Open sourcing stuff is hard, mostly thankless work.
Strangely, I can't reproduce the effect with a divide by 16. With GCC 4.5.2 -O2, I see a "shrl $4, %eax" for unsigned, and "sarl $4, %eax" for signed. However, if I divide by 2, the results are different; the function:

  int div_by_2(int x) {return x/2;}
compiles to:

  div_by_2:
    movl	%edi, %eax
    shrl	$31, %eax
    addl	%edi, %eax
    sarl	%eax
    ret
Meanwhile, the signed variant:

  unsigned int div_by_2(unsigned int x) {return x/2;}
compiles to:

  div_by_2:
    movl	%edi, %eax
    shrl	%eax
    ret
My conclusion remains that for hot loops, you should check the compilers assembly to make sure the compiler is applying the strength reduction you expect.
Be careful: "x / 16" won't get converted to "x >> 4" by the compiler if x is a signed int. I lost an argument about this in a code review once. Look at the disassembly for the case that x is and is not signed if you don't believe me.
Re:Google Now on your iPhone and iPad on Tuesday April 30, 2013 @03:21AM (#5630817)
This card was my idea back when I worked on Google Now. I'm still proud of it.
Re:Ask HN: Who is hiring? (April 2013) on Monday April 01, 2013 @04:19PM (#5475623)

  San Francisco, CA and Cambridge, MA - Locu is hiring Frontend
  Engineers, Backend Engineers and Visual Designers -
  Full-time; H-1B OK

  Locu is developing technologies to change local search ($35bn
  advertising market by 2014) through a number of initiatives
  that help local businesses better connect with their consumers.
  As part of this vision, we created one of the world's largest
  semantically-annotated repositories of real-time small-business
  data, which is now distributed and viewable on sites like
  OpenTable, Citysearch and TripAdvisor (and more). We recently
  launched Locu.com, our local business facing product, that
  combines great tech and beautiful design to help local
  businesses better manage their online presence.

  Our beautiful offices are in downtown San Francisco, CA (Union
  Square) and Cambridge, MA (Kendall Square). Check out photos
  and learn more about our other perks: http://locu.com/about/jobs/

  Frontend Engineering
      
    If you are passionate about building products that will touch
    millions of merchants and hundreds of millions of consumers
    through the applications powered by our local data APIs, Locu
    is the right place for you. [JQuery, Less, Django, etc.]
      
  Backend engineering
      
    We started Locu out of MIT to solve real-world problems by
    leveraging the latest research in computer science. If you
    are looking to solve some of the most challenging problems in
    machine learning, NLP and human computation, you'll feel
    right at home. [Python, Django, Node.js, Postgres, Redis,
    AWS, etc.]
     
  Design
      
    We're looking for visual designers who are excited to
    redefine what the future of local business data looks like
    across web and print, and to create tools that put modern web
    technology in the hands of merchants.

  Interested? Drop us a line at [email protected]. Please include
  "[HN]" in the subject of your letter. Learn more about us at
  http://locu.com/about/jobs/.
Link (photos!): http://locu.com/about/jobs/
Re:Ask HN: Who is hiring? (March 2013) on Friday March 01, 2013 @01:42PM (#5306069)

  San Francisco, CA and Cambridge, MA - Locu is hiring Frontend
  Engineers, Backend Engineers and Visual Designers -
  Full-time; H-1B OK

  Locu is developing technologies to change local search ($35bn
  advertising market by 2014) through a number of initiatives
  that help local businesses better connect with their consumers.
  As part of this vision, we created one of the world's largest
  semantically-annotated repositories of real-time small-business
  data, which is now distributed and viewable on sites like
  OpenTable, Citysearch and TripAdvisor (and more). We recently
  launched Locu.com, our local business facing product, that
  combines great tech and beautiful design to help local
  businesses better manage their online presence.

  Our beautiful offices are in downtown San Francisco, CA (Union
  Square) and Cambridge, MA (Kendall Square). Check out photos
  and learn more about our other perks: http://locu.com/about/jobs/

  Frontend Engineering
      
    If you are passionate about building products that will touch
    millions of merchants and hundreds of millions of consumers
    through the applications powered by our local data APIs, Locu
    is the right place for you. [JQuery, Less, Django, etc.]
      
  Backend engineering
      
    We started Locu out of MIT to solve real-world problems by
    leveraging the latest research in computer science. If you
    are looking to solve some of the most challenging problems in
    machine learning, NLP and human computation, you'll feel
    right at home. [Python, Django, Node.js, Postgres, Redis,
    AWS, etc.]
     
  Design
      
    We're looking for visual designers who are excited to
    redefine what the future of local business data looks like
    across web and print, and to create tools that put modern web
    technology in the hands of merchants.

  Interested? Drop us a line at [email protected]. Please include
  "[HN]" in the subject of your letter. Learn more about us at
  http://locu.com/about/jobs/.
Link (photos!): http://locu.com/about/jobs/

Older »