#linuxcnc-devel | Logs for 2013-09-08

Back
[00:02:38] _ink is now known as toner
[00:05:55] -!- Nick001-shop has quit [Remote host closed the connection]
[00:19:39] -!- NickParker has quit [Quit: Light travels faster then sound, which is why some people appear bright, until you hear them speak]
[01:22:36] -!- c-bob has quit [Ping timeout: 260 seconds]
[01:35:59] -!- tmcw has quit [Remote host closed the connection]
[02:00:39] <andypugh> Well, all moot, I can't mod as s64 by a u32 anyway.
[02:02:43] -!- tjb1 has quit [Quit: Leaving.]
[02:08:57] -!- morlenxus_ has quit [Ping timeout: 240 seconds]
[02:10:57] -!- morlenxus [morlenxus!~morlenxus@enlightenment/developer/morlenxus] has joined #linuxcnc-devel
[02:43:17] -!- archivist_herron has quit [Ping timeout: 248 seconds]
[02:52:35] -!- andypugh has quit [Quit: andypugh]
[02:57:26] root is now known as Guest56359
[03:03:59] Tecan is now known as Nogenhed
[03:07:40] -!- skorasaurus has quit [Ping timeout: 264 seconds]
[03:29:01] -!- Nogenhed has quit [Ping timeout: 246 seconds]
[03:57:43] -!- ve7it has quit [Remote host closed the connection]
[03:58:07] -!- AR_ has quit [Ping timeout: 268 seconds]
[04:11:21] -!- Valen has quit [Quit: Leaving.]
[04:48:29] -!- zzolo has quit [Quit: zzolo]
[05:01:42] -!- Fox_Muldr has quit [Ping timeout: 264 seconds]
[05:12:12] -!- FinboySlick has quit [Quit: Leaving.]
[05:26:53] -!- KimK_1 [KimK_1!~kkirwan@ip68-102-65-151.ks.ok.cox.net] has joined #linuxcnc-devel
[06:04:04] -!- kwallace2 [kwallace2!~kwallace@tmb-234.sonnet.com] has joined #linuxcnc-devel
[06:05:46] -!- kwallace has quit [Ping timeout: 268 seconds]
[06:13:40] -!- psha [psha!~psha@188.65.236.23] has joined #linuxcnc-devel
[06:25:48] -!- gkwhc has quit [Remote host closed the connection]
[06:33:50] -!- mhaberler [mhaberler!~mhaberler@089144206009.atnat0015.highway.bob.at] has joined #linuxcnc-devel
[06:36:51] -!- Laremere has quit [Remote host closed the connection]
[06:55:32] -!- jasen_ has quit [Quit: Page closed]
[06:56:58] -!- kwallace2 [kwallace2!~kwallace@tmb-234.sonnet.com] has parted #linuxcnc-devel
[07:04:09] -!- psha has quit [Ping timeout: 256 seconds]
[07:32:04] -!- vladimirek [vladimirek!~vladimire@95.105.250.72] has joined #linuxcnc-devel
[07:33:55] -!- mrsun_ has quit [Ping timeout: 260 seconds]
[07:35:35] -!- vladimirek has quit [Remote host closed the connection]
[07:45:28] -!- psha [psha!~psha@188.65.236.23] has joined #linuxcnc-devel
[07:46:01] -!- vladimirek [vladimirek!~vladimire@95.105.250.72] has joined #linuxcnc-devel
[07:46:42] -!- vladimirek has quit [Remote host closed the connection]
[07:55:00] -!- mhaberler has quit [Quit: mhaberler]
[08:06:26] -!- mhaberler [mhaberler!~mhaberler@089144206009.atnat0015.highway.bob.at] has joined #linuxcnc-devel
[08:08:53] -!- mhaberler has quit [Client Quit]
[08:31:53] -!- OhmEye has quit [Ping timeout: 240 seconds]
[08:37:51] -!- uw has quit [Ping timeout: 260 seconds]
[11:18:08] -!- stsydow has quit [Remote host closed the connection]
[12:22:45] -!- Lathe_newbie has quit [Read error: Connection reset by peer]
[12:23:58] -!- ktchk [ktchk!~eddie6929@n219079251244.netvigator.com] has joined #linuxcnc-devel
[12:34:48] -!- chillly has quit [Quit: Leaving]
[12:47:39] -!- stsydow has quit [Client Quit]
[13:09:09] <jepler> andypugh: if you're back to needing s64 division and modulo, may I remind you I posted some code for it recently when we were discussing it
[13:09:13] <jepler> still untested :-P
[13:09:50] -!- krusty_ar has quit [Ping timeout: 264 seconds]
[13:25:14] -!- psha has quit [Quit: Lost terminal]
[13:27:42] -!- Jim[work] has quit [Ping timeout: 264 seconds]
[13:35:22] -!- andypugh [andypugh!~andy2@cpc16-basl9-2-0-cust685.20-1.cable.virginmedia.com] has joined #linuxcnc-devel
[13:44:47] -!- i_tarzan has quit [Ping timeout: 256 seconds]
[13:45:56] <jepler> http://emergent.unpythonic.net/files/sandbox/0001-rtapi_math64-signed-versions-untested.patch
[13:46:50] <jepler> afk
[14:01:42] -!- kwallace1 [kwallace1!~kwallace@smb-55.sonnet.com] has joined #linuxcnc-devel
[14:08:20] -!- dosas has quit [Quit: Leaving]
[14:12:04] <andypugh> Ah, I shuld have looked sooner, I just did that. :-)
[14:12:19] -!- Aero-Tec has quit [Ping timeout: 268 seconds]
[14:14:15] <andypugh> The main difference in approach being that you documented it ;-)
[14:40:32] -!- tjb1 has quit [Client Quit]
[14:49:41] -!- mhaberler [mhaberler!~mhaberler@extern-183.stiwoll.mah.priv.at] has joined #linuxcnc-devel
[14:54:19] -!- norbert_ [norbert_!~norbert@a89-182-5-182.net-htp.de] has joined #linuxcnc-devel
[14:57:41] -!- Tecan has quit [Quit: Live Long And Phosphor!]
[14:59:05] -!- kwallace3 [kwallace3!~kwallace@smb-167.sonnet.com] has joined #linuxcnc-devel
[15:00:25] -!- kwallace1 has quit [Ping timeout: 268 seconds]
[15:09:34] <jepler> andypugh: oh well, it was mostly a cut&paste job
[15:10:07] <andypugh> I am somewhat gratified to find that I was on the right track.
[15:10:49] <andypugh> Though I am a bit puzzled as to why we need library functions for simple arithmetic operations.
[15:12:37] <Tom_itx> i doubt many platforms do 64bit math natively
[15:13:39] <Tom_itx> most µC don't anyway
[15:15:29] <archivist> and languages have just assumed platform register size
[15:18:59] -!- psha [psha!~psha@213.208.162.67] has joined #linuxcnc-devel
[15:25:42] -!- mhaberler has quit [Ping timeout: 268 seconds]
[15:26:10] <andypugh> Hi Pavel
[15:28:30] <jepler> andypugh: the x86 doesn't have an instruction that performs s64/s64 division or s64%s64 modulo, so gcc compiles in a call to a special internal function such as __moddi3 and all userspace programs are implicitly linked against a library which includes the implementation of __moddi3
[15:28:40] -!- krusty_ar_ has quit [Ping timeout: 264 seconds]
[15:28:41] <jepler> the kernel doesn't link against this library
[15:29:34] <andypugh> I suppose all data types are a construct of the compiler, really.
[15:29:47] <jepler> instead it requires you to call a function where this arithmetic is required
[15:31:04] <andypugh> It has been an instructive few hours :-)
[15:31:39] <andypugh> And I may have found a bug in the LCD driver code in the process.
[15:31:53] <jepler> another detail is that the kernel functions actually perform math with a 32-bit denominator: s64/s32. in C, if you have an expression where the types are s64 and s32 and you do arithmetic on them, the s32 is promoted to s64. the function version doesn't force this promotion, so it can actually be a smidge more efficient than __divdi3 which has to assume that the denominator could have its high bits set
[15:32:25] <jepler> (in practice that overhead is unimportant--a single test-and-branch--but you know how kernel people are about efficiency)
[15:33:53] <andypugh> Efficiency seems like it should be considered in RT code too.
[15:34:18] <andypugh> Can you have a look at line 500 of src/hal/components/lcd.c ?
[15:34:53] <andypugh> I think it doesn't do what I meant it to do. (It is meant to count decimal digits in a number, I think)
[15:34:55] <jepler> 500 for (c = m + 1 + s; (do_div(tmp, 10)) > 0 ; c++){} //don't have a log10
[15:35:25] -!- mhaberler [mhaberler!~mhaberler@193.228.47.2] has joined #linuxcnc-devel
[15:36:20] <andypugh> I think I have since learned that do_div does a divide-in-place (which is fine here) but returns the remainder, whereas thar code looks to be assuming that the result is returned.
[15:36:31] <jepler> do_div is a macro provided by the kernel. it modifies its first argument, dividing it in-place by the second argument and returning the remainder
[15:36:36] <jepler> http://lxr.free-electrons.com/source/arch/x86/include/asm/div64.h#L10
[15:36:46] <andypugh> for (c = m + 1 + s; do_div(tmp, 10), tmp > 0 ; c++){} //don't have a log10
[15:37:01] <andypugh> Is probably what I wanted
[15:37:57] <andypugh> And I suspect that I never noticed the bug as my typical test numbers were 1.23456789, so it worked.
[15:38:16] -!- syyl has quit [Ping timeout: 264 seconds]
[15:38:50] <jepler> so you really want c += ilog10_ceil(tmp)?
[15:39:04] <jepler> i.e., add 1 for tmp=9, 2 for tmp=10?
[15:39:18] <andypugh> And, in fact, that is just a really perverse way to write: for (c = m + 1 + s; tmp > 0 ; c++){do_div(tmp, 10)} //don't have a log10
[15:39:24] <jepler> (add 1 for tmp=0?)
[15:39:49] <andypugh> Yes.
[15:40:25] -!- mhaberler has quit [Quit: mhaberler]
[15:40:44] -!- zzolo has quit [Quit: zzolo]
[15:41:13] <andypugh> Are you saying that there is a log10?
[15:41:21] <jepler> no
[15:41:51] <andypugh> And it is likely that that loop is faster than finding the log too.
[15:44:00] <andypugh> Anyway, I am just checking that the code is wrong in the way i think it is. I am pretty sure that my plan wasn't to find the first zero digit.
[15:44:12] <jepler> yeah
[15:44:23] <jepler> I'm working on writing ilog10_ceil so you can just incorporate it and call it..
[15:44:27] <jepler> but so far I've got it wrong :-P
[15:44:33] <jepler> ilog10_ceil(9) -> 64
[15:45:18] <andypugh> Is there any point making it into a function call? It doesn't look like anyone else has ever wanted it.
[15:46:14] <jepler> when I get stuck I like to assume there's a function that does what I want and just write a call to it
[15:46:32] <jepler> ilog10_ceil is such a function; I can even imagine what its implementation might look like
[15:46:33] <andypugh> (and note that it needs to work with u64
[15:46:55] <jepler> and when it is a function I can also test it
[15:47:09] <jepler> http://emergent.unpythonic.net/files/sandbox/ilog10_ceil.c
[15:49:01] <jepler> 64-bit abs is called llabs in userspace and abs64 in kernel space :-/
[15:49:08] -!- mhaberler [mhaberler!~mhaberler@extern-183.stiwoll.mah.priv.at] has joined #linuxcnc-devel
[15:49:17] <jepler> http://lxr.free-electrons.com/source/include/linux/kernel.h#L173
[15:50:30] <jepler> so maybe we want rtapi_abs64, which could also go in rtapi_math64.h if you wanted
[15:50:32] <andypugh> while(v >= c) { c *= 10; r++; } is closer to what I think I wanted.
[15:50:42] -!- amaldo has quit [Read error: Connection reset by peer]
[15:51:02] <jepler> yeah you're right
[15:51:14] <jepler> I didn't get around to writing the part where I actually checked that the result was what I thought it should be
[15:51:25] <jepler> so it's not exactly _ceil is it
[15:51:37] <jepler> isn't it 1 + ilog10_floor then?
[15:51:49] <andypugh> Maybe :-)
[15:51:55] <jepler> call it ndigits and forget it
[15:52:01] <andypugh> Quite.
[15:52:17] <andypugh> ndigits(value, base)
[15:53:09] <andypugh> I will make a note of the fact there is a bug to fix, but I am in the middle of other stuffs at the moment.
[15:55:29] <jepler> OK
[15:55:41] <jepler> yeah, you could generalize it to other bases if you wanted
[15:56:27] <jepler> incidentally I chose to write in terms of * because usually integer * is faster than /
[15:57:47] -!- jthornton [jthornton!~john@198.45.190.160] has joined #linuxcnc-devel
[16:00:57] <andypugh> Yes, I saw that and recognised it as a better solution.
[16:01:35] <andypugh> Also no pesky __divdi3 I suspect?
[16:03:02] -!- TheFinalTac has quit [Ping timeout: 240 seconds]
[16:10:24] -!- stsydow has quit [Remote host closed the connection]
[16:11:56] <jepler> it looks like x86 assembles u64*u32 inline
[16:13:01] <jepler> it looks like the kernel provides __muldi3 for architectures where it's needed, e.g., http://lxr.free-electrons.com/source/arch/microblaze/lib/muldi3.c#L46
[16:14:10] <andypugh> It seems wrong that it is all in terms of the vaguely ambiguous "long" "short" and "long long"
[16:15:00] <Tom_itx> long is different on different platforms too
[16:15:45] <andypugh> That's my point.
[16:16:01] <Tom_itx> welcome to c
[16:16:53] <jepler> if you mean that specific implementation of __muldi3, that is platform specific and on that platform "long long" is dimode
[16:17:14] <jepler> http://gcc.gnu.org/onlinedocs/gccint/Libgcc.html
[16:18:20] <jepler> DImode
[16:18:20] <jepler> “Double Integer” mode represents an eight-byte integer.
[16:18:23] <jepler> http://gcc.gnu.org/onlinedocs/gccint/Machine-Modes.html#Machine-Modes
[16:19:10] <andypugh> "Please sir, can I be excused? My brain is full"
[16:22:52] -!- amaldo has quit [Changing host]
[16:28:40] -!- mhaberler has quit [Ping timeout: 264 seconds]
[16:29:06] _BJFreeman is now known as BJfreeman
[16:37:19] <norbert_> darumist
[16:50:05] -!- Loetmichel has quit [Ping timeout: 256 seconds]
[16:53:46] -!- adb [adb!~IonMoldom@47-122.1-85.cust.bluewin.ch] has joined #linuxcnc-devel
[16:58:26] -!- amaldo has quit [Ping timeout: 264 seconds]
[16:59:33] Cylly is now known as Loetmichel
[16:59:43] -!- Tom_itx has quit [Read error: Connection reset by peer]
[17:00:09] -!- zlog has quit [Read error: Connection reset by peer]
[17:03:22] -!- zlog [zlog!~zlog@ip68-102-199-165.ks.ok.cox.net] has joined #linuxcnc-devel
[17:13:36] -!- ktchk [ktchk!~eddie6929@n219079251244.netvigator.com] has parted #linuxcnc-devel
[17:17:28] -!- Logi has quit [Read error: Connection reset by peer]
[17:18:14] -!- mhaberler [mhaberler!~mhaberler@extern-183.stiwoll.mah.priv.at] has joined #linuxcnc-devel
[17:50:00] -!- BJfreeman has quit [Ping timeout: 268 seconds]
[17:53:58] -!- mhaberler has quit [Quit: mhaberler]
[18:00:35] -!- mhaberler [mhaberler!~mhaberler@macbook.stiwoll.mah.priv.at] has joined #linuxcnc-devel
[18:07:19] -!- Servos4ever has quit [Quit: ChatZilla 0.9.90.1 [SeaMonkey 2.20/20130803195701]]
[18:08:15] -!- IchGuckLive has quit [Quit: ChatZilla 0.9.87 [Firefox 20.0/20130329043827]]
[18:09:38] -!- mhaberler has quit [Quit: mhaberler]
[18:13:03] -!- mhaberler [mhaberler!~mhaberler@macbook.stiwoll.mah.priv.at] has joined #linuxcnc-devel
[18:13:51] -!- amaldo has quit [Read error: Connection reset by peer]
[18:15:35] -!- joe9 has quit [Remote host closed the connection]
[18:19:57] -!- syyl_ws has quit [Quit: Verlassend]
[18:22:48] -!- Thetawaves_ has quit [Quit: This computer has gone to sleep]
[18:26:43] -!- psha has quit [Quit: Lost terminal]
[18:32:54] -!- Lathe_newbie has quit [Ping timeout: 264 seconds]
[18:40:22] -!- norbert_ has quit [Quit: Verlassend]
[18:43:10] -!- Tom_itx [Tom_itx!~Tl@unaffiliated/toml/x-013812] has joined #linuxcnc-devel
[18:59:27] -!- Nick001 has quit [Ping timeout: 260 seconds]
[19:21:32] -!- elsurudo has quit [Quit: elsurudo]
[19:30:00] -!- tmcw has quit [Remote host closed the connection]
[19:35:18] -!- tmcw has quit [Ping timeout: 264 seconds]
[19:54:23] -!- Netlynx has quit [Quit: Ex-Chat]
[19:57:43] -!- afiber__ has quit [Quit: Konversation terminated!]
[20:07:17] -!- false has quit [Ping timeout: 256 seconds]
[20:08:04] -!- dosas has quit [Quit: Leaving]
[20:09:28] -!- lynnroth has quit [Read error: Connection reset by peer]
[20:10:41] <KGB-linuxcnc> 03nieson 05master af387dd 06linuxcnc 10(109 files in 12 dirs) * gmoccapy_0_9_7_1 - reordered all files to follow the new gscreen structure
[20:10:41] <KGB-linuxcnc> 03nieson 05master 125f811 06linuxcnc 10(11 files in 2 dirs) * gmoccapy 0.9.7.1 - New file structure according to gscreen needs
[20:11:18] -!- tmcw has quit [Ping timeout: 264 seconds]
[20:13:47] -!- l0ggy_ has quit [Ping timeout: 245 seconds]
[20:13:47] -!- jdh has quit [Ping timeout: 245 seconds]
[20:13:49] -!- doobeh has quit [Remote host closed the connection]
[20:35:21] -!- Tecan has quit [Remote host closed the connection]
[20:42:28] -!- tmcw has quit [Ping timeout: 264 seconds]
[20:45:50] <KGB-linuxcnc> 03jepler 05master 6018a79 06linuxcnc 10docs/man/man3/rtapi_div_u64.3rtapi 10src/rtapi/rtapi_math64.h * rtapi_math64: signed versions. (Seem to work, ap)
[20:45:50] <KGB-linuxcnc> 03andypugh 05master 68fab3f 06linuxcnc 10src/hal/drivers/mesa-hostmot2/ 10hostmot2.h 10sserial.c 10sserial.h
[20:45:51] <KGB-linuxcnc> Add index, reset and scaled position to the smart-serial encoders.
[20:45:54] <KGB-linuxcnc> The encoders on the 7i73 HMI card are different from the standard counters
[20:45:56] <KGB-linuxcnc> and report a count back to the FPGA card directly. In this sense they
[20:45:59] <KGB-linuxcnc> look more like an absolute encoder.
[20:46:02] <KGB-linuxcnc> So much like an absolute encoder that this change is part of using this
[20:46:05] <KGB-linuxcnc> code to handle the BISS / SSI encoder modules.
[20:46:07] <KGB-linuxcnc> Signed-off-by: Andy Pugh <andy@bodgesoc.org>
[20:56:54] -!- mhaberler has quit [Quit: mhaberler]
[20:59:25] -!- tmcw has quit [Remote host closed the connection]
[21:00:31] -!- tmcw has quit [Read error: Connection reset by peer]
[21:01:10] -!- Nick001-shop has quit [Ping timeout: 268 seconds]
[21:02:49] -!- atom1 has quit [Changing host]
[21:03:53] -!- DJ9DJ has quit [Quit: bye]
[21:04:08] -!- atom1 has quit [Client Quit]
[21:09:09] -!- elsurudo has quit [Client Quit]
[21:09:37] -!- dosas has quit [Quit: Leaving]
[21:15:11] -!- chillly has quit [Quit: Leaving]
[21:17:21] -!- tmcw_ has quit [Remote host closed the connection]
[21:22:45] -!- tmcw has quit [Ping timeout: 268 seconds]
[21:33:28] -!- rob_h [rob_h!~rob_h@94.8.129.239] has joined #linuxcnc-devel
[21:34:36] <KGB-linuxcnc> 03chrisinnanaimo 05master e83ee8c 06linuxcnc 10src/emc/usr_intf/gscreen/gscreen.py * gscreen -add audio_available to the data array
[21:34:36] <KGB-linuxcnc> 03chrisinnanaimo 05master 28d31c2 06linuxcnc 10src/emc/usr_intf/gscreen/gscreen.py * gscreen -add paths to data vatiable
[21:34:40] <KGB-linuxcnc> 03chrisinnanaimo 05master c8783c5 06linuxcnc 10src/emc/usr_intf/gscreen/gscreen.py * gscreen -fix a spelling mistake no other changes intended