IRC Logs for #crux Wednesday, 2020-02-26

*** onodera has quit IRC00:18
*** xor29ah has quit IRC00:31
*** xor29ah has joined #crux00:35
*** SiFuh has quit IRC01:27
*** SiFuh has joined #crux01:45
*** Kruppt has quit IRC02:14
*** hsan has joined #crux02:26
*** tilman_ has joined #crux02:53
*** abenz_ has quit IRC03:42
*** abenz_ has joined #crux03:42
rmullstenur: FYI I was able to fix the ncurses build by adding export CPPFLAGS="-P" to my /etc/pkgmk.conf04:14
*** hsan has quit IRC06:32
*** hsan has joined #crux06:33
*** SiFuh has quit IRC06:40
*** SiFuh has joined #crux06:41
*** guido_rokepo has joined #crux08:20
*** SiFuh has quit IRC08:21
*** SiFuh has joined #crux08:23
*** SiFuh has quit IRC08:29
*** SiFuh has joined #crux08:35
frinnstfucking snow09:01
*** guido_rokepo has quit IRC09:22
*** guido_rokepo has joined #crux09:22
*** SiFuh has quit IRC09:53
*** SiFuh has joined #crux09:55
*** guido_rokepo has quit IRC10:03
*** guido_rokepo has joined #crux10:03
*** guido_rokepo has quit IRC10:21
*** guido_rokepo has joined #crux10:22
*** guido_rokepo has quit IRC10:44
*** guido_rokepo has joined #crux10:47
*** SiFuh has quit IRC11:29
*** SiFuh has joined #crux11:31
*** obarun has quit IRC11:43
stenurrmull: mysterious.12:19
*** Kruppt has joined #crux12:23
cruxbot[core.git/3.5]: bindutils: update to 9.14.1113:03
cruxbot[core.git/3.5]: man-db: update to 2.9.113:03
*** abenz__ has joined #crux13:04
*** abenz_ has quit IRC13:07
weednixFrom time to time I try to learn a bit more about C,13:16
weednixbut I feel frustated because I have a Makefile problem,13:17
weednixI build a static library on a /a_folder13:17
weednixthen I try to build binary that links to that library in /b_folder13:17
weednixgoogle show so much ways to do this that all results are irrelevant, no one work since they depend from case to case13:18
stenurjust place it on the command line.  gcc -o prog source.c ../a_folder/lib.a13:19
weednixwill try ;)13:20
weednixstenur: I think I need a -I ../a_folder/ includes give error13:22
stenurWhy -I? That is for headers. Do you need include files?13:23
weednixstenur: sorry to waste your time, is very small so I hope is quick13:26
weednixanother thing I start duing is to use vesta control pannel, I'm changing the install script and then I will try to use the same configuration on documentation and examples13:27
stenurYou want to compile the example? -L and -l, hm.  Why not use like i have shown?  -I does not belong in LDFLAGS, only in CFLAGS.13:30
stenurAt linking stage headers are no longer of interest.13:31
stenurOther than that.. make patterns i have never used (not portable).13:32
weednix:| that makefile in example is just a "try" to show until I have gone13:33
weednixI try to learn by looking at other examples and I arrived at that13:34
weednixat one time I was able to compile that location.c and it worked, but I was getting a small error from LD so I change it until is broken13:34
stenurThe linking stage does not need CFLAGS, and usually libraries are placed last on the command line (object order may matter, i have forgotten).  And the compile step must not, and does not need libraries. Compile "$(CC) $(CFLAGS) -c $(@) $^" (i do not know $^, seems pattern related), link "$(CC) $(LDFLAGS) -o $(@) $^".13:39
weednixwell I give up for today14:09
weednixclearly I can't do i14:09
stenurAnd i background all my amixer invocations which come in as a hook that roots in acpid. Since i un/mute volume in LID close/open. I blamed acpid on this channel for that in the past i think. Anyway i background all hooks along that route now.14:22
stenurout for lunch (sic!)14:22
weednix:) bon apetite14:23
SiFuhI am trying to do something in bash and I can't get my head around it. If I cat a file the result is 0xFF00FF. However, I would like the result to be magenta. And if the person inputs magenta I want it to come up as 0xFF00FF. Is there a way to do this without 200 lines of code added since I have 8 different colors and 8 different hexcode14:30
TimB_SiFuh: are we talking about configuring bash or writing a bash script?14:32
TimB_if it's the latter, i'd say a case switch might be the easies way to do it14:36
*** weednix has quit IRC14:44
SiFuhTimB_: yeah, writing a script. I want the user to only see and input the color names, but the program to only use the hexcodes behind the scenes14:45
SiFuhTimB_: yes, 'case' may work.. Thanks14:48
*** hsan has quit IRC15:11
SiFuhTimB_: doesn't look like it will work for what i want to do15:21
SiFuhTimB_: <-- Sorry just quickly typed it maybe a mistake in there not sure. I am looking at something like this15:27
*** hsan has joined #crux15:36
TimB_SiFuh: but thats not a case15:44
SiFuhI know case didn't work15:46
SiFuhI was showing you an example of what I wanted, because I don't like having too many lines15:46
SiFuhI am sure there must be hidden deep in the basement of bash archives that have a much simpler and more compact way15:47
TimB_why won't case work though? you should be able to check if the input is either the hex code or the name, and proceed with whatever it is to make it fit?15:55
TimB_this for your 8 colors and you are done?15:55
SiFuhI could get either input be accepted, but only one output15:59
TimB_like case $foo in 0xFF00FF|\magenta) <yourcode> 0xXXXXXX|\whatever) <morecode> ?16:11
SiFuhyeah something like that16:14
SiFuhbut the way it must be is if i use 0xFF00FF it must display magenta. And if I uese magenta it must display 0xFF00FF16:15
TimB_well, yeah, and each case would see for either matching input, then your logic can decide what to put out16:16
SiFuhhence the very large if statments16:16
TimB_if it's the hex, put out the name, and vice versa16:16
SiFuhI am reading some file that only uses hex color coding.16:16
SiFuhusing hex color codes isn't particulary user friendly. So I want the the file to be read by the bash script. It interprets the string 'hex color code' to the actually color. When the user modifies the color they just type in the name of the color and the program interprets the name as the 'hex color code' and puts tht into the file.16:18
SiFuhThe if statement I wrote will work, but it is quite large and I was thinking there is a more compact way in bash to do it16:19
TimB_i still think the case might work but i have no time for trying it myself right now16:23
SiFuhnot a problem, I will look deeper. Thanks TimB_16:25
*** guido_rokepo has quit IRC16:43
stenurSiFuh: xorg-rgb has with rgb.txt: /usr/share/X11/rgb.txt; that with grep -i should do it for you.16:53
stenurweednix: thanks :)16:53
*** MasterdonX has quit IRC16:59
*** masterdonx2 has joined #crux16:59
*** onodera has joined #crux17:01
*** hsan has quit IRC17:26
SiFuhthanks stenur17:33
SiFuhbut don't want to install an xorg dependent for a keyboard light ;-)17:34
*** onodera has quit IRC17:59
SiFuhcould always just run needles for statements in the background ;-)
TimB_jaeger: for whatever reason, zpool import mypool didn't work, even with cd root like you said. however, another neat way of doing that: crontab -e and "@reboot zpool import .."18:20
TimB_eh, in /etc/rc.local that was :)18:23
stenureh. Had vim list mode on.18:25
SiFuhIt's alright I see it18:26
SiFuhI am on #bash asking if those guys know a better way18:26
stenurArray split should do that too.18:27
stenur-rwxr-xr-x 1 root root 934632 Feb 10 16:51 /bin/bash*18:27
stenur-rwxr-xr-x 1 root root 139344 Feb 18 23:35 /usr/bin/nawk18:27
SiFuhstenur: most said as TimB_ said 'case' and the another jumped in said better to use an array.18:43
*** weednix has joined #crux18:51
weednixis there anyway to feed a Makefile with random settings and make it run until it works ?18:51
weednixI'm trying all LDFLAGS and things I find on the web,18:51
weednixyes all, I'm tired of trying by hand18:52
SiFuhgrep the variables out of the or .am18:52
weednixSiFuh: is this small thing
SiFuhor just read the Makefile itself18:52
weednixI just want the thing inside example to be linked to the thing inside libccore folder18:53
SiFuhcan't even load that page18:53
weednixSiFuh: sslabs can :|18:55
weednixsorry can't18:55
pitillo7win 519:10
pitillosorry :D19:10
weednixSiFuh: it's working19:10
weednixnot my problem when it fails, everything is fine here19:11
weednixit seems random before it arrives at here19:11
SiFuhweednix: ok I got it19:12
jaegerTimB_: odd, no idea19:44
TimB_jaeger: cron is neat though, didn't know about @reboot before19:45
jaegeryeah, that can be handy19:47
jaegermost cron daemons support it or some form of it19:47
stenurThat sysklogd guy, i mean, really. An attitude worse than the OpenBSD people. Sigh.20:40
stenurMaybe i should start playing dart and use his mails as training targets.20:41
*** JanC_ has joined #crux21:05
*** JanC has quit IRC21:05
*** obarun has joined #crux21:17
stenur(I have to relativize that, say. Some OpenBSD people are really nice, and have anything else but a crappy attitude.)21:27
SiFuhstenur: I like the OpenBSD people :-P21:28
*** omarsk1980 has joined #crux21:39
stenurSiFuh: sure.21:40
*** SiFuh_ has joined #crux21:40
SiFuh_very sure21:41
SiFuh_trying to find out which line it is21:50
*** onodera has joined #crux21:55
*** SiFuh_ has quit IRC22:05
SiFuhok that should fix the strange character in the irssi theme22:06
*** onodera has quit IRC22:25
*** emmett1 has joined #crux22:30
*** Ergo0 has quit IRC22:42
*** Ergo0 has joined #crux22:44
*** masterdonx2 has quit IRC22:56
*** MasterdonX has joined #crux23:00
*** SiFuh has quit IRC23:21
*** SiFuh has joined #crux23:21
weednixMakefile is serious business for newbies like me, but I haze dunIT23:46
weednixnow I can haz sleep23:46
*** xor29ah has quit IRC23:59

Generated by 2.14.0 by Marius Gedminas - find it at!