HN user

pksadiq

509 karma

https://www.sadiqpk.org

Posts22
Comments193
View on HN
www.sadiqpk.org 2y ago

Multi Key Term: Map different keyboards to different terminals on same screen

pksadiq
8pts1
www.sadiqpk.org 2y ago

GNU Emacs DWIM keybindings for C, Python, Rust, and more

pksadiq
2pts0
www.sadiqpk.org 2y ago

GNU Emacs DWIM keybindings for C, Python, Rust, and more

pksadiq
2pts0
news.ycombinator.com 3y ago

Tell HN: How to close your LinkedIn account

pksadiq
2pts2
www.sadiqpk.org 5y ago

Show HN: Map different keyboards to different pseudo terminals

pksadiq
2pts0
www.open-std.org 6y ago

A Common C/C++ Core Specification [pdf]

pksadiq
3pts2
coronasafe.network 6y ago

Corona Safe Network

pksadiq
1pts0
timesofindia.indiatimes.com 6y ago

Kerala’s monsoon is no longer the same

pksadiq
1pts0
puri.sm 7y ago

Librem 5 July Update

pksadiq
57pts21
www.catb.org 7y ago

The Lost Art of Structure Packing

pksadiq
2pts0
www.thehindu.com 7y ago

Nipah Virus Confirmed in Kerala

pksadiq
2pts0
lists.gnu.org 7y ago

GNU Guile 2.9.2 Beta Released

pksadiq
5pts0
gnunet.org 7y ago

GNUnet – a software framework for decentralized peer-to-peer networking

pksadiq
5pts0
www.sadiqpk.org 7y ago

Show HN: My GTemplate – A Simple feature rich GTK3/GTK4 template in C

pksadiq
2pts0
www.sadiqpk.org 7y ago

Blogging with Emacs org-mode

pksadiq
109pts33
blogs.gnome.org 8y ago

Grow your skills with GNOME

pksadiq
1pts0
www.gnu.org 8y ago

GNU Guix and GuixSD 0.14.0 released

pksadiq
9pts1
gitlab.com 8y ago

GitLab is down

pksadiq
9pts2
www.youtube.com 8y ago

Home – Documentary (2009)

pksadiq
1pts0
my.fsf.org 9y ago

Support the Free Software Foundation

pksadiq
2pts0
blog.alteroot.org 10y ago

Xfce 4.14 targeting to port to gtk3

pksadiq
2pts0
glandium.org 10y ago

Debian GNU/Linux Is Switching to Firefox from Iceweasel

pksadiq
3pts0

This specific change shall excite many as CC BY-SA 4.0 is one way GPLv3 compatible, but CC BY-SA 3.0 is not. Which means that free software developers can now embedded many Wikimedia contents in their GPLv3 applications. This seems not mentioned in the blog post though.

since the decimal average is -0.5

The C standard says: When integers are divided, the result of the / operator is the algebraic quotient with any fractional part discarded (This is often called ‘‘truncation toward zero’’).

So it should be 0 (as per C standard, not sure what C++ standard says)

  int mid(int x, int y) {
    return (x/2 + y/2) + (1 & x & y);
  }
would be a more readable solution

edit: Actually, this fails on mid(INT_MIN, INT_MAX) and possibly other mixed sign values (returns: -1, expected: 0 (or -1 is okay?), where the precise answer is -0.5)

more edit: The C standard says: When integers are divided, the result of the / operator is the algebraic quotient with any fractional part discarded (This is often called ‘‘truncation toward zero’’).

So -1/2 should be 0.

Why is this even a thing? Maybe I should just go back to buying everything with cash, it's impossible to keep up with all the crap we need to disable or hack around

And some agencies may be more interested in these exclusion databases. So I don't think there is any way to get out of this maze. When you sign up to exclude from a list, you get included in many other.

Ultimately if you're okay with running AGPL code you're okay with running Mattermost. Which means as long as you don't intend to fork it and not share your changes you should be fine.

That's not how [LA]GPL works. You are free to fork, and not share the changes. The modified source code can be provided only to the people whom you gave the binary (Edit: AGPL has bit more terms, as said in comment below), and you can make it private to the rest of the world (though you can't add additional restrictions).

As Mattermost is dual licensed under AGPL, anyone who uses it under the terms of AGPL can live safe as long as they obey AGPL.

Software pieces using GPL licenses can't add additional restrictions to the software, but of course authors are free to dual license under different terms.

Say for example some one can specify the following for their project: "We provides the project under the terms of MIT for you to modify and run for your own purposes." This might look a harmless statement, but it could mean something very different and may be intentionally written, that essentially makes it non-free. GPL doesn't allow such additional clauses.

Disclosure: IANAL. So I don't know how/if it works in court

The mattermost-server licensing[0] is somewhat skeptic:

Mattermost Licensing

SOFTWARE LICENSING

You are licensed to use compiled versions of the Mattermost platform produced by Mattermost, Inc. under an MIT LICENSE

- See MIT-COMPILED-LICENSE.md included in compiled versions for details

You may be licensed to use source code to create compiled versions not produced by Mattermost, Inc. in one of two ways:

1. Under the Free Software Foundation’s GNU AGPL v.3.0, subject to the exceptions outlined in this policy; or

