[2021-06-01T00:01:47Z] there's a rather large button on your keyboard that would make your code more readable [2021-06-01T00:11:29Z] ...of course, the enter key! [2021-06-01T00:20:25Z] you have clang installed? [2021-06-01T00:20:53Z] i do not. [2021-06-01T00:21:18Z] oh [2021-06-01T00:21:24Z] why? [2021-06-01T00:21:37Z] clang-formay [2021-06-01T00:21:45Z] s/y/t/g [2021-06-01T00:21:56Z] * midfavila shrugs [2021-06-01T00:22:17Z] clang-formy [2021-06-01T00:28:35Z] eww, clang-format uses java style by default [2021-06-01T00:28:50Z] even more reason to avoid it [2021-06-01T00:29:19Z] one of these days I'm just gonna put an entire program on a single line, and make it return random numbers as exit codes [2021-06-01T00:29:44Z] have you seen those code obfuscation contents? [2021-06-01T00:29:52Z] yeah, a few entries [2021-06-01T00:29:53Z] contests* [2021-06-01T00:30:22Z] someone once wrote a flappy bird clone in C and formatted it to actually look like the bird. [2021-06-01T00:32:29Z] yeah, people do some insane stuff [2021-06-01T02:04:59Z] the land of ioccc [2021-06-01T03:10:59Z] does anyone know why this script script would work in busybox ash, and bash, but not in dash? [2021-06-01T03:11:20Z] https://git.armaanb.net/bin/tree/setter [2021-06-01T03:11:53Z] in dash it gives " [: unexpected operator]" for the tests in lines 5, 9, and 22 [2021-06-01T03:14:51Z] acheam: == is not a standard test(1) operator [2021-06-01T03:14:57Z] the operator is = [2021-06-01T03:16:11Z] ah thank you! [2021-06-01T03:16:16Z] how confusing... [2021-06-01T03:24:35Z] '[[' is not portable too [2021-06-01T03:25:00Z] just do: amixer sget Master | tail -n 1 | grep -q "off" && ... [2021-06-01T03:26:25Z] im unironically beginning to believe that templeos' command line is better than unix [2021-06-01T03:30:55Z] illiliti: oops I thought I removed all of the '[['s thanks! [2021-06-01T03:33:09Z] noocsharp: how so? [2021-06-01T04:18:13Z] acheam: "commands" are just function calls [2021-06-01T04:18:50Z] you get the flexibility and power of a real programming language [2021-06-01T04:24:22Z] hmm interesting [2021-06-01T04:24:49Z] it would be like using python as a shell, except closer to the metal [2021-06-01T04:26:46Z] xon.sh [2021-06-01T04:28:15Z] I'd use it if it weren't so damn slow to launcy [2021-06-01T04:28:30Z] and just slow in general [2021-06-01T04:29:35Z] i shouldn't have said python: it would be more like using c with a repl [2021-06-01T04:29:44Z] but interpreted like python [2021-06-01T04:30:00Z] and substantially faster, because it's c [2021-06-01T04:30:32Z] thats cool [2021-06-01T04:30:45Z] not exactly the same thing, but you light like picoc [2021-06-01T04:30:45Z] so the entire system uses the same language for everything [2021-06-01T04:30:54Z] thats hot [2021-06-01T04:32:04Z] if you haven't seen templeos in action, you should check out some videos of terry davis [2021-06-01T04:32:10Z] it's pretty amazing [2021-06-01T04:32:23Z] ive seen bits here and thete [2021-06-01T04:32:29Z] just never dove under the hood [2021-06-01T04:35:47Z] the templeos kernel code seems like a good educational resource because of how simple it is [2021-06-01T04:36:40Z] it is far more kiss than kiss [2021-06-01T04:43:04Z] how's nvidia support tho [2021-06-01T04:43:24Z] and I gots to have my ac wireless [2021-06-01T04:48:04Z] hi [2021-06-01T05:24:46Z] hello testuser[m]_ [2021-06-01T13:52:29Z] o/ [2021-06-01T13:54:25Z] \o [2021-06-01T14:07:16Z] shiet, this LTO stuff is going to take forever. gcc alone been compiling for roughly around 1.5hrs already :p compiling the rest of the system aswell is going to take foreveeer [2021-06-01T14:10:11Z] nerditup: were you able to get sr.ht up? [2021-06-01T14:12:21Z] sad_plan: only pgo stuff takes longer [2021-06-01T14:12:27Z] thats lkike 5 packages [2021-06-01T14:12:59Z] 3* excluding gcc [2021-06-01T14:13:43Z] aah ok. I was worried there for a sec, thinking about rust and firefox, which already takes really long time already. [2021-06-01T14:14:04Z] what is this pgo stuff anyway? [2021-06-01T14:14:17Z] ff is with pgo so it takes 2x time, but you can disable it and just go for LTO [2021-06-01T14:14:49Z] you build a program to generate profile data into a directory, then compiler uses it to optimize hot code paths better [2021-06-01T14:14:50Z] basically [2021-06-01T14:15:06Z] its a noticeable difference on large programs like gcc [2021-06-01T14:15:13Z] great [2021-06-01T15:48:43Z] noocsharp of course templeOS' command interface is superior [2021-06-01T15:48:53Z] it's far more flexible and just *capable* [2021-06-01T15:55:48Z] KISS Temple when? [2021-06-01T15:55:56Z] acheam: templeos supports neither graphical accelerate nor wifi [2021-06-01T15:56:03Z] nor internet for that matter [2021-06-01T15:57:56Z] nice [2021-06-01T16:13:14Z] noocsharp: are those bad things? [2021-06-01T16:13:37Z] what has graphics acceleration and internet ever done for us [2021-06-01T16:13:53Z] good point [2021-06-01T16:35:14Z] guys, how do you concat strings in C? would like to hear your opinions [2021-06-01T16:42:37Z] I'm a noob, but there's the strcat() function. [2021-06-01T16:44:15Z] unfortunately, strcat() is unsafe [2021-06-01T16:46:53Z] strlcat from *bsd? [2021-06-01T16:47:09Z] just put it in a .h file instead of adding dep on libbsd [2021-06-01T16:56:00Z] yeah, i considered strlcat [2021-06-01T16:56:15Z] until i saw memccpy [2021-06-01T16:56:53Z] which is defined by XSI(POSIX) [2021-06-01T16:59:50Z] ime there is rarely a good use of str*cat [2021-06-01T17:00:37Z] for example if it's called in any kind of loop, it's accidentally quadratic [2021-06-01T17:00:43Z] probably i'll have to roll my own concat func with variadic params, bell and whistles [2021-06-01T17:00:58Z] have you tried snprintf? :P [2021-06-01T17:01:08Z] yes [2021-06-01T17:01:09Z] "Quadratic"? [2021-06-01T17:01:23Z] snprintf is inefficient [2021-06-01T17:02:14Z] midfavila: https://en.wikipedia.org/wiki/Time_complexity#Table_of_common_time_complexities [2021-06-01T17:04:24Z] illiliti: how so? [2021-06-01T17:06:18Z] hmm. i'll have to read more about that, june. thanks [2021-06-01T17:07:13Z] basically if you're calling strlcat in a loop, it gets slower and slower the more you do it [2021-06-01T17:07:48Z] same thing with snprintf [2021-06-01T17:07:58Z] snprintf is even slower than str* [2021-06-01T17:08:17Z] snprintf doesn't inherently get any slower if you use it properly [2021-06-01T17:09:27Z] the problem with strlcat is that it contains an implicit strlen call [2021-06-01T17:09:31Z] is there some smaller function than strlcat/snprintf if you just need to add a single char to a char array ? [2021-06-01T17:09:59Z] sure, arr[i++] = c; [2021-06-01T17:10:35Z] thanks [2021-06-01T17:10:41Z] howndid i forget that [2021-06-01T17:12:37Z] june: i don't think that using it "properly" will help. if you have a lot of strings that you need to concat, snprintf is slower than anything [2021-06-01T17:13:08Z] based on what? [2021-06-01T17:14:21Z] june: i never said they were bad, but acheam asked about it [2021-06-01T17:15:32Z] with the noted caveat that i am probably the worst when it comes to optimizing... at what threshold of "slower" does it actually matter? is it just purely a best-performance-possible thing, or is the use case driving the need for speed? [2021-06-01T17:18:03Z] june: snprintf(buf, sizeof(buf), "%s/%s", "/sys/", class); << this is used in lots of threads and definitely slower than chainsaws like memcpy [2021-06-01T17:18:29Z] i agree that snprintf gives best safety with average performance [2021-06-01T17:18:41Z] snprintf is what i always use in that scenario [2021-06-01T17:18:54Z] it's fast enough :> [2021-06-01T17:19:06Z] but i need excellent performance with excellent safety [2021-06-01T17:19:16Z] snprintf is slow in my case [2021-06-01T17:19:49Z] probably best to roll your own then, i don't know of anything like what you want in libc [2021-06-01T17:20:27Z] lol you really need to be concatenating /sys/ onto the beginning of a string a trillion times per second? [2021-06-01T17:21:12Z] seems unlikely that's ever going to be the performance bottleneck [2021-06-01T17:22:03Z] algorithms are funky... [2021-06-01T17:22:10Z] is there a way to ensure calls to strcat() are done safely? like a safety blanket? [2021-06-01T17:22:44Z] sure, if you check your own bounds beforehand [2021-06-01T17:23:18Z] june: lol yes [2021-06-01T17:23:25Z] memccpy is almost what i'm looking for [2021-06-01T17:32:13Z] illiliti: You probably shouldn't be using ASCIZ strings for non-trivial applications [2021-06-01T17:32:43Z] That kind of performance is hard to avoid with those kinds of data types [2021-06-01T17:33:02Z] I'd use something like `struct { char *data; int sz; };` for strings [2021-06-01T17:33:08Z] yeah [2021-06-01T17:33:41Z] s/int/size_t/ [2021-06-01T17:33:44Z] antirez has a good lib for this http://www.google.com/url?q=https://github.com/antirez/sds&sa=U&ved=2ahUKEwiN2o7m-_bwAhVFElkFHeBYBLcQFjAAegQIAhAB&usg=AOvVaw0X8zEfkjcIqzWFAssZmQgJ [2021-06-01T17:33:46Z] fuck [2021-06-01T17:33:57Z] https://github.com/antirez/sds [2021-06-01T17:34:04Z] yeah, size_t, not int [2021-06-01T17:34:10Z] you've been exposed as a google user [2021-06-01T17:34:11Z] typical corporate shill behavior, geez zr don't be so transparent [2021-06-01T17:34:22Z] :C [2021-06-01T17:34:25Z] burn the heretic [2021-06-01T17:34:43Z] * zr equips cloak of fire resistance [2021-06-01T17:35:03Z] * midfavila equips Torch of Op-Burning +3 of Fire [2021-06-01T17:35:35Z] fuck, what the hell ipv6 isn't available on k1sslinux.org [2021-06-01T17:35:47Z] ipv6 is cringe [2021-06-01T17:35:48Z] smh where is that slacker of a bdfl [2021-06-01T17:35:52Z] embrace trad ipv4 [2021-06-01T17:35:59Z] midfavila: you're cringe [2021-06-01T17:36:04Z] fight me [2021-06-01T17:36:06Z] rn [2021-06-01T17:36:27Z] no [2021-06-01T17:36:33Z] c r i n g e [2021-06-01T17:36:47Z] let me guess, you use *words* to solve conflict *peacefully* [2021-06-01T17:38:17Z] no, i'll send you a box with bomb [2021-06-01T17:38:33Z] joke's on you, my mailbox isn't large enough to fit a bomb [2021-06-01T17:39:04Z] ...I mean, unless it was C4 or something. I guess you could rig a detonator. [2021-06-01T17:39:15Z] ...hmm... [2021-06-01T22:53:44Z] >finally acquire phantom power supply and not-shit condenser mic [2021-06-01T22:53:53Z] >the phantom power supply expects two mic inputs [2021-06-01T22:54:04Z] >mfw mic can only pass a single audio channel through to my PC because of this gemini://gemini.ctrl-c.club/~phoebos/logs/kisslinux-2021-06-01.txt

-- Leo's gemini proxy

-- Connecting to gemini.ctrl-c.club:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/plain; charset=utf-8

-- Response ended

-- Page fetched on Sun Jun 2 10:07:42 2024