IRC Logs for #crux Friday, 2018-05-11

*** john_cephalopoda has joined #crux00:00
*** qepeeqe has joined #crux00:02
*** john_cephalopoda has quit IRC00:11
*** qepeeqe has quit IRC00:12
*** SiFuh has quit IRC01:10
*** SiFuh has joined #crux01:10
*** SiFuh has quit IRC01:23
*** SiFuh has joined #crux01:25
*** JanC_ has joined #crux01:28
*** SiFuh has quit IRC01:37
*** SiFuh has joined #crux01:38
*** chinarul1zzz has quit IRC01:58
*** chinarulezzz has joined #crux01:58
*** _________mavric6 has quit IRC02:37
*** _________mavric6 has joined #crux02:38
*** tilman_ has joined #crux02:48
*** john_cephalopoda has joined #crux05:40
*** elderK has joined #crux06:04
*** elderK has quit IRC06:04
*** elderK has joined #crux06:04
*** yjfopgnylocaofdl has joined #crux06:04
*** Workster has quit IRC06:04
*** Workster has joined #crux06:04
*** g0relike-2 has quit IRC06:44
*** g0relike has joined #crux06:45
*** xvee has joined #crux06:58
xveehi everyone. its been a while.06:58
frinnsthello07:02
*** emmett1 has joined #crux07:15
*** xvee has quit IRC07:22
*** workodera has joined #crux07:27
*** Workster has quit IRC08:42
*** umggsoymtiosctvt has joined #crux08:42
*** Workster has joined #crux08:43
*** emmett1 has quit IRC11:04
joacimevery time i get emails about azure, i tick report as spam12:13
*** Workster has quit IRC12:29
*** Workster has joined #crux12:30
*** xx1973 has joined #crux12:52
*** MNKyDeth has joined #crux13:07
MNKyDethUsing the 3.4-rc2 I am trying to install pulseaudio but ran into an issue. I see similar issues posted online but I can't seem to find anything to really reslove it. Was curious if anyone has run into this issue here with pulseaudio. https://pastebin.com/SC20DaZR13:12
frinnstyeah13:14
frinnstyou can use my port for it, its patched there13:15
frinnstjust a second13:15
frinnsthttps://planet-express.se/crux/ports/pulseaudio/13:15
frinnstrsync -aqz planet-express.se::ports/pulseaudio/ pulseaudio13:16
MNKyDeththank you, will try it momentarily13:17
jaegerI emailed the maintainer a patch some time back but I guess he hasn't had time to work on it13:26
MNKyDethI do realize this is still RC as well. My goal was to get to a fully working system as I would want it and see what issues I had a long the way. Been a long while since I used Crux. Started back in the 2.0 or 2.1 days I think. Was using other stuff since around 2010. But I want to come back.13:30
MNKyDethfrinnst: your package built and installed without issue. Thanks13:31
frinnstcheers13:31
frinnsti'll poke the pulseaudio maintainer13:31
*** crash_ has joined #crux14:09
*** Kruppt has joined #crux14:14
*** emmett1 has joined #crux14:21
*** emmett1 has quit IRC14:37
DaVinciDon't know how interested anybody is in the performance of pkgutil, but testing did show up some interesting results.15:01
DaVinciIt looks like archives are being processed twice. Once for file contents, something like tar -t, and once for actual decompression.15:02
DaVinciAlmost trivial for a single package, I know, but when installing a distro, hundreds of ports are processed.15:03
ryuoDaVinci: i doubt efficiency was ever a high priority, other than using C, since CRUX is primarily source based. the biggest overhead is building ports.15:05
ryuoDaVinci: then again, all package managers do this. they have to know all the files being installed to check for any issues prior to extraction.15:06
ryuoNamely, overlapping file pathes that aren't directories.15:06
DaVinciFair point, didn't consider that need for conflict resolution.15:06
DaVinciIt's not there in my problem.15:07
ryuoi used to work on Frugalware's pacman. it's a bit more advanced than CRUX, but still this is a basic problem all have to address.15:07
DaVinciTrue, it's just handled as part of my development process, so I don't worry about it that much, but I do use the pkg system to find them.15:08
ryuonot sure what you're trying to come up with though.15:10
DaVinciI collapse and expand ports all day, making sure they integrate correctly.15:10
ryuoI do realize CRUX could use a PM library... current approach doesn't allow for scripting via library interface.15:10
DaVinciThat's hundreds of megabytes of archives, in and out.15:11
DaVinciTakes forever. exhausting.15:11
ryuoFor what purpose?15:11
DaVinciI make a framework that others use to build firmware images15:11
DaVinciThinStation15:11
ryuoOh, so CRUX is being used commercially too?15:12
DaVinciMaybe....15:12
ryuolol15:12
DaVinciI support it, blindly to the public.15:12
DaVinciThinStation is totally free.15:13
ryuoMaybe I can revise pkgutils to start exporting its core functionality as a C library with the CLI just becoming a user of it...15:13
*** Kruppt has quit IRC15:14
DaVinciI poked through the code a little.15:14
DaVinciIt would need more work to really do what I need.15:14
DaVinciI 2x performance by assuming file paths are correct, and just listing the contents on decompress into the db.15:15
ryuoDaVinci: Well, I could make behavior toggleable but the CLI would always keep them on.15:15
ryuoAs a safety feature.15:15
DaVinciI also needed alternate db location, while expanding to root.15:16
ryuoI'll see if they'll let me. C is something I specialized in.15:16
ryuofrinnst: how much trouble would it be to get a redesign of pkgutils or w/e added? I've wanted to make it friendlier to 3rd party scripting for awhile now.15:17
DaVinciCool. I know it's possible, it would just take me weeks and weeks. I hacked a working solution out with tar. I hope it completely mimics pkgutil db creation :)15:17
frinnstwell you got revdep in15:18
frinnst:>15:18
*** jue has joined #crux15:18
frinnstbut pkgutils would need to be more vetted than that was (thats not to say that it needed more)15:18
*** workodera has quit IRC15:36
ryuofrinnst: i figured.15:47
ryuofrinnst: i'll give it a spin one of these days. i've still got a week before i'm free from current obligations.15:52
cruxbot[opt.git/3.3]: libidn: updated to 1.3517:47
*** SiFuh has quit IRC18:27
*** SiFuh has joined #crux18:30
*** SiFuh has quit IRC18:37
*** onodera has joined #crux18:39
*** SiFuh has joined #crux18:43
DaVinciis there a tool for checking the integrity of the db, re-indexing?19:36
ryuoDaVinci: not really? what would it check?19:37
ryuoi mean, it's just a text file.19:38
DaVinciI'm creating a db from concatenated db'lets, that are the output of tar and . Pkgfile.19:38
DaVinciI just want to make sure it's all together right, the same way as if I had used pkgutil19:39
DaVincire-indexing would be the real one I need.19:39
DaVincithen could diff against proper db.19:40
ryuoyou could do that with AWK, since it's just text records.19:40
DaVincicontext split?19:40
ryuoContext split?19:41
DaVinciAwk is like the last cli tool I never learned. How would I use it to re-index? I could maybe do something with csplit, break real db and fake db into files(per port record) then compare the tree.19:43
ryuowell, you can use it to sort records. that is what you meant by reindex?19:43
DaVinciYes.19:43
DaVinciWasn't aware it did that.19:44
frinnstoops. the libidn update broke some stuff19:44
frinnstjust a heads up there, check revdep after upgrading it19:44
ryuoOr, maybe not to the same extent...19:46
ryuoseems sorting isn't in its repertoitre.19:46
ryuoDaVinci: can you spare a copy of a database? Perl is a quick option.19:47
DaVincispare a copy?19:47
DaVinciPretty tiny....where do you want it?19:47
ryuoDaVinci: dpaste it.19:47
DaVincitoo big for dpaste20:00
ryuook...20:01
ryuonevermind. gimme a bit.20:01
DaVinciI can post to an http20:01
DaVincihttps://drive.google.com/file/d/1uXghBVOvDcrlH9AaTuDrguQ-OR2IRsUA/view?usp=sharing20:06
*** chinarulezzz has quit IRC20:59
*** chinarul1zzz has joined #crux20:59
joacimi hear syfy has canceled the expanse21:12
joacimi figured this would happen. they've canceled stuff for being expensive before21:12
jaegeryeah :/21:12
jaegerthey're going to try to get someone else to make it but I dunno how well that will go21:12
joacimit is a popular show. was hoping someone would pick up dark matter, but that kinda started as a comic, so i guess it can be finished as one too21:20
joacimfor the expanse, it seems something that could be picked up by another21:20
jaegeryeah21:25
MNKyDethI think the first season, maybe two... If there was two seasons were on Netflix or prime video. Maybe either service will pick it up?21:25
jaegerThe books are good, too :)21:25
ryuoDaVinci: http://dpaste.com/1AHKC5H21:40
DaVincicool, ty, I'll play with that.21:42
ryuoDaVinci: just feed it the names of any DB files, and it'll merge them into a single one, sorted by pkg name.21:42
ryuoif none are given, it'll use stdin instead.21:43
DaVinciI don't suppose your swift on resource limits.21:44
ryuoDaVinci: ?21:45
ryuodefine resource limits. it has varying contexts.21:45
DaVinciSo I'm trying to run multiple tar -xvf in parallel. It goes for a while, then I think it's hitting a resource limit, parent gets a sig 7 and it all dies.21:47
DaVinciCan get away with 2, but 3 or more blow up.21:47
ryuoSIGBUS... i don't encounter that normally.21:48
ryuoDaVinci: that isn't resource related.21:48
ryuoit sounds like a program bug.21:49
ryuoIt's related to SIGSEGV.21:49
DaVinciWhy is that, all I change is the number of threads21:49
ryuohttps://en.wikipedia.org/wiki/Bus_error21:49
ryuoNo idea.21:49
DaVincifun21:51
ryuoDaVinci: i take you're not a programmer?21:52
DaVinciShell stuff, a bit of hacking on whatever else touches it.21:52
DaVinciLearned python, but I still don't want to touch it.21:53
ryuoIOW, not really.21:58
DaVincilol, sigh, shell programming is still programming yo.21:59
ryuoright...22:00
ryuolol22:00
ryuoscripting.22:00
DaVinciI think I figured it out.22:00
DaVinciReplacing glibc, fine in a single thread, but not multiple.22:01
ryuoi don't consider shell a real language because it does a fork+exec for nearly every thing it does.22:01
ryuoThread? Shell isn't threaded.22:01
ryuoDo you mean multiple proceses?22:01
DaVinciYeah.22:01
DaVincixargs nproc22:01
ryuoThreads are concurrenncy within a single process.22:02
ryuoAnd that's just OS primitives.22:02
ryuoThreads/Fibers can be done entirely in software.22:02
ryuomost C software relies on kernel threads though.22:03
ryuousing POSIX API.22:03
DaVincicoolio22:03
ryuoDaVinci: how old are you?22:04
DaVinci4222:04
ryuoOh. You sound like you're 20 still... lol22:04
DaVinciSo flattering.22:04
DaVinciAt least someone thinks I'm young22:04
*** Workster has quit IRC22:05
ryuodon't get into C if you have a choice.22:05
*** Workster has joined #crux22:05
ryuoit'll drive you nuts if programming isn't your thing.22:05
ryuoit's basically extreme programming as far as i'm concerned.22:06
DaVinciYeah, I'm a bit long in the tooth for it.22:06
DaVinciI have hacked it, but always with trepidation.22:06
ryuoit seems like every language has bizarre semantics that are rarely used.22:07
ryuoLike, the comma operator in C.22:07
ryuoWhat is the value of this expression: (x, y)22:07
ryuoit's actually y. the comma operator evaluates both its operands, but only returns the right one.22:08
DaVinciHmmm.22:09
ryuo(3, 4, 5) has the value 5.22:09
ryuowhen used in another expression.22:09
DaVinciOh sure, a ladder.22:09
DaVincior priority fallthrough.22:09
ryuoit just lacks any real point.22:10
john_cephalopodaThere is some GNU thing that allows you to start multiple, concurrent processes in the shell.22:10
ryuojohn_cephalopoda: sending jobs to the background?22:10
john_cephalopodaIt's kinda like shell multithreading :รพ22:10
DaVinciThe point is that every language needs them. Even spoken ones.22:10
john_cephalopodaryuo: GNU parallel.22:11
ryuoDaVinci: main reason some use threads is that they can share memory.22:11
ryuoprocesses can't normally.22:12
ryuobut, if you know what you're doing, POSIX shared memory is a thing.22:12
john_cephalopodaAlso IPC with sockets or pipes.22:12
DaVinciYeah, I'm really doing mp here, not mt22:12
ryuothe only drawback to that is you need to define some kind of communication protocol.22:12
john_cephalopodaI'd say that sockets or pipes are a saner solution to most IPC issues than shared mem.22:13
DaVinciWhich I don't want to do, cuz I hack lazy, let the os deal.22:13
ryuoyes.22:13
ryuoshared memory is easiest in the same process.22:13
ryuoDaVinci: maybe you should try newlisp then. its preferred concurrency method is process based.22:14
john_cephalopodaWithin the process, yeah.22:14
ryuohttp://www.newlisp.org/22:14
DaVinciI worked it out with xargs.22:14
DaVinciIt's just a number now. got to 3, 4 is blowing up.22:14
ryuoTcl is also a weird one.22:16
ryuoit's the only language i've seen that has shell-like syntax while not relying on external commands.22:16
ryuoas its primary mode of operation.22:16
ryuoset x [expr {3+4}]22:17
ryuoputs $x22:17
ryuobut, it doesn't have the same issue that shell does with whitespace.22:18
*** SiFuh has quit IRC22:22
*** SiFuh has joined #crux22:22
DaVinciryou: Got my install down from 5 minutes, to 53 seconds. Thanks for your help.22:36
ryuoDaVinci: what were you doing before? a hack-job with shell?22:37
DaVinciOh, I still am. I still am.22:38
ryuoDaVinci: well, shell has really bad performance for any real software.22:38
ryuorevdep used to take 15 minutes before I did the C rewrite.22:38
ryuoit was 100% shell.22:38
DaVinciThe shell is doing very very little.22:38
ryuook.22:39
DaVinciI just call other c compiled programs to do the heavy lifting.22:39
DaVincitar, xz, find.22:39
ryuojust keep in mind if you do that a lot, you'll find your program slows to a crawl.22:39
ryuofork+exec isn't cheap.22:39
ryuoit's also why CGI is no longer used.22:40
DaVinciEh, I am installing 892 ports in like 25 seconds.22:40
DaVinciI'm happy.22:40
DaVincixz compressed no less.22:41
ryuoi'm just giving you a warning. if your shell scripts end up  running slow, consider how many programs you're executing to complete it.22:41
DaVinciI do.22:41
DaVincity22:41
DaVinciI'm kind of a performance junky22:41
DaVinciIt usually comes down to how your write it, more than what with.22:42
DaVincisorta.22:42
ryuothat's true of all languages, but more so with shell.22:42
DaVinciI couldn't rewrite things like tar in shell, but I can glue it up to something right quick and in a hurry.22:42
ryuobut shell doesn't allow for much beyond cobbling together external programs.22:43
ryuoif you need to care about data structures, shell is *really* inadequate.22:43
DaVinciI think that's actually quite a bit, but perspectives.22:43
ryuoah, i don't think in terms of external programs as much as i used to.22:44
ryuonow it's primarily library APIs, and relying on CLIs to do that is a lot of work.22:44
ryuolike, the old implementation of revdep couldn't really be optimized much.22:45
ryuothe logic of what it did was too complex.22:45
ryuoit had to be rewritten in a language that did most/all processing in process.22:45
ryuomostly because a lot of the logic relied on the data type of files.22:46
DaVinciOk. I do have some code that's like that.22:46
ryuousing "file" all the time is an imprecise hack-job.22:47
ryuothe only alternative i could think of is trying to use shell-builtins to check the file header.22:47
DaVinciIt could totally go faster in C, I'm sure. I mitigated most of the slowness, but it's still there on certain rare instances when the fast path fails.22:47
ryuoDaVinci: shell will always be needed for ports, so there's that.22:48
ryuobecause building software basically requires cobbling together the right set of commands.22:48
ryuoand it's highly variable how this is done.22:48
DaVincifile is not really that bad. Especially if you trim the database.22:48
ryuoDaVinci: i guess, but that's not an option for a general purpose distribution.22:49
ryuounless it supports different databases?22:49
ryuoi never checked.22:49
DaVinciNo for sure not. But if your building a script that relies on file, you can make a custom db that only supports what your looking for, then file goes very fast.22:49
ryuoDaVinci: I'd give TCL a look if i were you. you'll probably find a use for it when shell isn't enough.22:50
ryuoPerl is also pretty good, but it's more complex than TCL.22:50
ryuoTCL is one of the simplest languages i can think of.22:51
DaVinciAllright.22:51
ryuoboth use sigils, the $ in shell.22:51
ryuoeh, TCL isn't incredibly popular but neither is shell.22:52
ryuoeverything in TCL uses a command to perform operations.22:52
ryuoSetting a variable, output, etc.22:52
ryuobut most of them are internal to TCL.22:52
DaVinciI actually heard that people calling themselves shell programmers is on the rise22:52
DaVinciThe need has increased.22:53
DaVinciMight get even bigger with WSL22:53
ryuoscripting and programming are related but largely different areas of focus.22:53
ryuoThere are shell libraries... but it's still something i consider hackish.22:53
ryuoshell can't really support native data structures well.22:53
ryuothough, BASH can be extended with C...22:54
ryuoit's just not normally done.22:54
ryuoyou can load ELF shared objects to provide additional builtins.22:54
DaVinciI agree with you there, but that just means that the interpreter doesn't support data structures.22:54
DaVincior complex data structures.22:55
ryuoeven C is far more capable in that area.22:55
DaVinciYou can implement most things. It just takes a crap load of code.22:55
ryuohence, why i usually consider shell only suitable for OS-level scripting or so.22:56
ryuoit only excels at gluing external programs together.22:56
DaVinciMaybe, depends I guess on how complex the data is.22:56
ryuoNo language can do this as well as shell can.22:56
DaVinciA couple of fields......stay shell. More than than, consider a move.22:56
ryuoeven then, shell rarely directly works with field.s22:57
ryuoit usually just combines other utilities that do.22:57
ryuoand even then, they usually only support single-lines.22:57
ryuofields22:57
DaVinciIt gets complicated quickly, but always moving out of shell is a pain.22:57
ryuonot always. it depends.22:58
ryuolike, that script for sorting the pkg database.22:58
ryuoit's just general stuff. nothing unique really like xz or gzip.22:58
ryuowell. there's some obscure shell behavior.22:59
ryuodo you know what happens if you quote the name of a here-document?22:59
ryuocat << EOF23:00
ryuo...23:00
ryuoEOF23:00
ryuoto:23:00
ryuocat << 'EOF'23:00
ryuo...23:00
ryuoEOF23:00
ryuoif you're going to stay with shell, may as well learn how it works.23:01
DaVinciIs that a vs, or a nested?23:01
ryuoVS?23:01
DaVinciverses23:01
ryuoversuses.23:01
ryuothey're not nested.23:02
DaVinci'EOF' means, don't expand variables between here and EOF.23:02
ryuoi guess that's a valid answer. i look at it as suppressing evaluation. it takes the whole context literally.23:02
ryuohttp://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html23:02
ryuosome other favorites of mine...23:03
ryuo${HOME#*:}23:03
ryuoerr23:03
ryuoPATH23:03
ryuoecho ${PATH##*:}23:03
ryuoone of the few ways to modify strings w/o using an external commnad.23:04
DaVincislicing is fun.23:04
ryuo${PATH:-FOO}23:04
ryuoyou familiar with this?23:05
ryuoone of my favorites23:05
DaVinciNot exactly23:05
ryuo${FILE/.bar/.foo}23:05
ryuoDaVinci: ah, it does different things based on the status of PATH.23:06
DaVinciSo how old are you?23:06
ryuosee 2.6.2 of that link23:06
ryuo30.23:06
ryuobut i think this is non-portable.23:07
ryuo${FILE/.bar/.foo}23:07
ryuo${FILE#.bar}.foo23:07
ryuo:P23:07
ryuoerr23:07
ryuo%23:07
ryuo${FILE%.bar}.foo23:07
DaVincithat looks like cut .bar and add .foo23:08
ryuofrom the end, yes. it's basically:23:08
ryuoecho "$FILE" | sed 's/[.]bar$/.foo/'23:09
DaVincisame23:09
ryuouseful for substituting file extensions.23:09
ryuoit's more formally called sub-string substitution.23:09
DaVinciI would have just done \. instead of a full [.]23:09
ryuoDaVinci: i avoided \ because it's a nightmare to embed it correctly.23:10
DaVincican always change the delimiter |23:10
ryuoit's not relevant to the sed delimiter.23:10
ryuo/ is not \23:10
ryuoit's because of how shells ar.23:11
ryuoare*23:11
ryuoyou have to do just the right amount of escaping so it makes it to sed correctly.23:11
ryuoHm23:11
ryuoI guess it doesn't matter for single-quotes...23:11
ryuoi just hate back-slashes.23:12
DaVinciYeah, got a thing against windows :)23:12
DaVinciThats where most people get that tick.23:12
ryuonah, i've never really done any windows programming.23:13
ryuojust some crap for school if that23:13
ryuoDaVinci: trivia: what's the difference between `echo foo` and $(echo foo)?23:15
DaVinciOne comes from a whole new instance, but the both try and execute foo23:17
DaVinci\/the/they/23:18
ryuoDaVinci: they're both executed in sub-processes.23:23
ryuoDaVinci: but you can't nest ``s.23:23
ryuotry this:23:23
ryuo`echo `cat /dev/null``23:23
ryuoit should output an empty line if it nests.23:23
ryuo$(echo $(cat /dev/null))23:24
ryuoDaVinci: also, if you need to do integer arithmetic, use $(( ))s.23:24
ryuoit performs it in the same process as the shell.23:25
DaVincimath is for nerds.23:31
frinnstholy backlog batman23:35
ryuofrinnst: i imagine your work backlog makes it pale by comparison.23:41
*** john_cephalopoda has quit IRC23:47
*** john_cephalopoda has joined #crux23:59

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!