2. Under a commercial license available from Mattermost, Inc. by contacting commercial@mattermost.com

You are licensed to use the source code in Admin Tools and Configuration Files (templates/, config/default.json, model/, plugin/ and all subdirectories thereof) under the Apache License v2.0.

So that means, only the binary provided by Mattermost is MIT, not its source code, the usage of 'MIT' in their website sounds deceiving.

[0] https://github.com/mattermost/mattermost-server/blob/master/...

The code is undefined, but "I don't know." is still the correct answer for what happens to the variable.

Well, then a better choice would be "I can't know."

There are a few problems with the questionnaire. "I don't know" is pretty generic choice to be given/choosen.

Say for example, in question 5, the statement "return i++ + ++i;" is undefined, because the value of i is read and modified twice in a single sequence point (and of course, the order of addition is unspecified), which is not allowed in C. So the answer is "Undefined." (The explanation given in the page not accurate enough in terms of C)

And for question 1, the code is valid, but the result is not strictly defined. It depends on the implementation. So the answer is "Implementation defined."

The usage of "main()" hurts me, the strictly conforming way is to write it as "int main(void)" (or similar)

I feel like the questionnaire piss off people who really knows C.

... security comes first, whatever else...

Really? the feeling of being secure may come first. Think of how much modems/routers/phones or any other embedded device comes with obsolete software pieces with lots of security bugs. The non-free methodology of software development, I feel, is actually killing security, and making everybody more vulnerable.

Most firms don't like giving the source code of the devices away. I understand that they have their own reasons for that (whether it is right is another thing). But at least, there should be an official way to unlock those devices and run custom software pieces (which of course, voids warranty).

These days more people are moving to "Open Source," but not "Free Software." See how Linux & busybox essentially making any hardware non-free. Hope people understand the difference and help make the world better.

Debugging in Vim 7 years ago

I find GNU Emacs M-x gdb pretty productive when used with M-x gdb-many-windows. Especially, I like the way I can browse and look deep the local variables (middle-click [or Shift-Enter] on any pointer variables in "local" window, which opens speedbar with its contents), along with other common features.

APT many not be using HTTPS. But APT does support HTTPS builtin since version 1.5. I couldn't find any changelog or NEWS for that, but https://packages.debian.org/sid/apt-transport-https says so.

I myself uses HTTPS mirror provided by Amazon aws (https://cdn-aws.deb.debian.org/). I do so because My ISP sometimes forward to it's login page when I browse HTTP URLs. Also, it does sometime include Ads (Yeah, it's really bad, but it does remind me that I'm being watched).

how do I get started writing my app to target the Librem 5?

For commandline applications all you need is to develop for GNU/Linux. It should work pretty fine on Librem 5 too. If you want to develop GUI applications see libhandy[0], a GTK+ widget library developed by Purism for Librem 5.

If you need to, you can get motivations from https://gitlab.gnome.org/Teams/Design/app-mockups and HIG guide for GNOME is available at https://developer.gnome.org/hig/stable/

[0] https://source.puri.sm/Librem5/libhandy

Does anyone have insights into the possible motivation behind this?

I consider the following as possible reasons:

1. GTK+ is completely (GNOME) community owned (QT is a company owned, which companies like to avoid)

2. QT is LGPLv3+/GPLv3+. This, I assume, is to encourage buying commercial license than promoting free software. GTK+ is LGPLv2.1+, a lot of individual/small team developers prefer [L]GPLv2 over [LA]GPLv3.

3. Accessibility is pretty bad in GNU/Linux in general. But if there is one, the only choice is AT-SPI[0]. It's a GNOME project. I think KDE is a bit behind (I'm not sure though).

4. GNOME, GTK+ are GNU projects (Or many people prefer GNOME because it's a GNU project). I have seen many people in our Free Software User Group using GNOME just because of this.

Gnome is approaching a crisis point, stripping away features as the debt comes due for bad design decisions made

We have seen a lot of software pieces whose development stalls, just because the code complexity increases way beyond some limit, or the main developer quits. Many (vocal) users prefer well configurable software pieces - but it comes with a high price. Many implement every possible feature to look the application c00l. But eventually as we gain experience, we may eventually abandon the project just because it's bloated (code wise), or even re-write it with less features, so that the code is more maintainable. If we look the code of many abandoned projects, we can see how bloated the code is, with many hacks, and bad designs.

I think GNOME is in the path of porting their applications to maintainable pieces, and eventually adding features as the code gets better.

[0] https://en.wikipedia.org/wiki/Assistive_Technology_Service_P...

To be fair, the way malloc is used is actually the preferred way.

Is it really right? In C, isn't it considered bad to cast malloc result as it masks some mistakes? Also, the code doesn't check for NULL for the malloc result.

If you are trying to use htmlize, download the file[0] to src directory, such that htmlize package is available as ~/web/src/htmlize.el

Now run emacs:

  ~/web$ emacs --batch -q -l src/htmlize.el\
  -l src/my-web.el -f org-publish-all
See https://gitlab.com/sadiq/sadiq.gitlab.io/blob/master/.gitlab...

You can simply download/clone the complete repo[1] and run the above command from its root directory.

[0] https://github.com/hniksic/emacs-htmlize/blob/master/htmlize...

[1] https://gitlab.com/sadiq/sadiq.gitlab.io