fredmorcos

u/fredmorcos


r/xfce•

Hello,

After an update on Archlinux a few days ago, some tray icons have weird shapes and a black background instead of the background color of the panel. Can anybody help me fix this?

Screenshot: https://imgur.com/hxjxBvkl.png

The first icon is networkmanager, the second icon is Steam (didn't start at bootup and probably that's the problem), the third icon is the Xfce power manager and the fourth icon is a panel applet (the problem doesn't apply to it).

I'm on Intel graphics, using the Numix Gtk theme and the ePapirus icon theme.

xfce4-panel 4.12.2-1

gtk2 2.24.32-1

gtk3 3.24.1+2+ged57e564a9-1

55

r/buildapc•

###Build Help/Ready:

Have you read the sidebar and rules? (Please do)

Yes.

What is your intended use for this build? The more details the better.

TL;DR: Looking for a reasonably powerful/smooth build for lots of compiling, video transcoding and gaming on Linux and Windows. For general use (web-surfing) and video conferencing silence is a must.

(I know that prices are currently crazy, but what can we do...)

I'm a full time Linux user and programmer. My plan is to add a dual-boot with Windows solely for gaming. I haven't built a desktop PC since ~2002.

Since then I've been buying laptops. My current setup is an 8 years old ASUS

26

r/oneplus•

I'm not writing this to start a flame war. I also was quite hesitant to post it because of how salty and divisive OnePlus' following is.

But what the hell, this might help someone who is about to make a decision about buying a OnePlus product.

I've had the OnePlus 2 for a year now. The hardware is good, but OnePlus seems to have forgotten about it in terms of software updates. Yes they threw promises all over the place during their last AMA, but nothing concrete. There are quite a few improvements between OOS on the 2 and the 3, and quite a few more between OOS on the 3 and their promotional video for the 3T. I personally think the 3 will now start dragging on behind the 3T.

At this point

3421

r/emacs•

Hello,

Navigating and editing buffers is really slow in c-mode, python-mode and probably others. It's become really frustrating. Is there a way I can profile navigation and editing only?

My primary suspect is post-command-hook, which is set to the following value in a c-mode buffer with about 800 lines of code, I'd like to find out which of those is the slowest.

(linum-schedule whitespace-post-command-hook
flycheck-hide-error-buffer flycheck-display-error-at-point-soon
flycheck-error-list-highlight-errors
flycheck-error-list-update-source
flycheck-perform-deferred-syntax-check company-post-command t)

The currently enabled minor modes are:

Auto-Composition  Auto
211

r/emacs•

Hello,

Is there a simple/elegant way to have flycheck only output text into the minibuffer if the minibuffer is empty? Or even better, is there a way to have all text going into the minibuffer at the same point in time get concatenated rather than replaced?

Thanks!

EDIT: My solution was to use flycheck-pos-tip: flycheck messages now show up in a tooltip and eldoc shows up in the minibuffer.

92

r/C_Programming•

Regarding this discussion.

#include <stdlib.h>

int main (void) {
  char *p, *new_p;

  p = malloc(20);
  new_p = realloc(p, 40);

  if (new_p == NULL) {
    free(p);
    return 1;                 /* fail */
  }

  p = new_p;                  /* accessing p may be undefined behavior? */
  free(p);
  
  return 0;
}

Is assignment to p relying on undefined behavior, since the value of p may or may not be live?

216

r/emacs•

Hello, I've started looking at babel and wondered whether it would be possible to get source code block templates that accept parameters. I could get this far, but couldn't manage to get babel to work properly with passing arguments and without evaluating the blocks:

This is a document that explains my program.

#+name: linked-list
#+begin_src C
  struct int_linked_list {
    int element;
    struct int_linked_list *next;
  };
#+end_src

#+name: main
#+begin_src C :noweb yes :tangle main.c
  #include <stdio.h>

  <<linked-list>>

  int main () {
    printf("Foobar\n");
    return 0;
  }
#+end_s
1112

r/emacs•

Hello,

This isn't a question about python-mode or jedi specifically, but rather more related to either emacs itself, auto-complete or popup.

I am looking for before and after hooks to either jedi's completion, emacs' auto-complete or popup.

The reason is that I am trying to disable global-whitespace-mode and flycheck-mode before a menu shows up, and re-enable them after a menu is closed.

Now the reason for that is shown here. The first two screenshots show jedi + auto-complete while global-whitespace-mode and flycheck are active and the second two screenshots show the same while these modes are inactive. There is also flashing and fli

213


r/C_Programming•

As the title says. I'm working on a project that needs to run on a Raspberry PI (armv6) and an amd64. First I had the following implementation of an asprintf()-like function:

#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>

int asprintf(char **const str, const char *fmt, ...) {
  va_list ap;
  int len = 0;

  va_start(ap, fmt);
  len = vsnprintf(NULL, 0, fmt, ap);
  va_end(ap);

  if (len < 0 || !(*str = malloc((size_t) len + 1)))
    return -1;

  va_start(ap, fmt);
  len = vsnprintf(*str, (size_t) len + 1, fmt, ap);
  va_end(ap);

  if (len < 0)
    free(*str);
918

Hello,

I am looking for help to solve this problem. The stabilized keys on my keyboard (CM Storm Quickfire Rapid-i with Cherry MX Browns) are rattling and I would love to get rid of the annoying noise this causes. I removed the keycaps and it's definitely the stabilizers causing the noise. I would like to find a solution for this problem without having to take apart the keyboard (ie, desoldering the switches since they are plate-mounted with LEDs -- a lot of work). I found u/ripster's guide about lubing them but unfortunately it only covered stabilizers with PCB-mounted switches.

Any help would be greatly appreciated!

Thanks in advance and cheers, Fred

16

r/prolog•

Hello,

(I'm almost giving up, you guys are my last resort).

I'm trying to implement:

  • A predicate p(L), where L is a list, ordering must not be important
  • p/1 tells me whether all elements of L are compatible together based on a c(A, B) predicate
  • c/2 tells me whether A and B are items and are compatible together
  • I have a bunch of item(foo), item(bar), etc... in my database
  • Furthermore, p/1 should answer me without duplicates if I ask it what are all the possible lists that contain items that are compatible together
  • p/1 must be usable from other predicates and as the "user interfacing API" from the prompt
    • So if the user asks for a test, and the list they pass is out-of-orde
48

r/prolog•

Hello,

I am having trouble achieving a few things:

Question 1: Type-checking and assertions. I have the following:

is_cat(a).
is_cat(b).
...

And I find myself checking each time whether what is passed to the predicates really matches one of the cats I have defined, like so:

pred(X) :- is_cat(X), ...

Is there a better, more concise way to do this kind of type-checking on arguments passed to predicates? I find I'm excessively using things like is_cat/1 and is_list/1, etc... to make sure 1) the user doesn't input a wrong type of value at the prompt and 2) that my programming/typo mistakes are detected.

Also, is there a way to have swipl tell me why something returned

610