magespawn | good morning | 00:01 |
---|---|---|
=== smile|sleep is now known as smile | ||
inetpro | Kilos reen gehad? | 09:03 |
inetpro | goeie more | 09:03 |
* inetpro had about 29mm | 09:04 | |
=== MaNL is now known as MaNI | ||
squish102 | i have the strangest problem on a linux box, login as root but i cannot type a commands. some work like df -h, but top or screen just never returns | 13:54 |
squish102 | vi doesnt work, but cat does | 13:55 |
squish102 | had some storage removed, but not sure what to look for | 13:55 |
MaNI | sounds like a ncurses issue or something | 13:58 |
MaNI | all the problem commands involve manipulating the terminal in some way other than just plain text output | 13:58 |
squish102 | https://bin.snyman.info/mmm6be5n | 13:58 |
MaNI | while the ones that work are all plain text output | 13:58 |
squish102 | hmm | 13:58 |
squish102 | i'd have no idea what to do about ncurses | 13:59 |
MaNI | perhaps: strace top - or similar can shed a bit more light | 14:00 |
squish102 | what happened is that this is a vm on vmware and we ripped a storage array out from under it. vmware had a failure because disk wasnt removed correctly and vm would not start. removed all storage array disk from vmware and machine booted. | 14:00 |
squish102 | strace top - | 14:01 |
squish102 | ^^ doesn't do anything | 14:01 |
MaNI | maybe ncurses or some similar library that all these things share got corrupted or something, don't know if apt-get has some way to just forcefully reinstall everything if so that would clear it up | 14:02 |
MaNI | otherwise I don't know - can't see a direct link between a failed storage array and your symptoms, but theres definitely some kind of a pattern to which commands are working and which are not | 14:03 |
squish102 | Thanks, that gives me a place to start | 14:04 |
Kilos | hi everyone, many power cuts today with storm and rain | 16:54 |
Kilos | and water getting into house wiring so earth leakage tripping | 16:55 |
Kilos | helloooo inetpro and all you other lurkers | 16:55 |
smile | Kilos-: hi :) | 17:05 |
nsnzero | hey smile | 17:07 |
smile | Should I leave? Should I stay? Should I come back another day? :) | 17:08 |
* smile listens to David Carvet - Should I Leave | 17:08 | |
nsnzero | stick around | 17:08 |
smile | I'll do that ;) | 17:08 |
smile | for now :p | 17:08 |
smile | Kilos-: but you still have power :) | 17:09 |
smile | nsnzero: are you a developer? :) | 17:09 |
nsnzero | no smile , just an average joe | 17:09 |
nsnzero | but what do you need help with ? | 17:10 |
smile | nothing in fact :) I was trying to build chmlib a few days ago, but to no avail :) | 17:10 |
smile | I'm not used to C programming myself | 17:10 |
smile | I know the basics, but I can't even compile a simple library XD | 17:11 |
smile | unless there is a "configure" script, that is | 17:11 |
smile | I wonder why it's missing | 17:11 |
nsnzero | chm -> i remember that as a windows help file format | 17:11 |
smile | yes! :D that's it! | 17:11 |
smile | I'm writing a program to take a chm file, extract it and read the hhc file inside the chm archive | 17:12 |
smile | the hhc file is what you end users call the table of contents | 17:12 |
smile | ;) | 17:12 |
nsnzero | ok in c there are two files to a library - the header and the code | 17:13 |
smile | yeah, that's right. :) | 17:13 |
nsnzero | do you have to use c ? | 17:13 |
smile | I use JavaScript with node.js currently, for parsing the hhc file | 17:13 |
smile | I wrote a command line tool with node.js and javascript | 17:14 |
smile | I would like to know how I can "talk" to chmlib from JavaScript | 17:14 |
smile | that way, I will get a lot of information about the chm file for free | 17:14 |
smile | chmlib is also what's used by xchm and the sumatrapdf reader (which also opens chm files) | 17:15 |
smile | chmlib is widely used, but not from within javascript ;) | 17:16 |
smile | I'm going to play a game, be back in a while | 17:16 |
nsnzero | ok sure i do some research in the mean time - i dont like java so i never learn't it | 17:17 |
nsnzero | Maaz tell smile that this is a good starting point https://sourceforge.net/projects/chmpane/?source=typ_redirect | 17:25 |
Maaz | nsnzero: Got it, I'll tell smile on freenode | 17:25 |
smile | nsnzero: thanks :) | 17:46 |
Maaz | smile: By the way, nsnzero on freenode told me "tell smile that this is a good starting point https://sourceforge.net/projects/chmpane/?source=typ_redirect" 20 minutes and 38 seconds ago | 17:46 |
smile | I wonder if it's using chmlib, lets download it and look at the source code :) | 17:46 |
Kilos- | power on and off smile | 17:50 |
smile | Kilos-: now it's on I presume ;) | 17:51 |
Kilos- | well duh | 17:51 |
Kilos- | haha | 17:51 |
Kilos- | longest its been on all day | 17:51 |
smile | nsnzero: I tried chmpane, it works for some chm files, but even for CHM specification compliant files the chance of failing is high :) | 17:52 |
smile | I might still have a good time studying the source code, but as a product on itself, it's worthless :) | 17:52 |
smile | Kilos-: lets celebrate that. :) | 17:53 |
Kilos- | lol | 17:55 |
Kilos- | Maaz coffee on | 17:55 |
* Maaz starts grinding coffee | 17:55 | |
smile | chmpane uses lzx.c, which is written by Jed Wing :) | 17:56 |
Kilos- | i have power sockets hanging outside the flush wall mountings to escape the water | 17:56 |
smile | the same author as the chm specification | 17:56 |
smile | Kilos-: good | 17:56 |
Kilos- | will need to check roof tommorrow | 17:56 |
smile | :D | 17:56 |
Kilos- | or in ceiling | 17:56 |
smile | Kilos-: don't fall of the roof | 17:56 |
Kilos- | nope its too far for old peeps to fall | 17:56 |
Kilos- | ill tie a safety rope to a sky hook | 17:57 |
smile | (y) | 17:58 |
smile | that's a thumbs up | 17:58 |
smile | http://www.nongnu.org/chmspec/latest/ <- do you envy me for reading that? ;) | 17:58 |
Kilos- | nope | 17:59 |
Kilos- | ok guys i go sleep now. you have a good time | 17:59 |
Kilos- | see you tomorrow | 17:59 |
Maaz | Coffee's ready for Kilos-! | 17:59 |
Kilos- | oh my | 17:59 |
Kilos- | Maaz ty | 17:59 |
Maaz | You are welcome Kilos- | 17:59 |
* Kilos- sips cyber coffee | 17:59 | |
smile | good night, Kilos- | 18:00 |
smile | good luck sleeping with drinking coffee late at night.. ;) | 18:00 |
Kilos- | lol ty | 18:01 |
nsnzero | smile - you will see in the spec that extracting the index is not guaranteed | 18:06 |
smile | nsnzero: the CHM spec on nongnu.org? :p | 18:06 |
nsnzero | the chm is just a bunch on html files , with an index which is compressed with LHZ and complied into the chm file itself | 18:07 |
smile | index != table of contents :p | 18:07 |
smile | index = keyword index = hhk file | 18:07 |
smile | table of contents = hhc file | 18:07 |
smile | it seems to extract the table of contents, but the encoding is wrong o.O | 18:08 |
smile | it's just plain ascii / utf-8 I think.. | 18:08 |
smile | so it shouldn't fail at all | 18:08 |
nsnzero | now you just want to extract the index or hhk file ? | 18:10 |
smile | hhk = index XD | 18:10 |
smile | I want to extract the hhc file | 18:10 |
smile | which is the toc | 18:10 |
smile | ;) | 18:10 |
smile | I've succeeded at it with JavaScript and 7-Zip already :) | 18:11 |
smile | but I'm very interested in the $FIftiMain file: http://www.nongnu.org/chmspec/latest/Internal.html#FIftiMain | 18:11 |
smile | the search cache :) | 18:11 |
smile | chmpane is not using chmlib o.O | 18:12 |
nsnzero | i need to find a chm file to check out | 18:15 |
smile | nsnzero: I'll pass you one :) what's your e-mail address? | 18:18 |
nsnzero | got 1 aready | 18:18 |
smile | okay :) where did you get it? :) I would like to test it as well :) | 18:21 |
nsnzero | sorry smile : from here https://msdn.microsoft.com/en-us/library/windows/desktop/ms669985(v=vs.85).aspx | 18:34 |
nsnzero | right from the source | 18:34 |
inetpro | ai! | 18:36 |
inetpro | Maaz: tell Kilos why you killing our power now as well? | 18:37 |
Maaz | inetpro: Righto, I'll tell Kilos on freenode | 18:37 |
nsnzero | hi inetpro | 18:38 |
smile | nsnzero: thanks | 18:39 |
inetpro | hi nsnzero | 18:39 |
inetpro | city of Tshwane, "Power off due to a 132Kv trip, technicians already attending to it. ETR not yet known." | 18:39 |
smile | ETR => estimated time resolved? ;) | 18:40 |
inetpro | I guess so yes... down since about 18:30 here | 18:41 |
inetpro | or estimated time to recover | 18:41 |
inetpro | or estimated time to resolve | 18:42 |
nsnzero | we had a transformer trip about a week ago - lucky it was about 10pm | 18:45 |
nsnzero | when it blew about 8 months ago it took a week for them to fully restore power | 18:46 |
nsnzero | smile - here is 1 using chmlib https://github.com/jedwing/CHMLib/blob/master/NOTES | 18:52 |
smile | nsnzero: I came across it before, but now I already understand some more of it :) | 18:59 |
smile | I now realize i just can call any chm* function from chmlib.c from within another c program | 18:59 |
smile | let's hope I don't need the source code of "chmlib", and just use the compiled library as available in the repos | 19:00 |
nsnzero | just include chmlib.h aswell | 19:00 |
smile | yeah, but do I need the file "chmlib.h"? or will the C compiler detect "hey, I dont need to have chmlib.h, because I already have the installed chmlib?" | 19:02 |
nsnzero | normally the *.h is the library that pulls the relevant c code into your program | 19:05 |
nsnzero | i havent programmed in c in a long time - and i only use it for Atmel AVR microcontrollers | 19:06 |
smile | I have a directory with chmlib.h and test_chmLib.c in | 19:07 |
smile | [geoffrey@msi-laptop chmlib-tests]$ LANG=C gcc test_chmLib.c -o testchmlib | 19:07 |
smile | /tmp/ccHNORkc.o: In function `main': | 19:07 |
smile | test_chmLib.c:(.text+0x69): undefined reference to `chm_open' | 19:07 |
smile | test_chmLib.c:(.text+0xe9): undefined reference to `chm_resolve_object' | 19:07 |
smile | test_chmLib.c:(.text+0x1b4): undefined reference to `chm_retrieve_object' | 19:07 |
smile | collect2: error: ld returned 1 exit status | 19:07 |
smile | that means it can't import chmlib | 19:07 |
smile | :/ | 19:07 |
smile | it doesn't matter if I have a chmlib.h in the same directory, it fails with the same errors | 19:08 |
nsnzero | include chm_lib.c those missing functions are in there | 19:11 |
smile | nsnzero: did that, no effect :) I found this, what should I do with it? :) | 19:15 |
smile | https://github.com/jedwing/CHMLib/blob/master/src/Makefile.simple | 19:15 |
MaNI | thats a linker error | 19:16 |
smile | I would like to do a ./configure, make, make install, but no such file or command "./configure" | 19:16 |
MaNI | you need to tell the linker to link chmlib | 19:16 |
smile | MaNI: how? | 19:16 |
MaNI | i.e. nothing to do with the header file | 19:16 |
MaNI | gcc test_chmLib.c -o testchmlib -Lchmlib | 19:17 |
MaNI | for example | 19:17 |
smile | [geoffrey@msi-laptop chmlib-tests]$ LANG=C gcc test_chmLib.c -o testchmlib -Lchmlib | 19:17 |
smile | /tmp/cc5KpISp.o: In function `main': | 19:17 |
smile | test_chmLib.c:(.text+0x69): undefined reference to `chm_open' | 19:17 |
smile | test_chmLib.c:(.text+0xe9): undefined reference to `chm_resolve_object' | 19:17 |
smile | test_chmLib.c:(.text+0x1b4): undefined reference to `chm_retrieve_object' | 19:17 |
smile | collect2: error: ld returned 1 exit status | 19:17 |
smile | :| | 19:17 |
smile | chmlib files (installed from repo): /usr/bin/chm_http /usr/bin/enum_chmLib /usr/bin/enumdir_chmLib /usr/bin/extract_chmLib /usr/bin/test_chmLib /usr/include/chm_lib.h /usr/include/lzx.h /usr/lib/libchm.so /usr/lib/libchm.so.0 /usr/lib/libchm.so.0.0.0 | 19:19 |
MaNI | sorry, -lchmlib | 19:20 |
MaNI | -L is for specifying the search path. | 19:20 |
nsnzero | thanks MaNI - i never built with command line gcc before | 19:22 |
MaNI | header file (include) tells it -what- definitions to expect to find, linker has to actually locate those definitions in order to produce a binary that knows how to call them | 19:24 |
MaNI | undefined reference is always a linker error | 19:24 |
smile | :) | 19:24 |
smile | [geoffrey@msi-laptop chmlib-tests]$ LANG=C gcc test_chmLib.c -o testchmlib -lchmlib | 19:24 |
smile | /usr/sbin/ld: cannot find -lchmlib | 19:24 |
smile | collect2: error: ld returned 1 exit status | 19:24 |
smile | not yet there :) | 19:24 |
smile | should I specify the path to the library, instead of the name? | 19:25 |
smile | /usr/lib/libchm.so maybe? | 19:25 |
MaNI | I'm just assuming the name of course, I've never used 'chmlib' so I don't know what it calls itself | 19:25 |
MaNI | if it's named libchm.so then it should just be -lchm | 19:26 |
MaNI | if it's in a custom (non system) path then you need to tell the linker where to find it with e.g. -L/my/custom/folder as well | 19:26 |
* nsnzero goes to read up on C.... again | 19:26 | |
nsnzero | goodnight guys - hope everything works out | 19:27 |
smile | MaNI: you're an angel :D LANG=C gcc test_chmLib.c -o testchmlib -lchm worked | 19:27 |
smile | LANG=C is just added because I could show you the error messages and info messages in English ;) | 19:27 |
superfly | Hello | 19:30 |
smile | I'm leaving, thank you for your support! :) | 19:33 |
smile | bye :) | 19:35 |
nlsthzn | hey superfly , so how is the US? | 20:13 |
* nlsthzn will check for an answer in the morning... bed time :p | 20:15 | |
superfly | nlsthzn: so far, it's a good winter. In general, warmer than South Africa's winter. | 20:16 |
superfly | nlsthzn But I'm in the desert, so that kinda figures | 20:17 |
* inetpro falling asleep | 21:05 | |
inetpro | superfly: take care and have a good rest of the day | 21:06 |
inetpro | good night | 21:07 |
squish102 | just had first snow day and snow is gone :( | 23:41 |
squish102 | !weather charlotte, nc | 23:42 |
squish102 | Maaz weather charlotte, nc | 23:42 |
Maaz | squish102: In Charlotte, North Carolina at 5:52 PM EST on January 07, 2017: -2°C; Humidity: 49%; Wind: NW at 11 km/h; Conditions: Partly Cloudy; Sunrise/set: 7:32 AM EST/5:27 PM EST; Moonrise/set: 1:31 PM EST/2:03 AM EST | 23:42 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!