#emc-devel | Logs for 2006-11-08

[01:38:14] <jmkasunich> hi guys
[01:39:25] <jepler> hi jmk
[01:40:53] <jmkasunich> I just tried the new cl on my dapper/rt box with GTK 1.2
[01:40:55] <jmkasunich> not pretty
[01:41:04] <jmkasunich> I'm wondering if the time has come to move on
[01:41:12] <jmkasunich> (to GTK2)
[01:41:27] <jepler> frankly I didn't even think it compiled
[01:41:35] <jmkasunich> it didn't
[01:41:44] <jmkasunich> the make errors are what wasn't pretty
[01:42:12] <jepler> oh oh
[01:42:17] <jepler> I see
[01:42:23] <jepler> I thought you just meant it looked bad
[01:42:37] <jmkasunich> nope - didn't get that far
[01:43:12] <jepler> but yes I think that we'd have to just not build CL on gtk1.2 systems -- I'm not interested in the porting effort necessary.
[01:43:12] <jmkasunich> and not inclined to fight with it - I'm about to apt-get install libgtk2-dev
[01:43:20] <jepler> bbl
[01:44:06] <jmkasunich> I think moving to gtk2 would make several things cleaner - I know there are some compatibility hacks already, in halvcp, and a few other places
[01:46:55] <jmkasunich> zoiks - 20 new packages to be in stalled :-/
[02:22:58] <jmkasunich> 6 warnings, no errors:
[02:22:59] <jmkasunich> hal/classicladder/classicladder_gtk.c: In function ‘CreateFileSelection’:
[02:22:59] <jmkasunich> hal/classicladder/classicladder_gtk.c:544: warning: not enough variable arguments to fit a sentinel
[02:22:59] <jmkasunich> hal/classicladder/classicladder_gtk.c:546: warning: not enough variable arguments to fit a sentinel
[02:23:11] <jmkasunich> hal/classicladder/edit_sequential.c: In function ‘CommonSearchForManyStepsOrTransi’:
[02:23:11] <jmkasunich> hal/classicladder/edit_sequential.c:393: warning: ‘Ele1X’ may be used uninitialized in this function
[02:23:11] <jmkasunich> hal/classicladder/edit_sequential.c:393: warning: ‘Ele2X’ may be used uninitialized in this function
[02:23:21] <jmkasunich> hal/classicladder/manager_gtk.c: In function ‘ButtonAddSectionDoneClickSignal’:hal/classicladder/manager_gtk.c:124: warning: passing argument 1 of ‘VerifyIfSectionNameAlreadyExist’ discards qualifiers from pointer target type
[02:23:21] <jmkasunich> hal/classicladder/manager_gtk.c:137: warning: passing argument 1 of ‘AddSection’ discards qualifiers from pointer target type
[02:23:43] <jmkasunich> nitpicky littke things, I'll look into fixing in a few minutes
[02:44:00] <jmkasunich> two down, four to go
[03:22:44] <jmkasunich> jepler: around?
[03:46:13] <jmkasunich> I have absolutely no idea what CommonSearchForManyStepsOrTransi() is trying to do
[03:46:36] <jmkasunich> so I don't know if the "may be used uninitialized" case can ever happen
[03:46:46] <jmkasunich> is it just me, or is this code really hard to understand
[03:47:48] <jmkasunich> If TypeEle1 (and TypeEle2) are always either ELE_SEQ_STEP or ELE_SEQ_TRANSITION, then there is no problem
[03:48:13] <jmkasunich> if they can be something else, then Ele1X and/or Ele2X might be used uninitialized
[03:54:31] <cradek> I'm too busy laughing at the name to look at it
[03:55:58] <cradek> and how the errors all end with " !!??"
[03:56:15] <jmkasunich> well, I think the original developer is french
[03:56:32] <jmkasunich> not that that explains anything...
[03:56:47] <cradek> ok if it's a language difference I retract my statements
[03:57:00] <jmkasunich> !!?? isn't a language difference ;-)
[03:57:08] <cradek> any idea what Transi is?
[03:57:17] <jmkasunich> probably transition
[03:57:16] <cradek> oh Transitions
[03:57:38] <jmkasunich> but after spelling out a paragraph for a name, why didn't he finish it?
[03:58:01] <cradek> he stopped 32 characters
[03:58:02] <jmkasunich> yep
[03:58:12] <cradek> either for a linker limitation or a religious belief of some kind
[04:00:58] <jmkasunich> I'm tempted to init both of those vars to BIG_NUM, then test to see if they've been changed before they get used, and throw an error if not
[04:01:50] <jmkasunich> either that or reorder the iffs
[04:01:50] <jmkasunich> ifs
[04:02:06] <cradek> you must understand it more than I do
[04:02:56] <jmkasunich> if TypeEle1 == ELE_SQE_STEP {crap} else if TypeEle1==ELE_SEQ_TRANSITION {morecrap} else print "fscked"
[04:04:44] <cradek> looks like a switch(TypeEle1) with a default case
[04:05:08] <jmkasunich> I suppose
[04:05:17] <jmkasunich> I don't like to use a switch when there are only a couple cases
[04:06:48] <jmkasunich> I'd just do it (switch or ifs) if I wasn't reluctant to change things for fear of making the next round of porting harder
[04:07:06] <jmkasunich> no idea how much jeff had to change, perhaps my changes would be a drop in the bucket
[04:07:26] <jmkasunich> I felt the same way about the second warning fix (the first was a trivial cast)
[04:07:30] <cradek> yeah I don't know either
[04:07:45] <cradek> I'm sure he tried to change as little as possible
[04:07:58] <cradek> and he did not reformat the code, which was an obvious mistake last time around
[04:08:12] <jmkasunich> yeah
[04:08:19] <jmkasunich> but man that code is ugly
[04:08:50] <jmkasunich> parts of it are fine
[04:09:02] <jmkasunich> other parts look like they were indented by a drunk
[04:09:56] <cradek> haha
[04:11:05] <cradek> hmm, doesn't even build for me
[04:11:13] <jmkasunich> what system?
[04:11:15] <cradek> hal/classicladder/drawing_sequential.c: In function 'DrawSeqStep':
[04:11:15] <cradek> hal/classicladder/drawing_sequential.c:73: error: 'SizeDiv3' undeclared (first use in this function)
[04:11:21] <cradek> dapper
[04:11:28] <jmkasunich> you need GTK2.0-dev
[04:11:40] <jmkasunich> you're trying to use GTK1.2
[04:11:54] <cradek> thanks
[04:12:05] <jmkasunich> libgtk2.0-dev actually
[04:12:10] <cradek> yep found it
[04:12:18] <jmkasunich> (did that earlier this evening ;-)
[04:13:32] <cradek> hal/classicladder/classicladder_gtk.c: In function 'CreateFileSelection':
[04:13:32] <cradek> hal/classicladder/classicladder_gtk.c:555: error: 'filechooserdialog' undeclared (first use in this function)
[04:13:38] <cradek> what am I missing now?
[04:13:51] <jmkasunich> hmmm
[04:13:58] <jmkasunich> I might have busted that
[04:14:12] <cradek> yeah there's a mismatched comment end
[04:14:30] <cradek> wow the drunk was hard at work in this file
[04:14:33] <jmkasunich> I'm getting the same error here, but I could have sworn it was working before I committed
[04:14:43] <jmkasunich> yeah, that function especially
[04:15:08] <cradek> I don't understand how it can be this bad
[04:15:19] <cradek> he must use a very bad editor
[04:15:47] <jmkasunich> or he edits while drunk
[04:16:06] <jmkasunich> where is the messed up comment end?
[04:16:17] <cradek> line 558
[04:16:26] <cradek> if you set your tab width to 2, it looks much better
[04:16:53] <cradek> I bet he just has a terrible editor.
[04:18:14] <jmkasunich> I found my mistake
[04:18:34] <jmkasunich> he had lines 555-558 commented out, and I accidentally uncommented them
[04:18:41] <cradek> http://cvs.linuxcnc.org/cgi-bin/cvsweb.cgi/emc2/src/hal/classicladder/classicladder_gtk.c.diff?r1=;r2=
[04:18:52] <jmkasunich> thats where I looked
[04:18:54] <cradek> oops you already found it
[04:19:26] <jmkasunich> I suppose I can remove the unused variables too
[04:21:26] <jmkasunich> I don't like to comment out code - I prefer to #if 0 it out
[04:21:36] <jmkasunich> don't have to worry about nesting comments or anything funky that way
[04:21:58] <cradek> commenting code is bad practice, no doubt about it
[04:22:53] <jmkasunich> I also don't like to indent #if, #else, etc
[04:23:05] <jmkasunich> (which he did)
[04:23:24] <jmkasunich> cvs up and let me know how it goes
[04:23:34] <jmkasunich> compiles clean here (dapper RT)
[04:23:39] <jmkasunich> you have dapper sim, right?
[04:24:43] <cradek> yes
[04:25:06] <cradek> builds now...
[13:02:04] <skunkworks> join ubuntu
[13:02:11] <skunkworks> damn
[13:02:11] <alex_joni> no such channel found
[13:02:14] <alex_joni> :P
[14:12:20] <alex_joni> hi ray
[14:37:02] <rayh> Hi Alex
[14:37:24] <alex_joni> hi ray
[14:37:32] <rayh> I was to tired last night to bring up the qt lib.
[14:37:42] <rayh> Perhaps this weekend.
[14:46:45] <steves_logging> steves_logging is now known as steve_stallings
[14:47:21] <alex_joni> rayh: no hurry
[15:54:13] <steve_stallings> steve_stallings is now known as steves_logging
[17:11:29] <Hydra_AFK> Hydra_AFK is now known as Lerneaen_Hydra
[18:19:20] <alex_joni> jepler: got 5 minutes?
[19:34:25] <Lerneaen_Hydra_> Lerneaen_Hydra_ is now known as Lerneaen_Hydra
[19:37:19] <jepler> alex_joni: I'm back now .. what do you need?
[19:38:23] <alex_joni> jepler: just wanted to know how extensive your changes to CL were
[19:39:08] <alex_joni> and if there are some "general" improvements on that path (which would make sense for the CL guy to integrate)
[19:43:17] <jepler> alex_joni: first, I added HAL support. second, I added --nogui to load the clp into the running realtime. third, I hacked out stuff that is not useful to us like non-rt serial communications (modbus).
[19:43:36] <jepler> alex_joni: I didn't rename files, so a "diff" between the cl 0.7.100 tree and the cl directory in emc2 will be useful in seeing what has been changed
[19:44:23] <SWPadnos> after chopping out all the "hardware support", is there much left that's really useful?
[19:44:37] <SWPadnos> there's the core rung evaluator, and the GUI
[19:45:16] <SWPadnos> would it be easier in the long run to write a separate GUI (that's actually usable), and incorporate the rung evaluator into a HAL component?
[19:45:48] <alex_joni> SWPadnos: probably the safer choice
[19:46:14] <jepler> that's essentially how CL works
[19:46:22] <jepler> I mean, the port of CL to emc2
[19:46:41] <jepler> there's a userspace editor which communicates the layout of the rungs to RT via shared memory; the rungs are evaluated by realtime code
[19:47:57] <SWPadnos> yep - I figured it had to be mostly that, but was wondering whether it would be better to essentially use CL as a base, and not bother with their GUI at all (though that's the easiest part to port, since it should be essentially unchanged)
[19:48:32] <skunkworks> CLAxis
[19:48:35] <skunkworks> :)
[19:49:11] <SWPadnos> heh
[19:49:15] <SWPadnos> I nominate Jeff ;)
[19:49:20] <jepler> find someone who cares about CL
[19:49:27] <alex_joni> eek.. poor guy :)
[19:49:30] <SWPadnos> oh - that could be a problem
[19:50:06] <skunkworks> you don't have to nominate him - just mention it in passing... It shows up a few days later ;)
[19:50:15] <SWPadnos> heh
[19:50:27] <SWPadnos> now that you mentioned it, I don't think that tactic will work ;)
[19:50:36] <alex_joni> anymore
[19:50:42] <skunkworks> oops
[19:50:43] <alex_joni> skunkworks: you blew it
[19:50:49] <SWPadnos> bonehead
[19:51:05] <skunkworks> inside voice.. inside voice
[19:51:09] <SWPadnos> heh
[19:51:28] <alex_joni> listen to it next time