2020-07-26T03:46:02 #kisslinux claudia2: maybe segfault triggered by something else ?

2020-07-26T03:48:35 #kisslinux try to recompile all packages which depends on wlroots/sway with debugging symbols

2020-07-26T06:51:27 #kisslinux E5ten: I don't think there's anything linux specific left.

2020-07-26T06:51:43 #kisslinux I'd be happy to be proven wrong though!

2020-07-26T07:33:25 #kisslinux i found a bug in gcc 10

2020-07-26T07:33:30 #kisslinux if i do compile libudev-zero with '-O2' then libinput list-devices results in segfault

2020-07-26T07:34:36 #kisslinux i can't reproduce this bug with clang or gcc 9

2020-07-26T07:35:07 #kisslinux claudia2: perhaps related to your bug

2020-07-26T08:31:00 #kisslinux Anything useful in bt?

2020-07-26T08:38:30 #kisslinux termbin.com/envn

2020-07-26T09:00:22 #kisslinux ok i fixed it but now libinput doesn't output anything

2020-07-26T09:32:45 #kisslinux libinput finally fixed

2020-07-26T09:33:29 #kisslinux will push fixes soon

2020-07-26T09:40:40 #kisslinux Nice

2020-07-26T09:46:04 #kisslinux dylanaraps: i will do release after claudia2 confirms that bug is fixed

2020-07-26T10:00:18 #kisslinux * ihitu 跳一下

2020-07-26T10:33:34 #kisslinux illiliti: Sure thing

2020-07-26T12:40:20 #kisslinux o/

2020-07-26T12:40:46 #kisslinux illiliti: I have done many 'pkill sway' and theres no problem what so ever with latest master.

2020-07-26T12:40:47 #kisslinux Gj!

2020-07-26T12:51:48 #kisslinux great, thanks

2020-07-26T15:05:47 #kisslinux mcf: in ubase dd.c, O_LARGEFILE is used, but according to the open manpage it's preferable to not use O_LARGEFILE, and instead just define _FILE_OFFSET_BITS=64, which ubase already does, so I think O_LARGEFILE is unnecessary there

2020-07-26T15:10:01 #kisslinux also, for the sigaction in dd.c, since you don't use the info from the parameters anyway, you can just not set sa_flags to SA_SIGINFO, make sig_int only take one parameter that you ignore, and set sa_handler instead of sa_sigaction, it wouldn't change anything but making it so only 1 parameter has to be ignored instead of 3

2020-07-26T15:16:09 #kisslinux and the POSIX statvfs can be used instead of statfs (also in dd.c) and then the cast for fst.f_bsize to unsigned long can be removed because in statvfs f_bsize is already unsigned long

2020-07-26T15:41:42 #kisslinux <jey> why did I think it was a good idea to run kiss u` and rebuild binutils in the middle of doing other stuff D:

2020-07-26T15:53:02 #kisslinux <j`ey> what does this line do? set +f; set -f -- "$bin_dir/$1#$version-$release.tar."*

2020-07-26T15:54:41 #kisslinux <j`ey> I think it somehow sets $1 to the path it finds, I just dont understand now

2020-07-26T15:58:40 #kisslinux <j`ey> It sounds like -f removes file globbing, so I don't get how the * at the end works

2020-07-26T15:59:05 #kisslinux the -f in that set call only takes effect after the set is done, so globbing is enabled because of the set +f before it

2020-07-26T15:59:29 #kisslinux <j`ey> oh... that's confusing

2020-07-26T16:00:07 #kisslinux <j`ey> if it was written as set +f; set -- ...; set -f;, I probably would have understood!

2020-07-26T16:00:12 #kisslinux globbing happens before the command is even run, so set -f doesn't happen until after the glob is expanded

2020-07-26T16:00:33 #kisslinux like as far as set -f knows, it's just been passed the list of files the glob expanded to, not a glob

2020-07-26T16:01:16 #kisslinux <j`ey> is there a way to write that that doesn't overwrite $1?

2020-07-26T16:01:35 #kisslinux <j`ey> I dont know shell, but it seems weird to overwrite stuff like that, but maybe it's the way

2020-07-26T16:02:00 #kisslinux you could do a for loop over the glob and set a variable to the loop variable and break immediately

2020-07-26T16:03:15 #kisslinux <jey> and is set -- $foo`, the only way to set $1?

2020-07-26T16:03:21 #kisslinux yeah

2020-07-26T16:03:38 #kisslinux well aside from the initial passing of arguments to the function

2020-07-26T16:03:58 #kisslinux <j`ey> because that line overwrites $1, and I need the initial value too

2020-07-26T16:04:49 #kisslinux do you only need $1, or other parameterstoo?

2020-07-26T16:05:08 #kisslinux <j`ey> just $1

