HNHacker News
TopNewBestAskShowJobs

mhogomchungu

425 karma · joined April 20, 2013

submissionscomments
mhogomchungu··on Debugging memory corruption: who the hell writes "2" into my stack? (2016)
Raymond Cheng faced a similar situation here: https://devblogs.microsoft.com/oldnewthing/20240927-00/?p=11...

The problem boils down to usage of stack memory after the memory is given to somebody else.

mhogomchungu··on VeraCrypt: Free open-source disk encryption for Windows, Mac OS X, Linux
If you are on Linux and prefer a Qt based GUI, then check out zuluCrypt[1].

It can create PLAIN dm-crypt, LUKS, TrueCrypt and VeraCrypt volumes.

It can unlock PLAIN dm-crypt, LUKS, TrueCrypt, VeraCrypt and Bitlocker volumes.

[1] https://github.com/mhogomchungu/zuluCrypt

mhogomchungu··on One-night stands will be illegal at the 2022 World Cup in Qatar
A passport will allow you to go from anywhere in the world to anywhere else in the world and its usually hard to get.

"An emergency travelling document" will allow you to go from anywhere in the world to ONLY your home country and its usually easier to get.

mhogomchungu··on Ask HN: What does 12:00 AM mean?
Typically, its from "8:00 AM" to "4:00 PM".

In swahili time, i would say "its from hour 2 in the morning to hour 10 in the everning.

mhogomchungu··on Ask HN: What does 12:00 AM mean?
Each african here and in Swahili time, the day starts at 7:00 AM and ends at 6:59PM and night starts at 7:00 PM and ends at 6:59AM.

So, I would read "12:00 AM" as "six hours into the night" since its been 6 hours since the night has started.

I would also read "12:00 PM" as "six hours into the day" since its been six hours since the day has started. Speaking it, i would say "saa 6 mchana" and the literal translation is "time 6 noon".

I and most people here always set time in AM/PM format and i always have to first convert it to swahili time before making sense of it.

mhogomchungu··on The Evolutions of Lambdas in C++14, C++17 and C++20
Problems with std::function:-

1. It can not hold move only callable objects.

2. It heap allocate stored callable object if the object is large enough.

mhogomchungu··on Show HN: Embedded Ring Buffer C++98
Don't use "NULL" in C++[1].

[1] https://cpp4arduino.com/2018/10/26/why-cpp-programmers-dont-...

mhogomchungu··on UtahFS: Encrypted File Storage
There a couple of solutions that are fuse based and dealing with folder based encryption and gocryptfs has a page that compares them here[1].

It will be interesting to see how this project does against its competition.

SiriKali[2] is a front end to a majority of these projects and it works on Linux, MACOS and windows.

[1] https://nuetzlich.net/gocryptfs/comparison/

[2] https://mhogomchungu.github.io/sirikali/

mhogomchungu··on Is M-Pesa Kenyan or British? (2017)
If you loose your phone here in Tanzania, the phone company will require a police report and a copy of a photo ID(passport, drivers licence or national ID card) that matches the lost line and some will additionally ask you to remember the last few calls that was made by the lost line. All the above will have to be done person in one of many branches operated by the phone company.
mhogomchungu··on Merriam-Webster declares ‘they’ its 2019 word of the year
Native Swahili speaker here and the language cares only if its a being or not a being and for beings, it simply doesn't care if its a man, a woman, a horse, a pig or an alien with ten sexes.

Its possible to speak naturally in Swahili without revealing the gender of the person being talked about and for this reason, i find the he/she/they in English to be very strange and limiting at times.

mhogomchungu··on “The default name prefix is changed to be ‘sqlite’ spelled backwards” (2006)
These etilqs files consumed 60GB of this[1] person's hard drive space.

I think it was a good decision to change the name of these files because they give sqlite a bad name while the problem is not of their doing.

[1] https://community.wd.com/t/etilqs-files-in-temp-folder-consu...

