#linuxcnc-devel | Logs for 2014-09-18

Back
[00:02:53] -!- Nick001-shop has quit [Quit: ChatZilla 0.9.90.1 [Firefox 30.0/20140605174243]]
[00:03:33] -!- the_wench has quit [Ping timeout: 272 seconds]
[00:03:52] -!- asdfasd has quit [Ping timeout: 240 seconds]
[00:04:22] -!- archivist_herron has quit [Ping timeout: 245 seconds]
[00:04:53] -!- archivist has quit [Ping timeout: 260 seconds]
[00:06:33] -!- PCW has quit [Remote host closed the connection]
[00:06:56] -!- PCW [PCW!~chatzilla@99.88.10.65] has joined #linuxcnc-devel
[00:07:38] -!- Guest87016 has quit [Read error: Connection reset by peer]
[00:11:20] -!- sumpfralle has quit [Ping timeout: 258 seconds]
[00:12:03] -!- archivist [archivist!~archivist@host81-149-189-98.in-addr.btopenworld.com] has joined #linuxcnc-devel
[00:25:31] -!- sumpfralle has quit [Ping timeout: 258 seconds]
[00:33:52] -!- asdfasd has quit [Ping timeout: 240 seconds]
[00:38:01] -!- PetefromTn_ has quit [Read error: Connection reset by peer]
[00:43:55] -!- PetefromTn_ has quit [Ping timeout: 258 seconds]
[00:43:56] -!- Mark___ has quit [Quit: Page closed]
[00:50:29] -!- micges-dev has quit [Quit: Wychodzi]
[00:54:40] -!- PetefromTn_ has quit [Quit: I'm Outta here!!]
[00:59:01] -!- maZer`- has quit [Client Quit]
[00:59:09] -!- revo14 has quit [Remote host closed the connection]
[01:02:57] -!- Servos4ever has quit [Quit: ChatZilla 0.9.90.1 [SeaMonkey 2.26.1/20140612173529]]
[01:05:16] -!- ve7it [ve7it!~LawrenceG@S01060014d19d0b68.pk.shawcable.net] has joined #linuxcnc-devel
[01:14:37] -!- nofxx has quit [Remote host closed the connection]
[01:19:53] -!- timbrell has quit [Quit: Page closed]
[01:21:32] -!- BellinganRoy has quit [Quit: Konversation terminated!]
[01:29:40] -!- ries has quit [Quit: ries]
[01:43:43] -!- syyl has quit [Ping timeout: 258 seconds]
[01:59:00] -!- andypugh has quit [Quit: andypugh]
[01:59:28] -!- rythmnbls has quit [Quit: Leaving]
[02:04:49] -!- alexchally has quit [Ping timeout: 260 seconds]
[02:10:39] -!- asah has quit [Quit: asah]
[02:13:50] <NTU> no rule to make target deb-pkg.. it worked before..
[02:14:20] <NTU> maybe thats only for kernels..
[02:15:18] <NTU> whats the automagic way for non-kernels is what i want to know..
[02:20:02] -!- patrickarlt has quit [Client Quit]
[02:38:09] -!- archivist_herron has quit [Ping timeout: 258 seconds]
[02:48:37] -!- AR_ has quit [Ping timeout: 245 seconds]
[03:15:41] -!- sirdancealot has quit [Ping timeout: 272 seconds]
[03:19:45] -!- Tecan has quit [Changing host]
[03:29:53] -!- anth0ny has quit [Quit: anth0ny]
[03:33:21] -!- HeXiLeD has quit [Ping timeout: 258 seconds]
[03:33:41] -!- HeXiLeD has quit [Changing host]
[03:53:36] -!- FinboySlick has quit [Remote host closed the connection]
[04:05:21] -!- tjtr33 has quit [Quit: Leaving]
[04:07:25] -!- kwallace2 [kwallace2!~kwallace@smb-102.sonnet.com] has joined #linuxcnc-devel
[04:09:31] -!- kwallace has quit [Ping timeout: 272 seconds]
[04:10:45] -!- anth0ny has quit [Quit: anth0ny]
[04:12:18] -!- PetefromTn_ has quit [Quit: I'm Outta here!!]
[04:12:50] -!- jerryitt_ has quit [Quit: Connection closed for inactivity]
[04:15:57] -!- WalterN has quit [Ping timeout: 260 seconds]
[04:28:49] -!- ju_emb [ju_emb!~jgnoss@2001:1388:1b8a:86fe:38e6:7ed0:1c5e:b812] has parted #linuxcnc-devel
[04:30:05] -!- ve7it has quit [Remote host closed the connection]
[04:32:22] -!- `Nerobro has quit [Ping timeout: 240 seconds]
[04:44:28] -!- anth0ny has quit [Quit: anth0ny]
[04:45:24] amatecha_ is now known as amatecha
[04:47:22] -!- HeXiLeD has quit [Ping timeout: 240 seconds]
[05:01:30] -!- Fox_Muldr has quit [Ping timeout: 255 seconds]
[05:08:11] -!- i_tarzan has quit [Ping timeout: 272 seconds]
[05:10:57] -!- mozmck has quit [Ping timeout: 255 seconds]
[05:18:06] -!- mozmck [mozmck!~moses@67.210.159.245] has joined #linuxcnc-devel
[06:00:19] -!- mariusl [mariusl!~marius@105-208-54-141.access.mtnbusiness.co.za] has joined #linuxcnc-devel
[06:00:31] -!- kwallace2 [kwallace2!~kwallace@smb-102.sonnet.com] has parted #linuxcnc-devel
[06:16:19] -!- the_wench [the_wench!~the_wench@host81-149-189-98.in-addr.btopenworld.com] has joined #linuxcnc-devel
[06:35:26] -!- dan2k3k4 has quit [Ping timeout: 258 seconds]
[07:04:15] -!- rigid has quit [Ping timeout: 246 seconds]
[07:09:25] -!- erictheise has quit [Quit: erictheise]
[07:10:16] -!- rigid has quit [Changing host]
[07:31:18] -!- marmite has quit [Ping timeout: 250 seconds]
[07:35:24] -!- the_wench has quit [Ping timeout: 246 seconds]
[07:39:41] -!- robbiet480 has quit [*.net *.split]
[07:39:42] -!- dagjomar has quit [*.net *.split]
[07:39:57] -!- gambakufu has quit [Ping timeout: 246 seconds]
[07:40:15] -!- micges-dev [micges-dev!~x@aeia97.neoplus.adsl.tpnet.pl] has joined #linuxcnc-devel
[07:41:43] -!- the_wench [the_wench!~the_wench@host81-149-189-98.in-addr.btopenworld.com] has joined #linuxcnc-devel
[07:41:46] -!- gonzo_nb has quit [Remote host closed the connection]
[07:42:24] -!- steves_logging has quit [Ping timeout: 246 seconds]
[07:51:39] -!- ktchk [ktchk!~eddie6929@n219079251066.netvigator.com] has joined #linuxcnc-devel
[07:52:54] -!- karavanjo has quit [Ping timeout: 246 seconds]
[07:54:22] -!- ktchk [ktchk!~eddie6929@n219079251066.netvigator.com] has parted #linuxcnc-devel
[07:55:28] -!- tronwizard has quit [Ping timeout: 272 seconds]
[07:55:54] -!- asah has quit [Quit: asah]
[07:57:09] -!- Connor has quit [Ping timeout: 260 seconds]
[07:58:33] -!- WyrM has quit [Ping timeout: 272 seconds]
[08:00:21] -!- WyrM has quit [Changing host]
[08:06:43] -!- WyrM has quit [Read error: Connection reset by peer]
[08:26:28] -!- archivist_herron has quit [Ping timeout: 260 seconds]
[08:31:19] -!- rob_h [rob_h!~robh@2.223.235.128] has joined #linuxcnc-devel
[08:43:22] -!- Thetawaves has quit [Quit: This computer has gone to sleep]
[09:05:27] -!- syyl_ws has quit [Remote host closed the connection]
[09:07:48] leaf__ is now known as Guest82287
[09:09:18] -!- phantoxe has quit [Remote host closed the connection]
[09:10:35] -!- Valen has quit [Remote host closed the connection]
[09:15:57] -!- phantoxe has quit [Remote host closed the connection]
[09:31:16] -!- phantoxe has quit [Remote host closed the connection]
[09:48:36] -!- dan2k3k4 has quit [Ping timeout: 255 seconds]
[10:02:17] -!- sumpfralle has quit [Ping timeout: 272 seconds]
[10:08:13] -!- sirdancealot has quit [Ping timeout: 260 seconds]
[10:36:07] -!- mariusl has quit []
[10:36:15] -!- skunkworks_ has quit [Ping timeout: 272 seconds]
[10:37:24] -!- mhaberler has quit [Ping timeout: 246 seconds]
[10:37:28] -!- phantone has quit []
[11:02:08] -!- pingufan has quit [Quit: Konversation terminated!]
[11:04:29] -!- ashcan_ has quit [Client Quit]
[11:11:26] -!- Guest82287 has quit [Quit: Page closed]
[11:12:45] -!- dan2k3k4 has quit [Ping timeout: 246 seconds]
[11:16:31] -!- skunkworks [skunkworks!~skunkwork@68-115-41-210.static.eucl.wi.charter.com] has joined #linuxcnc-devel
[11:27:21] -!- almccon has quit [Read error: Connection reset by peer]
[11:29:05] -!- Valen has quit [Quit: Leaving.]
[11:30:20] -!- tronwzrd has quit [Ping timeout: 260 seconds]
[11:32:10] -!- almccon has quit [Read error: Connection reset by peer]
[11:38:37] -!- steves_logging [steves_logging!~Steve@wsip-70-168-134-18.dc.dc.cox.net] has joined #linuxcnc-devel
[11:39:22] -!- rigid has quit [Ping timeout: 245 seconds]
[11:49:17] -!- ries has quit [Quit: ries]
[12:00:40] -!- Loetmichel has quit [Ping timeout: 260 seconds]
[12:03:12] -!- skunkworks has quit [Ping timeout: 245 seconds]
[12:07:32] -!- Tecan has quit [Ping timeout: 272 seconds]
[12:07:34] <jepler> NTU: "debuild" is the command I invoke in a debianized source tree. behind the scenes it invokes dpkg-buildpackage.
[12:07:38] <jepler> and other things
[12:35:12] -!- syyl has quit [Ping timeout: 260 seconds]
[12:39:38] <jepler> huh, over half the commits in our git are *not* on the master branch
[12:39:38] <jepler> $ git rev-list origin/master | wc
[12:39:38] <jepler> 15707 15707 643987
[12:39:38] <jepler> $ git rev-list --all ^origin/master | wc
[12:39:38] <jepler> 14955 14955 613155
[12:39:58] <jepler> er, nearly half
[12:47:03] -!- rythmnbls [rythmnbls!~rythmnbls@204.186.88.34] has joined #linuxcnc-devel
[12:48:14] ttuner is now known as toxx
[12:58:10] -!- md-2 has quit [Remote host closed the connection]
[12:59:28] -!- balestrino has quit [Ping timeout: 260 seconds]
[13:03:11] Cylly is now known as Loetmichel
[13:04:47] -!- dan2k3k4 has quit [Read error: Connection reset by peer]
[13:13:48] <jepler> on the odroid, "opengl es" is accelerated, but standard (classic?) opengl isn't. unfortunately, "opengl es" does not have a wire protocol; it's for local display only
[13:14:05] <cradek> oh ick.
[13:14:39] -!- pingufan has quit [Quit: Konversation terminated!]
[13:16:18] -!- chillly has quit [Quit: Ex-Chat]
[13:17:47] <jepler> I'm also not sure at what point opengl es started being accelerated on linux boxes where opengl is accelerated. On my debian jessie laptop with intel graphics, opengl es is shown as accelerated.
[13:18:59] <jepler> libgles1-mesa-dev is not on 10.04
[13:20:49] <jepler> and on my debian wheezy desktop with nvidia, opengl es is not accelerated
[13:21:05] <jepler> so even if I can make axis able to use either one, it'll also have to figure out which one to use
[13:22:48] <cradek> it would be nice to know what the situation will be like in a few years
[13:23:37] <jepler> ooh wikipedia says: > For full compatibility with OpenGL on ES-only devices, Nvidia offers a BSD licensed library called Regal
[13:23:49] <cradek> ooh!
[13:24:14] -!- md-2 has quit [Remote host closed the connection]
[13:24:18] <jepler> https://github.com/p3/regal
[13:24:36] <jepler> Compatible
[13:24:36] <jepler> Immediate mode, fixed function, GL_QUADS work everywhere, emulated as necessary.
[13:24:44] <jepler> I'll be taking a good look at this
[13:25:31] <jepler> still for odroid I might need to figure out how to switch between regal and glx at runtime, blah
[13:26:58] -!- micges-dev has quit [Quit: Wychodzi]
[13:29:25] -!- md-2 has quit [Ping timeout: 260 seconds]
[13:34:44] -!- anth0ny has quit [Quit: anth0ny]
[13:36:32] -!- micges-dev [micges-dev!~x@aeia97.neoplus.adsl.tpnet.pl] has joined #linuxcnc-devel
[14:03:44] -!- jduhls has quit [Ping timeout: 255 seconds]
[14:04:37] -!- lmpyspaceprncs has quit []
[14:10:51] -!- txp has quit [Quit: Leaving]
[14:15:11] -!- sumpfralle has quit [Client Quit]
[14:19:17] -!- kwallace [kwallace!~kwallace@smb-231.sonnet.com] has joined #linuxcnc-devel
[14:23:33] -!- sirdancealot has quit [Ping timeout: 255 seconds]
[14:35:58] -!- benoit__ has quit [Remote host closed the connection]
[14:51:30] -!- BellinganRoy has quit [Quit: Konversation terminated!]
[14:57:06] -!- amiri has quit [Read error: Connection reset by peer]
[15:06:29] -!- Roguish [Roguish!~chatzilla@c-67-188-44-176.hsd1.ca.comcast.net] has joined #linuxcnc-devel
[15:08:45] -!- anth0ny has quit [Quit: anth0ny]
[15:26:10] -!- anth0ny has quit [Quit: anth0ny]
[15:34:58] <NTU> how do you automatically debianize a tree like deb-pkg though..
[15:35:18] <NTU> deb-pkg works flawlessly yet it seems to only want to work with kernels
[15:47:25] <cradek> there is no such thing as automatic -- that only works because someone worked hard on it
[15:47:51] <cradek> for other trees, see the debianizing introduction/howto I linked to yesterday
[15:57:18] -!- ITChap has quit [Ping timeout: 246 seconds]
[15:57:24] -!- skunkworks [skunkworks!~skunkwork@68-115-41-210.static.eucl.wi.charter.com] has joined #linuxcnc-devel
[15:57:41] -!- Connor [Connor!~Connor@24.214.127.194] has joined #linuxcnc-devel
[16:07:59] -!- mhaberler has quit [Client Quit]
[16:08:32] <mozmck> NTU: look up make-kpkg
[16:14:16] -!- patrickarlt has quit [Ping timeout: 258 seconds]
[16:17:54] -!- PetefromTn_ has quit [Quit: I'm Outta here!!]
[16:20:41] -!- rob_h has quit [Ping timeout: 260 seconds]
[16:26:36] <skunkworks> quite a few days at 16us...
[16:38:03] H3XIL3D is now known as hexiled
[16:38:15] -!- hexiled has quit [Changing host]
[16:42:39] -!- ktchk [ktchk!~eddie6929@n219079180021.netvigator.com] has joined #linuxcnc-devel
[16:42:45] -!- dr0w has quit [Quit: Leaving]
[16:43:01] <pcw_home_> man that guy with the lathe has his troubles
[16:43:34] <cradek> he just needs to stop running pncconf and troubleshoot
[16:43:55] <pcw_home_> Yeah pncconf using machine on for spindle enable is not right
[16:44:08] <cradek> I have no idea what he means when he says he "gets absolutely no movement"
[16:44:39] <pcw_home_> no idea either
[16:44:53] <cradek> there are a LOT of spindle signals to worry about
[16:45:09] <pcw_home_> yeah
[16:45:16] <cradek> there are many (redundant) outputs and several inputs that have to be right
[16:45:35] <cradek> you can easily get some kinds of motion and not other kinds, if you have some inputs right but not others
[16:45:49] <cradek> but you already know this, sorry
[16:46:42] <cradek> I bet a lathe is a hard first retrofit
[16:46:45] -!- Deejay has quit [Quit: brb]
[16:47:57] <pcw_home_> Yeah, also weird that there's a high res encoder with only A
[16:51:12] <pcw_home_> at one time there was a bug in the hostmot2 driver where 1 /= true but I _think_ that was fixed
[16:58:03] -!- mhaberler has quit [Quit: mhaberler]
[17:05:32] -!- Lathe_newbie has quit [Ping timeout: 255 seconds]
[17:06:04] -!- md-2 has quit [Remote host closed the connection]
[17:10:52] -!- md-2 has quit [Ping timeout: 240 seconds]
[17:13:39] -!- erve has quit []
[17:15:53] -!- sumpfralle has quit [Ping timeout: 272 seconds]
[17:16:45] -!- patricka_ has quit [Ping timeout: 258 seconds]
[17:17:22] -!- ktchk has quit [Ping timeout: 240 seconds]
[17:46:40] <micges-dev> it was fixed
[17:51:22] -!- schimmi has quit [Ping timeout: 272 seconds]
[18:02:51] -!- almccon has quit [Ping timeout: 272 seconds]
[18:03:55] <pcw_home_> I think most bugs that guy has are pncconf bugs
[18:11:29] -!- ve7it [ve7it!~LawrenceG@S01060014d19d0b68.pk.shawcable.net] has joined #linuxcnc-devel
[18:17:18] -!- skorasaurus has quit [Read error: Connection reset by peer]
[18:19:28] -!- rob_h [rob_h!~robh@2.223.235.128] has joined #linuxcnc-devel
[18:38:03] -!- PetefromTn_ has quit [Quit: I'm Outta here!!]
[18:38:12] -!- i_tarzan has quit [Ping timeout: 245 seconds]
[18:41:20] -!- skunkworks has quit [Read error: Connection reset by peer]
[18:45:22] -!- darthrake has quit [Ping timeout: 240 seconds]
[18:45:49] -!- asah has quit [Client Quit]
[18:53:17] -!- toner has quit [Ping timeout: 260 seconds]
[18:54:03] -!- eFuchs has quit [Ping timeout: 272 seconds]
[19:03:24] -!- darthrake [darthrake!~darthrake@yasit.net] has joined #linuxcnc-devel
[19:03:32] -!- PCW_ [PCW_!~chatzilla@99.88.10.65] has joined #linuxcnc-devel
[19:05:27] -!- PCW has quit [Ping timeout: 272 seconds]
[19:05:41] PCW_ is now known as PCW
[19:07:14] <CaptHindsight> http://www.3ders.org/articles/20140917-flx-arm-low-cost-scara-robotic-arm-for-3d-printing.html I'd call it the "T-Slot-Bot"
[19:08:03] <CaptHindsight> $1,799
[19:08:06] -!- tomkralidis has quit [Quit: leaving]
[19:09:49] <CaptHindsight> closed-loop motion control platform with integrated ultra-high resolution optical encoders for feedback
[19:11:28] <CaptHindsight> Synchronous Motion at Pulse Rates up to 1 MHz , ARM Cortex M4 with FPGA
[19:11:46] <jepler> did you see the video going around of the "3d printer" on wheels? long long ago I contemplated "rckins", kinematics for an RC car, but never figured out how that might work.
[19:12:48] <kwallace> Python is doing something I didn't expect. I am making a list of Z locations. z_list = [z_start], loop z_list.append(z_start + z_DoC * i), z_list.append(z_end). I start and end with the user entered value in order to make sure I get the exact value. The problem is that for a z_end of .2 prints on its own as 0.2 but from the list as 0.1999999999999999999999999 or for other values 0.x0000000000000000000001 . It doesn't matter much but my mind
[19:12:49] <CaptHindsight> it's like every project wants to use a micro vs a PC
[19:13:41] <cradek> kwallace: never use floating point values as loop iterators
[19:13:58] -!- txp has quit [Remote host closed the connection]
[19:14:03] <cradek> kwallace: use an integer to get the number of counts, then use multiplication of the loop counter to get the floating point value you want
[19:14:15] <jepler> floating point arithmetic has many ways to trip up the unwary
[19:14:52] <seb_kuzminsky> kwallace: http://www.smbc-comics.com/?id=2999
[19:14:56] <jepler> trying to make a list of [0, 0.1, 0.2, 0.3, ..., 1.0] is among them
[19:18:35] <jepler> >>> .1 * 3 == .3
[19:18:36] <jepler> False
[19:19:01] <cradek> >>> .1 * 2 == .2
[19:19:01] <cradek> True
[19:19:17] <kwallace> i is an integer from "i += 1", z_DoC (float) is adjusted from the user value to get equal cuts between start and end.
[19:20:11] <jepler> and this is not Python's "fault". For example, perl has the same behavior
[19:20:14] <jepler> $ perl -e '(.1 * 3 == .3) or die "arithmetic"'
[19:20:18] <jepler> arithmetic at -e line 1.
[19:21:29] <cradek> for machining, and in most applications, those differences don't matter at all
[19:21:46] <jepler> anyway, maybe you'd like to use something like this 'frange' function: http://pastie.org/9573323
[19:21:58] <cradek> just make sure you get the right number of iterations (don't guess when to stop by comparing accumulated floating point values)
[19:22:20] <jepler> cradek: when it comes to choosing the depths to machine at, there's a lot of difference between the last passes being at 0.8, 0.9 and 1.0; or being at 0.9, 0.9999999, and 1.0
[19:22:37] <cradek> surely
[19:23:38] <kwallace> That's why I put the user or known accurate value at the end of the list rather than an iterated one.
[19:24:05] <cradek> yes that's a good idea
[19:24:16] <jepler> that's what my proposed code did as well
[19:24:19] <cradek> but don't use floating point tests to figure out whether the one before that was the last one you should have added
[19:25:38] <kwallace> The problem is that the z_doc_list.append(my_user_z_end) prints our 0.20000000000001 instead of printing my_user_z_end before appending.
[19:25:44] <cradek> (maybe you should share the exact loop code)
[19:26:17] <kwallace> Yeah, processing ...
[19:27:01] <jepler> kwallace: particularly in Python 2.6 and earlier, Python frequently prints "excess" digits of precision on floating-point numbers. That is, it prints more digits than are required to satisfy the identity float(repr(x)) == x
[19:27:28] <jepler> in python 2.7 that is no true, and the repr of a float is 'the shortest decimal string that’s guaranteed to round back to x'
[19:27:49] <jepler> so for example where python 2.6 prints 0.29999999999999999, python 2.7 prints 0.3
[19:27:56] <jepler> well, where it repr()s that value
[19:28:15] <jepler> print x and print [x] are different, because when a list is printed, it is the *repr* of each item that is printed, rather than the *str*
[19:29:38] -!- skunkworks_ [skunkworks_!~chatzilla@str-broadband-ccmts-ws-26.dsl.airstreamcomm.net] has joined #linuxcnc-devel
[19:30:55] <jepler> I'll stop trying to explain just in case I'm explaining entirely the wrong thing
[19:31:37] <kwallace> Oops. now I need to read back. Some of the code is here: http://wallacecompany.com/tmp/python_puzzle.txt
[19:32:10] <jepler> int((z_range / z_doc) + .99)
[19:32:16] <jepler> it looks like you want int(ceil(z_range / z_doc))
[19:32:39] <jepler> ceil(x) is first number >= x which is exactly an integer
[19:33:22] <jepler> though the difference between int(ceil(x)) and int(x+.99) is probably not related to the present vexation
[19:33:29] <kwallace> That's a fudge so that if a user enters .1 DoC and .3 range we get 3 passes when adjusted.
[19:33:44] <kwallace> instead of four.
[19:34:55] <jepler> instead of z_cnt = 1 ... while z_cnt ... z_cnt += 1, use 'for z_cnt in range'
[19:35:36] <jepler> your algorithm is basically the one I suggested, but it's not written as very idiomatic Python
[19:36:13] <jepler> so unless there's a flaw in your code I'm overlooking, it's your expectations about how Python displays floating-point numbers that need to be adjusted
[19:37:20] -!- patrickarlt has quit [Remote host closed the connection]
[19:37:23] <jepler> and, if the output "--kw pocket rect z_doc_list =" is going to be consumed by humans at least sometimes, then you probably want to format the floating-point numbers to a reasonable number of decimal places
[19:39:04] <jepler> such as by a function like make_me_pretty: http://pastie.org/9573388
[19:43:04] <kwallace> "for z_cnt in range" gives the same result, so just a style thing I guess.
[19:43:45] <kwallace> anything "--kw ...." is just for debugging.
[19:45:17] <jepler> well, then I guess we're back to: modify your expectations about floating-point numbers so that you are no longer surprised if 3 * .1 is not the same as .3, and if one or both of them print with lots of "excess" digits of precision.
[19:45:49] <cradek> I have lost track of the original question (if I ever understood it)
[19:46:43] <jepler> cradek: I think the original problem can be restated as 'I expected these both to print a nice round value':
[19:46:46] <jepler> >>> print .2
[19:46:48] <jepler> 0.2
[19:46:51] <jepler> >>> print [.2]
[19:46:53] <jepler> [0.20000000000000001]
[19:47:09] <kwallace> Yes.
[19:47:36] <jepler> and I'll throw this in for additional context:
[19:47:36] <jepler> >>> print repr(.2)
[19:47:36] <jepler> 0.20000000000000001
[19:48:23] <cradek> then I guess the answer to the question is use %f if you want to see a certain number of decimal places?
[19:48:35] <jepler> cradek: yes
[19:49:02] <cradek> that's easy *and* I totally misunderstood the question
[19:49:21] <kwallace> The only thing that bothers me is I seem to recall formating a float just chops the trailing digits, so 2.999999999999999 could become 2.9 which is off by .1, I just need to be careful to round and not just format.
[19:49:46] <jepler> >>> "%.3f" % (2.99999)
[19:49:46] <jepler> '3.000'
[19:49:54] <jepler> that is not what %f does in Python
[19:52:03] <kwallace> Okay, I just seem to recall having a problem with formating a while back. I'll play with it some more. repr is new to me, I'll look at that too.
[19:52:20] <kwallace> Thanks all.
[19:53:09] <jepler> not that you won't be able to be surprised by the behavior of %f if you go around looking for trouble
[19:53:12] <jepler> >>> "%.0f" % .5
[19:53:15] <jepler> '0'
[19:53:17] <jepler> >>> "%.0f" % 1.5
[19:53:19] <jepler> '2'
[19:53:36] <cradek> round to even (is a feature)?
[19:53:37] <jepler> (actually that is apparently the correct rule, "round to nearest even"
[19:53:38] <jepler> )
[19:53:52] <cradek> yeah what he said
[19:53:52] <jepler> http://en.wikipedia.org/wiki/Rounding#Round_half_to_even
[19:53:59] -!- kfoltman has quit [Quit: Ex-Chat]
[19:54:02] <jepler> because round up to even is biased
[19:54:12] <jepler> err, .5 rounds up is biased
[19:54:52] <jepler> Python also supports decimal numbers but they'll eventually bite you in the seat of the pants too
[19:54:55] <jepler> >>> Decimal(".1") / 3 * 3
[19:54:58] <jepler> Decimal('0.09999999999999999999999999999')
[19:57:38] <jepler> ooh and also fractions. get a load of this great behavior:
[19:57:38] <jepler> >>> Fraction(1.1)
[19:57:38] <jepler> Fraction(2476979795053773, 2251799813685248)
[19:58:00] <cradek> looks like they should stop adding features
[19:58:29] <jepler> haters gonna hate
[19:59:55] -!- eFuchs has quit [Ping timeout: 272 seconds]
[20:10:47] <rythmnbls> jepler, I get Fraction(11, 10) on Python 2.6.5 and Fraction(2476979795053773, 2251799813685248) on 2.7.8
[20:11:04] -!- gabewillen [gabewillen!~gabewille@adsl-99-122-239-78.dsl.stl2mo.sbcglobal.net] has joined #linuxcnc-devel
[20:12:20] -!- almccon has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
[20:13:38] -!- patrickarlt has quit [Ping timeout: 255 seconds]
[20:23:18] -!- rythmnbls has quit [Quit: Leaving]
[20:24:40] -!- md-2 has quit [Ping timeout: 260 seconds]
[20:27:16] <jepler> rythmnbls: huh, python 2.6.8 (debian 7) gives an error for Fraction(1.1)
[20:29:47] -!- sirdancealot has quit [Ping timeout: 245 seconds]
[20:30:05] -!- mozmck has quit [Read error: Connection reset by peer]
[20:31:07] -!- mozmck [mozmck!~moses@67.210.159.245] has joined #linuxcnc-devel
[20:33:29] -!- kwallace2 [kwallace2!~kwallace@smb-184.sonnet.com] has joined #linuxcnc-devel
[20:34:02] -!- kwallace has quit [Ping timeout: 245 seconds]
[20:39:41] -!- dr0w has quit [Quit: Leaving]
[20:43:22] -!- gabewillen has quit [Ping timeout: 258 seconds]
[20:44:15] -!- tronwizard has quit [Ping timeout: 255 seconds]
[20:55:28] -!- md-2 has quit [Ping timeout: 260 seconds]
[21:01:18] -!- FinboySlick has quit [Quit: Leaving.]
[21:05:53] -!- tronwizard has quit [Ping timeout: 272 seconds]
[21:07:30] -!- eFuchs has quit [Quit: ping timeout]
[21:13:43] -!- acdha has quit [Quit: Textual IRC Client: www.textualapp.com]
[21:14:48] -!- Deejay has quit [Quit: bye]
[21:25:50] phantom is now known as Guest43834
[21:26:14] -!- quiqua has quit [Quit: quiqua]
[21:28:23] -!- phantomD has quit [Ping timeout: 240 seconds]
[21:28:24] -!- kamakaze has quit [Ping timeout: 240 seconds]
[21:44:47] -!- skorasaurus has quit [Ping timeout: 245 seconds]
[21:49:42] -!- gabewillen [gabewillen!~gabewille@96-35-247-244.dhcp.stls.mo.charter.com] has joined #linuxcnc-devel
[21:50:14] -!- assanaway has quit []
[21:53:36] -!- tronwizard has quit [Ping timeout: 246 seconds]
[21:56:33] -!- md-2 has quit [Ping timeout: 272 seconds]
[21:58:54] -!- dr0w has quit [Quit: Leaving]
[22:14:27] -!- kwallace [kwallace!~kwallace@smb-174.sonnet.com] has joined #linuxcnc-devel
[22:16:31] -!- kwallace2 has quit [Ping timeout: 258 seconds]
[22:21:42] -!- rigid has quit [Quit: NO WINE, NO WIFE, NO CARRIER]
[22:46:46] -!- mhaberler has quit [Quit: mhaberler]
[22:51:38] -!- skunkworks_ has quit [Remote host closed the connection]
[22:56:27] -!- md-2 has quit [Ping timeout: 245 seconds]
[23:05:34] -!- patricka_ has quit [Quit: Leaving...]
[23:06:07] -!- gonzo_ has quit [Ping timeout: 245 seconds]
[23:07:19] -!- patrickarlt has quit [Remote host closed the connection]
[23:30:40] -!- PetefromTn_ has quit [Quit: I'm Outta here!!]
[23:31:57] -!- toner has quit [Ping timeout: 246 seconds]
[23:32:50] -!- jerryitt_ has quit [Quit: Connection closed for inactivity]
[23:34:18] -!- sumpfralle has quit [Ping timeout: 244 seconds]
[23:39:24] -!- SpeedEvil has quit [Quit: No Ping reply in 180 seconds.]
[23:45:42] -!- SpeedEvil has quit [Quit: No Ping reply in 180 seconds.]
[23:52:40] -!- PCW has quit [Quit: ChatZilla 0.9.90.1 [Firefox 32.0.1/20140911151253]]
[23:53:00] -!- SpeedEvil has quit [Quit: No Ping reply in 180 seconds.]
[23:56:02] -!- gonzo_nb has quit [Remote host closed the connection]
[23:57:33] <KGB-linuxcnc> 03Dewey Garrett 05master 431fb11 06linuxcnc 10scripts/sim_pin sim_pin: show initial value * 14http://git.linuxcnc.org/?p=linuxcnc.git;a=commitdiff;h=431fb11
[23:58:13] -!- Nick001-shop has quit [Quit: ChatZilla 0.9.90.1 [Firefox 30.0/20140605174243]]