2020-07-26T16:05:23 #kisslinux <j`ey> I got it working now, old=$1 .. that line .. set -- $old

2020-07-26T16:05:52 #kisslinux Better way, just do the same thing with the old line but put $1 before the glob

2020-07-26T16:06:04 #kisslinux Then the glob matches will be $2, $3 etc.

2020-07-26T16:06:14 #kisslinux And you still have your original $1

2020-07-26T16:06:17 #kisslinux Obviously quote $1

2020-07-26T16:06:40 #kisslinux so: set+f; set -f -- "$1"

2020-07-26T16:06:48 #kisslinux <j`ey> nice

2020-07-26T16:06:51 #kisslinux <j`ey> yeah that works

2020-07-26T16:07:03 #kisslinux Great

2020-07-26T16:12:07 #kisslinux <j`ey> sorry about the silly questions, how do i fix this ${(basename file)%.*}?

2020-07-26T16:12:23 #kisslinux <j`ey> aka strip the extension and the path, or should I do it in two steps?

2020-07-26T16:14:10 #kisslinux I'd just do var=${var##/} var=${var%.}

2020-07-26T16:15:24 #kisslinux Did that message go through?

2020-07-26T16:15:40 #kisslinux <j`ey> it did

2020-07-26T16:15:55 #kisslinux <j`ey> although var##/ seems to just strip the leading /

2020-07-26T16:17:06 #kisslinux <Evil_Bob> probably ${var##*/}

2020-07-26T16:17:28 #kisslinux <j`ey> looks like line noise :D

2020-07-26T16:17:31 #kisslinux <j`ey> but that worked

2020-07-26T16:17:55 #kisslinux Yeah riot fucked it lol, it took my 2 *s to italicize the message instead of leaving them in

2020-07-26T16:18:15 #kisslinux <j`ey> ah I did wonder about the missing * after the %.

2020-07-26T16:18:26 #kisslinux <Evil_Bob> ${parameter##[word]}

2020-07-26T16:18:37 #kisslinux <Evil_Bob> "Substitute parameter, deleting the largest possible prefix matching word."

2020-07-26T16:20:09 #kisslinux <j`ey> oh, that's modifying parameter

2020-07-26T16:20:45 #kisslinux <j`ey> or not

2020-07-26T16:21:32 #kisslinux <Evil_Bob> https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02 2.6.2 Parameter Expansion or https://man.openbsd.org/sh#Expansion

2020-07-26T16:36:47 #kisslinux j`ey: it doesn't modify it, it just expands that way, like if you use that without assigning the variable to the expansion the variable will still be what it was without the expansion afterwards

2020-07-26T16:39:37 #kisslinux <j`ey> yeah I was misreading an error that made me think it was modifying it

2020-07-26T16:44:36 #kisslinux But yeah I don't really ever see a need for using basename or dirname, you can replicate what you need from them with parameter substitution

2020-07-26T18:51:35 #kisslinux test

2020-07-26T18:51:42 #kisslinux hola

2020-07-26T18:52:04 #kisslinux anyone got any stuff regarding kernel config for a touchpad?

2020-07-26T18:54:00 #kisslinux <obsessive[m]> what touchpad?

2020-07-26T18:54:16 #kisslinux Hardware vendor doesn't want me to reveal

2020-07-26T18:54:27 #kisslinux *

2020-07-26T18:54:32 #kisslinux thats a dumb sentence

2020-07-26T18:54:41 #kisslinux hardware vendor doesnt tell me anything about my hardware

2020-07-26T18:54:46 #kisslinux do we have lshw?

2020-07-26T18:54:52 #kisslinux No

2020-07-26T18:55:01 #kisslinux I'll package it real quick

2020-07-26T18:55:02 #kisslinux brb

2020-07-26T19:15:12 #kisslinux Nevermind

2020-07-26T19:15:16 #kisslinux Too lazy to do that

2020-07-26T19:15:30 #kisslinux It throws errors and honestly not about that rn

2020-07-26T19:17:00 #kisslinux Any other way to check hardware, obsessive?

2020-07-26T19:20:08 #kisslinux <j`ey> you can have a look in /sys maybe

2020-07-26T20:10:10 #kisslinux E5ten: i removed dd from my ubase and added a portable implementation to sbase

2020-07-26T20:18:42 #kisslinux oh nice

2020-07-26T20:19:24 #kisslinux <obsessive[m]> perish: most of them are ps/2 or usb hid, so pretty common. i suspect the issue is elsewhere but you could throw a generic kernel at it

2020-07-26T20:51:38 #kisslinux hel

2020-07-26T20:51:51 #kisslinux hm, birch has decided to make my txt not shw up

2020-07-26T20:51:55 #kisslinux ow

2020-07-26T20:54:42 #kisslinux mcpcpc: I was looking at your kfc thing, and when you allocate the memory for sel you're off by one, because you don't allocate memory for the terminating null byte