mhogomchungu··on SSH Examples, Tips and Tunnels
There is a windows program named sshfs-win[1] that allows mounting of remote SSH location as local folders and SiriKali[2] is currently its only GUI frontend. SiriKali also supports sshfs on Linux.

[1] https://github.com/billziss-gh/sshfs-win

[2] https://mhogomchungu.github.io/sirikali

mhogomchungu··on Zimbabwe's Military in Apparent Takeover, Says It Has Custody of President
How effect is this if its possible to be elected into office at a very late age.
mhogomchungu··on Trip report: Fall ISO C++ standards meeting
This discussion[1] maybe useful in solving the problem. "things()" member function should be qualified with a reference to prevent it from being called from an rvalue object.

[1] https://stackoverflow.com/questions/21861148/what-does-the-s...

mhogomchungu··on Don’t use C++ auto? Restricting auto is not the best decision
All my projects are C++14 so it wasnt an issue for me but i liked being c++11 for other people and i am glad there is a way to get it back to c++11. Already committed your suggestion.

Thank you very much.

mhogomchungu··on Don’t use C++ auto? Restricting auto is not the best decision
Your code failed to compile but this one[1] succeeds. Side effect of your way is that it now makes the project requiring C++14 but i can live with that.

[1] https://github.com/mhogomchungu/tasks/blob/4210a8fad57958fad...

mhogomchungu··on Don’t use C++ auto? Restricting auto is not the best decision
sometimes,declaring lambdas with auto is not not sufficient as i discovered in my "tasks"[1] project. An example place where auto breaks is here[2].

[1] https://github.com/mhogomchungu/tasks

[2] https://github.com/mhogomchungu/tasks/blob/a1512a1b5e0392a06...

mhogomchungu··on Don’t use C++ auto? Restricting auto is not the best decision
There could be an efficiency bug here.

1. "item->id()" is designed to return a pointer.

2. Consumer of the API writes their code to take a copy of the pointer and passes it along to "processSomeItem". It is cheap to make a copy of a pointer

3. The API is changed and it now returns a reference.

4. The assignment to "itemId" now makes an expensive copy of the object behind the reference causing inefficiency bug.

5. "processSomeItem()" API can handle the copy and the code compiles and runs without the problem being noticed.

mhogomchungu··on Ask HN: How much time do you spend on “marketing” your open source projects?
project page: https://mhogomchungu.github.io/zuluCrypt/

>> why did you start it

I bought an external hard drive and i wanted to encrypt it just because i could,i already knew about TrueCrypt but it felt like a window's solution and i wanted a native linux GUI application.

>> how did people find it.

"Organic" google searches played a part in people finding out about it but i post and talk about it in various forums i see the project discussed. I google the name of the project around once a week and i answer any questions/bug people report in various online forums.

>> did you post it somewhere to get traction

I occasionally post in various linux forums and reddit on new releases.

mhogomchungu··on Android 8.0 Oreo, thoroughly reviewed
How do you measure battery life?

1. Do you charge it to 100% and live it alone until charge goes to 0%?

2. Do you unplug it in the morning and use it "normally" and see what charge will be left when you put it again on a charger when you go to sleep?

Different use cases drains battery at a different rate and its hard to use a new phone/a phone with a new OS "normally" because more time than usual will go into trying to understand it.

It may also happen that you start using the phone at a time when your phone usable is above your average.

mhogomchungu··on India's top court rules against instant divorce
I am a christian Tanzanian in Tanzania and i though this was a Muslim thing and not something specific to india as this article and wikipedia[1] suggests.

My understand as it was explained in detail by a muslim here in Tanzania is that if a Muslim man divorces his wife once or twice,he can get her back with little effort since they are still semi-married. Its called "talaka" in swahili and its a simple note a man gives a woman as he sends her to her family and she is to use it as proof that he no longer wants her.

But if he divorces her three times,she will have to first be married to somebody else and then divorced before he can get her back and he will have to start from zero and go through all the process of marrying her as if they were never married.

Therefore, a muslim man who has never divorced his wife will issue the 3 divorces at the same time ONLY if he is 100% sure he will never,ever,ever want her back and he does not want to be talked out of it.

The above is my understanding of the 3 divorces as its practiced here in Tanzania.

[1] https://en.wikipedia.org/wiki/Triple_Talaq_in_India

mhogomchungu··on Tanzania bans newspaper for 2 years
Tanzanian here and i am surprised find my country in the front page of hacker news.

Summary of what is going on.

17 years ago, Tanzania signed a "bad" contract with acacia mining company[1].

The person who signed the contract on Tanzania side is Jakawa Mrisho Kikwete when he was a minister for energy, water and minerals and Benjamin William Mkapa was Tanzania's president at that time. Mr. Kikwete became Tanzania's president after Mkapa finished his second term.

The currently president is running an investigation and is completely side stepping these two individuals who are at the center of it and does not want them to even be mentioned and thats what is going on.

If he chooses not to talk about them then thats his prerogative but, the citizens of Tanzania should be allowed to and there is plenty of stuff to talk about.

[1] http://www.acaciamining.com/

mhogomchungu··on Cyberattacks in 12 Nations Said to Use Leaked N.S.A. Hacking Tool
He has backups of his data.

I personally use linux and my github repo is here[1] where i have a bunch of encryption related projects(zuluCrypt,SiriKali and lxqt_wallet). The last windows computer i used was windows xp.

I dont want to move him to linux because i am not always around and he can ask other people for help when he is on windows.

[1] https://github.com/mhogomchungu

mhogomchungu··on Cyberattacks in 12 Nations Said to Use Leaked N.S.A. Hacking Tool
I am in Tanzania(East Africa) and my father's computer is infected.

All he did to get infected was plugging his laptop on the network at work(University of Dar Es Salaam).

The laptop is next to me and my task this night is to try to remove this thing.

mhogomchungu··on Cap'n Proto 0.6 released – 2.5 years of improvements
I think this[1] API among others should be renamed and "future" be used instead of "promise" to better reflect C++ naming conventions.

[1] https://github.com/sandstorm-io/capnproto/blob/247e7f568b166...

mhogomchungu··on Metaprogramming is less fun in D
Its a lot easier to do events based programming in Qt/C++.

Here is a Qt/C++ tasks[1] that greatly simplified async programming using Qt's event system.

[1] https://github.com/mhogomchungu/tasks

mhogomchungu··on Cryptkeeper sets the same password “p” independently of user input
It seems to be,look at documentation for option "-S" here: https://linux.die.net/man/1/encfs
mhogomchungu··on Cryptkeeper sets the same password “p” independently of user input
I looked up at my g++ compiler and i found this: http://pastebin.com/VpSsEkBY

That g++ compiler is using a gnu extension through the __GNUG__ code path. The "true" C++ code path is at line 11.

Edit:

Answering the person below,the file that defines NULL is "stddef.h"

An example of the file online that defines NULL is here: https://github.com/Alexpux/mingw-w64/blob/d0d7f784833bbb0b2d...

mhogomchungu··on Cryptkeeper sets the same password “p” independently of user input
sizeof(NULL) in 4 in C++ in a 64 bit system.

sizeof(NULL) is 8 in C in a 64 bit system.

The difference is because NULL in C is a variable of a void pointer type with a value zero. In C++,NULL is a variable with a value zero that gets deduced to an int type.

mhogomchungu··on Cryptkeeper sets the same password “p” independently of user input
The bug here is probably with encfs and most frontend tools to enc are doing exactly what cryptkeeper is doing.

For those who want alternative to cryptkeeper,there is SiriKali[1], next version will be released on Feb 1st and it will have support for OSX.

    execlp ("encfs", "encfs", "-S", crypt_dir, mount_dir, NULL);
That line of code also has a bug as its wrong to pass NULL in C++ to a variadic function. IMHO,usage of NULL in C++ should be strongly discouraged in all cases.

[1] https://github.com/mhogomchungu/sirikali

Page 1 of 4Next →