2020-07-26T20:55:44 #kisslinux you can either add 1 at the end, or switch strlen("/") to sizeof("/"), because sizeof will include the size for the null byte, and eliminates an extra call to strlen (although I'd expect that strlen call would get optimized out anyway cuz it's on a string literal)

2020-07-26T20:56:19 #kisslinux <mcpcpc[m]> E5ten: ah. thnx! will push an update in bit.

2020-07-26T20:58:13 #kisslinux hello

2020-07-26T20:58:22 #kisslinux i return, once more

2020-07-26T20:58:25 #kisslinux also I'd add a size_t len, and set len to those strlens instead of passing them directly to malloc, and then use snprintf(sel, len instead of sprintf(sel, that way if anything changes about what you put in sel, but you forget to change the size you allocate, the issue will be string truncation instead of trying to put the strings in memory you don't have

2020-07-26T20:58:42 #kisslinux a discovery has been made: usb mouses dont work unless they're plugged in at boot

2020-07-26T20:58:56 #kisslinux if im not mistaken, is this not what udev is meant to solve?

2020-07-26T21:01:50 #kisslinux <mcpcpc[m]> <E5ten "also I'd add a size_t len, and s"> hmm had snprintf at some one point. lol. womp. will fix those as well.

2020-07-26T21:15:08 #kisslinux also, when -s is passed you add "/" and sval at the end of sel, but sel will only have enough allocated memory to store exactly what it's holding, so imo modify the initial allocation and snprintf for sel based on if sflag is true, otherwise you'll have to realloc to append sval

2020-07-26T21:17:36 #kisslinux wait sorry lol I mean if sval is non-NULL, not if sflag is set, there is no sflag, but that actually makes me notice another issue, you need to initialize sval to NULL, otherwise the if (sval) check will succeed even if -s wasn't passed, but its contents will be garbage

2020-07-26T21:21:33 #kisslinux I think this diff would solve the problems related to sel allocation (I also had to realign all the comments for the global variables to fit initializing sel) http://ix.io/2snY

2020-07-26T21:25:31 #kisslinux <mcpcpc[m]> <E5ten "I think this diff would solve th"> thnx. will take a look in a bit. also, pushed the previous fixes

2020-07-26T21:27:24 #kisslinux also, the conf variable has no memory allocated to it, it just points to what getenv returns, I think you need to have a temporary variable you set to getenv("XDG_CONFIG_HOME"), and then allocate memory for conf based on the length of that string and the additional space required to append /kfc and /current

2020-07-26T21:29:58 #kisslinux <mcpcpc[m]> <E5ten "also, the conf variable has no m"> mkk.

2020-07-26T21:34:17 #kisslinux and in random_palette you need to realloc space for sel to append the file name

2020-07-26T21:40:09 #kisslinux you've got some global variables that shouldn't be, global variables are for variables that need to be shared between functions but not passed as parameters, but for example FILE *fp isn't shared between functions, it's just used individually within each function that uses it, and closed by the end of those functions, so each of those should have their own local FILE variable, same goes for the dirent, eval, and evar

2020-07-26T21:40:09 #kisslinux (possibly others, but those are the ones I just checked)

2020-07-26T21:41:23 #kisslinux <mcpcpc[m]> <E5ten "you've got some global variables"> hm. yeah. ok makes sense. wasnt really sure at the time what the best practice is. will correct as well

2020-07-26T21:52:16 #kisslinux <mcpcpc[m]> just pushed several fixes.

2020-07-26T21:53:20 #kisslinux <mcpcpc[m]> several more to go. lol. thanks again for the help :)

2020-07-26T21:57:34 #kisslinux nw, you also don't free sel at any point (I guess the best place to do that would be at the end of main)

2020-07-26T21:57:45 #kisslinux there might be other stuff you don't free idk, I just know that one

2020-07-26T22:02:32 #kisslinux also, stuff like sel shouldn't be a global var imo, the functions that use it should take it as a parameter

2020-07-26T22:11:03 #kisslinux <mcpcpc[m]> <E5ten "also, stuff like sel shouldn't b"> sure. makes sense

2020-07-26T22:38:16 #kisslinux <mcpcpc[m]> E5ten: ok. i think all suggested improvements/fixes have been pushed. will review the local/global variables one more time later. thank again.

2020-07-26T22:42:49 #kisslinux <mcpcpc[m]> ah. and i guess i still need to properly allocate mem for conf variable. hm

Proxy Information
Original URL
gemini://gemini.ctrl-c.club/~phoebos/logs/freenode-kisslinux-2020-07-26.txt
Status Code
Success (20)
Meta
text/plain; charset=utf-8
Capsule Response Time
532.619044 milliseconds
Gemini-to-HTML Time
2.157866 milliseconds

This content has been proxied by September (3851b).